Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

login-config in web.xml and redirection

843838Feb 16 2006
Hi,

I have a JSF web application and I use the JAAS mechanism to log in.
I have a simple index page which is the first page of the application:

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
</head>
<body>
<jsp:forward page="/faces/html/QOD_GW/device.jsp" />
</body>
</html>
In my web.xml I redirect to the login page in case of unsecured entrance:


    <login-config>
      <auth-method>FORM</auth-method>
      <realm-name>EM Application</realm-name>
      <form-login-config>
        <form-login-page>/faces/html/common/login.jsp</form-login-page>
        <form-error-page>/faces/html/common/login.jsp?failed=true</form-error-page>
      </form-login-config>
    </login-config>
So the scenario is this:
1) The user opens the application URL (http://localhost:8080/EM/).
2) The index.jsp is loaded and redirects to device.jsp.
3) Because we didn't go through the login procedure it brings us to the login.jsp.
4) In case of success it automatically returns to the device.jsp page.

This causes the first pages of the application (in my case the the login.jsp before login and the device.jsp after login) to appear without its full URL path.
When I go on with the navigation in the application, it changes and I get the full path (even if I go back to the device page).
But before & after login the login & device pages appears only with the application's URL (e.g.http://localhost:8080/EM/).

This causes my problems when trying to use images, js files etc...)

How can I force a "redirect" and get the full path (e.g. http://localhost:8080/EM/faces/html/QOD_GW/device.jsp, http://localhost:8080/EM/faces/html/common/login.jsp)??

Thanks a lot,
Efrat
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 16 2006
Added on Feb 16 2006
0 comments
304 views