• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can any body help

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anybody tell me in my jsp application some time when i am clicking on hyperlink its redirect page to login page
due to geting data from session .how i can resolve this.the code snippet is
try
{
String sub_id=(String)session.getAttribute("subscriber_id");
sub_id=sub_id.trim();
System.out.println("Subscriber Id ="+sub_id);
}catch(Exception e)
{
System.out.println("Error in getting data from session!");
String urlE = "http://"+request.getServerName()+":"+request.getServerPort()+"/cdr/jsp/login.jsp";
response.sendRedirect(urlE);
}
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vijai,

This may occur when the attribute 'subscriber_id' does not exist on the session. It will be better to ensure that subscriber_id always exists on session before trying to use it.


Suresh.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
vijai sahu,
Welcome to JavaRanch!

In an effort to help you get the most from our forums, we've compiled a
list of tips for asking questions here. You can find the list in our
FAQ section here.
In particular please see:
UseAMeaningfulSubjectLine

"can any body help" tells us nothing about the nature of your app.
Many people won't even open a thread if the subject line doesn't describe what's in it.

Again, welcome to JavaRanch and good luck with your question.
-Ben
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic