aspose file tools*
The moose likes JSP and the fly likes how to display default page after jsp authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how to display default page after jsp authentication" Watch "how to display default page after jsp authentication" New topic
Author

how to display default page after jsp authentication

Ramana Kumar Atmakuru
Greenhorn

Joined: Jul 13, 2003
Posts: 6
hi,
I have an application with declarative security.it works fine.It remembers the page requested and after authentication,it trasfer control to the requested page.
Now,I have question about how to tell server to display the page after successful authentication.Here,user never requested any page.He directly accessed login page and got authenticated but after this, i would like send control to default page...
how can i do this?..Can any body help with this...
Thanks guys for your time..
bye
Ramana Kumar.
Hans Bergsten
Author
Ranch Hand

Joined: Dec 01, 2003
Posts: 106
Originally posted by Ramana Kumar Atmakuru:
hi,
I have an application with declarative security.it works fine.It remembers the page requested and after authentication,it trasfer control to the requested page.
Now,I have question about how to tell server to display the page after successful authentication.Here,user never requested any page.He directly accessed login page and got authenticated but after this, i would like send control to default page...
how can i do this?..Can any body help with this...
Thanks guys for your time..
bye
Ramana Kumar.

There's no way to do this with container-based authentication, no matter if you use custom pages or rely on the Basic or Digest HTTP authentication mechanisms. You need to roll your own to get this behavior, e.g., using a servlet (or Struts Action) for authentication and filter for access control. I show examples of this in my JavaServer Pages book.


Hans Bergsten, hans@gefionsoftware.com<br />Author of O'Reilly's<br />- JavaServer Pages,<br />- JavaServer Faces<br /><a href="http://www.hansbergsten.com/" target="_blank" rel="nofollow">http://www.hansbergsten.com/</a>
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
In general, we will configure a Filter in the Web application. For every request, it will be *scanned* by the Filter. The Filter can read a request, checks the condition, and modify the request.
Thus, if a request is from an unauthenticated user, the Filter can redirect the request to the login page. If a request is from an authenticated user, then it simply does nothing. If the request is a login request, it can check whether the login info correct, and update the request, say, by adding a login succeed token.
For this page, I read Servlet 2.4 spec., as well as the SCWCD Exam Study Kit Chapter 18.
Nick


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to display default page after jsp authentication
 
Similar Threads
Retrieve current Login ID
Implementing Form-based Authentication using LDAP on JSF pages in Websphere
Struts question.
Form Based authentication Websphere
Problem with custom tags