This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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: 63534

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
It's not a secret anymore!