You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ms...@india-today.com on 2000/04/13 18:55:47 UTC

EJB on Tomcat !!

Hi everybody,

Can we run Enterprise Java Beans on Tomcat ?
If yes, how ?

Thanks in advance,
Manpreet Singh


Re: EJB on Tomcat !!

Posted by Christopher Stacy <cs...@crystaliz.com>.
I have an application parameter value that consists of some XML.
I want to write something like:

      <context-param>
        <param-name>foo</param-name>
        <param-value>"<bar/>"</param-value>
      </context-param>

But when I call app.getInitParameter("foo"), I get back a string of length 1 (one)
containing only a quote (") character.

If I leave out the quotes, and just write:

        <param-value><bar/></param-value>

then I don't get back anything.

What is the XML syntax that I need to use for this kind of thing?


Re: apache_1.3.12+openssl_0.9.5+Tomcat3.0 ?

Posted by Romain Loréal <ro...@fisystem.fr>.
i can't acces your page as my proxy tells me this SSL port is not allowed.

What I meant by "path" is that if you navigate between a http page and a
https page, the session won't be shared.


Re: apache_1.3.12+openssl_0.9.5+Tomcat3.0 ?

Posted by Charles Luo <ch...@allsofts.com>.
hi, Romain,

Thank you for replying me so quick. :-)

What did you mean about the 'path'?
Anyway, you can check it out:

https://212.140.163.235:8887/examples/servlet/SessionExample

Thank you for further comments.

Cheers,
charles

----- Original Message -----
From: "Romain Loréal" <ro...@fisystem.fr>
To: <to...@jakarta.apache.org>
Sent: Friday, April 14, 2000 2:31 PM
Subject: Re: apache_1.3.12+openssl_0.9.5+Tomcat3.0 ?


> I don't what is your path between pages in example, but remember you can't
> share a session between http and https
>
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org


Re: apache_1.3.12+openssl_0.9.5+Tomcat3.0 ?

Posted by Romain Loréal <ro...@fisystem.fr>.
I don't what is your path between pages in example, but remember you can't
share a session between http and https


apache_1.3.12+openssl_0.9.5+Tomcat3.0 ?

Posted by Charles Luo <ch...@allsofts.com>.
hi, guys,

Has anyone tried put three of them
(i.e.apache_1.3.12+openssl_0.9.5+Tomcat3.0 ) working together?

The apache_1.3.12+openssl_0.9.5 combination works fine on my Redhat Linux
6.0, however after instaling the Tomcat3.0, I found that some JSP/Servlet
examples provided by Tomcat Distribution don't work as It is supposed to do.

For example, in the 'Sessions Example', the Session ID and the time this
session is created are not supposed to change every time when you try
different values on the same page, but they did so, and another couple of
examples have the same problem.

However, I also tried those examples in the combination of
Apache_1.3.12+Tomcat3.0, they work properly.

Then, guys, any ideas? Any help or comment would be appreciated.

Charles

---------------

Web Administrator

IT Contractors (www.allsofts.com)





Re: EJB on Tomcat !!

Posted by Peder Pedersen <pe...@caput.dk>.
Hi Guillaume,

Well, you could stuff them into the web.xml web application deployment 
descriptor. Something like:

<web-app>
    <context-param>
        <param-name>java.naming.factory.initial</param-name>
        
<param-value>weblogic.jndi.WLInitialContextFactory</param-value>
    </context-param>
    <context-param>
        <param-name>java.naming.provider.url</param-name>
        <param-value>t3://the.weblogic.server:7001</param-value>
    </context-param>
    ... ETC...

Now, on your JSP page (servlet, front component,...) collect these 
properties into a Properties file:

   java.util.Properties props = new java.util.Properties();
   java.util.Enumeration e = application.getInitParameterNames();
   while (e.hasMoreElements()) {
      String name = (String)e.nextElement();
      String value = application.getInitParameter(name);
      props.setProperty(name, value);
   };

Then you can get the context as: Context context = new 
InitialContext(props);

B.r.
 - Peder

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 4/14/00, 1:29:42 PM, Guillaume Rousse 
<Gu...@univ-reunion.fr> wrote regarding Re: EJB on Tomcat !!:


