Heading off at a slight tangent, is it possible to use the constant values in
action configurations within the struts XML?
I have long thought it a code smell that I have magic strings in my XML
configuration that get repeated in my code. If I could handle those by
reference to a single point in
I wrote:
Apologies for being late to the party, but this smells like a
browser/proxy
cache issue to me?
and then
mgainty wrote:
i agree with andy
do a view source and tracert on all urls
i it is possible you'll see there is a man-in-the middle proxy altering
the response
DNewfield wrote:
Anyway, glad you've solved your issue. Too bad we didn't all learn
something from it :-)
Apologies for being late to the party, but this smells like a browser/proxy
cache issue to me?
Later,
Andy
--
View this message in context:
RogerV wrote:
Andy Law wrote:
The pertinent code in the interceptor is reproduced below. It does what I
expect it to do insofar as it sticks my Stuff object in a place that
the JSP can retrieve it using the MAGIC_KEY string. However, if I
configure my interceptor stack
Cheers Chris,
Chris Pratt wrote:
You may want to think about using:
invocation.getStack().getContext().put(MAGIC_KEY,getStuff());
instead of:
invocation.getStack().set(MAGIC_KEY,getStuff());
For the sake of argument, I'm going to assume that MAGIC_KEY is set to the
String magic.
Following on from my previous question
(http://old.nabble.com/Some-Spring-Struts-questions-td28533505.html) about
injecting objects orthogonal to actions into the environment where jsps can
see them, I now have an interceptor that does what I want it do (Yay! -
thanks guys).
However, I'm seeing
I'm pretty sure that ActionContext used to be an Interface (in Struts1?). I
know that it isn't in Struts2 because I've just tripped over that when
trying to create mocks for a set of Unit tests for an Interceptor.
Is there a reason why it changed?
Later,
Andy
--
View this message in context:
Wes Wannemacher wrote:
On Wed, May 12, 2010 at 10:42 AM, Dale Newfield d...@newfield.org 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
All,
Apologies if this would be better asked in a Spring forum. If so, I would
appreciate guidance as to which one/where.
I have a Struts2 application with around 30 actions. Most inherit from a
common base class. We have configured the system to start to use Spring to
inject certain things
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
James Cook-13 wrote:
In the past I have done this for accessing beans in a servlet.
bean
class=org.springframework.web.context.support.ServletContextAttributeEx
porter
property name=attributes
map
entry key=organisationService
Martin,
mgainty wrote:
jsp:useBean for quite some time
jsp:useBean id=query scope=application
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()%
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. But
Lee Clemens-4 wrote:
Doesn't seem to work, but maybe my description was unclear.
I'm trying to get this:
() OptA () OptB () OptC
to look like this:
() OptA
() OptB
() OptC
theme=simple prints them all in order
theme=xhtml prints them inside the same td tag (same row, not each
I have actions that sit underneath a set of namespaces. The namespace conveys
a piece of information to the action like a poor-man's REST.
i.e.
context/Cow/ShowDetails.action
context/Pig/ShowDetails.action
etc.
I need to construct some links from within the JSP that is hit by the
individual
Haroon Rafique wrote:
If your file structure is somewhat like:
styles/base.css
images/image.gif
then you can simply change your background-image directive to say:
background-image: url('../images/image.gif');
and
Musachy Barroso wrote:
assuming your dir structure is like:
I'm trying to specify a CSS style to be applied to a table header row that
includes a reference to a background image (specifically as part of a table
that uses JQuery/tablesorter). It is causing me pain.
To clarify what may be a bit of a garbled question, my (final, effective)
html needs to
Haroon Rafique wrote:
On Today at 9:38am, AL=Andy Law andy@roslin.ed.ac.uk wrote:
If your file structure is somewhat like:
styles/base.css
images/image.gif
then you can simply change your background-image directive to say:
background-image: url('../images/image.gif
Wes Wannemacher wrote:
One thing I've done in the past is to treat CSS files as JSPs and use
s:url tags or EL expressions (${contextRoot}/images/image.gif)...
Oh. That feels s dirty!!!
There has to be a cleaner way to do it.
Later,
Andy
--
View this message in context:
Musachy Barroso wrote:
It is a bug. This interceptor was added in 2.0.7, and it was never
added to struts-default.xml in the 2.1 branch. Just add this to your
struts.xml:
interceptor name=cookie
class=org.apache.struts2.interceptor.CookieInterceptor/
for reference:
Is it deliberate that no reference to/configuration for the cookies
interceptor is provided in struts-default.xml in the 2.1 releases?
Obviously I can work around it by configuring in my struts.xml file but it
seems bizarre that the code exists and is included in the jar, but the
configuration
Andy Law wrote:
've hit a painful problem as I try to migrate to 2.1.6 (from 2.0.14).
I have a class that extends ActionSupport and which calls getText() from
within a routine. I want to test the routine to ensure that it is working
properly. My test runs fine when I compile with 2.0.14
All,
I've hit a painful problem as I try to migrate to 2.1.6 (from 2.0.14).
I have a class that extends ActionSupport and which calls getText() from
within a routine. I want to test the routine to ensure that it is working
properly. My test runs fine when I compile with 2.0.14 but disappears
This may be trivial, in which case I apologise in advance.
I have an application that has several action classes (20 or so), each of
which belongs conceptually to a *group* of actions. I would like to be able
to extract lists of Actions by group from within a JSP/Action in order to
present them
Shekher wrote:
I am planing to use interceptor for this but not sure how to plan this
as using interceptor can not gurantee a robust authenticate mechanism
what i planned is as below
if user provide the valid information store the user object in the session
scoped map and for all
Shekher wrote:
Hi All,
We are developing an application based on Struts2 framework. We are on way
to develop application based security so that the unauthorized user can
not
access the secure area,it needs the request to be from the authorized
person.We can have the Below mentioed
Gawain Hammond wrote:
Thanks very much for your reply.
The problem with this type of work around is that it completely messes up
my fiendish master plan. If it wasn't for those pesky objects with null
values! :-P
You see, I've probably been a bit too clever for my own good, and for
mgainty wrote:
Andy-
the short answer is you don't want
user-set parameters to override your static parameters.
Well yes - but I need the parameters for doing some prepare() work. I can
see that staticParams fires after params in the default stack. I can also
see that params is set
Is there any design reason why staticParams is not called before prepare in
the paramsPrepareParams stack?
Also, in a potential RFE sort of vein, would there be any support for a
request for a way of making staticParams non-overwritable? (i.e. the params
defined in the action configuration XML
Jeromy Evans - Blue Sky Minds wrote:
A short follow-up. Can you point me towards a description of where/when
the
Action object gets created and where Interceptors fit into the process.
The architect's guide is a good place to start.
Jeromy Evans - Blue Sky Minds wrote:
True. The Struts 2 in Action book goes into the next level detail:
http://www.manning.com/dbrown/excerpt_contents.html
but still doesn't cover exactly what you're trying to do. I know others
works are in progress but not the details or
Jeromy Evans - Blue Sky Minds wrote:
Andy Law wrote:
e.g.
/foo/Action1.action runs action1 passing in 'foo' and /bar/Action1.action
runs the same action passing in 'bar'.
How should I code/configure/build this kind of thing.
In Struts 2.0.x, you may be able to use wildcards
.action
runs the same action passing in 'bar'.
How should I code/configure/build this kind of thing.
Thanks in advance for any guidance that anyone can give me.
Later,
Andy Law
-
--
View this message in context:
http://www.nabble.com/S2%3A-possibly-strange-namespace-use-case
going blind
working out where to use single and double quotes to keep all the tools
involved comfortable.
Thanks in advance for your suggestions and help.
Later,
Andy
-
Dr. Andy Law
Head of Bioinformatics - Roslin Institute
Unfortunately, legal niceties
property=name/
a href=/module/action-path/bean:write name=element
property=accession/bean:write name=element
property=accession//a
/logic:iterate
kind regards,
frank
-Ursprüngliche Nachricht-
Von: andy law (RI) [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 2
andy law (RI) wrote:
Frank,
As I said at the bottom of my email, I *know* I can do it
that way, but look at all those nested quotes - it's just
wrong to do stuff like that.
I can just about live with it for now with double quotes
for the HTML and singles for the embedded bean stuff
36 matches
Mail list logo