Is this obvious ?

2008-08-01 Thread Lyallex
Good Morning

I have an Action called SomeAction
it has a field called someInt

public class SomeAction extends ActionSupport{

   private int someInt;
   public int getSomeInt(){return someInt;}
   public void setSomeInt(int someInt){this.someInt = someInt;}

}

when this action is invoked from a form with value convertable to an
int, then in the renderer I get hold of someInt like this
s:property value=someInt/
This only works if there is a getter for someInt

If I go on to edit someInt in a form with this tag in it
s:textfield name=someInt/
then the value of the field is set because I provide a setter for someInt

If I do this

public class SomeAction extends ActionSupport{

   public int someInt;
   //no setter or getter, the attribute is public

}

Then everything works fine

The question is
If less code good, more code bad then why bother with the setters and getters.

This is not a question about the merits of encapsulation and
information hiding in Object Oriented systems
It is a question about the reason for not making fields public in a
Struts2 Action.

TIA

Lyallex

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



Re: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

O.K. Chris, thank!

But, do I need this invalidation ? What is its purpose ?

--
Thx, Milan



Chris Pratt wrote:
 
 Yes, that's exactly what that does.  It invalidates the session and
 removes
 all the data.
   (*Chris*)
 
 On Thu, Jul 31, 2008 at 3:27 PM, Milan Milanovic
 [EMAIL PROTECTED]wrote:
 

 Hi Dave,

 excuse me for disturbing this list or you personally, I asked for this in
 Spring forum (
 http://forum.springframework.org/showthread.php?p=194333#post194333
 http://forum.springframework.org/showthread.php?p=194333#post194333 ).
 I figured out what I do in those method with session which forces user to
 log in again, that I don't do in other methods, I do this:

 // Test if session is valid
 if (session instanceof org.apache.struts2.dispatcher.SessionMap) {
  try {
 ((org.apache.struts2.dispatcher.SessionMap)session ).invalidate();
   } catch (IllegalStateException e) {
logger.error(Session is not valid!, e);
return Action.ERROR;
}
 }

 Is this possible to erase session ?

 --
 Thx, Milan


 newton.dave wrote:
 
  I already told you I don't know and you continue to refuse to provide
 the
  information I've asked for. You also added new information about Acegi,
  which I responded to by saying that yes, if you're getting logged out
 it's
  unlikely you'd keep the same session, as that would somewhat defeat the
  purpose of any reasonable login/logout mechanism.
 
  I don't think I have anything further of value to offer you. I don't
 know
  of any issues with session variables; if you're having an Acegi issue
 then
  pursue the issue on a Spring forum.
 
  Dave
 
  Milan Milanovic wrote:
  Dear Dave,
  O.K. But when you look at this scenario:
  MyFirstActionClass - show first.jsp - user click on link -
  MyFirstActionClass.method where I set session variable
  (getSession().put(variable, new Boolean(true)); - show second.jsp
  (here I
  see my variable) - user click on some link -
  MySecondActionClass.method-third.jsp (here I don't see my variable).
  I should note that in MySecondActionClass.method I don't clear session
 or
  something similar, I just add remove some other variables and set some
  new.
  Why my session is obviously cleared when action from another namespace
 is
  called ?
  --
  Thx, Milan
  newton.dave wrote:
 
  I didn't say it wouldn't work. I, and the Sun documentation I quoted,
  said
  it was a known bad programming practice.
 
  Dave
 
  Milan Milanovic wrote:
  Hi Dave,
  no, I think that this is not an issue. I tried with Boolean.TRUE and
 it
  is
  the same, but I earlier used new Boolean(true) and that worked.
  --
  Milan
  newton.dave wrote:
 
  --- On Thu, 7/31/08, Milan Milanovic wrote:
  (getSession().put(variable, new Boolean(true));
 
  Use Boolean.TRUE rather than instantiating a new object.
 
  Note also that the Javadocs for Boolean state in big bold letters:
 
  Note: It is rarely appropriate to use this constructor. Unless a
 new
  instance is required, the static factory valueOf(boolean) is
 generally
  a
  better choice. It is likely to yield significantly better space and
  time
  performance.
 
  Dave
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  View this message in context:
 
 http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18756698.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]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  View this message in context:
 
 http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18758095.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]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18764848.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]


 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18771006.html
Sent from the Struts - User mailing list archive at Nabble.com.



OT: Asynchronous queue between two web applications

2008-08-01 Thread Janesh Subrahmanyan

Hi,

We have two applications and need to periodically synchronize data from 
one to another. One is the master (source) and other is the destination. 
The applications are running on tomcat servers on separate linux boxes.


I thought of using a JMS based asynchronous queue for the data 
sync/handshake. From what I read there are multiple ways to do this - 
using activeMQ, openJMS,  tomcat's inbuild JMS etc. Also there are a 
variety of supporting tools like Spring JMS etc. Not sure how to take 
this forward. Can someone tell which is the better way to implement this 
requirement? [if possible please provide pointer to some 
document/example to help me start with]. Thanks.


Kind Regards,
Jan


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



Re: OT: Asynchronous queue between two web applications

2008-08-01 Thread Al Sutton
Wow, a problem that doesn't mention struts anywhere and isn't even about 
web frameworks, there's OT and way-OT.


I think you need to find a list more in tune with your problem.

Al.

Janesh Subrahmanyan wrote:

Hi,

We have two applications and need to periodically synchronize data 
from one to another. One is the master (source) and other is the 
destination. The applications are running on tomcat servers on 
separate linux boxes.


I thought of using a JMS based asynchronous queue for the data 
sync/handshake. From what I read there are multiple ways to do this - 
using activeMQ, openJMS,  tomcat's inbuild JMS etc. Also there are a 
variety of supporting tools like Spring JMS etc. Not sure how to take 
this forward. Can someone tell which is the better way to implement 
this requirement? [if possible please provide pointer to some 
document/example to help me start with]. Thanks.


Kind Regards,
Jan


-
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]



Action Execute Being called 2 times

2008-08-01 Thread aum strut
Hi All,

While developing an application in struts2 i am facing a strange problem
with one of my action namely RegsitrationAction.
i have a jsp page for user registration where there are certain fields for
the user to be filled for the registration purpose.
i have created a UserProfile bean class with the bean properties for all the
user registration fields.

in the Action class i am using Model Driven Approach for the Data Transfer
but my action execute method is being called 2 times and i am unable to
figure out the exact problem,but i can find the same data twice in the
database.below is the snapshot of my action calss as well as the Struts.xml
file for the Registration Process.

*ACTION CLASS

public class UserRegistration extends ActionSupport implements
ModelDrivenUserProfile {

/**
 *
 */
private static final long serialVersionUID = 4619853901735738145L;
private boolean status=false;
public String execute()throws Exception{

RegisterUser registerUser=new RegisterUser();
status=registerUser.registerNewUser(userProfile);

System.out.println(***Status is*
+status);
if(status){
return SUCCESS;
}
else{
return INPUT;
}
}

private UserProfile userProfile=new UserProfile();

public UserProfile getModel(){
return userProfile;
}



}


Struts.xml

action name=Register class=actionsfolder.UserRegistration
result name=success/welcome/welcome.jsp/result
result name=input/registration/Registrer.jsp/result

/action

Any help in this regard will be much appriciated..


Thanks in advance
-aum
*


Re: OT: Asynchronous queue between two web applications

2008-08-01 Thread Janesh S

Hi Al,

Both the applications are Struts2 applications and I also want to know if
there is a struts way of doing this handshake. That is why I posted in this
forum. Any suggestion/pointer would help. Thanks.

Thanks,
Jan


Al Sutton wrote:
 
 Wow, a problem that doesn't mention struts anywhere and isn't even about 
 web frameworks, there's OT and way-OT.
 
 I think you need to find a list more in tune with your problem.
 
 Al.
 
 Janesh Subrahmanyan wrote:
 Hi,

 We have two applications and need to periodically synchronize data 
 from one to another. One is the master (source) and other is the 
 destination. The applications are running on tomcat servers on 
 separate linux boxes.

 I thought of using a JMS based asynchronous queue for the data 
 sync/handshake. From what I read there are multiple ways to do this - 
 using activeMQ, openJMS,  tomcat's inbuild JMS etc. Also there are a 
 variety of supporting tools like Spring JMS etc. Not sure how to take 
 this forward. Can someone tell which is the better way to implement 
 this requirement? [if possible please provide pointer to some 
 document/example to help me start with]. Thanks.

 Kind Regards,
 Jan


 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/OT%3A-Asynchronous-queue-between-two-web-applications-tp18772696p18772920.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: Is this obvious ?

2008-08-01 Thread stanlick
If you want less boilerplate code you should consider using Groovy for your
actions.

On Fri, Aug 1, 2008 at 2:55 AM, Lyallex [EMAIL PROTECTED] wrote:

 Good Morning

 I have an Action called SomeAction
 it has a field called someInt

 public class SomeAction extends ActionSupport{

   private int someInt;
   public int getSomeInt(){return someInt;}
   public void setSomeInt(int someInt){this.someInt = someInt;}

 }

 when this action is invoked from a form with value convertable to an
 int, then in the renderer I get hold of someInt like this
 s:property value=someInt/
 This only works if there is a getter for someInt

 If I go on to edit someInt in a form with this tag in it
 s:textfield name=someInt/
 then the value of the field is set because I provide a setter for someInt

 If I do this

 public class SomeAction extends ActionSupport{

   public int someInt;
   //no setter or getter, the attribute is public

 }

 Then everything works fine

 The question is
 If less code good, more code bad then why bother with the setters and
 getters.

 This is not a question about the merits of encapsulation and
 information hiding in Object Oriented systems
 It is a question about the reason for not making fields public in a
 Struts2 Action.

 TIA

 Lyallex

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




Re: Action Execute Being called 2 times

2008-08-01 Thread Joachim Ansorg

Hi,
you use the same action to render the welcome screen and Registrer.jsp.

So this means that when you display the welcome screen execute() is 
called and when you display the Registrer.jsp page.


Either use two separate actions or just return null in execute and have 
another action method (i.e. save()) which writes into the db.
In the page with the submit button link to the action's save method. So 
execute is used for welcome and save for the registration.


Hope that helps,
Joachim

Hi All,

While developing an application in struts2 i am facing a strange problem
with one of my action namely RegsitrationAction.
i have a jsp page for user registration where there are certain fields for
the user to be filled for the registration purpose.
i have created a UserProfile bean class with the bean properties for all the
user registration field.


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



paramsPrepareParams vs. staticParams

2008-08-01 Thread Andy Law

Is there any design reason why staticParams is not called before prepare in
the paramsPrepareParams stack?

Also, in a potential RFE sort of vein, would there be any support for a
request for a way of making staticParams non-overwritable? (i.e. the params
defined in the action configuration XML and specified as non-mutable would
not be overwritten by clever folk sticking
'?paramname=valueparam2name=value2' at the end of any given URL)

Later,

Andy
-- 
View this message in context: 
http://www.nabble.com/paramsPrepareParams-vs.-staticParams-tp18773842p18773842.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: Is this obvious ?

2008-08-01 Thread Wes Wannemacher
Although I agree that less code is good, there gets to be a point of
terseness that you should be wary of. I would suggest keeping getters
and setters on your struts 2 actions for a few reasons. First, Struts
2 Actions are simple POJOs for the most part, and by following the
JavaBeans conventions allows the objects to be usable by more than
just struts. Libraries like commons-beanutils and many others will
work easily with objects following the JavaBeans conventions. Although
it's not a hard requirement, it may help you in the future and most
modern IDEs have helpers to generate getters and setters.

-Wes

On Fri, Aug 1, 2008 at 3:55 AM, Lyallex [EMAIL PROTECTED] wrote:
 Good Morning

 I have an Action called SomeAction
 it has a field called someInt

 public class SomeAction extends ActionSupport{

   private int someInt;
   public int getSomeInt(){return someInt;}
   public void setSomeInt(int someInt){this.someInt = someInt;}

 }

 when this action is invoked from a form with value convertable to an
 int, then in the renderer I get hold of someInt like this
 s:property value=someInt/
 This only works if there is a getter for someInt

 If I go on to edit someInt in a form with this tag in it
 s:textfield name=someInt/
 then the value of the field is set because I provide a setter for someInt

 If I do this

 public class SomeAction extends ActionSupport{

   public int someInt;
   //no setter or getter, the attribute is public

 }

 Then everything works fine

 The question is
 If less code good, more code bad then why bother with the setters and getters.

 This is not a question about the merits of encapsulation and
 information hiding in Object Oriented systems
 It is a question about the reason for not making fields public in a
 Struts2 Action.

 TIA

 Lyallex

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





-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

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



[OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
--- On Thu, 7/31/08, Milan Milanovic wrote:
 ((org.apache.struts2.dispatcher.SessionMap)session ).invalidate();
 [...]
 Is this possible to erase session ?

You're asking if session.invalidate() will erase the session? Really?

Here's the thought process I'd use to figure that out, step-by-step.

Step 1: Read the Javadoc.

That's all the steps, because the Javadocs say the following:

Invalidates this session then unbinds any objects bound to it.

So I'm guessing that yes, calling session.invalidate() could actually 
invalidate the session.

Dave


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

As you can see, I've read it, conclude it and write here, if I didn't I'll
still have a problem, isn't it ?!

I have asked in which cases this method should be used ?

--
Milan



newton.dave wrote:
 
 --- On Thu, 7/31/08, Milan Milanovic wrote:
 ((org.apache.struts2.dispatcher.SessionMap)session ).invalidate();
 [...]
 Is this possible to erase session ?
 
 You're asking if session.invalidate() will erase the session? Really?
 
 Here's the thought process I'd use to figure that out, step-by-step.
 
 Step 1: Read the Javadoc.
 
 That's all the steps, because the Javadocs say the following:
 
 Invalidates this session then unbinds any objects bound to it.
 
 So I'm guessing that yes, calling session.invalidate() could actually
 invalidate the session.
 
 Dave
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18774795.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]



[OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
--- On Fri, 8/1/08, Milan Milanovic wrote:
 I have asked in which cases this method should be used?

It should be used when you want to invalidate the session and remove all 
objects in the session.

Dave


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

O.K. Thanks.

One more question, is it possible that my session variable is erased when I
redirect
to another action/namespace, like this:

action name=show class=mySecondAction
!-- Redirect to another namespace --
result type=redirect-action
  show
  /actions
  true
   ${id}
 /result
/action

?

--
Milan


newton.dave wrote:
 
 --- On Fri, 8/1/08, Milan Milanovic wrote:
 I have asked in which cases this method should be used?
 
 It should be used when you want to invalidate the session and remove all
 objects in the session.
 
 Dave
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18775883.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] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
--- On Fri, 8/1/08, Milan Milanovic wrote:
 One more question, is it possible that my session variable
 is erased when I redirect to another action/namespace, like this:
 
 action name=show
 class=mySecondAction
   !-- Redirect to another namespace --
   result type=redirect-action
 show
 /actions
 true
${id}
/result
 /action

As I've said, I know of no default S2 mechanism that would arbitrarily remove 
session variables. As I've also said, and as the documentation clearly states, 
and as you were told on the Spring forum, if you're calling 
session.invalidate() you'll lose all your session variables.

Dave


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

Yes, I understand. But I don't remove session variable or call invalidate
anymore, and when my variable is stored during the whole scenario and when I
click to this redirect I get lost of my variable.

--
Milan



newton.dave wrote:
 
 --- On Fri, 8/1/08, Milan Milanovic wrote:
 One more question, is it possible that my session variable
 is erased when I redirect to another action/namespace, like this:
 
 action name=show
 class=mySecondAction
  !-- Redirect to another namespace --
  result type=redirect-action
show
/actions
true
${id}
   /result
 /action
 
 As I've said, I know of no default S2 mechanism that would arbitrarily
 remove session variables. As I've also said, and as the documentation
 clearly states, and as you were told on the Spring forum, if you're
 calling session.invalidate() you'll lose all your session variables.
 
 Dave
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18776195.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] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
--- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:
 Yes, I understand. But I don't remove session variable
 or call invalidate anymore, and when my variable is stored 
 during the whole scenario and when I click to this redirect 
 I get lost of my variable.

Then provide the artifacts I requested so people can look at it--how do you 
expect anybody to diagnose your problem if you don't provide what's necessary?

Dave


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton

Dave,

Repeat after me;

It's Friday. It's nearly the weekend. And if they don't give me what I 
want I'm going to take my toys away and stop playing :).


Al.

Dave Newton wrote:

--- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:
  

Yes, I understand. But I don't remove session variable
or call invalidate anymore, and when my variable is stored 
during the whole scenario and when I click to this redirect 
I get lost of my variable.



Then provide the artifacts I requested so people can look at it--how do you 
expect anybody to diagnose your problem if you don't provide what's necessary?

Dave


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

  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



RE: [S2] problem still with actionRedirect and redirect results (Struts2.1.2)

2008-08-01 Thread Brad A Cupit
Pierre Thibaudeau [mailto:[EMAIL PROTECTED] wrote:
 The JIRA tracker lists the following issues:
 https://issues.apache.org/struts/browse/WW-1714
 as fixed in version 2.0.8, but it certainly doesn't work in 2.1.2.

have you tried Struts 2.0.11.2?
You may already know it, but Struts 2.1.2 is still beta.

Brad Cupit
Louisiana State University - UIS

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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

Al ?!

Dave, I cannot give you all that info, because of two things, first my
classes
and jsp-s are pretty complex, and not in english! So, I narrowed my scenario
to this, my variable is in session - when redirect action is clicked, there
is no
variable in session any more! It's seems like that redirect action doesn't
pass
or set session to another action class.

--
Regards, Milan



Al Sutton wrote:
 
 Dave,
 
 Repeat after me;
 
 It's Friday. It's nearly the weekend. And if they don't give me what I 
 want I'm going to take my toys away and stop playing :).
 
 Al.
 
 Dave Newton wrote:
 --- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:
   
 Yes, I understand. But I don't remove session variable
 or call invalidate anymore, and when my variable is stored 
 during the whole scenario and when I click to this redirect 
 I get lost of my variable.
 

 Then provide the artifacts I requested so people can look at it--how do
 you expect anybody to diagnose your problem if you don't provide what's
 necessary?

 Dave


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

   
 
 
 -- 
 --
 Al Sutton
 
 W: www.alsutton.com
 T: twitter.com/alsutton
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18777031.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] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

I already gave you my action configuration:

action name=show class=mySecondAction 
!-- Redirect to another namespace -- 
result type=redirect-action 
  show
  /actions
  true
   ${id}
 /result 
/action 


and here it is how it is called from jsp:

s:url id=connectUrl action=show
s:param name=id value=id /
/s:url
s:a id=d_%{id} href=%{connectUrl}Show/s:a

--
Regards, Milan


Milan Milanovic wrote:
 
 Al ?!
 
 Dave, I cannot give you all that info, because of two things, first my
 classes
 and jsp-s are pretty complex, and not in english! So, I narrowed my
 scenario
 to this, my variable is in session - when redirect action is clicked,
 there is no
 variable in session any more! It's seems like that redirect action doesn't
 pass
 or set session to another action class.
 
 --
 Regards, Milan
 
 
 
 Al Sutton wrote:
 
 Dave,
 
 Repeat after me;
 
 It's Friday. It's nearly the weekend. And if they don't give me what I 
 want I'm going to take my toys away and stop playing :).
 
 Al.
 
 Dave Newton wrote:
 --- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:
   
 Yes, I understand. But I don't remove session variable
 or call invalidate anymore, and when my variable is stored 
 during the whole scenario and when I click to this redirect 
 I get lost of my variable.
 

 Then provide the artifacts I requested so people can look at it--how do
 you expect anybody to diagnose your problem if you don't provide what's
 necessary?

 Dave


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

   
 
 
 -- 
 --
 Al Sutton
 
 W: www.alsutton.com
 T: twitter.com/alsutton
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18777073.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] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Piero Sartini
 It's seems like that redirect action doesn't
 pass
 or set session to another action class.

If you can't give us the code, we aren't able to help you.
Session's don't need to be passed between actions. They are managed by the 
servlet container. But it is pretty safe to assume that Struts2 is not 
destroying your session.

Piero

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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton

Just making sure hurricane Dave doesn't blow through the list.

If you ask for help, and someone offers, give them what they ask for. 
They can always ask for a translation of bits that may be critical, but 
unless you've rewritten large chunks of the JVM and Struts your tags and 
code will still be understandable.


Milan Milanovic wrote:

Al ?!

Dave, I cannot give you all that info, because of two things, first my
classes
and jsp-s are pretty complex, and not in english! So, I narrowed my scenario
to this, my variable is in session - when redirect action is clicked, there
is no
variable in session any more! It's seems like that redirect action doesn't
pass
or set session to another action class.

--
Regards, Milan



Al Sutton wrote:
  

Dave,

Repeat after me;

It's Friday. It's nearly the weekend. And if they don't give me what I 
want I'm going to take my toys away and stop playing :).


Al.

Dave Newton wrote:


--- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:
  
  

Yes, I understand. But I don't remove session variable
or call invalidate anymore, and when my variable is stored 
during the whole scenario and when I click to this redirect 
I get lost of my variable.



Then provide the artifacts I requested so people can look at it--how do
you expect anybody to diagnose your problem if you don't provide what's
necessary?

Dave


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

  
  

--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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






  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

O.K. My 5 jsp which are used and two action classes have 5000+k lines of
code, should I send them here ?

--
Milan


