RESUBMIT: Trapping timeout of HttpSession

2003-03-19 Thread Rick Ashley
In case where HttpSession is expired and user makes a submit,
my opinion is that application must handle expiration in centralized place 
before it goes to Action-classes and maybe causes
NullPointer exceptions somewhere in code. Application should
forward request which session is expired to error jsp page that shows some 
timeout informationtext to user.

Usually these checking are handled in controller servlet,
but because I'm a new with Struts I asked how it's usually
done there.
So, does anyone know what is the right place to put this kind of
checking in Struts application? Is in RequestProcessor or what?
Thanks,


From: "Max Cooper" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Trapping timeout of HttpSession
Date: Wed, 19 Mar 2003 16:24:44 -0800
If their session expired, it is gone. The form submittal will generally 
look
like it is from a new visitor that had no session. What do you want to do 
in
the case that the user submits a form and their session had expired? I 
think
you might be able to make a good guess if they used to have a session but 
it
expired, but it might not be worth the trouble if knowing that information
doesn't really acheive anything useful for your situation.

-Max

- Original Message -
From: "Rick Ashley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 19, 2003 11:57 AM
Subject: Trapping timeout of HttpSession
> Hello,
>
> What is the best place to check if user's HttpSession has expired?
> I mean situation where e.g. timeout of Web application is 30 minutes
> and after that user tries to submit a form.
>
> Is it ok to check it e.g. in RequestProcessor or somewhere else and how?
>
> Anyone have a sample code?
>
> Br
>
> r a
>
>
>
>
>
>
> _
> It's fast, it's easy and it's free. Get MSN Messenger today!
> http://messenger.msn.co.uk
>
>
> -
> 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]


_
Express yourself with cool emoticons http://messenger.msn.co.uk
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Sys-con Radio Interview on Struts and Opensource

2003-03-19 Thread Andrew Hill
Not enough bandwidth :-(
Is there a transcript anywhere?

-Original Message-
From: James Turner [mailto:[EMAIL PROTECTED]
Sent: Thursday, 20 March 2003 15:47
To: [EMAIL PROTECTED]
Subject: Sys-con Radio Interview on Struts and Opensource


I was interviewed today at the WebEdge conference in Boston, I talked
about Struts and open source, among other topics.  If you're interested,
you can here it at:

http://www.sys-con.com/webservicesedge2003east/radio/radio.cfm

Look for: SYS-CON Radio Interviews Author James Turner

James



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



Sys-con Radio Interview on Struts and Opensource

2003-03-19 Thread James Turner
I was interviewed today at the WebEdge conference in Boston, I talked
about Struts and open source, among other topics.  If you're interested,
you can here it at:

http://www.sys-con.com/webservicesedge2003east/radio/radio.cfm

Look for: SYS-CON Radio Interviews Author James Turner

James



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



RE: PrePopulation Problem - Urgent

2003-03-19 Thread du Plessis, Corneil C
Makes sure redirect=false in the forward.

-Original Message-
From: ashokd [mailto:[EMAIL PROTECTED]
Sent: 21 March, 2002 07:11
To: [EMAIL PROTECTED]
Subject: PrePopulation Problem - Urgent
Importance: High


Hi,

I have a .jsp page, In this page if the user clicks a Hyper link one Action
class will invoke.
In this action class I am setting some values to the Form Bean and
redirecting to the same page.
These values are not prepopulating in jsp page.

When the user navigates to another page and then comes to the first page
then these values are populating.

This problem is coming with Specific IE versions only.

After putting cache invalidate tag this problem overcome in some versions.
<%
 response.setHeader("Cache-Control","no-cache");
 response.setHeader("Pragma","no-cache");
%>


But still it is their in one Version of  I.E 5.0

I taken the form bean values into strings and printing down in jsp page.

These values are coming good but not prepopulating.

Even though I tried directly assiging these string values to 

RE: Calendar tag lib

2003-03-19 Thread Mick . Knutson
It would be nice to set itself from the Session Locale.

 
  _  

Thank You
 
Mick Knutson
 
Sr. Designer - Project Trust
aUBS AG, Financial - Zürich
Office: +41 (0)1/234.42.75
Internal: 48194
Mobile: 079.726.14.26
  _  



-Original Message-
From: Kruse, Matt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 6:55 PM
To: Struts Users Mailing List
Subject: RE: Calendar tag lib


> Will it be i18N compliant?

In what sense? The javascript itself is already able to be customized by
changing day/month names, week start day, date format, etc. These will then
become parameters in the taglib. Or do you mean that it should automatically
do these things based on which locale is being used? I have to admit, I
don't know anything about how Struts/taglibs handle that, so I will need to
look into that as well. But my goal is to have it be as automated as
possible with logical defaults, in addition to having everything
customizable.

If anyone has further thoughts, feel free to take this off-list and contact
me directly!

Matt

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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



Country select pull down.

2003-03-19 Thread Mick . Knutson
I wanted to create a Country pull down with the  tag, but I have 280 
countries added, but I get errors with a list that long.
I have also read about the error here on this list about there being too many 
 tags in a JSP, but,
How do I add such a large pull down to a ?




Thank You

Mick Knutson

Sr. Designer - Project Trust
aUBS AG, Financial - Zürich
Office: +41 (0)1/234.42.75
Internal: 48194
Mobile: 079.726.14.26

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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



Re: webapps and single sign on

2003-03-19 Thread Navjot Singh
hi umberto,

search for mod_osso and you will get plethora of info ;-)

-navjot


- Original Message -
From: "Umberto Nicoletti" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 19, 2003 4:21 PM
Subject: Re: webapps and single sign on


| On Wed, 2003-03-19 at 13:40, Navjot Singh wrote:
| > hi,
| >
| > + Set a cookie with common name for all of them :-)
| > + Write a program that is capable to convert/transfer one app's cookie
to
| > other app's cookie. (Oracle sign-on and microsoft etc do the same stuff)
|
| I'm curious about this and it might come handy for a couple of projects,
| have you any good pointer to resources or documentation about it?
|
| Thanks,
| umberto
|
| > + Use JAAS if you are thinking of some good solution. Little time
consuming
| > :-)
| >
| > regards
| > navjot singh
| >
| > - Original Message -
| > From: "siddharth" <[EMAIL PROTECTED]>
| > To: <[EMAIL PROTECTED]>
| > Sent: Wednesday, March 19, 2003 1:55 PM
| > Subject: webapps and single sign on
| >
| >
| > | hello,
| > |
| > | i have developed 3 web-apps  using Struts. Let say app1, app2 and
app3.
| > | I am currently using tomcat4 to run these apps.
| > |
| > | These apps are deployed as
| > | /var/tomcat4/webapps/app1
| > | /var/tomcat4/webapps/app2
| > | /var/tomcat4/webapps/app2
| > |
| > | Each web-app is having its own login/logout mechanism. Users are
common
| > | for all the 3 apps. username and passwords are stored in database.
| > |
| > | Now if i want to have 'Single sign on' for these 3 apps, how it is
| > | possible 
| > |
| > | suggest all available options.
| > |
| > | bye.
| > | --
| > |   siddharth
| > |   [EMAIL PROTECTED]
| > |
| > | --
| > | http://www.fastmail.fm - Faster than the air-speed velocity of an
| > |   unladen european swallow
| > |
| > | -
| > | 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]
| >
| --
| Umberto Nicoletti
| [EMAIL PROTECTED] | Tel. +390415701366
|
| "We'll try to make different mistakes this time." - Larry Wall
|
|
| -
| 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: ActionError not supporting bundle

2003-03-19 Thread Navjot Singh
hi david,

I am also in the same boat, buddy.

I am trying wuite a few things. Will let you know about the progress.
Struts Config do take multiple message resources. You can use them also in
diff Action files.

But with validations, i am not so sure.
No doubt, it is huge limitaiton if Struts won't be able to support multiple
message resources for validators.

regards
navjot singh

- Original Message -
From: "David Gagnon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 19, 2003 9:04 PM
Subject: ActionError not supporting bundle


| Hi all,
|
|   I look into the RC1 code to find that ActionError
| doesn't allow to specify the bundle to search for a
| given error message.
|
|   I my application I have multiple modules and
| multiple message ressource files.  How can I specify
| error messages coming from different bundles?
|
| The Errors Tag doesn't support to specify a bundle
| too.
|
| I initially got this problem in validator. I put my
| generic error messages in the base message resource
| file and the column name in a specific module.
|
| So I guess you are already aware of the problem ... it
| seem to be a big limitation if I want to use multiple
| resource files :-/
|
| I just want to know if this is planned to be fixed in
| Struts 1.1?
|
| If not I suppose the only work around is to use only
| one property file ... for the whole application ...
| but that gone be a huge file ... is that a problem.
|
| Do you have any solution I haven't think of ?
|
| Thanks for your help !
| Best Regards
| /David
|
|
|
|
|


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



how to deploy a simple struts application in iplanet webserver6.0

2003-03-19 Thread Ramesh_KumarP
 
Hi,
 
i am new to iplanet webserver 6.0 and struts..
i just tried a simple web appication with struts ActionServlet  just it
check the input and accordingly forward to different jsp.but i was not able
to run the application .it is giving servelet exception while loading itself
i am using only the ActionServlet, i am not using ActionForm
 
my directory structure is :
i have created a web app in server doc root(iplanet/server/doc)
 
Test
   WEB-INF
  classes
  lib
  bin   

i have put action servlet inside classes dir
i have given the mapping in web-apps.xml of virtual server.
 
that is all i have done.. 
please  help me to solve this problem
 
Regards,
 
P.RAMESHKUMAR,
 
** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**


Re: Control Access

2003-03-19 Thread Scott Barr

Or as Max Cooper says, check out the securityfilter project :D
I haven't used it myself, I use container manager authentication and
jdbc realms, but the securityfilter project does look pretty cool.

Scott Barr
www.exergonic.com.au


On Thu, 2003-03-20 at 15:59, Joey Ebright wrote:
> The documentation that comes with Struts and the examples actually show 
> a great example of doing this.  Basically there is a tag that you place 
> at the top of each JSP page that checks to see if the user has an object 
> in session (has logged in) and if not, redirects them to the login page. 
>  Hope this helps...
> 
> mahesh kagitha wrote:
> 
> >Can any one please explain  the following...
> >
> >I'm developing an application which has login page(JSP) to access the application 
> >and I should allow only the successfully logged in users to navigate my application 
> >otherwise  direct  to login page. My question here is... How can I do that.?
> >
> > 
> >
> >Thanks in Advance.
> >
> > 
> >
> >
> >
> >-
> >Do you Yahoo!?
> >Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> >  
> >
> 
> 
> 
> 
> -
> 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: Control Access

2003-03-19 Thread David Graham
Actually, that's not a very good way of doing authentication.  The view 
layer (JSP) should not know about authenticating the user.  This should be 
done in a Filter or Action before the user ever reaches the view.

David



From: Joey Ebright <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Control Access
Date: Wed, 19 Mar 2003 21:29:20 -0800
The documentation that comes with Struts and the examples actually show a 
great example of doing this.  Basically there is a tag that you place at 
the top of each JSP page that checks to see if the user has an object in 
session (has logged in) and if not, redirects them to the login page. Hope 
this helps...

mahesh kagitha wrote:

Can any one please explain  the following...

I'm developing an application which has login page(JSP) to access the 
application and I should allow only the successfully logged in users to 
navigate my application otherwise  direct  to login page. My question here 
is... How can I do that.?



Thanks in Advance.





-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!





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


_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

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


Re: Control Access

2003-03-19 Thread Joey Ebright
The documentation that comes with Struts and the examples actually show 
a great example of doing this.  Basically there is a tag that you place 
at the top of each JSP page that checks to see if the user has an object 
in session (has logged in) and if not, redirects them to the login page. 
Hope this helps...

mahesh kagitha wrote:

Can any one please explain  the following...

I'm developing an application which has login page(JSP) to access the application and I should allow only the successfully logged in users to navigate my application otherwise  direct  to login page. My question here is... How can I do that.?



Thanks in Advance.





-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
 





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


Re: Trap listener exceptions

2003-03-19 Thread David Graham
You can't.  The listener method doesn't define any thrown exceptions so your 
implementation can't either.

David



From: Mohan Radhakrishnan <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: Trap listener exceptions
Date: Thu, 20 Mar 2003 09:04:34 +0530
Hi

What is the best practice to trap exceptions thrown in listeners ? My
ServletContextListener might throw custom exceptions which the UI should
respond to properly by showing a message.
How do you make custom exceptions bubble up from methods like

public void contextInitialized( ServletContextEvent sce ){ // throws
DataException
}
Mohan

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


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

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


Pupulating Table in edit mode

2003-03-19 Thread Ritesh Singhal
Title: Message



Hi 
All,
 
I have a screen in 
which I displays some data in a table format. Now the columns of this table will 
be submitted as array in to the form bean. So we have a column name "status" we 
will have methods in form bean like: 
setStatus(String[] 
status)
String[] 
getStatus()
 
Now suppose I want 
to read the data stored in this arrays in a edit screen, so I will have some 
text fields like:

 
This will not print 
the proper values as property "status" is an array. Is there a way to read the 
values from the arrays in a text field? 
 
Thanks and 
Regards
Ritesh
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

PrePopulation Problem - Urgent

2003-03-19 Thread ashokd
Hi,

I have a .jsp page, In this page if the user clicks a Hyper link one Action
class will invoke.
In this action class I am setting some values to the Form Bean and
redirecting to the same page.
These values are not prepopulating in jsp page.

When the user navigates to another page and then comes to the first page
then these values are populating.

This problem is coming with Specific IE versions only.

After putting cache invalidate tag this problem overcome in some versions.
<%
 response.setHeader("Cache-Control","no-cache");
 response.setHeader("Pragma","no-cache");
%>


But still it is their in one Version of  I.E 5.0

I taken the form bean values into strings and printing down in jsp page.

These values are coming good but not prepopulating.

Even though I tried directly assiging these string values to 

help :::: sturts on iplanet

2003-03-19 Thread Ramesh_KumarP
Hi all ,
I am using iplanet webserver 6.0 . can anyone tell me how to configure
iplanet to work sturts..
 
Rameshkumar
 
** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**


Re: Problem with Struts Validator

2003-03-19 Thread Steve Stair
The problem is that the JavaScript code that is generated looks
something like

   return validateMaxLength(form) && validateMinLength(form) &&
validateRequired(form); 

so the methods are being called from left to right, and as soon as one
generates errors,
the rest don't get called.  Of course we don't want the rest of the
methods to get called,
since we'd get a separate alert popup for each method.

The right way to do it is to call one method that gathers ALL the
errors, and presents ONE
alert popup.


--
Steve Stair


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



Re: Focus where I last clicked

2003-03-19 Thread Steve Stair
> In our struts app, I have a submit image quite a way down a 
> fairly long page.  When the user clicks that image and struts
forwards
> them back to the same page, they are automatically sent to the top
of
> the page.  Is there any way for the app to 'remember' where the user
> was on the page and return them to that position?


Just change the action to which your form submits from:

 
to
 


In your JSP you will need something like:



at the place you want the browser to scroll to. How you get it there,
is left as an exercise for the reader. :)



--
Steve Stair


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



Trap listener exceptions

2003-03-19 Thread Mohan Radhakrishnan
Hi

What is the best practice to trap exceptions thrown in listeners ? My
ServletContextListener might throw custom exceptions which the UI should
respond to properly by showing a message.

How do you make custom exceptions bubble up from methods like

public void contextInitialized( ServletContextEvent sce ){ // throws
DataException
}

Mohan

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



RE: Connection Pool

2003-03-19 Thread Lee, Dennis
Hi,

Sorry, it's a property of , not 

Best Regards,
Dennis Lee

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:55 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

You can check the DTD, the key is a property of , so you
should set it in data-sources like this.



...
...
  

Best Regards,
Dennis Lee

-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:42 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


This is the definition in the struts-config.xml file.

  
  






















































  












  

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:36 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

I declared different datasource for different environment (Development, UAT,
Production).  
"desconfig" is an object of my "Configuration class", it has an attribute
"datasource" of the type String.  

I am using Struts 1.1b2.

Maybe you should post your datasource setting in struts-config.xml as well.

Best Regards,
Dennis Lee


-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Dennis,

Thank you very much. However, what do you declare "desconfig" as?

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:24 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

Here is my code snippet:

// initialization - Datasource and Name Service
log.info("Initializing configuration plug in : Datasource
and Name service");
DataSource dataSource = null;
if (StringUtils.isEmpty(desconfig.getDatasource())) {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
} else {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(desconfig.getDatasource());

servlet.getServletContext().setAttribute(Action.DATA_SOURCE_KEY,
dataSource);
}

Note:
desconfig.getDatasource() returns a String of my datasource key.
I set the the retrieved datasource to Action.DATA_SOURCE_KEY to easy later
access.

It works for me.

Best Regards,
Dennis Lee

-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 9:59 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Also, it seems when you have a list of datasources, the only one that is
recognized is the last one...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Connection Pool
>Date: Wed, 19 Mar 2003 19:23:40 -0500
>
>David,
>
>When i try to access it via the defined key, the DataSource object is null.
>The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource =
>(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
>
>If i try something like:
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource = (DataSource)context.getAttribute("Datasource1");
>
>where "Datasource1" is the "key" in the struts-config.xml file, it doesn't
>work...
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 7:23 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Connection Pool
>
>
>Struts stores the DataSources in the ServletContext under the key you
>define

RE: Connection Pool

2003-03-19 Thread Lee, Dennis
Hi,

You can check the DTD, the key is a property of , so you
should set it in data-sources like this.



...
...
  

Best Regards,
Dennis Lee

-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:42 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


This is the definition in the struts-config.xml file.

  
  






















































  












  

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:36 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

I declared different datasource for different environment (Development, UAT,
Production).  
"desconfig" is an object of my "Configuration class", it has an attribute
"datasource" of the type String.  

I am using Struts 1.1b2.

Maybe you should post your datasource setting in struts-config.xml as well.

Best Regards,
Dennis Lee


-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Dennis,

Thank you very much. However, what do you declare "desconfig" as?

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:24 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

Here is my code snippet:

// initialization - Datasource and Name Service
log.info("Initializing configuration plug in : Datasource
and Name service");
DataSource dataSource = null;
if (StringUtils.isEmpty(desconfig.getDatasource())) {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
} else {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(desconfig.getDatasource());

servlet.getServletContext().setAttribute(Action.DATA_SOURCE_KEY,
dataSource);
}

Note:
desconfig.getDatasource() returns a String of my datasource key.
I set the the retrieved datasource to Action.DATA_SOURCE_KEY to easy later
access.

It works for me.

Best Regards,
Dennis Lee

-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 9:59 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Also, it seems when you have a list of datasources, the only one that is
recognized is the last one...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Connection Pool
>Date: Wed, 19 Mar 2003 19:23:40 -0500
>
>David,
>
>When i try to access it via the defined key, the DataSource object is null.
>The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource =
>(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
>
>If i try something like:
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource = (DataSource)context.getAttribute("Datasource1");
>
>where "Datasource1" is the "key" in the struts-config.xml file, it doesn't
>work...
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 7:23 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Connection Pool
>
>
>Struts stores the DataSources in the ServletContext under the key you
>defined.
>
>David
>
>
>
> >From: Jimmy Emmanual <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: Connection Pool
> >Date: Wed, 19 Mar 2003 19:18:11 -050

RE: Connection Pool

2003-03-19 Thread Jimmy Emmanual
Thanks, i'll look at the DTD for more info...

I thought that was what i was doing with . Almost every document i've read says i should be
able to get the datasource via the key "prdDataexport", but the only way i
get it is when i use the default Action.DATA_SOURCE_KEY...

Also, i'm using struts 1.0.2.

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:49 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


The set-property element calls a setter on the DataSource java bean.  Use 
the key attribute of the data-source element to assign keys.  See the 
struts-config.xml DTD for details.

David




>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Connection Pool
>Date: Wed, 19 Mar 2003 21:41:32 -0500
>
>This is the definition in the struts-config.xml file.
>
>   
>
>   
>   
>   
>   />
>   value="com.sybase.jdbc2.jdbc.SybDriver" />
>   value="jdbc:sybase:Tds:PRODUCTION:4100/dataexport" />
>   
>   
>   
>   
>   
>
>   
>   
>   
>   value="com.sybase.jdbc2.jdbc.SybDriver" />
>   value="jdbc:sybase:Tds:PRODUCTION:4100/GPS" />
>   
>   
>   
>   
>   
>
>   
>   
>   
>   value="com.sybase.jdbc2.jdbc.SybDriver" />
>   value="jdbc:sybase:Tds:PRODUCTION:4100/GPS4" />
>   
>   
>   
>   
>   
>
>   
>   
>   
>   value="com.sybase.jdbc2.jdbc.SybDriver" />
>   value="jdbc:sybase:Tds:REPLICATION:4100/GPS" />
>   
>   
>   
>   
>   
>
>   
>   
>   
>   value="com.sybase.jdbc2.jdbc.SybDriver" />
>   value="jdbc:sybase:Tds:TEST:4100/dataexport" />
>   
>   
>   
>   
>   
>
>   
>   
>   
>   value="com.sybase.jdbc2.jdbc.SybDriver" />
>   value="jdbc:sybase:Tds:TEST:4100/GPS_QA" />
>   
>   
>   
>   
>   
>
>   
>
>-Original Message-
>From: Lee, Dennis [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 9:36 PM
>To: 'Struts Users Mailing List'
>Subject: RE: Connection Pool
>
>
>Hi,
>
>I declared different datasource for different environment (Development, 
>UAT,
>Production).
>"desconfig" is an object of my "Configuration class", it has an attribute
>"datasource" of the type String.
>
>I am using Struts 1.1b2.
>
>Maybe you should post your datasource setting in struts-config.xml as well.
>
>Best Regards,
>Dennis Lee
>
>
>-Original Message-
>From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
>Sent: Thursday, March 20, 2003 10:28 AM
>To: 'Struts Users Mailing List'
>Subject: RE: Connection Pool
>
>
>Dennis,
>
>Thank you very much. However, what do you declare "desconfig" as?
>
>-Original Message-
>From: Lee, Dennis [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 9:24 PM
>To: 'Struts Users Mailing List'
>Subject: RE: Connection Pool
>
>
>Hi,
>
>Here is my code snippet:
>
>   // initialization - Datasource and Name Service
>   log.info("Initializing configuration plug in : Datasource
>and Name service");
>   DataSource dataSource = null;
>   if (StringUtils.isEmpty(desconfig.getDatasource())) {
>   dataSource = (DataSource)
>servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
>   } else {
>   dataSource = (DataSource)
>servlet.getServletContext().getAttribute(desconfig.getDatasource());
>
>servlet.getServletContext().setAttribute(Action.DATA_SOURCE_KEY,
>dataSource);
>   }
>
>Note:
>desconfig.getDatasource() returns a String of my datasource key.
>I set the the retrieved datasource to Action.DATA_SOURCE_KEY to easy later
>access.
>
>It works for me.
>
>Best Regards,
>Dennis Lee
>
>-Original Message-
>From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
>Sent: Thursday, March 20, 2003 9:59 AM
>To: 'Struts Users Mailing List'
>Subject: RE: Connection Pool
>
>
>Also, it seems when you have a list of datasources, the only one that is
>recognized is the last one...
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 7:29 PM
>To: [EMAIL PROTECTED]
>Subject: RE: Connection Pool
>
>
>Are you using modules? Why don't you print out the contents of
>ServletContext to see if it's in there?
>
>David
>
>
>
> >From: Jimmy Emmanual <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'Struts Users Mailing List'" <[EMAIL PROTEC

Re: URL Rewriting

2003-03-19 Thread Max Cooper
You do actually have to go through the pains of rewriting all of your URLs
in links and things for this to work. If you have a link in a page like
this: Lose it! you will lose the session,
since there is no call to rewrite the URL.

I believe that the Struts tags will rewrite the URLs as part of their normal
processing, so they might be very helpful. But you have to use them
consistently! One bad URL in the whole site/app will drop the session if the
user clicks on it.

-Max

- Original Message -
From: "Wendy Cameron" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 19, 2003 6:39 PM
Subject: RE: URL Rewriting


This is what I would have expected, but isnt our experience and I am not
sure why.

Regards Wendy

> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 20, 2003 12:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: URL Rewriting
>
>
> My Tomcat 4.1.18 does this automatically if cookies are off.
>
> David
>
>
>
> >From: "Wendy Cameron" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List (E-mail)"
> <[EMAIL PROTECTED]>
> >Subject: URL Rewriting
> >Date: Thu, 20 Mar 2003 12:36:44 +1000
> >
> >We have come up against a problem with URL re-writing in
> Tomcat, basically
> >what happens is if the user switches off, cookies all
> session information
> >is lost.  We need to have session information even if
> cookies are disabled,
> >is there some options somewhere in Tomcat 4.1.18 to switch on, URL
> >rewriting to put in the session id and do url rewriting
> based session
> >tracking.
> >
> >Regards Wendy
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> _
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> -
> 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]





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



RE: Connection Pool

2003-03-19 Thread David Graham
The set-property element calls a setter on the DataSource java bean.  Use 
the key attribute of the data-source element to assign keys.  See the 
struts-config.xml DTD for details.

David




From: Jimmy Emmanual <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Connection Pool
Date: Wed, 19 Mar 2003 21:41:32 -0500
This is the definition in the struts-config.xml file.

  






























































  

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:36 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool
Hi,

I declared different datasource for different environment (Development, 
UAT,
Production).
"desconfig" is an object of my "Configuration class", it has an attribute
"datasource" of the type String.

I am using Struts 1.1b2.

Maybe you should post your datasource setting in struts-config.xml as well.

Best Regards,
Dennis Lee
-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool
Dennis,

Thank you very much. However, what do you declare "desconfig" as?

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:24 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool
Hi,

Here is my code snippet:

// initialization - Datasource and Name Service
log.info("Initializing configuration plug in : Datasource
and Name service");
DataSource dataSource = null;
if (StringUtils.isEmpty(desconfig.getDatasource())) {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
} else {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(desconfig.getDatasource());
servlet.getServletContext().setAttribute(Action.DATA_SOURCE_KEY,
dataSource);
}
Note:
desconfig.getDatasource() returns a String of my datasource key.
I set the the retrieved datasource to Action.DATA_SOURCE_KEY to easy later
access.
It works for me.

Best Regards,
Dennis Lee
-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 9:59 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool
Also, it seems when you have a list of datasources, the only one that is
recognized is the last one...
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool
Are you using modules? Why don't you print out the contents of
ServletContext to see if it's in there?
David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Connection Pool
>Date: Wed, 19 Mar 2003 19:23:40 -0500
>
>David,
>
>When i try to access it via the defined key, the DataSource object is 
null.
>The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource =
>(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
>
>If i try something like:
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource = (DataSource)context.getAttribute("Datasource1");
>
>where "Datasource1" is the "key" in the struts-config.xml file, it 
doesn't
>work...
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 7:23 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Connection Pool
>
>
>Struts stores the DataSources in the ServletContext under the key you
>defined.
>
>David
>
>
>
> >From: Jimmy Emmanual <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: Connection Pool
> >Date: Wed, 19 Mar 2003 19:18:11 -0500
> >
> >How do you access a Da

Problem with Struts Validator

2003-03-19 Thread Amit Keshav Kulkarni
Hi All,

I am using the Struts Validator package for Validations in my application.

Let us say there are three fields in one of my forms
Name, Last name and Email.
I have required and minLength validation for Name,
required and minlength for last name
and required and email validation for Email field.

The problem is that the errors that are displayed are those because of application of 
a single rule
i.e. if I enter valid value for name and leave the last name blank and enter an 
invalid email address,
I first get only the error for last name, saying last name is required.
After I enter a valid last name, it gives an error saying email id invalid.

Is there any way by which I can get both the last name required and invalid email id 
error messages
at the same time?

Thanks and Regards,
Amit




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



RE: Connection Pool

2003-03-19 Thread Jimmy Emmanual
This is the definition in the struts-config.xml file.

  
  






















































  












  

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:36 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

I declared different datasource for different environment (Development, UAT,
Production).  
"desconfig" is an object of my "Configuration class", it has an attribute
"datasource" of the type String.  

I am using Struts 1.1b2.

Maybe you should post your datasource setting in struts-config.xml as well.

Best Regards,
Dennis Lee


-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Dennis,

Thank you very much. However, what do you declare "desconfig" as?

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:24 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

Here is my code snippet:

// initialization - Datasource and Name Service
log.info("Initializing configuration plug in : Datasource
and Name service");
DataSource dataSource = null;
if (StringUtils.isEmpty(desconfig.getDatasource())) {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
} else {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(desconfig.getDatasource());

servlet.getServletContext().setAttribute(Action.DATA_SOURCE_KEY,
dataSource);
}

Note:
desconfig.getDatasource() returns a String of my datasource key.
I set the the retrieved datasource to Action.DATA_SOURCE_KEY to easy later
access.

It works for me.

Best Regards,
Dennis Lee

-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 9:59 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Also, it seems when you have a list of datasources, the only one that is
recognized is the last one...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Connection Pool
>Date: Wed, 19 Mar 2003 19:23:40 -0500
>
>David,
>
>When i try to access it via the defined key, the DataSource object is null.
>The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource =
>(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
>
>If i try something like:
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource = (DataSource)context.getAttribute("Datasource1");
>
>where "Datasource1" is the "key" in the struts-config.xml file, it doesn't
>work...
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 7:23 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Connection Pool
>
>
>Struts stores the DataSources in the ServletContext under the key you
>defined.
>
>David
>
>
>
> >From: Jimmy Emmanual <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: Connection Pool
> >Date: Wed, 19 Mar 2003 19:18:11 -0500
> >
> >How do you access a DataSource from an action class via its "key"? I have
> >multiple DataSources defined in the struts-config.xml file each have the
> >"key" property set. I need to access these based on this "key".
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mai

RE: URL Rewriting

2003-03-19 Thread Wendy Cameron
This is what I would have expected, but isnt our experience and I am not sure why.

Regards Wendy

> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 20, 2003 12:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: URL Rewriting
> 
> 
> My Tomcat 4.1.18 does this automatically if cookies are off.
> 
> David
> 
> 
> 
> >From: "Wendy Cameron" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" 
> <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List (E-mail)" 
> <[EMAIL PROTECTED]>
> >Subject: URL Rewriting
> >Date: Thu, 20 Mar 2003 12:36:44 +1000
> >
> >We have come up against a problem with URL re-writing in 
> Tomcat, basically 
> >what happens is if the user switches off, cookies all 
> session information 
> >is lost.  We need to have session information even if 
> cookies are disabled, 
> >is there some options somewhere in Tomcat 4.1.18 to switch on, URL 
> >rewriting to put in the session id and do url rewriting 
> based session 
> >tracking.
> >
> >Regards Wendy
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> _
> Add photos to your messages with MSN 8. Get 2 months FREE*.  
> http://join.msn.com/?page=features/featuredemail
> 
> 
> -
> 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: URL Rewriting

2003-03-19 Thread David Graham
My Tomcat 4.1.18 does this automatically if cookies are off.

David



From: "Wendy Cameron" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List (E-mail)" <[EMAIL PROTECTED]>
Subject: URL Rewriting
Date: Thu, 20 Mar 2003 12:36:44 +1000
We have come up against a problem with URL re-writing in Tomcat, basically 
what happens is if the user switches off, cookies all session information 
is lost.  We need to have session information even if cookies are disabled, 
is there some options somewhere in Tomcat 4.1.18 to switch on, URL 
rewriting to put in the session id and do url rewriting based session 
tracking.

Regards Wendy

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


_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


URL Rewriting

2003-03-19 Thread Wendy Cameron
We have come up against a problem with URL re-writing in Tomcat, basically what 
happens is if the user switches off, cookies all session information is lost.  We need 
to have session information even if cookies are disabled, is there some options 
somewhere in Tomcat 4.1.18 to switch on, URL rewriting to put in the session id and do 
url rewriting based session tracking.

Regards Wendy

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



RE: Connection Pool

2003-03-19 Thread Lee, Dennis
Hi,

I declared different datasource for different environment (Development, UAT,
Production).  
"desconfig" is an object of my "Configuration class", it has an attribute
"datasource" of the type String.  

I am using Struts 1.1b2.

Maybe you should post your datasource setting in struts-config.xml as well.

Best Regards,
Dennis Lee


-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:28 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Dennis,

Thank you very much. However, what do you declare "desconfig" as?

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:24 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

Here is my code snippet:

// initialization - Datasource and Name Service
log.info("Initializing configuration plug in : Datasource
and Name service");
DataSource dataSource = null;
if (StringUtils.isEmpty(desconfig.getDatasource())) {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
} else {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(desconfig.getDatasource());

servlet.getServletContext().setAttribute(Action.DATA_SOURCE_KEY,
dataSource);
}

Note:
desconfig.getDatasource() returns a String of my datasource key.
I set the the retrieved datasource to Action.DATA_SOURCE_KEY to easy later
access.

It works for me.

Best Regards,
Dennis Lee

-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 9:59 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Also, it seems when you have a list of datasources, the only one that is
recognized is the last one...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Connection Pool
>Date: Wed, 19 Mar 2003 19:23:40 -0500
>
>David,
>
>When i try to access it via the defined key, the DataSource object is null.
>The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource =
>(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
>
>If i try something like:
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource = (DataSource)context.getAttribute("Datasource1");
>
>where "Datasource1" is the "key" in the struts-config.xml file, it doesn't
>work...
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 7:23 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Connection Pool
>
>
>Struts stores the DataSources in the ServletContext under the key you
>defined.
>
>David
>
>
>
> >From: Jimmy Emmanual <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: Connection Pool
> >Date: Wed, 19 Mar 2003 19:18:11 -0500
> >
> >How do you access a DataSource from an action class via its "key"? I have
> >multiple DataSources defined in the struts-config.xml file each have the
> >"key" property set. I need to access these based on this "key".
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>_
>The new MSN 8: advanced junk mail protection and 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>
>-
>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]


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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


**
This message and any files transmitted with it a

RE: Connection Pool

2003-03-19 Thread Jimmy Emmanual
Dennis,

Thank you very much. However, what do you declare "desconfig" as?

-Original Message-
From: Lee, Dennis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:24 PM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Hi,

Here is my code snippet:

// initialization - Datasource and Name Service
log.info("Initializing configuration plug in : Datasource
and Name service");
DataSource dataSource = null;
if (StringUtils.isEmpty(desconfig.getDatasource())) {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
} else {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(desconfig.getDatasource());

servlet.getServletContext().setAttribute(Action.DATA_SOURCE_KEY,
dataSource);
}

Note:
desconfig.getDatasource() returns a String of my datasource key.
I set the the retrieved datasource to Action.DATA_SOURCE_KEY to easy later
access.

It works for me.

Best Regards,
Dennis Lee

-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 9:59 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Also, it seems when you have a list of datasources, the only one that is
recognized is the last one...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Connection Pool
>Date: Wed, 19 Mar 2003 19:23:40 -0500
>
>David,
>
>When i try to access it via the defined key, the DataSource object is null.
>The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource =
>(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
>
>If i try something like:
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource = (DataSource)context.getAttribute("Datasource1");
>
>where "Datasource1" is the "key" in the struts-config.xml file, it doesn't
>work...
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 7:23 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Connection Pool
>
>
>Struts stores the DataSources in the ServletContext under the key you
>defined.
>
>David
>
>
>
> >From: Jimmy Emmanual <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: Connection Pool
> >Date: Wed, 19 Mar 2003 19:18:11 -0500
> >
> >How do you access a DataSource from an action class via its "key"? I have
> >multiple DataSources defined in the struts-config.xml file each have the
> >"key" property set. I need to access these based on this "key".
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>_
>The new MSN 8: advanced junk mail protection and 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>
>-
>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]


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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


**
This message and any files transmitted with it are confidential and
may be privileged and/or subject to the provision of privacy legislation.
They are intended solely for the use of the individual or entity to whom
they are addressed. If the reader of this message is not the intended
recipient, please notify the sender immediately and then delete this
message. You are notifed that reliance on, disclosure of, distribution or
copying of this message is prohibited.
Bank of Bermuda
**


--

RE: Connection Pool

2003-03-19 Thread Lee, Dennis
Hi,

Here is my code snippet:

// initialization - Datasource and Name Service
log.info("Initializing configuration plug in : Datasource
and Name service");
DataSource dataSource = null;
if (StringUtils.isEmpty(desconfig.getDatasource())) {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
} else {
dataSource = (DataSource)
servlet.getServletContext().getAttribute(desconfig.getDatasource());

servlet.getServletContext().setAttribute(Action.DATA_SOURCE_KEY,
dataSource);
}

Note:
desconfig.getDatasource() returns a String of my datasource key.
I set the the retrieved datasource to Action.DATA_SOURCE_KEY to easy later
access.

It works for me.

Best Regards,
Dennis Lee

-Original Message-
From: Jimmy Emmanual [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 9:59 AM
To: 'Struts Users Mailing List'
Subject: RE: Connection Pool


Also, it seems when you have a list of datasources, the only one that is
recognized is the last one...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Connection Pool
>Date: Wed, 19 Mar 2003 19:23:40 -0500
>
>David,
>
>When i try to access it via the defined key, the DataSource object is null.
>The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource =
>(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
>
>If i try something like:
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource = (DataSource)context.getAttribute("Datasource1");
>
>where "Datasource1" is the "key" in the struts-config.xml file, it doesn't
>work...
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 7:23 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Connection Pool
>
>
>Struts stores the DataSources in the ServletContext under the key you
>defined.
>
>David
>
>
>
> >From: Jimmy Emmanual <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: Connection Pool
> >Date: Wed, 19 Mar 2003 19:18:11 -0500
> >
> >How do you access a DataSource from an action class via its "key"? I have
> >multiple DataSources defined in the struts-config.xml file each have the
> >"key" property set. I need to access these based on this "key".
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>_
>The new MSN 8: advanced junk mail protection and 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>
>-
>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]


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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


**
This message and any files transmitted with it are confidential and
may be privileged and/or subject to the provision of privacy legislation.
They are intended solely for the use of the individual or entity to whom they are 
addressed. If the reader of this message is not the intended
recipient, please notify the sender immediately and then delete this
message. You are notifed that reliance on, disclosure of, distribution or
copying of this message is prohibited.
Bank of Bermuda
**


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



RE: Connection Pool

2003-03-19 Thread Jimmy Emmanual
Also, it seems when you have a list of datasources, the only one that is
recognized is the last one...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Connection Pool
>Date: Wed, 19 Mar 2003 19:23:40 -0500
>
>David,
>
>When i try to access it via the defined key, the DataSource object is null.
>The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource =
>(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
>
>If i try something like:
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource = (DataSource)context.getAttribute("Datasource1");
>
>where "Datasource1" is the "key" in the struts-config.xml file, it doesn't
>work...
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 7:23 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Connection Pool
>
>
>Struts stores the DataSources in the ServletContext under the key you
>defined.
>
>David
>
>
>
> >From: Jimmy Emmanual <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: Connection Pool
> >Date: Wed, 19 Mar 2003 19:18:11 -0500
> >
> >How do you access a DataSource from an action class via its "key"? I have
> >multiple DataSources defined in the struts-config.xml file each have the
> >"key" property set. I need to access these based on this "key".
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>_
>The new MSN 8: advanced junk mail protection and 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>
>-
>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]


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


-
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: Connection Pool

2003-03-19 Thread Jimmy Emmanual
I don't think i'm using modules. not sure... actually, don't know.

I printed out all the Attributes of the servlet context and there is a
"org.apache.sturts.action.DATA_SOURCE" object which returns a DataSource.
However, i don't see where ( if any ) there is a list of all the DataSources
i've defined.

I've searched other lists and archives, and nobody seems to be able to get
it to work...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:29 PM
To: [EMAIL PROTECTED]
Subject: RE: Connection Pool


Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Connection Pool
>Date: Wed, 19 Mar 2003 19:23:40 -0500
>
>David,
>
>When i try to access it via the defined key, the DataSource object is null.
>The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource =
>(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
>
>If i try something like:
>
>ServletContext context = servlet.getServletContext();
>DataSource dataSource = (DataSource)context.getAttribute("Datasource1");
>
>where "Datasource1" is the "key" in the struts-config.xml file, it doesn't
>work...
>
>-Original Message-
>From: David Graham [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 7:23 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Connection Pool
>
>
>Struts stores the DataSources in the ServletContext under the key you
>defined.
>
>David
>
>
>
> >From: Jimmy Emmanual <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> >Subject: Connection Pool
> >Date: Wed, 19 Mar 2003 19:18:11 -0500
> >
> >How do you access a DataSource from an action class via its "key"? I have
> >multiple DataSources defined in the struts-config.xml file each have the
> >"key" property set. I need to access these based on this "key".
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>_
>The new MSN 8: advanced junk mail protection and 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>
>-
>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]


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


-
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: passing 'title' to a tile in a frame

2003-03-19 Thread Jeff Kyser
my bad, credit should have been to Steve Stair, I'm the one who can't 
see strait :)

but still no joy here

-jeff

On Wednesday, March 19, 2003, at 06:46  PM, Jeff Kyser wrote:

hello, all

have searched, searched, but no examples, and getting I guess hung
up on syntax.
Problem: I want to pass the 'title' declared in my tile definition to 
the 'header' tile,
which is itself  displayed in a frame.

From Cedric's posts and help from Steve Strait, I've gotten the syntax 
for putting
the title into the header in my layout.jsp file:


   

And I also see from the tiles examples, the use of frames as:


  " name="header">
  ...


Can somebody help with the proper syntax for putting these together 
such that
the header frame gets the title?

TIA,

-jeff

-
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: A dynamic way to reset/populate DynaXXXXActionForm

2003-03-19 Thread Marco Tedone
I would join Robert in this post asking also for a pluggable reset() as, as
he told correctly, the goal of the Dyna..Form wanted to be that of
eliminating the excessive number of classes and ease of mainteinance.

Marco

> -Original Message-
> From: Robert Taylor [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 19, 2003 7:23 PM
> To: [EMAIL PROTECTED]
> Subject: A dynamic way to reset/populate DynaActionForm
> 
> 
> I recently decided to exercise my skills in using dynamic 
> indexed properties with my DynaValidatorActionForm. I quickly 
> realized that I will need to have some code in the 
> DynaValidatorActionForm.reset() which must re-populate my 
> indexed collection so that the RequestUtils.populate() can 
> successfully populate my indexed collection with the values 
> that are in the current request.  Now, for each page on which 
> I want to use dynamic indexed properties, I will have to 
> subclass the base form and override the reset().
> 
> This seems awkward when DynaActionForm and StrutsValidator
> are supposed to eliminate (almost)the need to create concrete 
> ActionForms.
> 
> Is it unreasonable to think that there could exist a way to 
> "plug-in" a form resetter? And have the ability to define 
> that in the struts-config, per form or per action. Similar to 
> how validation works in DynaValidatorActionForm.
> 
> It seems like having to access the Model from a View 
> component is a bit backwards 
> (http://www.mail-archive.com/[EMAIL PROTECTED]/ms
g24160.html).

Maybe something like the following in the RequestProcessor.populateForm():

if (form == null) {
return;
}

// Populate the bean properties of this ActionForm instance
if (log.isDebugEnabled()) {
log.debug(" Populating bean properties from this request"); }
form.setServlet(this.servlet);

// reset simple form attributes
form.reset(mapping, request);
if (mapping.getMultipartClass() != null) {
request.setAttribute(Globals.MULTIPART_KEY,
 mapping.getMultipartClass());
}
// reset complex form attributes
FormResetter resetter = form.getResetter(mapping, request);
if (resetter != null) {
  resetter.resetForm(form);
}

RequestUtils.populate(form, mapping.getPrefix(), mapping.getSuffix(),
  request);


Maybe FormResetter is the wrong term, but you get the idea. At least this
way the Controller is responsible for delegating any business logic to the
appropriate component rather than the View component being responsible for
resetting/populating itself.

robert


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



passing 'title' to a tile in a frame

2003-03-19 Thread Jeff Kyser
hello, all

have searched, searched, but no examples, and getting I guess hung
up on syntax.
Problem: I want to pass the 'title' declared in my tile definition to 
the 'header' tile,
which is itself  displayed in a frame.

From Cedric's posts and help from Steve Strait, I've gotten the syntax 
for putting
the title into the header in my layout.jsp file:


   

And I also see from the tiles examples, the use of frames as:


  " 
name="header">
  ...


Can somebody help with the proper syntax for putting these together 
such that
the header frame gets the title?

TIA,

-jeff

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


Re: Focus where I last clicked

2003-03-19 Thread James Mitchell
On Wed, 2003-03-19 at 19:25, [EMAIL PROTECTED] wrote:
> Hi,
>  
> In our struts app, I have a submit image quite a way down a 
> fairly long page.  When the user clicks that image and struts forwards
> them back to the same page, they are automatically sent to the top of
> the page.  Is there any way for the app to 'remember' where the user
> was on the page and return them to that position?

Yes, you can probably do this with some fancy JavaScript.

>  
> Thanks!
> Glen Roberts
>  
> 
> 

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

-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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



RES: Trapping timeout of HttpSession

2003-03-19 Thread RODRIGO CARVALHO DOS SANTOS


  Hi,

  You could insert a 'inSession' cookie in the Login, and remove the cookie
in Logout. If you receive a request from a user without a valid session,
check if the 'inSession' cookie is present and, if is true, redirect to an
ExpiredSession warning page.

  If you want do some cleaning activity in the event of session expiration
check the interface HttpSessionBindingListener.

  Rodrigo C. Santos.
  BCP Telecom
  

-Mensagem original-
De: Max Cooper [mailto:[EMAIL PROTECTED]
Enviada em: quarta-feira, 19 de março de 2003 21:25
Para: Struts Users Mailing List
Assunto: Re: Trapping timeout of HttpSession


If their session expired, it is gone. The form submittal will generally look
like it is from a new visitor that had no session. What do you want to do in
the case that the user submits a form and their session had expired? I think
you might be able to make a good guess if they used to have a session but it
expired, but it might not be worth the trouble if knowing that information
doesn't really acheive anything useful for your situation.

-Max

- Original Message -
From: "Rick Ashley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 19, 2003 11:57 AM
Subject: Trapping timeout of HttpSession


> Hello,
>
> What is the best place to check if user's HttpSession has expired?
> I mean situation where e.g. timeout of Web application is 30 minutes
> and after that user tries to submit a form.
>
> Is it ok to check it e.g. in RequestProcessor or somewhere else and how?
>
> Anyone have a sample code?
>
> Br
>
> r a
>
>
>
>
>
>
> _
> It's fast, it's easy and it's free. Get MSN Messenger today!
> http://messenger.msn.co.uk
>
>
> -
> 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]


* Internet E-mail Confidentiality Footer * 
"Esta mensagem pode conter informações privilegiadas e/ou confidenciais.
Caso voce não seja o destinatário ou pessoa autorizada a recebe-la não
poderá utiliza-la de forma alguma. Cópia, revelação ou quaisquer outras
ações baseadas nestas informações não são autorizadas. Se voce recebeu esta
mensagem de forma equivocada, por favor informe o emissor imediatamente
respondendo a este email e em seguida eliminando-o. Agradecemos sua
cooperação." 

"This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose or take any action based on this message or any
information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message. Thank
you for your cooperation."

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



[NEWBIE]Clear fields on a DynaValidatorForm and Reset button

2003-03-19 Thread Marco Tedone
Hi all,

I'm using a DynaValidatorForm for my login page with the following text
fields:

userName
password
dbName

I configured all the properties of the DynaValidatorForm in the 
element with the initial attribute set to blanks. The first time I access
the form everything is fine; then I submit it, and correctly the next JSP
page is shown. In this JSP page I've got a link which call the ForwardAction
which will address the user to the Login page again; this time the values I
entered the first time are still there, while I was expecting to find blanks
in the userName and password(as the dbName is filled dynamically at
runtime). Shall I subclass the DynaValidatorForm and override the reset()
method? In this case, I should declare the userName and password properties
in order to clear them in the reset() method...What would it happen to the
properties declared in the struts-config.xml file?

Reset Button:
-

In the same page I inserted two buttons:  and
 The second time I access the Login page, when I press the
reset button nothing happens, while I would expect the userName and password
fields to be cleared. Am I missing something?

Marco 

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



Proper way to reset checkboxes on a DynaValidatorForm

2003-03-19 Thread Wendy Smoak

The documentation says that the underlying property for an 
should be of type boolean and that you should set the property to false in
the reset method of the ActionForm.

With DynaValidatorForm, I found that I had to use type java.lang.Boolean
because you can't put primitives in a Map.

Now I need to do the reset method, but I'm not sure what's correct:
   getMap().remove("propertyName");
or
   getMap().add("propertyName",Boolean.FALSE);

I have not yet figured out how to edit the documentation, so if someone
would like to edit it so that it acknowledges dynamic forms and says how to
deal with them, this is the page:
http://jakarta.apache.org/struts/userGuide/struts-html.html

Is there a HOWTO on patching the documentation?  What do you use to edit
it... isn't it done in XML?

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management


RE: Connection Pool

2003-03-19 Thread David Graham
Are you using modules? Why don't you print out the contents of 
ServletContext to see if it's in there?

David



From: Jimmy Emmanual <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Connection Pool
Date: Wed, 19 Mar 2003 19:23:40 -0500
David,

When i try to access it via the defined key, the DataSource object is null.
The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.
ServletContext context = servlet.getServletContext();
DataSource dataSource =
(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
If i try something like:

ServletContext context = servlet.getServletContext();
DataSource dataSource = (DataSource)context.getAttribute("Datasource1");
where "Datasource1" is the "key" in the struts-config.xml file, it doesn't
work...
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Connection Pool
Struts stores the DataSources in the ServletContext under the key you
defined.
David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: Connection Pool
>Date: Wed, 19 Mar 2003 19:18:11 -0500
>
>How do you access a DataSource from an action class via its "key"? I have
>multiple DataSources defined in the struts-config.xml file each have the
>"key" property set. I need to access these based on this "key".
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
_
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
-
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]


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

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


RE: Connection Pool

2003-03-19 Thread Jimmy Emmanual
David,

When i try to access it via the defined key, the DataSource object is null.
The only way it works is if i use the "Action.DATA_SOURCE_KEY" i.e.

ServletContext context = servlet.getServletContext();
DataSource dataSource =
(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);

If i try something like:

ServletContext context = servlet.getServletContext();
DataSource dataSource = (DataSource)context.getAttribute("Datasource1");

where "Datasource1" is the "key" in the struts-config.xml file, it doesn't
work...

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Connection Pool


Struts stores the DataSources in the ServletContext under the key you 
defined.

David



>From: Jimmy Emmanual <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: Connection Pool
>Date: Wed, 19 Mar 2003 19:18:11 -0500
>
>How do you access a DataSource from an action class via its "key"? I have
>multiple DataSources defined in the struts-config.xml file each have the
>"key" property set. I need to access these based on this "key".
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
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: j_security_check

2003-03-19 Thread Scott Barr

Hi Max

I've really got to investigate the securityfilter for my next project :)

Scott Barr
www.exergonic.com.au

On Thu, 2003-03-20 at 10:50, Max Cooper wrote:
> You can also use SecurityFilter, a filter-based clone of container-managed
> security. It allows you to set a default page to take users to when they log
> in "out of the blue". Container-managed security doesn't allow such login
> requests.
> 
> http://securityfilter.sourceforge.net/
> 
> -Max
> 
> - Original Message -
> From: "Scott Barr" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 19, 2003 4:12 PM
> Subject: Re: j_security_check
> 
> 
> >
> > Hi Ronan
> >
> > You'll get this when you go directly to the page for the user to login.
> > Instead, setup a resource that is protected by Container Managed
> > Security eg. /userHome.do, which will then take you to your login page.
> > Once login is successful, you will be fowarded on to /userHome.do
> >
> > Once you've got a logged in user via CMS, you can use Filters (if using
> > a servlet 2.3 container) to make sure the users session is setup with
> > all required objects.
> >
> > To log out, simply call session.invalidate()
> >
> > Regards
> > Scott Barr
> > www.exergonic.com.au
> >
> >
> > On Thu, 2003-03-20 at 09:49, ronanoc wrote:
> >
> > > I get this message when I am trying to login, and if I am already
> > > logged in too.
> > >
> > > Status 404 /mywebapp/j_security_check
> > >
> > > type Status report
> > > message /mywebapp/j_security_check
> > > description The requested resource (/mywebapp/j_security_check) is not
> > > available.
> > >
> > >
> > > How can I prevent this happening, and how can I logout, and log in
> > > again?
> > > Thanks.
> > >
> > > Ronan O'Ciosoig
> > > One Louder Recordings IRL
> > > Co. Dublin,
> > > Ireland.
> > > http://www.onelouder.org
> >
> 
> 
> 
> -
> 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]



Focus where I last clicked

2003-03-19 Thread glen_roberts



Hi,
 
In our 
struts app, I have a submit image quite a way down a fairly long page.  
When the user clicks that image and struts forwards them back to the same 
page, they are automatically sent to the top of the page.  Is there any way 
for the app to 'remember' where the user was on the page and return them to that 
position?
 
Thanks!
Glen 
Roberts
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Trapping timeout of HttpSession

2003-03-19 Thread Max Cooper
If their session expired, it is gone. The form submittal will generally look
like it is from a new visitor that had no session. What do you want to do in
the case that the user submits a form and their session had expired? I think
you might be able to make a good guess if they used to have a session but it
expired, but it might not be worth the trouble if knowing that information
doesn't really acheive anything useful for your situation.

-Max

- Original Message -
From: "Rick Ashley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 19, 2003 11:57 AM
Subject: Trapping timeout of HttpSession


> Hello,
>
> What is the best place to check if user's HttpSession has expired?
> I mean situation where e.g. timeout of Web application is 30 minutes
> and after that user tries to submit a form.
>
> Is it ok to check it e.g. in RequestProcessor or somewhere else and how?
>
> Anyone have a sample code?
>
> Br
>
> r a
>
>
>
>
>
>
> _
> It's fast, it's easy and it's free. Get MSN Messenger today!
> http://messenger.msn.co.uk
>
>
> -
> 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: Connection Pool

2003-03-19 Thread David Graham
Struts stores the DataSources in the ServletContext under the key you 
defined.

David



From: Jimmy Emmanual <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: Connection Pool
Date: Wed, 19 Mar 2003 19:18:11 -0500
How do you access a DataSource from an action class via its "key"? I have
multiple DataSources defined in the struts-config.xml file each have the
"key" property set. I need to access these based on this "key".
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Connection Pool

2003-03-19 Thread Jimmy Emmanual
How do you access a DataSource from an action class via its "key"? I have
multiple DataSources defined in the struts-config.xml file each have the
"key" property set. I need to access these based on this "key".

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



Re: j_security_check

2003-03-19 Thread Max Cooper
You can also use SecurityFilter, a filter-based clone of container-managed
security. It allows you to set a default page to take users to when they log
in "out of the blue". Container-managed security doesn't allow such login
requests.

http://securityfilter.sourceforge.net/

-Max

- Original Message -
From: "Scott Barr" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 19, 2003 4:12 PM
Subject: Re: j_security_check


>
> Hi Ronan
>
> You'll get this when you go directly to the page for the user to login.
> Instead, setup a resource that is protected by Container Managed
> Security eg. /userHome.do, which will then take you to your login page.
> Once login is successful, you will be fowarded on to /userHome.do
>
> Once you've got a logged in user via CMS, you can use Filters (if using
> a servlet 2.3 container) to make sure the users session is setup with
> all required objects.
>
> To log out, simply call session.invalidate()
>
> Regards
> Scott Barr
> www.exergonic.com.au
>
>
> On Thu, 2003-03-20 at 09:49, ronanoc wrote:
>
> > I get this message when I am trying to login, and if I am already
> > logged in too.
> >
> > Status 404 /mywebapp/j_security_check
> >
> > type Status report
> > message /mywebapp/j_security_check
> > description The requested resource (/mywebapp/j_security_check) is not
> > available.
> >
> >
> > How can I prevent this happening, and how can I logout, and log in
> > again?
> > Thanks.
> >
> > Ronan O'Ciosoig
> > One Louder Recordings IRL
> > Co. Dublin,
> > Ireland.
> > http://www.onelouder.org
>



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



Re: j_security_check

2003-03-19 Thread Scott Barr

Hi Ronan

You'll get this when you go directly to the page for the user to login.
Instead, setup a resource that is protected by Container Managed
Security eg. /userHome.do, which will then take you to your login page.
Once login is successful, you will be fowarded on to /userHome.do

Once you've got a logged in user via CMS, you can use Filters (if using
a servlet 2.3 container) to make sure the users session is setup with
all required objects.

To log out, simply call session.invalidate()

Regards
Scott Barr
www.exergonic.com.au


On Thu, 2003-03-20 at 09:49, ronanoc wrote:

> I get this message when I am trying to login, and if I am already 
> logged in too.
> 
> Status 404 /mywebapp/j_security_check
> 
> type Status report
> message /mywebapp/j_security_check
> description The requested resource (/mywebapp/j_security_check) is not 
> available.
> 
> 
> How can I prevent this happening, and how can I logout, and log in 
> again?
> Thanks.
> 
> Ronan O'Ciosoig
> One Louder Recordings IRL
> Co. Dublin,
> Ireland.
> http://www.onelouder.org


Re: Strut your Stuff validation

2003-03-19 Thread David Vittor
Hey David,

Thanks for that console, that may make development a little easier - I'll
look into it.

And yeah Jeff, it is simply a cut and paste after job with the xml
validation, but when you have over 100 editable forms in your application,
and over 1000 fields, well personally I'd rather not have all that xml code
to sift through just to do validation. The "pattern" attribute was good
(even though old - yes Dec2000), because it localised the validation to the
place where the struts html element existed.

Still I'll try this console thing. Thanks.
D.A.V.


- Original Message -
From: "Jeff Kyser" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, March 20, 2003 10:15 AM
Subject: Re: Strut your Stuff validation


> Hey David,
>
> That article is from December 2000, is it not? I only briefly scanned
> it but I didn't have to do any of that stuff with customizing
> struts.jar,  etc.
> Have you checked out more recent stuff like the 'requiredif' rule, etc.?
>
> I'm with David Graham - find it very manageable indeed. I have the
> validator-rules.xml, a separate validator-custom-rules.xml where
> I've placed global constants like various masks and the few rules
> I've created (mostly for practice - example boolean and identical),
>   and then my webapp-specific validation.xml file containing the mappings
> for individual form elements.
>
> So really, all I have to do for a new webapp is the form-specific
> mappings, and those tend to be cut-n-paste from *somewhere* a
> after you've done enough of them...
>
> regards,
>
> -jeff
>
> On Wednesday, March 19, 2003, at 05:04  PM, David Vittor wrote:
>
> > Thanks for replying Jeff.
> >
> > Well as the article suggested I added the Validator interface to the
> > BaseFieldTag.java class, via the below code:
> > Object pagebean = pageContext.findAttribute(name);
> > if(pagebean instanceof com.bank.Validator) {
> > ((com.bank.Validator) pagebean).setPattern(property, pattern);
> > ((com.bank.Validator) pagebean).setErrorMessage(property,
> > errorMessage);
> > }
> >
> > This compiled, and along with the Validator interface I than create a
> > new
> > struts.jar file, and it proved the example worked - but it felt so
> > wrong,
> > almost suicidal (in programming terms :)
> >
> > I have managed to get around this by using my own custom tags library
> > (i.e.
> > my:text and my:password - which extend of html:text and html:password)
> > . But
> > it's fortunate I'm only worried about textBox components, otherwise
> > lack of
> > multiple inheritance in java would also have got me.
> >
> > All I'm basically saying is that maybe there should be more than one
> > validation scheme in the struts architecture - a simple one ("for
> > dummies"
> > like me :) and a more complicated one, which can be used by those
> > companies
> > with a big piggy bank.
> >
> > D.A.V.
> >
> > P.S. I'm a big fan of intelligent users providing intelligent input,
> > but my
> > boss is very anti user intelligence :)
> >
> >
> >
> >> I'm curious as to what change you had to make to the struts source
> >> code?
> >>
> >> I certainly haven't had to do that, although I thought it was pretty
> >> slick to be able to extend the framework by providing your own
> >> rules...
> >>
> >> The XML can be a little verbose, but to quote a Dire Straits song,
> >> you don't get 'your money for nothin' and chicks for free'...
> >>
> >> http://www.ada.com.tr/~modabasi/dslyr6.htm#8
> >>
> >> I  guess if you didn't want to 'clutter your XML', you could just
> >> rely on the user to provide valid inputs :)
> >>
> >> -jeff
> >>
> >> On Tuesday, March 18, 2003, at 09:43  PM, David Vittor wrote:
> >>
> >>> Dear Struts World,
> >>>
> >>> Hi! My name is David, and I'm writing to make a formal announcement
> >>> about the validation package in the struts architecture.
> >>>
> >>> Based on this article: Strut your Stuff
> >>> http://www.javaworld.com/javaworld/jw-12-2000/jw-1201-struts_p.html
> >>> it comes up with a very good architecture to do validation (although
> >>> I18N would be nice also). Still a simple regular expresion attribute
> >>> and an error message is nice. However I found that to implement it -
> >>> a
> >>> change to the struts source code is required!!! (This is sooo
> >>> WRONG!!)
> >>>
> >>> But as the struts architecture is only at a Candidate Release, I was
> >>> wondering if along with the  tag,  the html
> >>> tag
> >>> library could produce something simple (like something not requiring
> >>> 10 lines of xml for every single fields input?) It's totally
> >>> unmaintainable.
> >>>
> >>> Can anyone help me?
> >>>
> >>> D.A.V.
> >>>
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > -
> > To unsubscribe, e-mai

problems with was4.0

2003-03-19 Thread Diego
Hi,

I've developed a small application using tomcat. I've created a war file
with the app and tried to deploy it in was 4.0. Every time I call an action
that requires redirection the application looks for port 81. Also, when I
have a link like:



note: listUsers is a global forward which redirects

When I hover over the link the status bar shows: ://bla...:81/listUsers.do

Has anyone seen this before? Is there something I can do from the Struts
side?

Thank you,

Diego.



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



j_security_check

2003-03-19 Thread ronanoc
I get this message when I am trying to login, and if I am already 
logged in too.

Status 404 /mywebapp/j_security_check

type Status report
message /mywebapp/j_security_check
description The requested resource (/mywebapp/j_security_check) is not 
available.

How can I prevent this happening, and how can I logout, and log in 
again?
Thanks.

Ronan O'Ciosoig
One Louder Recordings IRL
Co. Dublin,
Ireland.
http://www.onelouder.org

Re: Strut your Stuff validation

2003-03-19 Thread Jeff Kyser
Hey David,

That article is from December 2000, is it not? I only briefly scanned
it but I didn't have to do any of that stuff with customizing 
struts.jar,  etc.
Have you checked out more recent stuff like the 'requiredif' rule, etc.?

I'm with David Graham - find it very manageable indeed. I have the
validator-rules.xml, a separate validator-custom-rules.xml where
I've placed global constants like various masks and the few rules
I've created (mostly for practice - example boolean and identical),
 and then my webapp-specific validation.xml file containing the mappings
for individual form elements.
So really, all I have to do for a new webapp is the form-specific
mappings, and those tend to be cut-n-paste from *somewhere* a
after you've done enough of them...
regards,

-jeff

On Wednesday, March 19, 2003, at 05:04  PM, David Vittor wrote:

Thanks for replying Jeff.

Well as the article suggested I added the Validator interface to the
BaseFieldTag.java class, via the below code:
Object pagebean = pageContext.findAttribute(name);
if(pagebean instanceof com.bank.Validator) {
((com.bank.Validator) pagebean).setPattern(property, pattern);
((com.bank.Validator) pagebean).setErrorMessage(property,
errorMessage);
}
This compiled, and along with the Validator interface I than create a 
new
struts.jar file, and it proved the example worked - but it felt so 
wrong,
almost suicidal (in programming terms :)

I have managed to get around this by using my own custom tags library 
(i.e.
my:text and my:password - which extend of html:text and html:password) 
. But
it's fortunate I'm only worried about textBox components, otherwise 
lack of
multiple inheritance in java would also have got me.

All I'm basically saying is that maybe there should be more than one
validation scheme in the struts architecture - a simple one ("for 
dummies"
like me :) and a more complicated one, which can be used by those 
companies
with a big piggy bank.

D.A.V.

P.S. I'm a big fan of intelligent users providing intelligent input, 
but my
boss is very anti user intelligence :)



I'm curious as to what change you had to make to the struts source 
code?

I certainly haven't had to do that, although I thought it was pretty
slick to be able to extend the framework by providing your own 
rules...

The XML can be a little verbose, but to quote a Dire Straits song,
you don't get 'your money for nothin' and chicks for free'...
http://www.ada.com.tr/~modabasi/dslyr6.htm#8

I  guess if you didn't want to 'clutter your XML', you could just
rely on the user to provide valid inputs :)
-jeff

On Tuesday, March 18, 2003, at 09:43  PM, David Vittor wrote:

Dear Struts World,

Hi! My name is David, and I'm writing to make a formal announcement
about the validation package in the struts architecture.
Based on this article: Strut your Stuff
http://www.javaworld.com/javaworld/jw-12-2000/jw-1201-struts_p.html
it comes up with a very good architecture to do validation (although
I18N would be nice also). Still a simple regular expresion attribute
and an error message is nice. However I found that to implement it - 
a
change to the struts source code is required!!! (This is sooo 
WRONG!!)

But as the struts architecture is only at a Candidate Release, I was
wondering if along with the  tag,  the html 
tag
library could produce something simple (like something not requiring
10 lines of xml for every single fields input?) It's totally
unmaintainable.

Can anyone help me?

D.A.V.



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


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


Re: Strut your Stuff validation

2003-03-19 Thread David Graham
> But as the struts architecture is only at a Candidate Release, I was
> wondering if along with the  tag,  the html tag
> library could produce something simple (like something not requiring
> 10 lines of xml for every single fields input?) It's totally
> unmaintainable.
You can use Struts Console to manage struts configuration files including 
validator.xml:
http://www.jamesholmes.com/struts/console/

Further it is not "totally unmaintainable" as you suggest.  I use validator 
without any gui tools and it's quite easy to maintain the rules.

David



From: "David Vittor" <[EMAIL PROTECTED]>
Reply-To: "David Vittor" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Strut your Stuff validation
Date: Thu, 20 Mar 2003 10:04:07 +1100
Thanks for replying Jeff.

Well as the article suggested I added the Validator interface to the
BaseFieldTag.java class, via the below code:
Object pagebean = pageContext.findAttribute(name);
if(pagebean instanceof com.bank.Validator) {
((com.bank.Validator) pagebean).setPattern(property, pattern);
((com.bank.Validator) pagebean).setErrorMessage(property,
errorMessage);
}
This compiled, and along with the Validator interface I than create a new
struts.jar file, and it proved the example worked - but it felt so wrong,
almost suicidal (in programming terms :)
I have managed to get around this by using my own custom tags library (i.e.
my:text and my:password - which extend of html:text and html:password) . 
But
it's fortunate I'm only worried about textBox components, otherwise lack of
multiple inheritance in java would also have got me.

All I'm basically saying is that maybe there should be more than one
validation scheme in the struts architecture - a simple one ("for dummies"
like me :) and a more complicated one, which can be used by those companies
with a big piggy bank.
D.A.V.

P.S. I'm a big fan of intelligent users providing intelligent input, but my
boss is very anti user intelligence :)


> I'm curious as to what change you had to make to the struts source code?
>
> I certainly haven't had to do that, although I thought it was pretty
> slick to be able to extend the framework by providing your own rules...
>
> The XML can be a little verbose, but to quote a Dire Straits song,
> you don't get 'your money for nothin' and chicks for free'...
>
> http://www.ada.com.tr/~modabasi/dslyr6.htm#8
>
> I  guess if you didn't want to 'clutter your XML', you could just
> rely on the user to provide valid inputs :)
>
> -jeff
>
> On Tuesday, March 18, 2003, at 09:43  PM, David Vittor wrote:
>
> > Dear Struts World,
> >
> > Hi! My name is David, and I'm writing to make a formal announcement
> > about the validation package in the struts architecture.
> >
> > Based on this article: Strut your Stuff
> > http://www.javaworld.com/javaworld/jw-12-2000/jw-1201-struts_p.html
> > it comes up with a very good architecture to do validation (although
> > I18N would be nice also). Still a simple regular expresion attribute
> > and an error message is nice. However I found that to implement it - a
> > change to the struts source code is required!!! (This is sooo WRONG!!)
> >
> > But as the struts architecture is only at a Candidate Release, I was
> > wondering if along with the  tag,  the html tag
> > library could produce something simple (like something not requiring
> > 10 lines of xml for every single fields input?) It's totally
> > unmaintainable.
> >
> > Can anyone help me?
> >
> > D.A.V.
> >
>
>
> -
> 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]


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

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


Re: Strut your Stuff validation

2003-03-19 Thread David Vittor
Thanks for replying Jeff.

Well as the article suggested I added the Validator interface to the
BaseFieldTag.java class, via the below code:
Object pagebean = pageContext.findAttribute(name);
if(pagebean instanceof com.bank.Validator) {
((com.bank.Validator) pagebean).setPattern(property, pattern);
((com.bank.Validator) pagebean).setErrorMessage(property,
errorMessage);
}

This compiled, and along with the Validator interface I than create a new
struts.jar file, and it proved the example worked - but it felt so wrong,
almost suicidal (in programming terms :)

I have managed to get around this by using my own custom tags library (i.e.
my:text and my:password - which extend of html:text and html:password) . But
it's fortunate I'm only worried about textBox components, otherwise lack of
multiple inheritance in java would also have got me.

All I'm basically saying is that maybe there should be more than one
validation scheme in the struts architecture - a simple one ("for dummies"
like me :) and a more complicated one, which can be used by those companies
with a big piggy bank.

D.A.V.

P.S. I'm a big fan of intelligent users providing intelligent input, but my
boss is very anti user intelligence :)



> I'm curious as to what change you had to make to the struts source code?
>
> I certainly haven't had to do that, although I thought it was pretty
> slick to be able to extend the framework by providing your own rules...
>
> The XML can be a little verbose, but to quote a Dire Straits song,
> you don't get 'your money for nothin' and chicks for free'...
>
> http://www.ada.com.tr/~modabasi/dslyr6.htm#8
>
> I  guess if you didn't want to 'clutter your XML', you could just
> rely on the user to provide valid inputs :)
>
> -jeff
>
> On Tuesday, March 18, 2003, at 09:43  PM, David Vittor wrote:
>
> > Dear Struts World,
> >
> > Hi! My name is David, and I'm writing to make a formal announcement
> > about the validation package in the struts architecture.
> >
> > Based on this article: Strut your Stuff
> > http://www.javaworld.com/javaworld/jw-12-2000/jw-1201-struts_p.html
> > it comes up with a very good architecture to do validation (although
> > I18N would be nice also). Still a simple regular expresion attribute
> > and an error message is nice. However I found that to implement it - a
> > change to the struts source code is required!!! (This is sooo WRONG!!)
> >
> > But as the struts architecture is only at a Candidate Release, I was
> > wondering if along with the  tag,  the html tag
> > library could produce something simple (like something not requiring
> > 10 lines of xml for every single fields input?) It's totally
> > unmaintainable.
> >
> > Can anyone help me?
> >
> > D.A.V.
> >
>
>
> -
> 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]



CheckBox values passed from actionForm to bean

2003-03-19 Thread Jack Zakarian
Hi,

 

I have an actionForm with header (single valued properties) and detail
(multi row item records). There is a checkbox for each detail record so
that the user can select 

which detail records to process e.g. delete all selected detail records.

 

In the actionForm I have defined  a boolean for the checkbox : Boolean[]
selected and initialized it to {false,false,false,false,false}. I have
also set up the reset method 

on the form to initialize the boolean array. When ever I populate the
checkboxes from the database I set them to false.

 

My problem is that when the user selects some of the checkboxes struts
only populates the data bean with the selected boxes. I have searched
the archives , apache.org and Struts in Action but

couldn't find an answer or solution.

 

Any help would be appreciated.

 

Thanks,

 

Jack



Re: [OT] tld complaint

2003-03-19 Thread Dan Allen
> If you looked into how they are created, you'll see that the TLDs are
> *output* files, not input files - they are produced from XML
> source documents...
True, true.  

> Why would you want to look at a TLD when you can have something readable
> like this instead? :-)
I was actually just creating my own .tld for a custom taglib and was
just looking at an example and made this observation.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"Personally, I'm not finding Windows 
to be less expensive to administer, 
but those security holes--that'll kill 'em," 
-- Al Gillen, IDC
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



