Re: Integrating struts 2 with Classic JSP SERVLET /JSTL webapp

2015-05-11 Thread Chris Pratt
If all your URLs aren't at the root (which they probably aren't), you'll want to change your url-pattern to just *.action (*Chris*) On May 11, 2015 9:46 AM, Kiran Badi ki...@poonam.org wrote: Hi Chris, Here is Struts 2 filter in web xml, filter descriptionStruts 2

Re: Integrating struts 2 with Classic JSP SERVLET /JSTL webapp

2015-05-11 Thread Chris Pratt
work.Let me check. On Mon, May 11, 2015 at 12:51 PM, Chris Pratt thechrispr...@gmail.com wrote: If all your URLs aren't at the root (which they probably aren't), you'll want to change your url-pattern to just *.action (*Chris*) On May 11, 2015 9:46 AM, Kiran Badi ki...@poonam.org wrote

Re: Mysterious(?) carriage returns

2015-04-06 Thread Chris Pratt
I believe line breaks in HTTP are always represented as CRLF pairs, regardless of the Client or Server OS's (*Chris*) On Mon, Apr 6, 2015 at 2:07 PM Heikki Hyyrö heikki.hy...@uta.fi wrote: Hi, I have been stumped by the following problem: newlines within text received from an html form

Re: label not working

2014-12-20 Thread Chris Pratt
What theme are you using, and what does the output HTML look like? (*Chris*) On Sat Dec 20 2014 at 1:35:46 AM Yaragalla Muralidhar yaragallamur...@gmail.com wrote: Hi I am using the following code s:textfield name=referMan cssClass=textField label=hghlheghhffehk

Re: problem with i18n

2014-12-20 Thread Chris Pratt
That's why you're not seeing the labels, they are not supported by the simple theme. (*Chris*) On Sat Dec 20 2014 at 1:49:15 AM Yaragalla Muralidhar yaragallamur...@gmail.com wrote: i use simple theme *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/

Re: Tracking down a StreamResult error??

2014-11-12 Thread Chris Pratt
You may already realize this, but I believe this is what is happening: You have an action defined to use the stream result type. The stream result requires an InputStream to be available on the stack when it starts processing. This is usually provided by a getInputStream() method on the action.

Re: s:textfield jquery can not change placeholder

2014-07-25 Thread Chris Pratt
Make sure you set the id attribute on the s:textfield if you're going to refer to it that way using jQuery. (*Chris*) On Fri, Jul 25, 2014 at 12:30 PM, john lee sh_thorn_b...@yahoo.com.invalid wrote: I can use jquery to change html input tag's placeholder for no problem, but no matter what

Re: Hello World does not work.

2014-07-05 Thread Chris Pratt
Typically you would put the war file at /var/lib/tomcat6/webapps/ hello_world.war not /var/lib/tomcat6/webapps/hello_world/hello_world.war. Tomcat will unbundle the war file into /var/lib/tomcat6/webapps/hello _world/ for you. One other option would be to try pointing your browser at

Re: Multiple parameter names

2014-05-30 Thread Chris Pratt
You could have your Action implement ParameterAware then handle the parameter map yourself. (*Chris*) On Fri, May 30, 2014 at 2:15 AM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: I think that is not possible. *Thanks and Regards,* Muralidhar Yaragalla.

Re: Why do I get this XHTML validation errors? (second attempt)

2014-03-06 Thread Chris Pratt
Did you try moving the s:hidden elements to the top of the form, or removing the wrap=hard from your s:textarea? (*Chris*) On Thu, Mar 6, 2014 at 5:13 AM, Fredrik Andersson fredan...@hotmail.comwrote: Hello guys! I trying to produce a app that renders in XHTML. !DOCTYPE html PUBLIC

Re: Re: Why do I get this XHTML validation errors? (second attempt)

2014-03-06 Thread Chris Pratt
To elaborate on Dave's point, try: tr style=display:none; td // both hidden fields /td /tr (*Chris*) On Thu, Mar 6, 2014 at 12:26 PM, Dave Newton davelnew...@gmail.com wrote: On Thu, Mar 6, 2014 at 3:01 PM, Fredrik Andersson fredan...@hotmail.com wrote: I have tride to put the

Re: paramsPrepareParamsStack only populates pojo, neither String nor int

2013-12-13 Thread Chris Pratt
I'm guessing that the user fields aren't actually getting set (since that's done by the params interceptor that hasn't run yet), but you're seeing the existing values of the object. The passwordRepetition is showing null, but it similarly hasn't been set by the params interceptor. You can either

Re: Parent package is not defined

2013-10-07 Thread Chris Pratt
And in the root directory of the jar file, correct? (*Chris*) On Sun, Oct 6, 2013 at 11:33 PM, Umesh Awasthi umeshawas...@gmail.comwrote: Yes, its there Still i will cross check it. Thanks Umesh On Mon, Oct 7, 2013 at 11:47 AM, Lukasz Lenart lukaszlen...@apache.org wrote: Are you

Re: Parent package is not defined

2013-10-07 Thread Chris Pratt
and struts-plugin.xml is there. On Mon, Oct 7, 2013 at 12:05 PM, Chris Pratt thechrispr...@gmail.com wrote: And in the root directory of the jar file, correct? (*Chris*) On Sun, Oct 6, 2013 at 11:33 PM, Umesh Awasthi umeshawas...@gmail.com wrote: Yes, its there Still i

Re: S2: Not generating javascript validation

2013-09-22 Thread Chris Pratt
I believe one of the recent changes was to change the default to disabling DMI, but you can re-enable it if you understand the risks. (*Chris*) On Sat, Sep 21, 2013 at 6:20 PM, Néstor Boscán nesto...@gmail.com wrote: Hi s:form name=login method=post action=login!login.action

Re: Url rewriting of .action to .jsp

2013-09-22 Thread Chris Pratt
Put the following in your struts.xml configuration file: constant name=struts.action.extension value=jsp/ I actually prefer: constant name=struts.action.extension value=html/ since it hides the underlying technology just a bit better and makes a tiny bit harder for someone to guess how to

Re: Url rewriting of .action to .jsp

2013-09-22 Thread Chris Pratt
result name=sessionExpired/admin/login/sessionExpired.jsp/result /global-results /package /struts Kind regards, Serdyn du Toit On Sun, Sep 22, 2013 at 9:36 AM, Chris Pratt thechrispr...@gmail.comwrote: Put the following in your struts.xml configuration file: constant name

Re: how to use single jsp as template

2013-09-19 Thread Chris Pratt
Apache Tiles sounds like exactly what you're looking for, and works great with Struts2. You could also consider a single page app (i.e. AngularJS) approach. (*Chris*) On Thu, Sep 19, 2013 at 8:23 AM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: hi I have a jsp with a layout. it

Re: how to use single jsp as template

2013-09-19 Thread Chris Pratt
Angular makes web service requests to rest services to get its data, so there are no struts tags or attach points to deal with, but you pretty much develop the whole app as a single page that makes rest calls for data. (*Chris*) On Thu, Sep 19, 2013 at 6:09 PM, Martin Gainty

Re: Using themes with s: select

2013-09-10 Thread Chris Pratt
tr bgcolor=#88s:select cssStyle =background-color : yellow label = Card Type headerKey=-1 headerValue=Cards list=cardTypeList name=cards //tr Please let me know where I am going wrong. Thanks, Srineel On Mon, Sep 9, 2013 at 2:36 AM, Chris Pratt thechrispr...@gmail.comwrote: Try

Re: s:if and locale

