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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

local links from JSP

Status
Not open for further replies.

dognobbler

Programmer
Jul 4, 2003
46
GB
I have a servlet doLogin which forwards to a JSP using the following code

RequestDispatcher rd2 = request.getRequestDispatcher( "/matchScore2.jsp" );
rd2.forward( request, response );

The location of the servlet is

webapps/UK/WEB-INF/classes/doLogin

and the location of the JPS is

webapps/UK/matchScore2.jsp

The problem is that all the links on matchScore2.jsp appear relative to the directory

webapps/UK/WEB-INF/classes/

when they should be relative to

webapps/UK/

Can anyone see what I am doing wrong?

Thanks

Andy
 
Try using the HTML <base> element
Code:
<BASE href=&quot;[URL unfurl="true"]http://myserver.com/mypage.jsp&quot;>[/URL]

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top