Re: What's the rigth way to do it ?

2002-03-11 Thread Slimane

Hi,

I don't know if your concepts are wrong :) (too newbie for that)
But I don't think your first solution seems not to comply with my problem 
and so I think I'll stick with the session object.

Although, thanx for your reply :)

Friendly Regards,
Slimane

At 19:55 10/03/2002 -0800, Someone poor demented soul by the name of 
"@Basebeans.com" presented us with the following text which may contain 
useless information.
>Subject: Re: What's the rigth way to do it 1 2 3 4 5 6 7 8 9
>From: "Tea Yu" <[EMAIL PROTECTED]>
>  ===
>Hi Slimane,
>
>It seems that you're using the same parameters or combinations from a
>parameter "set" across various pages.  And links like what you've
>mentioned are gonna be referred from a couple of pages?
>
>Can these links be factorized into more general actions like
>bla.do?category=bull&doHarm=nobe mapped tobla/whiteLie.doso
>that your users can still bookmark your pages for further reference (if
>allowed) and any change in parameter-value mappings could be done in the
>controller config in future?(General practice using Struts, please see
>Ted's resources for elaborations)
>
>If no, are the parameter values supposed to change after some period of
>time?  If so I guess session object may do the job right.
>
>Well... I'm new to struts too, just tell me if my concepts are wrong.
>
>Tea Yu
>
> > Bin,
> >
> > Thanks for your answer :)
> >
> > The fact is I don't have any EJB. So I think I'll just use the
>HttpSession
> > object :)
> > And about passing the strings as parameters* of my Action classes ? Was
>it
> > a bad idea ? If so, why ?
> >
> > * What I mean by parameters is for example doing the following:
> >  blabla
> > where param1 and param2 are my actual parameters
> > and then in the Action classes, I'll use the getParameter() method
> >
> > Thanks again,
> > Slimane
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
Make it run, Make it right, Make it fast


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




Re: What's the rigth way to do it ?

2002-03-10 Thread @Basebeans.com

Subject: Re: What's the rigth way to do it 1 2 3 4 5 6 7 8 9
From: "Tea Yu" <[EMAIL PROTECTED]>
 ===
Hi Slimane,

It seems that you're using the same parameters or combinations from a
parameter "set" across various pages.  And links like what you've
mentioned are gonna be referred from a couple of pages?

Can these links be factorized into more general actions like
bla.do?category=bull&doHarm=nobe mapped tobla/whiteLie.doso
that your users can still bookmark your pages for further reference (if
allowed) and any change in parameter-value mappings could be done in the
controller config in future?(General practice using Struts, please see
Ted's resources for elaborations)

If no, are the parameter values supposed to change after some period of
time?  If so I guess session object may do the job right.

Well... I'm new to struts too, just tell me if my concepts are wrong.

Tea Yu

> Bin,
>
> Thanks for your answer :)
>
> The fact is I don't have any EJB. So I think I'll just use the
HttpSession
> object :)
> And about passing the strings as parameters* of my Action classes ? Was
it
> a bad idea ? If so, why ?
>
> * What I mean by parameters is for example doing the following:
>  blabla
> where param1 and param2 are my actual parameters
> and then in the Action classes, I'll use the getParameter() method
>
> Thanks again,
> Slimane



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




Re: What's the rigth way to do it ?

2002-03-10 Thread Bin Zhou

Slimane,

Passing parameters using query string is ok. There are some benefits you get 
get like user can book mark it and get back to the page later on easily. The 
problem with the query string is that there is some size limitation there. I 
do not remember the exact size of the string you can pass on. It might be 
something like 8k.

A lot of populate site are using this to do it and some application use URL 
rewriting which basically is passing parameter by query string if the client 
browser disable the cookies.

Hope this help.

Bin


