Marc Brevoort

Greenhorn
+ Follow
since Mar 31, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Marc Brevoort

> Hi, all I am having same problem. I have also removed all unnecessary jars but the problem still remain.

Obviously you're using the right JAR files (by the way, I managed to get things running in the end)

If things aren't working, probably your application isn't finding them.
Take a look at your classpath settings.

Also, take some time looking at the .war file that is being generated; a .war file is simply
a zipped archive, and you should be able to see if all required jar files have been
included in there.

Best,
Marc
13 years ago

A simple "hello, world" app, however, really only needs: commons-io, commons-fileupload, commons-logging (both), freemarker, ognl, struts2-core, and xwork.



Indeed. I threw away all jars and re-included just those and that solved it. Thank you very much!
13 years ago
Hello World,

I'm trying to get a simple Hello World application up and running.
However, every time I try to deploy it, I'm getting an error message
Error filterStart:

31-Mar-2009 12:56:51 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
31-Mar-2009 12:56:51 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
31-Mar-2009 12:56:51 org.apache.catalina.core.StandardContext start
SEVERE: Context [/HelloWorld] startup failed due to previous errors
31-Mar-2009 12:57:51 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/HelloWorld]
31-Mar-2009 12:57:51 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive HelloWorld.war
31-Mar-2009 12:57:52 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
31-Mar-2009 12:57:52 org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
31-Mar-2009 12:57:52 org.apache.catalina.core.StandardContext start
SEVERE: Context [/HelloWorld] startup failed due to previous errors

The following jars are in my classpath:

commons-beanutils-1.7.0.jar
commons-collections-3.2.jar
commons-digester-1.8.jar
commons-io-1.3.2.jar
commons-lang-2.3.jar
commons-logging-1.1.1.jar (version included in 2.1.6 package didn't work either)
commons-logging-api-1.1.jar
freemarker-2.3.13.jar
json-lib-2.1.jar
ognr-2.6.11.jar
oro-2.0.8.jar
plexus-utils-1.2.jar
sitemesh-2.3.jar
spring-context-2.5.3.jar
struts2-core-2.1.6.jar
struts2-javatemplates-plugin-2.1.6.jar
struts2-sitemesh-plugin-2.1.6.jar
struts2-tiles-plugin-2.1.6.jar
tiles-api-2.0.6.jar
tiles-core-2.0.6.jar
tiles-jsp-2.0.6.jar
xstream-1.2.2.jar
xwork-2.1.2.jar

This is my web.xml:

<web-app id="WebApp_ID" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>HelloWorld</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

and my struts.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation"
value="false" />
<constant name="struts.devMode" value="false" />
<package name="tutorial" namespace="/www" extends="struts-default">
<action name="HelloWorld" class="tutorial.HelloWorld">
<result>/HelloWorld.jsp</result>
</action>
</package>
</struts>

And Helloworld.jsp:
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<title>Struts 2 - Hello World tutorial</title>
</head>

<body>
<h2><s:property value="message"/></h2>
If you can see above message, Congrats! You have successfully created your first Struts 2 application.
</body>
</html>

The only clue I have left is the line
INFO: Parsing configuration file [struts-default.xml]
in the log file, as I don't understand what this xml file
is about. I've been hunting about for missing jar files
but I think I've got all the needed ones included by now.

As I've been at 'hello world' for nearly a week,
I am getting ever so slightly frustrated by now.
'Error filterStart' is not very informative, is there a
more effective way to see what's wrong?

Best,
Marc
13 years ago