Re: file path

2003-03-19 Thread Dan Allen
> There is absolutely no guarantee that webapp resources even *have* a "file
> path" at all -- it's perfectly legal for the container to run your
> application directly from a WAR file (Tomcat has an option for that), or
> dump your static resources into a database, or anywhere else it wants.
> 
> To read a resource file like this, use the following:
> 
>   InputStream is =
> getServletContext().getResourceAsStream("/file.dat");
Yep, was actually cruising the sourcecode and just got this a few
minutes ago.  The servlet context has all the nice methods for file
access ;)

> where the path you pass starts with a slash, and is relative to the
> context root.  This is how Struts reads your struts-config.xml file, by
> the way, using a typical path like "/WEB-INF/struts-config.xml".
> 
> As a side note, placing your data file directly in the context root
> directory like this makes it possible for clients to access the file
> directly.  If you don't want this (in other words, if the file is only for
> internal use by your app), you can put it in /WEB-INF instead.
Naturally. I was actually writing a custom taglib to check for the
existence of an asset (graphic file, which is a headshot of a
member) and to use it as a logic:present like tag.  I am actually
going to start a new thread with the sourcecode for that.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
There is no such thing as a casual knowledge of xslt, either 
you know everything about it or you are sitting in the creek.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



RE: Nesting tile definitions

2003-03-19 Thread Tai Nguyen
Kevin,

First if all, it is possible to use attributes from supertiles, but that's
another issue.  The definitions you have posted look fine, so I would guess
that it's a problem with your header.jsp file.  Can you post that so we can
look at it, as well as the full error message you are getting?

Thanks,
Tai

-Original Message-
From: Kevin Cramer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 4:43 PM
To: [EMAIL PROTECTED]
Subject: Nesting tile definitions



I am trying to have a tile definition include another definition but
it doesn't seem to be working.  Can I do this and if so then how do I
do it?

Here is an example of what I am trying to do.  I would like the header
of a standard page to be another tile so I can further divide it into
pieces.  However, when I try to create a definition that extends the
.standardPage I get an error at the top of the page.  It just says
that there has been a ServletException in
/WEB-INF/common/layouts/header.jsp.  I understand that a tile cannot
use attributes from subtiles or supertiles and I don't think that is
the problem.


  
 
 
 
 
 
  

  
   
   
 


Thanks,
Kevin

-
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: Control Access

2003-03-19 Thread Sloan Seaman
Use a servlet filter (lots of examples exist)...

Just check the session to see if they have a valid one and if they don't
redirect them to the login page.

3 lines in web.xml and aboue 10-20 lines of java...

That's how I do it...

--
Sloan

- Original Message -
From: "mahesh kagitha" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 19, 2003 4:09 PM
Subject: RE: Control Access


>
> Hi Siva,
>My question about navigation of successful/unsuccessful users...If I
directly access  any JSP other than login.jsp, then I should be redirected
to login.jsp , a way of forcing user to authorization.
> Thanks
> mahesh.
>
>  "Jagadeesan,Sivakumar" <[EMAIL PROTECTED]> wrote:Hi
Mahesh:
>
> This is pretty simple when using struts.
> Have the Login Page to Submit to Login Action.
> Configure in the Struts-Config.xml the action mapping for LoginAction as
> SUCCESS ---> Index.html
> FAILURE ---> Login.jsp
>
> In the Login Action return SUCCESS if the login succeeds or return FAILURE
> if the login fails
>
> I am sorry I was in hurry so not able to give any code example. Let me
know
> if I am not that clear
> --Siva
>
> -Original Message-
> From: mahesh kagitha [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 19, 2003 2:49 PM
> To: [EMAIL PROTECTED]
> Subject: Control Access
>
>
>
> Can any one please explain the following...
>
> I'm developing an application which has login page(JSP) to access the
> application and I should allow only the successfully logged in users to
> navigate my application otherwise direct to login page. My question here
> is... How can I do that.?
>
>
>
> Thanks in Advance.
>
>
>
>
>
> -
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!


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



RE: Design philosophy, beans, model to view

2003-03-19 Thread Nathan Steiner
I have to agree with this. You want a clear separation of duties across
tiers (at least I do!). We are running in a J2EE environment, so our
approach is:


WEB TIER

User requests "View Grocery List", which is a link to /view_list.do

ViewGroceryList action class creates a business delegate,
ViewGroceryListDelegate which is a wrapper to an EJB, and requests list -
getList()

Delegate performs JNDI lookup on EJB, and requests list from EJB - getList()


EJB TIER

EJB creates GroceryListDAO and requests the list - getList()


DATA TIER

DAO goes out to the database, creates a list of GroceryValueObject's, and
returns them to the EJB


BACK TO EJB TIER

EJB returns list to delegate


BACK TO WEB TIER

Delegate returns list to action clas

Action class places list in request and forwards onto tiles definition or
jsp

JSP displays list using  or whatever.

We work in parallel on most apps, so I'll do the web tier, and my colleague
will do the EJB/Data tiers. I would look into design patterns, as we use
quite a few in this approach that I didn't go into detail.

HTH!

Nate

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 3:48 PM
To: Struts Users Mailing List
Subject: Re: Design philosophy, beans, model to view


On Wed, 19 Mar 2003 14:46:41 -0600
Kirby Vandivort <[EMAIL PROTECTED]> wrote:

> So, I guess my question is... is there a consensus of any sort on how
> this should be done or, how do you do it, etc?

Unfortunately, I'm starting to find out more and more that there isn't a
consensus:) I'm also leaning towards doing things differently now based
on Vic's basicPortal approach that does not copy formBeans into Data
Transfer Objects which is what I have been doing (just because I've been
told that's the way it should it be done for so long). There are some
things, though, that there seems to be consensus on:

1) Your JSPs should go through a controller (Action servlet or a
subclass of ActionServlet).

2) Your persistence layer, that talks to the database or storage, should
remain separated from any Struts classes.

You might find some of the threads here very helpful
http://groups.yahoo.com/group/model_struts/


--
Rick Reumann

-
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: [OT] tld complaint

2003-03-19 Thread Craig R. McClanahan


On Wed, 19 Mar 2003, Dan Allen wrote:

> Date: Wed, 19 Mar 2003 15:42:10 -0600
> From: Dan Allen <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts-User List <[EMAIL PROTECTED]>
> Subject: [OT] tld complaint
>
> Does someone out there have something against formatting the .tld
> xml files for taglib definitions that no one ever does it?  Just
> seems odd that every .tld I open from the struts sourcecode is
> totally unreadable.  Maybe someone could serve them a little xmllint
> --format?
>

If you looked into how they are created, you'll see that the TLDs are
*output* files, not input files - they are produced from XML source
documents (for use by the container, not for users) that are also the
source for the tag library reference pages like this:

  http://jakarta.apache.org/struts/userGuide/struts-html.html

The reference pages for all the tag libraries are also included in the
struts-documentation webapp included with the distribution.

Why would you want to look at a TLD when you can have something readable
like this instead? :-)

> Dan
>

Craig

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



Re: Design philosophy, beans, model to view

2003-03-19 Thread Kirby Vandivort

On Wed, Mar 19, 2003 at 04:48:13PM -0500, Rick Reumann wrote:
> On Wed, 19 Mar 2003 14:46:41 -0600
> Kirby Vandivort <[EMAIL PROTECTED]> wrote:
>  
> > So, I guess my question is... is there a consensus of any sort on how
> > this should be done or, how do you do it, etc?
> 
> Unfortunately, I'm starting to find out more and more that there isn't a
> consensus:) I'm also leaning towards doing things differently now based
> on Vic's basicPortal approach that does not copy formBeans into Data
> Transfer Objects which is what I have been doing (just because I've been
> told that's the way it should it be done for so long). There are some
> things, though, that there seems to be consensus on:
> 
> 1) Your JSPs should go through a controller (Action servlet or a
> subclass of ActionServlet). 

done

> 2) Your persistence layer, that talks to the database or storage, should
> remain separated from any Struts classes. 

and done..

> You might find some of the threads here very helpful
> http://groups.yahoo.com/group/model_struts/

Thanks for the pointer.  I've just joined the group and will take a look
at it.

-- 

Kirby Vandivort  Theoretical and Computational Biophysics 
Email: [EMAIL PROTECTED]  3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/University of Illinois
Phone: (217) 244-5711405 N. Mathews Ave
Fax  : (217) 244-6078Urbana, IL  61801, USA

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



RE: ActionError not supporting bundle

2003-03-19 Thread David Gagnon
Hi 

Thanks for your reply btw :-)

> >   I look into the RC1 code to find that ActionError
> > doesn't allow to specify the bundle to search for a
> > given error message.
> >
> >   I my application I have multiple modules and
> > multiple message ressource files.  How can I specify
> > error messages coming from different bundles?
> 
> The module selection is handled for you.  ActionError is a simple bean
> used to carry a message or error (key and args) to the view.
> You would specify the bundle you want as an attribute of the errors tag
> or messages tag.

I know the JSP errors tag allows to specify the bundle ... the problem is
that the errors to display may come from different bundles.  Per example, in
the validate Method of an ActionForm you may have:

if (f1 == null) 
errors.add("f1", new ActionError( "bundle1.f1.notEmpty"));

if (f2 == null)
errors.add("f2", new ActionError( "bundle2.f2.notEmpty"));

where bundle1.f1.notEmpty comes from "bundle1" and bundle2.f2.notEmpty comes
from "bundle2".

This case will occur if you have a base bundle where you put your general
messages and a module specific bundle where you put stuff specific to your
module.

And in the JSP you can only specify one bundle... so you got a problem.


In validator it's the same problem: 
You have basic messages used by the different validators and most of those
messages take an argument which is the name of the field that is validated.

So my basic messages are in the main bundle and the field names are in the
module specific bundle.  The result is that I can't have the field name
appear on the screen.


Hope it's more clear .. if not tell me :-)

Thanks again
/David

> 
> 
> 
> > The Errors Tag doesn't support to specify a bundle
> > too.
> 
> Are you sure about that?
> http://jakarta.apache.org/struts/userGuide/struts-html.html#errors
> 
> 
> > I initially got this problem in validator. I put my
> > generic error messages in the base message resource
> > file and the column name in a specific module.
> 
> Sorry, I can't help you with the Validator, that's not my specialty.
> 
> --
> James Mitchell
> Software Developer/Struts Evangelist
> http://www.open-tools.org
> 
> 
> 
> 
> -
> 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: file path

2003-03-19 Thread Craig R. McClanahan


On Wed, 19 Mar 2003, Dan Allen wrote:

> Date: Wed, 19 Mar 2003 13:19:49 -0600
> From: Dan Allen <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts-User List <[EMAIL PROTECTED]>
> Subject: Re: file path
>
>
> Dan Allen ([EMAIL PROTECTED]) wrote:
>
> > Assuming I am storing a public file in my web directory who's real
> > path is
> >
> > /var/tomcat/webapps/program/file.dat
> >
> > How would I reference that file in my Action class in order to read
> > in the data?  My concern of course is how to get the path info
> > preceding my application, namely /var/tomcat/webapps/program/
> >
> > Thanks!
> >
> > Dan
>
> So even the struts-upload example doesn't get into this, because it
> allows you to type in a filename but it treats it as a full unix
> path, not a relative path.  How can my struts application work with
> files inside the current application.  Surely there must be a way to
> deal with real file paths of these files.

There is absolutely no guarantee that webapp resources even *have* a "file
path" at all -- it's perfectly legal for the container to run your
application directly from a WAR file (Tomcat has an option for that), or
dump your static resources into a database, or anywhere else it wants.

To read a resource file like this, use the following:

  InputStream is =
getServletContext().getResourceAsStream("/file.dat");

where the path you pass starts with a slash, and is relative to the
context root.  This is how Struts reads your struts-config.xml file, by
the way, using a typical path like "/WEB-INF/struts-config.xml".

As a side note, placing your data file directly in the context root
directory like this makes it possible for clients to access the file
directly.  If you don't want this (in other words, if the file is only for
internal use by your app), you can put it in /WEB-INF instead.

>
> Dan

Craig

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



Re: Design philosophy, beans, model to view

2003-03-19 Thread Rick Reumann
On Wed, 19 Mar 2003 14:46:41 -0600
Kirby Vandivort <[EMAIL PROTECTED]> wrote:
 
> So, I guess my question is... is there a consensus of any sort on how
> this should be done or, how do you do it, etc?

Unfortunately, I'm starting to find out more and more that there isn't a
consensus:) I'm also leaning towards doing things differently now based
on Vic's basicPortal approach that does not copy formBeans into Data
Transfer Objects which is what I have been doing (just because I've been
told that's the way it should it be done for so long). There are some
things, though, that there seems to be consensus on:

1) Your JSPs should go through a controller (Action servlet or a
subclass of ActionServlet). 

2) Your persistence layer, that talks to the database or storage, should
remain separated from any Struts classes. 

You might find some of the threads here very helpful
http://groups.yahoo.com/group/model_struts/


-- 
Rick Reumann

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



Stupid indexed property DynaActionForm problem/question

2003-03-19 Thread Ian Hunter
Before anyone flames me, I have read through the archive, and as someone
already said, there is info in there, but no concrete basic examples.

Here's the formBean I'm trying to handle:


  
  
  
  
  
  
  
  
  


In short, there are some fields that are the same for everyone, and some
fields that are unique to each person.  I can place a hard limit on how many
firstNames there can be, but I want the code to refer to a constant
somewhere, say "Constants.MAXPEOPLE" or something.  I'm not trying to have
an array of some object type (there WAS somewhat of an example for that in
the archive), just flat out strings.

I know the JSP will look something like:









 for firstName
 for lastName
 for cellPhone




Then from my actions I can do this:

DynaActionForm dynaForm = (DynaActionForm) form;
address = dynaForm.get("address").toString();
city = dynaForm.get("city").toString();
state = dynaForm.get("state").toString();
zip = dynaForm.get("zip").toString();
homePhone = dynaForm.get("homePhone").toString();
status = dynaForm.get("status").toString();
for (int i = 0; i < ???; i++) {
thisFirstName = dynaForm.get("firstName", i).toString();
thisLastName = dynaForm.get("lastName", i).toString();
thisCellPhone = dynaForm.get("cellPhone", i).toString();
}

Can someone fill in the ??, so to speak?




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



Nesting tile definitions

2003-03-19 Thread Kevin Cramer

I am trying to have a tile definition include another definition but
it doesn't seem to be working.  Can I do this and if so then how do I
do it?

Here is an example of what I am trying to do.  I would like the header
of a standard page to be another tile so I can further divide it into
pieces.  However, when I try to create a definition that extends the
.standardPage I get an error at the top of the page.  It just says
that there has been a ServletException in
/WEB-INF/common/layouts/header.jsp.  I understand that a tile cannot
use attributes from subtiles or supertiles and I don't think that is
the problem.


  
 
 
 
 
 
  

  
   
   
 


Thanks,
Kevin

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



[OT] tld complaint

2003-03-19 Thread Dan Allen
Does someone out there have something against formatting the .tld
xml files for taglib definitions that no one ever does it?  Just
seems odd that every .tld I open from the struts sourcecode is
totally unreadable.  Maybe someone could serve them a little xmllint
--format?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Microsoft's Law of Software Engineering: 
Don't worry if it doesn't work right. 
If everything did, we'd be out of a job.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



RE: Control Access

2003-03-19 Thread Jagadeesan,Sivakumar
There are many ways we could do that

The simplest way is ,
In all actions check whether the User is logged in ( by checking whether
UserBean is present in the Session) . If the user is not logged in direct
him to the Login page . This approach is not that efficient as you have to
have this logic in all the actions.

The better way is,
Use a filter that checks whether the User is logged in . If the User is not
logged in it will redirect to Login Page.

In my application, I have Servlet filter that has two arguments.
1) Login Page Url
2) The pages that need authorization

So my filter will check only for the pages that need authorization and for
other pages it does not check whether the user is logged in.

-- Siva Jagadeesan

-Original Message-
From: mahesh kagitha [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 3:10 PM
To: Struts Users Mailing List
Subject: RE: Control Access 



Hi Siva,
   My question about navigation of successful/unsuccessful users...If I
directly access  any JSP other than login.jsp, then I should be redirected
to login.jsp , a way of forcing user to authorization.
Thanks 
mahesh.
 
 "Jagadeesan,Sivakumar" <[EMAIL PROTECTED]> wrote:Hi
Mahesh:

This is pretty simple when using struts.
Have the Login Page to Submit to Login Action.
Configure in the Struts-Config.xml the action mapping for LoginAction as
SUCCESS ---> Index.html
FAILURE ---> Login.jsp

In the Login Action return SUCCESS if the login succeeds or return FAILURE
if the login fails

I am sorry I was in hurry so not able to give any code example. Let me know
if I am not that clear
--Siva

-Original Message-
From: mahesh kagitha [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:49 PM
To: [EMAIL PROTECTED]
Subject: Control Access 



Can any one please explain the following...

I'm developing an application which has login page(JSP) to access the
application and I should allow only the successfully logged in users to
navigate my application otherwise direct to login page. My question here
is... How can I do that.?



Thanks in Advance.





-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

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



-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

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



Design philosophy, beans, model to view

2003-03-19 Thread Kirby Vandivort
I'm in the process of converting a webapp to using struts, am trying to
use "best" practices to make sure that I keep presentation split from
business, and I was wondering what all of you experts do to handle the
data transition from model business logic beans to the presentation.

As I see it, I can make what amounts to a bean for every single page that
is going to be presenting data to the user.  The bean contains the data
and the JSP then displays the values in the bean.

That seems like a real pain to have XXX beans.  It's just a pain to have
to make hundreds of bean classes.  I suspect that I'm missing something
here, but this is what i'm seeing.

Most of the struts documentation that i can find doesn't really address
the simple case of wanting to print data to the user.  Lots of discussion
of making forms in struts, but I'm just wanting to send data back to the
presentation...

The struts-example seems to basically use a single uber bean that contains
all the data and doesn't ever really do much business prep of return
data;  Artimus uses scaffolding to wrap everything in; struts-polls seems
to use Collection and jsp knowledge of class names to get the data out..

So, I guess my question is... is there a consensus of any sort on how
this should be done or, how do you do it, etc?

Thanks,

-- 

Kirby Vandivort  Theoretical and Computational Biophysics 
Email: [EMAIL PROTECTED]  3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/University of Illinois
Phone: (217) 244-5711405 N. Mathews Ave
Fax  : (217) 244-6078Urbana, IL  61801, USA

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



forwards with appending query string

2003-03-19 Thread Stephen Smithstone
in my jsp page im usually calling

Link

is there something i can along the same lines with the  either 
using the forward or href attribute

Ta

Stephen

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



RE: Control Access

2003-03-19 Thread mahesh kagitha

Hi Siva,
   My question about navigation of successful/unsuccessful users...If I directly 
access  any JSP other than login.jsp, then I should be redirected to login.jsp , a way 
of forcing user to authorization.
Thanks 
mahesh.
 
 "Jagadeesan,Sivakumar" <[EMAIL PROTECTED]> wrote:Hi Mahesh:

This is pretty simple when using struts.
Have the Login Page to Submit to Login Action.
Configure in the Struts-Config.xml the action mapping for LoginAction as
SUCCESS ---> Index.html
FAILURE ---> Login.jsp

In the Login Action return SUCCESS if the login succeeds or return FAILURE
if the login fails

I am sorry I was in hurry so not able to give any code example. Let me know
if I am not that clear
--Siva

-Original Message-
From: mahesh kagitha [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:49 PM
To: [EMAIL PROTECTED]
Subject: Control Access 



Can any one please explain the following...

I'm developing an application which has login page(JSP) to access the
application and I should allow only the successfully logged in users to
navigate my application otherwise direct to login page. My question here
is... How can I do that.?



Thanks in Advance.





-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

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



-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

Good Combination

2003-03-19 Thread Jagadeesan,Sivakumar
Hi All:

Could anyone list the advantages and disadvantages of these combinations

1) Struts alone

2) Struts with tiles

3) Struts with Sitemesh

--Siva Jagadeesan

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



RE: Control Access

2003-03-19 Thread Jagadeesan,Sivakumar
Hi Mahesh:

This is pretty simple when using struts.
Have the Login Page to Submit to Login Action.
Configure in the Struts-Config.xml the action mapping for LoginAction as
SUCCESS --->  Index.html
FAILURE ---> Login.jsp

In the Login Action return SUCCESS if the login succeeds or return FAILURE
if the login fails

I am sorry I was in hurry so not able to give any code example. Let me know
if I am not that clear
--Siva

-Original Message-
From: mahesh kagitha [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:49 PM
To: [EMAIL PROTECTED]
Subject: Control Access 



Can any one please explain  the following...

I'm developing an application which has login page(JSP) to access the
application and I should allow only the successfully logged in users to
navigate my application otherwise  direct  to login page. My question here
is... How can I do that.?

 

Thanks in Advance.

 



-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

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



RE: Control Access

2003-03-19 Thread Robert Taylor
Please search the archives. This has been discussed many times.
You might also try a google search. I also remember reading a 
recent article in the Java Developer Journal on several strategies
for this.


robert

> -Original Message-
> From: mahesh kagitha [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 19, 2003 3:49 PM
> To: [EMAIL PROTECTED]
> Subject: Control Access 
> 
> 
> 
> Can any one please explain  the following...
> 
> I'm developing an application which has login page(JSP) to access 
> the application and I should allow only the successfully logged 
> in users to navigate my application otherwise  direct  to login 
> page. My question here is... How can I do that.?
> 
>  
> 
> Thanks in Advance.
> 
>  
> 
> 
> 
> -
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

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



ServletResponse

2003-03-19 Thread Gilbert, Antoine
Hi 
 
I have a simple question about this piece of code in a simple JSP
 
response.setHeader("test","hi");
Logger.log(response.containsHeader("test"));
 
Why the contains method return false ? the response is not commited yet (I verified 
with isCommited())
 
Another question related to this... (why I'm testting it...)
 
I set the contenttype to utf-8
 
my response in web browser output correctly in utf-8..
 
but when I use a simple tag, and this one doing setLocale(fr_CA) on the response, my 
browser output become ISO-...
response.getCharacterEncoding() pass from utf-0 to iso- (no commit yet) after 
using the tag (the setLocale is in the doStartTag)..
 
I can't modify the tag. And it seem i can't set any header of the response (first 
problem). How i could get back to correct settings ?
 
I tried to flush the response before using the tag, and it work, i became in utf-8.. 
but unfortunatly, i cant flush the response before using the tag..
 
I tried to setContentType("text/html; charset=utf-8") without success..
 
regards
 
 

Salutations,

__ 

Antoine Gilbert /   [EMAIL PROTECTED]
Analyste-programmeur

KOREM
Technologies de GÉOdiffusion 

__

680, boul. Charest Est, bureau 120
Québec (Québec) G1K 3J4
 

 Localisation KOREM Qc
Tél. : (418) 647-1555
Téléc. : (418) 647-1666
1 888 440-1MAP 

  www.korem.com
__

* Partenaire canadien MapInfo de l'année - 2002
* Partenaire canadien MapInfo de l'année - 2001
* Meilleur nouveau partenaire MapInfo 2000-Amérique du Nord

__ 

  

 


RE: Control Access

2003-03-19 Thread Chen, Gin
So many ways.
One you can use the struts roles and control login that way.
Two you can programmatically do this using a request processor.
Three you can do this programmatically in all you actions/jsps.
And a few other solutions as well.
-Tim

-Original Message-
From: mahesh kagitha [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 3:49 PM
To: [EMAIL PROTECTED]
Subject: Control Access 



Can any one please explain  the following...

I'm developing an application which has login page(JSP) to access the
application and I should allow only the successfully logged in users to
navigate my application otherwise  direct  to login page. My question here
is... How can I do that.?

 

Thanks in Advance.

 



-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

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



Control Access

2003-03-19 Thread mahesh kagitha

Can any one please explain  the following...

I'm developing an application which has login page(JSP) to access the application and 
I should allow only the successfully logged in users to navigate my application 
otherwise  direct  to login page. My question here is... How can I do that.?

 

Thanks in Advance.

 



-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

RE: [OT] Ping

2003-03-19 Thread Susmita Pati
I think its pretty slow
compared to the other days...

-Original Message-
From: Chappell, Simon P [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 3:40 PM
To: Struts Users Mailing List
Subject: RE: [OT] Ping


I think it's just you James. There seems to be plent of it coming through
into my mailbox. (Now, there is a lack of sillyness, but that's another
matter! :-)

Simon

>-Original Message-
>From: James Mitchell [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 2:37 PM
>To: Struts Users List
>Subject: [OT] Ping
>
>
>Is it just me or is the mail slow today?
>
>
>-- 
>James Mitchell
>Software Developer/Struts Evangelist
>http://www.open-tools.org
>
>
>
>
>-
>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]

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



RE: [Q] why can't be used without NAME as ca n?

2003-03-19 Thread Chen, Gin

When using nested:hidden of 1.1 rc I get.
"Attribute write invalid according to the specified TLD" :(
-Tim

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:16 PM
To: 'Struts Users Mailing List'
Subject: RE: [Q] why  can't be used without NAME as
 ca n?


Ahh crap James.
Even though I didnt post the original msg, if I had of read the
documentation more closely on html hidden.. this could have saved me a few
lines of code >_<
-Tim

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:00 PM
To: Struts Users Mailing List
Subject: Re: [Q] why  can't be used without NAME as
 ca n?


On Wed, 2003-03-19 at 13:58, [EMAIL PROTECTED] wrote:
> Hello,
> 
> from  about Attribute name - If not specified, the bean
> associated with the form tag we are nested within is utilized.
> why  can't does the same? to be consistant.
> or Am I missing anything?

I noticed this to while working on some of the struts cactus tests.  One
thing to note - by using bean:write to display some value from your form
bean, that value will not be persisted back on the bean when the user 
submits the form.  

You can accomplish both of these by using html:hidden and set
write="true".

This will show the value on the page, and also write out a hidden form
element so that it can be passed back the form (for your convenience).

> tnx
> Best Regards.
> Michael.
> 

-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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

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



RE: [OT] Ping

2003-03-19 Thread Chappell, Simon P
I think it's just you James. There seems to be plent of it coming through into my 
mailbox. (Now, there is a lack of sillyness, but that's another matter! :-)

Simon

>-Original Message-
>From: James Mitchell [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, March 19, 2003 2:37 PM
>To: Struts Users List
>Subject: [OT] Ping
>
>
>Is it just me or is the mail slow today?
>
>
>-- 
>James Mitchell
>Software Developer/Struts Evangelist
>http://www.open-tools.org
>
>
>
>
>-
>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: [OT] Ping

2003-03-19 Thread Chen, Gin
just you.
put the drink down and get some coffee.
everything will speed back up.
its not even friday yet!

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 3:37 PM
To: Struts Users List
Subject: [OT] Ping


Is it just me or is the mail slow today?


-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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



[OT] Ping

2003-03-19 Thread James Mitchell
Is it just me or is the mail slow today?


-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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



RE: Tiles

2003-03-19 Thread Tai Nguyen
You can configure your web.xml to have multiple tiles-def.xml files for
easier maintenance.

-Original Message-
From: Nathan Steiner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:24 PM
To: 'Struts Users Mailing List'
Subject: RE: Tiles


Yes, you are correct on the point of my question.

As for placing them all in the tiles-def.xml, does maintenance of that file
become cumbersome for a large site?

Are there performance issues related to the size of the xml file?

Thanks,

Nate

-Original Message-
From: Tai Nguyen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 12:29 PM
To: 'Struts Users Mailing List'
Subject: RE: Tiles


Nathan,

Is your question, what is better, creating definitions in JSP's or in the
XML?  If so, it's better to create definitions in tiles-def.xml, as is it
easier to maintain all your definitions if they are one place.  It also
allows you to have definitions which stay in application scope, as opposed
to having to include a JSP file with all your definitions which incurs
overhead.

Tai

-Original Message-
From: Nathan Steiner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 12:07 PM
To: 'Struts Users Mailing List'
Subject: Tiles


I am fairly new to struts, and was just getting comfortable with templates,
and now must dig into tiles.

With tiles, from what I can gather, you can compose your definitions in
jsp's and/or tiles-def xml file, and extend them, yada, yada, yada.

I guess my question is what are the pros-cons for both?

Thanks,

Nate


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


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



Trapping timeout of HttpSession

2003-03-19 Thread Rick Ashley
Hello,

What is the best place to check if user's HttpSession has expired?
I mean situation where e.g. timeout of Web application is 30 minutes
and after that user tries to submit a form.
Is it ok to check it e.g. in RequestProcessor or somewhere else and how?

Anyone have a sample code?

Br

r a





_
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://messenger.msn.co.uk

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


Re: Tiles

2003-03-19 Thread Cedric Dumoulin
 Check the struts archive. There is some answer to this question.
 You can also check for the thread "Sell me on Tiles"
  Cedric

Nathan Steiner wrote:

I am fairly new to struts, and was just getting comfortable with templates,
and now must dig into tiles.
With tiles, from what I can gather, you can compose your definitions in
jsp's and/or tiles-def xml file, and extend them, yada, yada, yada.
I guess my question is what are the pros-cons for both?

Thanks,

Nate

-
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: file path

2003-03-19 Thread Dan Allen
perhaps org.apache.commons.resources.file.web.WebappFileResources?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"When you're raised by the Jesuits, you become either obedient 
or impertinent" 
 -- Jack McCoy, "Law and Order"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



RE: Tiles

2003-03-19 Thread David Graham
As for placing them all in the tiles-def.xml, does maintenance of that file
become cumbersome for a large site?
No.  You can use Struts Console to maintain Struts' config files including 
Tiles.

Are there performance issues related to the size of the xml file?

No.

Thanks,

Nate
David

_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


A dynamic way to reset/populate DynaXXXXActionForm

2003-03-19 Thread Robert Taylor
I recently decided to exercise my skills in using dynamic indexed properties
with my DynaValidatorActionForm. I quickly realized that I will need
to have some code in the DynaValidatorActionForm.reset() which must
re-populate my indexed collection so that the RequestUtils.populate()
can successfully populate my indexed collection with the values that are
in the current request.  Now, for each page on which I want to use
dynamic indexed properties, I will have to subclass the base form and
override the reset().

This seems awkward when DynaActionForm and StrutsValidator
are supposed to eliminate (almost)the need to create concrete
ActionForms.

Is it unreasonable to think that there could exist a way to "plug-in"
a form resetter? And have the ability to define that in the struts-config,
per form or per action. Similar to how validation works in
DynaValidatorActionForm.

It seems like having to access the Model from a View component is a bit
backwards
(http://www.mail-archive.com/[EMAIL PROTECTED]/msg24160.html).

Maybe something like the following in the RequestProcessor.populateForm():

if (form == null) {
return;
}

// Populate the bean properties of this ActionForm instance
if (log.isDebugEnabled()) {
log.debug(" Populating bean properties from this request");
}
form.setServlet(this.servlet);

// reset simple form attributes
form.reset(mapping, request);
if (mapping.getMultipartClass() != null) {
request.setAttribute(Globals.MULTIPART_KEY,
 mapping.getMultipartClass());
}
// reset complex form attributes
FormResetter resetter = form.getResetter(mapping, request);
if (resetter != null) {
  resetter.resetForm(form);
}

RequestUtils.populate(form, mapping.getPrefix(), mapping.getSuffix(),
  request);


Maybe FormResetter is the wrong term, but you get the idea. At least this
way the Controller is responsible for delegating any business logic to
the appropriate component rather than the View component being responsible
for resetting/populating itself.

robert


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



RE: Tiles

2003-03-19 Thread Nathan Steiner
Yes, you are correct on the point of my question.

As for placing them all in the tiles-def.xml, does maintenance of that file
become cumbersome for a large site?

Are there performance issues related to the size of the xml file?

Thanks,

Nate

-Original Message-
From: Tai Nguyen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 12:29 PM
To: 'Struts Users Mailing List'
Subject: RE: Tiles


Nathan,

Is your question, what is better, creating definitions in JSP's or in the
XML?  If so, it's better to create definitions in tiles-def.xml, as is it
easier to maintain all your definitions if they are one place.  It also
allows you to have definitions which stay in application scope, as opposed
to having to include a JSP file with all your definitions which incurs
overhead.

Tai

-Original Message-
From: Nathan Steiner [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 12:07 PM
To: 'Struts Users Mailing List'
Subject: Tiles


I am fairly new to struts, and was just getting comfortable with templates,
and now must dig into tiles.

With tiles, from what I can gather, you can compose your definitions in
jsp's and/or tiles-def xml file, and extend them, yada, yada, yada.

I guess my question is what are the pros-cons for both?

Thanks,

Nate


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


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



Re: file path

2003-03-19 Thread Dan Allen

Dan Allen ([EMAIL PROTECTED]) wrote:

> Assuming I am storing a public file in my web directory who's real
> path is
> 
> /var/tomcat/webapps/program/file.dat
> 
> How would I reference that file in my Action class in order to read
> in the data?  My concern of course is how to get the path info
> preceding my application, namely /var/tomcat/webapps/program/ 
> 
> Thanks!
> 
> Dan

So even the struts-upload example doesn't get into this, because it
allows you to type in a filename but it treats it as a full unix
path, not a relative path.  How can my struts application work with
files inside the current application.  Surely there must be a way to
deal with real file paths of these files.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Since no one can ever know for certain whether or not his own 
view of creation is the correct one, it is impossible for him 
to know if someone else's is the wrong one.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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



RE: [Q] why can't be used without NAME as ca n?

2003-03-19 Thread Chen, Gin
Ahh crap James.
Even though I didnt post the original msg, if I had of read the
documentation more closely on html hidden.. this could have saved me a few
lines of code >_<
-Tim

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:00 PM
To: Struts Users Mailing List
Subject: Re: [Q] why  can't be used without NAME as
 ca n?


On Wed, 2003-03-19 at 13:58, [EMAIL PROTECTED] wrote:
> Hello,
> 
> from  about Attribute name - If not specified, the bean
> associated with the form tag we are nested within is utilized.
> why  can't does the same? to be consistant.
> or Am I missing anything?

I noticed this to while working on some of the struts cactus tests.  One
thing to note - by using bean:write to display some value from your form
bean, that value will not be persisted back on the bean when the user 
submits the form.  

You can accomplish both of these by using html:hidden and set
write="true".

This will show the value on the page, and also write out a hidden form
element so that it can be passed back the form (for your convenience).

> tnx
> Best Regards.
> Michael.
> 

-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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

2003-03-19 Thread David Graham
Say you have 2 input fields backed by a Map named myMap:


When the form is populated the Map value for key "one" will get written 
twice and the last one entered will be your value.

David


From: "WILLIAMS,RAND (HP-USA,ex1)" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: 
Hi David, thank you :)
But I'm still a bit confused.
The reason why I want to use a Map to hold these values
of the form, is that I want the flexibility of having
X number of String[], populated from the form :selects
and stored in the Map. Then I can process X String[]'s
in my Action by iterating over the Map, and doing
the appropriate stuff with the Map.Entry Key (String),
and Map.Entry Value (the String[]).
I don't understand, because it works for everything
else, including other bean objects... just not for a
String[]
for a String, there is no problem, for
property="value(myString)" beanUtils
finds and does my getValue("myString")
and the object returned is a String.
for a String[], there is a problem, for
property="value(myArray)" beanUtils
finds and does my getValue("myArray")
and the object returned is a String[0],
or null.  Is the problem that it is [0]
or null?
Are you saying is that it is overwritten by the
beanUtils use of my setValue("myArray", String[])?
Or is beanUtils using setValue("myArray", String)?
Or does beanUtils find that the returned object,
although it is a String[], is zero size - it
creates another String[_numberOfSelections] and
then uses my setValue("myArray", the new String[])
but that latter seems like it would work...
Or is it that since beanUtils cannot find an
indexed setValue(key, value, idx), it doesn't
even bother with trying to populate my String[]
(through the indexed set()) and just opt's to
set the first value of my selection (String[0])
by simply doing setValue("myArray", String[0])?
This is what it looks like it does...
Just trying to understand it... what do you think??
THANKS!
-Rand
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 1:41 PM
To: [EMAIL PROTECTED]
Subject: Re: 
You can't use String[] inside a Map backed field.  The value will get
overwritten by the next property of the same name in the map.  Use a
String[] to support multi valued select boxes.
David



>From: "WILLIAMS,RAND (HP-USA,ex1)" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: 
>Date: Wed, 19 Mar 2003 10:08:00 -0800
>
>Anyone tried this?
>
>Using a map backed form, where
>set(key,val) { mymap.put(key,val) }
>and get(key) { return mymap.get(key) }
>
>I am having a problem with String[] and multiple attribute of 
html:select:
>
>
>  
>   
>
>  
>
>
>Even though value(selectProduct) gives to the tag
>[INFO] SmModelForm - - getValue(selectProduct) = 
[Ljava.lang.String;@deb5f
>which is a String[0]
>
>The problem i see is beanUtils still populates the field with only a
>string:
>
>[INFO] SmModelForm - - setValue(selectProduct,U3995)
>which is merely a String - not a String[] with an element (String) 
"U3995".
>
>Is there something wrong or am I missing something here??
>Is there an issue with retrieving or setting the String[] from a HashMap?
>
>Thanks in advance for help :)
>-Rand
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

_
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
-
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]


_
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus

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


Jaas support

2003-03-19 Thread Shilpa Dalmia
I read in the struts documentation that struts provides direct support for jaas since 
1.1. I 've got it working using a policy file, specifying permissions to access URLs. 
Does the actionmapping 'roles' integrate with jaas roles, if so, can someone direct me 
how to go abt it?

Shilpa


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



RE:

2003-03-19 Thread WILLIAMS,RAND (HP-USA,ex1)
Hi David, thank you :)
But I'm still a bit confused.

The reason why I want to use a Map to hold these values
of the form, is that I want the flexibility of having
X number of String[], populated from the form :selects
and stored in the Map. Then I can process X String[]'s
in my Action by iterating over the Map, and doing
the appropriate stuff with the Map.Entry Key (String), 
and Map.Entry Value (the String[]).

I don't understand, because it works for everything
else, including other bean objects... just not for a
String[]

for a String, there is no problem, for
property="value(myString)" beanUtils 
finds and does my getValue("myString")
and the object returned is a String.

for a String[], there is a problem, for
property="value(myArray)" beanUtils
finds and does my getValue("myArray")
and the object returned is a String[0],
or null.  Is the problem that it is [0]
or null?

Are you saying is that it is overwritten by the
beanUtils use of my setValue("myArray", String[])?
Or is beanUtils using setValue("myArray", String)?

Or does beanUtils find that the returned object,
although it is a String[], is zero size - it
creates another String[_numberOfSelections] and
then uses my setValue("myArray", the new String[])
but that latter seems like it would work...

Or is it that since beanUtils cannot find an
indexed setValue(key, value, idx), it doesn't
even bother with trying to populate my String[]
(through the indexed set()) and just opt's to
set the first value of my selection (String[0])
by simply doing setValue("myArray", String[0])?
This is what it looks like it does...

Just trying to understand it... what do you think??
THANKS!
-Rand


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 1:41 PM
To: [EMAIL PROTECTED]
Subject: Re: From: "WILLIAMS,RAND (HP-USA,ex1)" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: Date: Wed, 19 Mar 2003 10:08:00 -0800
>
>Anyone tried this?
>
>Using a map backed form, where
>set(key,val) { mymap.put(key,val) }
>and get(key) { return mymap.get(key) }
>
>I am having a problem with String[] and multiple attribute of html:select:
>
>
>  
>   
>
>  
>
>
>Even though value(selectProduct) gives to the tag
>[INFO] SmModelForm - - getValue(selectProduct) = [Ljava.lang.String;@deb5f
>which is a String[0]
>
>The problem i see is beanUtils still populates the field with only a 
>string:
>
>[INFO] SmModelForm - - setValue(selectProduct,U3995)
>which is merely a String - not a String[] with an element (String) "U3995".
>
>Is there something wrong or am I missing something here??
>Is there an issue with retrieving or setting the String[] from a HashMap?
>
>Thanks in advance for help :)
>-Rand
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


-
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: [Q] why can't be used without NAME as ca n?

2003-03-19 Thread James Mitchell
On Wed, 2003-03-19 at 13:58, [EMAIL PROTECTED] wrote:
> Hello,
> 
> from  about Attribute name - If not specified, the bean
> associated with the form tag we are nested within is utilized.
> why  can't does the same? to be consistant.
> or Am I missing anything?

I noticed this to while working on some of the struts cactus tests.  One
thing to note - by using bean:write to display some value from your form
bean, that value will not be persisted back on the bean when the user 
submits the form.  

You can accomplish both of these by using html:hidden and set
write="true".

This will show the value on the page, and also write out a hidden form
element so that it can be passed back the form (for your convenience).

> tnx
> Best Regards.
> Michael.
> 

-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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



RE: [Q] why can't be used without NAME as can?

2003-03-19 Thread Robert Taylor
Use the nested taglib.



robert

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 19, 2003 1:58 PM
> To: [EMAIL PROTECTED]
> Subject: [Q] why  can't be used without NAME as 
> can?
> 
> 
> Hello,
> 
> from  about Attribute name - If not specified, the bean
> associated with the form tag we are nested within is utilized.
> why  can't does the same? to be consistant.
> or Am I missing anything?
> tnx
> Best Regards.
> Michael.
> 
> 
> 
> 
> -
> 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: [Q] why can't be used without NAME as can?

2003-03-19 Thread Sri Sankaran
Probably because unlike ,  doesn't *have* to inside a form and 
so a bean isn't guaranteed?

Sri

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 19, 2003 1:58 PM
To: [EMAIL PROTECTED]
Subject: [Q] why  can't be used without NAME as  can?


Hello,

from  about Attribute name - If not specified, the bean associated with the 
form tag we are nested within is utilized. why  can't does the same? to be 
consistant. or Am I missing anything? tnx Best Regards. Michael.




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



  1   2   3   >