This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes realtion betweeen view and struts-config Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "realtion betweeen view and struts-config" Watch "realtion betweeen view and struts-config" New topic
Author

realtion betweeen view and struts-config

Rauhl Roy
Ranch Hand

Joined: Aug 01, 2006
Posts: 401

Hi all,

are we supposed to mention the same name in the struts-config 's action path and view path in order to struts framework to get recognised.

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

this is my view
<html>
<head>
<title>Sample Struts Application</title>
</head>
<body>
<html:form action="Name" name="nameForm" type="example.NameForm">
<table width="80%" border="0">
<tr>
<td>Name:</td>
<td><html:text property="name" /></td>
</tr>
<tr>
<td><html:submit /></td>
</tr>
</table>
</html:form>
</body>
</html>


and this is my struts-config s action map

<action path="/Name" type="example.NameAction" name="nameForm" input="/index.jsp">
<forward name="success" path="/displayname.jsp"/>
<forward name="failure" path="/index.jsp"/>
</action>
---------------

my doubt is both boled things are to be same or not.

please tell me

rahul
Ajit Kanada
Ranch Hand

Joined: Jan 23, 2001
Posts: 95
Yes you are right.


Thankx
Ajit
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: realtion betweeen view and struts-config