> Le ven, 14 avr 2000, vous avez écrit :
> > Hi Gary,
> >
> > You can use Tomcat with WebLogic. I see no reason why you shouldn't be
> > able to connect to the J2EE reference implementation.
> > My biggest uncertainty is how you propagate the remote user to the
> > application server. I guess you just add username and password to the
> > InitialContext properties and maintain an access control list on the
> > server, but I don't know if this is standardized. Maybe someone could
> > elaborate on this?
> I did it using a login session Bean, checking login and password in a 
database.
> The login jsp use this beans, and if response is successfull, stores a 
boolean
> true value named isLoggedIn in session object. Every other page look 
in session
> and redirect request if this condition is not met.

> > If you want a more detailed explanation of the connection procedure
> > from e.g. a jsp page to an EJB, drop me a note.
> What interest me rather is how to create an Initial Context with the 
proper
> JNDI parameters, without hard-coding those parameters. When i test my
> applciation within Forte IDE, i got no problems using a 
jndi.properties file
> in my classpath, but that doesn't work under Tomcat.

> Regards
> --
> Guillaume





Re: EJB on Tomcat !!

Posted by Guillaume Rousse <Gu...@univ-reunion.fr>.
Le ven, 14 avr 2000, vous avez �crit :
> Hi Gary,
> 
> You can use Tomcat with WebLogic. I see no reason why you shouldn't be 
> able to connect to the J2EE reference implementation. 
> My biggest uncertainty is how you propagate the remote user to the 
> application server. I guess you just add username and password to the 
> InitialContext properties and maintain an access control list on the 
> server, but I don't know if this is standardized. Maybe someone could 
> elaborate on this?
I did it using a login session Bean, checking login and password in a database.
The login jsp use this beans, and if response is successfull, stores a boolean
true value named isLoggedIn in session object. Every other page look in session
and redirect request if this condition is not met.

> If you want a more detailed explanation of the connection procedure 
> from e.g. a jsp page to an EJB, drop me a note.
What interest me rather is how to create an Initial Context with the proper
JNDI parameters, without hard-coding those parameters. When i test my
applciation within Forte IDE, i got no problems using a jndi.properties file
in my classpath, but that doesn't work under Tomcat.

Regards
--
Guillaume
Original Message :
> 
> On 4/14/00, 12:43:41 PM, Gary Frederick <ga...@jsoft.com> wrote 
> regarding Re: EJB on Tomcat !!:
> 
> 
> > Can we use tomcat 3.1 with J2EE?
> >   or
> > How much work would it be to replace the version in J2EE with tomcat 
> 3.1?
> 
> > Has anyone got that working?
> 
> > Gary
> 
> > Peder Pedersen wrote:
> 
> > > Hi Manpreet,
> > > Tomcat is not an application server so you cannot deploy EJBs in
> > > Tomcat. However, you can certainly use EJBs from Servlets, JSPs,
> > > Interceptors, etc, running within Tomcat (if that is your question).
> > > Create an Initial Context with the proper JNDI parameters, and you
> > > should be able to access your EJBs.
> > >
> > > B.r.
> > >  - Peder
> > >
> > > Original Message dated 4/13/00, 5:55:47 PM
> > > Author: <ms...@india-today.com>
> > > Re: EJB on Tomcat !!:
> > >
> > > Hi everybody,
> > >
> > > Can we run Enterprise Java Beans on Tomcat ?
> > > If yes, how ?
> > >
> > > Thanks in advance,
> > > Manpreet Singh
> > >
> > >
> > > 
> --------------------------------------------------------------------------
> > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> > --
> > gary.frederick@jsoft.com
> > Husband to Susan, Father to Elizabeth
> > Terrapin Station Homeschool
> > ... computers, homeschooling, Friends, Family and God.
> > <http://www.jsoft.com>
> 
> > ><> ><> ><>
> 
> > "some do and some don't"
> >   Eeyore on Romans 12:4-5
> 
> 
> 
> > 
> -----------------------------------------------------------------------
> ---
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
-- 
Guillaume Rousse

Iremia - Universit� de la R�union
15 avenue Ren� Cassin, BP 7151
97715 Saint Denis, messagerie cedex 9
Tel:0262938330 Fax:0262938260 ICQ:10756815

And now, some words for our sponsor :
Explosives, guns, assassination, conspiracy, primers, detonators, Kakadan,
initiators, main charge, nuclear charges, ambush, sniping, motorcade, IRS,
ETA, FARC, Cuba, Castro, Che Guevara, revolution, ATTAC, BATF, jtf-6...


Re: EJB on Tomcat !!

Posted by Peder Pedersen <pe...@caput.dk>.
Hi Gary,

You can use Tomcat with WebLogic. I see no reason why you shouldn't be 
able to connect to the J2EE reference implementation. 
My biggest uncertainty is how you propagate the remote user to the 
application server. I guess you just add username and password to the 
InitialContext properties and maintain an access control list on the 
server, but I don't know if this is standardized. Maybe someone could 
elaborate on this?

If you want a more detailed explanation of the connection procedure 
from e.g. a jsp page to an EJB, drop me a note.

Best regards,
 - Peder


>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 4/14/00, 12:43:41 PM, Gary Frederick <ga...@jsoft.com> wrote 
regarding Re: EJB on Tomcat !!:


> Can we use tomcat 3.1 with J2EE?
>   or
> How much work would it be to replace the version in J2EE with tomcat 
3.1?

> Has anyone got that working?

> Gary

> Peder Pedersen wrote:

> > Hi Manpreet,
> > Tomcat is not an application server so you cannot deploy EJBs in
> > Tomcat. However, you can certainly use EJBs from Servlets, JSPs,
> > Interceptors, etc, running within Tomcat (if that is your question).
> > Create an Initial Context with the proper JNDI parameters, and you
> > should be able to access your EJBs.
> >
> > B.r.
> >  - Peder
> >
> > Original Message dated 4/13/00, 5:55:47 PM
> > Author: <ms...@india-today.com>
> > Re: EJB on Tomcat !!:
> >
> > Hi everybody,
> >
> > Can we run Enterprise Java Beans on Tomcat ?
> > If yes, how ?
> >
> > Thanks in advance,
> > Manpreet Singh
> >
> >
> > 
--------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org

> --
> gary.frederick@jsoft.com
> Husband to Susan, Father to Elizabeth
> Terrapin Station Homeschool
> ... computers, homeschooling, Friends, Family and God.
> <http://www.jsoft.com>

> ><> ><> ><>

> "some do and some don't"
>   Eeyore on Romans 12:4-5



> 
-----------------------------------------------------------------------
---
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org




Re: EJB on Tomcat !!

Posted by Gary Frederick <ga...@jsoft.com>.
Can we use tomcat 3.1 with J2EE?
  or
How much work would it be to replace the version in J2EE with tomcat 3.1?

Has anyone got that working?

Gary

Peder Pedersen wrote:

> Hi Manpreet,
> Tomcat is not an application server so you cannot deploy EJBs in
> Tomcat. However, you can certainly use EJBs from Servlets, JSPs,
> Interceptors, etc, running within Tomcat (if that is your question).
> Create an Initial Context with the proper JNDI parameters, and you
> should be able to access your EJBs.
>
> B.r.
>  - Peder
>
> Original Message dated 4/13/00, 5:55:47 PM
> Author: <ms...@india-today.com>
> Re: EJB on Tomcat !!:
>
> Hi everybody,
>
> Can we run Enterprise Java Beans on Tomcat ?
> If yes, how ?
>
> Thanks in advance,
> Manpreet Singh
>
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

--
gary.frederick@jsoft.com
Husband to Susan, Father to Elizabeth
Terrapin Station Homeschool
... computers, homeschooling, Friends, Family and God.
<http://www.jsoft.com>

><> ><> ><>

"some do and some don't"
  Eeyore on Romans 12:4-5



Re: EJB on Tomcat !!

Posted by Peder Pedersen <pe...@caput.dk>.
Hi Manpreet,
Tomcat is not an application server so you cannot deploy EJBs in 
Tomcat. However, you can certainly use EJBs from Servlets, JSPs, 
Interceptors, etc, running within Tomcat (if that is your question). 
Create an Initial Context with the proper JNDI parameters, and you 
should be able to access your EJBs.

B.r.
 - Peder

Original Message dated 4/13/00, 5:55:47 PM
Author: <ms...@india-today.com>
Re: EJB on Tomcat !!:


Hi everybody,
 
Can we run Enterprise Java Beans on Tomcat ?
If yes, how ?
 
Thanks in advance,
Manpreet Singh