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

2015-05-11 Thread Chris Pratt
at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:619) > > > On Mon, May 11, 2015 at 12:59 PM, Kiran Badi wrote: > > > checking chris. I think that should work.Let me check. > > > > On

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" wrote: > Hi Chris, > > Here is Struts 2 filter in web xml, > > > Struts 2 Filter > struts2 > > > org.apach

Re: Mysterious(?) carriage returns

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

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: 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 > > cssStyle="width:270px;margin-left:20px;margin-top: 10px;"/> > > I am not sure why label

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 wrote: > > I can use jquery to change html input tag's placeholder for no problem, > but no matter what method I use, impossible f

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 http://local

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. > > *http://yaragall

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: // both hidden fields (*Chris*) On Thu, Mar 6, 2014 at 12:26 PM, Dave Newton wrote: > On Thu, Mar 6, 2014 at 3:01 PM, Fredrik Andersson >wrote: > > > I have tride to put the hidden attributet att: > > 1 first code line after the form-start-tag > >

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

2014-03-06 Thread Chris Pratt
Did you try moving the elements to the top of the form, or removing the wrap="hard" from your ? (*Chris*) On Thu, Mar 6, 2014 at 5:13 AM, Fredrik Andersson wrote: > Hello guys! > > I trying to produce a app that renders in XHTML. > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> >

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: Skip evaluation of ${...} and %{...} in TextParseUtil

2013-10-27 Thread Chris Pratt
Have you tried escaping the string? You might try \${min} or possibly \\\${min} (since the Properties object may unescape once). (*Chris*) On Sun, Oct 27, 2013 at 9:55 AM, Umesh Awasthi wrote: > Oh, that was my typo and yes message indeed contain $. > Issue here is how bean Validation is work

Re: Parent package is not defined

2013-10-06 Thread Chris Pratt
ss checked and struts-plugin.xml is there. > > > > > On Mon, Oct 7, 2013 at 12:05 PM, Chris Pratt >wrote: > > > And in the root directory of the jar file, correct? > > (*Chris*) > > > > > > On Sun, Oct 6, 2013 at 11:33 PM, Umesh Awast

Re: Parent package is not defined

2013-10-06 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 wrote: > Yes, its there > Still i will cross check it. > > Thanks > Umesh > > > On Mon, Oct 7, 2013 at 11:47 AM, Lukasz Lenart >wrote: > > > Are you sure that the struts-plugin.xml exi

Re: Url rewriting of .action to .jsp

2013-09-22 Thread Chris Pratt
That's because you are submitting that action. If that's not what you intended, I don't understand what you are trying to achieve. The setting I suggested allows you to rename the .action url extension to .jsp (or .html). (*Chris*) On Sun, Sep 22, 2013 at 1:30 AM, Serdyn du Toit wrote: > Hi

Re: Url rewriting of .action to .jsp

2013-09-22 Thread Chris Pratt
Put the following in your struts.xml configuration file: I actually prefer: since it hides the underlying technology just a bit better and makes a tiny bit harder for someone to guess how to hack it. It's not high security, but every little bit helps. (*Chris*) On Sat, Sep 21, 2013 a

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 wrote: > Hi > > validate="true"> > > cssClass="mystyle1"/> > cssClass=

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 wrote: > Chris- >

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: 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 wrote: > Hi Chris, > > Attached the images. > > Thanks, > Srineel > > > On Tue, Sep 10, 2013 at 1:17 PM, Chris Pratt wrote: > >> Sri

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: You might even be able to get away with: But I haven't tested it to be sure. (*Chris*) On Tue, Sep 10, 2013 at 12:39 AM, Alireza Fattahi wrote: > Thanks for

Re: Using themes with s: select

2013-09-10 Thread Chris Pratt
prefix="html" uri="http://jakarta.apache.org/struts/tags-html"; > %> > <%@ taglib prefix="s" uri="/struts-tags" %> > > <%-- method="post" > --%> > > " method="POST"> > > > > Paym

Re: Using themes with s: select

2013-09-08 Thread Chris Pratt
Try cssStyle="background-color:yellow;" (*Chris*) On Sun, Sep 8, 2013 at 9:54 PM, Srineel Mazumdar wrote: > 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 > > http://struts.apache.org/release/2.2

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 *$*{stateName}. 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 wrote: > Does it work if you use: > > > > I actually didn't know it'd work with an OGNL expression as a tag body.

Re: AJAX Jsp tags

2013-08-12 Thread Chris Pratt
o, when user clicks the menu1 link the Ajax will replace the page content > with page1.jsp. And all the remaining part of the page will not reload from > server! > The page1.jsp will only have the required content of page1, it will not > have any header, menu and footer. > > I thoug

Re: AJAX Jsp tags

2013-08-11 Thread Chris Pratt
> much easier to work with and you will need to provide your own handlers, > > which are often required even in the simple cases. XML can not account > for > > all these cases and does not provides the means to add custom handlers > in a > > way that would be as simple as

Re: sj:tabbedpanel javascript

2013-08-09 Thread Chris Pratt
urce before ask question here, but sj:tabbedpanel convert > into jquery, even view source, still not match. > > john > >*From:* Chris Pratt > *To:* Struts Users Mailing List ; john lee < > sh_thorn_b...@yahoo.com> > *Sent:* Friday, August 9, 2013 12:43 PM > *Su

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 wrote: > > try to using javascript to set sj:tabbedpane

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 wrote: > Hi, > > I have confused with struts 2 ajax please correct me: > 1- The dojo plugin is deprecated ( > http://struts.apache.org/release/2.3.x/docs/ajax-tags.html

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 wrote: > Hi Martin: > > Okay, but my validation XML is pointing to > http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd,

Re: How to initiate the select tag with empty list

2013-08-02 Thread Chris Pratt
& Regards > Srikanth > > On Fri, Aug 2, 2013 at 11:26 PM, Chris Pratt >wrote: > > > There's no real advantage to using the tag if you already no > > there's no data to be displayed (remember, the struts tags are for > display > > only, they play abs

Re: How to initiate the select tag with empty list

2013-08-02 Thread Chris Pratt
mal html > select with struts2, its not generating _multiselect_xyz > > -- > Thanks & Regards > Srikanth > > On Fri, Aug 2, 2013 at 9:41 PM, Chris Pratt > wrote: > > > It can, just use a regular , instead of the > > (*Chris*) > > >

Re: How to initiate the select tag with empty list

2013-08-02 Thread Chris Pratt
It can, just use a regular , instead of the (*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. Now its >

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 wrote: > SSCCE ? what u refer to? > > > > From: Dave Newton > To: john lee > C

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 wrote: > My questions are: Is there a better place to discuss this? Could this ever > be enhanced? > > The issue: > I'd love to see more consistency in the way we must

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 MARTINE

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(); (*Chris

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 , but don't directly use it. Because of this, if you define your welcome file as: index.jsp Then create a dummy (or even 0 byte length) index.jsp file, your container will actually go through the normal proce

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread Chris Pratt
> > tks in advance > > john > > ------ > *From:* Chris Pratt > *To:* Struts Users Mailing List ; john lee < > sh_thorn_b...@yahoo.com> > *Sent:* Thursday, May 23, 2013 6:25 PM > *Subject:* Re: struts 2 Intercepter ServletRequestAware > > Servle

Re: struts 2 Intercepter ServletRequestAware

2013-05-23 Thread Chris Pratt
en access > Cookie.. > > please advise > > > > john > > ____ > From: Chris Pratt > To: Struts Users Mailing List ; john lee < > sh_thorn_b...@yahoo.com> > Sent: Thursday, May 23, 2013 5:02 PM > Subject: Re: struts 2 Intercept

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 wrote: > please explain more, thanks in advance > > > > From: Dave Newton > To: Struts Users Mailing List > Sent: Thursday, May

Re: Cookie in struts2

2013-05-15 Thread Chris Pratt
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 >wrote: > > > You might want to look into the CookiesAware interface. It's a better > way > > of accessing c

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 wrote: > Import

Re: how to generate 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 wrote: > What's ``? > > Da

Re: when to use Action Errors and ActionMessages

2013-03-21 Thread Chris Pratt
or action messages the execute method of > action class will not be called is it? > > > On Fri, Mar 22, 2013 at 12:50 AM, Chris Pratt >wrote: > > > Same time, during validation. They are just non-field specific. So If > you > > have an error (or informational mes

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 a

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 wrote: > As stated, there is no particular action you need to take other than not > redirecting. > > If the action is hit and the params interceptor is working, they'll be > there. > > Dave > > > > On Tue, Mar 19, 2013 at 7:1

Re: problem with regex validator

2013-03-19 Thread Chris Pratt
Try: [^<>]+ (*Chris*) On Tue, Mar 19, 2013 at 3:50 PM, Muralidhar Yaragalla < java.yaraga...@gmail.com> wrote: > This is how i did > > http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd";> > > > > > The value of bar2 must be in the format > w

Re: problem with regex validator

2013-03-19 Thread Chris Pratt
that you suggested but it did 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 >wrote: > > > I'm pretty sure you can&#

Re: problem with regex validator

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

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: "[^<>]" (*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 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 > " > > " th

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 wrote: > > > after user login our e-commerce site successfuly, he was granted an

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 run

Re: Session Expired Interceptor

2013-01-12 Thread Chris Pratt
oginRequired because I thought that it would never get 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

Re: Session Expired Interceptor

2013-01-12 Thread Chris Pratt
gt; > > name="loginRequired">loginRequired > > > > /expiredSession.jsp > > > class="mesirow.action.AccountActions" method="getClientA

Re: iterable tag

2013-01-12 Thread Chris Pratt
013 at 1:22 PM, Chris Pratt wrote: > 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 wrote: > >> (Isn't it around where the iterator tag is in that source?

Re: iterable tag

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

Re: Session Expired Interceptor

2013-01-12 Thread Chris Pratt
So you now have this in your struts.xml? loginRequired (*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 not working. The web page > expiredSession.jsp is not being shown and there is

Re: iterable tag

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

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 . 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 wrote: > > > > Dear Umesh Awast

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 wrote: > Maurizio, tried your way and no joy. Looks like I'll go with Łukasz'

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 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 consecutive requests. > > R

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 wrote: > So is that means struts 2 is using params interceptor implicitly? > > > On Mon, Nov 26, 2012 at 10:12 AM, Chris Pratt >wrote

Re: What is the effect of Params Interceptor?

2012-11-25 Thread Chris Pratt
is a form > that has "name" textfield 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?

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 wrote: > I read this tutorial< > http://www.tutorialspoint.com/struts_2/struts_intercepto

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 t

Re: implementaiton advise on custom TextProvider

2012-10-15 Thread Chris Pratt
Do you have the: 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 wrote: > > > > If you are using the Spring Framework with your App, you should be able > to > > define your TextProvider, with all it's dependenc

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 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 Spring Bean, > t

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 in Struts use the Spring Bean ID instead of using the full class name. Struts will use that Spring Bean in place of creating

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Chris Pratt
> setting property=arrayListStr type interface java.util.List > > > > > > On Thu, Oct 11, 2012 at 11:19 AM, Chris Pratt >wrote: > > > >> What's the output of the run with this class & JSON? > >> (*Chris*) > >> > >> On

Re: Struts2 REST plugin: Passing array in JSON

2012-10-11 Thread Chris Pratt
ArrayList(ArrayList arrayList) { > System.out.println("setting arrlist"); > this.arrayList = arrayList; > } > > public List getArrayListStr() { > return arrayListStr; > } > > public void setArrayListStr(List arrayListStr) { > System.out

Re: Struts2 REST plugin: Passing array in JSON

2012-10-10 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: 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 MARTINEZ

Re: struts2 disable validation on page load

2012-10-06 Thread Chris Pratt
ng 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

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 ent

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

2012-06-19 Thread Chris Pratt
numberFormat.html > > > > As I have been working on integer l10n, I have tested this, and if I 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 Pra

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 wrote: > I think the problem is related to primitive converter which doesn't > inc

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

2012-06-04 Thread Chris Pratt
but I got no record found. Can you show me how to clean a cache? > > > > From: Chris Pratt > To: Struts Users Mailing List ; Omar Ngarigari < > ngarigar...@yahoo.com> > Sent: Monday, June 4, 2012 2:17 PM > Subject: Re: Struts2

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 actio

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, 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 (diff output): > 23c23 >

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 be

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 wrote: > Hello, > > I have just started to venture into Struts2 and I'm havi

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 wrote: > 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 JSPs. > Presently, I hav

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, wrote: > I think a dot should work. > --Mensaje original-- > De: Sathya Prak

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" wrote: > Hi Christian, > Thanks again. I think I would h

Re: 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 wrote: > Hi, > > I'm new in this mailinglist.

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 wrote: > In struts 1, I used org.apache.struts.action.PlugIn as a way to create an > object at web

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" wrote: > Thanks, everybody. > > I tried ignoreHierarchy, but got a Java reflection excepti

Re: IE open excel file directly but not save as

2011-09-26 Thread Chris Pratt
te"); > > res.setHeader("Pragma","private"); > > res.setContentType("application/vnd.ms-excel"); > > res.setHeader("Content-Disposition", "inline"); > > res.setContentLength(fileData.length); > > res.setHeader(&

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 wrote: > Hello , > > I know its not really struts question. But maybe some

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 wrote: > 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. My debug log & > s

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) an

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 wrote: > Hello all, > I'm using Struts 2.1.8.1. I have a req

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" wrote: > Hi, > > > > Say I have a form where user can carry out a product search which hits an > action

Re: Submit image button sends coordinates

2011-07-26 Thread Chris Pratt
s defined 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 > wrote: > > That's exactly what's happening, but it's also warning (in devmode only)

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 wrote: > Just a question, if I may :-) Doesn't Struts 2 have the abi

  1   2   3   4   5   6   7   >