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

2009-07-19 Thread musomesa
[The standard?diclaimer that it is not a popularity contest and nothing that does the job for you is wrong.] Would you not agree that if you are going to mock up the framework the simulation of S2 of highest fidelity is S2 itself. IMHO?you are digging a swimming pool by the ocean to test your

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

2009-07-19 Thread Paweł Wielgus
Hi all, [the standard disclaimer ... ;-) ] migrating from one version of struts to another is not a trouble for selenium or such a tool, actually it even helps You to be sure that the migration didn't break anything. But You will hit the same scale of problems when You will change layout - all

Re: Tags as template parameters?

2009-07-19 Thread Pascal
I just had a look at Sitemesh and it looks like what I want. There is one thing that disturbs me, though, it looks as if sitemesh will build the page every request, which causes quite some overhead, or am I mistaken there? Pascal On Fri, 17 Jul 2009 20:44:59 -0400, Wes Wannemacher

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

2009-07-19 Thread Dave Newton
Paweł Wielgus wrote: But You will hit the same scale of problems when You will change layout - all selenium tests are dead, I haven't really found that to be the case--I only rarely test deep structure with Selenium, but instead look for the presence of specific CSS selectors containing text

RE: Struts w/Ajax with Struts again

2009-07-19 Thread cpanon
Hi Martin Thanks, however I havnt migrate to Struts2 yet.  What I was hoping for was a technique to get all the session objects reprocessed upon return from the Ajax call.  I am unclear that if I do the mapping.getInputForward(), does that force tomcat to reprocess and the jsp reprocess all the

Re: Struts w/Ajax with Struts again

2009-07-19 Thread Nils-Helge Garli Hegvik
The form will not be updated unless you refresh the values or the part of the page that displays the values you want to be updated. So you would have to manually do this processing some returned updated values in a json result, or by returning the result of a partial jsp which re-renders the part

RE: Struts w/Ajax with Struts again

2009-07-19 Thread Martin Gainty
apologies as i thought you were uptodate on the latest version i assume you are implementing public ActionForward execute(ActionMapping mapping, ActionForm form, ServletRequest request, ServletResponse response)

Login mechanism - preserve Action parameters

2009-07-19 Thread mathias-ewald
Hi, a few days ago I implemented a login mechanism into my web application. Therefore I use an abstract BaseAction, that asks the implementing class wheter it want to be password protected or not. If it does and there's no object named user available the Login.jsp is shown. When the Login form

Re: Login mechanism - preserve Action parameters

2009-07-19 Thread Dave Newton
Have you considered using an interceptor for determining whether or not the user is logged in? Actions requiring login can be marked with an interface, annotation, etc. IMO this is a substantially cleaner architecture. I'd also *strongly* discourage tying your actions to Hibernate like this;

Re: Login mechanism - preserve Action parameters

2009-07-19 Thread mathias-ewald
Hi, newton.dave wrote: Have you considered using an interceptor for determining whether or not the user is logged in? Actions requiring login can be marked with an interface, annotation, etc. IMO this is a substantially cleaner architecture. Okay - I didn't really care about

Re: Struts w/Ajax with Struts again

2009-07-19 Thread cpanon
Hi Nils Martin Thanks and I am sorry about being obtuse and I hope you will continue to make this an edifying moment for me.  When I initially put up the form I code a value in the actionForm, myFormBean as myFormBean.setSeeMe(firstTime) and put into the session with

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

2009-07-19 Thread Paweł Wielgus
Hi Dave, when i record my tests with selenium ide, all click or assert alements takes various loactor addresses, very often they contain DOM paths, so when layout is changed from tables to divs, all these addresses are no longer valid. To present one simple example, when i record logout click on

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

2009-07-19 Thread Dave Newton
Paweł Wielgus wrote: Hi Dave, when i record my tests with selenium ide, all click or assert alements takes various loactor addresses, very often they contain DOM paths, so when layout is changed from tables to divs, all these addresses are no longer valid. On the rare occasions I use the IDE

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

2009-07-19 Thread Dimitrios Christodoulakis
Primarily for the sake of learning the inner mechanics of the struts2 framework, and unit testing, I took some time to study and experiment with the code published at: http://depressedprogrammer.wordpress.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/ When testing (junit 4) an action

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

2009-07-19 Thread Wes Wannemacher
On Sunday 19 July 2009 10:16:59 pm Dimitrios Christodoulakis wrote: 2) If one with general knowledge of servlets jsp wants to dive into the struts2 source code, to get better understanding of the basic mechanics, what would be the starting point? So should I start lets say with the