>From: Slimane <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: What's the rigth way to do it ?
>Date: Sun, 10 Mar 2002 17:25:42 +0100
>
>Bin,
>
>Thanks for your answer :)
>
>The fact is I don't have any EJB. So I think I'll just use the HttpSession 
>object :)
>And about passing the strings as parameters* of my Action classes ? Was it 
>a bad idea ? If so, why ?
>
>* What I mean by parameters is for example doing the following:
> blabla
>where param1 and param2 are my actual parameters
>and then in the Action classes, I'll use the getParameter() method
>
>Thanks again,
>Slimane
>
>At 10:27 10/03/2002 -0500, Someone poor demented soul by the name of "Bin 
>Zhou" presented us with the following text which may contain useless 
>information.
>>Slimane,
>>
>>I think I now understand what you are asking about.
>>
>>Basically I think your understanding of the session bean is right. In web 
>>application, we usually put the session bean as an object in the http 
>>session.  I think the following are what you may think when deciding which 
>>way to use:
>>
>>1. Do you have an application supporting EJB? Say you do not have it, then 
>>you may have to use the http session to achieve this
>>
>>2. How you want to view those string objects?  Are they coupled with any 
>>EJB as the bean's internal state? If that is the case, it may be better to 
>>go into the bean. This is better from the OOD standpoint
>>
>>3. Is either of them working? Yes. Technically both should be fine.
>>
>>Thanks,
>>
>>Bin
>>
>>
>>>From: Slimane <[EMAIL PROTECTED]>
>>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>Subject: Re: What's the rigth way to do it ?
>>>Date: Sun, 10 Mar 2002 12:22:10 +0100
>>>
>>>Hi Bin,
>>>
>>>I think I wasn't clear enough. Because, that's exactly what I want to do 
>>>! :)
>>>I just want to have a session scope Object.
>>>
>>>So, let me reformulate my "problem":
>>>
>>>I have, for example, 3 Strings. The contents of these Strings can 
>>>dynamically change. These Strings contain different values between each 
>>>user. So, normally you'll set that values into a cookie placed at the 
>>>Client's computer. But I don't want to do that, so I was first thinking 
>>>about a session bean. That bean would contain those Strings and will be 
>>>instanciated for each user (am I wrong ?).
>>>So normally, a session bean will be perfect in that case, won't it ?
>>>But, if I understood right, the session bean is placed into the 
>>>HttpSession object. So, why not place those Strings directly into the 
>>>HttpSession object ? (using the getAttribute and the setAttribute 
>>>methods)
>>>
>>>But, after a second thought, as I don't have only 3 (or 5) Strings to 
>>>share (between all my Action classes) during a session of a user. I was 
>>>thinking that maybe, placing those Strings as parameters of my Action 
>>>classes would be sufficient.
>>>
>>>So between those 2 solutions, which one is the best ? And is there maybe 
>>>a better solution ?
>>>
>>>Voilà, I hope that now I made myself clear (please excuse my poor English 
>>>:)
>>>
>>>I also hope, I didn't tell to much stupidities (I'm just a newbie :)
>>>
>>>Any help would be greatly appreciated !
>>>
>>>Friendly Regards,
>>>Slimane
>>>
>>>PS: sorry for the long reply...
>>>
>>>At 20:31 9/03/2002 -0500, you wrote:
>>>>Slimane
>>>>
>>>>Neither way will work for you as the session object will be for a single 
>>>>user only. Putting thing

Re: What's the rigth way to do it ?

2002-03-10 Thread Slimane

Bin,

Thanks for your answer :)

The fact is I don't have any EJB. So I think I'll just use the HttpSession 
object :)
And about passing the strings as parameters* of my Action classes ? Was it 
a bad idea ? If so, why ?

* What I mean by parameters is for example doing the following:
 blabla
where param1 and param2 are my actual parameters
and then in the Action classes, I'll use the getParameter() method

Thanks again,
Slimane

At 10:27 10/03/2002 -0500, Someone poor demented soul by the name of "Bin 
Zhou" presented us with the following text which may contain useless 
information.
>Slimane,
>
>I think I now understand what you are asking about.
>
>Basically I think your understanding of the session bean is right. In web 
>application, we usually put the session bean as an object in the http 
>session.  I think the following are what you may think when deciding which 
>way to use:
>
>1. Do you have an application supporting EJB? Say you do not have it, then 
>you may have to use the http session to achieve this
>
>2. How you want to view those string objects?  Are they coupled with any 
>EJB as the bean's internal state? If that is the case, it may be better to 
>go into the bean. This is better from the OOD standpoint
>
>3. Is either of them working? Yes. Technically both should be fine.
>
>Thanks,
>
>Bin
>
>
>>From: Slimane <[EMAIL PROTECTED]>
>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>Subject: Re: What's the rigth way to do it ?
>>Date: Sun, 10 Mar 2002 12:22:10 +0100
>>
>>Hi Bin,
>>
>>I think I wasn't clear enough. Because, that's exactly what I want to do ! :)
>>I just want to have a session scope Object.
>>
>>So, let me reformulate my "problem":
>>
>>I have, for example, 3 Strings. The contents of these Strings can 
>>dynamically change. These Strings contain different values between each 
>>user. So, normally you'll set that values into a cookie placed at the 
>>Client's computer. But I don't want to do that, so I was first thinking 
>>about a session bean. That bean would contain those Strings and will be 
>>instanciated for each user (am I wrong ?).
>>So normally, a session bean will be perfect in that case, won't it ?
>>But, if I understood right, the session bean is placed into the 
>>HttpSession object. So, why not place those Strings directly into the 
>>HttpSession object ? (using the getAttribute and the setAttribute methods)
>>
>>But, after a second thought, as I don't have only 3 (or 5) Strings to 
>>share (between all my Action classes) during a session of a user. I was 
>>thinking that maybe, placing those Strings as parameters of my Action 
>>classes would be sufficient.
>>
>>So between those 2 solutions, which one is the best ? And is there maybe 
>>a better solution ?
>>
>>Voilà, I hope that now I made myself clear (please excuse my poor English :)
>>
>>I also hope, I didn't tell to much stupidities (I'm just a newbie :)
>>
>>Any help would be greatly appreciated !
>>
>>Friendly Regards,
>>Slimane
>>
>>PS: sorry for the long reply...
>>
>>At 20:31 9/03/2002 -0500, you wrote:
>>>Slimane
>>>
>>>Neither way will work for you as the session object will be for a single 
>>>user only. Putting things in the URL query string has the same effect. 
>>>What you should be looking for may be Appliation scope object or some 
>>>other ways like persist the data to the database or server file etc.
>>>
>>>Hope this helps.
>>>
>>>Bin
>>>
>>>
>>>>From: Slimane <[EMAIL PROTECTED]>
>>>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>>To: [EMAIL PROTECTED]
>>>>Subject: What's the rigth way to do it ?
>>>>Date: Sat, 09 Mar 2002 23:30:24 +0100
>>>>
>>>>Hi,
>>>>
>>>>I have a set of Objects (mainly Strings) that I would like to share inside
>>>>my web application for each user. So I was thinking about setting all these
>>>>objects using the HttpSession object. (using the methods getAttribute() and
>>>>setAttribute()).
>>>>
>>>>But in a second thought, as there are only a few String that I need to
>>>>share. I could easily pass them as parameters to my Action classes.
>>>>
>>>>So, I was wondering what's the right wa

Re: What's the rigth way to do it ?

2002-03-10 Thread Bin Zhou

Slimane,

I think I now understand what you are asking about.

Basically I think your understanding of the session bean is right. In web 
application, we usually put the session bean as an object in the http 
session.  I think the following are what you may think when deciding which 
way to use:

1. Do you have an application supporting EJB? Say you do not have it, then 
you may have to use the http session to achieve this

