• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Expired

 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Iam getting "Session Expired" Message & a session expired exception message (com.dcom.servelts.SessionexpiredException : Session Expired at com.dcom.servelts.handle.getSessionData())
on the screen , when my session is expired.

I need to display only "Session Expired" message on the screen.(not both)

Please help me.

Thanks
 
s penumudi
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to catch com.dcom.servelts.SessionexpiredException exception and display the message you wanted to display onto the browser.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can configure a seperate page for this exception in your web.xml.
See <error-page>, <exception-type> elements.
 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply.My page doesn't contain <error-page>, <exception-type> elements.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bhaskar Gara:
Thanks for reply.My page doesn't contain <error-page>, <exception-type> elements.


Please read my previous post carefully, you will know that I was not talking about your JSP page, I was refering to web.xml (Deployment Descriptor) elements instead.
Thanks.
 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My web.xml file doen't contain those elements.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

My web.xml file doen't contain those elements.


Then you got to configure them.
 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code ........
if (session == null)
throw new SessionExpiredException();


In my web.xml file i declared :

<error-page>
<error-code>SessionExpiredException</error-code>
<exception-type>java.lang.Exception</exception-type>
<location>/sevelts/framework/SessionExpiredException</location>
</error-page>


But still i am getting both..( SessionExpired message & Exception)

why it is keep saying where the session is expired ..

com.dcom.servlets.framework.SessionExpiredException: Session Expired at com.wbiForm.performService(JoinForm.java:136) at com.dcom.servlets.framework.ServletFramework.Service(ServletFramework.java:1051) at com.dcom.servlets.framework.ServletFramework.doPost

[ December 30, 2005: Message edited by: Bhaskar Gara ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try something like below.

 
Bacchi Gerem
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.I changed my code like...
<error-page>
<exception-type>com.dcom.servlets.framework.SessionExpiredException</exception-type>
<location>/JoinForm</location>
</error-page>
JoinForm is java servlet
Still iam getting same exception
 
Bosun Bello
Ranch Hand
Posts: 1510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you have the location as joinForm? The location element should contain the page (jsp, html) you want displayed to the user when the error occurs. You can get more info if you search the forum or the web at large.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic