Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

jsp:forward page to parent directory

Thread view: 
in_dv - 13 Nov 2006 21:03 GMT
Hi,

I am using struts framework for authenticating clients. The struts
action mapping is as follows:

<action
               path="/servlet/PathwayClientAuthenticator"
               scope="request"
               name="emptyForm"
               input="/signup01.jsp"
               validate="false"
               type="netpulse.PathwayClientController">
               <forward name="success"
                       path="/signup11.jsp"/>
               <forward name="failure"
                       path="/signup00.jsp"/>
       </action>

So I am getting transfered to
https://some_url/servlet/PathwayClientController.do but getting
contents of sugnup11.jsp on success.

Now from that page I want to forward to signup2.jsp
<jsp:forward page="/signup2.jsp">
But I am getting following error :
The requested resource (/servlet/signup2.jsp) is not available.

I dont understand that even on giving /signup2.jsp , why its not
looking into the document root rather than looking into relative path
...

Kindly help me thanks a lot

D
Manish Pandit - 13 Nov 2006 22:34 GMT
You should be using a path relative to the current JSP. If you use
absolute path (/....), the web server ends up resolving it, which leads
it to the context root (/servlet in your case).

-cheers,
Manish
in_dv - 14 Nov 2006 14:00 GMT
Thanks for your inputs Manish,  Please can you tell me how I should use
the path relative to current jsp page. According to my knowledge , if
we specify the "/" in front of .jsp page the path is considered as
absolute path and from the document root. Please correct me if I am
wrong

D

> You should be using a path relative to the current JSP. If you use
> absolute path (/....), the web server ends up resolving it, which leads
> it to the context root (/servlet in your case).
>
> -cheers,
> Manish
Manish Pandit - 14 Nov 2006 17:28 GMT
You are right - adding / in front of the path makes it absolute with
the context root, but in this case the context root includes the
context itself (/servlet). You might want to try something like
../index.jsp or just ../../index.jsp based on where the other index.jsp
is, relative to the "current" index.jsp.

-cheers,
Manish


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.