Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with using Request dispatcher in my login,jspx

776716Jul 26 2010 — edited Jul 28 2010
Hi
I am using Jdev 11g and new to adf.
I am trying to work with adf security.
I designed a login.jspx page and loginproxy.jspx accoridng to the following link
http://groundside.com/blog/DuncanMills.php?title=j2ee_security_a_jsf_based_login_form&more=1&c=1&tb=1&pb=1

I have added this code in login.java
     ExternalContext ectx =    FacesContext.getCurrentInstance().getExternalContext();
     HttpServletRequest request =    (HttpServletRequest)ectx.getRequest();
     HttpServletResponse response =    (HttpServletResponse)ectx.getResponse();
     RequestDispatcher dispatcher =   request.getRequestDispatcher("loginnew.jspx");
RequestDispatcher dispatcher =   request.getRequestDispatcher("j_security_check");

    request.setAttribute("j_username", username);
    request.setAttribute("j_password", password);
     dispatcher.forward(request,response);
 
When it tries to execute dispatch statement, it goes in an infinite loop and finally gets me a stack overflow error and also in the cosole it prints series of exceptions like
ActionListenerImpl><processAction> javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class oracle.adf.controller.ControllerException
javax.faces.el.EvaluationException: javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class oracle.adf.controller.ControllerException
I have to validate the user against database hence i created a login.jspx with a backing bean so that i can access the username and password and validate the credentials against db and redirect user to the appropriate page.
The functionality i want to implement is very simple but i just cant get it to work using adf security.
any help is highly appreciated.

thanks
at
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2010
Added on Jul 26 2010
6 comments
1,729 views