Protecting static content

2002-01-12 Thread E B

Hi
I want to protect static content in a webapp from
un-authenticated access. Is this possible?

thanks, eb.
PS: The archives at archive.covalent.net are not
searchable.

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Periodically Refresh Application Bean?

2002-01-12 Thread Tom Drake

Rick:

There is no need to restart Tomcat just update the 
data stored in your bean.

You could provide a jsp or servlet that maps the input
parameter names / values to setter methods in your 
application bean. Then your external process simply 
needs to send a URL GET (or POST) request with 
the new data.

Alternatively, you could write a class that implements 
ServletContextListener and that also implements Runnable. 
This class could start itself in a new thread in the 
contextInitialized() method. The run() method could wake 
up every now and then and go and get the 'updated' data
you need, then update your Application scope bean.
Don't forget to provide the means to stop your thread in 
the contextDestroyed() method.

The 2.3 Servlet spec features really provide elegant
ways of solving many of the problems that required 
container specific hacks in earlier spec versions.

Good Luck

Tom Drake
- Original Message - 
From: "Rick Roberts" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 12:52 PM
Subject: Periodically Refresh Application Bean?


| I have an application that has a bean with application scope.
| I would like to run a cron job once a day to refresh the data in this 
| bean.  It would be nice if I did not have to restart Tomcat everytime. 
| Anyone know how I could do this?
| 
| Thanks,
| 
| -- 
| ***
| * Rick Roberts*
| * Advanced Information Technologies, Inc. *
| ***
| 
| 
| --
| To unsubscribe:   
| For additional commands: 
| Troubles with the list: 
| 
| 
| 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




new to java, apache and tomcat.. but I want to learn!

2002-01-12 Thread Donald Lee

I have successfully installed Tomcat on a Linux Mandrake box.  All appears 
to be working with the default page up and running.  I am new to this whole 
Tomcat JSP/Servlet thingy and want to get up and running.  I have been on 
the java.sun.com tutorials for the java language and all that, but I want to 
dig into something and see it work on the server.  I am looking for sample 
code to disect and fiddle with.  I find I learn better that way if I can see 
how something was done.  I am currently looking at the examples in the 
default installation but not really finding what I am looking for.  I would 
like to start with something simple but actually usable like a guest book 
program or a message board.  The code doesn't even need to work, just point 
me in the right direction.  I plan to keep going with this in the best way I 
can.
Thanks


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: TC 4.0.1/SAXParserFactory.newInstance() error

2002-01-12 Thread George Shafik


I encountered something similar with building Tomcat 3.2.4. It appears that
it used "relative paths" to find jar files. Keep in mind these relative
paths are based on what you have set the following environment variables to
JAKARTA_HOME, JAVA_HOME and ANT_HOME. You will find the CRIMSON.jar and
JAXP.jar created for you when you use Jakart-ant. Copy these files to the
location its looking for them when you do your Tomcat build.


- Original Message -
From: "Mark" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Sunday, January 13, 2002 8:30 AM
Subject: Re: TC 4.0.1/SAXParserFactory.newInstance() error


> I thought CLASSPATH isn't used for locating jars in TC 4.0?  In any case,
I
> do use the startup scripts that come with Tomcat and was already through
> step 3 of your suggestions when I originally posted the question (eg. no
> jaxp/crimson available in any Tomcat or $JAVA_HOME directories, and The TC
> version of xerces.jar in common/lib).  To answer your question, no my app
> isn't bundling xerces or crimson.
>
> I'm not sure why this exception is being thrown to begin with...
>
>
> At 12:09 AM 1/13/2002 +0530, you wrote:
> >Hi,
> >
> >Looks like there's may be another copy of the Jaxp classes somewhere in
> the classpath..Please try the following:
> >
> >1. Use the startup scripts that come with tomcat 4.0.1. These unset the
> CLASSPATH environment variables and crete custom variables for
> >Tomcat's startup.
> >
> >2.Check to see if you're having any older Xerces or (Crimson+Jaxp) jars
> files in $JAVA_HOME/lib/ext
> >
> >3. Remove all instances of the files xerces.jar, parser.jar, crimson.jar
> and jaxp.jar from where ever you have placed them in the $CATALINA_HOME
> >sub directories.
> > Having done that, place a copy of xerces.jar in
$CATALINA_HOME/common/lib
> > The xerces.jar file that comes with tomcat 4.0.1 is 1.72 MB in size
> (1,808,883 bytes)
> >
> >4. Just a question, is your app also bundling Xerces/crimson ? Look for
> the jars in the WIB-INF/lib sub-directory.
> >
> >
> >Sriram
> >
> >1/12/02 11:17:36 PM, Mark <[EMAIL PROTECTED]> wrote:
> >
> >>I'm attempting to port a working application to Tomcat 4.0.1 and hit a
> >>problem with SAX parsing.  When this line of code is executed
> >>
> >>  SAXParserFactory factory = SAXParserFactory.newInstance();
> >>
> >>I got a ClassCastException error:
> >>
> >>java.lang.ClassCastException:
> org.apache.crimson.jaxp.SAXParserFactoryImpl
> >> at
> javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:148)
> >>
> >>I looked at the Tomcat archives and tried what the Tomcat documentation
> >>says to do, eg. move xerces.jar into my WEB-INF directory or into the
> >>$CATALINA_HOME/lib directory and move crimson.jar and jaxp.jar out.
> >>Documentation located at
>
>>http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html#To
mc
> >>at%204%20and%20XML%20Parsers   After doing that however, I get the same
> >>error but from xerces (org.apache.xerces.jaxp.SAXParserFactoryImpl) vs.
> >>crimson.
> >>
> >>Has someone slayed this dragon before?  If so, any help would be greatly
> >>appreciated.
> >>
> >>Mark
> >>
> >>
> >>
> >>--
> >>To unsubscribe:   
> >>For additional commands: 
> >>Troubles with the list: 
> >>
> >
> >
> >
> >
> >_
> >Do You Yahoo!?
> >Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> >--
> >To unsubscribe:   
> >For additional commands: 
> >Troubles with the list: 
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: TC 4.0.1/SAXParserFactory.newInstance() error

2002-01-12 Thread Mark

I thought CLASSPATH isn't used for locating jars in TC 4.0?  In any case, I
do use the startup scripts that come with Tomcat and was already through
step 3 of your suggestions when I originally posted the question (eg. no
jaxp/crimson available in any Tomcat or $JAVA_HOME directories, and The TC
version of xerces.jar in common/lib).  To answer your question, no my app
isn't bundling xerces or crimson.

I'm not sure why this exception is being thrown to begin with...


At 12:09 AM 1/13/2002 +0530, you wrote:
>Hi,
>
>Looks like there's may be another copy of the Jaxp classes somewhere in
the classpath..Please try the following:
>
>1. Use the startup scripts that come with tomcat 4.0.1. These unset the
CLASSPATH environment variables and crete custom variables for 
>Tomcat's startup.
>
>2.Check to see if you're having any older Xerces or (Crimson+Jaxp) jars
files in $JAVA_HOME/lib/ext
>
>3. Remove all instances of the files xerces.jar, parser.jar, crimson.jar
and jaxp.jar from where ever you have placed them in the $CATALINA_HOME  
>sub directories.
>   Having done that, place a copy of xerces.jar in $CATALINA_HOME/common/lib
>   The xerces.jar file that comes with tomcat 4.0.1 is 1.72 MB in size
(1,808,883 bytes)
>
>4. Just a question, is your app also bundling Xerces/crimson ? Look for
the jars in the WIB-INF/lib sub-directory.
>
>
>Sriram
>
>1/12/02 11:17:36 PM, Mark <[EMAIL PROTECTED]> wrote:
>
>>I'm attempting to port a working application to Tomcat 4.0.1 and hit a
>>problem with SAX parsing.  When this line of code is executed
>>
>>  SAXParserFactory factory = SAXParserFactory.newInstance();
>>
>>I got a ClassCastException error:
>>
>>java.lang.ClassCastException:
org.apache.crimson.jaxp.SAXParserFactoryImpl
>>   at
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:148)
>>
>>I looked at the Tomcat archives and tried what the Tomcat documentation
>>says to do, eg. move xerces.jar into my WEB-INF directory or into the
>>$CATALINA_HOME/lib directory and move crimson.jar and jaxp.jar out.
>>Documentation located at
>>http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html#Tomc
>>at%204%20and%20XML%20Parsers   After doing that however, I get the same
>>error but from xerces (org.apache.xerces.jaxp.SAXParserFactoryImpl) vs.
>>crimson.
>>
>>Has someone slayed this dragon before?  If so, any help would be greatly
>>appreciated.
>>
>>Mark
>>
>>
>>
>>--
>>To unsubscribe:   
>>For additional commands: 
>>Troubles with the list: 
>>
>
>
>
>
>_
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>--
>To unsubscribe:   
>For additional commands: 
>Troubles with the list: 
For additional commands: 
Troubles with the list: 




Periodically Refresh Application Bean?

2002-01-12 Thread Rick Roberts

I have an application that has a bean with application scope.
I would like to run a cron job once a day to refresh the data in this 
bean.  It would be nice if I did not have to restart Tomcat everytime. 
Anyone know how I could do this?

Thanks,

-- 
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Win 2000 Pro Service...

