Struts 2.1.6 doc/wiki update

2009-09-04 Thread Tommy Pham
h...@all, Can anyone update the doc/wiki? I'd like to make some corrections to the discrepancy I've found so far. What do I need to do to able to edit/update? Also, since I've never updated a wiki before, will my updating v2.1.6 only affects wiki for other earlier releases? TIA, Tommy ---

Re: how do you test your action classes?

2009-09-04 Thread Musachy Barroso
You need to checkout the code from svn, some of the things mentioned in that page have not been released yet. musachy On Fri, Sep 4, 2009 at 10:24 AM, phillips1021 wrote: > > Musachy: > >   Is the JUnit code shown in the example on the Testing Actions wiki page > missing some statements?  For exa

Re: Basic architecture question

2009-09-04 Thread Rusty Wright
I don't have a lot of hibernate experience but my memory, from reading that big hibernate book, is that you get more flexibility by using hibernate sessions instead of jpa entity managers. For me, strict jpa compatibility wasn't a requirement so I used hibernate sessions (via spring). measwe

Re: problem uploading a text file

2009-09-04 Thread Rusty Wright
I make it a point to try and remember to click that red box to stop tomcat as soon as I'm done playing with it. My preferred steps (when I can remember) are: stop tomcat, edit files, click the build button and/or do a mvn package, click the Publish to server button for tomcat, then click the S

Re: how do you test your action classes?

2009-09-04 Thread Rusty Wright
I'm going to try the StrutsTestCase in struts2-junit-plugin; it looks like that may do the trick for me. Thanks everyone for their feedback and links. Greg Lindholm wrote: You probably should sure the mail archives (on Nabble) as this question come up very often. In fact it should be in a FAQ

Help requested

2009-09-04 Thread measwel
I installed convention plugin, moved pages to WEB-INF/content and removed my action mappings in xml. Linking to a page works. How do I read properties from an action or execute an action method? -- View this message in context: http://www.nabble.com/Basic-architecture-question-tp25293369p2530

Re: Checkbox and hidden field

2009-09-04 Thread Chris Pratt
You can either use a plain old (since you're using the simple theme anyway and the struts internal support won't work without the hidden field). Or you can edit the FreeMarker template in the simple theme. But both of these will kill Struts' ability to inject the proper value into your action f

Re: Checkbox and hidden field

2009-09-04 Thread Tommy Pham
- Original Message > From: pallav_bora > To: user@struts.apache.org > Sent: Friday, September 4, 2009 11:16:37 AM > Subject: Checkbox and hidden field > > > Hi I am using Struts 2.1.6 > > I am using simple theme. When I use a checkbox tag , a hidden field is > automatically iserted in

Re: problem uploading a text file

2009-09-04 Thread Tommy Pham
- Original Message > From: Bill Bohnenberger > To: Struts Users Mailing List > Sent: Friday, September 4, 2009 2:50:47 PM > Subject: Re: problem uploading a text file > > Well, I am the one who is confused, for sure. I restarted eclipse and now I > can upload *.txt files just fine with

Re: [S2] i18n for lists/maps

2009-09-04 Thread Tommy Pham
- Original Message > From: j alex > To: Struts Users Mailing List > Sent: Friday, September 4, 2009 12:48:43 PM > Subject: [S2] i18n for lists/maps > > Hi, > > Normally, we use the resource bundles to store Strings like field labels, > error messages etc. But how about things like drop

Re: problem uploading a text file

2009-09-04 Thread Bill Bohnenberger
Well, I am the one who is confused, for sure. I restarted eclipse and now I can upload *.txt files just fine with my original xml: bulkUpload.jsp Menu_init Login_init Arrg, this is not the first time Eclipse has refused to work properly in "hosted" mode until I re

Re: problem uploading a text file

2009-09-04 Thread Chris Pratt
I guess I don't understand why the interceptor would care what the content of the file is. It's only job is to inject the parameters into the action. (*Chris*) On Fri, Sep 4, 2009 at 1:24 PM, Bill Bohnenberger wrote: > Thanks, Chris, but I don't think that's the problem. I have another jsp > p

Re: problem uploading a text file

