Re: Returning a specific status code (404, 500, etc) from an Action

2009-11-04 Thread Graham Leggett
Dale Newfield wrote: >> I am currently trying to find out whether a struts2 action can return a >> specific response code (eg 404, or 500). > > Check out the httpheader result type. Does any documentation exist anywhere for this? After a whole lot of googling for httpheader, I eventually came a

Returning a specific status code (404, 500, etc) from an Action

2009-11-04 Thread Graham Leggett
Hi all, I am currently trying to find out whether a struts2 action can return a specific response code (eg 404, or 500). Is this possible? Regards, Graham -- - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For addi

ognl.InappropriateExpressionException: Inappropriate OGNL expression: 1

2009-11-03 Thread Graham Leggett
Hi all, I am currently attempting to pass a URL to struts, with information embedded in the URL (restful style). So far this works, if I point a browser at /foo/14/invoice.shtml, the correct action is picked up and the right method is called: @Action("**/invoice*.shtml") publ

strust2: filter-mapping best practice - /*

2009-11-01 Thread Graham Leggett
Hi all, I am trying to develop a struts2 app, and I am struggling to find a reference that explains the thinking and/or best practice behind the url-pattern in web.xml. Google uncovers hundreds of articles showing the url-pattern being specified as follows: struts2

Re: How to build Struts 2.0.11.1?

2008-05-07 Thread Graham Leggett
Hans-Georg wrote: Thanks for the link - I already found it but it doesn't help me. Is there anyone else who is able to build struts from the source? Can anyone tell what he did to set up the "development" environment? After correctly installing a recent copy of maven2, make sure you have an

Struts tag to safe print a value

2008-05-06 Thread Graham Leggett
Hi all, I have been trawling the docs, but haven't yet found a tag listed that will do this. I need to display some text on the screen, which may contain newlines, or stray html tags. I'd like the newlines converted to , and have other html tags stripped/quoted or otherwise rendered harmless

Formatting a number: all I get is the key

2008-05-02 Thread Graham Leggett
Hi all, After following the instructions at http://struts.apache.org/2.0.11.1/docs/localization.html, I have ended up with a jsp file that contains the following: value="amount"/> I understand that I have to create the key "format.number" in a resource bundle, and again, following the inst

Re: Support for Transfer-Encoding: gzip

2006-04-03 Thread Graham Leggett
Dion Gillard wrote: I use this filter in our web apps pretty successfully: http://sourceforge.net/projects/pjl-comp-filter/ That did the trick - thank you! Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature

Support for Transfer-Encoding: gzip

2006-04-03 Thread Graham Leggett
Hi all, I have a struts application that calls business logic from Action classes, and displays HTML results via JSP. I would like my application to compress content on the fly (on the basis of the Accept-Encoding header) using gzip. Is there a way to get Struts to do this for me? Regards, Graha

Re: Source code for struts v1.2.7 on ibiblio's maven repo

2005-11-16 Thread Graham Leggett
Graham Leggett wrote: Does anybody know what source tree was used to build the maven available build of struts v1.2.7? I spoke too soon - it's an Eclipse problem, it was picking up a copy of the source from a totally separate project, instead of the source it was told to use in the &q

Source code for struts v1.2.7 on ibiblio's maven repo

2005-11-16 Thread Graham Leggett
Hi all, To help debug my struts config, I downloaded the v1.2.7 source to go alongside the v1.2.7 struts file from the maven repository at http://www.ibiblio.org/maven/struts/jars/ to be used with breakpoints in a debugger. When a breakpoint is triggered, the source is offset in Eclipse - th

Re: The dreaded "Servlet action is not available"

2005-11-16 Thread Graham Leggett
Frank W. Zammetti wrote: Here's a hint... Create the following two files in your webapp's classes folder with the following content: commons-logging.properties -- org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog simplelog.properties --

Re: The dreaded "Servlet action is not available"

2005-11-16 Thread Graham Leggett
Hubert Rabago wrote: The times I came across this, it was related to an error in my struts-config.xml. Same with me - and the last time I had problems with struts-config I managed to find the error by stepping through the struts source code with a debugger (having long since given up hope on

The dreaded "Servlet action is not available"

2005-11-16 Thread Graham Leggett
Hi all, I have been trying to set up a new Struts project from scratch, and having set up a basic action class, etc I fire off a browser at my URL, and I get the dreaded "Servlet action is not available" error. As this message by itself is meaningless, I have been trying to hunt down the act