Managing Datasource in struts Application

Managing Datasource in struts Application

Hi i need to know how to do set up of Oracle data base with struts using Data source.I have defined datasource in struts-config.xml as

data-sources>
        <data-source type="oracle.jdbc.pool.OracleConnectionPoolDataSource">
            <set-property property="URL" 
   value="jdbc:oracle:thin:@192.168.11.106:1521:server"/>
            <set-property property="user" value="SCOTT"/>
            <set-property  property="password" value="TIGER"/>
        </data-source>
    </data-sources>

Then in my action class i am retrieving as

public ActionForward execute(
            ActionMapping mapping,
            ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        System.out.println("In Action of accept");
        String agregno = request.getParameter("agregno");
        System.out.println(agregno);
        boolean valid = Validation.acceptAgent(agregno, getDataSource(request));
        System.out.println("After val");
        System.out.println(valid);
        if (valid) {
            return mapping.findForward("success");
        }
        return mapping.findForward("fail");

    }

I am getting error like getDatasource method does not exist.

View Answers

Ads









Related Tutorials/Questions & Answers:
Managing Datasource in struts Application
Managing Datasource in struts Application  Hi i need to know how to do set up of Oracle data base with struts using Data source.I have defined datasource in struts-config.xml as data-sources> <data-source type
struts application
struts application  hi, how to retrive data from databse in struts application aand send the retrived data to corresponding form
Advertisements
struts application
struts application  hi, i can write a struts application in this first i can write enter data through form sidthen it will successfully saved into data base **but now i can apply to some validation to that form fileds
struts application
struts application  i want to display name on the browser throgh struts1.2 in java please give me snippet
Struts application by using eclipse
Struts application by using eclipse  Can we develop struts application by using eclipse ? If no then please provide other development tools, if yes can you mail me the tutorial or provide the same in roseindia
Struts 2 Application
Struts 2 Application Developing user registration application based on Struts 2 Framework This Struts 2 Application is a simple user registration application.... Let's start developing user registration application on Struts 2 framework
struts - application missing something?
struts - application missing something?   Hello I added a parameter... in the struts working and all is great till I close JBoss or the server gets shut down..., struts-config.xml are all updated. I didn't use anything new that hasn't already
SwitchAction Application in struts 1.3.10
SwitchAction Application in struts 1.3.10  Hi,I am working on struts 1.3.10 and I have developed my module using switchaction application...' module. and 'action=/switchpath' is the action path to link struts-config.xml name
struts hibernate integration application
Struts2 hibernate integration application. In this tutorial we are going to show how to Integrate Struts Hibernate and create an application. This struts... of the struts hibernate integration application example. Description
Changing from Struts 1.2 to Struts 2.0 in Application
Changing from Struts 1.2 to Struts 2.0 in Application  Hi All, We have a financial application which is running successfully on struts 1.2 and java... latest version of struts 2.0. I want to know following things 1.what
jsperexception in struts application
jsperexception in struts application  Iam getting the following error repeatedly can u explain the solution for this? HTTP Status 500 - type Exception report message description The server encountered an internal error
How to integrate Struts and Hibernate in an application?
How to integrate Struts and Hibernate in an application?  Hi, I am aware of both Struts and Hibernate framework. So, let's know how to integrate...;This project is about integrating the hibernate and struts frameworks. Check
Struts application two submit button
Struts application two submit button  Hai, i'm new in struts application development , My code is <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> <%@ taglib uri="http://struts.apache.org/tags
how to develope a struts application using hibernate?
how to develope a struts application using hibernate?  Hi Folks, I am very new to hibernate.I want to develope a login page in struts their username...://www.roseindia.net/struts/struts-hibernate/ http://www.roseindia.net/struts
Struts 2.1.8 Showcase application
Struts 2.1.8 Showcase application       In this section we will explore Struts 2.1.8 show case application. We will use Tomcat to install and test the application. I am assuming
Configuring Actions in Struts application
Configuring Actions in Struts Application To Configure an action in struts application, at first write a simple Action class such as SimpleAction.java... to map the above files into an application. Here SimpleAction.java is your
How to make a chat application using Struts 2 ?
How to make a chat application using Struts 2 ?  Hello, I'm working on my final year project. i've to add chat application in that. how it can be done? 'm using eclipse for that.... plzzz reply
About Struts 2.2.1 Login application
.style1 { margin-left: 80px; } About Struts2.2.1 login application In the most common login application there is  login form which is takes... message to the returns ERROR. All the Actions used in application must
DataSource in hibernate.
DataSource in hibernate.  What is DataSource in hibernate?   Generally, in spring hibernate integration or struts hibernate integration we... --> <bean id="dataSource" class
managing the transactions
managing the transactions  HI i am using JSF and SEAM and Hibernate when i search the record in JSF page , it dispalys all the records regarding search filter its fine my question is i want to merge the selected record profile
How to make Struts Hibernate and Spring Based Login/Registration Application?
How to make Struts Hibernate and Spring Based Login/Registration Application.../Registration Application. Thanks   Hibernate struts is perfect choice to make application. Check the tutorial Developing Struts Hibernate and Spring Based
Version of excalibur-datasource>excalibur-datasource dependency
List of Version of excalibur-datasource>excalibur-datasource dependency
Need help to create Struts 2 MySQL based HRMS application.
Need help to create Struts 2 MySQL based HRMS application.   Hi Sir, I am doing my project based on Human Resource Management system using struts 2 framework. I am beginner for struts framework. I tried to follow many example
Java Captcha in Struts 2 Application
Java Captcha in Struts 2 Application     ... a captcha Servlet and use in your Struts 2 application. Developing Struts 2 Captcha Application In this section we are going to develop Captcha Servlet
struts
struts  Hi what is struts flow of 1.2 version struts? i have struts applicatin then from jsp page how struts application flows Thanks Kalins Naik   Please visit the following link: Struts Tutorial
Version of excalibur-datasource>excalibur-datasource-cluster dependency
List of Version of excalibur-datasource>excalibur-datasource-cluster dependency
Version of excalibur-datasource>excalibur-datasource-ids dependency
List of Version of excalibur-datasource>excalibur-datasource-ids dependency
Struts
Struts  How Struts is useful in application development? Where to learn Struts? Thanks   Hi, Struts is very useful in writing web... performance Java web applications that runs on Java enabled application servers. Struts
Struts 2 Hello World Application using Eclipse
Creating Hello World application in Struts 2 version 2.3.15.1 using Eclipse... the dynamic web application and added the Struts 2 libraries and code... World application Step 1: Download the Struts 2.3.15.1 and extract the zip
Struts
Struts  Am newly developed struts applipcation,I want to know how to logout the page using the strus   Please visit the following link: Struts Login Logout Application
making a web application using Web-Logic Server - Struts
making a web application using Web-Logic Server  Hello , I am... using a struts framework.Hence i referred the docs given in the link http... could'nt get an idea how to make the web application using WEBLOGIC.So, can anyone

Ads