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%

Re: trouble retrieving a request parameter with struts2 tags

2009-06-06 Thread Dimitrios Christodoulakis
, or do I have something wrong in 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 Newtonnewton.d...@yahoo.com wrote: Dimitrios Christodoulakis wrote

Re: trouble retrieving a request parameter with struts2 tags

2009-06-06 Thread Dimitrios Christodoulakis
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 Newtonnewton.d...@yahoo.com wrote: Dimitrios Christodoulakis wrote: s:hidden name=person.id value

Re: trouble retrieving a request parameter with struts2 tags

2009-06-07 Thread Dimitrios Christodoulakis
...@yahoo.com wrote: Dimitrios Christodoulakis wrote: s:hidden name=person.id value=#attr.id label=Primary Key / I told you #attr.id on javaranch; I meant #parameters. This information is readily available via the S2 docs. [1, 2] IIRC the value attribute expects a literal; I'd wrap

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

Re: deploying struts2 at godaddy dedicated server - general question

2009-06-21 Thread Dimitrios Christodoulakis
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 newton.d...@yahoo.com wrote: Dimitrios Christodoulakis wrote: I am having some issues deploying

Re: deploying struts2 at godaddy dedicated server - general question

2009-06-21 Thread Dimitrios Christodoulakis
, 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:00 AM, Wes Wannemacher w...@wantii.com wrote: I'm with dave

Re: deploying struts2 at godaddy dedicated server - general question

2009-06-21 Thread Dimitrios Christodoulakis
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 dimi@gmail.com wrote: It seems that indeed the filters are not starting properly: The catalina.out

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

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

2009-07-02 Thread Dimitrios Christodoulakis
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 Wannemacherw...@wantii.com wrote: On Wednesday 01 July 2009 21:56:17 Dimitrios Christodoulakis wrote: Hello, while doing development I am

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

