Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tiles error

 
sreenivas jeenor
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sreenivas jeenor
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks merrill,

got rid of the problem,error in web.xml file
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic