Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

forward thing: tomcat 4.1

Kumar, Sumit

2003-12-01

Replies:

Hello,

This is more like a jsp question rather then the tomcat one but pardon me
for asking here. In my servlet, I do a
getServletContext().getRequestDispatcher(
"/reports.jsp?msg='selectEval'&pid=" + pid).forward( req, res ). The code is
given below. I believe this should forward it to reports.jsp[line (4)]. But
what happens is that even though it forwards it to reports.jsp, it continues
to execute the servlet even below the forward statement. When it encounters
the next forward statement[line (5)], it gives IllegalStateException. I
would think it should not go even past first forward[line (4)]. Please help
in clarifying.

if (revList.length > 1)
{
 req.setAttribute("revList", revList);  
 (4)getServletContext().getRequestDispatcher(
"/reports.jsp?msg='selectEval'&pid=" + pid).forward( req, res );
}
else if (revList.length == 1)
{        
         
 req.setAttribute("projEvalInfo", pe);
}  
(5)getServletContext().getRequestDispatcher(
"/OtaceEvalFormRpt.jsp").forward( req, res );

-sumit          


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.