You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by jo...@cyntact.com on 2003/05/08 17:26:55 UTC

Struts 1.1 module prefixes tiles:insert page property?

I'm in the process of converting an existing app to Struts application
modules but I'm having difficulty with the <tiles:insert> tags. The
webapp is setup in the context /pole and has two subdirectories 'member'
and 'visitor' that have separate container managed security constraints
with different roles but are not webapps themselves (they feed on the
/pole/WEB-INF).

I'd like to setup the struts configuration with three modules:

  <servlet>
    <servlet-name>action</servlet-name>
 
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/conf/struts-pole.xml</param-value>
    </init-param>
    <init-param>
      <param-name>config/member</param-name>
      <param-value>/WEB-INF/conf/struts-pole-member.xml</param-value>
    </init-param>
    <init-param>
      <param-name>config/visitor</param-name>
      <param-value>/WEB-INF/conf/struts-pole-visitor.xml</param-value>
    </init-param>
  . . .

This setup works fine, except the <tiles:insert
page="/WEB-INF/conf/MemberTemplate.jsp"> throws a FileNotFoundException
for "/member/WEB-INF/conf/MemberTemplate.jsp" which of course there is
no such directory "/member/WEB-INF".
Stack Trace Follows:

java.io.FileNotFoundException: /member/WEB-INF/conf/MemberTemplate.jsp
	at
org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:516)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(J
spServlet.java:176)
	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:188)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:683)
	at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDisp
atcher.java:574)
	at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispat
cher.java:497)
	at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.ja
va:819)
	at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:3
91)
	at
org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:158)
	at org.apache.jsp.index$jsp._jspService(error$jsp.java:289)

I would like to continue keeping the templates beneath WEB-INF if
possible. One way I know would be to change each of the jsp's in this
application such that the struts insert path="/../WEB-INF/..." but I
wanted to find out if there's a cleaner approach. Perhaps at a higher
level reducing the modifications to this existing app.

--
Josh


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