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

2009-08-07 Thread Dimitrios Christodoulakis
arker or > velocity for the results, or the experimental JSP plugin: > > http://cwiki.apache.org/S2PLUGINS/embedded-jsp-plugin.html > > musachy > > On Tue, Jul 21, 2009 at 2:26 PM, Dimitrios > Christodoulakis wrote: >>> >>> In your code below, where you say // a

Re: studying struts2 framework, ActionInvocation question

2009-07-24 Thread Dimitrios Christodoulakis
4, 2009 at 11:14 AM, Dimitrios Christodoulakis wrote: > I plan to unit test the interceptor on its own. I am more interested > in testing its logic, not necessarily within the framework. > > First step would be to mock an ActionInvocation object which is what > is passed to the Inter

Re: studying struts2 framework, ActionInvocation question

2009-07-24 Thread Dimitrios Christodoulakis
usachy > > On Fri, Jul 24, 2009 at 6:31 AM, Dimitrios > Christodoulakis wrote: >> I tried to logically trace the flow within the framework and wanted to >> check if my thoughts are correct here, while at the same time asking a >> few more questions: >> >>

Re: studying struts2 framework, ActionInvocation question

2009-07-24 Thread Dimitrios Christodoulakis
method of my custom Interceptor, but is it true to assume that to prepare for the test I'd probably need to create a lot of dependencies manually? i.e. Create mock objects all the way deep to DefaultActionProxyFactory? Many thanks again for your help. On Thu, Jul 23, 2009 at 5:37 PM, Dave

Re: studying struts2 framework, ActionInvocation question

2009-07-23 Thread Dimitrios Christodoulakis
t in the constructor of my >> intercept(ActionInvocation actionInvocation) method, possibly won't >> show me much, right? I have yet to try it, but this was just a >> thought. >> >> On Wed, Jul 22, 2009 at 8:59 PM, Musachy Barroso wrote: >> > an easier way, i

Re: studying struts2 framework, ActionInvocation question

2009-07-23 Thread Dimitrios Christodoulakis
chy > > On Wed, Jul 22, 2009 at 6:23 PM, Dimitrios > Christodoulakis wrote: >> Thanks Dave and Martin. I learn something new every time! >> >> I was able to attach the source to struts2-core-2.1.6.jar and >> xwork-2.1.2.jar by first downloading the source code and poi

Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dimitrios Christodoulakis
Thanks Dave and Martin. I learn something new every time! I was able to attach the source to struts2-core-2.1.6.jar and xwork-2.1.2.jar by first downloading the source code and pointing to the it from within eclipse. project->right click->properties->Java build path->Libraries->select jar->Source

Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dimitrios Christodoulakis
Dave Newton wrote: > > Won't help track action invocation initialization, methinks. > Is there a particular way you would recommend to go about doing it actually? I am using eclipse for my ide, but I am not sure if breakpoints can trace through the compiled classes in the jars. Much appreciate th

Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dimitrios Christodoulakis
vocation instantiation should be coming shortly after that. On Wed, Jul 22, 2009 at 4:17 PM, Musachy Barroso wrote: > The best way to find out all these things is to put breakpoints in the > constructor and/or the setter methods. > > musachy > > On Wed, Jul 22, 2009 at 2:05 PM, Dimitri

studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dimitrios Christodoulakis
Hello, According to the XWork feature description, http://www.opensymphony.com/xwork/wikidocs/XWork%20Features.html, the ActionInvocation represents the execution state of an action holding the action instance and the interceptors. I have been looking at http://struts.apache.org/2.1.6/struts2-cor

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

2009-07-21 Thread Dimitrios Christodoulakis
mple code, and the discussions on this thread! On Tue, Jul 21, 2009 at 3:31 PM, Haroon Rafique wrote: > On Today at 2:02pm, DC=>Dimitrios Christodoulakis wrote: > > DC> [..snip..] > DC> > DC> The CONFIG_LOCATIONS is used to initialize the servletContext which in >

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

2009-07-21 Thread Dimitrios Christodoulakis
s are appreciated. Regards. On Mon, Jul 20, 2009 at 5:02 PM, Haroon Rafique wrote: > On Today at 4:32pm, DC=>Dimitrios Christodoulakis wrote: > > DC> Thanks Haroon for the handy advice. That seems to do the trick as far > DC> as the session object is concerned. The test pass

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

2009-07-20 Thread Dimitrios Christodoulakis
it comes which test strategy to take, or which >> tool to use. As a learner, I found it very useful to experiment with >> that code. >> >> I haven't tried Selenium yet, but I would be interested to see how it >> catches the same errors in the same test cases. &g

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

2009-07-20 Thread Dimitrios Christodoulakis
d to see how it catches the same errors in the same test cases. On Mon, Jul 20, 2009 at 5:02 PM, Haroon Rafique wrote: > On Today at 4:32pm, DC=>Dimitrios Christodoulakis wrote: > > DC> Thanks Haroon for the handy advice. That seems to do the trick as far > DC> as the session obje

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

2009-07-20 Thread Dimitrios Christodoulakis
you would suggest I start with? Also, many thanks to Wes, for pointing out a good starting point for understanding Struts2 at a deeper level by examining the code! Regards to all. On Mon, Jul 20, 2009 at 9:26 AM, Haroon Rafique wrote: > On Yesterday at 9:16pm, DC=>Dimitrios Christodo

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 i

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-16 Thread Dimitrios Christodoulakis
eaked for Spring but you > are welcome to use this as a starting point. > > This gives me a lot of flexibility for testing, sometimes I test against an > actual database (with hibernate) and sometimes I mock the services that the > actions use. > > > > On Thu, Jul 16, 2009 at 10:

unit testing Struts2 application (with Spring and Hibernate)

2009-07-16 Thread Dimitrios Christodoulakis
Hello, I was hoping to hear the community's views about unit testing a Struts2 application which is integrated with Spring and Hibernate. My plan is to unit test the actions with the framework's interceptors running, rather than each action class in a stand-alone isolated fashion. What approach d

Re: updating or deleting a component from a collection through display tag

2009-07-13 Thread Dimitrios Christodoulakis
           this.mark = mark; >>        } >> } >> >> Is there something wrong with the code above? Thanks again! >> >> On Mon, Jul 13, 2009 at 2:03 PM, Musachy Barroso wrote: >>> The current row used by displaytag is pushed under the name set in >>&g

Re: updating or deleting a component from a collection through display tag

2009-07-13 Thread Dimitrios Christodoulakis
y Barroso wrote: > The current row used by displaytag is pushed under the name set in > uid, so you could do this: > > > > > >   > ">Remove > > > musachy > > On Mon, Jul 13, 2009 at 11:17 AM, Dimitrios > Christodoulakis wrote: >> Thanks.

Re: updating or deleting a component from a collection through display tag

2009-07-13 Thread Dimitrios Christodoulakis
: > The current row used by displaytag is pushed under the name set in > uid, so you could do this: > > > > > >   > ">Remove > > > musachy > > On Mon, Jul 13, 2009 at 11:17 AM, Dimitrios > Christodoulakis wrote: >> Thanks. So, if I want

Re: updating or deleting a component from a collection through display tag

2009-07-13 Thread Dimitrios Christodoulakis
ot; (or "#attr['entry']")  to access it from > the S2 tags. > > musachy > > On Mon, Jul 13, 2009 at 10:27 AM, Dimitrios > Christodoulakis wrote: >> Yes, that is exactly the case, hmm.. Although, how is the >> display:table tag finds the collection in

Re: updating or deleting a component from a collection through display tag

2009-07-13 Thread Dimitrios Christodoulakis
gt; iterator. > > And I don't know anything about so you will need to look up > how to access the properties of the entities you are iterating over so as to > build the URL. > > > On Mon, Jul 13, 2009 at 12:28 PM, Dimitrios Christodoulakis < > dimi@gmail.com> wrote:

Re: updating or deleting a component from a collection through display tag

2009-07-13 Thread Dimitrios Christodoulakis
mark to just mark and remove the > . Also you probably don't need to pass both > the name and id of the parent object. > > >       >       >   > ">Remove > > > On Mon, Jul 13, 2009 at 10:48 AM, Dimitrios Christodoulakis < > dimi@gmail.com&

Re: updating or deleting a component from a collection through display tag

2009-07-13 Thread Dimitrios Christodoulakis
Thanks for the comments Martin, I will try it out! On Mon, Jul 13, 2009 at 9:46 AM, Martin Gainty wrote: > > @Table(name = "TableNameGoesHere") > > //the java file would use ForeignKey annotation as described > @org.hibernate.annotations.ForeignKey(name = "FK_GOALTOACHIEVE_ID") > > public class Wi

Re: updating or deleting a component from a collection through display tag

2009-07-13 Thread Dimitrios Christodoulakis
> have changed your object and the jsp you had better include them with any > request. > > > On Mon, Jul 13, 2009 at 9:51 AM, Dimitrios Christodoulakis < > dimi@gmail.com> wrote: > >> Yes, that is a great suggestion actually. What I did was to add a new >> fi

