wood burning stoves 2.0*
The moose likes Struts and the fly likes Tiles error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles error" Watch "Tiles error" New topic
Author

Tiles error

sreenivas jeenor
Ranch Hand

Joined: Jan 09, 2005
Posts: 125
Hi ranchers,

I am using tiles definitons. I am getting the following error...help me out
-------------------------------------------
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet action threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:106)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:576)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)


root cause

java.lang.NullPointerException
org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:705)
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:670)
org.apache.struts.action.ActionServlet.init(ActionServlet.java:342)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:106)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:576)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595)

--------------------------------------------------
my tiles-defs.xml file is...

<tiles-definitions>


<definition name="definitionone" page="/myLayout.jsp">
<put name="title" value="Hello World" />
<put name="header" value="/header.jsp" />
<put name="footer" value="/footer.jsp" />
<put name="menu" value="/Welcome.jsp" />
<put name="body" value="/sucess.jsp" />
<put name="menu1" value="/Welcome.jsp" />
</definition>


</tiles-definitions>

-----------------------------
struts-config.xml file is...

<action-mappings>
<action path="/Definition"
forward="definitionone"/>

</action-mappings>

<!-- resources -->
<message-resources
parameter="/resources/ApplicationResources"/>

<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"/>
<set-property property="definitions-parser-validate" value="true"/>
</plug-in>
-----------------------

and my calling page is in this way...

<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<html:html>
<head></head>
<li>
<html:link page="/Definition.do">Using tiles-defs.xml</html:link>
<br>
Example shows you how to use tiles-defs.xml file.
</li>
</html:html>
--------------------



Thanks
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
What this message is trying to tell you is that there is an error in your struts-config.xml file, and the ActionServlet can't parse it. What you've shown us looks OK, but you obviously haven't shown us the whole file. The first thing I'd do is open it in a browser such as Internet Explorer. If it has errors, the browser will refuse to open it, and may give you an error message that will tell you what the problem is.


Merrill
Consultant, Sima Solutions
sreenivas jeenor
Ranch Hand

Joined: Jan 09, 2005
Posts: 125
Thanks merrill,

got rid of the problem,error in web.xml file
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tiles error
 
Similar Threads
tiles exception-2
Class Cast Exception when trying to connect my sql database using struts
Trying to use Tiles--Little success :-(
NullPointerException
Tiles Application