Re: struts 2 adoption/performance/scalability

2009-07-17 Thread Wes Wannemacher
On Thursday 16 July 2009 07:12:25 pm Musachy Barroso wrote: I am trying to sell the idea of using Struts 2 to my employer, and I know these questions will come up: 1. Who is using it? 2. How does it perform, compared to plain servlets and jsps? 3. How well does it scale? 4. Has anyone

RE: Freemarker and Select Tag

2009-07-17 Thread Nitesh Jain
Hi Robin, Select tag expects an list object in the list attribute but in your case you are providing an Map that's why it is not behaving correctly. I suggest create an object called UserType with two fields id and name. And put these objects into a list (lets say usertypes). Now use

Re: in JSP: rounding values

2009-07-17 Thread Lukasz Lenart
2009/7/17 mathias-ewald nitehoax...@gmx.net: I want to round a value during an interation: Maybe it will be better to prepare a list on server side with rounded values and iterate over them? Regards -- Lukasz http://www.lenart.org.pl/ http://dailylog.lenart.org.pl/ Pablo Picasso - Computers

RE: Login with Struts2

2009-07-17 Thread Nitesh Jain
Hi, I have also implemented login mechanism but I have used Servlet filter to check the user login status. I have applied filer on the restricted URI of my application by just a small configuration in web.xml. Regards, Nitesh Jain -Original Message- From: Robin Mannering

Re: in JSP: rounding values

2009-07-17 Thread mathias-ewald
I don't think so - I want the exact value to be shown, too, so it's more a UI thing. Lukasz Lenart wrote: 2009/7/17 mathias-ewald nitehoax...@gmx.net: I want to round a value during an interation: Maybe it will be better to prepare a list on server side with rounded values and iterate

Re: Setter in action triggers twice. Bug?

2009-07-17 Thread Ritvars Rundzāns
Ok, this is all great, but problem still is not solved. You can see configs provided @ war. I will put this simple: My app`s config is taken from struts-blank, so its minimal, and there are no explicit changes in interceptor stack for any of actions. Why this crap happens then? I really dont care

Re: unit testing Struts2 application (with Spring and Hibernate)

2009-07-17 Thread Paweł Wielgus
Hi all, while i do selenium tests and i do prefer it for integration tests, i'm feeling obligated to point out one disadvantage, while being very easy and fun to write or record, they tend to take a lot more time to run in comparison to unit tests. My case is tons of selenium tests which takes

Re: unit testing Struts2 application (with Spring and Hibernate)

2009-07-17 Thread musomesa
JWebUnit integrates? nicely with eclipse. I fall in the?'unit tests are for small? units' group. If your validation is configured wrong you won't fix it in the action so you are not really unit testing the action at that point. I prefer separate JUnit unit tests and JWebUnit tests to test the

Re: in JSP: rounding values

2009-07-17 Thread Lukasz Lenart
2009/7/17 mathias-ewald nitehoax...@gmx.net: I don't think so - I want the exact value to be shown, too, so it's more a UI thing. As you thing, but that's the business logic and even such simple operation shouldn't be performed in UI. Maybe it will be simpler to create TransferObject with

Re: in JSP: rounding values

2009-07-17 Thread mathias-ewald
Okay, it was just my understanding of the whole thing. I will do as you suggested. cu Lukasz Lenart wrote: 2009/7/17 mathias-ewald nitehoax...@gmx.net: I don't think so - I want the exact value to be shown, too, so it's more a UI thing. As you thing, but that's the business logic and

Working with dynamic forms

2009-07-17 Thread mathias-ewald
Hi, I have a Category business object looking like this: -- public class Category { private Category parent; private SetCategory children; //... } -- I have a form that allows me to edit in information about a

Re: in JSP: rounding values

2009-07-17 Thread Lukasz Lenart
2009/7/17 mathias-ewald nitehoax...@gmx.net: Okay, it was just my understanding of the whole thing. I will do as you suggested. It even will be faster than searching for some strange solution with Struts2 Tags ;-) Regards -- Lukasz http://www.lenart.org.pl/ http://dailylog.lenart.org.pl/

[S1.3.10] Apache Tiles fail

2009-07-17 Thread Struts Two
I have been trying to start a new project using struts 1.3.10 on Websphere V6.1. However, I have been unable to make tiles work with struts 1.3 . I get an exception as follows: Stack Dump = java.io.FileNotFoundException: mainPage .. I have downgraded to strtus 1.2.9 and everything is

Re: [S1.3.10] Apache Tiles fail

2009-07-17 Thread Antonio Petrelli
2009/7/17 Struts Two struts...@yahoo.ca: I have been trying to start a new project using struts 1.3.10 on Websphere V6.1. However, I have been unable to make tiles work with struts 1.3 . I get an exception as follows: Stack Dump = java.io.FileNotFoundException: mainPage See:

Re: Plug-in creation and freemarker page location

2009-07-17 Thread stanlick
I am using the leading / and it still seems to be using the namespace! I renamed the ftl folder pages to be config to match the namespace, and it works fine. Is there another way? I originally tried with and without the leading slash and ultimately had to make this change to get it to work. I

struts 2.1.5 type conversion error

2009-07-17 Thread Sandy.Verfaille
Hi, I have made a simple struts form s:form action=addProduct method=post validate=true Name nls:textfield name=nameNl / prices:textfield name=price value=/ /s:form And an action class with getters and setters for nameNl and price. When I submit my form, with a price 0, for example 3,

Help with a redirect

2009-07-17 Thread Security Management
When my index page loads, ajax requests are posted to the statusAjax page with a parameter of door.id equal to x for the doors. That works fine, and is a POST. When I click on an icon, it posts to the identical action, to either lock or unlock. When the action is done, I redirect to the status

Re: Blocked trying to get lock: org.apache.log4j.spi.RootLogger

2009-07-17 Thread laredotornado
Here is my contribution to the good of humanity. The below problem went away when we increased the number of file descriptors available to our WebLogic managic server process from 1024 to 65K. - Dave laredotornado wrote: Hi, We are using WebLogic 9.2.2 with Java 1.5. The application is

Re: struts 2 adoption/performance/scalability

2009-07-17 Thread Jim Kiley
I don't have any benchmark numbers, but we're using it in production at my current client, running a b2b ecommerce site with about 3,000 active customers that pushed through about 4,000 orders in the last month. jk On Thu, Jul 16, 2009 at 7:12 PM, Musachy Barroso musa...@gmail.com wrote: I am

Re: [S1.3.10] Apache Tiles fail

2009-07-17 Thread Struts Two
Antonio: Thank you for the url, I was missing the tiles config. It would be great if information related to struts 1.3 is put under user guide for struts 1.3 as I started with 1.3.10 blank.war. Once again, thanks for the url. --- On Fri, 7/17/09, Antonio Petrelli antonio.petre...@gmail.com

Re: Setter in action triggers twice. Bug?

2009-07-17 Thread Musachy Barroso
you are confusing static parameters with request parameters. You *do not* need to add param to your action mapping to get the parameters bound the class fields. You add param to your action mapping to inject things into your action, IoC style, but is is not needed for request parameters. So if you

RE: unit testing Struts2 application (with Spring and Hibernate)

2009-07-17 Thread Andy
Couldn't agree more. From: w...@wantii.com To: user@struts.apache.org Subject: Re: unit testing Struts2 application (with Spring and Hibernate) Date: Thu, 16 Jul 2009 21:59:35 -0400 On Thursday 16 July 2009 07:14:30 pm Dave Newton wrote: IMO that's outside the purview of unit

RE: Help with a redirect

2009-07-17 Thread Security Management
OK, tried adding the parse param, and still no luck... action name=unlock class=com.secmgmt.struts2.actions.door_control.DoorControlUnlockDoor result name=success type=redirectAction param name=actionNamestatusAjax/param

Re: Setter in action triggers twice. Bug?

2009-07-17 Thread Ritvars Rundzāns
action name=person-*-* class=example.Person param name=cmd{1}/param param name=id{2}/param resultjsp/abc.jsp/result /action You *do not* need to add param to your action mapping to get the parameters bound the class fields. I understand

Re: Setter in action triggers twice. Bug?

2009-07-17 Thread Musachy Barroso
Ok I see it now. The staticparams interceptor adds the params to the request params map, so that would explain why it is called again. We could add a setting to the result to prevent this if needed. musachy On Fri, Jul 17, 2009 at 10:18 AM, Ritvars Rundzānsrrundz...@gmail.com wrote:        

Re: unit testing Struts2 application (with Spring and Hibernate)

2009-07-17 Thread Greg Lindholm
IMO that's outside the purview of unit testing, though--by definition this describes integration testing: the testing of an action along with the framework. There's nothing *wrong* with doing that testing, I just don't think it's the same thing as unit testing: independently

Re: unit testing Struts2 application (with Spring and Hibernate)

2009-07-17 Thread Wes Wannemacher
On Fri, Jul 17, 2009 at 2:00 PM, Greg Lindholmgreg.lindh...@gmail.com wrote: Not to pick on anyone but this isn't really a popularity contest. Different situations have different needs and there is no reason to suggest that one solution will work best for everyone. Greg, I didn't want it to

Re: unit testing Struts2 application (with Spring and Hibernate)

2009-07-17 Thread Dimitrios Christodoulakis
Of course you're right Greg, it's not a contest... no right or wrong here. I am glad to hear all the views coming from everyone and commiters too. Well, my original motivation was to learn how to do this kind of tip-to-tail, all inclusive testing, with the interceptor stack involved. For example

Re: unit testing Struts2 application (with Spring and Hibernate)

2009-07-17 Thread Wes Wannemacher
On Fri, Jul 17, 2009 at 2:28 PM, Dimitrios Christodoulakisdimi@gmail.com wrote: [snip] Just a quick question to Wes: In your upcoming book, which is in the MEAP phase, there is an appendix titled Unit testing with JUnit and TestNG . Is there any plan to include some examples describing the

Re: Struts2 + JPA - Lazy Initialization During View Generation

2009-07-17 Thread Nathan Schulte
So is this the only resolution out there? To lazily initialize the contents I know I'll need before the container decides to trash the persistence context? There is no way to extend the context such that the lazy initialization will work when rendering the view?

Re: Struts2 + JPA - Lazy Initialization During View Generation

2009-07-17 Thread Jim Kiley
I think I missed the early part of the discussion -- I assume that the OpenEntityManagerInViewFilter is not the solution for you? jk On Fri, Jul 17, 2009 at 2:53 PM, Nathan Schulte nathan.schu...@ngc.comwrote: So is this the only resolution out there? To lazily initialize the contents I know

Re: Setter in action triggers twice. Bug?

2009-07-17 Thread Dale Newfield
Musachy Barroso wrote: Ok I see it now. The staticparams interceptor adds the params to the request params map, so that would explain why it is called again. We could add a setting to the result to prevent this if needed. I would argue that each of {staticP,actionMappingP,p}arams should both

Re: Struts2 + JPA - Lazy Initialization During View Generation

2009-07-17 Thread Nathan Schulte
Jim Kiley jhkiley at summa-tech.com writes: I assume that the OpenEntityManagerInViewFilter is not the solution for you? I'm not using Spring. As such, I'm not familiar with this filter, but from the description, yes, that is what is needed. However, the app server manages the transactions,

Re: Struts2 + JPA - Lazy Initialization During View Generation

2009-07-17 Thread Wes Wannemacher
http://struts.apache.org/2.x/docs/non-ioc-version-of-opensessioninviewinterceptor.html This is not exactly what you want, and it's based on Hibernate and a hibernate session, but if you think of hibernate sessions as jpa EMs, then you can just make the appropriate changes to this and at least be

Re: Struts2 + JPA - Lazy Initialization During View Generation

2009-07-17 Thread Nathan Schulte
Wes Wannemacher wesw at wantii.com writes: This is not exactly what you want, and it's based on Hibernate and a hibernate session, but if you think of hibernate sessions as jpa EMs, then you can just make the appropriate changes to this and at least be further than you are now. Thanks Wes, I

Re: Setter in action triggers twice. Bug?

2009-07-17 Thread Musachy Barroso
We cant change it because it would break backward compatibility. I added a merge parameter to the static parameters interceptor(defaults to true): http://jira.opensymphony.com/browse/XW-709 fixed in xwork trunk. Thanks for reporting! musachy On Fri, Jul 17, 2009 at 12:02 PM, Dale

Tags as template parameters?

2009-07-17 Thread Pascal
Hello list, in Struts2 it is possible to do something like html body s:myMainNavigationMenu / h1A page/h1 pSome content/p /body /html This works ok, but my problem is that I have to change every single page, if i would like to have a custom footer for every page, for example. Now my

null and zero issue

2009-07-17 Thread Russo, Joe
I know this may not be the appropriate group to send this, but I think this is a general issue that I am not aware of and this group is active and thought I'd give it a shot. I wrote a web service component using JAX-WS API and deployed on JBoss 5.0.1 application server. And also, wrote a Soap

Ghostly exception

2009-07-17 Thread Peter Bliznak
Hi folk, noticed few days ago app is throwing following exception but everything is working fine I see no problems whatsoever. But obviously I would be happier camper if I had clean runs. All ideas welcome. Almost forgot running S_2.1.6 on WebShpere 6.1. Peter. [17/07/09 16:32:06:747 EDT]

Re: Struts2 + JPA - Lazy Initialization During View Generation

2009-07-17 Thread Nathan Schulte
Nathan Schulte nathan.schulte at ngc.com writes: I'll let you know what I come up with. Well, I was able to get this to work. The interceptor is placed on the end of the stack, although it's location oughtn't matter. Also, it is placed on the stack for _all_ actions. I'm not sure if this is a

Re: Help with a redirect

2009-07-17 Thread Dave Newton
Is it actually not being set on the action, or is this just the normal log message for parameters that don't exist in the result? Dave Security Management wrote: OK, tried adding the parse param, and still no luck... action name=unlock

Re: null and zero issue

2009-07-17 Thread Dave Newton
Russo, Joe wrote: I know this may not be the appropriate group to send this, but I think this is a general issue that I am not aware of and this group is active and thought I'd give it a shot. Wouldn't a web service list/forum be a better bet? Dave

Re: Tags as template parameters?

2009-07-17 Thread Wes Wannemacher
I'm on my phone so I only skimmed your message. If I read correctly, you should take a look at sitemesh. -W On 7/17/09, Pascal pas...@voidmage.net wrote: Hello list, in Struts2 it is possible to do something like html body s:myMainNavigationMenu / h1A page/h1 pSome content/p

Struts w/Ajax with Struts again

2009-07-17 Thread cpanon
Hello I am able to use an Ajax call to a struts action and with getInputForward() get the get the data back.  (With prototpye and json, very, very elegant).  I am now realizing that I have cases where I want to reprocess all components, i.e. I want the actionForm to be updated and the jsp