You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Silva, Alejandro" <Al...@Honeywell.com> on 2002/09/18 01:50:13 UTC
DataSource
Hi!
Introduction
-----------------
I'm trying to use the DataSource implementation in Struts so that I can have database Connection pooling. However, every
time I try and load the logon.jsp page I get an error :(
Any thoughts?
Details
-----------------
Here's my struts-config.xml so far:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
<!-- ========== Data Source Configuration =============================== -->
<data-sources>
<data-source>
<set-property property="autoCommit"
value="false"/>
<set-property property="description"
value="Fixed Assets Development Database"/>
<set-property property="driverClass"
value="sun.jdbc.odbc.JdbcOdbcDriver"/>
<set-property property="maxCount"
value="4"/>
<set-property property="minCount"
value="2"/>
<set-property property="password"
value="webuser"/>
<set-property property="url"
value="jdbc:odbc:FADDDataSource"/>
<set-property property="user"
value="webuser"/>
</data-source>
</data-sources>
<!-- ========== Form Bean Definitions =================================== -->
<form-beans>
<!-- Logon form bean -->
<form-bean name="logonForm" type="com.honeywell.fixedasset.LogonForm"/>
<!-- SBU List form bean -->
<form-bean name="getSBUListForm" type="com.honeywell.fixedasset.util.GetSBUListForm"/>
<!-- New Asset form bean -->
<form-bean name="addAssetForm" type="com.honeywell.fixedasset.add.AddAssetForm"/>
</form-beans>
<!-- ========== Global Forward Definitions ============================== -->
<global-forwards>
<forward name="logoff" path="/logoff.do"/>
<forward name="logon" path="/logon.jsp"/>
<forward name="success" path="/main_page.jsp"/>
</global-forwards>
<!-- ========== Action Mapping Definitions ============================== -->
<action-mappings>
<!-- Process a user logoff -->
<action path="/logoff" type="com.honeywell.LogoffAction">
<forward name="success" path="/index.jsp"/>
</action>
<!-- Process a user logon -->
<action path="/logon" type="com.honeywell.fixedasset.LogonAction" name="logonForm" scope="request"
input="/logon.jsp">
</action>
<!-- Get an SBU list -->
<action path="/getSBUList" type="com.honeywell.fixedasset.util.GetSBUListAction" name="getSBUListForm"
scope="request" validate="false">
<forward name="newAsset" path="/add_asset_sbu.jsp"/>
<forward name="reviewAssets" path="review_assets.jsp"/>
<forward name="changeSBU" path="change_sbu.jsp"/>
<forward name="addLocationSBU" path="add_location_sbu.jsp"/>
<forward name="changeLocationSBU" path="change_location_sbu.jsp"/>
<forward name="addLocation" path="add_location.jsp"/>
<forward name="changeLocation" path="change_location.jsp"/>
</action>
<!-- Add an Asset to the system -->
<action path="/addAsset" type="com.honeywell.fixedasset.add.AddAssetAction" name="addAssetForm" scope="request"
input="/add_asset_sbu.jsp">
<forward name="success" path="/index.jsp"/>
</action>
</action-mappings>
</struts-config>
The error message I get is:
Error: 500
Location: /fadd/logon.jsp
Internal Servlet Error:
javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:461)
at _0002flogon_0002ejsplogon_jsp_0._jspService(_0002flogon_0002ejsplogon_jsp_0.java:503)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
(and more)
Alejandro Silva
Honeywell - GBS Mexico
alejandro.silva@honeywell.com
+52 (444) 826-2577
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DataSource
Posted by Balaji Thirugnanam <Ba...@netscape.net>.
Possible knock out's would be the classloaders. Which AppServer are you
running on ?
-B
Silva, Alejandro wrote:
>Hi!
>
>Introduction
>-----------------
>I'm trying to use the DataSource implementation in Struts so that I can have database Connection pooling. However, every
>time I try and load the logon.jsp page I get an error :(
>
>Any thoughts?
>
>Details
>-----------------
>Here's my struts-config.xml so far:
>
><?xml version="1.0" encoding="ISO-8859-1"?>
>
><!DOCTYPE struts-config PUBLIC
> "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
> "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
>
><struts-config>
>
><!-- ========== Data Source Configuration =============================== -->
><data-sources>
> <data-source>
> <set-property property="autoCommit"
> value="false"/>
> <set-property property="description"
> value="Fixed Assets Development Database"/>
> <set-property property="driverClass"
> value="sun.jdbc.odbc.JdbcOdbcDriver"/>
> <set-property property="maxCount"
> value="4"/>
> <set-property property="minCount"
> value="2"/>
> <set-property property="password"
> value="webuser"/>
> <set-property property="url"
> value="jdbc:odbc:FADDDataSource"/>
> <set-property property="user"
> value="webuser"/>
> </data-source>
></data-sources>
>
>
><!-- ========== Form Bean Definitions =================================== -->
><form-beans>
> <!-- Logon form bean -->
> <form-bean name="logonForm" type="com.honeywell.fixedasset.LogonForm"/>
>
> <!-- SBU List form bean -->
> <form-bean name="getSBUListForm" type="com.honeywell.fixedasset.util.GetSBUListForm"/>
>
> <!-- New Asset form bean -->
> <form-bean name="addAssetForm" type="com.honeywell.fixedasset.add.AddAssetForm"/>
></form-beans>
>
>
><!-- ========== Global Forward Definitions ============================== -->
><global-forwards>
> <forward name="logoff" path="/logoff.do"/>
> <forward name="logon" path="/logon.jsp"/>
> <forward name="success" path="/main_page.jsp"/>
></global-forwards>
>
>
><!-- ========== Action Mapping Definitions ============================== -->
><action-mappings>
> <!-- Process a user logoff -->
> <action path="/logoff" type="com.honeywell.LogoffAction">
> <forward name="success" path="/index.jsp"/>
> </action>
>
> <!-- Process a user logon -->
> <action path="/logon" type="com.honeywell.fixedasset.LogonAction" name="logonForm" scope="request"
>input="/logon.jsp">
> </action>
>
> <!-- Get an SBU list -->
> <action path="/getSBUList" type="com.honeywell.fixedasset.util.GetSBUListAction" name="getSBUListForm"
>scope="request" validate="false">
> <forward name="newAsset" path="/add_asset_sbu.jsp"/>
> <forward name="reviewAssets" path="review_assets.jsp"/>
> <forward name="changeSBU" path="change_sbu.jsp"/>
> <forward name="addLocationSBU" path="add_location_sbu.jsp"/>
> <forward name="changeLocationSBU" path="change_location_sbu.jsp"/>
> <forward name="addLocation" path="add_location.jsp"/>
> <forward name="changeLocation" path="change_location.jsp"/>
> </action>
>
> <!-- Add an Asset to the system -->
> <action path="/addAsset" type="com.honeywell.fixedasset.add.AddAssetAction" name="addAssetForm" scope="request"
>input="/add_asset_sbu.jsp">
> <forward name="success" path="/index.jsp"/>
> </action>
></action-mappings>
>
></struts-config>
>
>The error message I get is:
>
>Error: 500
>Location: /fadd/logon.jsp
>Internal Servlet Error:
>javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
> at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:461)
> at _0002flogon_0002ejsplogon_jsp_0._jspService(_0002flogon_0002ejsplogon_jsp_0.java:503)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>(and more)
>
>
>Alejandro Silva
>Honeywell - GBS Mexico
>alejandro.silva@honeywell.com
>+52 (444) 826-2577
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
--
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>