Re: Some Spring/Struts questions

2010-05-13 Thread Dale Newfield
On 5/13/10 7:10 AM, Andy Law wrote: Following up on that thought process, if I use an interceptor then is there any difference/tradeoff/efficiency gain or loss from stuffing the object in question onto the Value Stack instead of dropping it into the request or the session? I guess that "explicitn

Re: Some Spring/Struts questions

2010-05-13 Thread Andy Law
Wes Wannemacher wrote: > > On Wed, May 12, 2010 at 10:42 AM, Dale Newfield wrote: >> >> That all sounds reasonable, except the part about putting it in the >> session >> instead of the request.  If there's no compelling reason to store >> something >> in the session, I think that it should be

Re: Some Spring/Struts questions

2010-05-12 Thread Wes Wannemacher
On Wed, May 12, 2010 at 10:42 AM, Dale Newfield wrote: > > That all sounds reasonable, except the part about putting it in the session > instead of the request.  If there's no compelling reason to store something > in the session, I think that it should be avoided.  If you're using an > intercepto

Re: Some Spring/Struts questions

2010-05-12 Thread Dale Newfield
On 5/12/10 9:32 AM, Wes Wannemacher wrote: I've seen a few responses, but I think the best way would be to write an interceptor that places the bean into the session. Give it a known name in the session, then you can use OGNL to access it... That all sounds reasonable, except the part about put

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
Cool, cheers Wes -Original Message- From: Wes Wannemacher [mailto:w...@wantii.com] Sent: 12 May 2010 15:29 To: Struts Users Mailing List Subject: Re: Some Spring/Struts questions Yep... Here's a quick example struts.xml - http://struts.apache.org/dtds/struts-2.1.

Re: Some Spring/Struts questions

2010-05-12 Thread Wes Wannemacher
e. Thank you for clearing that one up and your package is defined > in the struts.xml in the root of the source? > > -Original Message- > From: Wes Wannemacher [mailto:w...@wantii.com] > Sent: 12 May 2010 14:51 > To: Struts Users Mailing List > Subject: Re: Some Spring/S

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
Ah, awesome. Thank you for clearing that one up and your package is defined in the struts.xml in the root of the source? -Original Message- From: Wes Wannemacher [mailto:w...@wantii.com] Sent: 12 May 2010 14:51 To: Struts Users Mailing List Subject: Re: Some Spring/Struts questions

Re: Some Spring/Struts questions

2010-05-12 Thread Wes Wannemacher
nt: 12 May 2010 14:33 > To: Struts Users Mailing List > Subject: Re: Some Spring/Struts questions > > I've seen a few responses, but I think the best way would be to write > an interceptor that places the bean into the session. Give it a known > name in the session, then you ca

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
: Wes Wannemacher [mailto:w...@wantii.com] Sent: 12 May 2010 14:33 To: Struts Users Mailing List Subject: Re: Some Spring/Struts questions I've seen a few responses, but I think the best way would be to write an interceptor that places the bean into the session. Give it a known name in the session, th

Re: Some Spring/Struts questions

2010-05-12 Thread Wes Wannemacher
I've seen a few responses, but I think the best way would be to write an interceptor that places the bean into the session. Give it a known name in the session, then you can use OGNL to access it... Here is a quick example of the interceptor - public class CustomInterceptor extends AbstractInterce

Re: Some Spring/Struts questions

2010-05-12 Thread Andy Law
dcabasson wrote: > > That's actually possible. We are doing that type of things by using the > @Autowired annotation, which means that spring needs to find a suitable > bean to inject there. If you put that annotation on your base class, the > instance will get injected in all sub-classes. B

RE: Some Spring/Struts questions

2010-05-12 Thread Andy Law
Martin, mgainty wrote: > > > jsp:useBean for quite some time > class="enterprise.criteriaQuery.ejb.StatelessSessionBean" /> > > in your jsp if you have a method called getCriteria the jsp could call the > bean method directly via > > <%=query.getCriteria()%> > > OK. This looks like it

RE: Some Spring/Struts questions

2010-05-12 Thread Martin Gainty
ion, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Wed, 12 May 2010 04:43:13 -0700 > From: andy@roslin.ed.ac.uk > To: user@struts.apache.org > Subject: RE: Some Spring/Struts questions > > > > > James Cook-13 wrote: > &g

Re: Some Spring/Struts questions

2010-05-12 Thread Denis Cabasson
A new requirement means that we need to have available across pretty much every action a separate, independent bean that carries information that may (or may not) need to be displayed on the resulting web-pages. I am wondering what the best way is to make this bean available to each JSP. We

RE: Some Spring/Struts questions

2010-05-12 Thread Andy Law
James Cook-13 wrote: > > In the past I have done this for accessing beans in a servlet. > > class="org.springframework.web.context.support.ServletContextAttributeEx > porter"> > > > value-ref="myOrganisationServiceBeanRef"/> > > > >

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
: Andy Law [mailto:andy@roslin.ed.ac.uk] Sent: 12 May 2010 10:23 To: user@struts.apache.org Subject: RE: Some Spring/Struts questions James Cook-13 wrote: > > You could, add the bean to the servlet context, and access it via a > scriptlet in the jsp. Thus bypassing your actions all

RE: Some Spring/Struts questions

2010-05-12 Thread Andy Law
James Cook-13 wrote: > > You could, add the bean to the servlet context, and access it via a > scriptlet in the jsp. Thus bypassing your actions all together. > What does the Spring configuration look like for that course of action? James Cook-13 wrote: > > Or.. Create filter/Inteceptor and

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
You could, add the bean to the servlet context, and access it via a scriptlet in the jsp. Thus bypassing your actions all together. Or.. Create filter/Inteceptor and inject into them? -Original Message- From: Andy Law [mailto:andy@roslin.ed.ac.uk] Sent: 12 May 2010 09:58 To: user@str