• 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

Guys help me..

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my code:
A simple.JSP contains two links l1 and l2 calling S1 and S2 resp.
l1 is calling s1 like
<a href="S1?PAGE=o.jsp>Enter new..yada..yada
In Servlet s1 acts as dispatcher. It uses
if req.getParameter(Page).equals("o.jsp")
{
forward(o.jsp);
}
o.jsp is a form and I submit it. I use a hidden field to tell which page is calling servlet S1. But when I submit o.jsp, still i see the PAGE PARAMERTER IN QUERYSTRING...so servlet is thinking request is coming from simple.jsp and not from o.jsp.
Question: when i call jsp from servlet, I need to refresh querystring. I don't want querystring from previous JSP to be present...
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you coin a new resource url and then pass this new url to the dispatcher, then the querystring will be the new one which you just supplied. In other words coin the new address string like this. Assume here DOMAIN is "http://webappcabaret.com" LEAF is "/applName" as an example. Also assume the ServletUtilities class is a utilitiy class which has a static method called 'gotoPage(..)'.
regds
maha anna


[This message has been edited by maha anna (edited October 26, 2000).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic