File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Error in struts tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error in struts tiles" Watch "Error in struts tiles" New topic
Author

Error in struts tiles

stephan babu
Greenhorn

Joined: Apr 23, 2012
Posts: 13
in my project,

i have 2 struts config xml files.

i have 1 tiles-defs.xml file

i have plugin this tiles-defs.xml in both stuts-config.xml and struts-config-permits.xml files like below,
----------------------------------------------------------------------------------------------
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
</plug-in>



im my tiles-def.xml i codel like below,
------------------------------------------------------------------------------------------------
<definition name="mainPage" path="/mainTemplate.jsp">
<put name="title" value="Excise"/>
<put name="header" value="/header.jsp"/>
<put name="menu" value="/menu2.jsp"/>
<put name="content" value="/content.jsp"/>
<put name="footer" value="/alert.jsp"/>
</definition>

<definition name="permitPage" extends="mainPage">
<put name="content" value="/pc_permit_appli_frm.jsp"/>
</definition>


in my stuts-config-permit.xml i coded like below,
------------------------------------------------------------------------------------------------
<action path="/PermitAppliData" name="PermitMasterForm" scope="request" validate="true" type="nic.puduvaicalal.permits.PermitAction" input="/permits/pc_permit_appli_frm.jsp">
<forward name="data" path="permitPage" />
</action>


when i am caling the url "switch.do?prefix=/permits&page=/PermitAppliData.do" by click the menu i found the error below,
--------------------------------------------------------------------------------------------------------

java.lang.IllegalArgumentException: Path permitPage does not start with a "/" character
org.apache.struts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:107)
org.apache.struts.chain.commands.servlet.PerformForward.perform(PerformForward.java:96)
org.apache.struts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:54)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)


please anyone solve my problem..

Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

stephan babu wrote:when i am caling the url "switch.do?prefix=/permits&page=/PermitAppliData.do" by click the menu i found the error below,

What are you trying to access. The URL you are accessing is not correct.
"java.lang.IllegalArgumentException: Path permitPage does not start with a "/" character " - says it all.
This is not tiles problem anyways.


Have Fun with Java
little,little.. little by little makes a lot..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in struts tiles