And, if you leave out the name tag, you should also leave out validate.
The minimum Action Mapping then becomes 

<action 
    path="/whatever"
    type="package.WhateverAction"">
</action>

Assuming ViewAction knows where to go afterwards. If not, you can add
local forwards, or use the input or parameter properties to pass more
information.

Just as an aside, if you are putting Actions in front of all your JSP's,
then you can also place them under WEB-INF where only servlets can get
them.

For the greatest flexibility and MVC compliance, you should also not use
"html:link page=" anywhere, only "html:link forward=", and then put a
global forward in your struts-config for any link points your JSPs need.
This way there are no URI's in any of your JSPs (only forwards and
mappings), and you can control everything from the struts-config. Very
slick, really.

Peter Alfors wrote:
> 
> The name attribute is not required.
> You can leave it out, however, if you are using the html:form taglib on
> your page, then
> it will want an actionform.  So in that case, you will either need to have
> an empty bean, or use the standard HTML <FORM> tag --> without a bean.
> 
> HTH,
>     Pete
> 
> Kief Morris wrote:
> 
> > I'm making my first Struts application, and in keeping with MVC
> > I want to load all of my JSP pages through actions: the Action sets
> > up the data the JSP page needs to display.
> >
> > It seems that the <action> tag in struts-config.xml requires a form
> > bean for the name="" attribute. But what if I have a view which is not
> > a form, merely a view of data? A form bean shouldn't be necessary
> > for this, so how do I structure this?
> >
> > Kief

Reply via email to