You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bryan Field-Elliot <br...@netmeme.org> on 2001/03/18 01:11:41 UTC

How can a Struts Action developer best document the system for a JSP developer?

I am struggling right now with how to properly and efficently document 
my Struts application for my JSP developer (who is by no means a Java 
expert). Specifically, I want to document each Action as well as each 
ActionForm that I code, including things like:

1. the pages I expect the user to have come from
2. the pages to which I might forward, or redirect, the user after 
completing the action
3. The beans I expect to be in place prior to submitting to my action
4. The beans I will set up with values for the resulting JSP page to 
work with
5. The errors (<html:errors>) I may set up

And anything else that might be appropriate. I'd like to do so in a way 
that lets me rely on Javadoc, so that I can keep my documentation inside 
my code. Javadoc when used correctly will also let me do things like 
"see also" the Bean documentation (from the Action documentation).

I am curious if anyone has developed a "template" action or bean, which 
makes best use of Javadoc and which I can cut-and-paste at the head of 
every one of my Action classes, etc?

Thanks,
Bryan


Re: display errors

Posted by David Winterfeldt <dw...@yahoo.com>.
I started working on an alternative version of the
errors tag this weekend that iterates through the
results so you can leave HTML out of the message
resources.  It doesn't do everything that the Struts
tag does at this point.  It also automatically
includes errors.header and errors.footer.  Maybe you
could use this or modify the code to do what you want.
 Or you could always use a iterate tag to loop through
your errors and format them the way you want to.

<validator:errors id="error">
   <li><bean:write name="error"/></li>
</validator:errors>


David
http://home.earthlink.net/~dwinterfeldt


--- Maya Muchnik <mm...@pumatech.com> wrote:
> I think, you are correct to qualify this as a
> formatting. Take the
> struts-example. The tag <html:errors/> at the
> beginning of each file
> will display error messages at top and left corner
> of a page.
> 
> David Winterfeldt wrote:
> 
> > What do you mean by "not from the first column".
> >
> > Are you talking about formatting?  What are you
> trying
> > to do?
> >
> > David
> >
> > --- Maya Muchnik <mm...@pumatech.com> wrote:
> > > I found a OLD way (with table, tr, td, ...). But
> > > maybe for a next release ... Can
> > > error tag to be improved ?
> > > Maya
> > > P.S. I know that we ask too much from several
> bright
> > > developers.
> > >
> > > Maya Muchnik wrote:
> > >
> > > > Hi,
> > > >
> > > > Is it possible to display errors not from the
> > > first column (using <html:errors/>) ?
> > > >
> > > > Thanks in advance
> > > >
> > > > Maya
> > >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get email at your own domain with Yahoo! Mail.
> > http://personal.mail.yahoo.com/
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Re: display errors

Posted by Maya Muchnik <mm...@pumatech.com>.
I think, you are correct to qualify this as a formatting. Take the
struts-example. The tag <html:errors/> at the beginning of each file
will display error messages at top and left corner of a page.

David Winterfeldt wrote:

> What do you mean by "not from the first column".
>
> Are you talking about formatting?  What are you trying
> to do?
>
> David
>
> --- Maya Muchnik <mm...@pumatech.com> wrote:
> > I found a OLD way (with table, tr, td, ...). But
> > maybe for a next release ... Can
> > error tag to be improved ?
> > Maya
> > P.S. I know that we ask too much from several bright
> > developers.
> >
> > Maya Muchnik wrote:
> >
> > > Hi,
> > >
> > > Is it possible to display errors not from the
> > first column (using <html:errors/>) ?
> > >
> > > Thanks in advance
> > >
> > > Maya
> >
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/


Re: display errors

Posted by David Winterfeldt <dw...@yahoo.com>.
What do you mean by "not from the first column".

Are you talking about formatting?  What are you trying
to do?

David

--- Maya Muchnik <mm...@pumatech.com> wrote:
> I found a OLD way (with table, tr, td, ...). But
> maybe for a next release ... Can
> error tag to be improved ?
> Maya
> P.S. I know that we ask too much from several bright
> developers.
> 
> Maya Muchnik wrote:
> 
> > Hi,
> >
> > Is it possible to display errors not from the
> first column (using <html:errors/>) ?
> >
> > Thanks in advance
> >
> > Maya
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Re: display errors

Posted by Maya Muchnik <mm...@pumatech.com>.
I like when you are :-). I will try to be "active" helper, but later, when I will become
more familiar with struts, and other a lot of things!!!. Good luck to you in your
presentations in two conferences. I cannot go ( a project, and expenses). Can we get your
presentation on-line? (:-))

Maya

"Craig R. McClanahan" wrote:

