Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Servlet action is currently unavailable

 
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
 
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.
 
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 ]
 
He baked a muffin that stole my car! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic