You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by surinder singh <su...@bflsoftware.com> on 2000/09/07 08:51:50 UTC

What is best location for development

My Server Specs: [ SERVER INFO: Tomcat Web Server/3.1 (JSP 1.1; Servlet
2.2; Java 1.2.2; Linux 2.2.14-12 i386; java.vendor=Sun Microsystems
Inc.) ]

I want to share ur opinions about best place for servlets and jsp during
development.
I want to know the way that
1) it should not be required to give root passward to each developer
2) developer need not request sys administrator for testing each servlet

3) It should be similiar to production environment
4) No shutdown/startup events as it is not expected from a server

I know these options:
1) Create a new directory ( say hi-fi ) in $TOMCAT_HOME/webapps  put the
servlets in $TOMCAT_HOME/weapps/hi-fi/classes. But this needs root
passwd and shutdown/startup of tomcat. The advantage is that you need
not edit serve.xml manually.

2) Create an entry in $TOMCAT_HOME/conf/server.xml for the new context
to be added.
(-) is root password and shutdown/startup and manual edit of server.xml
(+) having docBase anywhere in the filesystem and thus no root passwd
while placing servlets

3) Context Administration provided in admin context.
(+) very easy
I don't know how it works as using this one can create a context without
root.

Please add ...
---

This I tried with Context Administration provided in admin context:
My intention was to put servlets somewhere in my /home/surinder
directory so that I need no su permissions for putting servlets in the
container.

DOC BASE: /home/surinder/tomcat_link
FULL DOC BASE: file:/home/surinder/tomcat_link
PATH: /surinder
WORK DIR: localhost_8080/surinder

I created  and put  a SimpleServlet.class in
/home/surinder/tomcat_link/WEB-INF/classes.

/home/surinder/tomcat_link/WEB-INF/web.xml contains
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>

Please tell me what is the best way to maintain directories during
development with minimal root intervention and shutdoun/startup.

TIA
Surinder