You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Keith Ng <wo...@yahoo.com> on 2002/02/14 13:38:18 UTC

J2EE and Tomcat

Hi Guys

I just joined in, Happy Chinese New Year, esp to the all the Chinese here.

I have the following query, its not exactly a TOMCAT question but I figured
people here can help. I have installed J2EE and have previously used TOMCAT.
Therefore I have the following queries....

1)There are many versions of TOMCAT, but Im only using a pretty old version,
like 3.2.2. I want to try run my web application on a J2EE server. Are both
J2EE and TOMCAT using the same specifications for JSP and SERVLETS?
Currently using J2EE 1.3 ...

2)Am I supposed to continue using TOMCAT to develop web applications for
deployment in J2EE? I certainly do not know how to do the same with J2EE
what I have learnt with TOMCAT

Hope someone can enlighten me. Thanks ;)



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: J2EE and Tomcat

Posted by Keith Ng <wo...@yahoo.com>.
LOL.... Im pretty fascinated... just read the archieve at
http://www.apachelabs.org/tomcat-user/200202.mbox/%3c3C6A9855.D93CBA66@veriz
on.net%3e yes... we have roughly the same question, and same name! :)

Hopefully someone answers our question asap.... =/

-----Original Message-----
From: root@radius01.radiusresearch.org
[mailto:root@radius01.radiusresearch.org]On Behalf Of Keith Simpson
Sent: Thursday, February 14, 2002 9:00 PM
To: Tomcat Users List
Subject: Re: J2EE and Tomcat


How very ironic - we have the same name - and we have the same
question!  I put mine out yesterday.  Is this a parallel universe or
something?  I am running 3.3 tomcat on my dev platform and need to use
javamail.  (which can be picked up separately or in j2ee)  We are
developing a new product with JSP (used to be all servlets) and I find
that there is a problem when it comes to compiling the JSP when I
replace servlet.jar with j2ee.jar  Otherwise, I believe it works just
fine.  (that's a big stumbling block)  I am wondering if I am going to
need to go to tomcat 4 - or what - to get around this one.  My issue
with 4 is that I will have to migrate it to my production environment
(apache/tomcat), and that we resell to others with all sorts of app
servers.

I will be watching for your replies to this one...


Keith Ng wrote:
>
> Hi Guys
>
> I just joined in, Happy Chinese New Year, esp to the all the Chinese here.
>
> I have the following query, its not exactly a TOMCAT question but I
figured
> people here can help. I have installed J2EE and have previously used
TOMCAT.
> Therefore I have the following queries....
>
> 1)There are many versions of TOMCAT, but Im only using a pretty old
version,
> like 3.2.2. I want to try run my web application on a J2EE server. Are
both
> J2EE and TOMCAT using the same specifications for JSP and SERVLETS?
> Currently using J2EE 1.3 ...
>
> 2)Am I supposed to continue using TOMCAT to develop web applications for
> deployment in J2EE? I certainly do not know how to do the same with J2EE
> what I have learnt with TOMCAT
>
> Hope someone can enlighten me. Thanks ;)
>
> _________________________________________________________
>
> Do You Yahoo!?
>
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: J2EE and Tomcat

Posted by Keith Simpson <k....@verizon.net>.
Yaaay!  Finally an answer!  Thanks Craig.  I knew that substituting jars
was not kosher, but I love to experiment.   The approach actually worked
6 months ago when I was experimenting with implementing mail on my TC
3.2 server.  I would "never,never,never" go to production with such a
hair brained scheme!   I thought I had seen somewhere that TC 4.0x was
J2EE 1.3, but could not "refind" that information.

I was aware I could get javamail and that there was some extension (must
be the one of which you speak) to use the mail tags in jakarta-taglib. 
The link specified in the taglib docs was dead - I assumed that sun just
decided to wrap it all up into j2ee.

once again, many thanks.


"Craig R. McClanahan" wrote:
> 
> On Thu, 14 Feb 2002, Keith Simpson wrote:
> 
> > Date: Thu, 14 Feb 2002 08:00:04 -0500
> > From: Keith Simpson <k....@verizon.net>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: Re: J2EE and Tomcat
> >
> > How very ironic - we have the same name - and we have the same
> > question!  I put mine out yesterday.  Is this a parallel universe or
> > something?  I am running 3.3 tomcat on my dev platform and need to use
> > javamail.  (which can be picked up separately or in j2ee)  We are
> > developing a new product with JSP (used to be all servlets) and I find
> > that there is a problem when it comes to compiling the JSP when I
> > replace servlet.jar with j2ee.jar  Otherwise, I believe it works just
> > fine.  (that's a big stumbling block)  I am wondering if I am going to
> > need to go to tomcat 4 - or what - to get around this one.  My issue
> > with 4 is that I will have to migrate it to my production environment
> > (apache/tomcat), and that we resell to others with all sorts of app
> > servers.
> >
> 
> Never ever ever ever should you be replacing system JAR files like that!
> The j2ee.jar file from the J2EE RI includes a version of Tomcat already,
> so you are just duplicating a whole bunch of classes and it is
> going to cause runtime conflicts.
> 
> If you just need JavaMail, the smart thing to do would be to go download
> JavaMail and add the appropriate JARs to Tomcat
> <http://java.sun.com/products/javamail.html>.  You will also need the Java
> Activation Framework package -- a link is provided on this page.
> 
> Tomcat 4 releases include the JavaMail and JAF jar files already.
> 
> Craig
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: J2EE and Tomcat

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 14 Feb 2002, Keith Simpson wrote:

> Date: Thu, 14 Feb 2002 08:00:04 -0500
> From: Keith Simpson <k....@verizon.net>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: J2EE and Tomcat
>
> How very ironic - we have the same name - and we have the same
> question!  I put mine out yesterday.  Is this a parallel universe or
> something?  I am running 3.3 tomcat on my dev platform and need to use
> javamail.  (which can be picked up separately or in j2ee)  We are
> developing a new product with JSP (used to be all servlets) and I find
> that there is a problem when it comes to compiling the JSP when I
> replace servlet.jar with j2ee.jar  Otherwise, I believe it works just
> fine.  (that's a big stumbling block)  I am wondering if I am going to
> need to go to tomcat 4 - or what - to get around this one.  My issue
> with 4 is that I will have to migrate it to my production environment
> (apache/tomcat), and that we resell to others with all sorts of app
> servers.
>

Never ever ever ever should you be replacing system JAR files like that!
The j2ee.jar file from the J2EE RI includes a version of Tomcat already,
so you are just duplicating a whole bunch of classes and it is
going to cause runtime conflicts.

If you just need JavaMail, the smart thing to do would be to go download
JavaMail and add the appropriate JARs to Tomcat
<http://java.sun.com/products/javamail.html>.  You will also need the Java
Activation Framework package -- a link is provided on this page.

Tomcat 4 releases include the JavaMail and JAF jar files already.

Craig


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: J2EE and Tomcat

Posted by Keith Simpson <k....@verizon.net>.
How very ironic - we have the same name - and we have the same
question!  I put mine out yesterday.  Is this a parallel universe or
something?  I am running 3.3 tomcat on my dev platform and need to use
javamail.  (which can be picked up separately or in j2ee)  We are
developing a new product with JSP (used to be all servlets) and I find
that there is a problem when it comes to compiling the JSP when I
replace servlet.jar with j2ee.jar  Otherwise, I believe it works just
fine.  (that's a big stumbling block)  I am wondering if I am going to
need to go to tomcat 4 - or what - to get around this one.  My issue
with 4 is that I will have to migrate it to my production environment
(apache/tomcat), and that we resell to others with all sorts of app
servers.

I will be watching for your replies to this one...


Keith Ng wrote:
> 
> Hi Guys
> 
> I just joined in, Happy Chinese New Year, esp to the all the Chinese here.
> 
> I have the following query, its not exactly a TOMCAT question but I figured
> people here can help. I have installed J2EE and have previously used TOMCAT.
> Therefore I have the following queries....
> 
> 1)There are many versions of TOMCAT, but Im only using a pretty old version,
> like 3.2.2. I want to try run my web application on a J2EE server. Are both
> J2EE and TOMCAT using the same specifications for JSP and SERVLETS?
> Currently using J2EE 1.3 ...
> 
> 2)Am I supposed to continue using TOMCAT to develop web applications for
> deployment in J2EE? I certainly do not know how to do the same with J2EE
> what I have learnt with TOMCAT
> 
> Hope someone can enlighten me. Thanks ;)
> 
> _________________________________________________________
> 
> Do You Yahoo!?
> 
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: J2EE and Tomcat

Posted by Keith Ng <wo...@yahoo.com>.
Nice to see u reply again...

I have made a WAR file and tried to create a new Web Componet by adding a
new WAR file, unfortunately tat doesnt work very well... well anwyay i have
given up all hope of using the J2EE RI. I will just stick to TOMCAT and just
wondering, is JavaMail separately available from sun..? Its a very important
feature in J2EE i need to use and now i have given up usage of J2EE RI, i
guess i will have to download it separately..

-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@apache.org]
Sent: Sunday, February 17, 2002 12:55 AM
To: Keith Ng
Cc: Tomcat Users List
Subject: RE: J2EE and Tomcat




On Sat, 16 Feb 2002, Keith Ng wrote:

> Date: Sat, 16 Feb 2002 14:08:50 +0800
> From: Keith Ng <wo...@yahoo.com>
> To: Craig R. McClanahan <cr...@apache.org>,
>      Tomcat Users List <to...@jakarta.apache.org>
> Subject: RE: J2EE and Tomcat
>
> Hi Craig
>
> I saw yr very reasonable explaination and have understood a lot more den i
> used to. Thanks... =)
>
> However, I have tried to deploy my Tomcat application using J2EE server
like
> the one provided by SUN. I tried two methods. One by moving the entire
> folder to public_html and also by trying to deploy. Both methods doesnt
> works when it comes to locating certain javabean classes i placed under
> web-inf-->classes-->FOLDER.(not EJB) ... wat seems to work just fine
doesnt
> seem to work at all in J2EE. I do not think therefore I can develop using
> tomcat and deploy using a J2EE server.
>

When you use Tomcat, you have to deploy applications the way that Tomcat
tells you to.  When you use any other server, you have to deploy
applications the way that *that* documentation tells you to.  You cannot
make any assumptions about "just because Tomcat does it that way" on these
kinds of mechanics.

The only thing that is guaranteed to be portable is a WAR file (not a
directory), in the correct internal format, that contains *all* of the
classes you need in WEB-INF/classes or WEB-INF/lib.  What you are
describing for directory structure isn't valid Java, so it's not going to
work on any container.

Craig

> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> Sent: Friday, February 15, 2002 1:03 AM
> To: Tomcat Users List; woonbock@yahoo.com
> Subject: Re: J2EE and Tomcat
>
>
>
>
> On Thu, 14 Feb 2002, Keith Ng wrote:
>
> > Date: Thu, 14 Feb 2002 20:38:18 +0800
> > From: Keith Ng <wo...@yahoo.com>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>,
> >      woonbock@yahoo.com
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: J2EE and Tomcat
> >
> > Hi Guys
> >
> > I just joined in, Happy Chinese New Year, esp to the all the Chinese
here.
> >
> > I have the following query, its not exactly a TOMCAT question but I
> figured
> > people here can help. I have installed J2EE and have previously used
> TOMCAT.
> > Therefore I have the following queries....
> >
> > 1)There are many versions of TOMCAT, but Im only using a pretty old
> version,
> > like 3.2.2. I want to try run my web application on a J2EE server. Are
> both
> > J2EE and TOMCAT using the same specifications for JSP and SERVLETS?
> > Currently using J2EE 1.3 ...
> >
>
> Tomcat 3.2 (and 3.3) are based on the Sevlet 2.2 and JSP 1.1
> specifications (these match up with J2EE 1.2).
>
> Tomcat 4.0 is based on the Servlet 2.3 and JSP 1.2 specifications, which
> are the versions included in J2EE 1.3.  In general these specs are
> backwards compatible so that your older webapps will still run.
>
> > 2)Am I supposed to continue using TOMCAT to develop web applications for
> > deployment in J2EE? I certainly do not know how to do the same with J2EE
> > what I have learnt with TOMCAT
> >
>
> If your applications don't require EJBs, it is very reasonable to do your
> development under Tomcat and then deploy on a J2EE server.  Just be sure
> you don't rely on Tomcat-specific features in your applications.
>
> > Hope someone can enlighten me. Thanks ;)
> >
> >
>
> Craig
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: J2EE and Tomcat

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Sat, 16 Feb 2002, Keith Ng wrote:

> Date: Sat, 16 Feb 2002 14:08:50 +0800
> From: Keith Ng <wo...@yahoo.com>
> To: Craig R. McClanahan <cr...@apache.org>,
>      Tomcat Users List <to...@jakarta.apache.org>
> Subject: RE: J2EE and Tomcat
>
> Hi Craig
>
> I saw yr very reasonable explaination and have understood a lot more den i
> used to. Thanks... =)
>
> However, I have tried to deploy my Tomcat application using J2EE server like
> the one provided by SUN. I tried two methods. One by moving the entire
> folder to public_html and also by trying to deploy. Both methods doesnt
> works when it comes to locating certain javabean classes i placed under
> web-inf-->classes-->FOLDER.(not EJB) ... wat seems to work just fine doesnt
> seem to work at all in J2EE. I do not think therefore I can develop using
> tomcat and deploy using a J2EE server.
>

When you use Tomcat, you have to deploy applications the way that Tomcat
tells you to.  When you use any other server, you have to deploy
applications the way that *that* documentation tells you to.  You cannot
make any assumptions about "just because Tomcat does it that way" on these
kinds of mechanics.

The only thing that is guaranteed to be portable is a WAR file (not a
directory), in the correct internal format, that contains *all* of the
classes you need in WEB-INF/classes or WEB-INF/lib.  What you are
describing for directory structure isn't valid Java, so it's not going to
work on any container.

Craig

> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> Sent: Friday, February 15, 2002 1:03 AM
> To: Tomcat Users List; woonbock@yahoo.com
> Subject: Re: J2EE and Tomcat
>
>
>
>
> On Thu, 14 Feb 2002, Keith Ng wrote:
>
> > Date: Thu, 14 Feb 2002 20:38:18 +0800
> > From: Keith Ng <wo...@yahoo.com>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>,
> >      woonbock@yahoo.com
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > Subject: J2EE and Tomcat
> >
> > Hi Guys
> >
> > I just joined in, Happy Chinese New Year, esp to the all the Chinese here.
> >
> > I have the following query, its not exactly a TOMCAT question but I
> figured
> > people here can help. I have installed J2EE and have previously used
> TOMCAT.
> > Therefore I have the following queries....
> >
> > 1)There are many versions of TOMCAT, but Im only using a pretty old
> version,
> > like 3.2.2. I want to try run my web application on a J2EE server. Are
> both
> > J2EE and TOMCAT using the same specifications for JSP and SERVLETS?
> > Currently using J2EE 1.3 ...
> >
>
> Tomcat 3.2 (and 3.3) are based on the Sevlet 2.2 and JSP 1.1
> specifications (these match up with J2EE 1.2).
>
> Tomcat 4.0 is based on the Servlet 2.3 and JSP 1.2 specifications, which
> are the versions included in J2EE 1.3.  In general these specs are
> backwards compatible so that your older webapps will still run.
>
> > 2)Am I supposed to continue using TOMCAT to develop web applications for
> > deployment in J2EE? I certainly do not know how to do the same with J2EE
> > what I have learnt with TOMCAT
> >
>
> If your applications don't require EJBs, it is very reasonable to do your
> development under Tomcat and then deploy on a J2EE server.  Just be sure
> you don't rely on Tomcat-specific features in your applications.
>
> > Hope someone can enlighten me. Thanks ;)
> >
> >
>
> Craig
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: J2EE and Tomcat

Posted by Keith Ng <wo...@yahoo.com>.
Hi Craig

I saw yr very reasonable explaination and have understood a lot more den i
used to. Thanks... =)

However, I have tried to deploy my Tomcat application using J2EE server like
the one provided by SUN. I tried two methods. One by moving the entire
folder to public_html and also by trying to deploy. Both methods doesnt
works when it comes to locating certain javabean classes i placed under
web-inf-->classes-->FOLDER.(not EJB) ... wat seems to work just fine doesnt
seem to work at all in J2EE. I do not think therefore I can develop using
tomcat and deploy using a J2EE server.

-----Original Message-----
From: Craig R. McClanahan [mailto:craigmcc@apache.org]
Sent: Friday, February 15, 2002 1:03 AM
To: Tomcat Users List; woonbock@yahoo.com
Subject: Re: J2EE and Tomcat




On Thu, 14 Feb 2002, Keith Ng wrote:

> Date: Thu, 14 Feb 2002 20:38:18 +0800
> From: Keith Ng <wo...@yahoo.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>,
>      woonbock@yahoo.com
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: J2EE and Tomcat
>
> Hi Guys
>
> I just joined in, Happy Chinese New Year, esp to the all the Chinese here.
>
> I have the following query, its not exactly a TOMCAT question but I
figured
> people here can help. I have installed J2EE and have previously used
TOMCAT.
> Therefore I have the following queries....
>
> 1)There are many versions of TOMCAT, but Im only using a pretty old
version,
> like 3.2.2. I want to try run my web application on a J2EE server. Are
both
> J2EE and TOMCAT using the same specifications for JSP and SERVLETS?
> Currently using J2EE 1.3 ...
>

Tomcat 3.2 (and 3.3) are based on the Sevlet 2.2 and JSP 1.1
specifications (these match up with J2EE 1.2).

Tomcat 4.0 is based on the Servlet 2.3 and JSP 1.2 specifications, which
are the versions included in J2EE 1.3.  In general these specs are
backwards compatible so that your older webapps will still run.

> 2)Am I supposed to continue using TOMCAT to develop web applications for
> deployment in J2EE? I certainly do not know how to do the same with J2EE
> what I have learnt with TOMCAT
>

If your applications don't require EJBs, it is very reasonable to do your
development under Tomcat and then deploy on a J2EE server.  Just be sure
you don't rely on Tomcat-specific features in your applications.

> Hope someone can enlighten me. Thanks ;)
>
>

Craig



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: J2EE and Tomcat

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 14 Feb 2002, Keith Ng wrote:

> Date: Thu, 14 Feb 2002 20:38:18 +0800
> From: Keith Ng <wo...@yahoo.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>,
>      woonbock@yahoo.com
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: J2EE and Tomcat
>
> Hi Guys
>
> I just joined in, Happy Chinese New Year, esp to the all the Chinese here.
>
> I have the following query, its not exactly a TOMCAT question but I figured
> people here can help. I have installed J2EE and have previously used TOMCAT.
> Therefore I have the following queries....
>
> 1)There are many versions of TOMCAT, but Im only using a pretty old version,
> like 3.2.2. I want to try run my web application on a J2EE server. Are both
> J2EE and TOMCAT using the same specifications for JSP and SERVLETS?
> Currently using J2EE 1.3 ...
>

Tomcat 3.2 (and 3.3) are based on the Sevlet 2.2 and JSP 1.1
specifications (these match up with J2EE 1.2).

Tomcat 4.0 is based on the Servlet 2.3 and JSP 1.2 specifications, which
are the versions included in J2EE 1.3.  In general these specs are
backwards compatible so that your older webapps will still run.

> 2)Am I supposed to continue using TOMCAT to develop web applications for
> deployment in J2EE? I certainly do not know how to do the same with J2EE
> what I have learnt with TOMCAT
>

If your applications don't require EJBs, it is very reasonable to do your
development under Tomcat and then deploy on a J2EE server.  Just be sure
you don't rely on Tomcat-specific features in your applications.

> Hope someone can enlighten me. Thanks ;)
>
>

Craig


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>