This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Servlet action is currently unavailable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Servlet action is currently unavailable" Watch "Servlet action is currently unavailable" New topic
Author

Servlet action is currently unavailable

Mark Beavis
Ranch Hand

Joined: Apr 07, 2005
Posts: 43
Hi guys - I'm getting the above error when I click on a URL that is mapped to an action.

I'm very new too struts so have just followed the pre-made examples when setting up my application. Here's the particulars:

Struts: 1.3.5
Tomcat: 4.1.3

web.xml:


struts-config.xml


If anyone could give me a hint that would be great... I can't work out whats worng
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
This message is an indication that the Struts ActionServlet did not initialize properly when the server first started up. In order to find and solve the problem, you will need to find your App Server's System Out log and study the entries for the time period when the server is first starting up. There should be an error message and/or stack trace in there that will give you a better idea as to what went wrong.

Some common errors are:

-Missing jar files. Make sure you put all the jar files from the /lib directory of the unzippped struts download file into the WEB-INF/lib directory of your web application.

-Bad XML in your struts-config.xml file. The XML in this file must be well-formed.


Merrill
Consultant, Sima Solutions
Joan Horta Tosas
Ranch Hand

Joined: Feb 01, 2007
Posts: 59
Your problem is that you put the type of the Action (your class) in action-mappings (the one with the final s), which is just the "container" of all your action-mappings. You must put this type attribute on the action-mapping (without the final s) that you wrote, like this:


[ March 07, 2007: Message edited by: Joan Horta Tosas ]

[ March 07, 2007: Message edited by: Joan Horta Tosas ]
[ March 07, 2007: Message edited by: Joan Horta Tosas ]
 
Don't get me started about those stupid light bulbs.
 
subject: Servlet action is currently unavailable