I am new to struts, but I have RTFM and STFW in search of a solution. So now I reach
out to the gurus among you. I need to reach my database.
When I include a data source definition in my struts-config.xml file as follows
(slightly changed to protect the innocent):
<data-sources>
<data-source>
<set-property property="key" value="my_db"/>
<set-property property="type"
value="org.apache.struts.util.GenericDataSource"/>
<set-property property="autoCommit" value="true"/>
<set-property property="description" value="My db description"/>
<set-property property="driverClass" value="oracle.jdbc.driver.OracleDriver"/>
<set-property property="loginTimeout" value="10"/>
<set-property property="maxCount" value="4"/>
<set-property property="minCount" value="2"/>
<set-property property="password" value="xxxxxx"/>
<set-property property="readOnly" value="false"/>
<set-property property="url"
value="jdbc:oracle:thin:@my_ip_address:1521:ind2"/>
<set-property property="user" value="my_db"/>
</data-source>
</data-sources>
My pages don't work with this included. If I comment out the <data-source> my pages
work. This is the error in my Tomcat (3.2.1) output:
...
...
Pop org.apache.struts.util.GenericDataSource
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[brickForm
])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/brick
Form, type=com.budget.controller.BrickFormAction])
Pop org.apache.struts.action.ActionMapping
cannot load servlet name: action <---- the problem
Add ValidatorAction: required,com.wintecinc.struts.validation.StrutsValidator
Add ValidatorAction: integer,com.wintecinc.struts.validation.StrutsValidator
Add ValidatorAction: range,com.wintecinc.struts.validation.StrutsValidator
...
...
My data source initializes correctly, but then comes the error "cannot load servlet
name: action". Without the data source this error does not appear.
I have seen many people having the same trouble, but no answers. Somebody please be my
hero.
Using:
Java 1.3.1
Tomcat 3.2.1
Struts 1.0.2
Thanks!
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>