The exception is happening in the <html:form> tag. I would guess that you
have a malformed struts-config.xml file. Do you have any error messages in
your console or servlet log file?

You can look up data-source elements that you defined in struts-config.xml
in your Action or ActionForm by using servlet.findDataSource(null) to
retrieve the default DataSource, or servlet.findDataSource(key) to retrieve
the DataSource identified by the key attribute.
--
Dan Miser
http://www.distribucon.com

----- Original Message -----
From: Scott Fitzgerald
To: Struts-User
Sent: Tuesday, April 17, 2001 1:00 PM
Subject: Confusing error and other questions

I am working on an application that interacts with a database. When I try to
run the app, I get an error (500) that tells me:
javax.servlet.ServletException: Cannot find ActionMappings or
ActionFormBeans collection.
Can someone offer some insight? Also, I have added a datasource mapping in
my struts-config.xml file for my database access. When I reference this in
my bean, do I have to reference one of the attributes of the datasource
tag(ex:driverclass), or do I simply do a call to
javax.sql.DataSource dataSource = (javax.sql.DataSource)
getServletContext().getAttribute(Action.DATA_SOURCE_KEY);


Reply via email to