Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

tiles definition error, maping .(dot) error

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
for some reason I'm getting error when I tried to run tiles from tiles-defs.xml config file....
java.lang.IllegalArgumentException: Path .testcentreLayout does not start with a "/" character
I checked and correct everything and I cant move on with the tiles...
It seems that .testcentreLAyout definition wants the servlet solve as regular file...I have check web.xml for init definitions,servlet-config for plugin tiles...tiles-defs for correcrt syntax...and I'm lost....
the error is created when action is forwarded to .testcentreLayout
thanks for ideas...
Igor
********************tiles-defs***************************************
<tiles-definitions>
<definition name=".testcentreLayout" path="/pages_jsp/common/layouts/test_centre_layout.jsp">
<put name="header" value="/pages_jsp/common/header.jsp" />
<put name="footer" value="/pages_jsp/common/footer.jsp" />
</definition>
</tiles-definitions>
***********************error from console***********************************
19:29:01,985 INFO [Engine] action: Processing a GET for /Welcome
19:29:02,045 INFO [Engine] action: Setting locale 'en_CA'
19:29:02,045 INFO [Engine] action: Looking for ActionForm bean under attribute 'app.pokusForm'
19:29:02,045 INFO [Engine] action: Looking for Action instance for class app.pokus
19:29:02,055 INFO [Engine] action: Double checking for Action instance already there
19:29:02,055 INFO [Engine] action: Creating new Action instance
19:29:02,055 INFO [STDOUT] from pokus classsssssssssss
19:29:02,055 ERROR [Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
java.lang.IllegalArgumentException: Path .testcentreLayout does not start with a "/" character
at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:1179)
at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java
***************************web.xml*************************************
<!-- Standard Struts configuration -->
<servlet>
<servlet-name>action</servlet-name>
<!-- servlet-class>org.apache.struts.tiles.ActionComponentServlet</servlet-class -->
<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>
<init-param>
<param-name>null</param-name>
<param-value>false</param-value>
</init-param>
<!-- makes request scope the default -->
<init-param>
<param-name>mapping</param-name>
<param-value>org.apache.struts.action.RequestActionMapping</param-value>
</init-param>
<!-- Tiles parameters -->
<init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles-defs.xml</param-value>
</init-param>
<init-param>
<param-name>definitions-debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>definitions-parser-details</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>definitions-parser-validate</param-name>
<param-value>true</param-value>
</init-param>
<!-- Startup priority -->
<load-on-startup>2</load-on-startup>
</servlet>

***********************struts-config.xml******************************
<action-mappings>
<action
path="/Welcome"
name="app.pokusForm"
type="app.pokus" >
<forward name="success" path=".testcentreLayout" />
</action>
......
<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="1" />
<set-property property="definitions-parser-details" value="0" />
<set-property property="definitions-parser-validate" value="true" />
</plug-in>
 
Did you just should on me? You should read this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic