Thanks David for the email.

A context-param is a top-level param (application scope) that allows one to 
define application, not servlet scope params. Anyway, I will look at the 
"commons digester" and see if that is an option.

Currently just FYI, context params are gotten via the 
ServletContext.getParameter which one can get from the GenericServlet or I 
believe Request... I do not have the javadoc open at this time.

Thanks,
Scott





-----Original Message-----
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 02, 2005 8:09 PM
To: Scott Purcell; Struts Users Mailing List
Subject: RE: How to get web.xml to ActionForm via struts?


Scott,

You should be able to open the web.xml with the commons digester.  Do you
have an example of your "context-param" from your web.xml and whatever "xml"
objects you nested it inside?  Is it at top-level (directly under "<webapp
...>" or inside another component?  I've never used a context-param in
web.xml before so I would need an example to help further.

Regards,
David

-----Original Message-----
From: Scott Purcell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 01, 2005 9:13 AM
To: user@struts.apache.org
Subject: How to get web.xml to ActionForm via struts?


Hello,

I have ran into a snag and I hope someone has an answer, or clue on this. I
am using a set of DatabasePooling classes to handle all my database needs. I
store the dbID in the web.xml file as a context-param.  Prior to using
Struts, I would create a bean using <jsp:useBean and since this was a bean,
I would just pass in the dbid at creation time. No big deal.

Now when I am using struts, I do not understand how to get the value into my
classes that extend ActionForm (my new beans).

I know this appears simple, but I am not using DynaAction forms, I am using
ActionForms. I see how the Dyna can take parameters, but I do not see that
for ActionForms. Also I do not want to duplicate the dbid connection string
and put it in the struts-config.xml file. I want to keep it in the web.xml
file.

Thanks,
Scott




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

Reply via email to