Al Sutton wrote:
 
 Just making sure hurricane Dave doesn't blow through the list.
 
 If you ask for help, and someone offers, give them what they ask for. 
 They can always ask for a translation of bits that may be critical, but 
 unless you've rewritten large chunks of the JVM and Struts your tags and 
 code will still be understandable.
 
 Milan Milanovic wrote:
 Al ?!

 Dave, I cannot give you all that info, because of two things, first my
 classes
 and jsp-s are pretty complex, and not in english! So, I narrowed my
 scenario
 to this, my variable is in session - when redirect action is clicked,
 there
 is no
 variable in session any more! It's seems like that redirect action
 doesn't
 pass
 or set session to another action class.

 --
 Regards, Milan



 Al Sutton wrote:
   
 Dave,

 Repeat after me;

 It's Friday. It's nearly the weekend. And if they don't give me what I 
 want I'm going to take my toys away and stop playing :).

 Al.

 Dave Newton wrote:
 
 --- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:
   
   
 Yes, I understand. But I don't remove session variable
 or call invalidate anymore, and when my variable is stored 
 during the whole scenario and when I click to this redirect 
 I get lost of my variable.
 
 
 Then provide the artifacts I requested so people can look at it--how do
 you expect anybody to diagnose your problem if you don't provide what's
 necessary?

 Dave


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

   
   
 -- 
 --
 Al Sutton

 W: www.alsutton.com
 T: twitter.com/alsutton


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



 

   
 
 
 -- 
 --
 Al Sutton
 
 W: www.alsutton.com
 T: twitter.com/alsutton
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18777372.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] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

Hi Piero,

O.K. Basically I'm just asking one simple question, is it possible that
redirect action delete session or variables in it or maybe not pass some,
because they after redirecting I don't have that variable in session ?

--
Regards, Milan


Piero Sartini-3 wrote:
 
 It's seems like that redirect action doesn't
 pass
 or set session to another action class.
 
 If you can't give us the code, we aren't able to help you.
 Session's don't need to be passed between actions. They are managed by the 
 servlet container. But it is pretty safe to assume that Struts2 is not 
 destroying your session.
 
   Piero
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18777402.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] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton

:O imho first stop would be someone who will refactor them.

5 jsps and 2 classes with 5K lines of code is not a healthy program.  
Once they have been refactored you may find it easier to find the problem.


Al.

Milan Milanovic wrote:

O.K. My 5 jsp which are used and two action classes have 5000+k lines of
code, should I send them here ?

--
Milan


Al Sutton wrote:
  

Just making sure hurricane Dave doesn't blow through the list.

If you ask for help, and someone offers, give them what they ask for. 
They can always ask for a translation of bits that may be critical, but 
unless you've rewritten large chunks of the JVM and Struts your tags and 
code will still be understandable.


Milan Milanovic wrote:


Al ?!

Dave, I cannot give you all that info, because of two things, first my
classes
and jsp-s are pretty complex, and not in english! So, I narrowed my
scenario
to this, my variable is in session - when redirect action is clicked,
there
is no
variable in session any more! It's seems like that redirect action
doesn't
pass
or set session to another action class.

--
Regards, Milan



Al Sutton wrote:
  
  

Dave,

Repeat after me;

It's Friday. It's nearly the weekend. And if they don't give me what I 
want I'm going to take my toys away and stop playing :).


Al.

Dave Newton wrote:



--- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:
  
  
  

Yes, I understand. But I don't remove session variable
or call invalidate anymore, and when my variable is stored 
during the whole scenario and when I click to this redirect 
I get lost of my variable.




Then provide the artifacts I requested so people can look at it--how do
you expect anybody to diagnose your problem if you don't provide what's
necessary?

Dave


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

  
  
  

--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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





  
  

--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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






  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton

Answer : No

Only your code and your site design will affect the session variables 
you have set and whether they are accessible.


Milan Milanovic wrote:

Hi Piero,

O.K. Basically I'm just asking one simple question, is it possible that
redirect action delete session or variables in it or maybe not pass some,
because they after redirecting I don't have that variable in session ?

--
Regards, Milan


Piero Sartini-3 wrote:
  

It's seems like that redirect action doesn't
pass
or set session to another action class.
  

If you can't give us the code, we aren't able to help you.
Session's don't need to be passed between actions. They are managed by the 
servlet container. But it is pretty safe to assume that Struts2 is not 
destroying your session.


Piero

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






  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Nils-Helge Garli Hegvik
If your artifacts are that big, I suggest that you create a minimal
example that reproduces your error and then provide us with those as
examples. Otherwise, it's impossible to help. And who knows, maybe the
little example works, and then we can rule out Struts 2 in the
equation.

Nils-H

On Fri, Aug 1, 2008 at 5:45 PM, Milan Milanovic
[EMAIL PROTECTED] wrote:

 O.K. My 5 jsp which are used and two action classes have 5000+k lines of
 code, should I send them here ?

 --
 Milan


 Al Sutton wrote:

 Just making sure hurricane Dave doesn't blow through the list.

 If you ask for help, and someone offers, give them what they ask for.
 They can always ask for a translation of bits that may be critical, but
 unless you've rewritten large chunks of the JVM and Struts your tags and
 code will still be understandable.

 Milan Milanovic wrote:
 Al ?!

 Dave, I cannot give you all that info, because of two things, first my
 classes
 and jsp-s are pretty complex, and not in english! So, I narrowed my
 scenario
 to this, my variable is in session - when redirect action is clicked,
 there
 is no
 variable in session any more! It's seems like that redirect action
 doesn't
 pass
 or set session to another action class.

 --
 Regards, Milan



 Al Sutton wrote:

 Dave,

 Repeat after me;

 It's Friday. It's nearly the weekend. And if they don't give me what I
 want I'm going to take my toys away and stop playing :).

 Al.

 Dave Newton wrote:

 --- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:


 Yes, I understand. But I don't remove session variable
 or call invalidate anymore, and when my variable is stored
 during the whole scenario and when I click to this redirect
 I get lost of my variable.


 Then provide the artifacts I requested so people can look at it--how do
 you expect anybody to diagnose your problem if you don't provide what's
 necessary?

 Dave


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



 --
 --
 Al Sutton

 W: www.alsutton.com
 T: twitter.com/alsutton


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








 --
 --
 Al Sutton

 W: www.alsutton.com
 T: twitter.com/alsutton


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




 --
 View this message in context: 
 http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18777372.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]



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



Re: Is there any way I can put package.properties file outside war file?

2008-08-01 Thread Pranav
Thanks. How do I set classpath on jboss so that classes/files from outside the 
war file can be loaded by my web application? 

Pranav



