DeveloperSide.NET Forums
July 04, 2020, 05:47:26 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Proper location of Tomcat webapps  (Read 7367 times)
0 Members and 1 Guest are viewing this topic.
tkillion
Member
*
Posts: 1


View Profile
« on: June 03, 2008, 02:10:47 PM »

First of all thanks for the super-easy installation of Web.Dev. I had v3.00 Pro up and running in less than a half-hour, and I'm pretty much a noob.

I am developing a website locally, to be moved to a real-world server environment when it is finished. I have set up Web.Dev in the usual manner (\www directory off the root of the drive) and everything (PHP, ASP, Tomcat, Joomla) is working fine according to the Suite Guide links. The HOSTS file has been updated so I can test my website on a local browser (www.website.com).

My development site is installed at \www\vhosts\_dynamic\WEBSITE\www\ and runs without a hitch.

Tomcat 6 is installed at \www\Tomcat6\ and I have a password login servlet installed (in \www\Tomcat6\webapps\). The servlet runs perfectly from the Tomcat Manager. I must say that I know very little about the workings of Tomcat and JSP.

I wish to have the actual password login webpage as a subpage of my website, located in the \WEBSITE\www\ directory, so it needs to 'call' the Tomcat servlet from that location, execute the login function, allow the user to do whatever, and then return to the \WEBSITE\www| directory. So far I am baffled as how to 'link' the two parts. Should Tomcat be located in a subdir of \WEBSITE\www\ ? And if so, how do I do that??

On a related note, if and when I get this sorted out, how and in what form do I transmit the Tomcat servlet to the real-world server? (I'm not talking about FTP etc, what I need to know is, for example, is the servlet package (.WAR file or just the complete subdir) located in a special Tomcat directory on the server, or is it put into my \WEBSITE folder?) I'm actually wondering if Tomcat has to be part of MY \WEBSITE installation on the real-world server vs my servlet using an existing Tomcat installation on the server.

Did I mention I'm pretty much a noob?

Thanks,

PS I have 3.00 Professional installed, what is the procedure to update to 3.01?



Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: June 03, 2008, 03:11:47 PM »

Hi tkillion,

I'll email you the link to v3.01 after I post this. For anyone else reading this that would like v3.01, just email admin@devside.net from the email you purchased, or if you can't, then with any details of the transaction you might have.

The online http://www.devside.net/download/changelog.txt has info about the difference between v3.00 and v3.01.

A few components have been updated and a few details changed. The major one is that the sub-domains feature for 'localhost' has been removed. It turned out to not be such a great idea, created a few problems, and limited IP based access.

The upgrade path is this:

1. Backup your websites, database, and configuration changes/files.

a. If you have any websites under C:\www\vhosts\...\ that you want to keep, copy them outside the C:\www\ folder.
b. If you have any data under the MySQL database that you want to keep, back it up and place it outside the C:\www\ folder.
c. If you have any additional configuration files and/or changes, save a copy outside the C:\www\ folder.
d. If you have created Tomcat webapps that you want to keep, save a copy outside the C:\www\ folder.

2. Uninstall Suite v3.00

3. The uninstaller will leave a few directories in place just in case you want to save something. But it will also delete the rest -- so do backup as outlined above. Rename the remaining C:\www folder as C:\www-v300.

3. Install Suite v3.01

4. Restore back in your websites, database, configuration changes.

This process should be consolidated in future versions. But for now it is a bit manual.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #2 on: June 03, 2008, 03:24:34 PM »

Quote
So far I am baffled as how to 'link' the two parts. Should Tomcat be located in a subdir of \WEBSITE\www\ ? And if so, how do I do that??

Everything for Tomcat should stay under the C:\www\Tomcat6\webapps\ folder structure.

To answer your question:

When dealing with Tomcat via Apache, we are dealing with Tomcat through a Proxy URL under Apache...

The Suite comes with an example set up under:

URL: http://localhost/examples/

Configuration file:
C:\www\Apache22\conf\extra\vhosts\localhost\suite-mod_proxy_ajp.conf

The Suite URL http://localhost/examples/ is proxied internally under Apache via mod_proxy_ajp, which passes the request to Tomcat's AJP connector on port 8009. Tomcat will treat this request as a request for the 'examples' folder under C:\www\Tomcat6\webapps\ [per server.xml settings], process that request, and send the output back to Apache. Apache now displays http://localhost/examples/ to the end user.

Basically, Tomcat is oblivious to Apache, and Apache just displays the results Tomcat generates.

suite-mod_proxy_ajp.conf
Code:
ProxyPass /examples/ ajp://localhost:8009/examples/
ProxyPassReverse /examples/ ajp://localhost:8009/examples/

Assuming we are working with locahost, you would basically edit the above file and add additional URLs for Apache to proxy.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!