2002-01-12 Thread Rama

here is a quick fix: uninstall tomcat & reinstall it


Rama


> -Original Message-
> From: Guido Medina [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 28, 2001 6:55 AM
> To: '[EMAIL PROTECTED]'
> Subject: Win 2000 Pro Service...
> 
> 
> I had JDK 1.3.1_01 and the service works fine, now I upgraded 
> it to JDK
> 1.3.1_02 and it didn't, the same with JDK 1.4 Beta 3, any help ?
> 



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


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Tomcat Bug or Feature ?

2002-01-12 Thread Chris Duprat

Hi,

My question is about webapps classloader. I wonder why 
Jasper can't find classes in the WEB-INF/classes directory? 
Unable to compile jsp ... cannot find import package. 
I think that when a jsp is requested, Jasper has the same 
classLoader of the webapps. Thus Jasper could find the 
classes in the /WEB-INF/classes and in the 
/WEB-INF/lib/*.jar .
I'm using TomCat 4.0.1 and deploy my webapp in a well
formed war archive. When deploying webapp like cocoon,
there is no problem for accessing the app through a browser.
If Tomcat security need adding a context in order to validate
the webapp, cocoon would'nt have work. So defining a context
for my webapps shouldn't be an obligation and I didn't define one.
To conclude, I wonder why Jasper can't compile my jsp ? 
Following the Servlet Specification, my webapp ClassLoader 
contain classpath to WEB-INF/classes/ and WEB-INF/lib/*jar.
Does Jasper have a different one when he try to compile my JSP?
Perhaps TomCat 4.0.1 Bug ... or mislead conception deploying 
a war archive ...

Bye
Chris  
  


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Why does getRemoteHost() always return localhost ??? :((

2002-01-12 Thread Rizki Wicaksono


I used tomcat-3.2.3 and I don't have any problem when accessing
http://mytomcatserver:8080/examples/jsp/snp/snoop.jsp
from any machine. 
This page return that machine IP address and hostname.

Now, I upgrade my server to tomcat-3.3, and I do have a problem when
accessing : 
http://mytomcatserver:8080/examples/jsp/snp/snoop.jsp
from another machine.
snoop.jsp page sometimes (usually the first try) returns the correct
machine IP address and hostname, but most of the time it returns
localhost or 127.0.0.1

Please help me, since i need my client IP address for security reason.



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: TC 4.0.1/SAXParserFactory.newInstance() error

2002-01-12 Thread Sriram Narayanan

Hi,

Looks like there's may be another copy of the Jaxp classes somewhere in the 
classpath..Please try the following:

1. Use the startup scripts that come with tomcat 4.0.1. These unset the CLASSPATH 
environment variables and crete custom variables for 
Tomcat's startup.

2.Check to see if you're having any older Xerces or (Crimson+Jaxp) jars files in 
$JAVA_HOME/lib/ext

3. Remove all instances of the files xerces.jar, parser.jar, crimson.jar and jaxp.jar 
from where ever you have placed them in the $CATALINA_HOME  
sub directories.
Having done that, place a copy of xerces.jar in $CATALINA_HOME/common/lib
The xerces.jar file that comes with tomcat 4.0.1 is 1.72 MB in size (1,808,883 
bytes)

4. Just a question, is your app also bundling Xerces/crimson ? Look for the jars in 
the WIB-INF/lib sub-directory.


Sriram

1/12/02 11:17:36 PM, Mark <[EMAIL PROTECTED]> wrote:

>I'm attempting to port a working application to Tomcat 4.0.1 and hit a
>problem with SAX parsing.  When this line of code is executed
>
>  SAXParserFactory factory = SAXParserFactory.newInstance();
>
>I got a ClassCastException error:
>
>java.lang.ClassCastException: org.apache.crimson.jaxp.SAXParserFactoryImpl
>at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:148)
>
>I looked at the Tomcat archives and tried what the Tomcat documentation
>says to do, eg. move xerces.jar into my WEB-INF directory or into the
>$CATALINA_HOME/lib directory and move crimson.jar and jaxp.jar out.
>Documentation located at
>http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html#Tomc
>at%204%20and%20XML%20Parsers   After doing that however, I get the same
>error but from xerces (org.apache.xerces.jaxp.SAXParserFactoryImpl) vs.
>crimson.
>
>Has someone slayed this dragon before?  If so, any help would be greatly
>appreciated.
>
>Mark
>
>
>
>--
>To unsubscribe:   
>For additional commands: 
>Troubles with the list: 
>




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


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




TC 4.0.1/SAXParserFactory.newInstance() error

2002-01-12 Thread Mark

I'm attempting to port a working application to Tomcat 4.0.1 and hit a
problem with SAX parsing.  When this line of code is executed

  SAXParserFactory factory = SAXParserFactory.newInstance();

I got a ClassCastException error:

java.lang.ClassCastException: org.apache.crimson.jaxp.SAXParserFactoryImpl
 at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:148)

I looked at the Tomcat archives and tried what the Tomcat documentation
says to do, eg. move xerces.jar into my WEB-INF directory or into the
$CATALINA_HOME/lib directory and move crimson.jar and jaxp.jar out.
Documentation located at
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html#Tomc
at%204%20and%20XML%20Parsers   After doing that however, I get the same
error but from xerces (org.apache.xerces.jaxp.SAXParserFactoryImpl) vs.
crimson.

Has someone slayed this dragon before?  If so, any help would be greatly
appreciated.

Mark



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: Tomcat and Orbix 2000

2002-01-12 Thread Lars Nielsen Lind

Hi Claude.

Can you post some links to you material about Orbix and Tomcat?

Best regards,
Lars Nielsen Lind

- Original Message -
From: "Claude Muller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 12:31 PM
Subject: Tomcat and Orbix 2000


> Hi All,
>
> Has any one managed to get Tomcat to work with orbix 2000? If so, help!
> Basically, I want a servlet to be an ejb client (running on HP AS 8.0)
and
> thus use Orbix.  I can' t get tomcat/my servlet to find the Orbix license
> file.
>
> I have tried many things to no avail:
> - setting the env variable (IT_LICENSE_FILE) on the system didn't work
> - providing the variables as parameters to the servletVM
> (-DIT_LICENSE_FILE=...) also didn't work
> - setting the env variables in the Code (properties for Initial Context)
> didn't work
> - placing licenses.txt in WEB-INF/lib, WEB-INF/classes, in Tomcat's
> classpath did not work either.
>
> Here is the error I am always getting:
>
> org.omg.CORBA.INITIALIZE: Configuration not found  minor code: 1230242063
> completed: No
>
> The meaning for this minor_code/exception_type combination is:
> "LICENSE_FILE_NOT_AVAIL"
>
> Any help would greatly appreciated.
>
> Cheers,
>
> Claude
>
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>
>
>



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Apache+PHP+mod_jk

2002-01-12 Thread Adrian Erimescu


Hi All,

I have an Apache server with php and mod_jk. If I use servlets only in one 
virtual host (defined in mod_jk.conf, the only vhost with JkMount directive 
in), Apache will make a connection to Tomcat through mod_jk only for 
connections made to this vhost or it will connect to Tomcat with all it's 
threads?

Regards,

Adrian Erimescu
REALMEDIA ROMANIA
...
http://www.realmedia.ro
Tel/Fax: +40 56 195294
ICQ#: 39233687


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Tomcat and Orbix 2000

2002-01-12 Thread Claude Muller

Hi All,

Has any one managed to get Tomcat to work with orbix 2000? If so, help!
Basically, I want a servlet to be an ejb client (running on HP AS 8.0)  and
thus use Orbix.  I can' t get tomcat/my servlet to find the Orbix license
file.

I have tried many things to no avail:
- setting the env variable (IT_LICENSE_FILE) on the system didn't work
- providing the variables as parameters to the servletVM
(-DIT_LICENSE_FILE=...) also didn't work
- setting the env variables in the Code (properties for Initial Context)
didn't work
- placing licenses.txt in WEB-INF/lib, WEB-INF/classes, in Tomcat's
classpath did not work either.

Here is the error I am always getting:

org.omg.CORBA.INITIALIZE: Configuration not found  minor code: 1230242063
completed: No

The meaning for this minor_code/exception_type combination is:
"LICENSE_FILE_NOT_AVAIL"

Any help would greatly appreciated.

Cheers,

Claude


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Hi

2002-01-12 Thread Harikrishna_B
Title: RE: Hi





Thanks for nice advice.


--
From:   [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
Reply To:   Tomcat Users List
Sent:   Friday, January 11, 2002 9:48 PM
To:     Tomcat Users List
Subject:    Re: Hi



A good starrting point would visiting the URL:
http://jakarta.apache.org/tomcat/index.html
Check the links under "Documentation". It has excellent information on
developing and deploying web applications.


Hope this helps.
Thanks.
RS






Harikrishna_B <[EMAIL PROTECTED]> on 01/11/2002 04:35:08 AM


Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:


Subject:  Hi


Hi tomcatusers,
How to put a web application directory  in webapps and start working on
that
directory?
**
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.



**
--
To unsubscribe:   
For additional commands: 
Troubles with the list: 










--
To unsubscribe:   
For additional commands: 
Troubles with the list: 


** 
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.

**




--
To unsubscribe:   
For additional commands: 
Troubles with the list: