• 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

want to use sendRedirect() but facing problem

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
if i want to print an error to user and than
i want to use sendRedirect() then what shoul di suppose to do?
e.g. if i m asking for userid and password if they are not
correct i want to reappear the same page but with error..
printing using printwriter also dosen't helped..
Bhupendra
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mahajan,
Please refer to "gotoPage(..)" method explained in this discussion. If you want to display the old contents which user type previously, then you have to put the object in session/request and grab the dynamic contents from those beans in your jsp file.
regds
maha anna
http://www.javaranch.com/ubb/Forum7/HTML/000666.html

 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
If you are using srvlet,then put the error msg in session
String eermsg="Invalid Login";
Append this "errmsg" to your URL while redirecting. http://localhost:7001/servlet/SERVLETNAME?errmsg="+errmsg+"
 
vaibhav punekar
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
If you are using srvlet,then put the error msg in session
String eermsg="Invalid Login";
Append this "errmsg" to your URL while redirecting. http://localhost:7001/servlet/SERVLETNAME?errmsg="+errmsg+"
 
Mahajan Bhupendra
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankx vaibhav..
good idea..
Bhupendra
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess u could also use javascript for that.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic