You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by srinivas reddy <sr...@yahoo.com> on 2003/08/21 06:53:52 UTC

classpath issues and system properties

Hi,
I am using tomcat 4.1.24. I have a couple of
questions.

1. Online documentation about class loader says,
System class loader operates on CLASSPATH. I have
included j2ee.jar in my CLASSPATH, but tomcat is not
picking it up. Why is it so?

2. When I use tomcat, system property
"java.naming.factory.initial" is initialized to
"org.apache.naming.java.javaURLContextFactory". Where
did the system pick this property from? How can I 
override this setting? I initialized JNDI context with
environment having "java.naming.factory.initial" as
"com.sun.enterprise.naming.SerialInitContextFactory"
but ultimately 
"org.apache.naming.java.javaURLContextFactory" is set
to "java.naming.factory.initial". How can I avoid
this?

I would appreciate if anybody can help me with these
issues. I am really struggling for a week.

tia,
Srinivas 

=====
I am not afraid of losing. But I don't like it.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: classpath issues and system properties

Posted by Justin Ruthenbeck <ju...@nextengine.com>.
At 08:48 AM 8/21/2003, you wrote:
> > > 1. Online documentation about class loader says,
> > > System class loader operates on CLASSPATH. I have
> > > included j2ee.jar in my CLASSPATH, but tomcat is
> > not
> > > picking it up. Why is it so?
> >
> > Wherever you saw these docs, they are wrong.  Tomcat
> > ignores the CLASSPATH
> > variable.
>
>I found this documentation at
>http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html.
>Did I misunderstand it or it says what I am thinking?

What it says is that the System Classloader loads classes from the 
classpath.  This is true.  HOWEVER, Tomcat out-of-the-box ignores whatever 
you set for the CLASSPATH env variable and builds it from scratch in it's 
stratup scripts.  This behavior was not an accident in Tomcat's 
development.  Don't mess with it unless you're fully aware of why and how 
Tomcat's classloaders work the way they do.

STFA for more info on this.

justin

____________________________________
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
    See http://www.nextengine.com/confidentiality.php
____________________________________


Re: Knowing SSL and HTTP port

Posted by John Turner <to...@johnturner.com>.
Madhu Vadlapudi wrote:

> I have a doubt regarding accessing the SSL port. Actually how do my JSP 
> application will know whether webserver having the capabilities of SSL request. 
> If it has, how do u i know the port of the service (suppose if i am in http 
> scheme, then want to shift to https scheme, like want to redirect a page to 
> https ). This may not be correct place to ask this question, but i thought 
> related to tomcat stuff.

In general, your code has nothing to do with SSL.  SSL is a transport 
layer protocol and is transparent to an application.  The SSL stuff is 
handled by the browser and the web server, not by any of your code.

Whether something is SSL or not, assuming no port is specified on the 
URL, is determined by the use of "http://" or "https://" in the URL. 
When in SSL-mode (https://) the browser will pre-pend 
"https://some-other-stuff" to every relative link in your pages.  If you 
want to switch from HTTPS to HTTP, then you need to put an absolute link 
in your page, and vice versa.

> One more doubt, in conf/web.xml i have specified the file-list order as 
> jsp,html and htm. But when i am trying to give my url as 
> http://localhost:8080/mywebapp, it should pick up index.jsp, if it exists , but 
> it is directly going to index.html page. What might be the problem. I am using 
> 3.2 under Tru64 unix.

Check out <welcome-file>.

John




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Knowing SSL and HTTP port

Posted by John Turner <to...@johnturner.com>.
Madhu Vadlapudi wrote:

> I have a doubt regarding accessing the SSL port. Actually how do my JSP 
> application will know whether webserver having the capabilities of SSL request. 
> If it has, how do u i know the port of the service (suppose if i am in http 
> scheme, then want to shift to https scheme, like want to redirect a page to 
> https ). This may not be correct place to ask this question, but i thought 
> related to tomcat stuff.

In general, your code has nothing to do with SSL.  SSL is a transport 
layer protocol and is transparent to an application.  The SSL stuff is 
handled by the browser and the web server, not by any of your code.

Whether something is SSL or not, assuming no port is specified on the 
URL, is determined by the use of "http://" or "https://" in the URL. 
When in SSL-mode (https://) the browser will pre-pend 
"https://some-other-stuff" to every relative link in your pages.  If you 
want to switch from HTTPS to HTTP, then you need to put an absolute link 
in your page, and vice versa.

> One more doubt, in conf/web.xml i have specified the file-list order as 
> jsp,html and htm. But when i am trying to give my url as 
> http://localhost:8080/mywebapp, it should pick up index.jsp, if it exists , but 
> it is directly going to index.html page. What might be the problem. I am using 
> 3.2 under Tru64 unix.

Check out <welcome-file>.

John




Knowing SSL and HTTP port

Posted by Madhu Vadlapudi <vm...@isac.ernet.in>.
Hello friends,

I have a doubt regarding accessing the SSL port. Actually how do my JSP 
application will know whether webserver having the capabilities of SSL request. 
If it has, how do u i know the port of the service (suppose if i am in http 
scheme, then want to shift to https scheme, like want to redirect a page to 
https ). This may not be correct place to ask this question, but i thought 
related to tomcat stuff.

One more doubt, in conf/web.xml i have specified the file-list order as 
jsp,html and htm. But when i am trying to give my url as 
http://localhost:8080/mywebapp, it should pick up index.jsp, if it exists , but 
it is directly going to index.html page. What might be the problem. I am using 
3.2 under Tru64 unix.

Any help, thanks in advance..

Madhu


Knowing SSL and HTTP port

Posted by Madhu Vadlapudi <vm...@isac.ernet.in>.
Hello friends,

I have a doubt regarding accessing the SSL port. Actually how do my JSP 
application will know whether webserver having the capabilities of SSL request. 
If it has, how do u i know the port of the service (suppose if i am in http 
scheme, then want to shift to https scheme, like want to redirect a page to 
https ). This may not be correct place to ask this question, but i thought 
related to tomcat stuff.

One more doubt, in conf/web.xml i have specified the file-list order as 
jsp,html and htm. But when i am trying to give my url as 
http://localhost:8080/mywebapp, it should pick up index.jsp, if it exists , but 
it is directly going to index.html page. What might be the problem. I am using 
3.2 under Tru64 unix.

Any help, thanks in advance..

Madhu


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: classpath issues and system properties

Posted by srinivas reddy <sr...@yahoo.com>.
--- Bill Barker <wb...@wilshire.com> wrote:
> 
> "srinivas reddy" <sr...@yahoo.com> wrote
> in message
>
news:20030821045352.63861.qmail@web20416.mail.yahoo.com...
> > Hi,
> > I am using tomcat 4.1.24. I have a couple of
> > questions.
> >
> > 1. Online documentation about class loader says,
> > System class loader operates on CLASSPATH. I have
> > included j2ee.jar in my CLASSPATH, but tomcat is
> not
> > picking it up. Why is it so?
> 
> Wherever you saw these docs, they are wrong.  Tomcat
> ignores the CLASSPATH
> variable. 

I found this documentation at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html.
Did I misunderstand it or it says what I am thinking?
> And, in any case, trying to use j2ee.jar
> with Tomcat is pure evil
> ;-).  Just install the components that you need, and
> you may finish your
> project in finite time :).
>

Why is using j2ee.jar with tomcat is not recommended?
Is there any resource explaining what can go wrong? 

> >
> > 2. When I use tomcat, system property
> > "java.naming.factory.initial" is initialized to
> > "org.apache.naming.java.javaURLContextFactory".
> Where
> > did the system pick this property from? How can I
> > override this setting? I initialized JNDI context
> with
> > environment having "java.naming.factory.initial"
> as
> >
> "com.sun.enterprise.naming.SerialInitContextFactory"
> > but ultimately
> > "org.apache.naming.java.javaURLContextFactory" is
> set
> > to "java.naming.factory.initial". How can I avoid
> > this?
> 
> I don't believe that you can avoid it (without
> looking more deeply into the
> code than I care to do at the moment).  And, even if
> you could, the likely
> result is that Tomcat would lay on it's back, point
> it's toes in the air,
> and die.
> 
> >
> > I would appreciate if anybody can help me with
> these
> > issues. I am really struggling for a week.
> >
> > tia,
> > Srinivas
> >
> > =====
> > I am not afraid of losing. But I don't like it.
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.yahoo.com
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 


=====
I am not afraid of losing. But I don't like it.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: classpath issues and system properties

Posted by srinivas reddy <sr...@yahoo.com>.
--- Bill Barker <wb...@wilshire.com> wrote:
> 
> "srinivas reddy" <sr...@yahoo.com> wrote
> in message
>
news:20030821045352.63861.qmail@web20416.mail.yahoo.com...
> > Hi,
> > I am using tomcat 4.1.24. I have a couple of
> > questions.
> >
> > 1. Online documentation about class loader says,
> > System class loader operates on CLASSPATH. I have
> > included j2ee.jar in my CLASSPATH, but tomcat is
> not
> > picking it up. Why is it so?
> 
> Wherever you saw these docs, they are wrong.  Tomcat
> ignores the CLASSPATH
> variable. 

I found this documentation at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html.
Did I misunderstand it or it says what I am thinking?
> And, in any case, trying to use j2ee.jar
> with Tomcat is pure evil
> ;-).  Just install the components that you need, and
> you may finish your
> project in finite time :).
>

Why is using j2ee.jar with tomcat is not recommended?
Is there any resource explaining what can go wrong? 

> >
> > 2. When I use tomcat, system property
> > "java.naming.factory.initial" is initialized to
> > "org.apache.naming.java.javaURLContextFactory".
> Where
> > did the system pick this property from? How can I
> > override this setting? I initialized JNDI context
> with
> > environment having "java.naming.factory.initial"
> as
> >
> "com.sun.enterprise.naming.SerialInitContextFactory"
> > but ultimately
> > "org.apache.naming.java.javaURLContextFactory" is
> set
> > to "java.naming.factory.initial". How can I avoid
> > this?
> 
> I don't believe that you can avoid it (without
> looking more deeply into the
> code than I care to do at the moment).  And, even if
> you could, the likely
> result is that Tomcat would lay on it's back, point
> it's toes in the air,
> and die.
> 
> >
> > I would appreciate if anybody can help me with
> these
> > issues. I am really struggling for a week.
> >
> > tia,
> > Srinivas
> >
> > =====
> > I am not afraid of losing. But I don't like it.
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.yahoo.com
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 


=====
I am not afraid of losing. But I don't like it.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Re: classpath issues and system properties

Posted by Bill Barker <wb...@wilshire.com>.
"srinivas reddy" <sr...@yahoo.com> wrote in message
news:20030821045352.63861.qmail@web20416.mail.yahoo.com...
> Hi,
> I am using tomcat 4.1.24. I have a couple of
> questions.
>
> 1. Online documentation about class loader says,
> System class loader operates on CLASSPATH. I have
> included j2ee.jar in my CLASSPATH, but tomcat is not
> picking it up. Why is it so?

Wherever you saw these docs, they are wrong.  Tomcat ignores the CLASSPATH
variable.  And, in any case, trying to use j2ee.jar with Tomcat is pure evil
;-).  Just install the components that you need, and you may finish your
project in finite time :).

>
> 2. When I use tomcat, system property
> "java.naming.factory.initial" is initialized to
> "org.apache.naming.java.javaURLContextFactory". Where
> did the system pick this property from? How can I
> override this setting? I initialized JNDI context with
> environment having "java.naming.factory.initial" as
> "com.sun.enterprise.naming.SerialInitContextFactory"
> but ultimately
> "org.apache.naming.java.javaURLContextFactory" is set
> to "java.naming.factory.initial". How can I avoid
> this?

I don't believe that you can avoid it (without looking more deeply into the
code than I care to do at the moment).  And, even if you could, the likely
result is that Tomcat would lay on it's back, point it's toes in the air,
and die.

>
> I would appreciate if anybody can help me with these
> issues. I am really struggling for a week.
>
> tia,
> Srinivas
>
> =====
> I am not afraid of losing. But I don't like it.
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: classpath issues and system properties

Posted by Bill Barker <wb...@wilshire.com>.
"srinivas reddy" <sr...@yahoo.com> wrote in message
news:20030821045352.63861.qmail@web20416.mail.yahoo.com...
> Hi,
> I am using tomcat 4.1.24. I have a couple of
> questions.
>
> 1. Online documentation about class loader says,
> System class loader operates on CLASSPATH. I have
> included j2ee.jar in my CLASSPATH, but tomcat is not
> picking it up. Why is it so?

Wherever you saw these docs, they are wrong.  Tomcat ignores the CLASSPATH
variable.  And, in any case, trying to use j2ee.jar with Tomcat is pure evil
;-).  Just install the components that you need, and you may finish your
project in finite time :).

>
> 2. When I use tomcat, system property
> "java.naming.factory.initial" is initialized to
> "org.apache.naming.java.javaURLContextFactory". Where
> did the system pick this property from? How can I
> override this setting? I initialized JNDI context with
> environment having "java.naming.factory.initial" as
> "com.sun.enterprise.naming.SerialInitContextFactory"
> but ultimately
> "org.apache.naming.java.javaURLContextFactory" is set
> to "java.naming.factory.initial". How can I avoid
> this?

I don't believe that you can avoid it (without looking more deeply into the
code than I care to do at the moment).  And, even if you could, the likely
result is that Tomcat would lay on it's back, point it's toes in the air,
and die.

>
> I would appreciate if anybody can help me with these
> issues. I am really struggling for a week.
>
> tia,
> Srinivas
>
> =====
> I am not afraid of losing. But I don't like it.
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com