Hilton, Steve
2006-03-08 16:06:56 UTC
Hello every. I am new to this e-mail forum, so hopefully I am posting
this question correctly. I have been pulling my hair out over this
problem. I have looked in many books and at many examples on websites
and cannot see where I am doing anything wrong. I have listed the tiles
and struts configuration files for a simple example below. I can pull
examples, verbatim, off off websites and they get the exact same error
as sample programs I set up myself.
First of all, I am using Websphere 5.1.0. The problem is this....
Any time I try to reference a definition name in the tiles-defs.xml
file, any reference to that definition in the struts-config file always
produces a warning which states "Target page.default cannot be resolved
in the context of the following modules: /"
I have tried everything and cannot figure out why this will not work.
This really doesn't seem like it should be that hard. It just seems
like the struts-config file can never find anything in the tiles-defs
file.
To make this even more frustrating, I can create a welcome page like the
index.jsp listed below and that works fine.
index.jsp
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<insert:tiles definition="page.default">
Any help would be greatly appreciated. Thanks! -- Steve
Here's the files for the sample application....
tiles-defs.xml
<tiles-definitions>
<definition name="page.default" path="/tiles/myLayout.jsp">
<put name="title" value ="My Title"/>
<put name="header" value="/tiles/header.jsp"/>
<put name="body" value="/tiles/body.jsp"/>
<put name="footer" value="/tiles/footer.jsp"/>
</definition>
</tiles-definitions>
struts-config.xml
<struts-config>
<!-- Data Sources -->
<data-sources>
</data-sources>
<!-- Form Beans -->
<form-beans>
</form-beans>
<!-- Global Exceptions -->
<global-exceptions>
</global-exceptions>
<!-- Global Forwards -->
<global-forwards>
</global-forwards>
<!-- Action Mappings -->
<action-mappings>
<action path="/testAction"
type="com.aegon.learntiles.actions.LearnTilesAction">
<forward name="success" path="page.default"/>
</action>
</action-mappings>
<!-- Message Resources -->
<message-resources
parameter="com.aegon.learntiles.resources.ApplicationResources"/>
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="pathnames"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
</plug-in>
</struts-config>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@struts.apache.org
For additional commands, e-mail: user-***@struts.apache.org
this question correctly. I have been pulling my hair out over this
problem. I have looked in many books and at many examples on websites
and cannot see where I am doing anything wrong. I have listed the tiles
and struts configuration files for a simple example below. I can pull
examples, verbatim, off off websites and they get the exact same error
as sample programs I set up myself.
First of all, I am using Websphere 5.1.0. The problem is this....
Any time I try to reference a definition name in the tiles-defs.xml
file, any reference to that definition in the struts-config file always
produces a warning which states "Target page.default cannot be resolved
in the context of the following modules: /"
I have tried everything and cannot figure out why this will not work.
This really doesn't seem like it should be that hard. It just seems
like the struts-config file can never find anything in the tiles-defs
file.
To make this even more frustrating, I can create a welcome page like the
index.jsp listed below and that works fine.
index.jsp
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<insert:tiles definition="page.default">
Any help would be greatly appreciated. Thanks! -- Steve
Here's the files for the sample application....
tiles-defs.xml
<tiles-definitions>
<definition name="page.default" path="/tiles/myLayout.jsp">
<put name="title" value ="My Title"/>
<put name="header" value="/tiles/header.jsp"/>
<put name="body" value="/tiles/body.jsp"/>
<put name="footer" value="/tiles/footer.jsp"/>
</definition>
</tiles-definitions>
struts-config.xml
<struts-config>
<!-- Data Sources -->
<data-sources>
</data-sources>
<!-- Form Beans -->
<form-beans>
</form-beans>
<!-- Global Exceptions -->
<global-exceptions>
</global-exceptions>
<!-- Global Forwards -->
<global-forwards>
</global-forwards>
<!-- Action Mappings -->
<action-mappings>
<action path="/testAction"
type="com.aegon.learntiles.actions.LearnTilesAction">
<forward name="success" path="page.default"/>
</action>
</action-mappings>
<!-- Message Resources -->
<message-resources
parameter="com.aegon.learntiles.resources.ApplicationResources"/>
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="pathnames"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
</plug-in>
</struts-config>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@struts.apache.org
For additional commands, e-mail: user-***@struts.apache.org