Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet action is currently unavailable Error When Run My Struts Application

 
Manikandan Govindaraj
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am new to struts framework and i set a simple hello world project in Eclipse.

My web.xml is like this

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>SUN_BUILDERS</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>


<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

</web-app>


And my struts-config.xml is like this


<struts-config>
<form-beans>
<form-bean name="LoginForm"
type="com.sunbuilders.login.from.LoginForm" />
</form-beans>

<action-mappings>

<action
input = "/index.jsp"
name="LoginForm"
path="/login"
scope="request"
type="com.sunbuilders.login.action.LoginAction">
<forward contextRelative="true" name="success" path="/welcome.jsp" />
</action>
</action-mappings>




</struts-config>

When i run my application on server it shows

HTTP Status 503 - Servlet action is currently unavailable

--------------------------------------------------------------------------------

type Status report

message Servlet action is currently unavailable

description The requested service (Servlet action is currently unavailable) is not currently available.


--------------------------------------------------------------------------------

Kindly help me to resolve this issue... Thanks..





 
Pyla Rao
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manikandan Govindaraj, Welcome to coderanch

Use code tags to your post and you can see how Its looks.

and provide error log, It is better to trace the problem and find solution.

Regards,
Pyla.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic