Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing 2 parameter via URL

Status
Not open for further replies.

fungling

Programmer
Feb 23, 2003
10
HK
Dear all,

Can you tell me how to pass 2 parameter to web page?

I spend hours to debug this script:

response.sendRedirect("checking.jsp?errortype="+errortype+&"rNo="+sid);

should I use & to connect the 2 parameters as error occurs while using &.

Thanks for your help!

Joyce

 

response.sendRedirect("checking.jsp?errortype="+errortype+"&rNo="+sid); should work.

After tying that, add a message to your jsp file
request.getParameter("errortype")
is this value null?


Salih Sipahi
Software Engineer.
City of Istanbul Turkey
ssipahi@yonbilgi.com
 
why are you using redirect instead of <jsp:forward...> ?

-pete
 
Wait a moment Palbano has touched a good point.Are you in servlet class or jsp page? (while typing request.sendRedirect.....) Salih Sipahi
Software Engineer.
City of Istanbul Turkey
ssipahi@yonbilgi.com
 
I am using request.sendRedirect in jsp page.
I know <jsp:forward> can pass mutiple parameter to next page. Shouldn't I use <jsp:forward> instead of request.sendRedirect for the ease?

Besides, I have another question. When I use request.sendRedirect(&quot;process.jsp?temp_id=&quot;+number) to pass the temp_id from a Frame to Frameset. The value do appear in URL, but it never be captured ,&quot;request.getParameter(&quot;temp_id&quot;)&quot; is null , in the frame set. Can I get the value from form data inside the frame set?

Thanks for all your help

Joyce


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top