I got it working! but with some hacking...
by modifing the Tomcat source code file
"com.apache.tomcat.context.ContextManager.java":
Where "*" is the code added. I had to hard code the default path
"http://localhost" to "e:\\wwwroot" by getting the default context and
change the DocBase to my physical path. The default path was
"C:\SoftwaresInstalled\jakarta-tomcat-3.2.1\webapps\ROOT".
There's should be a configuration file that JBoss load for Tomcat so hard
code won't be needed.
Now I can browse to http://localhost and it'll serve the files from
e:\wwwroot. ========================================================
public void initContext( Context ctx ) throws TomcatException {
ContextInterceptor cI[]=getContextInterceptors();
for( int i=0; i< cI.length; i++ ) {
cI[i].contextInit( ctx );
}
* Context cctx = this.getContext("");
* cctx.setContextManager(this);
* cctx.setDocBase("e:\\wwwroot");
* cctx.setPath("");
* this.addContext(cctx);
}
==========================================================
----- Original Message -----
From: "Benjamin Chi" <[EMAIL PROTECTED]>
To: "jBoss" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, February 09, 2001 9:51 PM
Subject: Re: [jBoss-User] Unable To Run Tomcat When Embedded With JBOSS
> I can deploy the bean and browse it.
> We how to figure out where the wwwroot directory is located and how can we
> change it.
> looking at the start up:
>
> [EmbeddedTomcat] Starting
> [EmbeddedTomcat] Testing if Tomcat is present....
> [EmbeddedTomcat] OK
> [EmbeddedTomcat] ContextManager: Adding context Ctx( )
> [EmbeddedTomcat] path="" :jsp: init
> [EmbeddedTomcat] PoolTcpConnector: Starting HttpConnectionHandler on 8080
> [EmbeddedTomcat] Started
>
> the path="" is empty, I think there should be a default physical directory
> where the web files are located.
> But how do we configure it?
>
> ----- Original Message -----
> From: "Benjamin Chi" <[EMAIL PROTECTED]>
> To: "jBoss" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, February 09, 2001 9:05 PM
> Subject: Re: [jBoss-User] Unable To Run Tomcat When Embedded With JBOSS
>
>
> > I see where you got the "run_with_tomcat" file, it would "run tomcat".
> > I also made a copy of the "conf\default" to "conf\tomcat" so that the
> > configuration will be started with "run_with_tomcat".
> >
> > But, I'm still not able to get it to work. Is it possible to specify the
> > default file to serve? ex. index.htm.
> > And how can I specify the physical directory of the web root?
> >
> > Thanks,
> > Benjamin
> >
> > ----- Original Message -----
> > From: "Benjamin Chi" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Friday, February 09, 2001 8:49 PM
> > Subject: [jBoss-User] Unable To Run Tomcat When Embedded With JBOSS
> >
> >
> > > I tried what you have said, but it still doesn't work.
> > >
> > > I'm still getting the HTTP 404 error. When I browse my site
> > > http://localhost:8080/ or http://localhost:8080/jboss/index.html
> > >
> > > The following should be added too:
> > > SET TOMCAT_HOME=C:\SoftwaresInstalled\jakarta-tomcat-3.2.1
> > > SET
> > >
> SERVLETAPI_HOME=C:\SoftwaresInstalled\jakarta-tomcat-3.2.1\lib\servlet.jar
> > >
> > >
> > > * for Step2, the jboss.conf file is in "JBOSS_HOME\conf". I don't
see
> > it
> > > in "JBOSS_HOME\conf\tomcat"
> > > * I don't have the "run_with_tomcat" file for Step3:
> > > * Step4: I don't think I have the jar file to deploy.
> > >
> > > -Benjamin
> > >
> > >
> > >
> >
>
> --------------------------------------------------------------------------
> > --
> > > ----
> > >
> > > a.. From: jBoss Monkey
> > > b.. Subject: [jBoss-User] Unable To Run Tomcat When Embedded With
> JBOSS
> > > c.. Date: Wed, 31 Jan 2001 23:35:46 -0800
> > >
> >
>
> --------------------------------------------------------------------------
> > --
> > > ----
> > >
> > > Bradd:
> > > Which distribution of jboss you are using, if u have been using
> > > jboss2.0-FINAL with tomcat distribution then running jboss with tomcat
> is
> > > fairly simple process:
> > >
> > > note:
> > > JAVA_HOME is the directory where u installed jdk (eg d:\Apps\jdk1.3)
> > > jBOSS_HOME is the directry where u installed jboss (eg
> > > d:\Apps\jboss_tomcat\jboss2.0-FINAL)
> > >
> > >
> > > Step1:
> > > Make sure you have latest jdk which is jdk1.3 and JAVA_HOME\bin
> > directory
> > > is in your PATH.
> > >
> > > Step2:
> > > Open jboss.conf file under JBOSS_HOME\conf\tomcat folder, in an
editor
> > and
> > > look for the entry like
> > >
> > > ---------------part of jboss.conf----------------------
> > > <!--
> > > -- Uncomment this to add "Stand-alone Stack Tomcat support".
> > > -- This means that JSP and Servlets will work with EJB in different
> > stacks
> > > and
> > > -- communicate through network invocation. If you benchmark j2ee
> please
> > > use "integrated stack".
> > > -- Also note that you cannot use the J2EE deployer with Tomcat in
this
> > > configuration.
> > > -- Be sure to set your 'TOMCAT_HOME' environment variable before
> > starting
> > > JBoss.
> > > -- Note: this reads the server.xml configuration file of Tomcat, you
> > can't
> > > use the j2ee deployer
> > > --
> > >
> > > -- MLET CODE = "org.jboss.tomcat.TomcatService" ARCHIVE="jboss.jar"
> > > CODEBASE="../../lib/ext/">
> > > -- /MLET>
> > > -->
> > >
> > > <!-- WARNING: only one of the tomcat services can be configured,
either
> > > "stand alone or integrated" -->
> > >
> > > <!--
> > > -- Uncomment this to add "Integrated Stack (fast) Tomcat support".
> > > -- This service allows you to integrate the stack of Tomcat and
jboss.
> > > -- Invocations are not going through network but pass native
pointers
> > > resulting in dramatic speed increases.
> > > -- This service allows the J2EE deployer to add and remove Tomcat
> > contexts
> > > dynamically
> > > -- through JMX for you and in effect deploy EARs. Note that tomcat's
> > > server.xml file will not be processed:
> > > -- you can only use JMX to add contexts. Use the J2EE deployer to
> > deploy
> > > full EARs on this stack
> > > -- Be sure to set your 'TOMCAT_HOME' environment variable before
> > starting
> > > JBoss.
> > > --
> > > -- The ARG tag is the port to run tomcat on.
> > > --
> > >
> > > <MLET CODE = "org.jboss.tomcat.EmbeddedTomcatService"
> > ARCHIVE="jboss.jar"
> > > CODEBASE="../../lib/ext/">
> > > <ARG TYPE="int" VALUE=8080>
> > > </MLET>
> > > ----------------------------------------------------------
> > >
> > >
> > > Here read the descriptions and WARNING and uncomment the lower MLET
> > entry
> > > i.e.
> > >
> > >
> > > <MLET CODE = "org.jboss.tomcat.EmbeddedTomcatService"
> > ARCHIVE="jboss.jar"
> > > CODEBASE="../../lib/ext/">
> > > <ARG TYPE="int" VALUE=8080>
> > > </MLET>
> > >
> > >
> > > Step3:
> > > Go to jboss bin directory and run the command run_with_tomcat
> > >
> > >
> > > Step4:
> > > Look for the messages like these in the window:
> > >
> > > [EmbeddedTomcat] Starting
> > > [EmbeddedTomcat] Testing if Tomcat is present....
> > > [EmbeddedTomcat] OK
> > > [EmbeddedTomcat] ContextManager: Adding context Ctx( )
> > > [EmbeddedTomcat] path="" :jsp: init
> > > [EmbeddedTomcat] PoolTcpConnector: Starting HttpConnectionHandler on
> 8080
> > > [EmbeddedTomcat] Started
> > >
> > > If you see these then you are set.
> > >
> > > Step4:
> > > Go to web browser and type
> > > http://localhost:8080/jboss/index.html
> > > You should see the page like below:
> > > ---------------
> > > Tomcat / jBoss example
> > > Congratulations! You seem to have successfully deployed the example.
> > > This example is a very simple servlet which calls a very simple
> > > StatelessSession bean. The bean is deployed twice: once using Non
> > Optimized
> > > calls (ie RMI), and once with the inVM optimization, so you can see
the
> > > difference.
> > >
> > > Execute the example
> > > Execute the example with speed test
> > >
> > > For better results in the speed test, I recommend to turn off debug
> > logging:
> > > edit your jboss.conf file and find the ConsoleLogging entry: set the
> first
> > > ARG to "Information,Warning,Error".
> > > Note that all tomcat logging is seen as "Information".
> > >
> > > I also noticed that after a while (click on "reload"), it gets faster.
> > > ----------------------------------------------
> > >
> > >
> > > I hope this helps.
> > >
> > > ~jm
> > >
> > > ====================================
> > > >From: "Bradd R Frasier" <[EMAIL PROTECTED]>
> > > >--i am unable to run tomcat in Jboss.......can someone help me out???
i
> > > >have difficulites in configuring Jboss...........pls help me to those
> > gurus
> > > >there
> > >
> > > _________________________________________________________________
> > > Get your FREE download of MSN Explorer at http://explorer.msn.com
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > --------------------------------------------------------------
> > > To subscribe: [EMAIL PROTECTED]
> > > To unsubscribe: [EMAIL PROTECTED]
> > > List Help?: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > List Help?: [EMAIL PROTECTED]
> >
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]