Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in struts tiles

 
stephan babu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 329
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic