Re: S2: reading POST body w/in action

2009-08-25 Thread John Cartwright
[2] > http://struts.apache.org/2.1.6/struts2-core/apidocs/org/apache/struts2/interceptor/ServletConfigInterceptor.html > > P.S. You can usually ignore anything that Martin Gainty writes. (Wasn't > someone going to ban him already.) > > > On Mon, Aug 24, 2009 at 7:17 PM, John

S2: reading POST body w/in action

2009-08-24 Thread John Cartwright
Hello All, I'm trying to read the body of a POST, e.g. XML content, w/in an Action. Problem seems to be protecting it from the ParametersInterceptor so that the body of the request is not treated as key-value pairs. Can someone please help me with this? Thanks! --john ---

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread John Cartwright
Thanks for your suggestion Andras. Strangely that approach is not working for me. Ideally, I'd like to have the option of different fields included for different actions w/ in the same package. --john Andras Balogh wrote: Hi John, I had the same problem with excludeProperties, what worked

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread John Cartwright
Thanks for the suggestion Dale, but removing the whitespace does not seem to make a difference. --john Dale Newfield wrote: john.c.cartwri...@noaa.gov wrote: items.*\.name Can someone please help me w/ what might be wrong? Maybe the whitespace? Doe

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread John Cartwright
ame of the properties, not the name in the output. Try using "features.*\.name" as the regular expression. musachy On Fri, May 22, 2009 at 10:48 AM, John Cartwright wrote: Thanks for your reply Musachy. I'm using the JSON annotation to modify the output, e.g. @JSON(name="i

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread John Cartwright
Thanks for your reply Musachy. I'm using the JSON annotation to modify the output, e.g. @JSON(name="items") public List getFeatures() { return (features); } Yes, I am getting a result. It's just that all the fields are being output rather than just the ones listed in the includeProperties.

Re: does not include parameter

2009-04-14 Thread John Cartwright
OK, makes perfect sense now. Thanks to both Dave and Jeroen for your prompt replies! --john Dave Newton wrote: john.c.cartwri...@noaa.gov wrote: I'm trying to understand why the following does not produce a URL w/ the requested parameter appended. Can someone please help me? var url = "nam

Re: how to prevent JSP from interpreting ${0}

2009-03-16 Thread John Cartwright
t; but was hoping there might be a better way. --john Lukasz Lenart wrote: 2009/3/16 John Cartwright : I'm trying to get the literal string "this is a test: ${0}" to be rendered in my JSP output. Can someone please tell me how to protect this string from getting evaluated on t

how to prevent JSP from interpreting ${0}

2009-03-16 Thread John Cartwright
Hello All, I'm trying to get the literal string "this is a test: ${0}" to be rendered in my JSP output. Can someone please tell me how to protect this string from getting evaluated on the server-side? Thanks! --john - To

Re: [S2] best practice for reading POST body in an action

2009-01-08 Thread John Cartwright
No, in this case the mime type is not application/x-www-form-urlencoded and not sent w/ KVP from a form. The body of the POST is all content. --john Roger Varley wrote: On Wednesday 07 January 2009 17:58:48 John Cartwright wrote: Hello All, Is there a best practice for using the body

Re: [S2] remove "empty" request parameters

2009-01-07 Thread John Cartwright
them from the request. musachy On Wed, Jan 7, 2009 at 11:35 AM, John Cartwright wrote: Thanks for your prompt response Dave. So an custom interceptor before Params could modify the servlet request and Params interceptor would never seem them? Is there not a way to configure the existi

Re: [S2] remove "empty" request parameters

2009-01-07 Thread John Cartwright
Contact instance w/ all empty fields and assigns that reference to the model. I feel like I'm going against the grain of S2 somehow. Thanks again for your advice! --john Dave Newton wrote: John Cartwright wrote: Can someone provide a recommendation for removing empty request param

[S2] expected error in using ParamsPrepareParams stack and model-driven actions

2009-01-07 Thread John Cartwright
Hello All, Is it expected to receive errors from the first invocation of the Params interceptor since there are not commonly setters for all the model properties and prepare has not yet had a chance to retrieve the model? Thanks! --john

[S2] remove "empty" request parameters

2009-01-07 Thread John Cartwright
Hello All, Can someone provide a recommendation for removing empty request parameters before the Params interceptor sees them? Can Params interceptor simply be configured to ignore request parameters with no value? Thanks! --john ---

[S2] best practice for reading POST body in an action

2009-01-07 Thread John Cartwright
Hello All, Is there a best practice for using the body of a POST request w/in an action? The request is not key/value pairs but a blob of XML. Before I dropped back to using a traditional HTTPServletRequest approach, I'd see if there was a better way in S2. Thanks! --john --

Re: [S2] JSON plugin - excluding properties

2008-12-17 Thread John Cartwright
from the interceptor-ref and not from the result: Example: true .*Collection I don't know if this is the case only when enableSMD is set to "true". BR, Andras. John Cartwright wrote: Hello All, I'm using the (very nice!) jsonplugin version 0.31 and have a quest

[S2] JSON plugin - excluding properties

2008-12-17 Thread John Cartwright
Hello All, I'm using the (very nice!) jsonplugin version 0.31 and have a question re: excluding properties. If my action exposes a List of class instances and each of these instances contains a "name" property, what is the proper syntax for excluding that name property? I expected something

[S2] best way to share data between actions

2008-10-16 Thread John Cartwright
Hello All, What is the recommendation for sharing data between actions? I have one action that performs a search and displays the results in a JSP page. That results page contains links to another action in which I'd like to have access to the original search results. My first instinct was t

[S2] url tag to construct href in different namespace

2008-07-24 Thread John Cartwright
Hello All, I'm trying to use the url tag to construct a href which goes to a different namespace. It seems that all of the constructed URLs have the same base as the original page. For example, given a page reached at: http://lynx.ngdc.noaa.gov:8080/tideloader/message/View.action The markup

Re: S2: httpheader result type

2008-01-04 Thread John Cartwright
Hi Laurie, Thanks for your reply and suggestion. I can access what I'm assuming is the Exception object, but can't seem to get the message property from it: 204 name="headers.exception">SessionTimeoutException ${exception}

S2: chart result type not recognized

2008-01-03 Thread John Cartwright
Hello All, I'm having a little trouble getting a chart result type configured using the package declaration below. Whenever I hit the associated URL, my browser prompts me to save a "bin" file rather than displaying the chart. The bin file is a valid png, but somehow Struts is not recogniz

Re: [S2] raw XML response

2007-08-28 Thread John Cartwright
Thanks for your reply Chris. Are you specifying a result type of "plaintext" in struts.xml or any element at all? I seem to be running into a situation where struts2 is trying to redirect me to a JSP w/ the same name as the action. Thanks again for your help! -- john Chris Pratt wrote:

[S2] raw XML response

2007-08-24 Thread John Cartwright
Hello All, I'd like to simply return some text from a Action w/o redirecting to a page. I did this sort of thing in Struts1 by using the response's PrintWriter and returning null from the Action's execute method. From the documentation, I'd expected that a return type of "xslt" w/o the style

S2: access to the POST body

2007-03-30 Thread John Cartwright
Hello, I have an application where the POST request body contains a blob of XML that I'd like to access. It is not part of a KVP. I read it by using a Reader on the HttpRequest object. Can this be handled in Struts2? Thanks! -- john ---