- Original Message 
From: Chris Pratt [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, July 31, 2008 4:50:30 PM
Subject: Re: Is there any way I can put package.properties file outside war 
file?

Basically Struts just loads the properties from the classpath, so anywhere
on the classpath should work.
  (*Chris*)

On Thu, Jul 31, 2008 at 4:18 PM, Pranav [EMAIL PROTECTED] wrote:

 Hi,

 In our application, currently package.properties is packaged inside the war
 file at \web-inf\classes directory. But we would like to move it out to a
 directory like /server/default/conf inside the jboss. Is there anyway this
 can be done? If yes, can someone please guide me with step-by-step
 instructions. It will be a great help.

 Thanks
 Pranav





 -
 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: [S2] problem still with actionRedirect and redirect results (Struts2.1.2)

2008-08-01 Thread Andreas Mähler

Hello Pierre,

I am also desperately waiting for version 2.1.3 since it seems to be 
fixed there[1]. I cannot downgrade to 2.0.x, since I am using the no 
.action extension feature of 2.1.x


CU
~Andreas


[1] https://issues.apache.org/struts/browse/WW-2676


Pierre Thibaudeau schrieb:

The JIRA tracker lists the following issues:
https://issues.apache.org/struts/browse/WW-1714
as fixed in version 2.0.8, but it certainly doesn't work in 2.1.2.



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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

O.K. Thanks.

I must see why my session is deleted when redirect action is called :-(. I
checked everything 10 times, and I don't anything with session, so it is
very wierd to me why it is removed after just one click.

--
Regards, Milan


Al Sutton wrote:
 
 Answer : No
 
 Only your code and your site design will affect the session variables 
 you have set and whether they are accessible.
 
 Milan Milanovic wrote:
 Hi Piero,

 O.K. Basically I'm just asking one simple question, is it possible that
 redirect action delete session or variables in it or maybe not pass some,
 because they after redirecting I don't have that variable in session ?

 --
 Regards, Milan


 Piero Sartini-3 wrote:
   
 It's seems like that redirect action doesn't
 pass
 or set session to another action class.
   
 If you can't give us the code, we aren't able to help you.
 Session's don't need to be passed between actions. They are managed by
 the 
 servlet container. But it is pretty safe to assume that Struts2 is not 
 destroying your session.

 Piero

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



 

   
 
 
 -- 
 --
 Al Sutton
 
 W: www.alsutton.com
 T: twitter.com/alsutton
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18777689.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] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton
Seriously, refactor your code. 5K lines of code in 7 files could hide 
all manner of nasties.


Milan Milanovic wrote:

O.K. Thanks.

I must see why my session is deleted when redirect action is called :-(. I
checked everything 10 times, and I don't anything with session, so it is
very wierd to me why it is removed after just one click.

--
Regards, Milan


Al Sutton wrote:
  

Answer : No

Only your code and your site design will affect the session variables 
you have set and whether they are accessible.


Milan Milanovic wrote:


Hi Piero,

O.K. Basically I'm just asking one simple question, is it possible that
redirect action delete session or variables in it or maybe not pass some,
because they after redirecting I don't have that variable in session ?

--
Regards, Milan


Piero Sartini-3 wrote:
  
  

It's seems like that redirect action doesn't
pass
or set session to another action class.
  
  

If you can't give us the code, we aren't able to help you.
Session's don't need to be passed between actions. They are managed by
the 
servlet container. But it is pretty safe to assume that Struts2 is not 
destroying your session.


Piero

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





  
  

--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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






  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
--- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:
 O.K. Basically I'm just asking one simple question, is
 it possible that redirect action delete session or variables 
 in it or maybe not pass some, because they after redirecting 
 I don't have that variable in session ?

NO.

There is no mechanism in S2 that arbitrarily removes session variables. The 
redirectAction result don't do anything to the session at all. In fact, very 
little does anything with the session at all.

Look at the S2 code. Since you're not going to help us help you, you're going 
to have to help yourself. All the code is available. Step through it if you 
have to. Read the documentation of any code you use that might involve the 
session; not knowing what session.invalidate() does leads me to believe you 
haven't spent much time with the Javadocs. Check your interceptor stack and 
interceptor configuration. If you don't want to step through code, add an 
interceptor that tracks session variables and see if an interceptor is removing 
it. Understand Acegi better; if it's making you log in then something is wrong 
and you may lose your session there.

RedirectAction is not the culprit, AFAICT, from the information you've provided.

Hurricane Dave


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton
Thhhaaa she blows!! (I use she in the shipping sense of the 
word... i.e. everythings a she when you're at sea for that long and it's 
all blokes).


Dave Newton wrote:

--- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:
  

O.K. Basically I'm just asking one simple question, is
it possible that redirect action delete session or variables 
in it or maybe not pass some, because they after redirecting 
I don't have that variable in session ?



NO.

There is no mechanism in S2 that arbitrarily removes session variables. The 
redirectAction result don't do anything to the session at all. In fact, very 
little does anything with the session at all.

Look at the S2 code. Since you're not going to help us help you, you're going 
to have to help yourself. All the code is available. Step through it if you 
have to. Read the documentation of any code you use that might involve the 
session; not knowing what session.invalidate() does leads me to believe you 
haven't spent much time with the Javadocs. Check your interceptor stack and 
interceptor configuration. If you don't want to step through code, add an 
interceptor that tracks session variables and see if an interceptor is removing 
it. Understand Acegi better; if it's making you log in then something is wrong 
and you may lose your session there.

RedirectAction is not the culprit, AFAICT, from the information you've provided.

Hurricane Dave


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

  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
--- On Fri, 8/1/08, Al Sutton [EMAIL PROTECTED] wrote:
 Thhhaaa she blows!!

*lol*

Tropical Depression Dave


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



[Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
 Seriously, refactor your code. 5K lines of code in 7 files
 could hide all manner of nasties.

We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines, mostly 
if-elseif.

It broke our cyclometric complexity meter, had to put in a bigger fuse. It 
makes Eclipse cry. It makes *me* cry. Kinda like this thread.

Dave


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



Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

Thanks huricane Dave ;-).

O.K. I'll check everything one more time. I'm using only default stack and
it worked until now good. And I fixed that invalidate problem, so I don't
invalidate nor clear session anywhere in my project.

--
Regards, Milan


newton.dave wrote:
 
 --- On Fri, 8/1/08, Milan Milanovic [EMAIL PROTECTED] wrote:
 O.K. Basically I'm just asking one simple question, is
 it possible that redirect action delete session or variables 
 in it or maybe not pass some, because they after redirecting 
 I don't have that variable in session ?
 
 NO.
 
 There is no mechanism in S2 that arbitrarily removes session variables.
 The redirectAction result don't do anything to the session at all. In
 fact, very little does anything with the session at all.
 
 Look at the S2 code. Since you're not going to help us help you, you're
 going to have to help yourself. All the code is available. Step through it
 if you have to. Read the documentation of any code you use that might
 involve the session; not knowing what session.invalidate() does leads me
 to believe you haven't spent much time with the Javadocs. Check your
 interceptor stack and interceptor configuration. If you don't want to step
 through code, add an interceptor that tracks session variables and see if
 an interceptor is removing it. Understand Acegi better; if it's making you
 log in then something is wrong and you may lose your session there.
 
 RedirectAction is not the culprit, AFAICT, from the information you've
 provided.
 
 Hurricane Dave
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18777852.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] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton
Don't worry, I've just written a rant about not relying on dirty reads 
and had to re-word it to include the footnote This discussion is about 
the SQL  JDBC Drivers and is not about porn.


Dave Newton wrote:

--- On Fri, 8/1/08, Al Sutton [EMAIL PROTECTED] wrote:
  

Thhhaaa she blows!!



*lol*

Tropical Depression Dave


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

  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



[Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
--- On Fri, 8/1/08, Al Sutton [EMAIL PROTECTED] wrote:
 Don't worry, I've just written a rant about not relying on dirty 
 reads and had to re-word it to include the footnote This
 discussion is about the SQL  JDBC Drivers and is not about porn.

Well, they're both just as exciting.

Right?

Anyone?

*chirp*

Dave


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



Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton
Captin... The cyclometric complexity meter is at max... I canne give it 
any more.


Reflection can seriously help with big else-ifs. If your switching on a 
variable use the variable name and value as part of the class name and 
then do;


Class blahHandlerClass = Class.forName( BlahHandlerFor+value );
BlahHandler blahHandler = blahHandlerClass.newInstance();
blahHandler.doYourWork();

It splits your code into more manageable chunks, allows you to add 
handlers for new values without touching the motherload, and it makes it 
look like you're a java ninja blending in with the workplace :).


Al.

Dave Newton wrote:

Seriously, refactor your code. 5K lines of code in 7 files
could hide all manner of nasties.



We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines, mostly 
if-elseif.

It broke our cyclometric complexity meter, had to put in a bigger fuse. It 
makes Eclipse cry. It makes *me* cry. Kinda like this thread.

Dave


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

  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton
So you'd choose JDBC driver source code over porn and you called me 
wierd :).


Dave Newton wrote:

--- On Fri, 8/1/08, Al Sutton [EMAIL PROTECTED] wrote:
  
Don't worry, I've just written a rant about not relying on dirty 
reads and had to re-word it to include the footnote This

discussion is about the SQL  JDBC Drivers and is not about porn.



Well, they're both just as exciting.

Right?

Anyone?

*chirp*

Dave


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

  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: OT: Asynchronous queue between two web applications

2008-08-01 Thread Gabriel Belingueres
I believe Struts doesn't provide any help for integrating applications
with an MQ server. You need to program against the JMS API (a driver
which your MQ server vendor must provide.) but this is not related to
Struts.

2008/8/1 Janesh S [EMAIL PROTECTED]:

 Hi Al,

 Both the applications are Struts2 applications and I also want to know if
 there is a struts way of doing this handshake. That is why I posted in this
 forum. Any suggestion/pointer would help. Thanks.

 Thanks,
 Jan


 Al Sutton wrote:

 Wow, a problem that doesn't mention struts anywhere and isn't even about
 web frameworks, there's OT and way-OT.

 I think you need to find a list more in tune with your problem.

 Al.

 Janesh Subrahmanyan wrote:
 Hi,

 We have two applications and need to periodically synchronize data
 from one to another. One is the master (source) and other is the
 destination. The applications are running on tomcat servers on
 separate linux boxes.

 I thought of using a JMS based asynchronous queue for the data
 sync/handshake. From what I read there are multiple ways to do this -
 using activeMQ, openJMS,  tomcat's inbuild JMS etc. Also there are a
 variety of supporting tools like Spring JMS etc. Not sure how to take
 this forward. Can someone tell which is the better way to implement
 this requirement? [if possible please provide pointer to some
 document/example to help me start with]. Thanks.

 Kind Regards,
 Jan


 -
 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]




 --
 View this message in context: 
 http://www.nabble.com/OT%3A-Asynchronous-queue-between-two-web-applications-tp18772696p18772920.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]



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



Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

