JSP forward pages problem

M

Matt

There are 3 jsp pages:

index.jsp is in http://server1/index.jsp.
page1.jsp and page2.jsp are in http://server1/address/

index.jsp will forward to page1.jsp (<jsp:forward page="page1.jsp"/>)
based on conditions.
In page1.jsp, it has <base href="http://server1/address/"> in the head
section.
And page1.jsp has <%@ include file="header.jsp "/> to include the
header.

When index.jsp forwards to page1.jsp, the URL remains the same.
However, in page2.jsp, it
will forward to page3.jsp based on conditions. But this time the URL
has
changed to http://server1/address.page1.jsp, not remains the same as
http://server1/index.jsp.

any ideas? please help. thanks!
 
R

Ryan Stewart

Matt said:
There are 3 jsp pages:

index.jsp is in http://server1/index.jsp.
page1.jsp and page2.jsp are in http://server1/address/

index.jsp will forward to page1.jsp (<jsp:forward page="page1.jsp"/>)
based on conditions.
In page1.jsp, it has <base href="http://server1/address/"> in the head
section.
And page1.jsp has <%@ include file="header.jsp "/> to include the
header.

When index.jsp forwards to page1.jsp, the URL remains the same.
However, in page2.jsp, it
will forward to page3.jsp based on conditions. But this time the URL
has
changed to http://server1/address.page1.jsp, not remains the same as
http://server1/index.jsp.

any ideas? please help. thanks!

Are you sure it doesn't change to http://server1/address/page2.jsp? That's
what I would expect unless there's something you haven't mentioned. And
what's your problem anyhow?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top