Author Login
Post Reply
user Digest 1 Aug 2008 15:50:08 -0000 Issue 8173
Topics (messages 189554 through 189583):
Re: Struts2 on Websphere portal 6.1.0.0
189554 by: Struts Two
189557 by: Nils-Helge Garli Hegvik
Re: Strange Behaviour in FireFox3
189555 by: nauke.
[S2] problem still with "actionRedirect" and "redirect" results (Struts2.1.2)
189556 by: Pierre Thibaudeau
189576 by: Brad A Cupit
Is this obvious ?
189558 by: Lyallex
189564 by: stanlick.gmail.com
189567 by: Wes Wannemacher
Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present
189559 by: Milan Milanovic
Re: Asynchronous queue between two web applications
189560 by: Janesh Subrahmanyan
189561 by: Al Sutton
189563 by: Janesh Subrahmanyan
Action Execute Being called 2 times
189562 by: aum strut
189565 by: Joachim Ansorg
paramsPrepareParams vs. staticParams
189566 by: Andy Law
[OT] RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present
189568 by: Dave Newton
189569 by: Milan Milanovic
189570 by: Dave Newton
189571 by: Milan Milanovic
189572 by: Dave Newton
189573 by: Milan Milanovic
189574 by: Dave Newton
189575 by: Al Sutton
189577 by: Milan Milanovic
189578 by: Milan Milanovic
189579 by: Piero Sartini
189580 by: Al Sutton
189581 by: Milan Milanovic
189582 by: Milan Milanovic
189583 by: Al Sutton
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_189554.ezm (zipped)I am running Struts2.0.11.1 on Websphere 6.1.0.17 NOT THE WEBSPHERE PORTAL. You need to keep the followings in mind:
1- You need to have at least fixpack 13 or 15 ( I am not sure which one, otherwise you CAN NOT RUN STRUTS 2 ON WAS)
2- Struts 2.0.11.2 has problems running on Websphere 6.1 (it is missing a patch), so you need to downgrade to 2.0.11.1 till next release (2.0.11.3 or 2.0.12)
3- Once the above you are done with above steps, you need to set the following custom property for WAS server:
com.ibm.ws.webcontainer.invokefilterscompatibility = true
If you do not set the above property, you can not run struts 2 on WAS as well.
However; I did a project using struts on Websphere portal 6.0. IBM provides its own customized struts that works with portal (which is based on struts1), and it is pretty good. I recommend use the IBM's struts that comes with Portal server as you would have a hard time using struts 2 with websphere portal.
Hope this helps,
----- Original Message ----
From: Dinesh Narayanan <ndchandar@(protected)>
To: user@(protected)
Sent: Thursday, July 31, 2008 3:26:20 PM
Subject: Struts2 on Websphere portal 6.1.0.0
Has Anybody tried Struts2 (Struts-2.0.11.2) on Websphere portal 6.1.0..0? I
am running into issues when I tried a very simple JSR168 example. Any help
would be appreciated. Is there some example of struts2 sample in websphere
portal 6.1?
A) My portlet.xml contains the following entries
<init-param>
<name>viewNamespace</name>
<value>/view</value>
</init-param>
<!-- The default action to invoke in view mode. -->
<init-param>
<name>defaultViewAction</name>
<value>index</value>
</init-param>
B) My struts.xml is
<struts>
<package name="view" extends="struts-portlet-default" namespace="/view">
<action name="index" class="com.myCompany.proj1.ExampleAction">
<result name="success">/WEB-INF/view/index.jsp</result>
</action>
</package>
</struts>
Thanks
Dinesh
__________________________________________________________________
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca

Attachment:
user_189557.ezm (zipped)Thanks for the summary, although I disagree with your conclusion ;)
Nils-H
On Fri, Aug 1, 2008 at 2:21 AM, Struts Two <strutstwo@(protected):
> I am running Struts2.0.11.1 on Websphere 6.1.0.17 NOT THE WEBSPHERE PORTAL. You need to keep the followings in mind:
> 1- You need to have at least fixpack 13 or 15 ( I am not sure which one, otherwise you CAN NOT RUN STRUTS 2 ON WAS)
> 2- Struts 2.0.11.2 has problems running on Websphere 6.1 (it is missing a patch), so you need to downgrade to 2.0.11.1 till next release (2.0.11.3 or 2.0.12)
> 3- Once the above you are done with above steps, you need to set the following custom property for WAS server:
> com.ibm.ws.webcontainer.invokefilterscompatibility = true
> If you do not set the above property, you can not run struts 2 on WAS as well.
> However; I did a project using struts on Websphere portal 6.0. IBM provides its own customized struts that works with portal (which is based on struts1), and it is pretty good. I recommend use the IBM's struts that comes with Portal server as you would have a hard time using struts 2 with websphere portal.
> Hope this helps,
>
>
>
> ----- Original Message ----
> From: Dinesh Narayanan <ndchandar@(protected)>
> To: user@(protected)
> Sent: Thursday, July 31, 2008 3:26:20 PM
> Subject: Struts2 on Websphere portal 6.1.0.0
>
> Has Anybody tried Struts2 (Struts-2.0.11.2) on Websphere portal 6.1.0..0? I
> am running into issues when I tried a very simple JSR168 example. Any help
> would be appreciated. Is there some example of struts2 sample in websphere
> portal 6.1?
>
> A) My portlet.xml contains the following entries
> <init-param>
> <name>viewNamespace</name>
> <value>/view</value>
> </init-param>
>
> <!-- The default action to invoke in view mode. -->
> <init-param>
> <name>defaultViewAction</name>
> <value>index</value>
> </init-param>
>
>
> B) My struts.xml is
> <struts>
> <package name="view" extends="struts-portlet-default" namespace="/view">
> <action name="index" class="com.myCompany.proj1.ExampleAction">
> <result name="success">/WEB-INF/view/index.jsp</result>
> </action>
> </package>
> </struts>
>
>
> Thanks
> Dinesh
>
>
>
> __________________________________________________________________
> Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189555.ezm (zipped)Hi,
This is how I fixed it:
1. open the struts2-core-2.0.11.jar file
2. extract template\simple\head.ftl
3. edit it and set the debugAtAllCosts attribute to false
4. replace that file in the jar
Thanks Markus!
Nicole
On Thu, Jul 31, 2008 at 5:03 PM, nauke. <nauke0@(protected):
> ohh thank you thank you sooo much!
> I'm about to go home now but I'll try it out first thing tomorrow and let
> you all know how it went!
>
> thanks again,
> nicole
>
> On Thu, Jul 31, 2008 at 4:57 PM, Markus Stauffer <
> markus.stauffer@(protected):
>
>> I had the exact same problem.
>>
>> Turns out it is a problem in dojo 0.4.0 that is shipped with struts2.
>> I include my own build of dojo to solve the problem.
>>
>>
>> kind regards
>> --
>> Markus Stauffer
>>
>> On 7/31/08, nauke. <nauke0@(protected):
>> > Hi all,
>> >
>> > Was really not sure which mailing list to post to ...
>> >
>> > I have a java application that uses struts 2 (actions, etc).
>> > Every time I access a page (which goes through an action), my browser
>> gets
>> > to that page, but then it "skips" (for want of a better term) onto a
>> blank
>> > page (with the URL intact).
>> >
>> > I am using JBoss 4.2.2 GA.
>> >
>> > This problem only occurs with FireFox version 3.0.1 (the latest
>> version).
>> > It does not occur with FireFox version 2.0.0.16, Internet Explorer or
>> > Safari.
>> >
>> > Has anyone had this problem?
>> >
>> > Cheers
>> >
>>
>>
>> --
>> Markus Stauffer
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>

Attachment:
user_189556.ezm (zipped)I have read a number of reports spanning the last year and describing the
problem of wanting to attach parameters to an actionRedirect, as in the
following example:
<result name="input" type="redirectAction">
<param name="actionName">myAction</param>
<param name="id">23</param>
</result>
This issue has been raised a number of times, I believe, but I am not
certain what the official current status is nowadays. I seem to gather that
some people think it has been resolved prior to 2.1.2, yet I keep getting
the same error messages as described in earlier posts about it (OGNL
complaining that the "id" parameter cannot be applied to
ServletActionRedirectResult, or something of the kind).
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 be honest, my moving from Struts1 to Struts2 has been a very positive
experience---apart for OGNL's idiosyncracies, which are very trying. But
this one problematic issue about redirectAction is a real shock and
disappointment. Assuming that I am right that there is still a bug there
(and I hope I am wrong!), I would personally vote for giving that issue the
highest level of priority.)

