wood burning stoves 2.0*
The moose likes Struts and the fly likes Tomcat Throws Exception when I test Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tomcat Throws Exception when I test Struts" Watch "Tomcat Throws Exception when I test Struts" New topic
Author

Tomcat Throws Exception when I test Struts

Yi Zhou
Greenhorn

Joined: Sep 25, 2003
Posts: 12
I have downloaded Tomcat4 and Struts 1.1
and install tomcat4 to c:\tomcat
So , startup tomcat, it is normal!
but,
copy %struts_home%\webapps\*.war c:\tomcat\webapps
now, restart the tomcat, it throws exceptions as follows:
and I run IE, with http://localhost:8080 it is normal.
The page of http://localhost:8080/struts-examples/index.jsp is invalid and
show :
"A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:481)
at _0002findex_0002ejspindex_jsp_0._jspService(_0002findex_0002ejspindex_jsp_0.java:456)"
Could you tell me the correct way to use Sturts?
Thank you for your reading my post.

tomcat's exception:
---------------------------------------
2003-10-8 22:15:02 org.apache.struts.util.MessageResourcesFactory createFactory 严重(Error): MessageResourcesFactory.createFactory java.lang.ExceptionInInitializerError at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576) at org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:1329) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:464) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:755) at org.apache.catalina.core.StandardContext.start(StandardContext.java:2979) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:816) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:334) at org.apache.catalina.core.StandardHost.deploy(StandardHost.java:545) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:294) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:383) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:226) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1172) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1160) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:217) at org.apache.catalina.core.StandardService.start(StandardService.java:353) at org.apache.catalina.core.StandardServer.start(StandardServer.java:454) at org.apache.catalina.startup.Catalina.start(Catalina.java:654) at org.apache.catalina.startup.Catalina.execute(Catalina.java:595) at org.apache.catalina.startup.Catalina.process(Catalina.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:157) Caused by: java.lang.NullPointerException at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577) at org.apache.struts.util.RequestUtils.<clinit>(RequestUtils.java:134) ... 27 more Starting service Tomcat-Apache Apache Tomcat/4.0-b1 2003-10-8 22:27:22 org.apache.struts.util.PropertyMessageResources <init> 信息: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true -------------------------------------------------------------------------
bryan sun
Greenhorn

Joined: Aug 28, 2003
Posts: 3
verify whether you have configured the web.xml, struts-config.xml and application property file appropriately.
Yi Zhou
Greenhorn

Joined: Sep 25, 2003
Posts: 12
I think I have configured them appropriately.
And When I changed tomcat 4.x to 3.1, all problems disappeared. why?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat Throws Exception when I test Struts
 
Similar Threads
Struts 1.1 - Tomcat 4.1.30 deployment problem
error in struts
java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
Error while deploying struts application
Taglib problems