RE: Currency Formatting

2010-07-14 Thread James Cook
Ooo, didn't know I could use an iterator like that, I have always defined the var. Thanks for the tip, however do you not find that other way easier for readability? Just thinking an outsider might be left wondering where "price" came from.. Maybe I am missing the point. -Original Message-

RE: Get a list stored in the session to the struts tag

2010-06-23 Thread James Cook
in the session to the struts tag Hi James, Thank you very much for your quick reply, i have found the way, no need of that # sign there. Thanks again, you helped me to solve this :) -- Regards Kushan Jayathilake On Wed, Jun 23, 2010 at 4:20 PM, James Cook wrote: > Try %{#session.t

RE: Get a list stored in the session to the struts tag

2010-06-23 Thread James Cook
Try %{#session.test} James -Original Message- From: Kushan Jayathilake [mailto:kusha...@gmail.com] Sent: 23 June 2010 11:49 To: Struts Users Mailing List Subject: Get a list stored in the session to the struts tag Hi Guys, I want to get a list stored in the session and feed that value

RE: unit test the service layer (aka data access layer)

2010-06-21 Thread James Cook
On Mon, Jun 21, 2010 at 5:02 AM, James Cook wrote: > Get involved with: > > Junit 4.4 > Spring-test libs > > And started your service test class like such: > > @RunWith(SpringJUnit4ClassRunner.class) > @ContextConfiguration(locations = "classpath:/testConfigXML

RE: unit test the service layer (aka data access layer)

2010-06-21 Thread James Cook
Get involved with: Junit 4.4 Spring-test libs And started your service test class like such: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:/testConfigXML.xml") public class MyServiceImplTest extends AbstractJUnit4SpringContextTests { @Autowired(require

RE: Struts 2 & Browser Caching

2010-06-14 Thread James Cook
r.var...@googlemail.com] Sent: 14 June 2010 12:57 To: user@struts.apache.org Subject: RE: Struts 2 & Browser Caching James Cook-13 wrote: > > Nope, no misunderstanding. All I was saying was that people seem to > experience the opposite to what you are experiencing. Like you said, > th

RE: Struts 2 & Browser Caching

2010-06-14 Thread James Cook
Subject: RE: Struts 2 & Browser Caching James Cook-13 wrote: > > I two would like to hear about solutions to this, after a quick Google, > I found most people have it the other way with their JS files being > cached and not reflecting there changes. > I think that either

RE: Struts 2 & Browser Caching

2010-06-14 Thread James Cook
I two would like to hear about solutions to this, after a quick Google, I found most people have it the other way with their JS files being cached and not reflecting there changes. How are you constructing your url's for the resources Roger? Do they end up with a dynamic element in them, that chan

Struts.xml - Packages

2010-06-08 Thread James Cook
Hi All, Having a blank mind moment here. I was hoping someone might be able to clear it up with me. I am using my favourite Struts 2 setup of Convention + Spring. However I am just going through the process of adding a global exception mapping, so I created a struts.xml file which contains

RE: struts-blank-1.3.10.war has memory leak.

2010-05-13 Thread James Cook
Hey, I know this doesn't give you a direct answer. But I found this article quite interesting on the topic of undeploying an application and classes being left loaded, which in turn leaves the classloader. http://blogs.sun.com/fkieviet/entry/classloader_leaks_the_dreaded_java -Original Mess

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread James Cook
hu, May 13, 2010 at 6:41 AM, James Cook wrote: > Oh, did you want your action as a spring managed bean? Ah I think i massively > miss read you. You want to inject predefined values etc? > > > -Original Message- > From: Jake Vang [mailto:vangj...@googlemail.com] > Sent:

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread James Cook
n are only with struts1 (and though not too complicated, seem verbose with the xml). On Thu, May 13, 2010 at 6:20 AM, James Cook wrote: > Yeah sorry, short on time here, didn't see your question at the bottom. Add > the spring jar from the spring project. > > -O

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread James Cook
lugin, how to "wire" an action class doesn't answer the question but thanks anyways. On Thu, May 13, 2010 at 6:12 AM, James Cook wrote: > Nope, no they are not in the xml for me. I use the @Service/@Repository > annotations on the class, coupled with the compon

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread James Cook
away. BUT, the question remains, how can i use DI with struts2 (convention plugin) and spring on Action classes? or can i not? if i can't, end of story. if i can, how? On Thu, May 13, 2010 at 5:44 AM, James Cook wrote: > Hmm. I use the same combo. > > I found at some point I could

RE: spring, struts2, convention plugin, how to "wire" an action class

2010-05-13 Thread James Cook
Hmm. I use the same combo. I found at some point I could jsut do public class MyAction extends ActionSupport { private MyInjectedService service etc etc But I have started doing: public class MyAction extends ActionSupport { @Autowired private MyInjectedService service I am not sure if tha

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
t,back,cancel /login.jsp false On Wed, May 12, 2010 at 10:03 AM, James Cook wrote: > Ah, awesome. Thank you for clearing that one up and your package is defined > in the struts.xml in the root of the source

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
g/2.x/docs/convention-plugin.html#ConventionPlugin-Configurationreference I think the setting is - struts.convention.default.parent.package -Wes On Wed, May 12, 2010 at 9:39 AM, James Cook wrote: > That would be my favoured route. > > Wes, side question. Using the convention pl

RE: Some Spring/Struts questions

2010-05-12 Thread James Cook
That would be my favoured route. Wes, side question. Using the convention plugin can you modify the stack in the xml file so you don't have to annotate the action itself? Or do you still have to add the annotation with the interceptor put in? James -Original Message- From: Wes Wannemache

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 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

RE: Iterate over an ArrayList of arrays

2010-05-11 Thread James Cook
Where does 'top' come from? -Original Message- From: Dale Newfield [mailto:d...@newfield.org] Sent: 11 May 2010 14:49 To: Struts Users Mailing List Cc: Steven Yang Subject: Re: Iterate over an ArrayList of arrays On 5/11/10 5:59 AM, Steven Yang wrote: > try > > $

Difference between ActionSupport and DefaultActionSupport

2010-05-11 Thread James Cook
Hi All, I was wondering if someone can dispel some confusion for me. When would I use DefaultActionSupport over ActionSupport, or viceversa? James

RE: Struts 2 in an EAR

2010-04-15 Thread James Cook
within an WAR/EAR combo on Glassfish 2.1. Chris -Original Message- From: James Cook [mailto:james.c...@wecomm.com] Sent: 15 April 2010 11:12 To: Struts Users Mailing List Subject: Struts 2 in an EAR Hi All, I have a Struts 2 enabled WAR that works fine when deployed on its own, but when

Struts 2 in an EAR

2010-04-15 Thread James Cook
Hi All, I have a Struts 2 enabled WAR that works fine when deployed on its own, but when packaged as part of an EAR it doesn't appear to be scanning for the annotations in the WAR as I get the unable to find Action message. I am running this on Glassfish 2.1.1 and using Struts 2.1.8.1 A

RE: [Struts 2 + EJB 3] injection of EJBs into struts 2 actions

2009-12-04 Thread James Cook
EJB's can only be injected into other EJB's or Servlets, a struts 2 action is essentially a pojo not a servlet. So you would either have to do a lookup in the context, or if you are using Spring look at using a jndi lookup and inject that reference into your class. Cookie -Original Message---

RE: Is Using Spring With Struts 2 A Good Idea?

2009-11-25 Thread James Cook
Hi Bruce, First off I think I have definitely used your blog in the past, I just want to is has been very useful. Now I would imagine the question you asked will lead to some very interesting answers that I look forward to reading. However on the whole, I don't think it could be class as bad prac

RE: Struts 2 Spring Plugin Usage

2009-11-03 Thread James Cook
The spring plugin will look by default auto wire your spring beans via type, it isn't tied to the getXXX(); method call. I myself only have the declaration and a setter, the autowiring injects the spring managed bean for me. Nothing is done with the getters DAO Class: public MyDAOImpl implem

RE: Struts 2.1 book

2009-11-02 Thread James Cook
I have that book and thoroughly enjoyed it, gave me a great platform for me to transition from S1 to S2... So I second the recommendation -Original Message- From: Phillips, Bruce A [mailto:bphill...@ku.edu] Sent: 02 November 2009 18:37 To: Muthu Velappan; Struts Users Mailing List Subjec

RE: Struts 2 Spring Plugin Usage

2009-11-02 Thread James Cook
That is because of the default autowiring. I use the convention plugin for Struts and I take advantage of the spring auto wiring (by name) to automagically inject my service layer. You can do the same for the rest. Check out the reference guide over at spring framework to do so. Weirdly I like hav

RE: Struts 2 Spring Plugin Usage

2009-11-02 Thread James Cook
Hey Roger, If I am understanding you then that is fine. I often do the same, as I like to have a DAO as well as a Service layer. So inject my DAO's into my Service and my Service into my actions. Good ole' code by interface approach :) -Original Message- From: RogerV [mailto:roger.var..

RE: strust2: filter-mapping best practice - /*

2009-11-02 Thread James Cook
Yes, this is what I do also, I have an app with a webservice so needed it to not get caught in the Struts filter. It is a shame however, as I would like to have kept the URLs neat without the action on the end. But as they say, don't get caught up in what the URL says. -Original Message- F

RE: ActionInvocation/ActionContext - NoSuchMethodError

2009-10-30 Thread James Cook
Try using StrutsStatics class instead. It is what I use. E.g. HttpServletResponse response = (HttpServletResponse) invocation.getInvocationContext().get(StrutsStatics.HTTP_RESPONSE); HttpServletRequest request = (HttpServletRequest) context.get(StrutsStatics.HTTP_REQUEST); Cookie -Original

RE: struts.convention.package.locators.basePackage

2009-10-29 Thread James Cook
work. musachy On Thu, Oct 29, 2009 at 3:16 AM, James Cook wrote: > Infact I think I have answered my own question. > > In context of my previous email regarding the scanning, this bug: > https://issues.apache.org/struts/browse/WW-3234 > > The XWorks scans all classes o

RE: javax.el.ELException Select Tag

2009-10-29 Thread James Cook
Hi, I checked the javadoc for select and this is what is listed. This is what I used last night. So #{} worked for me. -Original Message- From: Dale Newfield [mailto:d...@newfield.org] Sent: 29 October 2009 15:54 To: Struts Users Mailing List Subject: Re: javax.el.ELException Select

RE: javax.el.ELException Select Tag

2009-10-29 Thread James Cook
: javax.el.ELException Select Tag you have the same code as my original code ...right? On Thu, Oct 29, 2009 at 11:39 AM, James Cook wrote: > Should a # > > list="#{'ALL':'All Programs', 'BU':'BY Problems', 'TS':'TS > P

RE: javax.el.ELException Select Tag

2009-10-29 Thread James Cook
Should a # I made the same oversight last night Cookie -Original Message- From: Bhaarat Sharma [mailto:bhaara...@gmail.com] Sent: 29 October 2009 15:36 To: Struts Users Mailing List Subject: Re: javax.el.ELException Select Tag so it should be: ? On Thu, Oct 29, 2009 at 11

RE: Convention Plugin & Struts Packages

2009-10-29 Thread James Cook
#ConventionPlugin-Par entPackageannotation Cookie -Original Message- From: RogerV [mailto:roger.var...@googlemail.com] Sent: 29 October 2009 13:22 To: user@struts.apache.org Subject: RE: Convention Plugin & Struts Packages James Cook-13 wrote: > > Hey Roger, > > You need to us

RE: Convention Plugin & Struts Packages

2009-10-29 Thread James Cook
Hey Roger, You need to use @ParentPackage I believe. Or use this struts.convention.default.parent.package Check out: http://struts.apache.org/2.1.6/docs/convention-plugin.html#ConventionPlu gin-ParentPackageannotation Hope this helps Cookie -Original Message- From: RogerV [mailto:rog

RE: struts.convention.package.locators.basePackage

2009-10-29 Thread James Cook
- From: James Cook Sent: 29 October 2009 10:13 To: Struts Users Mailing List Subject: struts.convention.package.locators.basePackage Hi All, Pretty certain this is a bug, but I can't get struts.convention.package.locators.basePackage To be noticed, I am using 2.1.6 libs An

struts.convention.package.locators.basePackage

2009-10-29 Thread James Cook
Hi All, Pretty certain this is a bug, but I can't get struts.convention.package.locators.basePackage To be noticed, I am using 2.1.6 libs Any one suggest anything? Cheers James

Tomcat 5.0.28 and Struts 2.1.8

2009-10-21 Thread James Cook
Hi All, I have just had a fun evening with getting a S2 app to work on a shared Tomcat instance. What I discovered when I deployed was this error: Exception starting filter struts2 javax.xml.transform.TransformerFactoryConfigurationError

RE: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2

2009-10-08 Thread James Cook
/browse/WW-3234 Thanks to Brian Ferris for it. musachy On Thu, Oct 8, 2009 at 11:10 AM, James Cook wrote: > Hi, thank you very much for your response... > > The exceptions don't really bother me, it is just we deployed an app onto a > domain with 5 other apps and it just trawled

RE: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2

2009-10-08 Thread James Cook
truts Users Mailing List Subject: Re: 2.1.6, Convention Plugin + Spring + Glassfish 2 ur2 Those exceptions are annoying, but they can be ignored. There are multiple settings for scanning, like not scanning jars, which you can play with. musachy On Thu, Oct 8, 2009 at 10:19 AM, James Cook wrote:

2.1.6, Convention Plugin + Spring + Glassfish 2 ur2

2009-10-08 Thread James Cook
Hi All, I did ask this question before but never received an answer, I do understand that this is quite complex problem. However I thought I would ask again in case anyone else has come across this... When I use the Convention plugin with Spring and Glassfish, upon deploy of the resulting WAR the

RE: How to connect a EJB3 project with struts2

2009-09-25 Thread James Cook
James, ohh that would be good. I have tried some of the things they have documented on the side. But I didn't get it running. A practical example would be very helpful to get the clou. Kind regards, Michael James Cook schrieb: > Hi Michael, > > Look at the jndi-lookup in the

RE: How to connect a EJB3 project with struts2

2009-09-25 Thread James Cook
Hi Michael, Look at the jndi-lookup in the spring manual. http://static.springsource.org/spring/docs/2.5.6/reference/ejb.html I have done this in the past, so will try to find some example code later - if required. I did find I couldn't use SLSB tag as it required a home interface that no longe

cssClass with CheckboxList

2009-09-21 Thread James Cook
Hi All, I am trying to have my inputs generated from a checkbox list use a certain css class. However when I use cssClass the class attribute doesn't show up in the html. JSP: HTML Generated: myValue I have tried using different themes e.g. theme="simple" Am I doing somethi

2.1.6 with Convention + Spring plugins

2009-09-10 Thread James Cook
Hi All, I have set up my first Struts2 project. I have added the convention library and the spring library to the project. Now when I deploy (Glassfish 2 ur2) I receive various exception messages, all in the vein of java.lang.Exception: Could not load MultiColumnPrinter.class From