struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <cedric.dumou...@lifl.fr>
Subject Re: Putting action URLs in template
Date Thu, 08 Nov 2001 10:14:54 GMT

  Hi,

  No, you can't call an action as a template content. More precisely, you can't
call an action once you have writen something in the output writer.
  But, you can do it if you use Tiles and their servlet rather than Templates.

  Cedric

Anat Rozenzon wrote:

> hi all,
>
> It seems to me like an obvious question but I can't find any answers in the
> archive so....
> Is it possible to put an action URL (e.g. /myservices.do) in a template put
> command?
> For example I would like my jsp file to contain this:
>
> <template:insert template='/template.jsp'>
>         <template:put name='header' content='/header.jsp' />
>         <template:put name='leftbar' content='/leftbar.jsp'/>
>         <template:put name='contents' content='/myservices.do'/>
>         <template:put name='rightbar' content=''/>
>         <template:put name='footer' content='/footer.jsp' />
> </template:insert>
>
> But I keep getting an error such as:
>
> javax.servlet.jsp.JspException: Servlet Exception
>      at
> org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:149)
>      at
> _0002fhome_0002ejsphome_jsp_0._jspService(_0002fhome_0002ejsphome_jsp_0.java
> :257)
>      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> ...
>
>
> Although if I  go directly to '/myservices.do' it isexecuted and show
> correctly.
>
> Thanks for any help
>
> Anat Rozenzon
> Telrad Networks
> anat.rozenzon@telrad.co.il <mailto:anat.rozenzon@telrad.co.il>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message