struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David G. Friedman" <>
Subject RE: How to get web.xml to ActionForm via struts?
Date Thu, 03 Mar 2005 02:09:27 GMT

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.


-----Original Message-----
From: Scott Purcell []
Sent: Tuesday, March 01, 2005 9:13 AM
Subject: How to get web.xml to ActionForm via struts?


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


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

View raw message