M
Matt
absolute path versus relative path in JSP
I have an index.jsp that will forward to different JSP pages
based on different conditions:
<%
if (cond1)
{
%>
<jsp:forward page="address/page1.jsp"/>
<% }
else if (cond2)
{
%>
<jsp:forward page="address/page2.jsp"/>
<% }
else
{
%>
<jsp:forward page="address/page3.jsp"/>
<% }
%>
The problem is in different pageX.jsp, when user submit form data, it will go to
other pages. Before, the index.jsp is in the same directory as pageX.jsp.
But now I moved out ofthe address folder, and it has broken links.
In my case, should I specify the abosolute path, rather than relative path?
so that in whatever situation, it will work.
please help. thanks!!
I have an index.jsp that will forward to different JSP pages
based on different conditions:
<%
if (cond1)
{
%>
<jsp:forward page="address/page1.jsp"/>
<% }
else if (cond2)
{
%>
<jsp:forward page="address/page2.jsp"/>
<% }
else
{
%>
<jsp:forward page="address/page3.jsp"/>
<% }
%>
The problem is in different pageX.jsp, when user submit form data, it will go to
other pages. Before, the index.jsp is in the same directory as pageX.jsp.
But now I moved out ofthe address folder, and it has broken links.
In my case, should I specify the abosolute path, rather than relative path?
so that in whatever situation, it will work.
please help. thanks!!