You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Landaluze Produktions IS - Carlos <li...@lpis.com> on 2000/12/25 21:18:39 UTC

forward

with the bellow code i pass all jsdp pages to a servlet and this servlet
makes a forward and show the page, in the first i wnat page.
but with this example where the servlet forward to the jsp page this go
another time to the servlet...... in a bucle until tomcat shutdown.
there is any way to all pages invoqke a servlet (class file) and this make a
forward to the original jsp page but this second call, as  is a internal
call, no call the servlet?
code:
<web-app>
<servlet>
<servlet-name>Navigate</servlet-name>

<servlet-class>com.nevada.servlets.Navigate</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Navigate</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>

Con el codigo de arriba queiro que todas las paginas jsp primero llame a un
servler  (fichero class) que hace labores varias (contador, analizador etc)
pero que este luego hace un forward a la pagina que en uhn principio le ha
invocado, para presentarmela,claro esta.
El problema biene cuando se hace esta segunda llamada al jsp proveniente del
forward del class que denuevo hace una llamada al class y así un bucle hasta
el infinito y el tiomcat cae.
HAy alguna posibilidad o configuraion el el web.xml, para que se haga una
llamda a un class por parte de todas las paginas jsp pero luego al llamarlas
el class (hacer el forward para presentar esa pagina) y como esta es una
llamda, digamos, interna, no se llame de nuevo al class, así no se haria un
bucle interminable que temina con la caida del tomcat?