Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

The requested resource (Servlet action is not available) is not available in struts

Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to the struts application. I am creating a simple login page.

my web.xml files is
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns=""; xmlns:xsi=""; xsi:schemaLocation="">;

my strus-config.xml file is

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
<form-bean name="MyLoginForm" type="com.tcs.bancs.actionform.MyLoginForm"/>




<forward name="welcome" path="/"/>

<action input="/Login.jsp" name="MyLoginForm" path="" scope="request" type="com.vaannila.LoginAction">
<forward name="success" path="/success.jsp" />
<forward name="failure" path="/fail.jsp" />
<action path="/Welcome" forward="/login.jsp"/>

my action class
public class MyLoginAction extends ActionServlet {
private static final long serialVersionUID = 1L;

public ActionForward execute (ActionMapping map, ActionForm form, HttpServletRequest req, HttpServletResponse res)
MyLoginForm login=(MyLoginForm) form;



my login.jsp is

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<form action="" method="post">
<input type="text" name="Name">
<input type="password" name="Password">
<input type="submit" value="SUBMIT">


after compiling , when i am executing this with url as http://localhost:8080/Sample/

I am getting an error as The requested resource (Servlet action is not available) is not available, Please help me.

Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rahul

Your MyLoginAction class should be extend to Action not a ActionServlet.

this is supposed to be a surprise, but it smells like a tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic