Solved

Setting up Apache, MySQL, PHP to work with NetBeans 6.0 (Apache tomcat) on LEOPARD OS X

Posted on 2007-11-18
4
9,654 Views
Last Modified: 2013-12-14
It looks like this has been asked a few times before, although I'm asking again because I don't think anyone has had quite the same configuration and I can't get it to work.

I have living-e AG with Apache 2.x, PHP5 and MySQL already installed and working.  I am interested in adding Netbeans IDE 6.0 RC1 (already have) to my system and I'd like to get involved writing jsp pages with struts and with access to the MySQL database that I already have, unless you would recommend something else.  Netbeans comes with GlassFish but I've disabled that.  I do have a fair amount of experience writing jsp pages at work and I'd like to be able to play with a similar environment at home.

Given that I have MAMP already up and running and Netbeans already up and running I need some help with the following:

1.  How do I configure NetBeans so that I can use the MySQL server already running.  It looks like I have partial functionality in that I can access the MySQL server from netbeans using the built in services pane and connecting as jdbc:mysql://localhost:3306/dbname, etc.  The driver / connector looks like it is built in to Netbeans:

/Applications/NetBeans/NetBeans 6.0 RC1.app/Contents/Resources/NetBeans/ide8/modules/ext/mysql-connector-java-5.0.7-bin.jar

I need to know how to connect to the server from a jsp page and maybe from a .java file.

I did find this reference, but I'm either missing something or the instructions are not quite complete enough for me.

http://www.roseindia.net/struts/strutsdatasourcemanagerontomcat5.shtml

I will need a little help with struts once I get going, mostly on how to know what libraries I can import and where to get them.

2.  As a separate issue, I need to be educated about how the standard apache web server and a tomcat server can interoperate.  I had read somewhere that you need to install the mod_jk module to your apache server installation and then configure the server so that you could fetch servlets from a tomcat server.  I got the first part with the module ok.  I found a reference here:

http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s72

about configuring a 3.3 server.  There is also current documentation here:

http://tomcat.apache.org/connectors-doc/

but I don't know how to configure this or even if I need to configure it.
0
Comment
Question by:sscotti
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
CSecurity earned 500 total points
ID: 20311006
Put mySQL jdbc into your classpath then connect it with simple Java DB connection example which exists a lot in net
0
 
LVL 5

Author Comment

by:sscotti
ID: 20344839
That isn't very helpful.  I already mentioned above that Netbeans has the driver.


/Applications/NetBeans/NetBeans 6.0 RC1.app/Contents/Resources/NetBeans/ide8/modules/ext/mysql-connector-java-5.0.7-bin.jar
0
 
LVL 5

Author Closing Comment

by:sscotti
ID: 31409811
I figured it out on my own.  The response really wasn't helpful.
0
 
LVL 1

Expert Comment

by:ajibola
ID: 22723937
the long way round would be downloading the netbeans with glassfish or tomcat pre added.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question