A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Frameworks
»
Struts
Author
Tiles Application
CoolKV gautham
Greenhorn
Joined: Nov 17, 2005
Posts: 1
posted
Nov 17, 2005 13:21:00
0
Hi,
Anyone help me out with this error.
this is the error
exception java.lang.IllegalArgumentException: Path Tiles.Example does not start with a "/" character org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263) org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1001) org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:345) org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:560) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Here is the
struts
cofig file
<?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="/Tiles/Example" forward="Tiles.Example"/> </action-mappings> <!-- ============================================= Controller Configuration --> <controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/> <!-- ======================================== Message Resources Definitions --> <message-resources parameter="MessageResources" /> <!-- =============================================== Plug Ins Configuration --> <!-- ======================================================= Tiles plugin --> <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>
and the tiles-def file is
<?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> <tiles-definitions> <definition name="Tiles.Example" page="/tiles/template.jsp"> <put name="title" type="string" value="Welcome" /> <put name="header" value="/tiles/top.jsp" /> <put name="menu" value="/tiles/left.jsp" /> <put name="body" value="/tiles/content.jsp" /> <put name="bottom" value="/tiles/bottom.jsp" /> </definition> <definition name="${YOUR_DEFINITION_HERE}"> </definition> </tiles-definitions> </tiles-definitions>
and
index.jsp
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <li> <html:link page="/Tiles/Example.do">Using tiles-defs.xml</html:link> <br> Example shows you how to use tiles-defs.xml file. </li>
subject: Tiles Application
Similar Threads
Tiles error
struts tiles 1.3.8
NullPointerException on tiles
Someone out there! Help with tiles-def.xml
tiles XML definition help
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter