Oops, meant to include the error message (404 error):
The requested resource (/tilesproj/.mydefinition) is not available.
.mydefinition is in my tiles-defs.xml, but struts is apparently thinking it
should be a file in my web app directory.
The JSP files I'm specifying do all exist.
I'm currently figuring out how to configure tomcat logging (tomcat newbie
too) but maybe the above info will tell you something?
Thanks.




                                                                                       
                                  
                                                                                       
                                  
                                               To:       Struts Users Mailing List 
<[EMAIL PROTECTED]>      
                      Cedric Dumoulin          cc:       (bcc: Alayne Wartell/Towers 
Perrin)                             
                      <[EMAIL PROTECTED]        Subject:  Re: tiles definition doesn't 
work, config looks correct, am     
                      g>                        baffled                                
                                  
                                                                                       
                                  
                      10/31/2002 04:01                                                 
                                  
                      AM                                                               
                                  
                      Please respond to                                                
                                  
                      "Struts Users                                                    
                                  
                      Mailing List"                                                    
                                  
                                                                                       
                                  
                                                                                       
                                  





  Hi,

  What is the error ? Also check the output in the tomcat error log file.

Alayne Wartell wrote:

>Hi,
>I'm trying to get Tiles running with Struts, and I'm getting 404's when I
>try to use tiles definitions.
>I'm running Struts 1.1b2 and Tomcat.
>I can run a JSP-only Tiles template just fine.
>I really hope someone can help. I've checked everything I can think of and
>have run out of ideas.
>Details follow.....
>Thanks very much,
>Alayne
>(struts newbie)
>
>I'm trying to access http://localhost:8080/tilesproj/testdefinition.do
>which forwards to definition ".mydefinition"
>which is in tiles-defs.xml
>I've configured the Tiles plug-in in struts-config.xml. I originally had
it
>in web.xml but either way I get the same behavior.
>I'm running the regular Struts controller.
>
>Here are my configuration files:
>
>tiles-defs.xml :
><?xml version="1.0" encoding="ISO-8859-1" ?>
><!DOCTYPE tiles-definitions PUBLIC
>       "-//Apache Software Foundation//DTD Tiles Configuration//EN"
>       "http://jakarta.apache.org/struts/dtds/tiles-config.dtd";>
>
><tile-definitions>
><!-- page templates -->
>      <definition name=".standardBaseLayout" path
>="/standardBaseLayout.jsp">
>            <put name="header" value="/header.jsp" />
>            <put name="body" value="" />
>            <put name="footer" value="/footer.jsp" />
>      </definition>
>
><!-- put application pages here -->
>      <definition name=".mydefinition" extends=".standardBaseLayout">
>            <put name="body" value="/mypage.jsp" />
>      </definition>
></tile-definitions>
>------------------------------------------------------------
>struts-config.xml :
>
><?xml version="1.0" encoding="ISO-8859-1" ?>
><!DOCTYPE struts-config PUBLIC
>          "-//Apache Software Foundation//DTD Struts Configuration
1.1//EN"
>          "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
>
><struts-config>
>
>    <global-forwards>
>       <forward
>            name="index"
>            path="/index.jsp"/>
>    </global-forwards>
>
>    <action-mappings>
>            <action
>                  path="/testuse"
>                  forward="/testuse.jsp" />
>            </action>
>                        <action
>                  path="/testdefinition"
>                  type="org.apache.struts.tiles.actions.NoOpAction">
>                  <forward name="success" path=".mydefinition" />
>                  <forward name="failure" path=".mydefinition" />
>            </action>
>
>    </action-mappings>
>
>      <!-- tiles plug-in -->
>  <plug-in className="org.apache.struts.tiles.TilesPlugin" >
>    <set-property property="definitions-config"
>                       value="/WEB-INF/tiles-defs.xml" />
>    <set-property property="definitions-debug" value="2" />
>    <set-property property="definitions-parser-details" value="2" />
>    <set-property property="definitions-parser-validate" value="true" />
>  </plug-in>
>
>    <message-resources parameter="resources.application"/>
>
></struts-config>
>
>
-------------------------------------------------------------------------------------------

>web.xml :
><?xml version="1.0" encoding="ISO-8859-1"?>
>
><!DOCTYPE web-app
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
>
><web-app>
>  <!-- Standard Action Servlet Configuration (with debugging) -->
>  <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/struts-config.xml</param-value>
>    </init-param>
>    <init-param>
>      <param-name>debug</param-name>
>      <param-value>2</param-value>
>    </init-param>
>    <init-param>
>      <param-name>detail</param-name>
>      <param-value>2</param-value>
>    </init-param>
>    <load-on-startup>2</load-on-startup>
>    <init-param>
>      <param-name>application</param-name>
>      <param-value>ApplicationResources</param-value>
>    </init-param>
>  </servlet>
>
>
>  <!-- Standard Action Servlet Mapping -->
>  <servlet-mapping>
>    <servlet-name>action</servlet-name>
>    <url-pattern>*.do</url-pattern>
>  </servlet-mapping>
>
>  <!-- The Usual Welcome File List -->
>  <welcome-file-list>
>    <welcome-file>index.jsp</welcome-file>
>  </welcome-file-list>
>
>  <!-- Struts Tag Library Descriptors -->
>  <taglib>
>    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
>    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
>  </taglib>
>
>  <taglib>
>    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
>    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
>  </taglib>
>
>  <taglib>
>    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
>    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
>  </taglib>
>
>  <taglib>
>    <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
>    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
>  </taglib>
>
>  <taglib>
>    <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
>    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
>  </taglib>
>
>      <!-- tiles plug-in -->
>
>  <!--plug-in className="org.apache.struts.tiles.TilesPlugin" >
>
<set-property property="definitions-config"
>                       value
="/WEB-INF/tiles-defs.xml" />
>    <set-property property
="definitions-debug" value="2" />
>    <set-property property
="definitions-parser-details" value="2" />
>    <set-property property
="definitions-parser-validate" value="true" />
>  </plug-in-->
>
></web-app>
>
>
>
>
>--
>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>







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

Reply via email to