Hi Dave,

one short question, don't be angry ;-).

The link which when clicked action class lost its session looks like this:

http://localhost:8080/myproject/show.action?dojo.preventCache=1224214242324id=4

Is it possible that session is not passed through this link ?

--
Regards, Milan


newton.dave wrote:
 
 Seriously, refactor your code. 5K lines of code in 7 files
 could hide all manner of nasties.
 
 We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines,
 mostly if-elseif.
 
 It broke our cyclometric complexity meter, had to put in a bigger fuse. It
 makes Eclipse cry. It makes *me* cry. Kinda like this thread.
 
 Dave
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18778274.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: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton

Milan,

Please read up on how sessions work. They are NOT passed via URLs unless 
you have cookies disabled, URL rewriting enabled on your appserver, and 
a very sick sense of what a normal configuration is.


Al.


Milan Milanovic wrote:

Hi Dave,

one short question, don't be angry ;-).

The link which when clicked action class lost its session looks like this:

http://localhost:8080/myproject/show.action?dojo.preventCache=1224214242324id=4

Is it possible that session is not passed through this link ?

--
Regards, Milan


newton.dave wrote:
  

Seriously, refactor your code. 5K lines of code in 7 files
could hide all manner of nasties.
  

We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines,
mostly if-elseif.

It broke our cyclometric complexity meter, had to put in a bigger fuse. It
makes Eclipse cry. It makes *me* cry. Kinda like this thread.

Dave


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






  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
--- On Fri, 8/1/08, Al Sutton [EMAIL PROTECTED] wrote:
 It splits your code into more manageable chunks, [...]

You're right, it does split *my* code. Unfortunately (well... fortunately, 
really) that code isn't mine and I'm forbidden from even looking at it.

Dave


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



Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
--- On Fri, 8/1/08, Al Sutton wrote:
 So you'd choose JDBC driver source code over porn

And it's not filtered at work! Win-win!

Dave


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



Re: Is there any way I can put package.properties file outside war file?

2008-08-01 Thread Chris Pratt
Ya might have to Google that one, I don't use jBoss myself.
  (*Chris*)

On Fri, Aug 1, 2008 at 8:53 AM, Pranav [EMAIL PROTECTED] wrote:

 Thanks. How do I set classpath on jboss so that classes/files from outside
 the war file can be loaded by my web application?

 Pranav



 - Original Message 
 From: Chris Pratt [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Thursday, July 31, 2008 4:50:30 PM
 Subject: Re: Is there any way I can put package.properties file outside war
 file?

 Basically Struts just loads the properties from the classpath, so anywhere
 on the classpath should work.
  (*Chris*)

 On Thu, Jul 31, 2008 at 4:18 PM, Pranav [EMAIL PROTECTED] wrote:

  Hi,
 
  In our application, currently package.properties is packaged inside the
 war
  file at \web-inf\classes directory. But we would like to move it out to a
  directory like /server/default/conf inside the jboss. Is there anyway
 this
  can be done? If yes, can someone please guide me with step-by-step
  instructions. It will be a great help.
 
  Thanks
  Pranav
 
 
 
 
 
  -
  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: [S2] problem still with actionRedirect and redirect results (Struts2.1.2)

2008-08-01 Thread Pierre Thibaudeau
Thank you Andreas and Brad.  I too shall be impatiently looking forward to
2.1.3!
And I'd rather not backtrack to 2.0.11 as I want Ajax/dojo as a plugin and
not as a theme.

2008/8/1 Andreas Mähler [EMAIL PROTECTED]

 I am also desperately waiting for version 2.1.3 since it seems to be fixed
 there[1]. I cannot downgrade to 2.0.x, since I am using the no .action
 extension feature of 2.1.x

 [1] https://issues.apache.org/struts/browse/WW-2676




Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton
A Medusa code.  So named because anyone who looks at it gets so 
petrified they turn to freeze up and turn to stone.


I once worked for a company where one of their classes was about 200K in 
size, the reason was the developer thought that in every you needed to 
catch every exception thrown, wrap it in something else, and re-throw it.


Laugh... I laughed so hard I almost peed in my pants when I saw it. (and 
yes, the company was dumb enough to pay  an expensive contractor to 
optimize the code. he corrected the exception handling, which reduced 
the code size and sped things up slighly, for which he got glowing 
praise by the management).


Al.

Dave Newton wrote:

--- On Fri, 8/1/08, Al Sutton [EMAIL PROTECTED] wrote:
  

It splits your code into more manageable chunks, [...]



You're right, it does split *my* code. Unfortunately (well... fortunately, 
really) that code isn't mine and I'm forbidden from even looking at it.

Dave


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

  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton
Tonight on the Struts 2 comedy channel; How your employer is ensuring 
you enjoy your day by only filtering out the boring websites to avoid 
you having to waste time checking them out :).


Dave Newton wrote:

--- On Fri, 8/1/08, Al Sutton wrote:
  

So you'd choose JDBC driver source code over porn



And it's not filtered at work! Win-win!

Dave


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

  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Milan Milanovic

I know that they are passed through serlvet, I'm just wondering if struts
makes some error there.

Could you be positive that Struts 2.0.11.1 doesn't do anything with session,
i.e., session remains
intact and session is set for folowing action in case of redirect action ?

--
Regards, Milan



Al Sutton wrote:
 
 Milan,
 
 Please read up on how sessions work. They are NOT passed via URLs unless 
 you have cookies disabled, URL rewriting enabled on your appserver, and 
 a very sick sense of what a normal configuration is.
 
 Al.
 
 
 Milan Milanovic wrote:
 Hi Dave,

 one short question, don't be angry ;-).

 The link which when clicked action class lost its session looks like
 this:

 http://localhost:8080/myproject/show.action?dojo.preventCache=1224214242324id=4

 Is it possible that session is not passed through this link ?

 --
 Regards, Milan


 newton.dave wrote:
   
 Seriously, refactor your code. 5K lines of code in 7 files
 could hide all manner of nasties.
   
 We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines,
 mostly if-elseif.

 It broke our cyclometric complexity meter, had to put in a bigger fuse.
 It
 makes Eclipse cry. It makes *me* cry. Kinda like this thread.

 Dave


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



 

   
 
 
 -- 
 --
 Al Sutton
 
 W: www.alsutton.com
 T: twitter.com/alsutton
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18778594.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: paramsPrepareParams vs. staticParams

2008-08-01 Thread Gabriel Belingueres
staticParams provide some sort of default parameter injection when you
declare an action in your struts.xml, but it should be ok to override
this value if it came as a parameter. If the interceptor order would
be the opposite, then static parameters would take precedence over
regular parameters.

As you said, actions are POJOs and its properties can be used with
many design intentions:
1) hold URL parameters
2) hold static initialization parameters
3) Hold action result objects (but you want to write a setter too to
perform some repetitive logic)
4) hold injected objects (think S2 beans or Spring's)

From the security perspective, for the 4) case is not much I think
(because probably the ParameterInterceptor will throw an exception
when type conversion fails).
To differentiate between the 1) and both 2) and 3), it could be an
improvement if with some annotation you could tag a parameter as
static only and then the ParameterInterceptor will not try to set
any value there (or throw an exception).

2008/8/1 Andy Law [EMAIL PROTECTED]:

 Is there any design reason why staticParams is not called before prepare in
 the paramsPrepareParams stack?

 Also, in a potential RFE sort of vein, would there be any support for a
 request for a way of making staticParams non-overwritable? (i.e. the params
 defined in the action configuration XML and specified as non-mutable would
 not be overwritten by clever folk sticking
 '?paramname=valueparam2name=value2' at the end of any given URL)

 Later,

 Andy
 --
 View this message in context: 
 http://www.nabble.com/paramsPrepareParams-vs.-staticParams-tp18773842p18773842.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]



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



struts2 portlet deployment in WAS 6.1

2008-08-01 Thread Edwin Quita
we have successfully deployed a struts2 portlet that used a jndi
datasource in WAS.
our EAR file had the portlet as one of it's module.

we had issues with the jndi datasource when we added another struts2 portlet.

anybody here who encountered the same problem and found a solution?

thanks,
/kits

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



Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Dave Newton
--- On Fri, 8/1/08, Milan Milanovic wrote:
 Could you be positive that Struts 2.0.11.1 doesn't 
 do anything with session, i.e., session remains intact 
 and  session is set for folowing action in case of 
 redirect action?

Session handling is no different for a redirectAction than any other result 
(more or less).

The advice to write a test application that reproduces the error was good 
advice--without it it will even *more* difficult to help you.

Dave


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



RE: Is this obvious ?

2008-08-01 Thread Martin Gainty

i agree with Wes

I've seen many implementations with decorators which are ok as long as packages 
and version are known
e.g. @Decorator could be referencing any one of a number of interfaces
(personally I prefer implements interface as there is no ambiguity which 
package interface you are using)
IDE's (netbeans/eclipse) are ok as long as they dont change the code to behind 
the scenes conform to a framework/spec they support..a good idea that unless a 
known FactoryMethod or IOC container is specifically implemented the engineer 
should be hands on the code 
I agree on the use of accessors and mutators (vs a public declaration..)

Anyone else?
Martin
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Fri, 1 Aug 2008 09:17:46 -0400
 From: [EMAIL PROTECTED]
 To: user@struts.apache.org
 Subject: Re: Is this obvious ?
 
 Although I agree that less code is good, there gets to be a point of
 terseness that you should be wary of. I would suggest keeping getters
 and setters on your struts 2 actions for a few reasons. First, Struts
 2 Actions are simple POJOs for the most part, and by following the
 JavaBeans conventions allows the objects to be usable by more than
 just struts. Libraries like commons-beanutils and many others will
 work easily with objects following the JavaBeans conventions. Although
 it's not a hard requirement, it may help you in the future and most
 modern IDEs have helpers to generate getters and setters.
 
 -Wes
 
 On Fri, Aug 1, 2008 at 3:55 AM, Lyallex [EMAIL PROTECTED] wrote:
  Good Morning
 
  I have an Action called SomeAction
  it has a field called someInt
 
  public class SomeAction extends ActionSupport{
 
private int someInt;
public int getSomeInt(){return someInt;}
public void setSomeInt(int someInt){this.someInt = someInt;}
 
  }
 
  when this action is invoked from a form with value convertable to an
  int, then in the renderer I get hold of someInt like this
  s:property value=someInt/
  This only works if there is a getter for someInt
 
  If I go on to edit someInt in a form with this tag in it
  s:textfield name=someInt/
  then the value of the field is set because I provide a setter for someInt
 
  If I do this
 
  public class SomeAction extends ActionSupport{
 
public int someInt;
//no setter or getter, the attribute is public
 
  }
 
  Then everything works fine
 
  The question is
  If less code good, more code bad then why bother with the setters and 
  getters.
 
  This is not a question about the merits of encapsulation and
  information hiding in Object Oriented systems
  It is a question about the reason for not making fields public in a
  Struts2 Action.
 
  TIA
 
  Lyallex
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -- 
 Wesley Wannemacher
 President, Head Engineer/Consultant
 WanTii, Inc.
 http://www.wantii.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
With Windows Live for mobile, your contacts travel with you.
http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_mobile_072008

Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread Al Sutton

I refer you to the answer on sessions I gave you some emails ago.

You **REALLY** should read how session work. They are not passed through 
a servlet.


Al.

Milan Milanovic wrote:

I know that they are passed through serlvet, I'm just wondering if struts
makes some error there.

Could you be positive that Struts 2.0.11.1 doesn't do anything with session,
i.e., session remains
intact and session is set for folowing action in case of redirect action ?

--
Regards, Milan



Al Sutton wrote:
  

Milan,

Please read up on how sessions work. They are NOT passed via URLs unless 
you have cookies disabled, URL rewriting enabled on your appserver, and 
a very sick sense of what a normal configuration is.


Al.


Milan Milanovic wrote:


Hi Dave,

one short question, don't be angry ;-).

The link which when clicked action class lost its session looks like
this:

http://localhost:8080/myproject/show.action?dojo.preventCache=1224214242324id=4

Is it possible that session is not passed through this link ?

--
Regards, Milan


newton.dave wrote:
  
  

