File upload (jupload)--how to disable struts2' fileupload interceptor?

2009-05-13 Thread Junhua gao
Please help me! I am using jupload applet to upload files,which forward the request to a jsp file to process uploaded files. In struts1, it works correctly. But in struts2, the interceptor(or the request parser? i am not sure) intercept the request,always produce:[ERROR] Multipartrequest-Un

Re: struts2+spring+hibernate, objects instantiate order?

2009-05-13 Thread Dave Newton
ren sky wrote: 1) before running my project, spring has already instantiate all the object defined in the applicationContext.xml? such as LoginAction,PersonServiceImpl and sessionFactory? Singletons probably are, sure. 2) the action used in struts2 is instantiated before a request comes i

struts2+spring+hibernate, objects instantiate order?

2009-05-13 Thread ren sky
hello everyone, i am new to struts2. i use struts2, spring2.5 and hibernate 3.3.1 to build a simple website. and have some questions about the order of the objects instantiate. here is my config file for spring: -applicationContext.xml---

Re: convention plug-in

2009-05-13 Thread Jim Collings
Dave Newton wrote: > Jim Collings wrote: >> A table of defaults for all of the conventions the convention plugin ... > Hmm, I guess that's what I thought that table of results and results > codes was. If you file a CLA you can update the wiki yourself. Thanks. I may just do that. :-) Jim C.

Re: How do I get a request parameter

2009-05-13 Thread Jim Collings
>> %{#parameters.someName} >> %{#parameters['someName']} >> %{parameters.someName} >> %{parameters['someName'} >> parameters.someName >> parameters['someName'] >> #parameters.someName >> #parameters['someName'] I believe it turned out to be this one above. Many thanks to all who assisted. :-) J

Griffy..

2009-05-13 Thread Martin Gainty
anyone know what happened to Ted Husted's Griffy Project? download?.. documentation? and/or tutorial? thx Martin Gainty __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité This message is confid

Re: Trim for regex validator is not working

2009-05-13 Thread Dave Newton
Siddiq Syed wrote: I am searching for the regular expression, which ignore white spaces but no sucess so far. Any idea ? ... According to [1] (which was the top hit when I searched for "java +regular expression), "\s" matches any whitespace character. "*" means 0 or more occurrences. So \s*

Re: EL question

2009-05-13 Thread Dale Newfield
mitch gorman wrote: the issue is, see that "/default" in those image source paths? that's the context path. Since you're stuck with JSTL, I think you're looking for: ${pageContext.request.contextPath} -Dale - To unsubscribe,

RE: Documentation typo?

2009-05-13 Thread Security Management
No problem. Mike. -Original Message- From: Dave Newton [mailto:newton.d...@yahoo.com] Sent: Wednesday, May 13, 2009 4:45 PM To: Struts Users Mailing List Subject: Re: Documentation typo? Security Management wrote: > http://struts.apache.org/2.1.6/docs/tag-reference.html > > Should the

Re: Trim for regex validator is not working

2009-05-13 Thread Siddiq Syed
Hi Dave, I tried setting trim="true" , I donno why some how its not working. I am searching for the regular expression, which ignore white spaces but no sucess so far. Any idea ? Thanks siddiq. newton.dave wrote: > > Siddiq Syed wrote: >> Do anybody have an idea why this is not working. >>

Re: How do I get a request parameter

2009-05-13 Thread mitch gorman
Jim Collings wrote: > Has to be in the jsp. > tried: > value="#parameters.something" > > wrap with %{ } > Didnt work. Showed up as text in the textfield we are using. > > On 5/13/09, Terry Gardner wrote: > >> One way is via the ServletActionContext, for example, >> ServletActionContex

EL question

2009-05-13 Thread mitch gorman
this isn't specifically a struts question, but perhaps it may help someone else (besides, hopefully, me) to ask it here. i've read Chris Pratt's posts of 5/11 on the "Access to ValueStack from JSPs" thread... i'm just hoping the answer isn't to manually do the interpretation, as he stated

Re: Documentation typo?

2009-05-13 Thread Dave Newton
Security Management wrote: http://struts.apache.org/2.1.6/docs/tag-reference.html Should the elseIf on this page not be elseif? I believe the tag is case sensitive, and you have to look at the examples to tell it's a typo there... Looks like it was fixed today; thanks "Security Management" &

Re: Documentation typo?

2009-05-13 Thread Dale Newfield
Security Management wrote: http://struts.apache.org/2.1.6/docs/tag-reference.html Should the elseIf on this page not be elseif? I believe the tag is case sensitive, and you have to look at the examples to tell it's a typo there... Thanks for the bug report. This is now fixed in confluence an

Re: Trim for regex validator is not working

2009-05-13 Thread Dave Newton
Siddiq Syed wrote: Do anybody have an idea why this is not working. There is validation for a numeric field which is a string in the action , The validation is through regular expression as show below. Please enter a case number [0-9]{1

Re: how to integrate struts2 + convention plugin +spring

2009-05-13 Thread Dave Newton
chen thomas wrote: I'm a Struts 2 newbie .I want to integrate struts2 ,convention plugin and spring. how to do? anyone give me some advice? I'd probably start by reading the Convention and Spring plugin docs--after that if you have any specific questions this is the place to ask them. Dave

Re: convention plug-in

2009-05-13 Thread Dave Newton
Jim Collings wrote: A table of defaults for all of the conventions the convention plugin uses. I suppose you could call it a "conventions cheat sheet". For example: I create a foo.jsp that submits to "/place/wingding" foo.jsp -> /place/wingding -> wingding-[ success | fail | error ] Note: I th

Documentation typo?

2009-05-13 Thread Security Management
http://struts.apache.org/2.1.6/docs/tag-reference.html Should the elseIf on this page not be elseif? I believe the tag is case sensitive, and you have to look at the examples to tell it's a typo there... - To unsubscribe, e-m

Re: How do I get a request parameter

2009-05-13 Thread Musachy Barroso
don't forget that what is returned from #parameters['somename'] is an array of values, so try: #parameters['somename'][0] musachy On Wed, May 13, 2009 at 3:57 PM, Wes Wannemacher wrote: > Well, parameters are available in the OGNL context through the named > variable 'parameters.' So, you should

Re: How do I get a request parameter

2009-05-13 Thread Wes Wannemacher
Well, parameters are available in the OGNL context through the named variable 'parameters.' So, you should be able to do one of - %{#parameters.someName} %{#parameters['someName']} %{parameters.someName} %{parameters['someName'} parameters.someName parameters['someName'] #parameters.someName #para

Re: How do I get a request parameter

2009-05-13 Thread Jim Collings
The question is simpler than it seems. It's the syntax that's the kicker. The old script based way is like this: <%= request.getParameter("someName") %> What's the new way? On Wed, May 13, 2009 at 3:28 PM, Jim Collings wrote: > Has to be in the jsp. > tried: > value="#parameters.something" >

Re: How do I get a request parameter

2009-05-13 Thread Wes Wannemacher
wrote: > Has to be in the jsp. > tried: >  value="#parameters.something" > > Didnt work.  Showed up as text in the textfield we are using. > > On 5/13/09, Terry Gardner wrote: >> One way is via the ServletActionContext, for example, >> ServletActionContext.getRequest().getParameter(String); >> >>

Trim for regex validator is not working

2009-05-13 Thread Siddiq Syed
Hi all, Do anybody have an idea why this is not working. There is validation for a numeric field which is a string in the action , The validation is through regular expression as show below. Please enter a case number [0-9]{1,}

Re: How do I get a request parameter

2009-05-13 Thread Jim Collings
Has to be in the jsp. tried: value="#parameters.something" Didnt work. Showed up as text in the textfield we are using. On 5/13/09, Terry Gardner wrote: > One way is via the ServletActionContext, for example, > ServletActionContext.getRequest().getParameter(String); > > On May 13, 2009, at 3:1

Re: How do I get a request parameter

2009-05-13 Thread Terry Gardner
One way is via the ServletActionContext, for example, ServletActionContext.getRequest().getParameter(String); On May 13, 2009, at 3:16 PM, Jim Collings wrote: It isn't in the value stack but I need to snag it. Can't find any examples of how to do this. Clue anyone? Jim C. smime.p7s D

Re: How do I get a request parameter

2009-05-13 Thread Wes Wannemacher
On Wed, May 13, 2009 at 3:16 PM, Jim Collings wrote: > It isn't in the value stack but I need to snag it. Can't find any examples > of how to do this. > > Clue anyone? -W -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more

Re: Struts 2.1.6 Test Examples

2009-05-13 Thread Wes Wannemacher
On Wed, May 13, 2009 at 3:00 PM, Kawczynski, David wrote: > I'm certainly no magician, but was still able to do this. > > If your action depends on session info, implement SessionAware > and provide it with a Map of name-value pairs in the testcase. > > If your action depends on request info, impl

How do I get a request parameter

2009-05-13 Thread Jim Collings
It isn't in the value stack but I need to snag it. Can't find any examples of how to do this. Clue anyone? Jim C.

RE: Struts 2.1.6 Test Examples

2009-05-13 Thread Kawczynski, David
I'm certainly no magician, but was still able to do this. If your action depends on session info, implement SessionAware and provide it with a Map of name-value pairs in the testcase. If your action depends on request info, implement RequestAware and provide it with a Map of name-value pairs i

Re: Struts 2.1.6 Test Examples

2009-05-13 Thread Jim Collings
Ya. That sounds like a magic trick. ;-) On 5/13/09, Doug Pham wrote: > Hi All, > In the main page one of the bullet point is: > Easy-to-test Actions - Test Struts2 Actions directly, without resorting to > mock HTTP objects. > > I would love to see a few examples of these. > > Cheers, > Doug

Re: how to integrate struts2 + convention plugin +spring

2009-05-13 Thread thomas
I have found a way to determine how to config application-web.xml: Please set break point on the following code of the SpringObjectFactory.java ,which is contained in the xwork-2.1.2.jar, public Object buildBean(String beanName, Map extraContext, boolean injectInternal) throws Exception {

Re: how to integrate struts2 + convention plugin +spring

2009-05-13 Thread Frans Thamura
i am still learning the REST implementation :0 still un familiar the class is less than the old one, but work :0 F On Wed, May 13, 2009 at 11:21 PM, chen thomas wrote: > Hi > > I'm a Struts 2 newbie .I want to integrate struts2 ,convention plugin and > spring. > how to do? anyone give me some

getRequestURI() returns parameters - WAS 5.1 running Struts 1.0 application

2009-05-13 Thread mule_user
I am debugging an application written using Struts 1.0 and deployed in WAS 5.1. I am noticing that getRequestURI() from HttpServletRequest is also returning the request parameters; when a forward is made from Struts1.0. According to the spec, getRequestURI() should not return parameters. Is

how to integrate struts2 + convention plugin +spring

2009-05-13 Thread chen thomas
Hi I'm a Struts 2 newbie .I want to integrate struts2 ,convention plugin and spring. how to do? anyone give me some advice? thanks a lot thomas

Struts 2.1.6 Test Examples

2009-05-13 Thread Doug Pham
Hi All, In the main page one of the bullet point is: Easy-to-test Actions - Test Struts2 Actions directly, without resorting to mock HTTP objects. I would love to see a few examples of these. Cheers, Doug

Changing the default attribute value for a tag

2009-05-13 Thread Richard Sayre
I want to have all of s:url tags use forceAddSchemeHostAndPort="true" Is there a way to set this property globaly? I couldn;t find anything in struts.properties. Thanks, Rich - To unsubscribe, e-mail: user-unsubscr...@struts.a

Re: [Struts 2] Disabled fields are not posted on form submission

2009-05-13 Thread Dale Newfield
Or just create an onsubmit function that de-disables the appropriate fields before submission. -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Struts newbie - Advice on file downloading

2009-05-13 Thread Dale Newfield
Richard Sayre wrote: filename="Report.pdf" That is an invalid contentDisposition value. We've recently fixed the documentation so that hopefully people will stop making this mistake. If you want it displayed in the browser: inline;filename="Report.pdf" If you want the browser to save it: at

Re: Struts newbie - Advice on file downloading

2009-05-13 Thread Mike Altieri
Hi Steve, I haven't implemented this in struts before; but have in the past built other java web-apps w/ the downloading of files... the save-as dialog box is browser dependent (as Richard mentioned) and if a user has mucked w/ their mime-type settings you may not be able to force the regular

Re: Migrate Struts 1.0 app from WebSphere 5.1 to 6.1 - JSP container failed to load the TagExtraInfo

2009-05-13 Thread Struts Two
I know when I migrated my struts 1.1 apps from Websphere 5.1 to Websphere 6.x, I had to add the a property to custom server properties to make it work, Go to : Application servers > [ur server name] > Web container > Custom properties and then add the following property: prependSlashToResource

Re: convention plug-in

2009-05-13 Thread Jim Collings
A table of defaults for all of the conventions the convention plugin uses. I suppose you could call it a "conventions cheat sheet". For example: I create a foo.jsp that submits to "/place/wingding" foo.jsp -> /place/wingding -> wingding-[ success | fail | error ] Note: I think this is right but

Re: convention plug-in

2009-05-13 Thread Dave Newton
Jim Collings wrote: I've read this many times but I'm not getting out of it what I should. When this happens to me, I seek alternate means. In college, I learned that not all instructors can teach all students and not all documentation can be read by all people. A simple table, X leads to Y lead

Re: [Struts 2] Disabled fields are not posted on form submission

2009-05-13 Thread Dave Newton
Fernandes Celinio wrote: I wanted to know if a built-in solution existed with Struts 2. Nope, nothing in Struts 2 will change the HTML spec or how browsers are implemented. Dave - To unsubscribe, e-mail: user-unsubscr...@s

Re: convention plug-in

2009-05-13 Thread Jim Collings
I've read this many times but I'm not getting out of it what I should. When this happens to me, I seek alternate means. In college, I learned that not all instructors can teach all students and not all documentation can be read by all people. A simple table, X leads to Y leads to Z would be fantas

RE: [Struts 2] Disabled fields are not posted on form submission

2009-05-13 Thread Fernandes Celinio
Ok, thanks. I was thinking about using hidden fields indeed. I wanted to know if a built-in solution existed with Struts 2. -Message d'origine- De : Lukasz Lenart [mailto:lukasz.len...@googlemail.com] Envoyé : mercredi 13 mai 2009 11:55 À : Struts Users Mailing List Objet : Re: [Struts 2

Re: Struts newbie - Advice on file downloading

2009-05-13 Thread Richard Sayre
Hi, I have the following defined: application/pdf fileStream filename="Report.pdf" 1024 My action lookks like this public String generateReport() { //use api to build PDF //the api takes an output stream //so at th

Struts newbie - Advice on file downloading

2009-05-13 Thread Steve
Hi, I'm a Struts 2 newbie and I need to write some code to download dynamically created files in various formats (csv, txt and xml). I want the user to be presented with a "Save As" dialog regardless of file type. Does anyone have any advice / URL's for example code? I have found the "Resul

Re: convention plug-in

2009-05-13 Thread Lukasz Lenart
2009/5/13 Jim Collings : > Is there a place where I can see what the conventions are that the > convention plug-in uses? Did you read the documentation [1]? [1] http://cwiki.apache.org/WW/convention-plugin.html Regards -- Lukasz http://www.lenart.org.pl/ --

convention plug-in

2009-05-13 Thread Jim Collings
Is there a place where I can see what the conventions are that the convention plug-in uses? Preferably in a clean table format. I'm a fairly visual learner. Jim C.

Re: [Struts 2] Disabled fields are not posted on form submission

2009-05-13 Thread Lukasz Lenart
2009/5/13 Fernandes Celinio : > How do i submit the value of a disabled text field ? > Is there an interceptor that already takes care of it in Struts 2 ? By HTML spec, disabled fields aren't send to a server, it isn't Struts issue but general rule. You can consider to use readOnly attribute or us

Re: [Struts 2] Disabled fields are not posted on form submission

2009-05-13 Thread Nils-Helge Garli Hegvik
Are you sure that you really want to disable it? Can you use a hidden field, or hide the field with css, if you're just trying to hide it from the user? Nils-H On Wed, May 13, 2009 at 11:28 AM, Fernandes Celinio wrote: > Hi, > > Disabled fields by W3 specifications will not get posted on form >

manage refresh action

2009-05-13 Thread elyes sallem
Hello, i have a list of entrees that i display from database for each entree , it is possible de make a modification and a validation of data once the user make a modification, and after , try make a refresh , i want to avoid calling twice the modification action i wanna call the refresh action a

[Struts 2] Disabled fields are not posted on form submission

2009-05-13 Thread Fernandes Celinio
Hi, Disabled fields by W3 specifications will not get posted on form submission (http://www.w3.org/TR/html4/interact/forms.html#h-17.12.1). In my case, the textfield "dateCreation" has a "disabled" attribute set to true (fieldDisabled is set to true). How do i submit the value of a di

Re: Using PUT with REST Plugin

2009-05-13 Thread Stuart Ellidge
Hi David, Here is how we construct a URL in our JSP: So the key differences are: * ID is part of the main body of the URL - not a parameter * we use PUT as opposed to "put" (not sure it makes any difference, but haven't tested lowercase) * _method is a URL parameter - not a form obje