Re: updating or deleting a component from a collection through display tag

2009-07-13 Thread Dimitrios Christodoulakis
Yes, that is a great suggestion actually. What I did was to add a new field based System.currentTimeMillis(), but the problem is adding it as a url parameter. For example, I am trying to add it as a url parameter below: ">Edit But, the only param passed is the fullName. The mark is not added

Re: updating or deleting a component from a collection through display tag

2009-07-13 Thread Dimitrios Christodoulakis
Thanks for the reply. Well, entry is an instance of a separate class: @Embeddable public class JournalEntry { @org.hibernate.annotations.Parent private GoalToAchieve goalToAchieve; @Column(length = 255, nullable = false) private String entry; @Temporal(TemporalType

Re: problem with deleting objects from a collection

2009-07-13 Thread Dimitrios Christodoulakis
the valuestack that way? Would you say this is a valid strategy? This has been troubling me for a few days, so I hope it is alright to post my new thought on this. Thank you for any new input. On Sun, Jul 12, 2009 at 5:16 PM, Dimitrios Christodoulakis wrote: > Thanks Dave, > > Yes, t

Re: problem with deleting objects from a collection

2009-07-12 Thread Dimitrios Christodoulakis
ameter is not added to the url. Am I doing this wrong, or is there another way before switching to entities? Thanks again. On Sun, Jul 12, 2009 at 5:03 PM, Dave Newton wrote: > Dimitrios Christodoulakis wrote: >> >> I tried adding one more column like this, hoping the entry property

Re: problem with deleting objects from a collection

2009-07-12 Thread Dimitrios Christodoulakis
le = false) private String entry; @Temporal(TemporalType.TIMESTAMP) @Column(nullable = false, updatable = false) private Date insertDate = new Date(); plus the appropriate getters and setters.. On Sun, Jul 12, 2009 at 5:03 PM, Dave Newton wrote: > Dimitrios Ch

problem with deleting objects from a collection

2009-07-12 Thread Dimitrios Christodoulakis
Good afternoon, I am re-stating a problem I am facing, for which I provided a kind of complicated description before: Deleting objects from a collection. The owning, parent object is a hibernate persistent entity, which contains a collection of components (value-type objects). Such components don'

Re: reachable valuestack properties exposed by previous actions?

2009-07-12 Thread Dimitrios Christodoulakis
Appreciate the warning. Thanks, I'll try to avoid that then. Alright, I'll take the chance to re-state my problem in a new thread. On Sun, Jul 12, 2009 at 11:15 AM, Dave Newton wrote: > Dimitrios Christodoulakis wrote: >> >> Thanks for the warning. Actually, I thoug

Re: reachable valuestack properties exposed by previous actions?

2009-07-12 Thread Dimitrios Christodoulakis
: > Dimitrios Christodoulakis wrote: >> >> Thanks, I will look into action chaining and see if it can help me in >> this situation. > > Oh, please don't; it just leads to maintenance nightmares. > > Dave > >

Re: reachable valuestack properties exposed by previous actions?

2009-07-12 Thread Dimitrios Christodoulakis
Thanks, I will look into action chaining and see if it can help me in this situation. On Sun, Jul 12, 2009 at 8:22 AM, Dave Newton wrote: > Dimitrios Christodoulakis wrote: >> >> This is a quick question that I am having, more on the theory side. >> So, what happens to prop

reachable valuestack properties exposed by previous actions?

2009-07-12 Thread Dimitrios Christodoulakis
Hello, This is a quick question that I am having, more on the theory side. So, what happens to properties exposed on the valuestack by some action which was called in the past, meaning the application workflow has progressed and other actions were called after that. Is that property somehow still

updating or deleting a component from a collection through display tag

2009-07-11 Thread Dimitrios Christodoulakis
Hello list, I have successfully used the display tag to iterate over a collection which is exposed in an action class. On each row in addition to the columns displaying the fields of each object in the collection, I embed two more struts-tag urls: Update and Remove. The objective is to have an ex

Re: "Nothing found to display" from display tag with struts 2

2009-07-11 Thread Dimitrios Christodoulakis
without the s:set tag? > > > > Dimitrios Christodoulakis wrote: >> >> Hello list, >> >> I am exposing a collection called "entries" in my action class >> (Set entries;), with all the appropriate getters and >> setters. In the result jsp of th

"Nothing found to display" from display tag with struts 2

2009-07-11 Thread Dimitrios Christodoulakis
Hello list, I am exposing a collection called "entries" in my action class (Set entries;), with all the appropriate getters and setters. In the result jsp of this action I am using the display tag to output the content of the collection:

Re: compatibility of various versions Tomcat, jdk, and struts2

2009-07-02 Thread Dimitrios Christodoulakis
work very well. > > Again though, if you haven't looked at maven, I strongly suggest you > do so, learning maven will vastly speed up your dev time. > > -Wes > > > On Thu, Jul 2, 2009 at 8:57 AM, Dimitrios > Christodoulakis wrote: >> Thanks Wes, >> &

Re: compatibility of various versions Tomcat, jdk, and struts2

2009-07-02 Thread Dimitrios Christodoulakis
very glad to use the latest struts2,spring and hibernate with the slightly older jdk and tomcat. Thanks for your answer. On Wed, Jul 1, 2009 at 10:00 PM, Wes Wannemacher wrote: > On Wednesday 01 July 2009 21:56:17 Dimitrios Christodoulakis wrote: >> Hello, >> >> while doing d

compatibility of various versions Tomcat, jdk, and struts2

2009-07-01 Thread Dimitrios Christodoulakis
Hello, while doing development I am conforming to the versions provided by our hosting service. I am trying to select the most suitable version of the framework, java and tomcat so, just wanted to ask if there are known compatibility issues with the following combination: Fixed: jdk1.5.0_17 Tomca

Re: deploying struts2 at godaddy dedicated server - general question

2009-06-21 Thread Dimitrios Christodoulakis
I am sure it could be > optimized for better performance, but I like to stick to simple over > premature optimization. I am on my BlackBerry, so when I boot up my > laptop I can send an example config. > -W > > On 6/21/09, Dimitrios Christodoulakis wrote: > > It seems that i

Re: deploying struts2 at godaddy dedicated server - general question

2009-06-21 Thread Dimitrios Christodoulakis
21, 2009 at 12:09 PM, Dimitrios Christodoulakis < dimi@gmail.com> wrote: > > Thanks for the input. I'll test it locally under 5.5. and will dig deeper in the logs and see what I can find. I will let you know. > > Appreciate the insight. > > On Sun, Jun 21, 2009 at 11:0

Re: deploying struts2 at godaddy dedicated server - general question

2009-06-21 Thread Dimitrios Christodoulakis
gt; was a belief for a while that httpd should serve static content and > tomcat serve jsps only. But any more I find tomcat's performance to be > good enough to serve the static content as well. > > On 6/21/09, Dave Newton wrote: > > Dimitrios Christodoulakis wrote: > >

deploying struts2 at godaddy dedicated server - general question

2009-06-21 Thread Dimitrios Christodoulakis
Hello everyone, I am having some issues deploying a struts2 application at godaddy and was wondering if anyone has dealt with something similar in the past. The application runs fine on my local machine with tomcat 6.0. My next step was to upload and deploy at godaddy dedicated server which is run

Re: trouble retrieving a request parameter with struts2 tags

2009-06-07 Thread Dimitrios Christodoulakis
0 >> Subject: Re: trouble retrieving a request parameter with struts2 tags >> From: dimi@gmail.com >> To: user@struts.apache.org >> >> With a little bit more searching I found the escapeAmp attribute of >> the tag. That did the trick: >> >> >> &

Re: trouble retrieving a request parameter with struts2 tags

2009-06-06 Thread Dimitrios Christodoulakis
With a little bit more searching I found the escapeAmp attribute of the tag. That did the trick: Thanks! On Sat, Jun 6, 2009 at 10:41 AM, Dimitrios Christodoulakis wrote: > Thank you for the information. That ofnl expression actually worked. > The textfield is populated with the value

Re: trouble retrieving a request parameter with struts2 tags

2009-06-06 Thread Dimitrios Christodoulakis
the jsp code? The actual action ode works ok, I believe the issue is within that jsp only. Again, I appreciate any further advice on this. Regards to everyone. On Fri, Jun 5, 2009 at 9:32 PM, Dave Newton wrote: > Dimitrios Christodoulakis wrote: >> >> > > I told you #attr.

trouble retrieving a request parameter with struts2 tags

2009-06-05 Thread Dimitrios Christodoulakis
Hello, I am building a struts2-hibernate-mysql application. A user after navigating through some pages reaches a pages where all the records on the database are listed and can perform crud operations. The jsp which iterates and displays the records is: <%@ taglib prefix="s" uri="/struts-tags"%>