This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 36197 - Tomcat writes to IDE installation when deploying from war
Summary: Tomcat writes to IDE installation when deploying from war
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
: 37811 37841 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-19 09:52 UTC by Petr Jiricka
Modified: 2006-02-28 11:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2003-09-19 09:52:03 UTC
It seems that when a war file is deployed to the
Tomcat 5 server, the server unpacks this archive
to the applications directory. Currently, this
directory is set to $CATALINA_HOME/webapps, i.e.
$IDE_HOME/jakarta-tomcat-5.0.xx/webapps for the
bundled Tomcat 5. This is not desirable, as this
will not work on multiuser intallations, and on
Unixes, where the user does not have the rights to
write to $IDE_HOME generally.

The solution should be to change the application
base directory to $CATALINA_BASE/webapps, i.e.
$USER_DIR/jakarta-tomcat-5.0.xx_base/webapps. This
is essentially what we were doing for Tomcat 4.

For this to work, the following needs to be done: 
1) When creating the base directory, copy the
webapps (or some, at least) from CATALINA_HOME to
CATALINA_BASE.
2) Adjust the files that placed in
CATALINA_BASE/conf/Catalina/localhost. These files
point to the administrative applications, and the
application paths are taken relatively to the
application base. So this needs to be absolutized
to point to CATALINA_HOME (which is where the
admin apps are physically placed).
Comment 1 _ rkubacki 2003-09-19 10:00:16 UTC
Ad 1) We don't need to copy the whole apps. Just create a file
$CATALINA_BASE/conf/Catalina/localhost/<appname>.xml with content
similar to:
<Context path="/<appname>"
docBase="<path_to_application_in_CATALINA_HOME>">
</Context>

for each app that would be autodeployed (it means there is a XML
context file under $CATALINA_HOME/conf for it or there is a
<appname>.war or directory <appname> containing the application in
$CATALINA_HOME/webapps. This should be faster and will share the
application from one instalation place. 
Comment 2 Pavel Buzek 2003-12-09 18:20:38 UTC
*** Issue 37811 has been marked as a duplicate of this issue. ***
Comment 3 Pavel Buzek 2003-12-09 23:26:26 UTC
*** Issue 37841 has been marked as a duplicate of this issue. ***
Comment 4 Pavel Buzek 2003-12-09 23:27:45 UTC
this is a problem for incremental deplyment too
Comment 5 Pavel Buzek 2003-12-10 04:40:22 UTC
I did what Radim suggested plus I've added Root, jsp-examples and
servlets-examples into servlet.xml, pointing to the location in home dir.
Comment 6 Jaroslav Pospisil 2006-02-28 11:35:55 UTC
VERIFIED