struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabio Perfetti <perfabi...@gmail.com>
Subject Re: Linking page
Date Fri, 21 May 2010 16:56:20 GMT
If anyone want see my code this is the svn url. it's a exercise for the
university. thanks all

svn checkout *http*://gestioneps.googlecode.com/svn/trunk/gestioneps-read-only



2010/5/21 Fabio Perfetti <perfabio87@gmail.com>

> denis can you explain me with an example?
>
>
> 2010/5/21 <chris@chrismiles.org>
>
>> Is that strictly true?
>>
>>
>> For forms specifically you can be (and I do) using Struts form tags. You
>> do not loose Struts benefits as the struts2 filter by default maps the url
>> pattern /* which means all JSP pages get filtered through. If you are not
>> populating/building a view then it makes no sense to go through the
>> controller. It is counter intuitive just pass through an action which does
>> nothing, when the JSP would get filtered anyway.
>>
>> Chris
>>
>> > On Fri, 21 May 2010 11:01:43 -0400, Denis Cabasson
>> > <denis.cabasson@gmail.com> wrote:
>> >
>> >> I personnaly prefer to use the same Action for things that are
>> logically
>> >> grouped. So in your case, I would use the execute method to return
>> >> SUCCESS, pointing to the jsp, and a doSearch method with SEARCH result,
>> >> pointing to the other JSP. That way, you have only one action for both
>> >> JSP.
>> >>
>> >> I don't like going straight to the JSP, as you lose all of the struts 2
>> >> benefits, and so I prefer everybody to go through their action, even if
>> >> that sometimes means having a execute method that just return SUCCESS.
>> >>
>> >> We are using so many struts default functionnalities that only work
>> with
>> >> the underlying actions (like resource bundles, etc..) that I really
>> >> couldn't live without an action.
>> >>
>> >> Denis.
>> >>
>> >
>> > I'm with Denis in that I prefer not to invoke jsps directly from the
>> > browser - if there is truly no "logic" to be performed before the
>> display
>> > of the page, why not make it a static html page?
>> >
>> > If it must be a jsp, you don't even need to write an action to get to
>> your
>> > jsp (assuming you're using struts 2), you can just configure the default
>> > action with your jsp as the success result.
>> >
>> > Steve
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message