• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot retrieve mapping for action

 
Chen Yanush
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65119
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, the Struts-savvy look for such questions in the Web App Frameworks forum, so hang on tight, we're moving there!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic