Link to home
Start Free TrialLog in
Avatar of myare2004
myare2004

asked on

tomcat4.1.30 with JBoss2.4.9 (URGENT)

Hi,

I am having problem integrating Tomcat4.1.30 with JBoss2.4.9.
I installed them separetly in different directoy in C:\ drive(C:\tomcat and C:\JBoss2.4.9).

I think i set all classpaths correctly as i done as follow:
JAVA_HOME=  C:\j2sdk1.4.1_03
JBOSS_HOME= C:\JBoss-2.4.9
CATALINA_HOME= C:\tomcat

CLASSPATH = .;%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\common\lib\servlet.jar;%JBOSS_HOME%\lib\ext\jboss-j2ee.jar.

PATH=  %CATALINA_HOME%\bin;%JAVA_HOME%\bin

i can run tomcat and jboss saperatly, jboss works okay with ejb files, but when it comes with jsp i cant integrate tomcat with jboss.
After a lot of reading including articles, books i thinkthat i need  to edit these files(TOMCAT_HOME/conf/server.xml , JBOSS_HOME/conf/default/jboss.jcml  and JBOSS_HOME/conf/default/jboss.conf ) to integrate tomcat with jboss
Please HELP me out from this mess.
how to do it and what to do?

URGENT

thank you in advance.
Myare2004
Avatar of rama_krishna580
rama_krishna580
Flag of United States of America image

see here..

http://csci.mrs.umn.edu/twiki/view/Ochemtutorial/JBossAppServer
http://www.csd.abdn.ac.uk/~bscharla/teaching/CS5302/practicals/practical1.shtml

And..

You should use AJP Connector, we using JBOSS/Tomcat integrated and use Apache for Port translation. AJP Connector is used as the bridge between Tomcat and Apache.

R.K
see this also..

Apache/jakarta-ant-1.4.1-bin.tar.gz - The Ant 1.4.1 binary distribution as a gzipped tar archive. It is available from http://jakarta.apache.org/builds/jakarta-ant/release/v1.4.1/bin/jakarta-ant-1.4.1-bin.tar.gz.
Apache/jakarta-ant-1.4.1-bin.zip - The Ant 1.4.1 binary distribution as a zip archive. It is available from http://jakarta.apache.org/builds/jakarta-ant/release/v1.4.1/bin/jakarta-ant-1.4.1-bin.zip.
Apache/jakarta-tomcat-3.2.3.tar.gz - The Tomcat 3.2.3 servlet container as a gzipped tar archive. It is available from http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.3/bin/jakarta-tomcat-3.2.3.tar.gz.
Apache/jakarta-tomcat-3.2.3.zip - The Tomcat 3.2.3 servlet container as a zip archive. It is available from http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.3/bin/jakarta-tomcat-3.2.3.zip.
Apache/jakarta-tomcat-4.0.1.tar.gz - The Tomcat 4.0.1 servlet container as a gzipped tar archive. It is available from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/bin/jakarta-tomcat-4.0.1.tar.gz.
Apache/jakarta-tomcat-4.0.1.zip - The Tomcat 4.0.1 servlet container as a zip archive. It is available from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/bin/jakarta-tomcat-4.0.1.zip.
JavaPetStore/jboss-jps-patch.zip - The patch described in Chapter 11, "Using JBoss," that allows the user to run the 1.1.2 version of the Java Pet Store application with JBoss.
JavaPetStore/jps-1_1_2_license.txt - The redistribution and use license for the 1.1.2 version of the Java Pet Store.
JavaPetStore/jps-1_1_2.zip - The original Java Pet Store application bundle as distributed by Sun. It is available from http://developer.java.sun.com/developer/sampsource/petstore/petstore1_1_2.html. Note that this requires a Java Developer Connection login.
JBoss/JBoss-2.4.4.zip - The JBoss application server. This does not include a servlet container. It is available from http://prdownloads.sourceforge.net/jboss/JBoss-2.4.4.zip.
JBoss/JBoss-2.4.4-src.tgz - The JBoss components source distribution. This includes the JBossServer, JBossCX, JBossMQ, JBossNS, JBossPool, JBossSX, JBossTest, contrib/tomcat, and contrib/catalina module source. It is available from http://prdownloads.sourceforge.net/jboss/JBoss-2.4.4-src.tgz.
JBoss/JBoss-2.4.4_Tomcat-3.2.3.zip - The JBoss components source distribution. This is the integrated JBoss/Tomcat-3.2.3 servlet container bundle. Tomcat-3.2.3 is a Servlet 2.2/JSP 1.1 specification compliant servlet container. It is available from http://prdownloads.sourceforge.net/jboss/JBoss-2.4.4_Tomcat-3.2.3.zip.
JBoss/JBoss-2.4.4_Tomcat-4.0.1.zip - The JBoss components source distribution. This is the integrated JBoss/Tomcat-4.0.1 servlet container bundle. Tomcat-4.0.1 is a Servlet 2.3/JSP 1.2 specification compliant servlet container. It is available from http://prdownloads.sourceforge.net/jboss/JBoss-2.4.4_Tomcat-4.0.1.zip.
JBoss/JBoss-2.4.4_Jetty-3.1.3-1.zip - The JBoss components source distribution. This is the integrated JBoss/Jetty-3.1.3-1 servlet container bundle. Jetty-3.1.3-1 is a Servlet 2.2/JSP 1.1 specification compliant servlet container. It is available from http://prdownloads.sourceforge.net/jboss/JBoss-2.4.4_Jetty-3.1.3-1.zip.

R.K
Avatar of myare2004
myare2004

ASKER

Hi there

these links is un relevent to my question.

please try to explain easier way if you can.

you are saying that i need to use AJB connector, which connects apache and tomcat ,but nothing to do with jboss. if it does please explain me step by step how to use it.

please bare in mind that i installed jboss and tomcat in different directory.

URGENT

thank you
So I have to run JBOSS and Tomcat Containers in same JVM. This can be done by using the feature of Embedded Tomcat through which I can configure your JBoss and Tomcat to make them run in a single VM. The JSP/Servlet engine talks natively with the EJB engine resulting in dramatic speed increases.

So please help me how would i set up or gonfigure to run both of them in same VM.

thanks
ASKER CERTIFIED SOLUTION
Avatar of vzilka
vzilka

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dear Vzilka

thank you for ur seggestion, i downloaded Jboss3.0.8_tomcat-4.1.24, I installed path, classpath correctly.
C:\j2sdk1.4.1_03\Jboss3.0.8_tomcat-4.1.24
my problem now is the directory structure is different than one in the only Jboss.
here is directory structure:

C:\j2sdk1.4.03\Jboss3.0.8_tomcat-4.1.24\
bin
client
docs
tomcat-4.1.x
server
lib
it contains only tthese 6 directory
all these directory missing under  root directory
db
deploy
examples
log
src
temp
conf
and most of these are under other directoies
forexamples deploy ,which is very important is under server/all/deploy and other one
server/default/deploy
the database db directory is also same. it is under different directory.
so would please tell me where should i put my servlets and ejb bean files(*.java)
where should i also put ejb-jar.xml file web.xml(deployer descriptors) and jsp, html,image files
please give me clear picture how would i create ejb,servlet,jsp using these technology tomcat-jboss.

thanks


OK. I am happy to hear that it is better now. JBoss has 3 running modes - all, default and minimal. YOu would probably ue default (run JBoss using the run.bat command in the bin directory).
In the server\default\deploy directory place your EAR, WAR and JAR files - and they will be deploy to JBOss and Tomcat automatically.
thank you, that is very clear.
in order to run my application where should i put my files
this is way i done it :
C:\j2sdk1.4.1_03\Jboss3.0.8_tomcat-4.1.24\EJB\FirstEJB\META-INF\*xml
                                                                                   \src\com\ejb\session\*.java(bean)
                                                                             
is right way to do?

I have also no idea where to put servlets and jsp files.
As i told u, i have tomcatC:\j2sdk1.4.1_03\Jboss3.0.8_tomcat-4.1.24\

PLEASE HELP ME OUT THE WHOLE PICTURE OF DIRECTORY STRUCTURE AND WHERE SHOULD I PUT MY EJB SERVLETS JSP FILES>

THANKS AGAIN
OK. There is some mixup here.
THe directory structure of JBoss is a bit complex, but it is not interesting. Meaning - only 2 directories are really imporant:
server\default\deploy (where you place all your deployment files, more on that in a minute) and server\default\conf (configuration information, you usually won't use it).

In the deploy directory you put JAR, WAR and EAR files, and not exploded directories (although this is possible).
The EJB directory you put above should be compressed to a file called MyEJB.jar (or any other file name, but with the JAR extension!!!) and placed inside the default\deploy directory.
Your JSP and servlets should be placed inside a temp directory. All JSPs must be placed in the root directory.
web.xml (a configuration file) should be placed in the WEB-INF sub directory.
servlets and other classes you use must be placed in the WEB-INF\classes sub directory.
All the temp directory should be compressed to a file called MyServlet.war (or any other file name, but with the WAR extension) and placed inside the default\deploy directory.
Your URL would be: http://localhost:8080/MyServlet/ and the name of your JSP file (the url contains the name of the WAR file).
This is more clear.
thank you very much for your time.
well done
if there are any m,ore problem i wiill let u know

thanks again

by myare2004