2. How you want to view those string objects?  Are they coupled with any EJB 
as the bean's internal state? If that is the case, it may be better to go 
into the bean. This is better from the OOD standpoint

3. Is either of them working? Yes. Technically both should be fine.

Thanks,

Bin


>From: Slimane <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: What's the rigth way to do it ?
>Date: Sun, 10 Mar 2002 12:22:10 +0100
>
>Hi Bin,
>
>I think I wasn't clear enough. Because, that's exactly what I want to do ! 
>:)
>I just want to have a session scope Object.
>
>So, let me reformulate my "problem":
>
>I have, for example, 3 Strings. The contents of these Strings can 
>dynamically change. These Strings contain different values between each 
>user. So, normally you'll set that values into a cookie placed at the 
>Client's computer. But I don't want to do that, so I was first thinking 
>about a session bean. That bean would contain those Strings and will be 
>instanciated for each user (am I wrong ?).
>So normally, a session bean will be perfect in that case, won't it ?
>But, if I understood right, the session bean is placed into the HttpSession 
>object. So, why not place those Strings directly into the HttpSession 
>object ? (using the getAttribute and the setAttribute methods)
>
>But, after a second thought, as I don't have only 3 (or 5) Strings to share 
>(between all my Action classes) during a session of a user. I was thinking 
>that maybe, placing those Strings as parameters of my Action classes would 
>be sufficient.
>
>So between those 2 solutions, which one is the best ? And is there maybe a 
>better solution ?
>
>Voilà, I hope that now I made myself clear (please excuse my poor English 
>:)
>
>I also hope, I didn't tell to much stupidities (I'm just a newbie :)
>
>Any help would be greatly appreciated !
>
>Friendly Regards,
>Slimane
>
>PS: sorry for the long reply...
>
>At 20:31 9/03/2002 -0500, you wrote:
>>Slimane
>>
>>Neither way will work for you as the session object will be for a single 
>>user only. Putting things in the URL query string has the same effect. 
>>What you should be looking for may be Appliation scope object or some 
>>other ways like persist the data to the database or server file etc.
>>
>>Hope this helps.
>>
>>Bin
>>
>>
>>>From: Slimane <[EMAIL PROTECTED]>
>>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>To: [EMAIL PROTECTED]
>>>Subject: What's the rigth way to do it ?
>>>Date: Sat, 09 Mar 2002 23:30:24 +0100
>>>
>>>Hi,
>>>
>>>I have a set of Objects (mainly Strings) that I would like to share 
>>>inside
>>>my web application for each user. So I was thinking about setting all 
>>>these
>>>objects using the HttpSession object. (using the methods getAttribute() 
>>>and
>>>setAttribute()).
>>>
>>>But in a second thought, as there are only a few String that I need to
>>>share. I could easily pass them as parameters to my Action classes.
>>>
>>>So, I was wondering what's the right way ? If there's only a few Strings,
>>>isn't it easier to pass them as parameters instead of using the session
>>>object ?
>>>
>>>Thanx in advance for your replys.
>>>
>>>Friendly Regards,
>>>Slimane
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>><mailto:[EMAIL PROTECTED]>
>>>For additional commands, e-mail: 
>>><mailto:[EMAIL PROTECTED]>
>>
>>
>>_
>>MSN Photos is the easiest way to share and print your photos: 
>>http://photos.msn.com/support/worldwide.aspx
>>
>>
>>--
>>To unsubscribe, e-mail:   
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: 
>><mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Re: What's the rigth way to do it ?

2002-03-10 Thread Slimane

Hi Bin,

I think I wasn't clear enough. Because, that's exactly what I want to do ! :)
I just want to have a session scope Object.

So, let me reformulate my "problem":

I have, for example, 3 Strings. The contents of these Strings can 
dynamically change. These Strings contain different values between each 
user. So, normally you'll set that values into a cookie placed at the 
Client's computer. But I don't want to do that, so I was first thinking 
about a session bean. That bean would contain those Strings and will be 
instanciated for each user (am I wrong ?).
So normally, a session bean will be perfect in that case, won't it ?
But, if I understood right, the session bean is placed into the HttpSession 
object. So, why not place those Strings directly into the HttpSession 
object ? (using the getAttribute and the setAttribute methods)

But, after a second thought, as I don't have only 3 (or 5) Strings to share 
(between all my Action classes) during a session of a user. I was thinking 
that maybe, placing those Strings as parameters of my Action classes would 
be sufficient.

So between those 2 solutions, which one is the best ? And is there maybe a 
better solution ?

Voilà, I hope that now I made myself clear (please excuse my poor English :)

I also hope, I didn't tell to much stupidities (I'm just a newbie :)

Any help would be greatly appreciated !

Friendly Regards,
Slimane

PS: sorry for the long reply...

At 20:31 9/03/2002 -0500, you wrote:
>Slimane
>
>Neither way will work for you as the session object will be for a single 
>user only. Putting things in the URL query string has the same effect. 
>What you should be looking for may be Appliation scope object or some 
>other ways like persist the data to the database or server file etc.
>
>Hope this helps.
>
>Bin
>
>
>>From: Slimane <[EMAIL PROTECTED]>
>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED]
>>Subject: What's the rigth way to do it ?
>>Date: Sat, 09 Mar 2002 23:30:24 +0100
>>
>>Hi,
>>
>>I have a set of Objects (mainly Strings) that I would like to share inside
>>my web application for each user. So I was thinking about setting all these
>>objects using the HttpSession object. (using the methods getAttribute() and
>>setAttribute()).
>>
>>But in a second thought, as there are only a few String that I need to
>>share. I could easily pass them as parameters to my Action classes.
>>
>>So, I was wondering what's the right way ? If there's only a few Strings,
>>isn't it easier to pass them as parameters instead of using the session
>>object ?
>>
>>Thanx in advance for your replys.
>>
>>Friendly Regards,
>>Slimane
>>
>>
>>--
>>To unsubscribe, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>_
>MSN Photos is the easiest way to share and print your photos: 
>http://photos.msn.com/support/worldwide.aspx
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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




Re: What's the rigth way to do it ?

2002-03-09 Thread Bin Zhou

Slimane

Neither way will work for you as the session object will be for a single 
user only. Putting things in the URL query string has the same effect. What 
you should be looking for may be Appliation scope object or some other ways 
like persist the data to the database or server file etc.

Hope this helps.

Bin


>From: Slimane <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: What's the rigth way to do it ?
>Date: Sat, 09 Mar 2002 23:30:24 +0100
>
>Hi,
>
>I have a set of Objects (mainly Strings) that I would like to share inside
>my web application for each user. So I was thinking about setting all these
>objects using the HttpSession object. (using the methods getAttribute() and
>setAttribute()).
>
>But in a second thought, as there are only a few String that I need to
>share. I could easily pass them as parameters to my Action classes.
>
>So, I was wondering what's the right way ? If there's only a few Strings,
>isn't it easier to pass them as parameters instead of using the session
>object ?
>
>Thanx in advance for your replys.
>
>Friendly Regards,
>Slimane
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>


_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




What's the rigth way to do it ?

2002-03-09 Thread Slimane

Hi,

I have a set of Objects (mainly Strings) that I would like to share inside 
my web application for each user. So I was thinking about setting all these 
objects using the HttpSession object. (using the methods getAttribute() and 
setAttribute()).

But in a second thought, as there are only a few String that I need to 
share. I could easily pass them as parameters to my Action classes.

So, I was wondering what's the right way ? If there's only a few Strings, 
isn't it easier to pass them as parameters instead of using the session 
object ?

Thanx in advance for your replys.

Friendly Regards,
Slimane


--
To unsubscribe, e-mail:   
For additional commands, e-mail: