Hello,

I am still getting up to speed on struts and might be missing something
quite obvious.  I have read on Ted Husted's site that (to paraphrase) you
should *not* link to .jsp pages, but instead link to the Actions.  Ted even
goes so far as to suggest putting .jsp pages beneath WEB-INF/ so they are
not available to be requested directly by clients.

I can understand his reasoning, however, I have a practical question.  First
I must give a little background:

I am developing a very simple CRUD app, and am working on the Create
portion.  When a user clicks a link for "Create Record" it links to
/createRecord.do.  The user should be able to fill out the page, and then go
to the next action /createRecordConfirm.do, where the values are shown but
not editable.  From /createRecordConfirm.do, the user can either click the
"Create" button to add a new record, or click the "back" button and go back
to the form and make changes, then continue on as described.

This createRecord.do action has a bean which includes validate(), since I
want to show validation errors to the user for correction as soon in the
process as possible.  However, when the user first clicks the link for
/createRecord.do, the bean's validate() method throws a bunch of errors,
since the form has not yet been filled out.  Is there a way to check for a
totally blank form ( if form == null doesn't work ) or some better way to do
this?  Or should I just link directly to the JSP, since this works as I need
it to.

Also, if someone knows of a good (and easy to install) example CRUD app, I
would love to see it.  I was not able to install artimus (database problems)
and sonic doesn't seem to do things the *correct* way (they link directly to
JSPs).

Thanks!

Tom

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to