Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Guys help me..

 
Raj Kumar Gopal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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...
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • 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).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic