You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Neil Aggarwal <ne...@JAMMConsulting.com> on 2005/02/08 05:04:56 UTC

Action to invoke a tile definition?

Hello:

I am trying to learn to use tiles but cant figure out how
to invoke my tiles definition.

I have this tiles-defs.xml:

<?xml version="1.0" encoding="ISO-8859-1" ?>

 <!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
       "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">


<tiles-definitions>
  <!-- Base Tiles Definition -->
  <definition name="base.definition" path="/layout.jsp">
    <put name="title" value="PriceTracker" />
    <put name="header" value="/header.jsp" />
    <put name="navigation" value="/navigation.jsp" />
    <put name="footer" value="/footer.jsp" />
  </definition>

  <!-- Tiles definition of home page -->
  <definition name="page.home" extends="base.definition">
    <put name="body" value="/home.jsp" />
  </definition>

</tiles-definitions>

I want to invoke the page.home definition, so I declared this in my
struts-config.xml:

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">

<struts-config>
  <action-mappings>
    <action
      path="/home"
      forward="page.home" />
  </action-mappings>

  <controller
processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>

  <message-resources parameter="MessageResources" />
  
  <plug-in className="org.apache.struts.tiles.TilesPlugin" >
    <!-- Path to XML definition file -->
    <set-property property="definitions-config"
                     value="/WEB-INF/tiles-defs.xml" />
    <!-- Set Module-awareness to true -->
    <set-property property="moduleAware" value="true" />
  </plug-in>

</struts-config>

But, when I go to:
http://www.pricetracker.jammconsulting.com/pricetracker/home.do

I get this error:

HTTP Status 500 - No action instance for path /home could be created

----------------------------------------------------------------------------
----

type Status report

message No action instance for path /home could be created

description The server encountered an internal error (No action instance for
path /home could be created) that prevented it from fulfilling this request.


----------------------------------------------------------------------------
----

Apache Tomcat/5.0.25

Any ideas?

Thanks,
	Neil

--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com


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


RE: Action to invoke a tile definition?

Posted by Neil Aggarwal <ne...@JAMMConsulting.com>.
David:

Hmmm.  I was playing around with my struts-config and got it
working somehow.  It looks the same to me, but I cant argue
with results.  It must have been that I had a wrong version
on my dev server.

Sorry for any inconvenience to the list members.

Thanks,
	Neil


--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com

> -----Original Message-----
> From: David G. Friedman [mailto:humble@ix.netcom.com] 
> Sent: Monday, February 07, 2005 10:58 PM
> To: Struts Users Mailing List
> Subject: RE: Action to invoke a tile definition?
> 
> 
> Neil,
> 
> Your error messages suggest Struts failed to load.  You 
> should check the
> Tomcat log files in $CATALINA_HOME/logs to determine what 
> caused Struts not
> to load.
> 
> Regards,
> David
> 
> -----Original Message-----
> From: Neil Aggarwal [mailto:neil@JAMMConsulting.com]
> Sent: Monday, February 07, 2005 11:05 PM
> To: user@struts.apache.org
> Subject: Action to invoke a tile definition?
> 
> 
> Hello:
> 
> I am trying to learn to use tiles but cant figure out how
> to invoke my tiles definition.
> 
> I have this tiles-defs.xml:
> 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> 
>  <!DOCTYPE tiles-definitions PUBLIC
>        "-//Apache Software Foundation//DTD Tiles 
> Configuration 1.1//EN"
>        "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
> 
> 
> <tiles-definitions>
>   <!-- Base Tiles Definition -->
>   <definition name="base.definition" path="/layout.jsp">
>     <put name="title" value="PriceTracker" />
>     <put name="header" value="/header.jsp" />
>     <put name="navigation" value="/navigation.jsp" />
>     <put name="footer" value="/footer.jsp" />
>   </definition>
> 
>   <!-- Tiles definition of home page -->
>   <definition name="page.home" extends="base.definition">
>     <put name="body" value="/home.jsp" />
>   </definition>
> 
> </tiles-definitions>
> 
> I want to invoke the page.home definition, so I declared this in my
> struts-config.xml:
> 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> 
> <!DOCTYPE struts-config PUBLIC
>           "-//Apache Software Foundation//DTD Struts 
> Configuration 1.2//EN"
>           
> "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
> 
> <struts-config>
>   <action-mappings>
>     <action
>       path="/home"
>       forward="page.home" />
>   </action-mappings>
> 
>   <controller
> processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
> 
>   <message-resources parameter="MessageResources" />
> 
>   <plug-in className="org.apache.struts.tiles.TilesPlugin" >
>     <!-- Path to XML definition file -->
>     <set-property property="definitions-config"
>                      value="/WEB-INF/tiles-defs.xml" />
>     <!-- Set Module-awareness to true -->
>     <set-property property="moduleAware" value="true" />
>   </plug-in>
> 
> </struts-config>
> 
> But, when I go to:
> http://www.pricetracker.jammconsulting.com/pricetracker/home.do
> 
> I get this error:
> 
> HTTP Status 500 - No action instance for path /home could be created
> 
> --------------------------------------------------------------
> --------------
> ----
> 
> type Status report
> 
> message No action instance for path /home could be created
> 
> description The server encountered an internal error (No 
> action instance for
> path /home could be created) that prevented it from 
> fulfilling this request.
> 
> 
> --------------------------------------------------------------
> --------------
> ----
> 
> Apache Tomcat/5.0.25
> 
> Any ideas?
> 
> Thanks,
> 	Neil
> 
> --
> Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
> FREE! Valuable info on how your business can reduce operating costs by
> 17% or more in 6 months or less! http://newsletter.JAMMConsulting.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


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


RE: Action to invoke a tile definition?

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Neil,

Your error messages suggest Struts failed to load.  You should check the
Tomcat log files in $CATALINA_HOME/logs to determine what caused Struts not
to load.

Regards,
David

-----Original Message-----
From: Neil Aggarwal [mailto:neil@JAMMConsulting.com]
Sent: Monday, February 07, 2005 11:05 PM
To: user@struts.apache.org
Subject: Action to invoke a tile definition?


Hello:

I am trying to learn to use tiles but cant figure out how
to invoke my tiles definition.

I have this tiles-defs.xml:

<?xml version="1.0" encoding="ISO-8859-1" ?>

 <!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
       "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">


<tiles-definitions>
  <!-- Base Tiles Definition -->
  <definition name="base.definition" path="/layout.jsp">
    <put name="title" value="PriceTracker" />
    <put name="header" value="/header.jsp" />
    <put name="navigation" value="/navigation.jsp" />
    <put name="footer" value="/footer.jsp" />
  </definition>

  <!-- Tiles definition of home page -->
  <definition name="page.home" extends="base.definition">
    <put name="body" value="/home.jsp" />
  </definition>

</tiles-definitions>

I want to invoke the page.home definition, so I declared this in my
struts-config.xml:

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">

<struts-config>
  <action-mappings>
    <action
      path="/home"
      forward="page.home" />
  </action-mappings>

  <controller
processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>

  <message-resources parameter="MessageResources" />

  <plug-in className="org.apache.struts.tiles.TilesPlugin" >
    <!-- Path to XML definition file -->
    <set-property property="definitions-config"
                     value="/WEB-INF/tiles-defs.xml" />
    <!-- Set Module-awareness to true -->
    <set-property property="moduleAware" value="true" />
  </plug-in>

</struts-config>

But, when I go to:
http://www.pricetracker.jammconsulting.com/pricetracker/home.do

I get this error:

HTTP Status 500 - No action instance for path /home could be created

----------------------------------------------------------------------------
----

type Status report

message No action instance for path /home could be created

description The server encountered an internal error (No action instance for
path /home could be created) that prevented it from fulfilling this request.


----------------------------------------------------------------------------
----

Apache Tomcat/5.0.25

Any ideas?

Thanks,
	Neil

--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com


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


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