aspose file tools*
The moose likes JSP and the fly likes response.sendRedirect() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

response.sendRedirect()

Amirtharaj Chinnaraj
Ranch Hand

Joined: Sep 28, 2006
Posts: 236
hi guys
i want to do response.sendRedirect() in jsp level i have written the
following scripplet

is this a correct way .iam not getting any error in console but this page is not displayed properly
if their is some other way to do this please suggest me

regards
amir
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42930
    
  68
Is the code executed? Meaning, do you see the "u null" in the log file?
Amirtharaj Chinnaraj
Ranch Hand

Joined: Sep 28, 2006
Posts: 236
yes iam getting ulf
[ June 03, 2008: Message edited by: Amirtharaj Chinnaraj ]
Mohd Fuzail
Ranch Hand

Joined: Feb 20, 2002
Posts: 107
Whats the location of the redirected File?

Assuming its in same directory as the jsp file then use

From Servlet API
the servlet container must convert the relative URL to an absolute URL before sending the response to the client. If the location is relative without a leading '/' the container interprets it as relative to the current request URI. If the location is relative with a leading '/' the container interprets it as relative to the servlet container root.

Hope it helps


Being defeated is often a temporary condition. Giving up is what makes it permanent.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Duplicate of:
http://www.coderanch.com/t/365796/Servlets/java/response-sendRedirect

Please don't ask the same question in multiple fora.
It wastes people's time.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: response.sendRedirect()