Attachment:
user_189576.ezm (zipped)Pierre Thibaudeau [mailto:pierre.thibaudeau@(protected):
> 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

Attachment:
user_189558.ezm (zipped)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

Attachment:
user_189564.ezm (zipped)If you want less boilerplate code you should consider using Groovy for your
actions.
On Fri, Aug 1, 2008 at 2:55 AM, Lyallex <lyallex@(protected):
> 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: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189567.ezm (zipped)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 <lyallex@(protected):
> 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: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

Attachment:
user_189559.ezm (zipped)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
> <milanmilanovich@(protected):
>
>>
>> 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: user-unsubscribe@(protected)
>> >>>>> For additional commands, e-mail: user-help@(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: user-unsubscribe@(protected)
>> >>>> For additional commands, e-mail: user-help@(protected)
>> >>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> >>> For additional commands, e-mail: user-help@(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: user-unsubscribe@(protected)
>> >> For additional commands, e-mail: user-help@(protected)
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>> > For additional commands, e-mail: user-help@(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: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189560.ezm (zipped)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

Attachment:
user_189561.ezm (zipped)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: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

Attachment:
user_189563.ezm (zipped)
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: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189562.ezm (zipped)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
ModelDriven<UserProfile> {
/**
*
*/
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
*

Attachment:
user_189565.ezm (zipped)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.

Attachment:
user_189566.ezm (zipped)
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=value¶m2name=value2' at the end of any given URL)
Later,
Andy
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189568.ezm (zipped)--- 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

Attachment:
user_189569.ezm (zipped)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: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189570.ezm (zipped)--- 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

Attachment:
user_189571.ezm (zipped)
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: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189572.ezm (zipped)--- 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

Attachment:
user_189573.ezm (zipped)
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: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189574.ezm (zipped)--- On Fri, 8/1/08, Milan Milanovic <milanmilanovich@(protected):
> 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

Attachment:
user_189575.ezm (zipped)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 <milanmilanovich@(protected):
>
>> 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: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189577.ezm (zipped)
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 <milanmilanovich@(protected):
>>
>>> 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: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> --
> --
> Al Sutton
>
> W: www.alsutton.com
> T: twitter.com/alsutton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189578.ezm (zipped)
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 <milanmilanovich@(protected):
>>>
>>>> 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: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>
>>
>> --
>> --
>> Al Sutton
>>
>> W: www.alsutton.com
>> T: twitter.com/alsutton
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189579.ezm (zipped)> 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

Attachment:
user_189580.ezm (zipped)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 <milanmilanovich@(protected):
>>>
>>>
>>>> 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: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>> --
>> --
>> Al Sutton
>>
>> W: www.alsutton.com
>> T: twitter.com/alsutton
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>>
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton

Attachment:
user_189581.ezm (zipped)
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 <milanmilanovich@(protected):
>>>>
>>>>
>>>>> 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: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>
>>> --
>>> --
>>> Al Sutton
>>>
>>> W: www.alsutton.com
>>> T: twitter.com/alsutton
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>>
>>
>>
>
>
> --
> --
> Al Sutton
>
> W: www.alsutton.com
> T: twitter.com/alsutton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189582.ezm (zipped)
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: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189583.ezm (zipped):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 <milanmilanovich@(protected):
>>>>>
>>>>>
>>>>>
>>>>>> 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: user-unsubscribe@(protected)
>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> --
>>>> Al Sutton
>>>>
>>>> W: www.alsutton.com
>>>> T: twitter.com/alsutton
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>> --
>> --
>> Al Sutton
>>
>> W: www.alsutton.com
>> T: twitter.com/alsutton
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>>
>
>
--
--
Al Sutton
W: www.alsutton.com
T: twitter.com/alsutton