Wednesday, August 15, 2012

Struts 2 - The requested resource () is not available

You are here probably because you have just created your first Struts 2 application and after deploying it on a server, you got the following message:

“HTTP Status 404 -
type Status report
message
descriptionThe requested resource () is not available.

This problem is a result of having more or less than the required jar files added to the build path.
Here is the solution, make sure to include exactly these jar files in the build path.
commons-fileupload-1.2.2.jar
commons-io-2.0.1.jar
commons-lang-2.4.jar
commons-lang3-3.1.jar
commons-logging-1.1.1.jar
commons-logging-api-1.1.jar
freemarker-2.3.19.jar
javassist-3.11.0.GA.jar
ognl-3.0.5.jar
struts2-core-2.3.4.jar
xwork-core-2.3.4.jar

It should work.

Note: The numbers at the end of the file names may be different for the Struts release you work with.