2013-09-10 Thread Chris Pratt
locale.language is just the language, so it will never match the Language plus the Country. If you need to test both you could do: s:if test=%{(locale.language == 'en') (locale.country == 'US')} You might even be able to get away with: s:if test = %{(locale.language + '_' + locale.country) ==

Re: Using themes with s: select

2013-09-10 Thread Chris Pratt
Attachments don't appear to work through the mailing list. (*Chris*) On Tue, Sep 10, 2013 at 11:35 AM, Srineel Mazumdar smaz19...@gmail.comwrote: Hi Chris, Attached the images. Thanks, Srineel On Tue, Sep 10, 2013 at 1:17 PM, Chris Pratt thechrispr...@gmail.comwrote: Srineel, your

Re: Using themes with s: select

2013-09-09 Thread Chris Pratt
Try cssStyle=background-color:yellow; (*Chris*) On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar smaz19...@gmail.comwrote: Hi, I am using s:select to create a dropdown and then checked the html. I wanted to add bgcolor as yellow. I referred to the following link

Re: s:url s:param does not work on struts 2.3.15.1

2013-08-19 Thread Chris Pratt
It might even work using s:param name=state.name*$*{stateName}/s:param. But, like Dave I don't think the tag body is searched for OGNL expressions. (*Chris*) On Mon, Aug 19, 2013 at 10:34 AM, Dave Newton davelnew...@gmail.com wrote: Does it work if you use: s:param name=state.name

Re: AJAX Jsp tags

2013-08-12 Thread Chris Pratt
should be able to produce the same results as the Tags in the same time frame, as you gain experience you'll quickly superseded the capabilities of any tag library. On Thu, Aug 8, 2013 at 11:02 AM, Chris Pratt thechrispr...@gmail.com wrote: The dojo based tags are deprecated

Re: AJAX Jsp tags

2013-08-12 Thread Chris Pratt
of page1, it will not have any header, menu and footer. I though that with Ajax technology there we will not required to use tiles any more. ~Regards, ~~Alireza Fattahi From: Chris Pratt thechrispr...@gmail.com To: Struts Users Mailing List user

Re: sj:tabbedpanel javascript

2013-08-09 Thread Chris Pratt
Use the View Source feature in your browser to see what's being generated, then you should be able to see for yourself how to use JavaScript to interact with the on-screen components. (*Chris*) On Fri, Aug 9, 2013 at 10:25 AM, john lee sh_thorn_b...@yahoo.com wrote: try to using javascript

Re: sj:tabbedpanel javascript

2013-08-09 Thread Chris Pratt
ask question here, but sj:tabbedpanel convert into jquery, even view source, still not match. john *From:* Chris Pratt thechrispr...@gmail.com *To:* Struts Users Mailing List user@struts.apache.org; john lee sh_thorn_b...@yahoo.com *Sent:* Friday, August 9, 2013 12:43 PM *Subject:* Re

Re: AJAX Jsp tags

2013-08-08 Thread Chris Pratt
The dojo based tags are deprecated, the jQuery based tags are not. (*Chris*) On Thu, Aug 8, 2013 at 9:54 AM, Alireza Fattahi afatt...@yahoo.com wrote: Hi, I have confused with struts 2 ajax please correct me: 1- The dojo plugin is deprecated (

Re: [struts 2] java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd

2013-08-07 Thread Chris Pratt
I don't know if it's the latest, but http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd appears to work. (*Chris*) On Wed, Aug 7, 2013 at 10:36 AM, John Boyer j...@rodaxsoft.com wrote: Hi Martin: Okay, but my validation XML is pointing to

Re: How to initiate the select tag with empty list

2013-08-02 Thread Chris Pratt
It can, just use a regular select, instead of the s:select (*Chris*) On Fri, Aug 2, 2013 at 12:36 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Hi, Sometimes we need to provide an empty select tag which will be populated later depending on some value in form using ajax.

Re: How to initiate the select tag with empty list

2013-08-02 Thread Chris Pratt
select with struts2, its not generating _multiselect_xyz -- Thanks Regards Srikanth On Fri, Aug 2, 2013 at 9:41 PM, Chris Pratt thechrispr...@gmail.com wrote: It can, just use a regular select, instead of the s:select (*Chris*) On Fri, Aug 2, 2013 at 12:36 AM, Sreekanth S. Nair

Re: How to initiate the select tag with empty list

2013-08-02 Thread Chris Pratt
select tag. Apart from tht, I got problem with normal html select with struts2, its not generating _multiselect_xyz -- Thanks Regards Srikanth On Fri, Aug 2, 2013 at 9:41 PM, Chris Pratt thechrispr...@gmail.com wrote: It can, just use a regular select, instead

Re: s:property display INTERGER

2013-07-29 Thread Chris Pratt
Short, Self Contained, Correct Example. In other words, cut your example down to the bare bones that still shows the problem. (*Chris*) On Mon, Jul 29, 2013 at 8:06 PM, john lee sh_thorn_b...@yahoo.com wrote: SSCCE ? what u refer to? From: Dave Newton

Re: Annotation Support for bypassing prepare

2013-07-26 Thread Chris Pratt
Why not just take your action and move the Preparable interface and prepare() function to a subclass with the methods that require it's support? Seems a lot easier than creating more infrastructure. (*Chris*) On Fri, Jul 26, 2013 at 11:22 AM, Sreekanth S. Nair sreekanth.n...@egovernments.org

Re: Consistency?

2013-06-27 Thread Chris Pratt
Try using the second form in all three spots. I believe it should work. (*Chris*) On Thu, Jun 27, 2013 at 1:38 PM, Eric Lentz ericle...@outfastsource.comwrote: My questions are: Is there a better place to discuss this? Could this ever be enhanced? The issue: I'd love to see more

Re: Access result name from JSP

2013-06-10 Thread Chris Pratt
That's what the invocation.invoke() method returns. It's either the result name from the action, or one of the interceptors that took control (after your interceptor). Either way, it's the result that will be used to return the result. (*Chris*) On Mon, Jun 10, 2013 at 9:29 PM, JOSE L

Re: how interceptor knowing invoke's class name?

2013-06-09 Thread Chris Pratt
The interceptor is called by Struts, not by the Action. But, what I think you are really asking is How can I tell which Action is being processed when an Interceptor gets invoked? If that's your real question, the answer is: String name = invocation.getInvocationContext().getName();

Re: Actions as welcome files

2013-05-31 Thread Chris Pratt
In my experience most containers rely on the existence of the file specified in the welcome-files, but don't directly use it. Because of this, if you define your welcome file as: welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list Then create a dummy (or even 0 byte

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread Chris Pratt
You cannot use ServletRequestAware or ServletResponseAware in an Interceptor. (*Chris*) On Thu, May 23, 2013 at 2:58 PM, john lee sh_thorn_b...@yahoo.com wrote: please explain more, thanks in advance From: Dave Newton davelnew...@gmail.com To: Struts

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread Chris Pratt
Cookie.. please advise john From: Chris Pratt thechrispr...@gmail.com To: Struts Users Mailing List user@struts.apache.org; john lee sh_thorn_b...@yahoo.com Sent: Thursday, May 23, 2013 5:02 PM Subject: Re: struts 2 Intercepter ServletRequestAware

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread Chris Pratt
-- *From:* Chris Pratt thechrispr...@gmail.com *To:* Struts Users Mailing List user@struts.apache.org; john lee sh_thorn_b...@yahoo.com *Sent:* Thursday, May 23, 2013 6:25 PM *Subject:* Re: struts 2 Intercepter ServletRequestAware ServletActionContext.getRequest

Re: Cookie in struts2

2013-05-15 Thread Chris Pratt
You might want to look into the CookiesAware interface. It's a better way of accessing cookies. Here's a good post on handling Cookies in Struts 2: http://omkarp.blogspot.com/2007/07/working-with-cookies-in-struts2.html (*Chris*) On Wed, May 15, 2013 at 2:14 PM, Dave Newton

Re: Cookie in struts2

2013-05-15 Thread Chris Pratt
that the interface is really for actions, while the OP seems to be working inside an interceptor.) Dave On Wed, May 15, 2013 at 5:25 PM, Chris Pratt thechrispr...@gmail.com wrote: You might want to look into the CookiesAware interface. It's a better way of accessing cookies. Here's

Re: how to generate TD title=tipinfo by display:column

2013-04-30 Thread Chris Pratt
I think you're looking for the DisplayTag mailing list. Try looking at their documentation at http://displaytag.sourceforge.net/11/index.html and try their mailing list if you can't find the information there. (*Chris*) On Tue, Apr 30, 2013 at 11:10 AM, Dave Newton davelnew...@gmail.com

Re: when to use Action Errors and ActionMessages

2013-03-21 Thread Chris Pratt
Same time, during validation. They are just non-field specific. So If you have an error (or informational message) to deliver to the user you would use these methods. (*Chris*) On Thu, Mar 21, 2013 at 12:16 PM, Muralidhar Yaragalla java.yaraga...@gmail.com wrote: Hi when should we add an

Re: when to use Action Errors and ActionMessages

2013-03-21 Thread Chris Pratt
the execute method of action class will not be called is it? On Fri, Mar 22, 2013 at 12:50 AM, Chris Pratt thechrispr...@gmail.com wrote: Same time, during validation. They are just non-field specific. So If you have an error (or informational message) to deliver to the user you would use

Re: problem with regex validator

2013-03-19 Thread Chris Pratt
I'm pretty sure you can't use CDATA inside an attribute value. Have you tried: [^lt;gt;] (*Chris*) On Tue, Mar 19, 2013 at 8:52 AM, Muralidhar Yaragalla java.yaraga...@gmail.com wrote: I have added the following to log4j log4j.logger.com.opensymphony.xwork2.validator.validators=debug

Re: problem with regex validator

2013-03-19 Thread Chris Pratt
My bad, but the [^lt;gt;] should still work. (*Chirs*) On Tue, Mar 19, 2013 at 12:06 PM, Dave Newton davelnew...@gmail.com wrote: It's not an attribute value, it's an element's content. On Tue, Mar 19, 2013 at 3:00 PM, Chris Pratt thechrispr...@gmail.com wrote: I'm pretty sure you

Re: problem with regex validator

2013-03-19 Thread Chris Pratt
not work. any way i am fed up understanding that validator so i have written my own and it works fine. Thanks all of you for helping me. On Wed, Mar 20, 2013 at 12:30 AM, Chris Pratt thechrispr...@gmail.com wrote: I'm pretty sure you can't use CDATA inside an attribute value. Have you

Re: problem with regex validator

2013-03-19 Thread Chris Pratt
Try: param name=regex[^lt;gt;]+/param (*Chris*) On Tue, Mar 19, 2013 at 3:50 PM, Muralidhar Yaragalla java.yaraga...@gmail.com wrote: This is how i did !DOCTYPE validators PUBLIC -//Apache Struts//XWork Validator 1.0.2//EN

Re: how can i retain the field values when there is validation error in field

2013-03-19 Thread Chris Pratt
Muralidhar, How are you specifying the form? If you aren't using the s: form tags (or if you are using the simple theme), then you will have to handle the form value retrieval yourself. (*Chris*) On Tue, Mar 19, 2013 at 4:19 PM, Dave Newton davelnew...@gmail.com wrote: As stated, there is

Re: problem in validation with struts 2.3.1

2013-03-18 Thread Chris Pratt
You probably need to specify the %@ taglib prefix=s uri=/struts-tags% at the top of the .jsp file. (*Chris*) On Mon, Mar 18, 2013 at 1:06 PM, Muralidhar Yaragalla java.yaraga...@gmail.com wrote: I think the problem is i am not using any struts tags in my jsp. when i use s:fielderror/

Re: struts 2 session share

2013-03-10 Thread Chris Pratt
Your best bet is probably to store the cart in the database. Another advantage is that it allows the user to leave the site without losing their cart contents. (*Chris*) On Sun, Mar 10, 2013 at 9:01 AM, john lee sh_thorn_b...@yahoo.com wrote: after user login our e-commerce site

Re: Java security issue vs. struts?

2013-01-16 Thread Chris Pratt
I believe the description says it all. This Security Alert addresses security issues CVE-2013-0422 (US-CERT Alert TA13-010A - Oracle Java 7 Security Manager Bypass Vulnerability) and another vulnerability affecting Java running in web browsers. *These vulnerabilities are not applicable to Java

Re: Session Expired Interceptor

2013-01-12 Thread Chris Pratt
So you now have this in your struts.xml? global-results result name=loginRequired type=redirectActionloginRequired/result /global-results (*Chris*) On Sat, Jan 12, 2013 at 12:06 PM, BetBasoo, Peter pbetba...@mesirowfinancial.com wrote: I did put redirectAction action in, it's still

Re: iterable tag

2013-01-12 Thread Chris Pratt
.) Dave On Sat, Jan 12, 2013 at 4:04 PM, Chris Pratt thechrispr...@gmail.com wrote: You said in your original post that you used the s:iterator tag, correct? Can I see how you used it? (*Chris*) On Sat, Jan 12, 2013 at 3:06 AM, fusillator fusilla...@gmail.com wrote: Sorry

