This discussion is archived
3 Replies Latest reply: Oct 15, 2012 1:32 AM by M.A.N RSS

Deployed Captcha Code on webcenter spaces using customized Task Flow

M.A.N Newbie
Currently Being Moderated

i am using Captcha Code, make new Task flow and fragment to be deployed on webcenter spaces, the code working correctly when am execute RUN from JDeveloper, but when i deploy it on webcenter spaces version and call this Task Flow from webcenter spaces the image not appear(Actually its Servlet code).

as mentioned on Oracle PDF ( ) -- > How-to use Captcha with ADF Faces and Oracle ADF

add Servlet on web.xml, then make Managed Bean Code (add it into faces-config.xml) , then create new task flow and call the method that execute the Managed Bean from ADF Task Flow Page.

1 - Servlet on web.xml :

2 - Managed Bean :
public void callMethod() {

FacesContext fctx = FacesContext.getCurrentInstance();
ExternalContext ectx = fctx.getExternalContext();
HttpServletRequest request = (HttpServletRequest)ectx.getRequest();
Captcha captcha = (Captcha)ectx.getSessionMap().get(Captcha.NAME);
try {
} catch (UnsupportedEncodingException e) {
//bad luck - but ignore
System.out.println("UTF not supported !");
String answer = (String)ectx.getRequestMap().get("bestGuess");
if (answer != null && captcha.isCorrect(answer)) {

} else {
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Please write the number shown in the Picture",


i am download the Captcha JAR from Oracle : , Download Captcha an using it as Task Flow to deploy it on webcenter spaces, but as i told you when i Run this code from JDeveloper working correctly, but the problem when i deploy it on webcenter spaces the Servlet code with image not appear. i wanna to know if servlet code working with deployed task flows on webcenter spaces or not ?

Please Advise..



  • Correct Answers - 10 points
  • Helpful Answers - 5 points