You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Justin Ruthenbeck <ju...@nextengine.com> on 2003/08/06 01:23:01 UTC

Fwd: Re: Front Controller Servlet

>Date: Tue, 05 Aug 2003 14:42:05 -0700
>To: "Tomcat Users List" <to...@jakarta.apache.org>
>From: Justin Ruthenbeck <ju...@nextengine.com>
>Subject: Re: Front Controller  Servlet
>
>At 05:42 AM 8/5/2003, you wrote:
>>I am trying to build FrontController servlet for a web site on Tomcat 4 ,
>>after long time of changes on the web.xml file , I wasn't able to achieve
>>this pattern,
>>the web.xml portion is :
>>
>><servlet-mapping>
>>       <servlet-name>FCservlet</servlet-name>
>>       <url-pattern>*.jsp</url-pattern>
>></servlet-mapping>
>>
>>my problem start when the FrontController servlet needs to forward the
>>request to other jsp pages
>>and when he uses the Forward method , the tomcat activate my FrontController
>>again , and after a  while  I get : StackOverflowError .
>
>You say that you're using the forward() method -- why?  There are reasons 
>to do this, but if you're trying to create a FrontController, then 
>presumably you're not interested in hitting your jsps directly in the 
>first place.  Is there any reason you aren't using a RequestDispatcher to 
>dispatch/include your jsp page output instead of forwarding to the page?

Sorry -- reread this and realized my mind was wondering somewhere 
else.  Next time, remind me not to eat a big lunch and then try to think 
right away afterwards...

justin

____________________________________
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
    See http://www.nextengine.com/confidentiality.php
____________________________________