Seriously, refactor your code. 5K lines of code in 7 files
could hide all manner of nasties.
  
  

We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines,
mostly if-elseif.

It broke our cyclometric complexity meter, had to put in a bigger fuse.
It
makes Eclipse cry. It makes *me* cry. Kinda like this thread.

Dave


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





  
  

--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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






  



--
--
Al Sutton

W: www.alsutton.com
T: twitter.com/alsutton


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



Re: Struts 2.1 AjaxAnywhere

2008-08-01 Thread dynamicd

Hey Shoib,

I have tried Ajax Anywhere with Struts 2.0.12 and it didnt get me anywhere..
I did not see the ajax behavior. Did you get it to work. Canyou post some
sample code.




Shoaib Gauhar wrote:
 
 Hello,
 
 Has anyone tried AjaxAnywhere with Struts 2.1? My action class is never
 called. Actually, i am using ajax to achieve pagination in displaytag. I
 have used the example from the following link
 raibledesigns.com/rd/entry/the_future_of_the_displaytag. But the control
 doesnt reach my action class. The links addresses are updated correctly.
 After changing the page, following exception is shown in the log file.
 ognl.InappropriateExpressionException: Inappropriate OGNL expression: (d
 - 6210418) - p But after that nothing happens. The control comes back to
 the jsp without updating or refreshing my table.
 
 It would be very helpful if someone could guide me to achieve my desired
 task.
 
 Thanks in advance,
 
 sagauhar
 

-- 
View this message in context: 
http://www.nabble.com/Struts-2.1---AjaxAnywhere-tp16296577p18779908.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]



[FRIDAY]Re: Struts 2.1 AjaxAnywhere

2008-08-01 Thread Musachy Barroso
 I have tried Ajax Anywhere with Struts 2.0.12 and it didnt get me anywhere..

that a great one-liner

-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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



Re: Creating report using struts2 and pentaho

2008-08-01 Thread VICKY K

Hi,

Am facing the same problem, can you help me out in Creating  a Report Using
pentaho  Struts.

Thanks
Vicky


soum wrote:
 
 
 hi, 
 sorry for sending this message again-since i didnt get nay reply and its
 urgent
 on my project i have to creat a Report using Pentaho and struts2. Without
 using struts i am able to creat the report and disply it .but i wanted to
 customize the application and wanted to use struts in it. So for that i
 wanted to call the ViewAction class(used in pentaho to disply the data .
 this class basically take the input parameter from another XAction class
 and put the data through URL). 
 
 i wanted to create my own struts generateReportAction class and Jsp pages
 to disply the report. Now how will i call the View Action class from
 struts action class and how will i pass these parameters. 
 How should i specify the action mapper? 
 
 i will really appriciate ,If some one could send me some sample program or
 document .and any sample example where Pentaho and Struts2 are combined to
 create report. 
 
 thanks in advance 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Creating-report-using-struts2-and-pentaho-tp11010588p18782270.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: Creating report using struts2 and pentaho

2008-08-01 Thread Musachy Barroso
Why don't you just build a url with the parameters, and show it in
your page? Or a form?

musachy

On Fri, Aug 1, 2008 at 4:45 PM, VICKY K [EMAIL PROTECTED] wrote:

 Hi,

 Am facing the same problem, can you help me out in Creating  a Report Using
 pentaho  Struts.

 Thanks
 Vicky


 soum wrote:


 hi,
 sorry for sending this message again-since i didnt get nay reply and its
 urgent
 on my project i have to creat a Report using Pentaho and struts2. Without
 using struts i am able to creat the report and disply it .but i wanted to
 customize the application and wanted to use struts in it. So for that i
 wanted to call the ViewAction class(used in pentaho to disply the data .
 this class basically take the input parameter from another XAction class
 and put the data through URL).

 i wanted to create my own struts generateReportAction class and Jsp pages
 to disply the report. Now how will i call the View Action class from
 struts action class and how will i pass these parameters.
 How should i specify the action mapper?

 i will really appriciate ,If some one could send me some sample program or
 document .and any sample example where Pentaho and Struts2 are combined to
 create report.

 thanks in advance




 --
 View this message in context: 
 http://www.nabble.com/Creating-report-using-struts2-and-pentaho-tp11010588p18782270.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]





-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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



Re: My Action was three times executed

2008-08-01 Thread Laurie Harper

Johannes Geppert wrote:
since using struts 2.1.2 my actions was three times 
executed when i submit a form with dojo and sx:submit


Is this a bug, or a configuration error?


How would we know without seeing any of your code or configuration?

L.


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



Re: [Friday] Re: [OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present

2008-08-01 Thread stanlick
Is it possible you have the server session-time-to-live set to a very small
duration of time?  This might explain why the sessions are disappearing.


On Fri, Aug 1, 2008 at 11:47 AM, Milan Milanovic
[EMAIL PROTECTED]wrote:


 I know that they are passed through serlvet, I'm just wondering if struts
 makes some error there.

 Could you be positive that Struts 2.0.11.1 doesn't do anything with
 session,
 i.e., session remains
 intact and session is set for folowing action in case of redirect action ?

 --
 Regards, Milan



 Al Sutton wrote:
 
  Milan,
 
  Please read up on how sessions work. They are NOT passed via URLs unless
  you have cookies disabled, URL rewriting enabled on your appserver, and
  a very sick sense of what a normal configuration is.
 
  Al.
 
 
  Milan Milanovic wrote:
  Hi Dave,
 
  one short question, don't be angry ;-).
 
  The link which when clicked action class lost its session looks like
  this:
 
 
 http://localhost:8080/myproject/show.action?dojo.preventCache=1224214242324id=4
 
  Is it possible that session is not passed through this link ?
 
  --
  Regards, Milan
 
 
  newton.dave wrote:
 
  Seriously, refactor your code. 5K lines of code in 7 files
  could hide all manner of nasties.
 
  We have a 1M class where I'm at now. That's *1M* of source. 30k+ lines,
  mostly if-elseif.
 
  It broke our cyclometric complexity meter, had to put in a bigger fuse.
  It
  makes Eclipse cry. It makes *me* cry. Kinda like this thread.
 
  Dave
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 
 
  --
  --
  Al Sutton
 
  W: www.alsutton.com
  T: twitter.com/alsutton
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18778594.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]




Struts2 validation

2008-08-01 Thread Peter Bliznak
Hi all,
converting big S1 application and run into this problem.
Even though form is being validated in S1 version by validator.xml
there is an user field which was validated on focus lost by asynch call using 
Ajax - to find found if by user chosen
user name is still available. Call is then intercepted and handled in S1 ACTION 
with following construct
if (nameTaken) {
msg = new ActionMessage(NAME_TAKEN);
error = addMsgErrors(error,Constants.NAME_ERROR, msg);
this.addErrors(request, error);
return mapping.getInputForward();
}.
 
My question is - provided asynch check must stay - how to handle this in S2 - 
or what is best practice to handle such a case - to create validation error 
programmatically?

Thanks,

Peter


how to set classpath for servlet-api.jar, jsp-api.jar and struts.jar for Ubuntu

2008-08-01 Thread Narasimha Raju Naidu
hi to all,

i am using ubuntu OS and recently i installed tomcat and starting developing
struts applications. in order to compile my own servlet classes it is
required to set classpath. i am failing to set classpath becoz i am new to
UBUNTU. can any one resolve my problem. waiting for you people's solution.

Regads,

Narasimha Raju


-- 



uni...