2009-09-04 Thread Bill Bohnenberger
Thanks, Chris, but I don't think that's the problem. I have another jsp page and associated action that uploads .jpg and .gif images ok with the same variables...the only difference is that I am tying to get the fileUpload interceptor to accept a *.txt file. (Sorry, I should've mentioned all this i

[S2] i18n for lists/maps

2009-09-04 Thread j alex
Hi, Normally, we use the resource bundles to store Strings like field labels, error messages etc. But how about things like dropdown display values ? . I need to i18n-ize an app that has a lot of such dropdowns and the lists are currently referenced like where dropdownmap is loaded into ServletCo

Re: problem uploading a text file

2009-09-04 Thread Chris Pratt
I believe the documentation is incorrect on the web. The setUpload doesn't take a File object, it takes a String that is the fully qualified path to the temporary file created by the internal upload support of struts. So what you actually need is: public void setUpload(String upload) {

problem uploading a text file

2009-09-04 Thread Bill Bohnenberger
Ok, I'm sure I must be doing something dumb here, but I can't seem to find it. I'm have a problem uploading a simple text file... when I try to a file named "test.txt", I get an action error message "File upload error: invalid data." and all my file variables (see below) are null when the action me

Checkbox and hidden field

2009-09-04 Thread pallav_bora
Hi I am using Struts 2.1.6 I am using simple theme. When I use a checkbox tag , a hidden field is automatically iserted in the final HTML. Please let me know how to get rid of this hidden field. I have given code sample below: Code in JSP: Code in HTML: Thanks Pallav -- View this messa

Re: how do you test your action classes?

2009-09-04 Thread phillips1021
Musachy: Is the JUnit code shown in the example on the Testing Actions wiki page missing some statements? For example I'm getting request cannot be resolved when I copy all this code into my Java IDE. Thanks for posting the information on the Struts 2 JUnit Plugin. I had not heard of it

Re: how do you test your action classes?

2009-09-04 Thread phillips1021
Greg: I wish I had found your code earlier.I made a minor change as the createActionProxy method signature your code used has been deprecated. I added your code and a test case that uses it to my example application (see: http://tinyurl.com/nw4jve http://tinyurl.com/nw4jve ). Th

Re: how do you test your action classes?

2009-09-04 Thread Musachy Barroso
I added a FAQ for it: http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=2853342 it points to the "Testing Actions" page. Feel free to edit that page and add more stuff to it. musachy On Fri, Sep 4, 2009 at 6:19 AM, Greg Lindholm wrote: > You probably should sure the mail archives (

Re: how do you test your action classes?

2009-09-04 Thread phillips1021
Rusty: I’m also researching how to best write unit tests for Struts 2 Action classes. Unit testing the business logic, service classes, etc that are outside the Struts 2 Action class is not the problem. The problem is unit testing the Action class that requires the Struts 2 framework and conf

Calling Struts action from JSP outside WEB-INF folder

2009-09-04 Thread Himstedt, Maik (EXTERN: T-Systems on)
Hi everybody, I need to call a Struts action (we use Struts 1.3) from a JSP but I keep getting an "Cannot retrieve mapping for action: "/maEdit" error. The JSP looks like ... the struts-config looks like The main problem is the web project's structure. We habe a Web Content folder, undern

getting results inside a panel of

2009-09-04 Thread Ignacio Enriquez Gutierre
Hi, I am quite new to struts. (I post this question in stackoverflow.com also without any answer yet... ) I have a sx:tabbedpanel with three s:divs inside of it. <sx:tabbedpanel id="mainContainer"> <sx:div label="View Files" cssStyle="height:200px;margin:20%;" href="ShowFiles.action">

Re: how do you test your action classes?

2009-09-04 Thread Wes Wannemacher
On Fri, Sep 4, 2009 at 9:19 AM, Greg Lindholm wrote: > You probably should sure the mail archives (on Nabble) as this question come > up very often. > In fact it should be in a FAQ but there is some disagreement as what > constitutes appropriate testing and what methods should be used. > > I've wri

RE: Strut2 Picture Upload question: Please Help!

2009-09-04 Thread Johannes Geppert
Hello Martin, did you take a look at the showcase? There are many examples for remote divs. Nice weekend Johannes mgainty wrote: > > > thanks for the info > > can you specify a div tag to receive results from action? > any ability to specify received format eg json/xml? > > danke, > Marti

Re: [OT] Re: AJAX issues in struts 2.1.6

2009-09-04 Thread Bhaarat Sharma
lol so mean On Fri, Sep 4, 2009 at 10:20 AM, Greg Lindholm wrote: > Martin Gainty wrote: > > > >> is struct2 a stealth apache project? > >> > > > > Yes; it's a bot-detection/mailing-list removal system. > > > > Dave > > > > > > > LOL . and he's outta here >

Re: [OT] Re: AJAX issues in struts 2.1.6

2009-09-04 Thread Greg Lindholm
Martin Gainty wrote: > >> is struct2 a stealth apache project? >> > > Yes; it's a bot-detection/mailing-list removal system. > > Dave > > > LOL . and he's outta here

[OT] Re: AJAX issues in struts 2.1.6

2009-09-04 Thread Dave Newton
Martin Gainty wrote: is struct2 a stealth apache project? Yes; it's a bot-detection/mailing-list removal system. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@st

Re: possible bug in v2.1.6 ??

2009-09-04 Thread Tommy Pham
- Original Message > From: Zoran Avtarovski > To: Struts Users Mailing List > Sent: Friday, September 4, 2009 3:29:27 AM > Subject: Re: possible bug in v2.1.6 ?? > > For what it¹s worth I was getting some strange results with included jspfs. > In my case it was the freemarker encoding t

Re: how do you test your action classes?

2009-09-04 Thread Greg Lindholm
You probably should sure the mail archives (on Nabble) as this question come up very often. In fact it should be in a FAQ but there is some disagreement as what constitutes appropriate testing and what methods should be used. I've written up this article [1] on how to unit test actions in the full

Re: Basic architecture question

2009-09-04 Thread Paweł Wielgus
Hi, just as a side note, i find convention plugin very useful, and i haven't find it in your description so i'm just recomending it. Best greetings, Paweł Wielgus. 2009/9/4 measwel : > > Dear all, > > I am trying to get a basic architecture off the ground for my webbapp > development work. I pla

Basic architecture question

2009-09-04 Thread measwel
Dear all, I am trying to get a basic architecture off the ground for my webbapp development work. I plan on using: struts 2.1.6 spring 2.5.6 tiles 2.0.6 hibernate 3 As I am early in the development work, I can still change everything at small cost. That is why I would like to ask for advice fro

Re: struts tiles warnings

2009-09-04 Thread measwel
If you put in on, there is a chance, you will get to see the same warnings. I just wonder, whether we can ignore them. It seems that it slows down the application. Paweł Wielgus wrote: > > Hi Marek, > i don't even know, > so if it's off by default i have it off. > > Best greetings, > Paweł Wie

RE: Strut2 Picture Upload question: Please Help!

2009-09-04 Thread Martin Gainty
thanks for the info can you specify a div tag to receive results from action? any ability to specify received format eg json/xml? danke, Martin __ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgeseh

Re: struts tiles warnings

2009-09-04 Thread Paweł Wielgus
Hi Marek, i don't even know, so if it's off by default i have it off. Best greetings, Paweł Wielgus. 2009/9/4 measwel : > > Yes, I have it, here is the complete file: > > > http://java.sun.com/xml/ns/javaee"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://

Re: struts tiles warnings

2009-09-04 Thread measwel
Yes, I have it, here is the complete file: http://java.sun.com/xml/ns/javaee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";> Site Made by M and M tilesDefini

Re: possible bug in v2.1.6 ??

2009-09-04 Thread Zoran Avtarovski
For what it¹s worth I was getting some strange results with included jspfs. In my case it was the freemarker encoding that was getting screwed up. What I found was if I included the <%@ page contentType="text/html;charset=UTF-8" language="java" %> tag at the head of my .jspf files it worked fine.

Re: Strut2 Picture Upload question: Please Help!

2009-09-04 Thread Johannes Geppert
Take a look at the showcase there are many sample for ajax form submits. http://www.weinfreund.de/struts2-jquery-showcase/ Echo: This form works also with an fileupload element. hisameer wrote: > > Thanks for your reply. Can you please put some sample code in this regard. > I

how do you test your action classes?

2009-09-04 Thread Rusty Wright
For example, how can I test the validations if I'm using an xml file with the validation specifications in it? Seems like there are a lot of moving parts around the invocation of the action classes that make testing hard. - To