Re: building from source

2008-06-21 Thread Dave Newton
--- On Fri, 6/20/08, Roberto Nunnari <[EMAIL PROTECTED]> wrote:
> ok.. wiping out the maven repo didn't help. I still get
> lots of stack trace from running test in xwork.. 

That part is normal; some tests expect to create exceptions.

So, here's what I've managed so far...

I "installed" my local xwork build jar, almost like the directions say to, but 
*additionally* installed it removing the "-Dclassifier=sources".

This worked (whether or not it's right) but now I get a build error when 
compiling the struts-annotations from 1.0.4-SNAPSHOT.jar.

It was all working quite recently, too.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] What slows you down?

2008-06-21 Thread Giovanni Azua
> -Original Message-
> From: Jim Kiley [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 20, 2008 3:37 PM
> To: Struts Users Mailing List
> Subject: Re: [OT] What slows you down?
> 
> Gah, I have been using MyEclipse for two years and never noticed the JSP
> debugger.  How embarrassing.
> 
> jk

lol! the same here, more than two years using MyEclipse and did never
realized I could debug JSP, indeed a very good thing that we haven't had any
strong need for it when using (correctly) Struts 2 :) 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts Validator Framework: client-side validation problem with submitting buttons

2008-06-21 Thread cacodemon79

Hi, I'm using Struts Validator Framework (Struts 1.3).
Server-side validation works well.
The problem is in client-side validation.

The form name I have to validate is: RegistrazioneUtenteForm.

In my jsp page I have 2 buttons:
1) 
2) 
and the following form declaration:

Moreover I have enabled javascript validation:


The javascript function submitRegistrazioneUtenteForm is the following:
function submitRegistrazioneUtenteForm(nomeForm){
eval("document."+nomeForm+".submit()");
}

If I click on the second button (html:submit), all works well (I get
javascript alerts).
If I click on the first button (html:link), the form is submitted but I
can't see any javascript alerts.

I can't understand where is the problem.

Can you help me?

Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Struts-Validator-Framework%3A-client-side-validation-problem-with-submitting-buttons-tp18042962p18042962.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error replicating sessions with Struts 2 framework java application

2008-06-21 Thread Ildefonso Montero
Dear Laurie,

thanks for your quick response, maybe I would rename this thread as: Does
Struts 2 support clustering? (see
link
)

I have doubts about the replicacion of a SessionMap object on the quoted
architecture, What do you think?

Regards

2008/6/20 Laurie Harper <[EMAIL PROTECTED]>:

> Problems with Tomcat session replication are really a Tomcat issue, not a
> Struts issue. You will likely have more luck asking on the Tomcat user's
> list. You should include more details about how you configured Tomcat for
> session replication, too, since that seems likely to be where the problem
> lies.
>
> L.
>
>
> Ildefonso Montero wrote:
>
>> Hi,
>>
>> we are having a problem when balancing Tomcat session among to clusters.
>> Architecture is the following: Apache (A) balancing 50-50 over Tomcat (1)
>> and
>> Tomcat (2).
>>
>> We are working on a big application and we saw that the session is not
>> replicated properly because we are doing one request for each Tomcat
>> sequentially (see 50-50 balancing) and we have checked that a simple
>> counter
>>
>> that we created inside the session object (our own object) accesing using
>> session.getAttribute("name") the resulted pattern is:
>>
>> Request 1 in T1, counter = 1
>> Request 2 in T2, counter = 2
>> Request 3 in T1, counter = 2
>>
>> Request 4 in T2, counter = 3
>> Request 5 in T1, counter = 3
>> Request 6 in T2, counter = 4
>> Request 7 in T1, counter = 4
>> Request 8 in T2, counter = 5
>> 
>>
>> so, the value of the counter is not replicated properly or we are accesing
>> it
>>
>> in a wrong way. Is interesting for us that the Session ID
>> (session.getID())
>> shows the same ID in both Tomcats so, we guess the is the same but
>> replication
>> of attributes values seems to be not replicated.
>>
>> Could you please help us?
>>
>> Than you in advance.
>>
>> some details: Apache 2.2.3, used mod_proxy_ajp instead of mod_jk, so we
>> did
>> not
>>
>> configured workers.properties file, we customized httpd.conf file.
>>
>>
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
-
Ildefonso Montero Pérez
ildefonso.montero{arroba}gmail.com
monteroperez{arroba}.us.es
-


Re: Error replicating sessions with Struts 2 framework java application

2008-06-21 Thread Dave Newton
Clustering is generally framework-neutral--it's straight JEE as far as I know. 
As long as the session is serializable (hey, thanks a lot, subList :( it should 
work no matter what the framework is.

We're running S2 clustered with no issues.

Dave

--- On Sat, 6/21/08, Ildefonso Montero <[EMAIL PROTECTED]> wrote:

> From: Ildefonso Montero <[EMAIL PROTECTED]>
> Subject: Re: Error replicating sessions with Struts 2 framework java 
> application
> To: "Struts Users Mailing List" 
> Date: Saturday, June 21, 2008, 6:31 AM
> Dear Laurie,
> 
> thanks for your quick response, maybe I would rename this
> thread as: Does
> Struts 2 support clustering? (see
> link PROTECTED]>
> )
> 
> I have doubts about the replicacion of a SessionMap object
> on the quoted
> architecture, What do you think?
> 
> Regards
> 
> 2008/6/20 Laurie Harper <[EMAIL PROTECTED]>:
> 
> > Problems with Tomcat session replication are really a
> Tomcat issue, not a
> > Struts issue. You will likely have more luck asking on
> the Tomcat user's
> > list. You should include more details about how you
> configured Tomcat for
> > session replication, too, since that seems likely to
> be where the problem
> > lies.
> >
> > L.
> >
> >
> > Ildefonso Montero wrote:
> >
> >> Hi,
> >>
> >> we are having a problem when balancing Tomcat
> session among to clusters.
> >> Architecture is the following: Apache (A)
> balancing 50-50 over Tomcat (1)
> >> and
> >> Tomcat (2).
> >>
> >> We are working on a big application and we saw
> that the session is not
> >> replicated properly because we are doing one
> request for each Tomcat
> >> sequentially (see 50-50 balancing) and we have
> checked that a simple
> >> counter
> >>
> >> that we created inside the session object (our own
> object) accesing using
> >> session.getAttribute("name") the
> resulted pattern is:
> >>
> >> Request 1 in T1, counter = 1
> >> Request 2 in T2, counter = 2
> >> Request 3 in T1, counter = 2
> >>
> >> Request 4 in T2, counter = 3
> >> Request 5 in T1, counter = 3
> >> Request 6 in T2, counter = 4
> >> Request 7 in T1, counter = 4
> >> Request 8 in T2, counter = 5
> >> 
> >>
> >> so, the value of the counter is not replicated
> properly or we are accesing
> >> it
> >>
> >> in a wrong way. Is interesting for us that the
> Session ID
> >> (session.getID())
> >> shows the same ID in both Tomcats so, we guess the
> is the same but
> >> replication
> >> of attributes values seems to be not replicated.
> >>
> >> Could you please help us?
> >>
> >> Than you in advance.
> >>
> >> some details: Apache 2.2.3, used mod_proxy_ajp
> instead of mod_jk, so we
> >> did
> >> not
> >>
> >> configured workers.properties file, we customized
> httpd.conf file.
> >>
> >>
> >>
> >>
> >
> >
> -
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> -
> Ildefonso Montero Pérez
> ildefonso.montero{arroba}gmail.com
> monteroperez{arroba}.us.es
> -

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error replicating sessions with Struts 2 framework java application

2008-06-21 Thread Al Sutton
Just to add to this, S2 is compliant with J2EE specs, therefore if the 
container has problems clusting a S2 application, it's not S2 that's at 
fault, it's the clustering capability of the appserver.


My guess is that youy need to look at the information replication 
strategy employed by your chosen app server, you may find the app server 
vendor has some notes about the reliability and replication latency for 
the available strategies.


Al.

P.S. About the mail in the link; I'm not sure what comment is 
neccessary, check the code mentioned and see for yourself how it's 
implemented.



Dave Newton wrote:

Clustering is generally framework-neutral--it's straight JEE as far as I know. 
As long as the session is serializable (hey, thanks a lot, subList :( it should 
work no matter what the framework is.

We're running S2 clustered with no issues.

Dave

--- On Sat, 6/21/08, Ildefonso Montero <[EMAIL PROTECTED]> wrote:

  

From: Ildefonso Montero <[EMAIL PROTECTED]>
Subject: Re: Error replicating sessions with Struts 2 framework java application
To: "Struts Users Mailing List" 
Date: Saturday, June 21, 2008, 6:31 AM
Dear Laurie,

thanks for your quick response, maybe I would rename this
thread as: Does
Struts 2 support clustering? (see
link
)

I have doubts about the replicacion of a SessionMap object
on the quoted
architecture, What do you think?

Regards

2008/6/20 Laurie Harper <[EMAIL PROTECTED]>:



Problems with Tomcat session replication are really a
  

Tomcat issue, not a


Struts issue. You will likely have more luck asking on
  

the Tomcat user's


list. You should include more details about how you
  

configured Tomcat for


session replication, too, since that seems likely to
  

be where the problem


lies.

L.


Ildefonso Montero wrote:

  

Hi,

we are having a problem when balancing Tomcat


session among to clusters.


Architecture is the following: Apache (A)


balancing 50-50 over Tomcat (1)


and
Tomcat (2).

We are working on a big application and we saw


that the session is not


replicated properly because we are doing one


request for each Tomcat


sequentially (see 50-50 balancing) and we have


checked that a simple


counter

that we created inside the session object (our own


object) accesing using


session.getAttribute("name") the


resulted pattern is:


Request 1 in T1, counter = 1
Request 2 in T2, counter = 2
Request 3 in T1, counter = 2

Request 4 in T2, counter = 3
Request 5 in T1, counter = 3
Request 6 in T2, counter = 4
Request 7 in T1, counter = 4
Request 8 in T2, counter = 5


so, the value of the counter is not replicated


properly or we are accesing


it

in a wrong way. Is interesting for us that the


Session ID


(session.getID())
shows the same ID in both Tomcats so, we guess the


is the same but


replication
of attributes values seems to be not replicated.

Could you please help us?

Than you in advance.

some details: Apache 2.2.3, used mod_proxy_ajp


instead of mod_jk, so we


did
not

configured workers.properties file, we customized


httpd.conf file.





  

-


To unsubscribe, e-mail:
  

[EMAIL PROTECTED]


For additional commands, e-mail:
  

[EMAIL PROTECTED]

  

--
-
Ildefonso Montero Pérez
ildefonso.montero{arroba}gmail.com
monteroperez{arroba}.us.es
-



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



struts2: render JSP from action class

2008-06-21 Thread Esteve Camps Chust
hi all,

this is my first email at struts list. I am a new user to struts2. I'm
trying to get working the next scenario: having a mailer class, I want the
message text be a rendered JSP. The action class calls a mailer class; this
composes the mail from the rendering result of a jsp element (it would be
fantastic that this rendering process uses some action class
attributes/values). Finally, the action class informs the user about the
mailing result.

Is there any way to get this working? I think I did it once on struts 1.3 :(

Thanks in advance.

Sincerely,

Esteve


Re: building from source

2008-06-21 Thread Roberto Nunnari

Today, after updating sources (both struts2 and xwork) it builds.
Thank you guys!

--
Robi


Dave Newton wrote:

--- On Fri, 6/20/08, Roberto Nunnari <[EMAIL PROTECTED]> wrote:

ok.. wiping out the maven repo didn't help. I still get
lots of stack trace from running test in xwork.. 


That part is normal; some tests expect to create exceptions.

So, here's what I've managed so far...

I "installed" my local xwork build jar, almost like the directions say to, but 
*additionally* installed it removing the "-Dclassifier=sources".

This worked (whether or not it's right) but now I get a build error when 
compiling the struts-annotations from 1.0.4-SNAPSHOT.jar.

It was all working quite recently, too.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 2 Page & Ctrl+R

2008-06-21 Thread Lukasz Lenart
> This worked fine before using Struts 1 and my guess is that it was because
> the form was present in session.
>
> Is there any way to make this work in Struts 2 ?

You can check Scope Plugin
http://cwiki.apache.org/S2PLUGINS/scope-plugin.html maybe it will be
helpful


Regards
-- 
Lukasz
http://www.lenart.org.pl/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validation and action names with slashes

2008-06-21 Thread Roberto Nunnari

built! going to experiment a bit.
Thank you and best regards.

--
Robi



Jeromy Evans wrote:

Roberto Nunnari wrote:

Jeromy Evans wrote:

Roberto Nunnari wrote:

Hi Jeromy!

The Convention plugin looks very interesting! Does it work
with 2.1.3-SNAPSHOT ? I'd like to give it a try this weekend.

What about mixing it with tiles?
Would it require specifying tiles results thus breaking
the convenience of conventions?

It works with 2.1.3-SNAPSHOT but isn't distributed with it as it's 
still in the sandbox.


should I take it from the sandbox then? just cd sandbox && mvn package?


Yes.

cd sandbox/struts-convention-plugin && mvn clean install

You'll then be able to use struts-convention-plugin-2.1.3-SNAPSHOT in 
your test application.


You may need to ensure the sandbox, struts2, xwork and 
struts-annotations are up-to-date though (but the build is broken at 
this moment)




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validation and action names with slashes

2008-06-21 Thread Roberto Nunnari

Jeromy Evans wrote:

Roberto Nunnari wrote:

Hi Jeromy!

The Convention plugin looks very interesting! Does it work
with 2.1.3-SNAPSHOT ? I'd like to give it a try this weekend.

What about mixing it with tiles?
Would it require specifying tiles results thus breaking
the convenience of conventions?

It works with 2.1.3-SNAPSHOT but isn't distributed with it as it's still 
in the sandbox.


WOW.. The convention plugin rocks! I like it!
I'm writing action classes and related jsps and struts finds the
right Action class and jsp without having to touch the struts.xml
I don't even have the struts.xml file!

This is a very confortable way of writing web applications.


It works with Tiles, but you have to explicitly declare each 
@Result(type=TilesResult.class,value="xxx") which I find really annoying 
(as you say, it breaks the convenience of the convention).  I've been 
intending to raise that over at struts-dev, which I'll do now.


Yes.. Please do. If it would support tiles, I'd start using
it right away, but like this, no way.

I don't like the idea of having to define result mappings in java
source code.. and to say it all.. I don't like annotations,
although I admit that at times annotations are very useful. :-)


Best regards.
Robi

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: validation and action names with slashes

2008-06-21 Thread Martin

Roberto-

Just to clarify..how should the Results mapping annotations configuration be 
introduced?


Thanks
Martin--
- Original Message - 
From: "Roberto Nunnari" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Saturday, June 21, 2008 7:25 PM
Subject: Re: validation and action names with slashes



Jeromy Evans wrote:

Roberto Nunnari wrote:

Hi Jeromy!

The Convention plugin looks very interesting! Does it work
with 2.1.3-SNAPSHOT ? I'd like to give it a try this weekend.

What about mixing it with tiles?
Would it require specifying tiles results thus breaking
the convenience of conventions?

It works with 2.1.3-SNAPSHOT but isn't distributed with it as it's still 
in the sandbox.


WOW.. The convention plugin rocks! I like it!
I'm writing action classes and related jsps and struts finds the
right Action class and jsp without having to touch the struts.xml
I don't even have the struts.xml file!

This is a very confortable way of writing web applications.


It works with Tiles, but you have to explicitly declare each 
@Result(type=TilesResult.class,value="xxx") which I find really annoying 
(as you say, it breaks the convenience of the convention).  I've been 
intending to raise that over at struts-dev, which I'll do now.


Yes.. Please do. If it would support tiles, I'd start using
it right away, but like this, no way.

I don't like the idea of having to define result mappings in java
source code.. and to say it all.. I don't like annotations,
although I admit that at times annotations are very useful. :-)


Best regards.
Robi

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts2: render JSP from action class

2008-06-21 Thread Martin

have you had a chance to look at and deploy struts2-mailreader sample?
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/struts/struts2-mailreader/2.0.11/

FWIW
Martin
- Original Message - 
From: "Esteve Camps Chust" <[EMAIL PROTECTED]>

To: 
Sent: Saturday, June 21, 2008 10:29 AM
Subject: struts2: render JSP from action class



hi all,

this is my first email at struts list. I am a new user to struts2. I'm
trying to get working the next scenario: having a mailer class, I want the
message text be a rendered JSP. The action class calls a mailer class; 
this

composes the mail from the rendering result of a jsp element (it would be
fantastic that this rendering process uses some action class
attributes/values). Finally, the action class informs the user about the
mailing result.

Is there any way to get this working? I think I did it once on struts 1.3 
:(


Thanks in advance.

Sincerely,

Esteve




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] What slows you down?

2008-06-21 Thread Greg Lindholm

When I read this I was being slowed down by constant stopping 
and starting of Tomcat from within Eclipse...  
  - make a change in an action class
  - start tomcat
  - test it... not working
  - stop tomcat
  - make a java change 
  - repeat

In this case I was working on validation logic with annotations.
How else do you test validation logic? Can you unit test validation 
logic? Is there a better way? [1]

Part of this problem was I wasn't sure if my OGNL expression was correct.
How do you test/debug OGNL expressions when they will depend on 
the ValueStack? [2]

Another part of the problem is the doc for FieldExpressionValidator doesn't 
bother to tell you which direction (true or false) the expression should 
return to pass or fail the validation. [3]

BTW: I really really like Struts 2.  Over the years I've went from Struts 1, 
to JSF, and now Struts 2, and S2 is by far the best and easiest and 
most enjoyable.  

The thing that slowed me down the most was the learning curve.  I started
with
the online tutorials, and the "Starting Struts 2"  pdf book, then I had to
start 
working on my application.  It was very rough going at first, I spent a lot
of time 
in the debugger trying to figure out what the hell was going on.  Then I
read 
"Struts 2 Design and Programming" and felt better, went back and fixed some 
of the bad designs I started with but still was lacking much knowledge. 
Finally 
"Struts 2 in Action" was released and I got time to read it **.  
I finally feel comfortable, and figure I understand how Struts 2 really
works. 
Now I'm going back again and fixing more early bad designs. [4]

One more, un-versioned online documentation. 
Under the URL http://struts.apache.org/2.0.11.1/docs  (which anyone would 
reasonably believe is documentation for Struts 2.0.11) is documentation that 
only applies to release 2.1.x.  More then a couple of times I've had a
problem 
searched for a solution found it in the 2.0.11.1 docs started implementing
it 
only to discover it was only for 2.1.x. (very frustrating.) [5] 

[1] Unit testing validation logic
[2] Debugging OGNL expressions
[3] Poor or incomplete documentation, lack or real-world examples and use
cases
[4] Learning curve
[5] Un-versioned docs.

** Struts 2 in Action is a really good book, highly recommend it. However, I 
don't think I would have got nearly as much out of it if I hadn't already
gone 
through the other books and hand's on struggles before I read it. 


Ted Husted wrote:
> 
> Since it's friday, let me pose a question to the group ...
> 
> Even with rock-solid frameworks like Apache Struts, it still seems
> like web application development takes longer than it should. Some
> frameworks, like Ruby on Rails, speak directly to "time to market"
> concerns and have been gathering many followers.
> 
> But why does web application still seem so difficult or so
> time-consuming? Are there time bandits that still suck days or weeks
> out of your development schedule? Are there time gremlins that
> "nickel-and-dime" you every hour of every day? Is there anything more
> that frameworks like Apache Struts can do to help? Or are just there
> intractable problems with web development itself?
> 
> Thoughts? :)
> 
> -Ted.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-OT--What-slows-you-down--tp18027912p18050807.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] What slows you down?

2008-06-21 Thread Jeromy Evans

Internet Explorer




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]