Java
  Home arrow Java arrow Page 4 - Slapping Together A JSP Development En...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Slapping Together A JSP Development Environment
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2001-03-05

    Table of Contents:
  • Slapping Together A JSP Development Environment
  • Essential Software
  • One Tomcat, Standing Alone
  • Connecting The Dots
  • Same Story, Different OS
  • Putting It In Context
  • Making The Grade

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Slapping Together A JSP Development Environment - Connecting The Dots


    (Page 4 of 7 )

    In order to get Apache and Tomcat working together, you need to load the JServ Apache module. Under Windows, this module is currently named "ApacheModuleJServ.dll", and you need to place it in the C:\PROGRAM FILES\APACHE GROUP\APACHE\MODULES\ directory. Next, open up your "httpd.conf" file, and add the following line to the "DSO Support" section:

    LoadModule jserv_module modules/ApacheModuleJServ.dll

    This loads the JServ module into memory.

    And then add the following line to the end of "httpd.conf":

    Include "c:/tomcat/conf/tomcat-apache.conf"

    Each time Tomcat starts, it automatically creates a configuration file for Apache, customized to your system - this file is named "tomcat-apache.conf", and is stored in the Tomcat CONF\ directory. This file contains JServ settings specific to Tomcat, together with directives designed to help Apache deal with JSP files, and is essential to getting Tomcat and Apache working together.

    If Apache is running, you'll need to stop and restart it for the new settings to take effect. And if all has gone well, the next time you start Apache, you'll see something like this:

    Apache/1.3.14 (Win32) tomcat/1.0 running...

    This indicates that the JServ module has been loaded, and is available for use with Tomcat.

    There is another Windows-specific problem you might encounter at this stage. If your Tomcat server has been installed to a directory with a so-called "long" file path, and this long path contains spaces or strange characters (say, C:\PROGRAM FILES\TOMCAT\WEBAPPS\EXAMPLES), Apache may barf with a complaint about aliases. In this case, note the line number with the error, open up the "tomcat-apache.conf" file, and enclose the long file paths in double quotes to fix the problem.

    Finally, the acid test. Start up Tomcat

    C:\TOMCAT\BIN>TOMCAT START Including all jars in C:\TOMCAT\LIB in your CLASSPATH. Using CLASSPATH: C:\TOMCAT\CLASSES;C:\TOMCAT\LIB\ANT.JAR;C:\TOMCAT\LIB\JAXP.JAR;C:\TOMCAT\LIB \SERVLET.JAR;C:\TOMCAT\LIB\PARSER.JAR;C:\TOMCAT\LIB\WEBSER~1.JAR;C:\TOMCAT\L IB\JASPER.JAR;C:\JDK\LIB\TOOLS.JAR Starting Tomcat in new window 2001-01-30 02:47:19 - ContextManager: Adding context Ctx( /examples ) 2001-01-30 02:47:19 - ContextManager: Adding context Ctx( /admin ) Starting tomcat. Check logs/tomcat.log for error messages 2001-01-30 02:47:20 - ContextManager: Adding context Ctx( ) 2001-01-30 02:47:20 - ContextManager: Adding context Ctx( /test ) 2001-01-30 02:47:22 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2001-01-30 02:47:22 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007

    Then start up Apache.

    Apache/1.3.14 (Win32) tomcat/1.0 running...

    And point your browser to http://localhost/examples/jsp/hello.jsp. If Tomcat, Apache and JServ are all configured properly, your JSP page should be parsed by the Tomcat engine and returned correctly to the browser. You can now use Apache to serve JSP documents without the necessity of specifying the port number in the URL.

    In case you need to stop the Tomcat server, you can use

    C:\TOMCAT\BIN>TOMCAT STOP Including all jars in C:\TOMCAT\LIB in your CLASSPATH. Using CLASSPATH: C:\TOMCAT\CLASSES;C:\TOMCAT\LIB\ANT.JAR;C:\TOMCAT\LIB\JAXP.JAR;C:\TOMCAT\LIB \SERVLET.JAR;C:\TOMCAT\LIB\PARSER.JAR;C:\TOMCAT\LIB\WEBSER~1.JAR;C:\TOMCAT\L IB\JASPER.JAR;C:\JDK\LIB\TOOLS.JAR

    Stop Tomcat

    More Java Articles
    More By icarus, (c) Melonfire


     

       

    JAVA ARTICLES

    - Adding Images With iTextSharp
    - Adding Columns With iTextSharp
    - Creating Simple PDF Files With iTextSharp
    - The Spring Framework: Understanding IoC
    - Introducing the Spring Framework
    - Java Classes
    - Completing the Syntactic Comparison of Java ...
    - Syntactic Comparison of Java and C/C++
    - Java Statements
    - Conditionals, Expressions and Other Java Ope...
    - Java Operators
    - Primitive Data Types and Basic Language Rule...
    - Java and Object-Oriented Programming
    - Java Beginning Programming
    - Gaming Development Setup





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway