Problem of Struts2 on IDEA
When I create a project and add web module,and I deployed it on Tomcat6,everything is ok.Then I add struts2 libraries to the project and modify web.xml as follows:
=====================
struts2
org.apache.struts2.dispatcher.FilterDispatcher
struts2
/*
]]>
=====================
Then tomcat could not start,the log as follows:
=====================
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher
=====================
but in the "Modules and Libraries to package",I choose "copy files to".
I think that IDEA could not copy the nessary libraries to the proper place before tomcat startup and the filter begin to work.
Who can help me?
null
Please sign in to leave a comment.
Hello zhangjp,
Please, make sure that in "Modules and Libraries to package" table the "Path
relative to Deployment root" value against struts libraries is "/WEB-INF/lib".
Alexander.
Thank you Alexander!you helped me again!
While I create a web project,then I add the Struts2 libs,It's default value is /WEB-INF/lib.
But While I create a blank project and then add web support,and I add the Struts2 libs,It's default value is /WEB-INF/classes.
Thank you very much!
and may I have you email?
Hello zhangjp,
My email is Alexander.Chernikov@jetbrains.com (not surprisingly).
Alexander.