2009-07-02 Thread Dimitrios Christodoulakis
2009 21:56:17 Dimitrios Christodoulakis wrote: 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

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 (SetJournalEntry 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: s:set name=entries value=entries scope=request/

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 (SetJournalEntry 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

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

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

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 Newtonnewton.d...@yahoo.com wrote: Dimitrios Christodoulakis wrote: This is a quick question that I am having, more on the theory side. So, what happens to properties

Re: reachable valuestack properties exposed by previous actions?

2009-07-12 Thread Dimitrios Christodoulakis
...@yahoo.com wrote: 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 - To unsubscribe, e-mail

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 Newtonnewton.d...@yahoo.com wrote: Dimitrios Christodoulakis wrote: Thanks for the warning. Actually, I thought it might

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

Re: problem with deleting objects from a collection

2009-07-12 Thread Dimitrios Christodoulakis
wrote: Dimitrios Christodoulakis wrote: I tried adding one more column like this, hoping the entry property will be available to the DeleteEntry action via the mini-form. display:column s:form action=DeleteEntry    s:property value=entry/    s:hidden name=id value=%{goalToAchieve.id

Re: problem with deleting objects from a collection

2009-07-12 Thread Dimitrios Christodoulakis
switching to entities? Thanks again. On Sun, Jul 12, 2009 at 5:03 PM, Dave Newtonnewton.d...@yahoo.com wrote: Dimitrios Christodoulakis wrote: I tried adding one more column like this, hoping the entry property will be available to the DeleteEntry action via the mini-form. display:column

Re: problem with deleting objects from a collection

2009-07-13 Thread Dimitrios Christodoulakis
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 Newtonnewton.d...@yahoo.com wrote: Dimitrios

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;

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: a href=s:url action='UpdateEntryForm' s:param name=name

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

2009-07-13 Thread Dimitrios Christodoulakis
, Greg Lindholmgreg.lindh...@gmail.com wrote: You are not providing enough information for anyone to help you. Since you 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

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 Gaintymgai...@hotmail.com wrote: @Table(name = TableNameGoesHere) //the java file would use ForeignKey annotation as described @org.hibernate.annotations.ForeignKey(name = FK_GOALTOACHIEVE_ID) public

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

2009-07-13 Thread Dimitrios Christodoulakis
Remove/a On Mon, Jul 13, 2009 at 10:48 AM, Dimitrios Christodoulakis dimi@gmail.com wrote: Thanks for letting me know. Alright, so: This is the parent class: @Entity public class GoalToAchieve { @Id @GeneratedValue private Long id; @org.hibernate.annotations.CollectionOfElements

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

2009-07-13 Thread Dimitrios Christodoulakis
, Jul 13, 2009 at 12:28 PM, Dimitrios Christodoulakis dimi@gmail.com wrote: I made the changes, but the view source indicates that the param mark is not passed. The url linked is formed like this: /secure/DeleteEntryForm.action?name=firstName+lastNameid=1 The name and id params

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

2009-07-13 Thread Dimitrios Christodoulakis
=%{goalToAchieve.id} /       s:param name=mark value=%{mark} /   /s:url Remove/a On Mon, Jul 13, 2009 at 10:48 AM, Dimitrios Christodoulakis dimi@gmail.com wrote: Thanks for letting me know. Alright, so: This is the parent class: @Entity public class GoalToAchieve { @Id

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

2009-07-13 Thread Dimitrios Christodoulakis
as to build the URL. On Mon, Jul 13, 2009 at 12:28 PM, Dimitrios Christodoulakis dimi@gmail.com wrote: I made the changes, but the view source indicates that the param mark is not passed. The url linked is formed like this: /secure/DeleteEntryForm.action?name=firstName+lastNameid=1

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

2009-07-13 Thread Dimitrios Christodoulakis
. And I don't know anything about display:table 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: I made the changes

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

2009-07-13 Thread Dimitrios Christodoulakis
syntax to work with display:table iterator. And I don't know anything about display:table 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

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

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

2009-07-16 Thread Dimitrios Christodoulakis
. 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:43 AM, Dimitrios Christodoulakis dimi@gmail.com wrote: Hello, I was hoping to hear

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-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-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 Rafiqueharoon.rafi...@utoronto.ca wrote: On Yesterday at 9:16pm, DC=Dimitrios

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

2009-07-20 Thread Dimitrios Christodoulakis
the same errors in the same test cases. On Mon, Jul 20, 2009 at 5:02 PM, Haroon Rafiqueharoon.rafi...@utoronto.ca wrote: On Today at 4:32pm, DC=Dimitrios Christodoulakis dimi@gmail.com wrote: DC Thanks Haroon for the handy advice. That seems to do the trick as far DC as the session object

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

2009-07-20 Thread Dimitrios Christodoulakis
in the same test cases. On Mon, Jul 20, 2009 at 5:02 PM, Haroon Rafiqueharoon.rafi...@utoronto.ca wrote: On Today at 4:32pm, DC=Dimitrios Christodoulakis dimi@gmail.com wrote: DC Thanks Haroon for the handy advice. That seems to do the trick as far DC as the session object

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

2009-07-21 Thread Dimitrios Christodoulakis
wrote: On Today at 4:32pm, DC=Dimitrios Christodoulakis dimi@gmail.com 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 passes now. DC Glad it worked out. DC DC Would it be easy for someone to extend your code

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

2009-07-21 Thread Dimitrios Christodoulakis
on this thread! On Tue, Jul 21, 2009 at 3:31 PM, Haroon Rafiqueharoon.rafi...@utoronto.ca wrote: On Today at 2:02pm, DC=Dimitrios Christodoulakis dimi@gmail.com wrote: DC [..snip..] DC DC The CONFIG_LOCATIONS is used to initialize the servletContext which in DC turn is used to initialize

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

Re: studying struts2 framework, ActionInvocation question

2009-07-22 Thread Dimitrios Christodoulakis
Yes, I figured doing a trace and see how things happen would answer a lot of questions. So, I'll try that. From looking at the DefaultActionProxy constructor, it does make sense to start with the actionproxy. The proxy gets an action invocation as a constructor parameter. So the invocation

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 the

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-23 Thread Dimitrios Christodoulakis
Just another thought I had this morning. Usually the framework is rather transparent to the struts user who only creates actions with their corresponding results and run the application on a server. I mean if the user doesn't have to customize anything, create an interceptor, or even bother with

Re: studying struts2 framework, ActionInvocation question

2009-07-23 Thread Dimitrios Christodoulakis
Actually I was speaking of my own custom interceptor (Authentiaction interceptor) which I add on top of the default package. Originally, I wanted to unit test my interceptor class and particularly its intercept method which takes an ActionInvocation as a parameter. My concern was how to create

Re: studying struts2 framework, ActionInvocation question

2009-07-24 Thread Dimitrios Christodoulakis
...@yahoo.com wrote: Dimitrios Christodoulakis wrote: By the way I noticed that when I downloaded the s2 source code, it didn't come with the opensymphony packages... Does the xwork source has to be downloaded separately? Yes. Dave

Re: studying struts2 framework, ActionInvocation question

2009-07-24 Thread Dimitrios Christodoulakis
to DefaultActionProxyFactory? Many thanks again for your help. On Thu, Jul 23, 2009 at 5:37 PM, Dave Newtonnewton.d...@yahoo.com wrote: Dimitrios Christodoulakis wrote: By the way I noticed that when I downloaded the s2 source code, it didn't come with the opensymphony packages... Does the xwork source has

Re: studying struts2 framework, ActionInvocation question

2009-07-24 Thread Dimitrios Christodoulakis
? 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 Newtonnewton.d...@yahoo.com wrote: Dimitrios Christodoulakis wrote: By the way I noticed that when I downloaded the s2 source code, it didn't come

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

2009-08-07 Thread Dimitrios Christodoulakis
into the functional testing area. I appreciate all the helpful information. I've already learned a lot, by the example code, and the discussions on this thread! On Tue, Jul 21, 2009 at 3:31 PM, Haroon Rafiqueharoon.rafi...@utoronto.ca wrote: On Today at 2:02pm, DC=Dimitrios Christodoulakis dimi@gmail.com