January 15, 2003

New option for html:link

In reference to html:link (the description of which begins on page 203 of Struts Kick Start), a new parameter has been added.

Instead of using <html:link page="/myapp/foo.do">, you can instead use <html:link action="/myapp/foo">, which has the advantage of hidding the actual implementation of action mapping inside the struts-config file, where it belongs.

Posted by blackbear at January 15, 2003 03:07 PM
Comments

Hello world application contains error. focus="username" should be focus="person" otherwise there are javascript errors and no focus.

Posted by: Garry on February 12, 2003 07:32 PM

Nice book!

Errata:

Listing 3.1 - hello.jsp

html:form tag focus="username" attribute should be focus="person".

Marcus

Posted by: Marcus Caton on February 14, 2003 07:34 AM

Shouldn't you mention that the perform() method in the Action has been deprecated and is now the execute() method (if you are going to keep up to date with Struts 1.1).

Also, the ActionForward has been deprecated for ForwardConfig, which now has the ability to perform a redirect outside of the current application, contrary to the discussion at the end of Chapter 8. Doing the response.redirect() is now an unnecessary interjection.

I really question the need for the response variable at all in Struts. If Struts is intended to impose good design techniques on the developer's code, why would Struts allow the type of unnecessary control? Perhaps just cases which I cannot think of as I write this note (such as sending customized headers).

Posted by: Dan Allen on February 21, 2003 06:18 PM

I really question the need for the query string on the form definition.

<form action="/HelloWorld.do?action=gotName">

When you request hello.jsp, the HelloAction class never get's instantiated, so it will have the same affect.

It also seems that the message resources file on the cd is named ApplicationResources.properties even though the struts-config.xml points to a Application.properties under ch03/hello.

Posted by: Dan Allen on February 24, 2003 08:42 AM

nice article, keep up the good work. lookup zip code

Posted by: zip codes on March 15, 2003 07:57 PM

I dont know how to pass an image through my link with struts. What I want, is an image link that calls an action.do with a parameter...
like this:
html:img src="images/modify.gif"/>

but it doesnt work...

Posted by: Patrick on May 29, 2003 10:31 AM

" html:img src="images/modify.gif"/>"

Posted by: Patrick on May 29, 2003 10:33 AM

nice article, keep up the good work.

Posted by: zip codes on June 19, 2003 11:54 AM

nice article, keep up the good work.

Posted by: zip code on June 19, 2003 01:35 PM

great blog, more comments!

Posted by: ancestry on July 8, 2003 11:47 AM

I think its great

Posted by: dvd on August 25, 2003 11:22 AM

It makes sense to me, I have to agree with you.

Posted by: mark on September 10, 2003 04:31 PM

very interesting article, greetngs.

Posted by: activex download - vb on September 15, 2003 04:31 AM

I didn't find any error, it seems to be working fine.

Posted by: granja educativa on September 15, 2003 04:35 AM

Hi my friends,
I am a Struts fan too. Could someone please tell me how to handle form-bean data validation in Nested cases? Thanks a lot!

Mark DIng

Posted by: Mark Ding on September 29, 2003 12:38 PM

I dont know how to pass an image through my link with struts.

Posted by: Greece on October 1, 2003 01:02 PM
Post a comment