This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Struts and the fly likes Cannot retrieve mapping for action /Login Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Cannot retrieve mapping for action /Login" Watch "Cannot retrieve mapping for action /Login" New topic

Cannot retrieve mapping for action /Login

Saravanan Jothimani

Joined: Feb 25, 2005
Posts: 26
I am new to struts.
I am getting an errror as javax.servlet.ServletException: Cannot retrieve mapping for action /Login when I type http://localhost:8080/stuts/web/Login.jsp in address bar.

Please correct me.

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ page language="java"contentType="text/html;
charset=ISO-8859-1"pageEncoding="ISO-8859-1" %>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<html:form action="/Login">

<TABLE border="0">
<TH>User Name</TH>
<TD><html:text property='userName' value='' /></TD>
<TD><html:text property='password' value='' /></TD>
<TD><html:submit property="submit" value="Submit" /></TD>
<TD><html:reset /></TD>


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"




<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"





<!-- Standard Action Servlet Mapping -->




<!-- The Usual Welcome File List -->

<!-- Struts Tag Library Descriptors -->



Thanks in Advance

alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
<html:form action="/Login">

should be

<html:form action="Login">

the slash takes the action back to the SERVER root, not the application context root.

-/a<br />certified slacker...yes, my last name is 'do' - <a href="" target="_blank" rel="nofollow"></a>
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Cannot retrieve mapping for action /Login
It's not a secret anymore!