This week's giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of liveProject: Build an ML Recommender System and have Kim Falk on-line!
See this thread for details.
Win a copy of liveProject: Build an ML Recommender System this week in the Artificial Intelligence and Machine Learning forum!

Rahul Singh Khokhar

Ranch Hand
+ Follow
since Feb 23, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rahul Singh Khokhar

Hi Yash,
I believe the easiest way to get your class4 drivers working is to simply place the jdbc driver (.jar file) into your /java/jre/lib/ext folder.
Tomcat will happily work with this arrangement if you have set up the JVM correctly in your Tomcat.

regards,
Rahul
15 years ago
Hi Nidhi,
The answer to your question is comprehensive. I suggest, browse through the manuals of Java Web Server to figure out the difference as you are familiar with Tomcat.

Rahul..
16 years ago
Sorry, I missed on reading your connector in your first comments.
Since you are using mod_jk, try the above by looking into workers.properties.
16 years ago
Hi Joe,
What connector are you using between Tomcat and Apache?
If its mod_jk or mod_jk2, then do the following:

check the workers2.properties in your Apache/conf folder.
This files tells the Apache (using the connector) to forward the request to Tomcat

regards,
Rahul..
16 years ago
Hi Reuben,
I'll simplify the setup of Tomcat + Mysql for you.

1. Things you need:
a) Tomcat
b) MySQL Server & Client install
c) JVM (JDK and not JRE)
d) MySQL JConnector for JDBC connectivity

2. Things you need to know:
a) Tomcat by default uses port 8080
b) MySQL by default uses posrt 3306
c) Stick to the default settings unless there is a specific need

3. Install JDK first followed by Tomcat

4. Test your Tomcat install by pointing the browser to
http://localhost:8080

5. Install MySQL and test it as follows
<cmd>
c:\> mysql

6. Unzip the MySQLJConnector and put the .jar file into
<Your JAVA>/jre/lib/ext

Thats all you need to set up JSP using MyQSL

Hope this info helps.
Rahul..
16 years ago
Also to add further, the workers2.properties will go into your <apache>/conf/ folder.
16 years ago
Ravi,
I'll take you thru the steps 5,6 & 7.

5. What I mean by URI is, the tomcat context you have defined for your java web application. In your case you just want to test only the [TOMCAT_HOME]/webapps/jsp-examples.

Log onto your Apache admin or manager page and find out the context for the examples folder. for e.g. if the context is called /jsp-examples
then add the follwing line in the workers2.properties
[uri:/jsp-examples/*.jsp]
info=Mapping JSP
group=lb

[uri:/jsp-examples/servlet/*]
info=Mapping servlets
group=lb

This lines tells the Apache thru the connector that whatever (*) is present in this context (/jsp-examples) should go to the Tomcat.
So u r ready to go for the examples folder, but for any other folder, you need to first create a Tomcat context.
If you want to learn more about context in Tomcat let me know.

6. Look at your <TOMCAT>/conf/server.xml file and in there just make sure the following lines are present
<connector>
port="8009"
protocol="AJP/1.3"
.......
</connector>

7. There is no need to move any JSPs on the Apache. Thats why we use the connector. All the JSPs reside at the Tomcat context.
Was there any specific reason to install Apache on port 8001??

Anyway, to test your connector just point to
whateveryourApacheURL/jsp-examples/whateverpage.jsp

Hope this info helps.

Rahul..
16 years ago
Hi Ravi,
The choices are plenty. I have been using mod_jk2 and found it to be very good.

Installing is easy, just follow the steps:

1. Download the mod_jk2 (for windows) from the apache's website
http://apache.ausgamers.com/jakarta/tomcat-connectors/jk2/binaries/win32/

2. Uncompress and put the module in the apache modules directory

3. There are only 2 files to configure: httpd.conf & workers2.properties

4. Add (or uncomment if already exist) the line in your httpd.conf:
loadmodule jk2_module modules/mod_jk2.dll

5. Add your uri (the tomcat context for your directories holding the jsp/servlets etc) in the workers2.properties

6. Also make sure the <connector> is defined in your tomcat web.xml with the default port no 8009 and protocol as AJP1.3

Test your application for e.g. http://localhost:8080/foldername/index.jsp
by omitting the port 8080 in your url i.e. http://localhost/foldername/index.jsp and u should be able to see the index page served by the apache using the jk2 connector.


Good Luck

regards,
Rahul..
16 years ago
Hi Jeff,
Have u modified your tomcat-user.xml?

Make sure u have these two entries there:
<tomcat-users>
<role rolename="admin"/>
<role rolename="manager"/>
<user username="yourusername" password="yourpasswd" roles="admin,manager"/>
</tomcat-users>


regards,
Rahul..
16 years ago
Although u r not clear with your question, If I got u right, u r looking for something like this:
httpd://anyname.servername.com

Have u tried putting your required name and document root into the <VirtualHosts> of httpd.conf?

<virtual host>
ServerName anyname.servername.com
DocumentRoot /var/www/whatever
</virtualhost>
16 years ago
If the * above doesn't work, try *** instead, for guaranteed results.
16 years ago
To check the proxy settings within your IE
Go to Tools -> Internet Options -> Connections -> LAN Settings -> and in there uncheck any proxy server
16 years ago
Also, try to load a page from any other context e.g http://localhost:8085/manager/html which should prompt you for the username and password for your tomcat admin account.

If this loads well then the Tomcat installation is all fine and the problem lies with the index page in the Root folder. (This seems unlikely though, because the Tomcat index page comes pre compiled)
16 years ago
Hi Siva,
Are you sure you have set up the right port (8085 in your case). Check the server.xml to confirm the port.

regards,
Rahul..
16 years ago
Use mod_jk, mod-jk, mod_proxy or the webapp module for apache.
Since your apache is an older version 1.3.x, I would sugest using md_jk or mod_jk2. Both uses AJP protocol to talk between Apache & Tomcat.

Configuring them is easy. Just download the module, put them in the modules folder of Apache, modify the httpd.conf to include the module, modify the workers.properties files to define the Tomcat context and thats it.

Just in case, if u hit a roadblock anywhere, I'll provide you with a detail configuration.

Good Luck !

regards,
Rahul..
16 years ago