This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
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 Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tomcat Throws Exception when I test Struts" Watch "Tomcat Throws Exception when I test Struts" New topic

Tomcat Throws Exception when I test Struts

Yi Zhou

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!
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:
at org.apache.jasper.runtime.PageContextImpl.handlePageException(
at _0002findex_0002ejspindex_jsp_0._jspService("
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( at org.apache.struts.util.MessageResources.getMessageResources( at org.apache.struts.action.ActionServlet.initInternal( at org.apache.struts.action.ActionServlet.init( at javax.servlet.GenericServlet.init( at org.apache.catalina.core.StandardWrapper.load( at org.apache.catalina.core.StandardContext.start( at org.apache.catalina.core.ContainerBase.addChild( at org.apache.catalina.core.StandardHost.addChild( at org.apache.catalina.core.StandardHost.deploy( at org.apache.catalina.startup.HostConfig.deployApps( at org.apache.catalina.startup.HostConfig.start( at org.apache.catalina.startup.HostConfig.lifecycleEvent( at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent( at org.apache.catalina.core.ContainerBase.start( at org.apache.catalina.core.ContainerBase.start( at org.apache.catalina.core.StandardEngine.start( at org.apache.catalina.core.StandardService.start( at org.apache.catalina.core.StandardServer.start( at org.apache.catalina.startup.Catalina.start( at org.apache.catalina.startup.Catalina.execute( at org.apache.catalina.startup.Catalina.process( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at org.apache.catalina.startup.Bootstrap.main( Caused by: java.lang.NullPointerException at org.apache.struts.util.MessageResources.getMessageResources( at org.apache.struts.util.RequestUtils.<clinit>( ... 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

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

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:
subject: Tomcat Throws Exception when I test Struts
It's not a secret anymore!