0

I am running a "Hello World " struts 2 example.I have put all the required dependencies in the "/WEB-INF/lib" location. I have the following jars in my lib location :

commons.io_2.0.1.jar 
commons-collections-3.2.1.jar 
commons-fileupload-1.2.2.jar 
commons-logging-1.1.1.jar 
freemarker-2.3.16.jar 
ognl-2.6.11.jar 
struts2-core-2.2.3.jar 
xwork-2.0.4.jar 

Do I need any other jar file to run simple Struts2 app?

I am getting "HTTP Status 404 - requested resource is not available" exception when I am running my app.

Roman C
  • 49,761
  • 33
  • 66
  • 176
Vikash Chahal
  • 71
  • 1
  • 3
  • 15
  • It doesn't seem to be a library issue, cuz 404 means you application cannot find mapping(struts action) to corresponding URL. Please attach web.xml and struts config in order to get people help you out. – spiritwalker Mar 14 '13 at 10:33
  • See this http://stackoverflow.com/questions/15400895/server-not-starting – Roman C Mar 14 '13 at 10:41

2 Answers2

0

Check the web.xml as well as the deployment descriptor created by Eclipse to know if it points to the correct JSP. i.e. if the jsp is under JSP folder, the welcome file should be /JSP/welcome.jsp

topgunz
  • 37
  • 6
  • checked web.xml . I have used Login.jsp in the "welcome-file-list" element of the web.xml . But it is not taking me to the Login.jsp file due to that HTTP 404 exception. – Vikash Chahal Mar 14 '13 at 11:32
0

FYI: Filter dispatcher has been deprecated in struts2 i must suggest you to use

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter its always better to start with updated one

And try adding commons-lang3-3.x file. It might work.

topgunz
  • 37
  • 6
  • Tried adding commons-lang3-3.1.jar and with org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter , but same exception HTTP 404. – Vikash Chahal Mar 14 '13 at 11:30