You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kai Mai <ka...@gmail.com> on 2006/01/30 07:47:00 UTC
intercept any request to jsp page in Struts Tiles
Hi,
Whenever a user requests a JSP page, I need to determine if I need to
re-generate it if the corresponding template has been changed.
I use action forward to display tiles.
login.view is an action forward in my struts-config file
<definition name="logindefault" path="/login_template.jsp" />
<definition extends="logindefault" name="login.view"
controllerClass="edu.cmu.insomnia.pet.web.PetTilesController">
<put name="html-title" value="Login"/>
<put name="body-content" value="login.jsp" />
</definition>
I tried to extend TilesRequestProcessor and overrided doForward.
"doForward" uri is "/login_template.jsp". But how do I intercept the
request to "login.jsp"?
Thanks.
Kai
Re: intercept any request to jsp page in Struts Tiles
Posted by Dave Newton <ne...@pingsite.com>.
Kai Mai wrote:
> I need to support the legacy html template files.
>
Set it up so it'll translate HTML just like it does JSP.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: intercept any request to jsp page in Struts Tiles
Posted by Kai Mai <ka...@gmail.com>.
I need to support the legacy html template files.
On 1/30/06, Dave Newton <ne...@pingsite.com> wrote:
>
> Kai Mai wrote:
> > The template files are in HTML format instead of JSP format. so the
> > container won't re-compile them.
> >
> > whenever they are changed, I need to convert them in JSP formats first.
> Then
> > the container will re-compile them.
> >
> Why not just make them JSP files?
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: intercept any request to jsp page in Struts Tiles
Posted by Dave Newton <ne...@pingsite.com>.
Kai Mai wrote:
> The template files are in HTML format instead of JSP format. so the
> container won't re-compile them.
>
> whenever they are changed, I need to convert them in JSP formats first. Then
> the container will re-compile them.
>
Why not just make them JSP files?
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: intercept any request to jsp page in Struts Tiles
Posted by Kai Mai <ka...@gmail.com>.
The template files are in HTML format instead of JSP format. so the
container won't re-compile them.
whenever they are changed, I need to convert them in JSP formats first. Then
the container will re-compile them.
On 1/30/06, Dave Newton <ne...@pingsite.com> wrote:
>
> Kai Mai wrote:
> > Whenever a user requests a JSP page, I need to determine if I need to
> > re-generate it if the corresponding template has been changed.
> >
> Doesn't your container do that for you automagically? If it's a JSP page
> its corresponding servlet class should be recompiled if the source JSP
> file changes.
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: intercept any request to jsp page in Struts Tiles
Posted by Dave Newton <ne...@pingsite.com>.
Kai Mai wrote:
> Whenever a user requests a JSP page, I need to determine if I need to
> re-generate it if the corresponding template has been changed.
>
Doesn't your container do that for you automagically? If it's a JSP page
its corresponding servlet class should be recompiled if the source JSP
file changes.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org