> On Mon, 19 Mar 2001, Maya Muchnik wrote:
>
> > I found a OLD way (with table, tr, td, ...). But maybe for a next release ... Can
> > error tag to be improved ?
>
> Improvements are on the "nice to have this work better" list.
>
> > Maya
> > P.S. I know that we ask too much from several bright developers.
> >
>
> Well, one way to fix that is to offer your own patches :-).  It is open
> source, after all.
>
> Craig
>
> > Maya Muchnik wrote:
> >
> > > Hi,
> > >
> > > Is it possible to display errors not from the first column (using <html:errors/>) ?
> > >
> > > Thanks in advance
> > >
> > > Maya
> >
> >


Re: display errors

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 19 Mar 2001, Maya Muchnik wrote:

> I found a OLD way (with table, tr, td, ...). But maybe for a next release ... Can
> error tag to be improved ?

Improvements are on the "nice to have this work better" list.

> Maya
> P.S. I know that we ask too much from several bright developers.
> 

Well, one way to fix that is to offer your own patches :-).  It is open
source, after all.

Craig


> Maya Muchnik wrote:
> 
> > Hi,
> >
> > Is it possible to display errors not from the first column (using <html:errors/>) ?
> >
> > Thanks in advance
> >
> > Maya
> 
> 


Re: display errors

Posted by Maya Muchnik <mm...@pumatech.com>.
I found a OLD way (with table, tr, td, ...). But maybe for a next release ... Can
error tag to be improved ?
Maya
P.S. I know that we ask too much from several bright developers.

Maya Muchnik wrote:

> Hi,
>
> Is it possible to display errors not from the first column (using <html:errors/>) ?
>
> Thanks in advance
>
> Maya


display errors

Posted by Maya Muchnik <mm...@pumatech.com>.
Hi,

Is it possible to display errors not from the first column (using <html:errors/>) ?

Thanks in advance

Maya


Re: How can a Struts Action developer best document the system for a JSP developer?

Posted by "David M. Karr" <dk...@tcsi.com>.
>>>>> "Bryan" == Bryan Field-Elliot <br...@netmeme.org> writes:
  Bryan> I am struggling right now with how to properly and efficently document
  Bryan> my Struts application for my JSP developer (who is by no means a Java
  Bryan> expert). Specifically, I want to document each Action as well as each
  Bryan> ActionForm that I code, including things like:

  Bryan> 1. the pages I expect the user to have come from
  Bryan> 2. the pages to which I might forward, or redirect, the user after
  Bryan> completing the action
  Bryan> 3. The beans I expect to be in place prior to submitting to my action
  Bryan> 4. The beans I will set up with values for the resulting JSP page to
  Bryan> work with
  Bryan> 5. The errors (<html:errors>) I may set up

  Bryan> And anything else that might be appropriate. I'd like to do so in a
  Bryan> way that lets me rely on Javadoc, so that I can keep my documentation
  Bryan> inside my code. Javadoc when used correctly will also let me do things
  Bryan> like "see also" the Bean documentation (from the Action documentation).

  Bryan> I am curious if anyone has developed a "template" action or bean,
  Bryan> which makes best use of Javadoc and which I can cut-and-paste at the
  Bryan> head of every one of my Action classes, etc?

It's not clear to me whether this will help you, but you might want to
read a current article on JavaWorld titled "Doclet your servlet!",
about writing a JavaDoc "doclet" to augment the generated
documentation for servlet classes.

-- 
===================================================================
David M. Karr     ; w:(425)487-8312     ; TCSI & Best Consulting
dkarr@tcsi.com    ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)


Re: How can a Struts Action developer best document the system for a JSP developer?

Posted by Ted Husted <hu...@apache.org>.
This is not actually what you want, but I did start a simple, sample 
specification for a Struts application (based on the example). It's 
still just an unfinished rough draft, but available at 

< http://husted.com/about/struts/example-spec.html >

if you want to mine it for ideas.

Bryan Field-Elliot wrote:
> 
> I am struggling right now with how to properly and efficently document
> my Struts application for my JSP developer (who is by no means a Java
> expert). Specifically, I want to document each Action as well as each
> ActionForm that I code, including things like:
> 
> 1. the pages I expect the user to have come from
> 2. the pages to which I might forward, or redirect, the user after
> completing the action
> 3. The beans I expect to be in place prior to submitting to my action
> 4. The beans I will set up with values for the resulting JSP page to
> work with
> 5. The errors (<html:errors>) I may set up
> 
> And anything else that might be appropriate. I'd like to do so in a way
> that lets me rely on Javadoc, so that I can keep my documentation inside
> my code. Javadoc when used correctly will also let me do things like
> "see also" the Bean documentation (from the Action documentation).
> 
> I am curious if anyone has developed a "template" action or bean, which
> makes best use of Javadoc and which I can cut-and-paste at the head of
> every one of my Action classes, etc?
> 
> Thanks,
> Bryan