wood burning stoves*
The moose likes Servlets and the fly likes Sending parameter with sendredirect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Sending parameter with sendredirect" Watch "Sending parameter with sendredirect" New topic
Author

Sending parameter with sendredirect

Fouad Fares
Ranch Hand

Joined: Apr 16, 2003
Posts: 38
Hello,
I'm trying to make redirection from java class to a jsp page with sending parameter like the following code :
------------------------------------
String s_url ="log.jsp";
String s_param1 = "Invalid date";
p_response.sendRedirect(s_url + "?ERROR=" + s_param1);
-------------------------------------
the application is running successfully on jdeveloper 3.2.3 .
But once i deploy it into the 9iAS release 2 the redirection works fine without sending the parameter .
Could you please advise me how can i solve this problem .
Thank you in advance .
Nagendra Prasad
Ranch Hand

Joined: Jul 11, 2002
Posts: 219
Can you access the page directly on IAS???
i.e what happens if u type the following into the browser?
http://hostname/log.jsp?ERROR=Invalid


Best Regards,<br />Nagendra Prasad.
Fouad Fares
Ranch Hand

Joined: Apr 16, 2003
Posts: 38
Hello,
Yea i can access directly .
In case i put the url like you say it displays the parameter on the page [INVALID]
Thank you Nagendra
Best regards ,
Fouad
Nagendra Prasad
Ranch Hand

Joined: Jul 11, 2002
Posts: 219
Interesting behaviour.. .so.. somehow the parameter is not being read properly by the application server when the redirect happens.
I am not too sure of the workings of IAS..
I tried some thing like this on my application server.. ( JRun and WebSphere) and they seemed to work fine:
res.sendRedirect(req.getScheme()+"://"+req.getServerName()+":"+req.getServerPort()+"/log.jsp?ERROR="+s_param1 )
Could you possibly try that in your code???
Fouad Fares
Ranch Hand

Joined: Apr 16, 2003
Posts: 38
Hello,
sorry for the delay . I will try your request but after one hour because i have to finish some proposal to my manager .
I will be back to you after making the changes .
Thank you for your support .
Best regards ,
Fouad fares .
 
GeeCON Prague 2014
 
subject: Sending parameter with sendredirect