File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Cannot retrieve mapping for action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Cannot retrieve mapping for action" Watch "Cannot retrieve mapping for action" New topic

Cannot retrieve mapping for action

Chen Yanush

Joined: Oct 31, 2004
Posts: 26

Is anyone familiar with the following exception " Cannot retrieve mapping for action /"
From what I understood, it is related to the definition of the forum tags, but I don't know how to solve the problem.

Here is the code of hello.jsp where the forum is defined.

<%@ page contentType="text/html; charset=windows-1255" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<jsp:useBean id="bean0" scope="session" class="strutstutorial.User" />
<jsp:setProperty name="bean0" property="*" />
<body bgcolor="#800080">
<!--html:form action="" method="post"-->

<html:form action="/" method="post">
<html:submit value="Submit" property="Submit"/>
<html:reset value="Reset"/>
Enter new value for bean0.firstName : <html:text property="firstName"/><br>
Value of bean0.firstName is : <jsp:getProperty name="bean0" property="firstName" /><br>
Enter new value for bean0.lastName : <html:text property="lastName"/><br>
Value of bean0.lastName is : <jsp:getProperty name="bean0" property="lastName" /><br>

Any help is appreciated.


Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
Hi Chen Rcy,
I suggest you to exclude "/" at action attribute in html:form.

Correct me if I am wrong...
Hope this helps...

David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Struts and related questions get better coverage in the JSP forum, so I'll move this thread there.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63838

Actually, the Struts-savvy look for such questions in the Web App Frameworks forum, so hang on tight, we're moving there!

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Cannot retrieve mapping for action
jQuery in Action, 3rd edition