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 160722 - Context path is not set for Tomcat
Summary: Context path is not set for Tomcat
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
: 154364 (view as bug list)
Depends on:
Blocks: 162051
  Show dependency tree
 
Reported: 2009-03-20 11:57 UTC by Milan Kuchtiak
Modified: 2009-04-09 19:23 UTC (History)
4 users (show)

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 Milan Kuchtiak 2009-03-20 11:57:05 UTC
Scenario :

- create a Maven web application (e.g. mavenprojectWeb)
- open project customizer and set up Target server for Tomcat 
  (look that context path value is "/mavenprojectWeb" in project properties)
- the META-INF/context.xml is created :

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path=""/> <!-- the path attribute is empty -->

The path atribute should be set to "/mavenprojectWeb".
Comment 1 Milos Kleint 2009-03-23 08:52:43 UTC
the context.xml file is created by the server plugin, it could be a bug there.

what we do is following:

WebModuleImplementation.getContextPath() returns the value from deployment descriptor via
J2eeModuleProvider.getConfigSupport().getWebContextRoot()
if not found, we fallback to the maven final name of the artifact (mavenprojectWeb I guess.)
when setting the value in the customizer, we again delegate to the J2eeModuleProvider.getConfigSupport()

not sure what is there to do, please advice
Comment 2 Jaroslav Pospisil 2009-03-30 16:37:13 UTC
*** Issue 154364 has been marked as a duplicate of this issue. ***
Comment 3 Milos Kleint 2009-04-06 11:04:39 UTC
reassigning to tomcat integration for evaluation. Please advice what from the project is used for the context path proeprty.
Comment 4 Petr Hejl 2009-04-06 13:34:33 UTC
Perhaps context root should be configured after ensureConfigurationReady() is called.
Comment 5 Milos Kleint 2009-04-08 13:19:28 UTC
http://hg.netbeans.org/main/rev/6d1de89ec39b
Comment 6 Quality Engineering 2009-04-09 19:23:40 UTC
Integrated into 'main-golden', will be available in build *200904091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6d1de89ec39b
User: Milos Kleint <mkleint@netbeans.org>
Log: #160722 make sure to pass the context path to the app server after ensureConfigurationReady() call.