How to use JDBC driver (type 4) with struts?????

Hi! have a nice day!!!!!
i want to connect database use struts with JDBC driver type 4. i must add <data-source/> to <data-sources></data-sources> tag but i don't know how to use <data-source/> with it's properties. please tell me! thank very much

thank for reply!!! :D
my project require to use struts 1.2.8 with ODBC (i think so it's type 1) for connect to database (SQL server). i think so it has two step :
1. edit file struts-config.xml with <data-sources> tag.
2. programming in file java (which extends from Action class) connect to database.
but how to programming in file java??? (i think so must use objects DataSource & Connection)

Similar Messages

  • How to use JDBC to connect Tomcat with database server?(Urgent!)

    I try to deploy the tomcat and make it connect with databaser server.
    I am using mysql connector J 3.0. I added the CLASSPATH of mysql-connector-java-3.0.7-stable-bin.jar in the tomcat.sh .
    I also add the web application in server.xml.
    When I start tomcat, I can see using Classpath including mysql-connector-java-3.0.7-stable-bin.jar .
    But when i browse my jsp including the jdbc, wait for a while, I get a message as following: Timeout on server localhost. My web server and database server is same computer.
    Could you tell me what's wrong?

    Did you check to see that the MySQL database was indeed up and running, and accepting connections when you started Tomcat? Did you make sure that your firewall permits connections to the database?
    Timeout errors generally occur when you send a request to a server and the server does nothing with it - i.e., it doesn't respond to it in any way. Most firewalls are configured this way. If I telnet to your machine and I get "connection refused", I know your machine exists and I can try hacking into it. If I telnet and get nothing at all, then I will either assume either there's no actual machine at that address or it's unresponsive.

  • How do I known Which JDBC Driver Type in ConnectionPool?

    Usually, we have to specify the JDBC driver type 1, 2, 3, 4 in our programs as
    "COM.ibm.db2.jdbc.app.DB2Driver" or "COM.ibm.db2.jdbc.net.DB2Driver"
    However, when we use connection pool, we just use the Data Source class file instead e.g. "COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource" or "COM.ibm.db2.jdbc.DB2XADataSource". No program need to specify the driver.
    Why is it like that? How do I know which driver type is using in the connection pool?

    Yes, I have the same problem in a BEA environment. Which is the driver for two phase commit?
    XADatasource or ConnectionPoolDataSource?
    Do I have to provide the implementation for the ConnectionPoolDataSource?

  • Is there any documentation on how to use JDBC in ALBPM?

    I'm trying to connect to a DB using DriverManager class.
    1) I've defined an externalResource of type SQL Database.
    2) When I execute the following code:
    //externalResourceURL is the URL of the SQL Database external resource created in 1), same for user and password
    con as java.sql.Connection = DriverManager.getConnection(arg1=externalResourceURL, arg2=user, arg3=password)
    3) I get the following error: This driver is locked for use with embedded applications.
    Is there any tutorial or documentation on how to use JDBC in ALBPM?
    Thanks in advance

    I don't know of any documentation off hand... but what are you trying to do? I haven't needed to to make a connection using the DriverClass....
    If you aren't using dynamicSQL... you can just catalog the database, and make direct sql calls (not recommended)... but if you catalog it, then just an INSERT command works... or UPDATE... etc
    logMessage "Starting insert."
    INSERT INTO MYTABLE(id, name) VALUES ("2", "kevin");
    logMessage "Finished insert."Check out the studio help under SQL Keywords for more info on that...
    HTH
    -Kevin

  • How to use JDBC Lookup in PI 7.1 ?

    Hi,
    Please advise how to use JDBC lookup in message mapping PI 7.1 ? any reference link / document  ?
    I have followed this step below :
    1. Create the external definition for the database table.
    2. Use the external definition (table) in message mapping JDBC Lookup.
    But the target still "Yellow colour" meanint the mapping hasnot completed yet ? why ? and when i double click the JDBC lookup
    there some error message
    "No suitable parameter found; define new parameter of type 'Channel' first"
    Please advise.
    Thank You and Best Regards
    Fernand

    Hi Fernand,
    JDBC Lookup can be done in PI 7.1 using below mentioned steps :
    1) Create a communication channel between PI and the database to connect to database.
    2) Import the table data as External Definition.
    3) In message mapping where this lookup is to be used select JDBC Lookup under Conversions and map
    4) Double Click on JDBC Lookup
    5) Select parameter and a database table (imported as the external definition). All the elements of the table will appear in the middle column. Select and move the input parameters to the left side column and the output parameters to the right side column. Click OK. 
    6) Under message mapping go to signature tab and define the parameter as channel and category as JDBC Adapter Type. 
    7) Under Operation mapping define the parameter & associate it with parameter defined in Message Mapping.
    Thanks
    Amit

  • How to use JDBC Connection Pools in a standalone application?

    Hi, there,
    I have a question about how to use JDBC Connection Pools in an application. I know well about connection pool itself, but I am not quite sure how to keep the pool management object alive all the time to avoid being destroyed by garbage collection.
    for example, at the website: http://www.developer.com/java/other/article.php/626291, there is a simple connection pool implementation. there are three classes:JDBCConnection, the application's gateway to the database; JDBCConnectionImpl, the real class/object to provide connection; and JDBCPool, the management class to manage connection pool composed by JDBCConnectionImpl. JDBCPool is designed by Singleton pattern to make sure only one instance. supposing there is only one client to use connection for many times, I guess it's ok because this client first needs instantiate JDBCPool and JDBCConnectionImpl and then will hold the reference to JDBCPool all the time. but how about many clients want to use this JDBCPool? supposing client1 finishes using JDBCPool and quits, then JDBCPool will be destroyed by garbage collection since there is no reference to it, also all the connections of JDBCConnectionImpl in this pool will be destroyed too. that means the next client needs recreate pool and connections! so my question is that if there is a way to keep pool management instance alive all the time to provide connection to any client at any time. I guess maybe I can set the pool management class as daemon thread to solve this problem, but I am not quite sure. besides, there is some other problems about daemon thread, for example, how to make sure there is only one daemon instance? how to quit it gracefully? because once the whole application quits, the daemon thread also quits by force. in that case, all the connections in the pool won't get chance to close.
    I know there is another solution by JNDI if we develop servlet application. Tomcat provides an easy way to setup JNDI database pooling source that is available to JSP and Servlet. but how about a standalone application? I mean there is no JNDI service provider. it seems a good solution to combine Commons DBCP with JNID or Apache's Naming (http://jakarta.apache.org/commons/dbcp/index.html). but still, I don't know how to keep pool management instance alive all the time. once we create a JNDI enviroment or naming, if it will save in the memory automatically all the time? or we must implement it as a daemon thread?
    any hint will be great apprieciated!
    Sam

    To my knoledge the pool management instance stays alive as long as the pool is alive. What you have to figure out is how to keep a reference to it if you need to later access it.

  • How to use the same OC4j server with different port number

    How to use the same OC4j server with different port numbers..?
    I have to OC4J installed on my machine on different hard disk drives....
    I want to be able to run both the server simultaneously..?
    is it possible ..it yes then how..?
    for that i have changed the port number of one server...
    but when i am trying to start the other server with different port number..it says that JVM -Bind already...
    Is there any clues...?
    Nilesh G

    In the config directory:
    default-web-site.xml: Change the port the HTTP listener listens on
    jms.xml: Change the port the JMS service listens on
    rmi.xml: Change the port the ORMI listener listens on.
    Or, you can add another web-site.xml file, and deploy your applications to 1 server, and bind the web applications to the different web sites. This way you only have to deploy your applications to 1 place.
    Rob
    Oracle

  • How to use FM SO_DOCUMENT_REPOSITORY_MANAGER send mail with CC.

    Dear Experts:
    Please help me. How to use FM SO_DOCUMENT_REPOSITORY_MANAGER send mail with CC.
    My Program code is as follow:
    *Send the mail.
    tb_receipients-recnam = 'BAITZ'.
    tb_receipients-recesc = 'B'.
    tb_receipients-sndex = 'X'.
    tb_receipients-att_fix ='X' .
    APPEND  tb_receipients.
    CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
      EXPORTING
        method       = wa_method1
        office_user  = wa_owner
        ref_document = wa_ref_document
        new_parent   = wa_new_parent
      IMPORTING
        authority    = wa_authority
      TABLES
        objcont      = tb_objcnt
        objhead      = tb_objhead
        objpara      = tb_objpara
        objparb      = tb_objparb
        recipients   = tb_receipients
        attachments  = tb_attachments
        references   = tb_references
        files        = tb_files
      CHANGING
        document     = wa_document
        header_data  = wa_header.
    endform.                    " send_mail
    By the why, tb_receipients-recnam = 'BAITZ'. What's the meaning of 'BAITZ'? Thanks!

    you can use FM SO_NEW_DOCUMENT_SEND_API1
    WA_RECV TYPE SOMLRECI1,
    IT_RECV TYPE STANDARD TABLE OF SOMLRECI1.
    wa_recv-receiver = 'TO email address'.
    wa_recv-rec_type = 'U'.
    wa_recv-com_type = 'INT'.
    APPEND wa_recv TO it_recv.
    CLEAR wa_recv."To Recipient
    wa_recv-receiver = 'CC email address'.
    wa_recv-rec_type = 'U'.
    wa_recv-com_type = 'INT'.
    wa_recv-copy = 'X'.
    APPEND wa_recv TO it_recv.
    CLEAR wa_recv. "CC Recipient
    wa_recv-receiver = 'BCC email address'.
    wa_recv-rec_type = 'U'.
    wa_recv-com_type = 'INT'.
    wa_recv-blind_copy = 'X'.
    APPEND wa_recv TO it_recv.
    CLEAR wa_recv. "BCC Recipient

  • Urg:Executing SQL From Java App using Jdbc Driver

    Hi
    I am using JDBC Driver version 9.0.1.1.0.
    I am running this in Thin Client Mode
    My Code Snippet Looks Like This:=
    ==========================================================
    String url = "jdbc:oracle:thin:@localhost:1521:VpDb";
    String userName = "scott";
    String password = "tiger";
    Connection conn = null ;
    Statement st = null ;
    ResultSet rs = null ;
    String categoryCode="ABC";
    try
    conn = DriverManager.getConnection (url, userName, password);
    st = conn.createStatement ();
    String sqlStatement = "Select Count(*) From News Where CategoryCode=" +"\'" + categoryCode + "\'" + ";";
    System.out.println(sqlStatement);
    rs = st.executeQuery ( sqlStatement );
    if( rs.next() )
    System.out.println("Headline Exists");
    else
    System.out.println("No Headline Exists");
    catch (SQLException e )
    System.out.println();
    System.out.println (" SQL ERROR IN IS_NEWS_EMPTY: " + e) ;
    =========================================================
    I have added the classes12.zip and nls_charset12.zip in the classpath.
    Now when i run this it gives me an error saying the following error message:-
    SQL ERROR IN IS_NEWS_EMPTY: java.sql.SQLException: ORA-00911: invalid character
    Can anyone help me with this as to whats going wrong because the exact equivalent of my sqlStamenet runs on SQL command line but not from java code.Why??
    Any Help appreciated
    Thanks
    Mum

    I think it is complaining about the ";" that you add at the end of your string. You don't need to add that to the query.

  • [svn:osmf:] 13113: Changing to not use an embedded font by default, and adding instructions on how to use the free 'type writer' bitmap font.

    Revision: 13113
    Revision: 13113
    Author:   [email protected]
    Date:     2009-12-21 01:08:10 -0800 (Mon, 21 Dec 2009)
    Log Message:
    Changing to not use an embedded font by default, and adding instructions on how to use the free 'type writer' bitmap font.
    Modified Paths:
        osmf/trunk/libs/ChromeLibrary/.flexLibProperties
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/controlbar/widgets/ScrubBar.as
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/controlbar/widgets/URLInput.as
    Added Paths:
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/fonts/
        osmf/trunk/libs/ChromeLibrary/src/org/osmf/chrome/fonts/Fonts.as
    Removed Paths:
        osmf/trunk/libs/ChromeLibrary/assets/images/stop_up.png_1

    Your site was built using tables, whose sizes are defined in your site.
    If we look at your first table definition, we can see:
    <table width="861" height="1449" border="3" cellpadding="0" cellspacing="0" bordercolor="#868787">
    Your table has a width of 861 pixels and an overall height of 1449 pixels. Anything you put into that overall box must fit those dimensions, else
    it won't be visible. Anything you add above it will push everything down. You can redefine your sizing to let you edit more inside of the table elements.
    This is why, when you type in more text, things act weird. If you are in Dreamweaver, you must find the right cell to put your text into and then enter
    text there. Unfortunately, this is going to push things around, which were all lined up using tables. And this gets everything offset with respect to
    everything else in your website.
    And that is why everyone is saying, "Start Over!"
    I just inherited a website that has been put together using tables. I'm going to have to expend considerable effort in rewriting the entire design of the
    website because of that. because everything I intend to add to the pages on the site is going to need to be deconstructed in order to get it to work
    properly if I'm adding text and pictures that need to line up with each other.
    You need something done quick and dirty and the only way I can recommend you do that is to use Dreamweaver to show you the tables you have
    and put what you need in a new table that is defined above or below the tables you all ready have defined. Do that and then get back to someone here
    who knows how to make a website correctly to clean up your entire website and make it editable -- which will cost you some money, but it will be
    money well-spent.
    I like to quote this maxim: Good, Fast, Cheap. Pick any two. This works for website design. You can get it fast and cheap, but it won't be good. I
    think you may have chosen that route.

  • Help me! can not using JDBC driver for MS SQL server

    I can test sucess in connection, but create EJB when have follow error.
    04/05/19 12:23:04 SQL error: No suitable driver
    04/05/19 12:23:10 Error creating table: No suitable driver
    500 Internal Server Error
    java.lang.NoClassDefFoundError: oracle/jbo/html/HtmlServices
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:182)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)

    HI All,
    I am using JDBC driver to pull data from MS SQL Server
    2000 for my application Liaison Content Exchange, and
    which only accepts JDBC drivers to talk to databases.
    I dowloaded the driver from Microsoft website, and had
    a successful installation.What do you call "a successful installation"? Where was the JAR file places?
    But the application ask me for Driver Name, Class, URL, Time out and Data Source.What application do you mean? Liaison Content Exchange? I'm not familiar with that product.
    By default no driver is available in the drop down combo box. After using
    "com.microsoft.jdbcx.sqlserver.SQLServerDataSource" as
    class and
    jdbc:microsoft:sqlserver://192.168.17.2:1433; as url,
    the application throw me a error which states "Unable
    to instantiate an instance of the application driver"Sounds like it could be one of several things:
    (1) The JDBC JAR is not in the CLASSPATH where Liaison Content Exchange expects to find it.
    (2) You need to do something else to tell Liaison Content Exchange more information to define the data source.
    (3) The URL might be incorrect. Only you can know if the IP address of the host is correct. You don't supply a database name - perhaps you should. Are you sure that 1433 is the correct port number? I know that's true for SQL Server 7.0, but I remember that the default was changed to something else for SQL Server 2000. Ask your database admin what port this listener is assigned to for SQL Server 2000.
    (4) You might want to append ";selectmethod=cursor" to the end of your URL. (See the docs for this.)
    (5) Make sure you can connect to the database with something other than Java (e.g., the M$ SQL Server client).
    . I am not able to trouble shoot this problem, any one
    pls help me ASAP at [email protected]
    Thx.Bad idea to post an e-mail address. You're not supposed to communicate outside the forum. it's against the guidelines for using the forum.

  • How to use the customer types in customer master data

    how to use the customer types in customer master data?
    menu path is Extras -> account group info -> customer types

    hi,
    This is an option given to you to choose (if you need to) the way you perceive this customer.Here you get options including ompetitors,Salespartner, prospect,
    default sp ,consumer.
    See it helps you to differentiate between prospect(which you may use for quotation or inquiry purpose)Sales partner and the competetor.
    I hope this clarifies your quiery.Reward points if so.
    Thanking you,
    Best regards,
    R.Srinivasan

  • How to use "Notes" on my iPad with my existing iCloud address?

    How to use "Notes" on my iPad with my existing iCloud address? It asks me to create a new one...

    Did I overlook some critical info here? I'm having the same problem described by Henry5, but I'm signed in to iCloud with my AppleID which is not the same as my Mobile Me/iCloud email. I keep being asked to create an account (which it won't allow me to do since the account already exists) but no where do I see an option to use the existing account. I also tried logging out with my AppleID account, and using the iCloud email, but that doesn't work.
    I just want to sync my notes and mail... this is really irritating!

  • How to use PO message type to output 'Form' as PDF file

    Dear experts,
      I am working for a topic of how to use PO message type to output 'Form' as 'PDF file', and save to external file system automatically.
      Any one familiar to this topic, please kindly give me some guide, thank you!
    Regards,
    Joyce

    Hi,
       Go through the program RSTXPDFT4 (Converting SAPscript (OTF) or ABAP List Spool Job to PDF), you will get some idea.  Using this program you can convert spool into PDF file.
    -Alpesh

  • How to use the eventing and databag with a WAS 6.20 ?

    How to use the eventing and databag with a WAS 6.20 ?
    Is what there is a good guide for these services?
    Thank's

    In the raise event you can pass the value
    like below.
    <SCRIPT>
    function raiseEvt(value1){
    if(window.document.domain == window.location.hostname){
    if ( document.domain.indexOf(".") > 0 ) document.domain = document.domain.substr(document.domain.indexOf(".")+1);
       EPCMPROXY.raiseEvent( "urn:com.sap:BWEvents","BWiViewevent", value1, null );
      // alert('tree domain'+document.domain);
    </SCRIPT>
    and in the
    subscribe event you can get the values like below.
    <script language="javascript">
    if(window.document.domain == window.location.hostname){
    document.domain = document.domain.substring(document.domain.indexOf('.')+1);
        EPCMPROXY.subscribeEvent("urn:com.sap:BWEvents","BWiViewevent", window, "myreceiveEvent");
    function myreceiveEvent( eventObj ) {
          document.forms[0].gp_hidden.value = eventObj.dataObject;
    </script>
    Also look at the following link for a complete documentation.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/Enterprise%20Portal%20Client.pdf
    Regards
    Raja

Maybe you are looking for

  • How to recover deleted files on a Network Drive

    I am running the latest OS environment, and I purchased a LaCie Network drive that is attached to my airport. Two nights ago, my house took a power hit/outage. I did not suffer any hardware damage, however, I lost significant data on my network drive

  • Deleted emails are duplicating in trash

    deleted emails are duplicating in trash

  • Binding Structure/Internal Table to Workflow from Webdynpro

    Hi Gurus, I have to trigger workflow from WEBDYNPRO application. For now I have two ways they are: 1. Triggering WFLow using SAP_WAPI_START_WORKFLOW (Successfull): How could I bind Structure/Internal Table (DDIC referred structure) to workflow direct

  • IE problem

    On my web site there are a couple of pages that do not diplay properly in IE although they look OK in FIrefox, Opera, Chrome etc. There is a large blank space after the header. One of the pages is http://www.canadianrallyo.ca/events_trials_listing.sh

  • What are infotypes ?

    Hi all, What are infotypes ? I am new to Infotypes . Please Explain in detail. Thanks in advance. Regards. Raj