Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to load configuration - struts-plugin.xml on Struts 2 startup

 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everybody,

I have started to work with the Struts2 framework. I'm totally new to struts.

So, I downloaded the distribution, and whatever was in the lib folder i copied to my tomcat lib folder.

In the web.xml i added the following filter:



now, upon server startup, i get the following error



the jar exists in the lib folder, so i am not quite sure what to do now.

thanks for help :-)
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have managed to get rid of this error by deleting the code-behind plugin from the lib ..
the question though is why ??

now, however, i have the next error relating to the spring framework that could not be loaded

looks like this:

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't just randomly copy libraries into your application: in particular, Struts 2 plugins introduce their own dependencies, configuration requirements, etc.

Remove all plugins (and associated libraries) you're not using.
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey,

i removed all unneccessary jars.

i ended up with
  • commons-logging
  • freemarker
  • ognl
  • struts2-core
  • xwork


  • now the server complains about the missing struts-default.xml file...
     
    David Newton
    Author
    Rancher
    Posts: 12617
    IntelliJ IDE Ruby
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Which version of S2? Where is your Tomcat deployed?

    (At one point I recall an issue about deploying to directories w/ spaces in the name--try a non-spaced Tomcat deploy directory as a sanity-check.) Other than that I can't think of anything off the top of my head; I'm running under that environment just fine on three different OSs.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic