facebook

configuring struts datasource jdbc

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #231028 Reply

    mratcliffe
    Member

    Hi

    I would like to configure struts to connect to mysql. I do not know how to set up the data source properly. I can connect to mysql using the database explorer with no problems. I have a web project all setup to use struts but I just can’t make the bridge between the two.

    TIA

    myeclispe 3.8.4
    tomcat 5
    win2k
    jdk 1.4.

    #231047 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev, this is actually a Struts question, not a MyEclipse question.

    mratcliffe, while Struts does support “data sources” you don’t want to use them, they are there for testing purposes. What you want to do is setup the datasource in your application server, it will automatically pool the connections for you and then in your code all you have to do is use a JNDI lookup to get the resource and use it. It’s all very slick, you can read how to do it with Tomcat here:
    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html

    (NOTE: The link above is for Tomcat 5.0, the instructions are different for Tomcat 5.5, you can find those here:
    http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources-howto.html)

    #231064 Reply

    mratcliffe
    Member

    Thank you for the reply and info link.

    I was just trying to see if I could edit the struts data source section from the outline view in myeclipse and maybe a “how to”…but I think i’m going down an obsolete path.

    I wish there was a good struts-hibernate tutorial in the myeclipse documentation. I have seen a few in other forums but it looked like it got very messy.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: configuring struts datasource jdbc

You must be logged in to post in the forum log in