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-
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
,
s:iterator value='%{session.test}'
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 james.c...@wecomm.com
wrote:
Try %{#session.test}
James
-Original Message-
From: Kushan
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(required
, 2010 at 5:02 AM, James Cook james.c...@wecomm.com 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.xml)
public class MyServiceImplTest
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
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 I haven't explained clearly
...@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,
they have what you want...
I
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
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
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 james.c...@wecomm.com wrote:
Hmm. I use the same combo.
I found at some point I could jsut do
public class
, 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 james.c...@wecomm.com wrote:
Nope, no they are not in the xml for me. I use the @Service/@Repository
annotations on the class, coupled with the component scan in the Spring
not too
complicated, seem verbose with the xml).
On Thu, May 13, 2010 at 6:20 AM, James Cook james.c...@wecomm.com wrote:
Yeah sorry, short on time here, didn't see your question at the bottom. Add
the spring jar from the spring project.
-Original Message-
From: Jake Vang [mailto:vangj
...@googlemail.com]
Sent: 13 May 2010 11:44
To: Struts Users Mailing List
Subject: Re: spring, struts2, convention plugin, how to wire an action class
yes. precisely.
On Thu, May 13, 2010 at 6:41 AM, James Cook james.c...@wecomm.com wrote:
Oh, did you want your action as a spring managed bean? Ah
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
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:
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 together.
What does the Spring configuration look like for that course of action?
James Cook-13 wrote:
Or.. Create
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
/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 james.c...@wecomm.com wrote:
That would be my favoured route.
Wes, side question. Using the convention plugin
/param
/result
/global-results
/package
/struts
On Wed, May 12, 2010 at 10:03 AM, James Cook james.c...@wecomm.com 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?
-Original Message
Hi All,
I was wondering if someone can dispel some confusion for me.
When would I use DefaultActionSupport over ActionSupport, or viceversa?
James
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
s:iterator value=breadcrumbs
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
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
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
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
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-
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
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
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
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
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
-
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
Any one
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
#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 use @ParentPackage I
Should a #
s:select label=programType id=programType name=programType
list=#{'ALL':'All Programs', 'BU':'BY Problems', 'TS':'TS
Programs'}
value=selectedProgram required=true/
I made the same oversight last night
Cookie
-Original Message-
From: Bhaarat
: 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 james.c...@wecomm.com
wrote:
Should a #
s:select label=programType id=programType name=programType
list=#{'ALL':'All Programs', 'BU':'BY Problems', 'TS':'TS
Hi,
I checked the javadoc for select and this is what is listed.
s:select label=Months
name=months
headerKey=-1 headerValue=Select Month
list=#{'01':'Jan', '02':'Feb', [...]}
value=selectedMonth
required=true
/
This is what I used last night. So #{}
.
musachy
On Thu, Oct 29, 2009 at 3:16 AM, James Cook james.c...@wecomm.com
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 on the CP first
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
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
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 james.c
/browse/WW-3234
Thanks to Brian Ferris for it.
musachy
On Thu, Oct 8, 2009 at 11:10 AM, James Cook james.c...@wecomm.com 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
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
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 spring manual.
http
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:
s:checkboxlist cssClass=myClass label=My Boxes key=boxIds
list=boxList listKey=id listValue=name /
HTML
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
47 matches
Mail list logo