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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "realtion betweeen view and struts-config" Watch "realtion betweeen view and struts-config" New topic

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
<title>Sample Struts Application</title>
<html:form action="Name" name="nameForm" type="example.NameForm">
<table width="80%" border="0">
<td><html:text property="name" /></td>
<td><html:submit /></td>

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"/>

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

please tell me

Ajit Kanada
Ranch Hand

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

I agree. Here's the link:
subject: realtion betweeen view and struts-config
It's not a secret anymore!