Re: iterable tag

2013-01-12 Thread Chris Pratt
at 1:22 PM, Chris Pratt thechrispr...@gmail.comwrote: You're right Dave, somehow I replied to the wrong email. Looking over the code now. (*Chris*) On Sat, Jan 12, 2013 at 1:08 PM, Dave Newton davelnew...@gmail.comwrote: (Isn't it around where the iterator tag is in that source? I

Re: Session Expired Interceptor

2013-01-12 Thread Chris Pratt
/struts -Original Message- From: Chris Pratt [mailto:thechrispr...@gmail.com] Sent: Saturday, January 12, 2013 3:11 PM To: Struts Users Mailing List Subject: Re: Session Expired Interceptor So you now have this in your struts.xml? global-results result name=loginRequired type

Re: Session Expired Interceptor

2013-01-12 Thread Chris Pratt
to that point because of the interceptor. Is this a valid assumption? -Original Message- From: Chris Pratt [mailto:thechrispr...@gmail.com] Sent: Saturday, January 12, 2013 4:19 PM To: Struts Users Mailing List Subject: Re: Session Expired Interceptor That looks right to me (except

Re: iterable tag

2013-01-11 Thread Chris Pratt
Can you cut and paste your s:iterator code into the email so we can see? (*Chris*) On Fri, Jan 11, 2013 at 11:12 AM, fusillator fusilla...@gmail.com wrote: Hi all, I'm new to struts2/java matters, so be sympathetic please. I've a question about s:iterator tag I recently used it to loop

Re: How to make three text boxes appear in one row using struts2 tags?

2013-01-03 Thread Chris Pratt
Since the rest of your form elements aren't using the theme=simple, they are automatically wrapped in tr/tr. Since you've told struts to use theme=simple on these elements, you'll have to wrap them yourself. (*Chris*) On Thu, Jan 3, 2013 at 2:37 AM, Vivek Jaiswal

Re: Best way to add to ValueStack in an Interceptor

2012-11-30 Thread Chris Pratt
Remember, when you use Maurizio's way, you have to reference the values as context, not stack variables. So instead of using %{myvar} you have to use %{#myvar). (*Chris*) On Fri, Nov 30, 2012 at 10:42 AM, Eric Lentz ericle...@outfastsource.comwrote: Maurizio, tried your way and no joy. Looks

Re: Struts2 String ThreadSafe?

2012-11-29 Thread Chris Pratt
It's not a chance, the same instance is being used for all requests to that action. (*Chris*) On Thu, Nov 29, 2012 at 7:42 AM, Rohit Gupta ro...@simplify360.com wrote: So given the fact that my beans are not prototype, there is a chance that the same action class may be used for two

Re: What is the effect of Params Interceptor?

2012-11-25 Thread Chris Pratt
Params interceptor is used in Injecting the Request Parameters into the Action, either individually or (using the ParameterAware interface) all at once. (*Chris*) On Sun, Nov 25, 2012 at 3:07 AM, Wu Ming rdyf4e...@gmail.com wrote: I read this tutorial

Re: What is the effect of Params Interceptor?

2012-11-25 Thread Chris Pratt
data that will be sent to the HelloWorldAction if the submit button is clicked. So, in this case, could the name textfield data can be called as a Request Parameter if it is being submitted to the HelloWorldAction? On Sun, Nov 25, 2012 at 6:20 PM, Chris Pratt thechrispr...@gmail.com wrote

Re: What is the effect of Params Interceptor?

2012-11-25 Thread Chris Pratt
Well, not implicitly, but by default. It is included in the struts-default stack. (*Chris*) On Sun, Nov 25, 2012 at 11:01 PM, Wu Ming rdyf4e...@gmail.com wrote: So is that means struts 2 is using params interceptor implicitly? On Mon, Nov 26, 2012 at 10:12 AM, Chris Pratt thechrispr

Re: Getting request as null

2012-11-07 Thread Chris Pratt
If I had to guess, I'd say that the ServletActionContext hasn't been completely initialized when the Class is instantiated, so calling getServletRequest in an instance initializer isn't going to work. Either call ServletActionContext.getServletRequest() in the method body, or (better option) use

Re: implementaiton advise on custom TextProvider

2012-10-15 Thread Chris Pratt
If you are using the Spring Framework with your App, you should be able to define your TextProvider, with all it's dependencies, as a Spring Bean, then when you define the bean in Struts use the Spring Bean ID instead of using the full class name. Struts will use that Spring Bean in place of

Re: implementaiton advise on custom TextProvider

2012-10-15 Thread Chris Pratt
With the Spring Plugin, Spring becomes the framework's internal DI. (*Chris*) On Mon, Oct 15, 2012 at 8:43 AM, Davis, Chad chad.da...@emc.com wrote: If you are using the Spring Framework with your App, you should be able to define your TextProvider, with all it's dependencies, as a

Re: implementaiton advise on custom TextProvider

2012-10-15 Thread Chris Pratt
Do you have the: constant name=struts.objectFactory value=spring/ constant defined in your struts.xml? That should be all that's needed. (*Chris*) On Mon, Oct 15, 2012 at 2:53 PM, Davis, Chad chad.da...@emc.com wrote: If you are using the Spring Framework with your App, you should be

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Chris Pratt
You *might* need to initialize the countries array. I wouldn't be surprised if internally the JSON library is doing a getCountries().add(CA) and throwing a null pointer exception because getCountries is returning a null. Also, you should really be programming to interfaces, not implementations.

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Chris Pratt
: {testChild: {description:kid},description:whee, name: foo,array:[CA,SG],arrayListStr:[CA,SG]} Thanks for your help! Shaun On Wed, Oct 10, 2012 at 11:33 PM, Chris Pratt thechrispr...@gmail.com wrote: You *might* need to initialize the countries array. I wouldn't be surprised if internally

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Chris Pratt
type interface java.util.List On Thu, Oct 11, 2012 at 11:19 AM, Chris Pratt thechrispr...@gmail.com wrote: What's the output of the run with this class JSON? (*Chris*) On Thu, Oct 11, 2012 at 10:52 AM, Shaun Lim shaunthegr...@gmail.com wrote: Hi Chris, I did start off

Re: content-language header with Struts2 does not uses the invocation locale

2012-10-10 Thread Chris Pratt
As a work-around, you could implement ServletResponseAware and call setHeader() on the injected HttpServletResponse to set the proper locale value. But I agree that Struts should take the value for the header from it's defined location. (*Chris*) On Wed, Oct 10, 2012 at 9:20 AM, JOSE L

Re: struts2 disable validation on page load

2012-10-06 Thread Chris Pratt
is generated. How I stop it from changing URL thus not validate on page load. That's what I want? On Sun, Oct 7, 2012 at 9:19 AM, Chris Pratt [via Struts] ml-node+s1045723n5710744...@n5.nabble.com wrote: By default Struts 2 validates all methods of the action, except the input, back

Re: Including JSP page from a jar file that placed on /WEB-INF/lib

2012-07-25 Thread Chris Pratt
Standard JSP doesn't allow for compiling directly from a jar file. There are three options (that I'm aware of): 1. Freemarker 2. Velocity 3. Java JSP Template Engine Switching to Freemarker or Velocity can have other advantages (in speed mainly), but it requires you to re-code your

Re: Struts2 : formatting and entering doubles consistently through the whole application not depending on locale

2012-06-19 Thread Chris Pratt
set French locale and enter an integer like this: 345 987, I get a conversion error. J. On Mon, Jun 18, 2012 at 5:28 PM, Chris Pratt thechrispr...@gmail.com wrote: I think the problem is that the French locale specifies that it should be written as 445.000,00 not 445,000.00

Re: Struts2 : formatting and entering doubles consistently through the whole application not depending on locale

2012-06-18 Thread Chris Pratt
I think the problem is that the French locale specifies that it should be written as 445.000,00 not 445,000.00. The parser expects localized input. (*Chris*) On Mon, Jun 18, 2012 at 7:06 AM, Łukasz Lenart lukasz.len...@googlemail.com wrote: I think the problem is related to primitive

Re: Struts2 (caching, valuestack, etc...) problem

2012-06-04 Thread Chris Pratt
Are you watching your server console? Are you sure it's actually making the request and not displaying the cached page. If it is just showing you the cached page, try appending some nonsense parameter to the end of the URL (i.e. ?dummy=aalskdjfkal). Otherwise, you'll have to look into your

Re: Struts2 (caching, valuestack, etc...) problem

2012-06-04 Thread Chris Pratt
found. Can you show me how to clean a cache? From: Chris Pratt thechrispr...@gmail.com To: Struts Users Mailing List user@struts.apache.org; Omar Ngarigari ngarigar...@yahoo.com Sent: Monday, June 4, 2012 2:17 PM Subject: Re: Struts2 (caching, valuestack, etc

Re: Dynamic Attributes can't be boolean? StrutsUtil.translateVariables exception

2012-05-25 Thread Chris Pratt
Try surrounding the attributes in quotes (e.g. true instead of true). (*Chris*) On Fri, May 25, 2012 at 11:58 AM, struts@spamgourmet.com wrote: After installing Struts 2.3.4, it appears that dynamic attributes must be strings now? I've modified text.ftl in my custom theme like this

Re: Parameter value set to null when page submitted after 30 minutes.

2012-04-27 Thread Chris Pratt
When you say User opened web page, do you mean they started a new web browser after 30min and tried to join an existing session? If so, that won't work with typical cookie based sessions, since the cookies are discarded when the browser is exited. If that's the behavior you are looking for, you

Re: StrutsTestCase, jUnit and file upload

2012-04-25 Thread Chris Pratt
First of all, I assume you're trying to test your own code, not the framework. With that in mind, by the time the file gets to your action, it's just a series of parameters (which could be slightly different depending on which underlying Multipart support you are using). So, my suggestion would

Re: Authentication and authorization

2012-04-17 Thread Chris Pratt
Struts itself doesn't provide an Authentication Authorization subsystem, but it will work well with Spring Security, Apache Shiro, or roll-your-own solutions. (*Chris*) On Tue, Apr 17, 2012 at 5:28 AM, Aravind Kumar aravind...@gmail.com wrote: Hello, I have just started to venture into

Re: Data Grids Excel Exports

2012-04-12 Thread Chris Pratt
You might want to look into something like DisplayTag or JQGrid. (*Chris*) On Thu, Apr 12, 2012 at 7:24 AM, CRANFORD, CHRIS chris.cranf...@setech.comwrote: I have several queries that I perform against my SQL database to get a list of records and then iterate over them in a paginated way in

Re: Regarding Iterator

2011-11-23 Thread Chris Pratt
Yes, either a dot or the word top should do what you're looking for. Worst case, you might be able to use %{#outerList} to reference the id from the outer iterator. (*Chris*) On Wed, Nov 23, 2011 at 3:51 PM, jlm...@gmail.com wrote: I think a dot should work. --Mensaje original-- De:

Re: Dynamic Result Selection

2011-11-20 Thread Chris Pratt
If the default is something that doesn't change, try putting it in application scope instead. You would be able to do that once during program initialization and then forget about it. (*Chris*) On Nov 19, 2011 12:23 AM, rohan jamkhedkar rgjamkhed...@yahoo.co.in wrote: Hi Christian, Thanks

Re: s:textfield / Beginner question

2011-11-11 Thread Chris Pratt
The obvious answer is, because it's disabled. The more complete answer is, because the browser doesn't send values for disabled form elements, Struts has no value to populate for that field. (*Chris*) On Fri, Nov 11, 2011 at 1:43 PM, Marco Schwarz marco.schw...@cioppino.netwrote: Hi, I'm

Re: Struts 2 Initialization Plugin

2011-11-10 Thread Chris Pratt
Look into the ServletContextListener interface. It's a nice way to initialize/dispose of one-time resources in any web app, Struts or not. (*Chris*) On Thu, Nov 10, 2011 at 12:06 PM, Scott Smith ssm...@mainstreamdata.comwrote: In struts 1, I used org.apache.struts.action.PlugIn as a way to

Re: JSON Plugin to Include Parent Action's Properties

2011-11-03 Thread Chris Pratt
Then create an inner class within your Action that contains just the information youbwant to include in the JSON and set it as the base object to marshal. (*Chris*) On Nov 3, 2011 12:59 PM, Daniel Ruan danielr...@gmail.com wrote: Thanks, everybody. I tried ignoreHierarchy, but got a Java

Re: IE open excel file directly but not save as

2011-09-26 Thread Chris Pratt
Try removing the filename from the Content-Disposition header. inline doesn't support this attribute and maybe IE is assuming you mean external because it's there. (*Chris*) On Mon, Sep 26, 2011 at 10:30 AM, Emi Lu em...@encs.concordia.ca wrote: Hello , I know its not really struts

Re: IE open excel file directly but not save as

2011-09-26 Thread Chris Pratt
the problem for IE8. Emi On 09/26/2011 01:40 PM, Chris Pratt wrote: Try removing the filename from the Content-Disposition header. inline doesn't support this attribute and maybe IE is assuming you mean external because it's there. (*Chris*) On Mon, Sep 26, 2011 at 10:30 AM, Emi Lu

Re: [S2] Random java.lang.reflect.InvocationTargetException and java.lang.NullPointerException error??

2011-09-06 Thread Chris Pratt
Expired session maybe? (*Chris*) On Tue, Sep 6, 2011 at 1:39 PM, Burton Rhodes burtonrho...@gmail.comwrote: I was wondering if anyone can help track down this error that I'm getting. Unfortunately, I cannot reproduce the error with any consistency - just sort of appears to happen randomly.

Re: Doubt on Accessing Session from ActionContext

2011-09-05 Thread Chris Pratt
Accessing the ActionContext is considered tying youself to a specific implementation, plus it makes unit testing the Action more involved (since you have to provide a fully functional ActionContext). Whereas implementing ServletRequestAware is programming to interfaces (which is good practice) and

Re: Struts2 dispatch request to another application

2011-08-26 Thread Chris Pratt
You'll probably have to write an action that retrieves the content and makes it available to a Stream Result ( http://struts.apache.org/2.0.14/docs/stream-result.html). (*Chris*) On Fri, Aug 26, 2011 at 1:57 PM, JOSE L MARTINEZ-AVIAL jlm...@gmail.comwrote: Hello all, I'm using Struts

Re: Where to put non action associated data

2011-07-31 Thread Chris Pratt
This sounds like one of the very few legitimate uses of the chain result type. Check out http://struts.apache.org/2.0.14/docs/chain-result.html (*Chris*) On Jul 31, 2011 9:50 AM, Marcus Bond mar...@marcusbond.me.uk wrote: Hi, Say I have a form where user can carry out a product search which

Re: Submit image button sends coordinates

2011-07-26 Thread Chris Pratt
That's exactly what's happening, but it's also warning (in devmode only) when it can't set one so that you, the developer, can make the right decision for your program. (*Chris*) On Tue, Jul 26, 2011 at 6:50 AM, Paul Benedict pbened...@apache.org wrote: Just a question, if I may :-) Doesn't

Re: Submit image button sends coordinates

2011-07-26 Thread Chris Pratt
in the model and ignores the other request parameters. Is it acting differently because of nested properties? On Tue, Jul 26, 2011 at 9:54 AM, Chris Pratt thechrispr...@gmail.com wrote: That's exactly what's happening, but it's also warning (in devmode only) when it can't set one so that you

Re: Doubt on Struts 2 Architechture

2011-07-25 Thread Chris Pratt
Actually, no, it's not executing them again, it's finishing the original execution. The interceptor does whatever it's supposed to do before the execution of the action, it then turns over control to Struts which decides whether there is another interceptor in the chain, or whether it's time to

  1   2   3   4   5   6   7   >