Hi,
If anyone has a moment. I would like to know how to set up JBoss to run with
Tomcat. The instructions as shown below does not work for me.
Instructions per http://www.jboss.org/newsite/manual/third_party.html
Same JVM, Different ClassLoader
The next step of integration is to run Tomcat and JBoss in the same JVM, bet
let them use their default ClassLoaders. This is still quite easy to
configure, and gives better performance than the separate setup, but not as
good as the fully integrated configuration.
You may still install Tomcat and JBoss in any way you like - they do not
need to be installed in the same location. You should place your JBoss
client libraries and EJB client code in your web app as above (for the
non-integrated install). However, you must perform the following additional
steps to enable the integrated configuration:
Setup Environment Variables
In whatever batch or shell script you use to launch JBoss, add entries for
the following environment variables: variable value
TOMCAT_HOME The base directory of Tomcat's binaries. With the binary
distribution, this would be jakarta-tomcat under your installation root.
JAVA_HOME The base directory of your JDK 1.2.2 or 1.3 installation
CLASSPATH This should not include anything (unless you really know what
you're doing!). Both Tomcat and JBoss have startup sequences that load the
necessary JARs onto the classpath.
Add Request Interceptor (Tomcat 3.2+ Only!)
In order to enable the correct ClassLoader mechanics, you must add a
RequestInterceptor to the default Tomcat configuration. This is global
across all web apps, and is generally a good idea when you're running in JDK
1.2 or greater, but it required for proper behavior with JBoss. The
configuration file you need to change is server.xml and it is located in the
conf directory under the Tomcat install directory (jakarta-tomcat for the
binary). There are a number of lines that deal with RequestInterceptors, the
last of which are currently the Realms (SimpleRealm, JDBCRealm, etc.). After
the other RequestInterceptors, add the following:
<RequestInterceptor
className="org.apache.tomcat.request.Jdk12Interceptor"
debug="0" />
Enable Tomcat in JBoss
To start Tomcat when you start JBoss, you need to edit the jboss.conf file
located in the conf directory under your JBoss install directory. You need
to uncomment following entry:
<MLET CODE = "org.jboss.tomcat.TomcatService" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
</MLET>
After that, when you start JBoss it will start Tomcat too, and when you shut
down JBoss it will shut down Tomcat. If you have any problems, make sure
that all the environment variables above are set correctly in your startup
script.
I get this in my cmd window when starting.
[Simple Realm Mapping] Started
[Webserver] Starting
[Webserver] Codebase set to http://u0021553-nta:8083/
[Webserver] Started webserver on port 8083
[Webserver] Started
[Tomcat] Starting
[Tomcat] Testing if Tomcat is present....
[Tomcat] failed
[Tomcat] Tomcat wasn't found. Be sure to have your CLASSPATH correctly set
[Tomcat] Started
[Transaction manager] Starting
Is there something that I missed?
My TOMCAT-HOME IS c:\tomcat
My JAVA_HOME is C:\jkd1.3.0_02
Thank you,
Southin
-----Original Message-----
From: Michael Azzi [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 3:34 PM
To: [EMAIL PROTECTED]
Subject: [jBoss-User] J2EE Security Question
Hi,
I have a very basic question about J2EE security in JBOSS-TOMCAT. I am sure
this
question has been asked many times before, but I have not been able to find
anything
in the archives that directly answers it.
I have a simple web app (primer) with just a jsp component, and no ejb
component. I
am trying to attach security constraints to this web app as per the J2EE
spec.
the web.xml looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN' 'http://java.sun.com/j2ee/dtds/web-app_2.2.dtd'>
<web-app>
<display-name>Primer Web Application</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<security-constraint>
<web-resource-collection>
<web-resource-name>primer</web-resource-name>
<url-pattern>/index.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>ADMIN</role-name>
<role-name>SYSADMIN</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/login.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role>
<description>System Administrators</description>
<role-name>SYSADMIN</role-name>
</security-role>
<security-role>
<description>Firm Administrators</description>
<role-name>ADMIN</role-name>
</security-role>
</web-app>
Now, when I run this web app in tomcat alone (ie no jboss is involved, just
tomcat) it works fine, and the
login page (login.jsp) comes up. But when I run it from jboss either as
standalone, or embedded, the login page
does not come up at all. Instead it goes directly to index.jsp, as if the
security constraints did not get enforced.
I would greatly appreciate it if someone could just tell me what am I doing
wrong here.
I am using JBOSS2.0 Final with Tomcat 3.2
Thanks in advance.
Mike.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]