You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Heligon Sandra <sa...@nextream.fr> on 2002/09/10 13:09:51 UTC

Source code directory / deployment directories / CVS repository t ree (URGENT)

	I have a question about the directories structure.

	For a web application we distinguish two directories structures:

	- source code directory
	that contains Java classes/packages specific to the application

	- deployment application directory (= Tomcat files systems)
something like
	META-INF
	Pages (contains JSP pages)
	Images
	WEB-INF
		Lib
		Classes 

	I am using CVS to archive my files, I ask me questions about the
CVS's repository for 
	my application, something like:

	MyApp

		archive - contains .war
		doc      - documentation
		src      - contains the source code directory

	how must I add the deployment directory ?
	Can you give me example or advices ?

	I think to do:

	X:\MyProject\MyApp
		archive - contains .war
		doc      - documentation
		src       - contains the source code directory
		pages   - contains JSP pages
		images 
		web     (contains configuration files web.xml)
		           - lib	

	I will get sources from CVS, compile sources (with the IDE) and
create a .war.
	
	To deploy the directory under Tomcat (Tomcat is installed on
y:\Tomcat) I have several solutions
	1. use Ant and create a directory MyApp under y:/Tomcat/webapps and
the sub-directories WEB-INf, pages etc...
	2. set an element context in the server.xml that points on
X:\MyProject\MyApp, isn't it?
	
	For me the second solution is better because my project used for the
development (JBuilder project) points
	on X:\MyProject\MyApp in order to access to the directories src,
pages, images.
	When I modified a Java source file or JSP or XML file, I just have
to stop Tomcat and start it again because it
	points on the updated directory.
	With the first solution, I must stop Tomcat, launch the build.xml
command and restart Tomcat, isn't it ?
	If I forget the build.xml command Tomcat doesn't have the updated
sources or JSP files.
	I have choose the first solution because I don't know Ant and I have
not a lot of time. 

	Do you have remarks or advices ? 
	What do you think about place JSP files in src directory ? in order
to points on the X:\MyProject\MyApp\src
	in the IDE and not see the other sub-directories (doc, archive,
scripts....they are unused in the IDE explorer).

	

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Source code directory / deployment directories / CVS repository t ree (URGENT)

Posted by Ben Walding <be...@walding.com>.
Probably a good idea to read through 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/source.html.  

I personally don't like having TomCat looking into my source area as I 
prefer to deploy for development like I do for production.  To this end 
I just create a WAR file and use the manager webapp to stop and start 
the context, as this is fully scripted it takes around 9 seconds for our 
application.  I also prefer to have my server.xml clean of context 
information eg (TomCat 4.1.* only).

%TOMCAT_HOME%/webapps/<app>.xml  (the <Context> node that is normally in 
server.xml)
%TOMCAT_HOME%/webapps/<app>.war

And the use Ant's <expandproperties> to create the customised Context 
xml on the fly.



Heligon Sandra wrote:

>	I have a question about the directories structure.
>
>	For a web application we distinguish two directories structures:
>
>	- source code directory
>	that contains Java classes/packages specific to the application
>
>	- deployment application directory (= Tomcat files systems)
>something like
>	META-INF
>	Pages (contains JSP pages)
>	Images
>	WEB-INF
>		Lib
>		Classes 
>
>	I am using CVS to archive my files, I ask me questions about the
>CVS's repository for 
>	my application, something like:
>
>	MyApp
>
>		archive - contains .war
>		doc      - documentation
>		src      - contains the source code directory
>
>	how must I add the deployment directory ?
>	Can you give me example or advices ?
>
>	I think to do:
>
>	X:\MyProject\MyApp
>		archive - contains .war
>		doc      - documentation
>		src       - contains the source code directory
>		pages   - contains JSP pages
>		images 
>		web     (contains configuration files web.xml)
>		           - lib	
>
>	I will get sources from CVS, compile sources (with the IDE) and
>create a .war.
>	
>	To deploy the directory under Tomcat (Tomcat is installed on
>y:\Tomcat) I have several solutions
>	1. use Ant and create a directory MyApp under y:/Tomcat/webapps and
>the sub-directories WEB-INf, pages etc...
>	2. set an element context in the server.xml that points on
>X:\MyProject\MyApp, isn't it?
>	
>	For me the second solution is better because my project used for the
>development (JBuilder project) points
>	on X:\MyProject\MyApp in order to access to the directories src,
>pages, images.
>	When I modified a Java source file or JSP or XML file, I just have
>to stop Tomcat and start it again because it
>	points on the updated directory.
>	With the first solution, I must stop Tomcat, launch the build.xml
>command and restart Tomcat, isn't it ?
>	If I forget the build.xml command Tomcat doesn't have the updated
>sources or JSP files.
>	I have choose the first solution because I don't know Ant and I have
>not a lot of time. 
>
>	Do you have remarks or advices ? 
>	What do you think about place JSP files in src directory ? in order
>to points on the X:\MyProject\MyApp\src
>	in the IDE and not see the other sub-directories (doc, archive,
>scripts....they are unused in the IDE explorer).
>
>	
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>