File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Android Security Essentials Live Lessons this week in the Android forum!
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
Similar Threads
tomcat problem.
Validation messages not displaying in the alert box?
New to Struts, where did I go wrong?
Using javascript in Struts
What is wrong ?