File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Error in defining filter in web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error in defining filter in web.xml" Watch "Error in defining filter in web.xml" New topic

Error in defining filter in web.xml

Mainak Goswami
Ranch Hand

Joined: May 21, 2006
Posts: 52


I am trying to create a basic sample web application using Struts2. I am using Weblogic 11g server and eclipse IDE. I have added the necessary jar files under WEB-INF/lib.
Web.xml main code:

Struts.xml code:

However I am getting the following error at server start up:

Am I missing anything in configuration. Following jars has been added:
commons-logging-api-1.1.jar etc....
I had tried to google but not able to find the right resolution. Any help will be much appreciated.

kessy cruz

Joined: Dec 13, 2010
Posts: 29
when i first started using struts2, i had the same problem. i tried getting solution but nobody gave a good answer. they said i should put it in my classpath. if it will help you. but i'm using Netbeans now. goodluck

<result name="success">/welcome.jsp</result>
<result name="error">/login.jsp</result>

and no need to include struts-default.xml
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Check after deploying is it adding struts-core jar file in WEB-INF/lib folder.

ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Mainak Goswami
Ranch Hand

Joined: May 21, 2006
Posts: 52

Thanks for your reply Kessy and Mohan.
I have checked the auto generated ear and I can see the presence of the struts2-core- under

Not sure why it is mentioning that could not load user defined filter in web.xml.

Mainak Goswami
Ranch Hand

Joined: May 21, 2006
Posts: 52


I have resolved this issue. Basically as a part of the Weblogic Server configuration I had copied the application jars under user domain -> lib folder. And similar jars being present in the WEB-INF/lib folder. However I figured out from the classloader analysis that the application was having conflicting library jars. So I have removed my external jars from the weblogic user domain library. Now it is working fine.

I agree. Here's the link:
subject: Error in defining filter in web.xml
It's not a secret anymore!