Re: Cannot change initial context cactus uses, jboss 3.2.5

2005-12-27 Thread Kazuhito SUGURI
Hi Chris,

In article [EMAIL PROTECTED],
Tue, 20 Dec 2005 15:30:46 -0800,
Chris Fellows [EMAIL PROTECTED] wrote: 
cfellows Having issues getting the initial connection test to hit the correct
cfellows context. I define contextURL=http://localhost:18080/test2, but it will
cfellows keep trying to connect to http://localhost:18080/test1. The name of 
the
cfellows test war file is test1.war.  I have not found anything similar to this
cfellows from searches and archives. Any help would be appreciated. I've tried
cfellows setting the contextURL all 3 ways (jvm arg, classpath, system 
property)
cfellows and none of them works. It seems that no matter what settings and 
task I
cfellows use, cactus will still use the name of the war file for the context. 

AFAIK, cactus ant-task doesn't use contextURL system property,
but uses war archive filename instead.


cfellows Relevant part of build.xml:
cfellows cactus warfile=${test.war} fork=yes
[snip]
cfellows jboss3x

According to the source code (CactusTest), a hook to override the context
is provided for specific containers such as jboss3x.
jboss3x's implementation seems trying to override the context
by using context-root element of jboss-web.xml, however,
I don't think it will work.

If you are using war archive, I can send you a patch against
src-distribution of Cactus-1.7.1. Will you try that?
# It may have some side-effects because I cannot test the patch, though.

Regards,

Kazuhito SUGURI

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cannot change initial context cactus uses, jboss 3.2.5

2005-12-27 Thread Chris Fellows
Sure, I'll give that a test. Thanks for the tip on how cactus determines
the context path.

-Original Message-
From: Kazuhito SUGURI [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 27, 2005 3:12 AM
To: cactus-user@jakarta.apache.org
Subject: Re: Cannot change initial context cactus uses, jboss 3.2.5

Hi Chris,

In article
[EMAIL PROTECTED],
Tue, 20 Dec 2005 15:30:46 -0800,
Chris Fellows [EMAIL PROTECTED] wrote: 
cfellows Having issues getting the initial connection test to hit the
correct
cfellows context. I define contextURL=http://localhost:18080/test2, but
it will
cfellows keep trying to connect to http://localhost:18080/test1. The
name of the
cfellows test war file is test1.war.  I have not found anything similar
to this
cfellows from searches and archives. Any help would be appreciated.
I've tried
cfellows setting the contextURL all 3 ways (jvm arg, classpath, system
property)
cfellows and none of them works. It seems that no matter what settings
and task I
cfellows use, cactus will still use the name of the war file for the
context. 

AFAIK, cactus ant-task doesn't use contextURL system property,
but uses war archive filename instead.


cfellows Relevant part of build.xml:
cfellows cactus warfile=${test.war}
fork=yes
[snip]
cfellows jboss3x

According to the source code (CactusTest), a hook to override the
context
is provided for specific containers such as jboss3x.
jboss3x's implementation seems trying to override the context
by using context-root element of jboss-web.xml, however,
I don't think it will work.

If you are using war archive, I can send you a patch against
src-distribution of Cactus-1.7.1. Will you try that?
# It may have some side-effects because I cannot test the patch, though.

Regards,

Kazuhito SUGURI

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot change initial context cactus uses, jboss 3.2.5

2005-12-27 Thread Kazuhito SUGURI
Hi Chris,

In article [EMAIL PROTECTED],
Tue, 27 Dec 2005 10:40:49 -0800,
Chris Fellows [EMAIL PROTECTED] wrote: 
cfellows Sure, I'll give that a test. Thanks for the tip on how cactus 
determines
cfellows the context path.

Appending is a patch against source distribution of Cactus-1.7.1.
# A file to be modified is JBoss3xContainer.java:
#  @version $Id: JBoss3xContainer.java,v 1.19 2005/01/29 15:49:18 vmassol Exp $


In article [EMAIL PROTECTED],
Tue, 20 Dec 2005 15:30:46 -0800,
Chris Fellows [EMAIL PROTECTED] wrote: 
cfellows jboss-web
cfellowscontext-root//context-root

jboss-web.xml should have proper context-root element value
when you use the patched version of cactus-ant.jar
(context-root/test2/context-root for example).

Hope this helps,

Kazuhito SUGURI
--- 
./integration/ant/src/java/org/apache/cactus/integration/ant/container/jboss/JBoss3xContainer.java.orig
 2005-01-29 13:49:18.0 +0900
+++ 
./integration/ant/src/java/org/apache/cactus/integration/ant/container/jboss/JBoss3xContainer.java
  2005-12-28 09:59:03.540257687 +0900
@@ -236,6 +236,7 @@
 // Try to infer the test root context from the JBoss specific
 // codejboss-web.xml/code file.
 this.testContextRoot = getTestContextFromJBossWebXml();
+getDeployableFile().setTestContext(this.testContextRoot);
 
 // TODO: as long as we don't have a way to set the port on the JBoss 
 // instance, we'll at least need to extract the port from a config file
@@ -441,10 +442,7 @@
 IOException, ParserConfigurationException, SAXException
 {
 Document doc = null;
-File configDir = new File(this.dir, server);
-File deployDir = new File(configDir, this.config + /deploy);
-File warFile = new File(deployDir,
-getDeployableFile().getFile().getName());
+File warFile = getDeployableFile().getFile();
  
 JarFile war = new JarFile(warFile);
 ZipEntry entry = war.getEntry(WEB-INF/jboss-web.xml);

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]