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: tiles Definitions
Date Tue, 06 Nov 2001 14:21:00 GMT

  Hi Peter,

  You should use ActionComponentServlet instead of ActionServlet. So, in your
web.xml file, replace the servlet-class of your servlet "action" by :

<servlet-class>org.apache.struts.tiles.ActionComponentServlet</servlet-class>

  Cedric

Peter Georgiou wrote:

> Hi
>
> I'm going through the Tiles tutorial and have reached the section on
> definitions where I have encountered problems.  I have created the following
> .jsp:
>
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
> <tiles:insert definition="myFirstDefinition"
>                    flush="true">
>   <tiles:put name="title"
>              value="My First Definition With Overloaded Title" />
> </tiles:insert>
>
> have created the following componentDefinitions.xml file:
>
> <!-- html definition Mappings  -->
> <component-definitions>
>   <!-- Definition description  -->
>   <definition name="myFirstDefinition" path="/layout/classicLayout.jsp">
>           <put name="title"  value="My First Definition Page" />
>           <put name="header" value="/common/header.jsp" />
>           <put name="footer" value="/common/footer.jsp" />
>           <put name="menu"   value="/common/menu.jsp" />
>           <put name="body"   value="/basic/hello.jsp" />
>   </definition>
> </component-definitions>
>
> I've added the following to my web.xml file:
>
> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
>     <init-param>
>       <param-name>definitions-config</param-name>
>       <param-value>/WEB-INF/componentDefinitions.xml</param-value>
>     </init-param>
>     <init-param>
>       <param-name>definitions-debug</param-name>
>       <param-value>1</param-value>
>     </init-param>
>
> and I've restarted the server.  However, when I try to load my .jsp I get
> the following error:
>
> javax.servlet.ServletException: Can't get definitions factory from context.
>  at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
> Source)
>  at
> org.apache.jsp.definitionPage$jsp._jspService(definitionPage$jsp.java:127)
>
> Does anyone know what this problem might be?
>
> Thanks
>
> Peter
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


--
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