aspose file tools*
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
Author

Cannot retrieve mapping for action

Chen Yanush
Greenhorn

Joined: Oct 31, 2004
Posts: 26
Hi,

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" %>
<html:html>
<head>
<title>
hello
</title>
</head>
<jsp:useBean id="bean0" scope="session" class="strutstutorial.User" />
<jsp:setProperty name="bean0" property="*" />
<body bgcolor="#800080">
<h1>
hello
</h1>
<!--html:form action="" method="post"-->

<html:form action="/userAction.do" method="post">
<br><br>
<html:submit value="Submit" property="Submit"/>
<html:reset value="Reset"/>
<hr>bean0<br>
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>
<hr><br>
</html:form>
</body>
</html:html>


Any help is appreciated.

Thanks,

Chen
Fisher Daniel
Ranch Hand

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



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

thanks
daniel
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

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

Dave
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60996
    
  65

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] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot retrieve mapping for action