t1.jsp
t2.jsp
When I request for t1.jsp i.e
http://localhost:8080/Scwcd/t1.jsp
and click submit button,it takes to t2.jsp as specified in the mapping.
address:
http://localhost:8080/Scwcd/tests/b.jsp
browser output:
T2jsp------t1jsp /tests ---------
______
|submit|
_______
when I click on the the submit button on this page it takes to
address:http://localhost:8080/Scwcd/tests/tests
browser output:
T2jsp------t1jsp /tests ----------
______
|submit|
_______
The address URL changes but the broswer output is same as of t2.jsp
broswer output should be of t1.jsp i.e.
t1jsp------t2jsp
______
|submit|
_______
q1.Why am I getting such behaviour ?
-----------------------------------------------------------------------------------------------------------------
If i remove the following code from web.xml,the request from t2.jsp is mapped to /tests/*.
should'nt the request for tests in the form tag i.e.
t2.jsp
go to an error page eg-"page not found" as no match would be found for it for
tests.
THough there is a mapping to /tests/* but its different from tests.
q2.Why is the request from t2.jsp is mapped to /tests/* if code as specified above is removed from web.xml ?