File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Eclipse + struts2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Eclipse + struts2.0" Watch "Eclipse + struts2.0" New topic

Eclipse + struts2.0

guthula lakshman

Joined: Sep 24, 2007
Posts: 21
i created the struts2.0 application . i created the login.jsp and home.jsp and i placed it in web-inf folder
2) i placed struts.xml and web.xml under web-inf and i created the packgae i placed it in src directory

and i imported all the neccessary jar files for both struts2.o and tomcat6.0 but i getting the

warning "Description Resource Path Location Type
Classpath entry E:/struts-lib/xwork-2.1.1.jar will not be exported or published. Runtime ClassNotFoundExceptions may result. "

and when i run the application i geeting the error
"The requested resource () is not available." 404 status error.

could any body solve my error.

Thanks for advance

Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294

and i imported all the neccessary jar files for both struts2.o and tomcat6.0 but i getting the

I don't know if my situation helps or not, but I use tomcat5.5 and I did what you said before, I imported all the necessary Jar files for struts 2 to the Tomcat 5.5/common/lib directory and my app couldn't work. because I was getting error in the log/localhost saying that struts 2 core jar file was loaded somewhere already, so what I did was reinstall Tomcat 5.5 and don't put the jar file in common/lib only include the jar file in Eclipse, and it worked for me. I hope this helps
Stephanie Dutcheson

Joined: Dec 07, 2008
Posts: 17
[Blatant advertising removed. Please contribute to the discussion rather than just divert traffic to your own site.]
[ December 29, 2008: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63868

"lakshman", please check your private messages for an important administrative matter. Again.

[Asking smart questions] [About Bear] [Books by Bear]
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 689


Please Make sure you have include six jar for basic Struts 2.0 Application.
1 ) struts2-core-2.1.2
2 ) xwork-2.1.1
3 ) freemarker-2.3.12
4 ) ognl-2.6.11
5 ) commons-collections-3.2
6 ) commons-logging-1.1

Use this web.xml instead of above mention.

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4" xmlns="" xmlns:xsi="" xsi:schemaLocation="">

<display-name>Struts Hibernate</display-name>




And it is in your WEB-INF directory.

Your struts.xml is in the src folder.

Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Harimohan Mohan

Joined: Dec 07, 2008
Posts: 6
Hi lakshman,

While deploying (inside tomcat) put all the JSP's in context root. Your struts.xml must be in classes directory and web.xml should be in WEB-INF directory. Also make sure that the lib directory contains all the 6 necessary .jar files
[ January 01, 2009: Message edited by: Harimohan ]
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2851

"Harimohan" please check your private messages for an important administrative matter. You can see them by clicking the My Private Messages link above.

|Asking Good Questions|
guthula lakshman

Joined: Sep 24, 2007
Posts: 21
Hi thanks for post,

i placed all the necessary jar files and current staging directory is correct even though i am getting the error.

i checked the error log it getting the following error.

SEVERE: Exception starting filter struts2
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(
at org.apache.catalina.core.ApplicationFilterConfig.<init>(
at org.apache.catalina.core.StandardContext.filterStart(
at org.apache.catalina.core.StandardContext.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardHost.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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(
at org.apache.catalina.startup.Bootstrap.main(
Apr 2, 2009 10:48:55 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart

i placed all necessary jars files. but even i didn't the Result. if any body get the application please send me to my gmail id :- or send me the solution for my application

aparna aigal

Joined: Oct 10, 2010
Posts: 5
I am also facing same problem for creating new project.

java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher.

but for the project by importing struts2-blank-2.0.14.war is working fine.

Can any one help?
I agree. Here's the link:
subject: Eclipse + struts2.0
It's not a secret anymore!