• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet action is currently unavailable

 
Mark Beavis
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joan Horta Tosas
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic