Urgent Urgent Plz Help

2002-05-07 Thread # Lalit Nagpal #

i have set multipart/form-data tag in my html form
tag. i need to get a form filled in by the visitors
and also an attachment on the same form (file upload).
i am using oreilly classes. problem is when i try to
get data + file on the server using MultipartRequest
class of oreilly i get the error "content type is not
multipart". I am using MultipartRequest class
getParameter function to get the data, and the file
upload works as usual. Any Ideas why this error is
occuring.

This error occurs in IE, On Netscape it works quiet
fine

Plz help.
Thanx in advance.


=
# Lalit Nagpal #

__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ?? Class Loaders, Static Initializers, Open Files ??

2002-05-07 Thread Phillip Morelock

Unfortunately I believe that's what static initialization is.

It's not totally clear whether this will help you, but here's a link 
that describes the order things are done in:
http://www.javaworld.com/javaworld/jw-11-2001/jw-1102-java101.html

cheers
fillup

At Tuesday, 7 May 2002, you wrote:

>Hi all,
>
>This is a core Java language issue but its roots are in servlets.
>
>I have a servlet (running on Tomcat v4.0.3), MyServlet, which
>calls Class.forName("XXX") in it's init() method.
>
>Now class XXX has a static initializer that opens a file for
>output and keeps it open. Later, I change the code in MyServlet
>and recompile it. The Tomcat notices the change and automatically
>loads the new version of MyServlet, using a different class
>loader than was used for the previous version.
>
>But when the new version of MyServlet calls Class.forName("XXX"),
>the static initializer in XXX cannot open the file because the
>previous version has it open.
>
>So even though the first class loader is being
>"dropped/abandoned", there is still a class loaded by that class
>loader (class XXX) that has a file open. And of course, I do not
>have the code for XXX.
>
>Is there any way to specify, either to the JVM or to Tomcat, that
>the file opened by XXX's static initializer should be closed? I'm
>guessing this is "just the way it works". The previous class
>loader will be GCed, as will the previous version of MyServlet,
>but the file opened by XXX stays open until the VM goes down...
>
>Thanks...
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Problem: JSP calls singleton. Singleton's data changes, but JSP s till shows old data from that singleton

2002-05-07 Thread Chris Campbell


Assuming the browser is not just giving you a cached page, in the servlet,
if you log the contents of _instance just before return _instance; do you
see the new data?

ChrisC

> -Original Message-
> From: "Pykalainen, Eero" [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 8:34 PM
> To: '[EMAIL PROTECTED]'
> Subject: Problem: JSP calls singleton. Singleton's data 
> changes, but JSP s till shows old data from that singleton
> 
> 
> I am using Tomcat 4.0.4-b1 (and Struts 1.0.2) on W2K.
> 
> I have a singleton class that keeps data inside of it.
> 
> I have a JSP page that calls the singleton.
> 
> When singleton's data is up-to-date, JSP page opens quickly. 
> When it isn't,
> singleton updates its data structure from database and then 
> JSP shows up.
> There is only one problem: although singleton updates itself, 
> singleton's
> changed data isn't visible in the JSP page. It still shows old data.
> 
> JSP:
> 
> <%
>   ListOfAllComponents listOfAllComponents =
> ListOfAllComponents.getInstance();
>   // extracting data here...
> %>
> 
> Singeton class' getInstance() method:
> 
> public static synchronized ListOfAllComponents getInstance() {
>   try {
> if ( _instance == null ) {
>   _instance = new ListOfAllComponents();
> }
> 
> if ( upToDate == false ) {
>   _instance.getListOfAllComponents();
>   _instance.log("Refreshed listOfAllComponents");
>   upToDate = true;
> }
>   } catch ( Throwable e ) {
>   e.printStackTrace( System.out );
>   }
> 
>   return _instance; 
> }
> 
> I call my log method inside the getListOfAllComponents() 
> method so I *know*
> that the data is changed.
> 
> My workflow:
> 
> 1) I call the JSP page that shows data from singleton
> 2) I call another JSP page that changes the upToDate boolean flag
> 3) I call the JSP page that shows data from singleton. At 
> this phase the log
> method inside getListOfAllComponents method logs the 
> *updated* data to my
> log file
> 4) JSP page shows up. It still shows the old data.
> 
> Am I doing something wrong or missing something here?
> 
> Thank you very much of your help, 
>   Eero
> 
> 
> -- 
> Eero Pykalainen, Software Developer, Yomi Solutions Ltd.
> 
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Classloader question

2002-05-07 Thread tamir

Hi,
I had many problems with classloaders using tomcat 3.3.1.
I think you shouldn't be suprised by the LinkageError, cause you actually
load this class twice, once by the context class loader and second by the
apps
class loader.
What I don't remember is the hirarcy between these two class loaders
(maybe you can check in the archives, and understand better what's
happening).
What I don't understand is why using two different versions of the same
class.
Isn't it some kind of troublemaker?

Tamir



-Original Message-
From: Mario Felarca [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 7:06 AM
To: [EMAIL PROTECTED]
Subject: Classloader question


Hello,

I have a situation with Tomcat 3.3a where I am trying
to allow a specific servlet context to load a version
of a class from within their WEB-INF/classes
directory, while other contexts on the server use a
different version of that class that is loaded by the
apps classloader.

I can currently get the context classloader to
actually load the correct class, however later on
during init, I am getting a java.lang.LinkageError
saying that the specific class that is being loaded
twice is violating the loader constraints.

Can anyone point me to any resources that would help
me solve this problem? Any similar experiences or
ideas would be greatly appreciated.

Thanks in advance,

Mario-

__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Warning: VIRUS!!!

2002-05-07 Thread Sergei Batiuk

Hi all,

if you have just received message starting with 'A funny web site' -- do
not open it! This message has been sent by a virus!!!

I hope this is not too late...

Yours,
Sergei


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to add a throw exception to a servlet

2002-05-07 Thread Raphael

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm late with this reply but thanks!

Le Vendredi 03 Mai 2002 12:26, Ion Larranaga a écrit :
> Hi,
>
> There's no way to add new exception types to the doPost method. However,
> you could do something like:
>
> public void doPost(HttpServletRequest request, HttpServletResponse
> response) throws ServletException, IOException
> {
>   try
>   {
>   /*
>   your code
>   */
>   }
>   catch (SQLException exc)
>   {
>   throw new ServletException(exc);
>   }
> }
>
> This way, the real exception goes nested within a ServletException and you
> don't have to change the method signature.
>
> Hope it helps,
>
>Ion
>
> >But I want the exception to be caught in the error.jsp page, not do a try
> >{...} catch{...} inside the doPost body.
> >
> >I don't know if I explained it correctly but is there a simple solution to
> >this problem ?
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE814m1h2ITK4xBkFERAstoAJ9ZvhkOi5ndsMuzBDssBIPGl48lNACfRxXg
qDjJ8zUzIyi28j+iMMJBsJs=
=K4I9
-END PGP SIGNATURE-


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: mod_webapp.dll

2002-05-07 Thread @Basebeans.com

Subject: Re: mod_webapp.dll
From: Bruno V <[EMAIL PROTECTED]>
 ===
You can find it here : http://www.acg-gmbh.de/mod_jk/

Other guides, how-to about Apache + Tomcat + connectors : 
http://bruno.vernay.free.fr/HowTo/bWebServerHowTo/ch05.html


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Can't build mod_webapp.so

2002-05-07 Thread @Basebeans.com

Subject: Re: Can't build mod_webapp.so
From: Bruno V <[EMAIL PROTECTED]>
 ===
You should check : http://www.pubbitch.org/jboss.html

Other guides and tutorial about Apache + tomcat + connectors :
http://bruno.vernay.free.fr/HowTo/bWebServerHowTo/ch05.html


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat4 apache mod_jk : problem in setup

2002-05-07 Thread userlist
I am refering packages and text from
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/rpms/

and I did setup of tomcat4 and apache, I can see servlets using tomcat4's web
 server but after putting mod_jk connector when I restart httpd ( i.e apache ) I get
 following error.

**
[root@localhost conf]# /etc/init.d/httpd start
Starting httpd: [Tue May  7 13:48:21 2002] [warn] Loaded DSO /usr/lib/apache/mod
_jk.so uses plain Apache 1.3 API, this module might crash under EAPI! (please re
compile it with -DEAPI)
[  OK  ]
*
and It's not working. 
I have searched on the web for same errors and solutions, but could not get any.

Please tell me if anyone has got tomcat4 working with mod_jk connector. If so please give me details like
- from where to download packages
- where to find the steps to follow for this

Or do I need to recompile mod_jk.so to get it working?

thanks
Amol

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Off-Topic question..

2002-05-07 Thread Murat Buyukkal ([EMAIL PROTECTED])

Sorry for my Off-Topic question but I couldn't find a solution.
I am reading news messages offline with Outlook Express and I have a
problem;
When I synchronized the news server and my local box "Deleted/Outdated
messages" are also deleted from my local box. I want to preserve the old
messages in my local box that even deleted on the news server. How can I
preserve my old messages? or can you advise a newsreader that can preserve
old messages?

Thanks in advance,

Murat Büyükkal



R: implicit object servlet

2002-05-07 Thread Alessio Fiore

I think you're talking about struts...
AFAIK a taglibrary is not directly related to a servlet, but a tag handler
has access to the request, where struts sets an attribute for each
datasource, which name is corrisponding to datasource's key attribute:

HttpServletRequest req = (HttpServletRequest)(pageContext.getRequest());
DataSource ds =
(DataSource)(req.getAttribute("your-datasource-key-attribute-value"));

Regards
Alessio


-Messaggio originale-
Da: rainer jünger [mailto:[EMAIL PROTECTED]]
Inviato: lunedì 6 maggio 2002 21.27
A: Tomcat Users List
Oggetto: implicit object servlet


Hi,

what is the equivalent implicit object to servlet within a Taglib-class?
I want to use the methode:
servlet.findDataSource(null)
in a Taglib-class

thanks Rainer



- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation. 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Ejb vs jsp

2002-05-07 Thread Nikola Milutinovic

> Hello,
> Because I am curious about how these technologies are used in the real 
> world. I would like to know how do you professionals use as your rule of 
> thumb wether or not you are going build  web based  application using
> Enterprise Javabeans or a standalone jsp applications.

Why would you build a EJB web application *without* JSP? :-)

Anyway, it is really a rule of thumb and your general mood. Even now, I use regular 
Beans which do preety much the same job as EJB, only simplified. I haven't gotten 
JBoss up yet, but even with a very simple example I find EJBs appealing.

Nix.



Re: tomcat4 apache mod_jk : problem in setup

2002-05-07 Thread Bernd Koecke

Hi,

this is a problem with the build.xml scripts. I had the same problem, too. Your 
apache seems to be compiled with -EAPI, e.g. for mod_ssl. I don't know if there 
is a compiled dso with EAPI enabled. I build the connectors on my own with cvs 
repository from jakarta-tomcat-connectors. You find infos in the doc directory 
of thsi package. When you want to use mod_jk form jk1 in directory jk/native, 
adding the line



in the platform specific tags of the apache13 target of file 
/jk/native/build.xml will build a mod_jk.so which uses EAPI.

Bernd


[EMAIL PROTECTED] wrote:
> I am refering packages and text from
> http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/rpms/
> 
> and I did setup of tomcat4 and apache, I can see servlets using tomcat4's web
>  server but after putting mod_jk connector when I restart httpd ( i.e apache ) I get
>  following error.
> 
> **
> [root@localhost conf]# /etc/init.d/httpd start
> Starting httpd: [Tue May  7 13:48:21 2002] [warn] Loaded DSO /usr/lib/apache/mod
> _jk.so uses plain Apache 1.3 API, this module might crash under EAPI! (please re
> compile it with -DEAPI)
> [  OK  ]
> *
> and It's not working. 
> I have searched on the web for same errors and solutions, but could not get any.
> 
> Please tell me if anyone has got tomcat4 working with mod_jk connector. If so please 
>give me details like
> - from where to download packages
> - where to find the steps to follow for this
> 
> Or do I need to recompile mod_jk.so to get it working?
> 
> thanks
> Amol
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 



-- 
Dipl.-Inform. Bernd Koecke
UNIX-Entwicklung
Schlund+Partner AG
Fon: +49-721-91374-0
E-Mail: [EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Problem with Tomcat 4.1.0 & IIS

2002-05-07 Thread Carlos Martins
Title: Problem with Tomcat 4.1.0 & IIS






Hello,


I have recently upgraded to Tomcat 4.1.0

Also upgraded my isapi_redirect.dll with the version located in http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3/bin/win32/i386/

I have IIS as web server and Tomcat listening to redirections through the Coyote JK 2 connector.


Now my web site is not working - only some pages are not displayed and the following message is placed in the log file:

"Connection reset by peer: socket write error"


But if I run my web site through the HTTP1.1 connector of Tomcat (port 8080) it works fine - all pages are properly displayed.

Any clues?


Thank you very much

Carlos


_
Carlos Martins
[EMAIL PROTECTED]

telf: 932 308 527

_





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


JVM Bind error

2002-05-07 Thread kelly, Burrowa

During runtime when I change a class file, tomcat 
4.0.3 is supposed to reload that class(due to
reloadable=true in server.xml). But instead, I
get some JVM Bind error.

Does anybody have any clue about this error.

thanks.
kb

__
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, e-mail:   
For additional commands, e-mail: 




RE: SSL certificate help!

2002-05-07 Thread t . riteshmenon

Hi Raj,

thanks for your detailed mail which was very helpful. I had followed the
same.,
but i had another question. The certificate from verisign has been placed
as instructed , but how do i enable the client i.e browser in my case for
the
same . does anything specific has to be done?

prior to doing this, i was using a self-signed certificate, which the
browser still
reads. how to make the browser know abt the verisign cert? hope u got
the point. 
thanx in advance

Ritesh

-Original Message-
From: Raja Sekhar [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 5:30 PM
To: Tomcat Users List
Subject: Re: SSL certificate help!


Hi,

Follow these steps to configure your digital id

1. generate a local certificate:
   keytool -genkey -alias tomcat -keyalg RSA -keystore  where
 is the name of the desired keystore-file

2. generate the CSR (you need it to request your (demo)certificate)
   keytool -certreq -keyalg RSA -alias tomcat -file certreq.pem
-keystore

   now you have a file called "certreq.pem". Send this to your
trustcenter.

Note : You can skip steps 1 & 2 becoz u said, u already got a verisign
certificate. But make sure that u have done these steps only to send your
demo cert. to verisign.

3. Goto verisign & download TrustedCA Root Certificate which they give for
the browser. The downloaded file name would be getcacert. Now use the
following command to import that into trust store

keytool -import -alias root -keystore  -trustcacerts -file


4. Now import your verisign certificate with this command

keytool -import -alias tomcat -keystore  -trustcacerts -file


With the above 4 steps, u r ready with your keystore. Now goto server.xml &
search for ""

Uncomment the above line & add the following changes

 

I think this should solve your problem. All the best.

Regards,

..Raj
--

On Mon, 6 May 2002 15:57:03t.riteshmenon wrote:
>Hello all,
>
>I have got a  Trial SSL Server Digital ID from Verisign . I would like to
>know how to configure it with tomcat(3.2.1) . i'm trying to enable ssl
>with tomcat. 
>any help in this regard would be most welcome.
>
>thanks in advance
>Ritesh
>---
-
>This message contains privileged and confidential information and is
>intended only for the individual named.If you are not the intended
recipient
>you should not disseminate,distribute,store,print, copy or deliver this
>message.Please notify the sender immediately by e-mail if you have received
>this e-mail by mistake and delete this e-mail from your system.E-mail
>transmission cannot be guaranteed to be secure or error-free as information
>could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or
>contain viruses.The sender therefore does not accept liability for any
>errors or omissions in the contents of this message which arise as a result
>of e-mail transmission. If verification is required please request a
>hard-copy version.
>---
-
>
>--
>To unsubscribe:   
>For additional commands: 
>Troubles with the list: 
>
>


Join 18 million Eudora users by signing up for a free Eudora Web-Mail
account at http://www.eudoramail.com

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

This message contains privileged and confidential information and is
intended only for the individual named.If you are not the intended recipient
you should not disseminate,distribute,store,print, copy or deliver this
message.Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.E-mail
transmission cannot be guaranteed to be secure or error-free as information
could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or
contain viruses.The sender therefore does not accept liability for any
errors or omissions in the contents of this message which arise as a result
of e-mail transmission. If verification is required please request a
hard-copy version.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Terminating sessions problem. (bug?)

2002-05-07 Thread Garzon Maldonado, Jesus Javier

Hello all:

When a user enter in my site sessions are used to store user data. I get the 
session using (request.getSession(true);). When users leave the site the session is 
invalidated (request.getSession().invalidate();). But, if users enter again from the 
same browser instance each call to (request.getSession(true);) creates a new session 
so it's impossible to get data associated with the session from differents servlets. 
If users enter from another browser instance, sessions works fine.

I'm using Apache 1.3.20 + Tomcat 4.0.3 on windows NT, but this also happened with 
Tomcat 3.2.1 and on unix platforms running Tomcat 3.2.1 standalone.

This is a bug?, Am I doing something wrong?

Thank you very much. Regards

 Jesús Javier Garzón Maldonado  
 Radar, Mando y Control 
 
 Carretera Loeches, Nº 9
28850 - Torrejón de Ardoz (ESPAÑA)
Tel: +34-91-626.82.68
[EMAIL PROTECTED]
www.indra.es

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Is there a possibility to specify the minimum encryption rate for tomcat SSL support ?

2002-05-07 Thread Zimpel Frank

Older browser versions (for exemple IE4 ...) don't support 128 bit
encryption rate. Is there a way to configure tomcat to deny all requests
from clients, that are not capable of using 128 bit encryption rate. 

The SSL connection, using the configuration as described in "SSL How To",
reduces the encryption rate automatically to a level, the client is
compatible to.


 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Strange JSP Problem

2002-05-07 Thread Collins, Jim

I have a strange JSP problem with Tomcat 4. When I start Tomcat everything
is fine and the JSP's are working OK. But when I load a particular JSP which
always fails all other JSP's then stop working even the examples, and just
display an empty html page, here is the html:






I have to restart Tomcat to get the JSP's working again. If anyone has any
ideas what is causing this it would be appreciated.

Thanks

Jim.


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Urgent send redirect

2002-05-07 Thread Laura

Hi all,

I have a problem and I don't know whre is the cause.

My context is /xxx: in this context I have a servlet. This servlet takesas 
parametr an url in IP form (nn1.nn2.nn3.nn4).
At the end of the servlet I do:

response.sendRedirect(response.encodeRedirectURL(url + "?" + querystring));

If the url parameter,passed to my servlet is nn1.nn2.nn3.nn4, the browser of 
the user is redirected to


http://myserver/xxx/nn1.nn2.nn3.nn4?querystring

But I want:

http://nn1.nn2.nn3.nn4?querystring


Where is my problem?

Please help me.



Thanks

Laura

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Loosing identify when switching to non-protected webresource

2002-05-07 Thread jfc100

Hi,

I am experiencing the exact same problem. Here is my post to the struts list:

>Hi,
>
>
>Has anyone encountered the following situation using form-based auth in catalina?
>
>
>1. login successfully using 'j_security_check';
>
>2. the next request happens to be to an unsecured url (e.g. /do/frontpage
>(with no restrictions in web.xml) --> DispatchServlet --> user.frontpage
>(tiles)) ; 
>3. the request methods 'getUserPrincipal()', 'isUserInRole()'
>and 'getRemoteUser()' tell me the user is not logged in (in DispatchServlet)! 
>
>
> (I'm using jboss244+tomcat401, struts1.0, tiles)
>
>
>I heard this might be an issue with jboss.
>
>
>Can anyone confirm?
>
>
>Joe
>
>>
>>I don't know how JBoss behaves, but this is exactly
>>how WebSphere behaves.
>>
>>  -TP
>>
>
I have found the same using jb241a+tc323 as well as jb300RC2+tc403.

I started looking at the tomcat code but I'm not sure I want to commit the time it may 
take to understand the intricacies when someone 
else may well have an answer.

I'd like to know whether this is worth pursuing or if perhaps it is better to 
sacrifice the declarative model for a role-your-own approach.

Joe

>From: Erwin Teseling 
>Subject:  Loosing identify when switching to non-protected webresource
>Date:  Thu, 21 Feb 2002 15:57:12 +0100
>
>I am using the combination of Tomcat/Jboss and am having problems
>when
>using webcontainer security (using j_security_check).
>
>I have some resource protected in my web.xml (using contraint>
>tag). Now when I try to acces this resource Tomcat presents me my
>loginform and validates my identify. If this is correct I will gain
>access to the secured resource. So far so good.
>
>Now I have a custom tag that verifies the role in which I am to
>display
>some pages differently. My tag nicely detects the users identity
>(using
>getUserPrincipal() method). Now when I go to a non-secured jsp-page,
>my
>tag returns null on getUserPrincipal?!?! When I switch to a secured
>jsp-page it does work and I receive the correct identity. I have the
>same behaviour in servlets.
>
>I was not expecting this behaviour and I really need to be able to
>determine the identity on these non-secured resources (both servlets
>and
>jsp). It there a setting that makes Tomcat behave in this way and is
>there a way to change this behaviour.
>
>Thanks,
>Erwin
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: TOMCAT & SSL !!!

2002-05-07 Thread t . riteshmenon

Hi Steve,   

   I had included the security constraint in web.xml, but still
the request goes thru without ssl. what mistake am i making?

what is the ? do i have to include that too.
i was also not clear abt the "redirectPort" bit - where cud i get
more help?

thanx,
Ritesh


-Original Message-
From: Steve D George [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 3:48 PM
To: Tomcat Users List
Subject: Re: TOMCAT & SSL !!!



Hi, have a look for postings titled 'How to enforce SSL' that were posted
over the last few days. Assuming you have gone through the How-to-SSL
document in the tomcat docs and set up a certificate, to enforce SSL for a
certain directory in your context, you need something like this in your
web.xml.


  

  Entire Application
  /*


  trackeruser


  CONFIDENTIAL

  

  
  
BASIC
Location Tracker Application
  

The important piece is the user-data-constraint and the
transport-guarantee. This tells tomcat that all requests to the url pattern
(in my case it is the whole of my context) should be sent over HTTPS. If a
request is received over HTTP, tomcat will redirect the request at whatever
port is defined in server.xml as the 'redirectPort' for the HTTP connector.
This is probably 8443. You then need to make sure that you have an SSL only
connector on that port but I guess you should already have that if you've
got the SSL working already.

Cheers.

Steve.



 

  t.riteshmenon@iflexso

  lutions.com  To:
[EMAIL PROTECTED]
   cc:

  30/04/2002 11:10 Subject:  TOMCAT & SSL
!!!  
  Please respond to

  "Tomcat Users List"

 

 





Hi All,

My application requires that certain pages on the site are accessed via
SSL,
is
there a way in tomcat to reject the connection of http to a specific page
(ie securePage.jsp) but still allow http access to other pages (ie.
standardPage.jsp).

Also i'm using cookies - so i wanted to know whether these cookies will
be visible in both the http & https contexts.

Thanks in advance,

Ritesh


This message contains privileged and confidential information and is
intended only for the individual named.If you are not the intended
recipient
you should not disseminate,distribute,store,print, copy or deliver this
message.Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.E-mail
transmission cannot be guaranteed to be secure or error-free as information
could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or
contain viruses.The sender therefore does not accept liability for any
errors or omissions in the contents of this message which arise as a result
of e-mail transmission. If verification is required please request a
hard-copy version.



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





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

This message contains privileged and confidential information and is
intended only for the individual named.If you are not the intended recipient
you should not disseminate,distribute,store,print, copy or deliver this
message.Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.E-mail
transmission cannot be guaranteed to be secure or error-free as information
could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or
contain viruses.The sender therefore does not accept liability for any
errors or omissions in the contents of this message which arise as a result
of e-mail transmission. If verification is required please request a
hard-copy version.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Urgent send redirect

2002-05-07 Thread Chris Campbell


You could try just:

response.sendRedirect("http://"; + url + "?" + querystring);

ChrisC

> -Original Message-
> From: Laura [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 7:53 PM
> To: [EMAIL PROTECTED]
> Subject: Urgent send redirect
> 
> 
> Hi all,
> 
> I have a problem and I don't know whre is the cause.
> 
> My context is /xxx: in this context I have a servlet. This 
> servlet takesas 
> parametr an url in IP form (nn1.nn2.nn3.nn4).
> At the end of the servlet I do:
> 
> response.sendRedirect(response.encodeRedirectURL(url + "?" + 
> querystring));
> 
> If the url parameter,passed to my servlet is nn1.nn2.nn3.nn4, 
> the browser of 
> the user is redirected to
> 
> 
> http://myserver/xxx/nn1.nn2.nn3.nn4?querystring
> 
> But I want:
> 
> http://nn1.nn2.nn3.nn4?querystring
> 
> 
> Where is my problem?
> 
> Please help me.
> 
> 
> 
> Thanks
> 
> Laura
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Off-Topic question..

2002-05-07 Thread PChaganti

Try Pan or KNode...

-prabhakar


>>>

Sorry for my Off-Topic question but I couldn't find a solution.
I am reading news messages offline with Outlook Express and I have a
problem;
When I synchronized the news server and my local box "Deleted/Outdated
messages" are also deleted from my local box. I want to preserve the old
messages in my local box that even deleted on the news server. How can I
preserve my old messages? or can you advise a newsreader that can preserve
old messages?



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Processes

2002-05-07 Thread tomcat

Hello
I'm using
Tomcat 4.03
Apache 1.3.23
J2SDK 1.4
RH 7.2

In this server are running 4 private tomcat instances, and 6 sites in
a shared instance.
What I saw while I was doing a top, its the HUGE number of processes
running, usually goes over 2200 processes.
I set a cronjob to restart to restart apache and tomcat every hour,
trying to clean memory and processes.
I was wondering if its possible to cut the number of the processes, or
if I can put hard limits to each instance.

None of this sites have more than 1 GB of traffic per month.

Thanks in advance for anyone who can help me here.



-- 
Best regards,



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Terminating sessions problem. (bug?)

2002-05-07 Thread Deep Singh Bhau


this is not a bug. All u have to do is set some attribute in session
after successfull login and then check that attribute in each servlet.
If the attribute is there in session proceed otherwise throw the login
screen. 
-Original Message-
From: Garzon Maldonado, Jesus Javier [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 3:49 PM
To: Tomcat Users List (E-mail)
Subject: Terminating sessions problem. (bug?)


Hello all:

When a user enter in my site sessions are used to store user data. I
get the session using (request.getSession(true);). When users leave the
site the session is invalidated (request.getSession().invalidate();).
But, if users enter again from the same browser instance each call to
(request.getSession(true);) creates a new session so it's impossible to
get data associated with the session from differents servlets. If users
enter from another browser instance, sessions works fine.

I'm using Apache 1.3.20 + Tomcat 4.0.3 on windows NT, but this also
happened with Tomcat 3.2.1 and on unix platforms running Tomcat 3.2.1
standalone.

This is a bug?, Am I doing something wrong?

Thank you very much. Regards

 Jesús Javier Garzón Maldonado  
 Radar, Mando y Control 
 
 Carretera Loeches, Nº 9
28850 - Torrejón de Ardoz (ESPAÑA)
Tel: +34-91-626.82.68
[EMAIL PROTECTED]
www.indra.es

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: web-inf/classes

2002-05-07 Thread chuck amadi

Chris Shen wrote:

>this is a bizzare one. i've placed all my classes under the web-inf/classes
>with the appropriate class structure and everything, and it was working fine
>on my tomcat 3.3. yet, after i migrated it to 4.03, i tried to run it the
>first time and compiled it, and i kept on getting:
>"org.apache.jasper.JasperException: Unable to compile class for JSP
>C:\jakarta-tomcat-4.0.3\work\localhost\webauth\successfulLogin$jsp.java:3:
>Package ant.uci.edu not found in import.
>import ant.uci.edu.*;"
>
>i did place my class directory ant\uci\edu under web-inf\classes...any
>idea???
>
>Chris
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
Hi there try putting <%@ page import="ant\uci\edu" %>

Your complete dir path of your .class file in your jsp page ( page 
directive) as a apparently the class loader points to classes default 
package in j-tomcat3.3a but you can't get away from it in j-tomcat4 
upwards . I had a similar problem thus useing tomcat3.3.a for now and 
i'll upgrade and use the  classes dir path and page import directive as 
told via this user-help group.

Cheers Chuck Amadi
Sustems Programmer
Rhaglennydd Systemau




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: shutdown.sh doesn't shutdown JVM(more info)

2002-05-07 Thread Larry Isaacs

Tomcat 4.0.3 will wait forever for web applications to
shutdown any non-daemon threads they created.  If a
web application leaves such a thread running, Tomcat won't
shut down.

Cheers,
Larry

> -Original Message-
> From: Leland Chen [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, May 06, 2002 8:46 PM
> To: [EMAIL PROTECTED]; 
> [EMAIL PROTECTED]
> Subject: shutdown.sh doesn't shutdown JVM(more info)
> 
> 
> 
> 
> Hi all,
> 
> I am using tomcat4.0.3 with JDK1.4 on Solaris 8.
> 
> After I enter shutdown.sh, the JVM for tomcat is still there. 
> After several 
> round shutdown.sh and startup.sh, my Solaris machine has many 
> JVMs running.
> 
> If it shutdown web server immediately after I start the web
> server, the JVM goes away. If I login into my applicaiton after
> web server started, then shutdown, the JVM will be still there.
> 
> Anyone knows what is the reason ?
> Is this caused by some java servlets ?
> 
> Thanks,
> 
> Leland
> 
> 
> 
> 
>  
> 
> 
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat memory problem ?

2002-05-07 Thread Laura

Hi all,

my system is this: I have a solaris machine (2GB RAM) with apache 1.3.19 and 
two instances of Tomcat 4.0.3 in a load balancer configuration.

I started all three days ago: this morning I have found the two Tomcat dead. 
All my servlets didn't respond and all the system was dead.

It's terrible.

Did someone ever have this problem?
Often I read in the mail list that there is some problem in memory in Tomcat: 
is it true?

Does someone know something?


Bye


Laura

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




servlet works good the first time, but not the second time.??!!!??

2002-05-07 Thread staginfo-ar

Hi,
Tomcat runs good when I launch a servlet for the first time. But when I
launch this servlet for the second time, Tomcat print the result of the
first ( in fact Tomcat runs the prior result page saved in IE).
Thanks
Jc


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Frameset problem

2002-05-07 Thread Vincent Lambert

Hi,

I am using TC 4.0.3 with JDK 1.4 connected to apache with webapp
connector.
Every thing works find except when i call two or more JSP within a
frameset !

Did someone experience the same problem and how can I fixe it.

Thanks in advance,

Regards,
Vince

PS : My files...

httpd.conf :


ServerName www.test6.vla
DocumentRoot C:\dev\projets\FrameSet
WebAppConnection warpTest6 warp localhost:8008
WebAppDeploy test5 warpTest6 /webapp



server.xml:







index.html:











--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Classloader question

2002-05-07 Thread Larry Isaacs

The classloader diagram is found at:



Because Tomcat 3.3.x uses the JDK delagation model for
classloading, classes in the "apps" classloader take priority
over WEB-INF/classes and WEB-INF/lib.  I don't think your
approach will work because of this.

However, there is an alternate trick that might work if you want
to give it a try.  Instead of placing the "shared" classes in the
"apps" class loader, place them somewhere else and "include" them
in the webapp class loader using the additionalJars attribute of
the LoaderInterceptor11.  See:



I believe the additionalJars attribute will take directories as
well as jars.  I also believe the "additionalJars" will be
searched after WEB-INF/classes, so a different version of a
class in WEB-INF/classes will take priority over classes added
by "additionalJars".

Cheers,
Larry


> -Original Message-
> From: tamir [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 07, 2002 4:06 AM
> To: 'Tomcat Users List'
> Subject: RE: Classloader question
> 
> 
> Hi,
> I had many problems with classloaders using tomcat 3.3.1.
> I think you shouldn't be suprised by the LinkageError, cause 
> you actually
> load this class twice, once by the context class loader and 
> second by the
> apps
> class loader.
> What I don't remember is the hirarcy between these two class loaders
> (maybe you can check in the archives, and understand better what's
> happening).
> What I don't understand is why using two different versions 
> of the same
> class.
> Isn't it some kind of troublemaker?
> 
> Tamir
> 
> 
> 
> -Original Message-
> From: Mario Felarca [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 7:06 AM
> To: [EMAIL PROTECTED]
> Subject: Classloader question
> 
> 
> Hello,
> 
> I have a situation with Tomcat 3.3a where I am trying
> to allow a specific servlet context to load a version
> of a class from within their WEB-INF/classes
> directory, while other contexts on the server use a
> different version of that class that is loaded by the
> apps classloader.
> 
> I can currently get the context classloader to
> actually load the correct class, however later on
> during init, I am getting a java.lang.LinkageError
> saying that the specific class that is being loaded
> twice is violating the loader constraints.
> 
> Can anyone point me to any resources that would help
> me solve this problem? Any similar experiences or
> ideas would be greatly appreciated.
> 
> Thanks in advance,
> 
> Mario-
> 
> __
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Problem loading MySQL drivers.

2002-05-07 Thread Deep Singh Bhau

has the problem being solved???


-Original Message-
From: Diego, Emil [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 1:18 AM
To: 'Tomcat Users List'
Subject: RE: Problem loading MySQL drivers.



Where did you set the classpath ?


-Original Message-
From: Panos Konstantinidis [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 3:44 PM
To: [EMAIL PROTECTED]
Subject: Problem loading MySQL drivers.


  Hello there, I am running Tomcat 3.3.1 and JDK1.4
under Mandrake Linux 8.1 and I have a problem finding
the MySQL drivers. I have looked on the Tomcat
archives and could not find any similar questions, so
I thought I am going ot try the mailing list.

  I have created my own web app space and I have
managed to run Servlets and JSP pages successfuly but
when I am trying to load the MySQL drivers it fails
with the "java.sql.SQLException: No suitable driver"
error message. I have put the mm.mysql-2.4.0-bin.jar
file under my webapp's WEB-INF/lib folder
(WEB-INF/lib/mm.mysql-2.4.0-bin.jar) but it does not
seem to work. I thought Tomcat was going to pick it up
automatically but obviously this is not the case. I
have set up the CLASSPATH to point to the .jar file
but still no luck. I have to tell you here that I can
load it from a Java application but not from a JSP
page.

  Any help is greatly appreciated.

  Kind regards

Panos

__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

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

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


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




SessionMgmt: No Cookies sent - Instead only URL-Rewritting active - Why?

2002-05-07 Thread Lerenc, Vedran

Hi,

I was using Tomcat 3.2.1 and switched to Catalina 4.0.3 (both on Windows
2000). Now my browser (IE6.0 on Windows 2000) gets no cookies anymore. It
seems that the session management ist now handled using URL rewritting and I
don't know why.
When I test my web application using Tomcat, I get the following response:

  HTTP/1.0 200 OK
  Content-Type: text/html
  Content-Encoding: gzip
  Set-Cookie2: JSESSIONID=k76kokd041;Version=1;Discard;Path="/"
  Set-Cookie: JSESSIONID=k76kokd041;Path=/
  Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java
1.3.0_02; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)

When I test my web application using Catalina and the same browser (just
restarted), I get the following response:

  HTTP/1.1 200 OK
  Content-Type: text/html
  Date: Tue, 07 May 2002 12:15:41 GMT
  Content-Encoding: gzip
  Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector)
  Connection: close

The problem is: I am not running without cookies and need them back. Is
there a config setting I have to make somewhere?

I have not configured my web application explicitely in the server.xml file.
When I do that similar to the settings for the "examples" context shipped
with Catalina, I also don't get any cookies for my web application. Though,
for the "examples" context Catalina generates cookies:

HTTP/1.1 200 OK
Content-Type: text/html
Date: Tue, 07 May 2002 12:30:19 GMT
Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector)
Connection: close
Set-Cookie: JSESSIONID=9CD291E4F769E034E28F2E97BF40FEDC;Path=/examples

Why for the "examples" context and not for mine? Does anybody know, how to
alter this behaviour and enforce cookies to be sent back to me for my web
application?

Cheers,

Vedran

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet works good the first time, but not the second time.??!!!??

2002-05-07 Thread Deep Singh Bhau

which browser r u using???
Is it IE. If yes remove the temporary files and set the "Pages to keep
in history" to zero

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 5:43 PM
To: [EMAIL PROTECTED]
Subject: servlet works good the first time, but not the second
time.??!!!??


Hi,
Tomcat runs good when I launch a servlet for the first time. But when I
launch this servlet for the second time, Tomcat print the result of the
first ( in fact Tomcat runs the prior result page saved in IE).
Thanks
Jc


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




IIS5 and tomcat 4.0.3 via AJP

2002-05-07 Thread simpson

sorry if this is an annoying starter question but i have so far not been
able to retrieve the list faq.
 
i have IIS5 , J2SE 1.4 , J2EE 1.3.1 , tomcat 4.0.3 , and isapi_redirect.dll
installed on W2K server SP2.
isapi_redirect was downloaded from
http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3/bin/win32/i386/
isapi_redirect.dll
  as specified in the tomcat docs - AJP.HTML.
 
everything works fine when browsing on port 8080 , but trying to use port 80
causes an internal server error to be returned.
i have been over the setup many times and don't see the problem , i can't
find any indication in any log files as to what the actual problem may be.
my guess is that the tomcat docs are out of date and that the
isapi_redirect.dll v3.3 will not work woth tomcat 4 ??
 
maybe i have this concept wrong but i though that if i can access resources
directly via tomcat on 8080 using
http://127.0.0.1:8080/examples/jsp/index.html
  , that i should then also
be able to access the same via IIS / AJP using
http://127.0.0.1/examples/jsp/index.html
 .
 
the iis_redirect.log file shows :
 
   [Tue May 07 08:24:52 2002]  [jk_isapi_plugin.c (657)]: HttpFilterProc
started
   [Tue May 07 08:24:52 2002]  [jk_isapi_plugin.c (705)]: In HttpFilterProc
Virtual Host redirection of /127.0.0.1/examples/jsp/index.html
   [Tue May 07 08:24:52 2002]  [jk_uri_worker_map.c (447)]: Into
jk_uri_worker_map_t::map_uri_to_worker
   [Tue May 07 08:24:52 2002]  [jk_uri_worker_map.c (464)]: Attempting to
map URI '/127.0.0.1/examples/jsp/index.html'
   [Tue May 07 08:24:52 2002]  [jk_uri_worker_map.c (570)]:
jk_uri_worker_map_t::map_uri_to_worker, done without a match
   [Tue May 07 08:24:52 2002]  [jk_isapi_plugin.c (711)]: In HttpFilterProc
test Default redirection of /examples/jsp/index.html
   [Tue May 07 08:24:52 2002]  [jk_uri_worker_map.c (447)]: Into
jk_uri_worker_map_t::map_uri_to_worker
   [Tue May 07 08:24:52 2002]  [jk_uri_worker_map.c (464)]: Attempting to
map URI '/examples/jsp/index.html'
   [Tue May 07 08:24:52 2002]  [jk_uri_worker_map.c (489)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 ->
/examples/
   [Tue May 07 08:24:52 2002]  [jk_isapi_plugin.c (721)]: HttpFilterProc
[/examples/jsp/index.html] is a servlet url - should redirect to ajp13
   [Tue May 07 08:24:52 2002]  [jk_isapi_plugin.c (784)]: HttpFilterProc
check if [/examples/jsp/index.html] is points to the web-inf directory

 the IIS log shows :  

   2002-05-07 12:24:52 127.0.0.1 - W3SVC1 GMS06 127.0.0.1 80 GET
/jakarta/isapi_redirect.dll - 500 0 296 20 HTTP/1.1 127.0.0.1
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+Q312461;+.NET+CLR+1.0.291
4) - -
 
 
any help with this would be greatly appreciated.



RE: Terminating sessions problem. (bug?)

2002-05-07 Thread Garzon Maldonado, Jesus Javier

But the question is, If I invalidate one session I can't use the same browser to login 
again, because the session is created every time I call request.getSession(true), 
nevertheless if I don't terminate the session, and the session never time out, then 
the server will store large amounts of sessions that no longer will be used.

-Original Message-
From: Deep Singh Bhau [mailto:[EMAIL PROTECTED]]
Sent: martes 7 de mayo de 2002 13:45
To: Tomcat Users List
Subject: RE: Terminating sessions problem. (bug?)



this is not a bug. All u have to do is set some attribute in session
after successfull login and then check that attribute in each servlet.
If the attribute is there in session proceed otherwise throw the login
screen. 
-Original Message-
From: Garzon Maldonado, Jesus Javier [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 3:49 PM
To: Tomcat Users List (E-mail)
Subject: Terminating sessions problem. (bug?)


Hello all:

When a user enter in my site sessions are used to store user data. I
get the session using (request.getSession(true);). When users leave the
site the session is invalidated (request.getSession().invalidate();).
But, if users enter again from the same browser instance each call to
(request.getSession(true);) creates a new session so it's impossible to
get data associated with the session from differents servlets. If users
enter from another browser instance, sessions works fine.

I'm using Apache 1.3.20 + Tomcat 4.0.3 on windows NT, but this also
happened with Tomcat 3.2.1 and on unix platforms running Tomcat 3.2.1
standalone.

This is a bug?, Am I doing something wrong?

Thank you very much. Regards

 Jesús Javier Garzón Maldonado  
 Radar, Mando y Control 
 
 Carretera Loeches, Nº 9
28850 - Torrejón de Ardoz (ESPAÑA)
Tel: +34-91-626.82.68
[EMAIL PROTECTED]
www.indra.es

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Réf. : RE: servlet works good the first time, but not the second time.??!!!??

2002-05-07 Thread staginfo-ar


i'm ok with you but I have to do that each time I think there is an
other way to do it from a servlet or a jsp. Like in asp with the "header".
Jc


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Classloader question

2002-05-07 Thread tamir

Hi Larry,
As I understand the additionalJars attribute, it can actually state jars
outside
the WEB-INF/lib or WEB-INF/classes that will be reloaded by tomcat when one
of the jars in changed.
Is it also relevant for Catalina ?
(Is there a way to state jars to be reloaded there too ?)

Tamir

-Original Message-
From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 2:18 PM
To: 'Tomcat Users List'
Subject: RE: Classloader question


The classloader diagram is found at:



Because Tomcat 3.3.x uses the JDK delagation model for
classloading, classes in the "apps" classloader take priority
over WEB-INF/classes and WEB-INF/lib.  I don't think your
approach will work because of this.

However, there is an alternate trick that might work if you want
to give it a try.  Instead of placing the "shared" classes in the
"apps" class loader, place them somewhere else and "include" them
in the webapp class loader using the additionalJars attribute of
the LoaderInterceptor11.  See:



I believe the additionalJars attribute will take directories as
well as jars.  I also believe the "additionalJars" will be
searched after WEB-INF/classes, so a different version of a
class in WEB-INF/classes will take priority over classes added
by "additionalJars".

Cheers,
Larry


> -Original Message-
> From: tamir [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 07, 2002 4:06 AM
> To: 'Tomcat Users List'
> Subject: RE: Classloader question
> 
> 
> Hi,
> I had many problems with classloaders using tomcat 3.3.1.
> I think you shouldn't be suprised by the LinkageError, cause 
> you actually
> load this class twice, once by the context class loader and 
> second by the
> apps
> class loader.
> What I don't remember is the hirarcy between these two class loaders
> (maybe you can check in the archives, and understand better what's
> happening).
> What I don't understand is why using two different versions 
> of the same
> class.
> Isn't it some kind of troublemaker?
> 
> Tamir
> 
> 
> 
> -Original Message-
> From: Mario Felarca [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 7:06 AM
> To: [EMAIL PROTECTED]
> Subject: Classloader question
> 
> 
> Hello,
> 
> I have a situation with Tomcat 3.3a where I am trying
> to allow a specific servlet context to load a version
> of a class from within their WEB-INF/classes
> directory, while other contexts on the server use a
> different version of that class that is loaded by the
> apps classloader.
> 
> I can currently get the context classloader to
> actually load the correct class, however later on
> during init, I am getting a java.lang.LinkageError
> saying that the specific class that is being loaded
> twice is violating the loader constraints.
> 
> Can anyone point me to any resources that would help
> me solve this problem? Any similar experiences or
> ideas would be greatly appreciated.
> 
> Thanks in advance,
> 
> Mario-
> 
> __
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ?? Class Loaders, Static Initializers, Open Files ??

2002-05-07 Thread Cox, Charlie

you can move it to \common\lib which is loaded by a different class loader,
but then it will be visible to all contexts.

Using a static initializer like that will also cause problems if you try to
use the manager to control your app since manager drops the classloader and
creates a new one when you reload.

maybe instead of a static initializer, you can use a servlet's init() and
have it load on startup. This way you can use a class and utilize the
destroy() method to do your cleanup.

Charlie

> -Original Message-
> From: tamir [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 3:36 AM
> To: 'Tomcat Users List'
> Subject: RE: ?? Class Loaders, Static Initializers, Open Files ??
> 
> 
> Hi Tony,
> Here is my notion:
> What you're using is tomcat automatic class reloading. When 
> you compile
> class MyServlet tomcat
> drop it's current class loader and creates a new one which 
> loads all your
> classes again.
> I think, if you should try to remove you class XXX outside of
> web-inf/classes and
> put it tomcat_home/common/lib in a jar.
> Then, tomcat won't reload your XXX class, and your static 
> file will be ok.
> try it.
> 
> Tamir
> 
> -Original Message-
> From: Tony LaPaso [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 8:25 AM
> To: [EMAIL PROTECTED]
> Subject: ?? Class Loaders, Static Initializers, Open Files ??
> 
> 
> Hi all,
> 
> This is a core Java language issue but its roots are in servlets.
> 
> I have a servlet (running on Tomcat v4.0.3), MyServlet, which
> calls Class.forName("XXX") in it's init() method.
> 
> Now class XXX has a static initializer that opens a file for
> output and keeps it open. Later, I change the code in MyServlet
> and recompile it. The Tomcat notices the change and automatically
> loads the new version of MyServlet, using a different class
> loader than was used for the previous version.
> 
> But when the new version of MyServlet calls Class.forName("XXX"),
> the static initializer in XXX cannot open the file because the
> previous version has it open.
> 
> So even though the first class loader is being
> "dropped/abandoned", there is still a class loaded by that class
> loader (class XXX) that has a file open. And of course, I do not
> have the code for XXX.
> 
> Is there any way to specify, either to the JVM or to Tomcat, that
> the file opened by XXX's static initializer should be closed? I'm
> guessing this is "just the way it works". The previous class
> loader will be GCed, as will the previous version of MyServlet,
> but the file opened by XXX stays open until the VM goes down...
> 
> Thanks...
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet works good the first time, but not the second time.??!!!??

2002-05-07 Thread Douglas, Rory

you could also try setting the HTTP Expires header to something definitely
in the past, like 1/1/1980

something like response.setHeader("Expires","1/1/1980");


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 8:13 AM
To: [EMAIL PROTECTED]
Subject: servlet works good the first time, but not the second
time.??!!!??


Hi,
Tomcat runs good when I launch a servlet for the first time. But when I
launch this servlet for the second time, Tomcat print the result of the
first ( in fact Tomcat runs the prior result page saved in IE).
Thanks
Jc


--
To unsubscribe, e-mail:

For additional commands, e-mail:




Help with hiding resources

2002-05-07 Thread Kris Kras

Hello all,

I have an application using jsps, servlets and applets runing under Tomcat
4.03 and Struts 1.0 (win2k server).
My application is located under "C:\Tomcat4\webapps\applications\" and all
jsp files are there. Some jsps launch applets through  tags.
Applets are packaged in jars located in
"C:\Tomcat4\webapps\applications\jars\". A code fragment launching applets
looks like this:
http://www.domainmame.com/applications/jars/"; or
"http://www.domainmame.com/applications/jars/myapplet.jar"; and ultimatelly
decompiled. I would like to hide the resources (jar files and everything
else that is located in subdirectiories of "\applications\". I have tried
putting the jar files in "C:\Tomcat4\webapps\applications\WEB_INF\lib\"
where all other jar files (struts.jar, etc.) are located, but then
regardless of what I used for "archive" and "codebase" parameters in
 tag I get and file not found exception in the plugin console
(java.io.FileNotFoundException:
http://www.domainmame.com/applications/WEB-INF/lib/myapplet.jar) even though
the jar file is there.

I have tried setting the following values for "archive" and "codebase"
parameters in  tag with the jar file in
"C:\Tomcat4\webapps\applications\WEB_INF\lib\":

  archive = "myapplet.jar"
  codebase = "."

  archive = "/WEB-INF/lib/myapplet.jar"
  codebase = "."

  archive = "myapplet.jar"
  codebase = "/"

  archive = "myapplet.jar"
  codebase = "/applications/WEB-INF/lib/"

None of the combinations worked. Can anyone help me with configuring these
two parameters so the Tomcat can find myapplet.jar.

Or is there a better solution to hiding resources under Tomcat.

Any help would be greatly appreciated.

Thanks

Kris


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Classloader question

2002-05-07 Thread Larry Isaacs

I haven't actually tested the additionalJars feature with
respect to reloading. It was orignally added with non-changing
jars in mind, jasper.jar specifically.  You may have to also
specify use11Loader="true" for jar reloading to work.

I'm not aware of an equivalent feature in Tomcat 4.x.

Cheers,
Larry

> -Original Message-
> From: tamir [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 07, 2002 9:18 AM
> To: 'Tomcat Users List'
> Subject: RE: Classloader question
> 
> 
> Hi Larry,
> As I understand the additionalJars attribute, it can actually 
> state jars
> outside
> the WEB-INF/lib or WEB-INF/classes that will be reloaded by 
> tomcat when one
> of the jars in changed.
> Is it also relevant for Catalina ?
> (Is there a way to state jars to be reloaded there too ?)
> 
> Tamir
> 
> -Original Message-
> From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 2:18 PM
> To: 'Tomcat Users List'
> Subject: RE: Classloader question
> 
> 
> The classloader diagram is found at:
> 
>  l#configuring_
> classes>
> 
> Because Tomcat 3.3.x uses the JDK delagation model for
> classloading, classes in the "apps" classloader take priority
> over WEB-INF/classes and WEB-INF/lib.  I don't think your
> approach will work because of this.
> 
> However, there is an alternate trick that might work if you want
> to give it a try.  Instead of placing the "shared" classes in the
> "apps" class loader, place them somewhere else and "include" them
> in the webapp class loader using the additionalJars attribute of
> the LoaderInterceptor11.  See:
> 
>  l#LoaderInterc
> eptor11>
> 
> I believe the additionalJars attribute will take directories as
> well as jars.  I also believe the "additionalJars" will be
> searched after WEB-INF/classes, so a different version of a
> class in WEB-INF/classes will take priority over classes added
> by "additionalJars".
> 
> Cheers,
> Larry
> 
> 
> > -Original Message-
> > From: tamir [mailto:[EMAIL PROTECTED]] 
> > Sent: Tuesday, May 07, 2002 4:06 AM
> > To: 'Tomcat Users List'
> > Subject: RE: Classloader question
> > 
> > 
> > Hi,
> > I had many problems with classloaders using tomcat 3.3.1.
> > I think you shouldn't be suprised by the LinkageError, cause 
> > you actually
> > load this class twice, once by the context class loader and 
> > second by the
> > apps
> > class loader.
> > What I don't remember is the hirarcy between these two class loaders
> > (maybe you can check in the archives, and understand better what's
> > happening).
> > What I don't understand is why using two different versions 
> > of the same
> > class.
> > Isn't it some kind of troublemaker?
> > 
> > Tamir
> > 
> > 
> > 
> > -Original Message-
> > From: Mario Felarca [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 07, 2002 7:06 AM
> > To: [EMAIL PROTECTED]
> > Subject: Classloader question
> > 
> > 
> > Hello,
> > 
> > I have a situation with Tomcat 3.3a where I am trying
> > to allow a specific servlet context to load a version
> > of a class from within their WEB-INF/classes
> > directory, while other contexts on the server use a
> > different version of that class that is loaded by the
> > apps classloader.
> > 
> > I can currently get the context classloader to
> > actually load the correct class, however later on
> > during init, I am getting a java.lang.LinkageError
> > saying that the specific class that is being loaded
> > twice is violating the loader constraints.
> > 
> > Can anyone point me to any resources that would help
> > me solve this problem? Any similar experiences or
> > ideas would be greatly appreciated.
> > 
> > Thanks in advance,
> > 
> > Mario-
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! Health - your guide to health and wellness
> > http://health.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> >  [EMAIL PROTECTED]>
> > For 
> > additional commands, 
> > e-mail: 
> > 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: shutdown.sh doesn't shutdown JMV

2002-05-07 Thread Shapira, Yoav

Howdy,
Check for non-daemon threads still running somewhere in your apps, or
3rd party code you apps use.  Tomcat 4.0.2 eliminated the System.exit()
call in the shutdown code, for better compliance with embedded tomcat
users.

There's a thread about System.exit(), check the archives ;)  See also
the Thread docs about shutting down daemon vs. non-daemon threads.

Yoav Shapira
ChemInformatics


>-Original Message-
>From: Leland Chen [mailto:[EMAIL PROTECTED]]
>Sent: Monday, May 06, 2002 8:19 PM
>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: shutdown.sh doesn't shutdown JMV
>
>
>
>Hi all,
>
>I am using tomcat4.0.3. After I enter shutdown.sh, the JVM for
>tomcat is still there. After several round shutdown.sh and startup.sh,
>my Solaris machine has many JVM running.
>
>Anyone knows what is the reason ?
>
>Thanks,
>
>Leland
>
>
>_
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>--
>To unsubscribe, e-mail:   [EMAIL PROTECTED]>
>For additional commands, e-mail: [EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ?? Class Loaders, Static Initializers, Open Files ??

2002-05-07 Thread tamir

Hi Charlie,

That's a good idea. 
When  I wrote my answer, what I had in mind is loading of jni using
System.LoadLibrary, which
can't be unloaded (Afaik ???)

Tnx.

-Original Message-
From: Cox, Charlie [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 3:05 PM
To: 'Tomcat Users List'
Subject: RE: ?? Class Loaders, Static Initializers, Open Files ??


you can move it to \common\lib which is loaded by a different class loader,
but then it will be visible to all contexts.

Using a static initializer like that will also cause problems if you try to
use the manager to control your app since manager drops the classloader and
creates a new one when you reload.

maybe instead of a static initializer, you can use a servlet's init() and
have it load on startup. This way you can use a class and utilize the
destroy() method to do your cleanup.

Charlie

> -Original Message-
> From: tamir [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 3:36 AM
> To: 'Tomcat Users List'
> Subject: RE: ?? Class Loaders, Static Initializers, Open Files ??
> 
> 
> Hi Tony,
> Here is my notion:
> What you're using is tomcat automatic class reloading. When 
> you compile
> class MyServlet tomcat
> drop it's current class loader and creates a new one which 
> loads all your
> classes again.
> I think, if you should try to remove you class XXX outside of
> web-inf/classes and
> put it tomcat_home/common/lib in a jar.
> Then, tomcat won't reload your XXX class, and your static 
> file will be ok.
> try it.
> 
> Tamir
> 
> -Original Message-
> From: Tony LaPaso [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 8:25 AM
> To: [EMAIL PROTECTED]
> Subject: ?? Class Loaders, Static Initializers, Open Files ??
> 
> 
> Hi all,
> 
> This is a core Java language issue but its roots are in servlets.
> 
> I have a servlet (running on Tomcat v4.0.3), MyServlet, which
> calls Class.forName("XXX") in it's init() method.
> 
> Now class XXX has a static initializer that opens a file for
> output and keeps it open. Later, I change the code in MyServlet
> and recompile it. The Tomcat notices the change and automatically
> loads the new version of MyServlet, using a different class
> loader than was used for the previous version.
> 
> But when the new version of MyServlet calls Class.forName("XXX"),
> the static initializer in XXX cannot open the file because the
> previous version has it open.
> 
> So even though the first class loader is being
> "dropped/abandoned", there is still a class loaded by that class
> loader (class XXX) that has a file open. And of course, I do not
> have the code for XXX.
> 
> Is there any way to specify, either to the JVM or to Tomcat, that
> the file opened by XXX's static initializer should be closed? I'm
> guessing this is "just the way it works". The previous class
> loader will be GCed, as will the previous version of MyServlet,
> but the file opened by XXX stays open until the VM goes down...
> 
> Thanks...
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Re[4]: file path problem

2002-05-07 Thread Mani, Bharanidharan

jake,
  your explanation is excellent. I completely understand whats going on
now.. but again a quick question.. In jetspeed, we have template files under
Web-inf directory but the template directory is mapped in
jetspeedResources.properties file. So i should be able to access the
templates under Web-inf directory as jetspeed does. 


thanks
bharani.

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 5:40 PM
To: Tomcat Users List
Subject: Re[4]: file path problem


Hello Bharanidharan,

Ah, I didn't see that before.

You don't want to store your static files under WEB-INF.  That is
purely for servlets and other general classes and some config stuff
such as the web.xml that you don't want to have directly accessible
via the web.

You would put your html file one directory up from WEB-INF in your
"jetspeed" directory.  This is also where you would put .jsp files.

Also, you don't actually have to provide the /servlet/* mapping in
your own web.xml.  You will get that functionality already because it
is in Tomcat's default web.xml.  All you need to know is that it is
the functionality that it provides.

Now, keep in mind that nothing within WEB-INF will be accessible
without some sort of mapping.  We are using the default /servlet/
mapping that Tomcat provides.

So, when you see:

http://www.myhost.com/jetspeed/servlet/myservlet.NewLogin

The "/servlet" part of of that URL is virtual.  The mapping is
provided by the web server.  The request goes through an invoker
servlet that runs the requested servlet for you.  That is much different
than going to your
html file which should be at...

http://www.myhost.com/jetspeed/templates/vm/navigations/html/loggedinportlet
.html

Although, that assumes that you would move the root of "templates"
into the "jetspeed" directory rather than have it exist under the
WEB-INF directory.

As you can see, the server needs no mapping information for static
files other than knowing what directory or virtual directory
http://www.myhost.com/jetspeed/ points to.  After that, you just
follow the directory structure within the "jetspeed" directory to
determine the URL path to the static document.  This is not so with
servlets.  You can't just browse to a servlet at some physical path on
the disk.  You refer to servlets through servlet mappings.

BTW, if you created a directory called "servlet" to store static
files, you wouldn't be able to get to them because Tomcat would
intercept the pattern /servlet/ and try to map the named entity that
comes after that rather than serving the named entity directly from
that directory.

For instance, if you had:
/webapps/jetspeed/servlet/templates/vm/navigations/html/loggedinportlet.html

and tried to get to that page via:
http://www.myhost.com/jetspeed/servlet/templates/vm/navigations/html/loggedi
nportlet.html

Tomcat would report an http 404 error because it tries to find a
servlet to invoke named
"templates/vm/navigations/html/loggedinportlet.html" or with a
class name of "templates/vm/navigations/html/loggedinportlet.html"

Which brings to mind another trick.  You can name your servlet and get
there via the servlet-name rather than having to specify the whole
package + Servlet class name adding the following to your web.xml:


newlogin
myclasses.NewLogin


Now you can get to your servlet via the class-name:

http://www.myhost.com/jetspeed/servlet/myservlet.NewLogin

or via the servlet-name:

http://www.myhost.com/jetspeed/servlet/newlogin

You can also, then, provide your own mapping for the servlet named
"newlogin" such as:


newlogin
/login


which allows you to get to your servlet without having to go through
the default /servlet/ mapping like this:

http://www.myhost.com/jetspeed/login

notice that the "servlet-name" in "servlet" and "servlet-mapping" must
be *exactly* the same (case sensitive too).


Does that make more sense or did I just add to the confusion?

Jake

Monday, May 06, 2002, 3:14:21 PM, you wrote:

MB> Jack.. i am sorry its very complicated for me and i didnt understand
MB> anything you said.. I am new to tomcat environment. 

MB> I have a servlet under
MB> /webapps/jetspeed/Web-inf/classes/myservlet/NewLogin.class. In that
servlet
MB> i have to call a html file that is kept under
MB>
/webapps/jetspeed/Web-inf/templates/vm/navigations/html/loggedinportlet.html
MB> . 

MB> I have the following code in web.xml

MB> 
MB>   
MB> invoker
MB> /servlet/*
MB>   



MB> how do i map the html file in my NewLogin.class servlet. i still dont
get
MB> how the webpath is mapped to the system file path... 

MB> sorry for the inconvenience.

MB> please let me know..

MB> thanks
MB> bharani.
MB> -Original Message-
MB> From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
MB> Sent: Monday, May 06, 2002 3:52 PM
MB> To: Tomcat Users List
MB> Subject: Re[2]: file path problem


MB> Hello Bharanidharan,

MB> /servlet/ is a mapping provided for you by Tomcat.

R: Help with hiding resources

2002-05-07 Thread Alessio Fiore

Hi Kris, the jar that contains the applet and related classes *must* be
accessible by the browser. If not the browser could not load it and extract
the applet (throwing the java.io.FileNotFoundException).


-Messaggio originale-
Da: Kris Kras [mailto:[EMAIL PROTECTED]]
Inviato: martedì 7 maggio 2002 15.09
A: [EMAIL PROTECTED]
Oggetto: Help with hiding resources


Hello all,

I have an application using jsps, servlets and applets runing under Tomcat
4.03 and Struts 1.0 (win2k server).
My application is located under "C:\Tomcat4\webapps\applications\" and all
jsp files are there. Some jsps launch applets through  tags.
Applets are packaged in jars located in
"C:\Tomcat4\webapps\applications\jars\". A code fragment launching applets
looks like this:
http://www.domainmame.com/applications/jars/"; or
"http://www.domainmame.com/applications/jars/myapplet.jar"; and ultimatelly
decompiled. I would like to hide the resources (jar files and everything
else that is located in subdirectiories of "\applications\". I have tried
putting the jar files in "C:\Tomcat4\webapps\applications\WEB_INF\lib\"
where all other jar files (struts.jar, etc.) are located, but then
regardless of what I used for "archive" and "codebase" parameters in
 tag I get and file not found exception in the plugin console
(java.io.FileNotFoundException:
http://www.domainmame.com/applications/WEB-INF/lib/myapplet.jar) even though
the jar file is there.

I have tried setting the following values for "archive" and "codebase"
parameters in  tag with the jar file in
"C:\Tomcat4\webapps\applications\WEB_INF\lib\":

  archive = "myapplet.jar"
  codebase = "."

  archive = "/WEB-INF/lib/myapplet.jar"
  codebase = "."

  archive = "myapplet.jar"
  codebase = "/"

  archive = "myapplet.jar"
  codebase = "/applications/WEB-INF/lib/"

None of the combinations worked. Can anyone help me with configuring these
two parameters so the Tomcat can find myapplet.jar.

Or is there a better solution to hiding resources under Tomcat.

Any help would be greatly appreciated.

Thanks

Kris


--
To unsubscribe, e-mail:

For additional commands, e-mail:




- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation. 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Classloader question

2002-05-07 Thread tamir

Hi Larry,
Tnx for your information,
I'm afraid I can't use this feature as It's not compatible with
other version of tomcat...

Tamir

-Original Message-
From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 3:10 PM
To: 'Tomcat Users List'
Subject: RE: Classloader question


I haven't actually tested the additionalJars feature with
respect to reloading. It was orignally added with non-changing
jars in mind, jasper.jar specifically.  You may have to also
specify use11Loader="true" for jar reloading to work.

I'm not aware of an equivalent feature in Tomcat 4.x.

Cheers,
Larry

> -Original Message-
> From: tamir [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 07, 2002 9:18 AM
> To: 'Tomcat Users List'
> Subject: RE: Classloader question
> 
> 
> Hi Larry,
> As I understand the additionalJars attribute, it can actually 
> state jars
> outside
> the WEB-INF/lib or WEB-INF/classes that will be reloaded by 
> tomcat when one
> of the jars in changed.
> Is it also relevant for Catalina ?
> (Is there a way to state jars to be reloaded there too ?)
> 
> Tamir
> 
> -Original Message-
> From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 2:18 PM
> To: 'Tomcat Users List'
> Subject: RE: Classloader question
> 
> 
> The classloader diagram is found at:
> 
>  l#configuring_
> classes>
> 
> Because Tomcat 3.3.x uses the JDK delagation model for
> classloading, classes in the "apps" classloader take priority
> over WEB-INF/classes and WEB-INF/lib.  I don't think your
> approach will work because of this.
> 
> However, there is an alternate trick that might work if you want
> to give it a try.  Instead of placing the "shared" classes in the
> "apps" class loader, place them somewhere else and "include" them
> in the webapp class loader using the additionalJars attribute of
> the LoaderInterceptor11.  See:
> 
>  l#LoaderInterc
> eptor11>
> 
> I believe the additionalJars attribute will take directories as
> well as jars.  I also believe the "additionalJars" will be
> searched after WEB-INF/classes, so a different version of a
> class in WEB-INF/classes will take priority over classes added
> by "additionalJars".
> 
> Cheers,
> Larry
> 
> 
> > -Original Message-
> > From: tamir [mailto:[EMAIL PROTECTED]] 
> > Sent: Tuesday, May 07, 2002 4:06 AM
> > To: 'Tomcat Users List'
> > Subject: RE: Classloader question
> > 
> > 
> > Hi,
> > I had many problems with classloaders using tomcat 3.3.1.
> > I think you shouldn't be suprised by the LinkageError, cause 
> > you actually
> > load this class twice, once by the context class loader and 
> > second by the
> > apps
> > class loader.
> > What I don't remember is the hirarcy between these two class loaders
> > (maybe you can check in the archives, and understand better what's
> > happening).
> > What I don't understand is why using two different versions 
> > of the same
> > class.
> > Isn't it some kind of troublemaker?
> > 
> > Tamir
> > 
> > 
> > 
> > -Original Message-
> > From: Mario Felarca [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 07, 2002 7:06 AM
> > To: [EMAIL PROTECTED]
> > Subject: Classloader question
> > 
> > 
> > Hello,
> > 
> > I have a situation with Tomcat 3.3a where I am trying
> > to allow a specific servlet context to load a version
> > of a class from within their WEB-INF/classes
> > directory, while other contexts on the server use a
> > different version of that class that is loaded by the
> > apps classloader.
> > 
> > I can currently get the context classloader to
> > actually load the correct class, however later on
> > during init, I am getting a java.lang.LinkageError
> > saying that the specific class that is being loaded
> > twice is violating the loader constraints.
> > 
> > Can anyone point me to any resources that would help
> > me solve this problem? Any similar experiences or
> > ideas would be greatly appreciated.
> > 
> > Thanks in advance,
> > 
> > Mario-
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! Health - your guide to health and wellness
> > http://health.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> >  [EMAIL PROTECTED]>
> > For 
> > additional commands, 
> > e-mail: 
> > 
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   

RE: someone plz help

2002-05-07 Thread Tim Cronin

here's what I use.

  public static void upload
  (
HttpServletRequest request,
String uploadFolder
  ) throws IOException
  {
String cType = request.getContentType();

if (cType != null &&
cType.toLowerCase().startsWith("multipart/form-data")) 
{
MultipartRequest multi = new MultipartRequest(request,
uploadFolder);
  Enumeration files = multi.getFileNames();
if(!files.hasMoreElements())
  {
throw new IOException("No files upload");
  }
}
else
{
  throw new IOException("Invalid Content type: " + cType);
}
  }

-Original Message-
From: # Lalit Nagpal # [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 12:03 AM
To: [EMAIL PROTECTED]
Subject: someone plz help



i have set multipart/form-data tag in my html form. i
need to get a form filled in by the visitors and also
an attachment on the same form (file upload). i am
using oreilly classes. problem is when i try to get
data + file on the server using MultipartRequest class
of oreilly i get the error "content type is not
multipart". I am using MultipartRequest class
getParameter function to get the data, and the file
upload works as usual. Any Ideas why this error is
occuring.

Plz help.
Thanx in advance.

=
# Lalit Nagpal #

__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: someone plz help

2002-05-07 Thread Laura

Have you set the type of the form to Multipart?

laura

Alle 15:40, martedì 7 maggio 2002, hai scritto:
> here's what I use.
>
>   public static void upload
>   (
> HttpServletRequest request,
> String uploadFolder
>   ) throws IOException
>   {
> String cType = request.getContentType();
>
> if (cType != null &&
> cType.toLowerCase().startsWith("multipart/form-data"))
> {
>   MultipartRequest multi = new MultipartRequest(request,
> uploadFolder);
> Enumeration files = multi.getFileNames();
>   if(!files.hasMoreElements())
>   {
> throw new IOException("No files upload");
>   }
> }
> else
> {
>   throw new IOException("Invalid Content type: " + cType);
> }
>   }
>
> -Original Message-
> From: # Lalit Nagpal # [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 12:03 AM
> To: [EMAIL PROTECTED]
> Subject: someone plz help
>
>
>
> i have set multipart/form-data tag in my html form. i
> need to get a form filled in by the visitors and also
> an attachment on the same form (file upload). i am
> using oreilly classes. problem is when i try to get
> data + file on the server using MultipartRequest class
> of oreilly i get the error "content type is not
> multipart". I am using MultipartRequest class
> getParameter function to get the data, and the file
> upload works as usual. Any Ideas why this error is
> occuring.
>
> Plz help.
> Thanx in advance.
>
> =
> # Lalit Nagpal #
>
> __
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Frameset problem

2002-05-07 Thread Tim Cronin

I have the same problem.
I found this link, is this the error your getting?

http://www.tek-tips.com/gfaqs.cfm/lev2/3/lev3/22/spid/65/sfid/1552

I moved to mod_jk and all works ok.

-Original Message-
From: Vincent Lambert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 7:11 AM
To: 'Tomcat Users List'
Subject: Frameset problem


Hi,

I am using TC 4.0.3 with JDK 1.4 connected to apache with webapp
connector.
Every thing works find except when i call two or more JSP within a
frameset !

Did someone experience the same problem and how can I fixe it.

Thanks in advance,

Regards,
Vince

PS : My files...

httpd.conf :


ServerName www.test6.vla
DocumentRoot C:\dev\projets\FrameSet
WebAppConnection warpTest6 warp localhost:8008
WebAppDeploy test5 warpTest6 /webapp



server.xml:







index.html:











--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: someone plz help

2002-05-07 Thread # Lalit Nagpal #

my problem is solved  thanx tim anyway.
actually i just renamed my java file and recompiled it
and it worked. Wonder what is with IE ... was it using
cache data. Netscape was very descent and every
changes i made where detected by it in every request
that i made. wonder what the problem is with IE.

=
# Lalit Nagpal #

__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet works good the first time, but not the second time.??!!!??

2002-05-07 Thread Sexton, George

Try something like:


response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache"); 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 8:13 AM
To: [EMAIL PROTECTED]
Subject: servlet works good the first time, but not the second
time.??!!!??


Hi,
Tomcat runs good when I launch a servlet for the first time. But when I
launch this servlet for the second time, Tomcat print the result of the
first ( in fact Tomcat runs the prior result page saved in IE).
Thanks
Jc


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help with hiding resources

2002-05-07 Thread Kris Kras

Thank you Alessio,
does this mean that if I put the jar files in WEB-INF/lib directory they
will be invisible to the browser? The WEB-INF/lib directory is a
subdirectory off of the Root directory called "applications", which is the
directory hosting the jsp files launching the applets and as such it should
be accessible by the applet that the codbase points to applications
directory (at least this is my understanding). Does Tomcat prohibit the html
page generated by the  from accessing the jar files in the
WEB-INF/lib directory?  And if so do they have to be in a generic directory
off of the root directory?

Sorry if my mumbling is confusing I am just trying to understand what my
options are.

Thanks

Kris

-Original Message-
From: Alessio Fiore [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 9:37 AM
To: 'Tomcat Users List'
Subject: R: Help with hiding resources


Hi Kris, the jar that contains the applet and related classes *must* be
accessible by the browser. If not the browser could not load it and extract
the applet (throwing the java.io.FileNotFoundException).


-Messaggio originale-
Da: Kris Kras [mailto:[EMAIL PROTECTED]]
Inviato: martedì 7 maggio 2002 15.09
A: [EMAIL PROTECTED]
Oggetto: Help with hiding resources


Hello all,

I have an application using jsps, servlets and applets runing under Tomcat
4.03 and Struts 1.0 (win2k server).
My application is located under "C:\Tomcat4\webapps\applications\" and all
jsp files are there. Some jsps launch applets through  tags.
Applets are packaged in jars located in
"C:\Tomcat4\webapps\applications\jars\". A code fragment launching applets
looks like this:
http://www.domainmame.com/applications/jars/"; or
"http://www.domainmame.com/applications/jars/myapplet.jar"; and ultimatelly
decompiled. I would like to hide the resources (jar files and everything
else that is located in subdirectiories of "\applications\". I have tried
putting the jar files in "C:\Tomcat4\webapps\applications\WEB_INF\lib\"
where all other jar files (struts.jar, etc.) are located, but then
regardless of what I used for "archive" and "codebase" parameters in
 tag I get and file not found exception in the plugin console
(java.io.FileNotFoundException:
http://www.domainmame.com/applications/WEB-INF/lib/myapplet.jar) even though
the jar file is there.

I have tried setting the following values for "archive" and "codebase"
parameters in  tag with the jar file in
"C:\Tomcat4\webapps\applications\WEB_INF\lib\":

  archive = "myapplet.jar"
  codebase = "."

  archive = "/WEB-INF/lib/myapplet.jar"
  codebase = "."

  archive = "myapplet.jar"
  codebase = "/"

  archive = "myapplet.jar"
  codebase = "/applications/WEB-INF/lib/"

None of the combinations worked. Can anyone help me with configuring these
two parameters so the Tomcat can find myapplet.jar.

Or is there a better solution to hiding resources under Tomcat.

Any help would be greatly appreciated.

Thanks

Kris


--
To unsubscribe, e-mail:

For additional commands, e-mail:




- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation.



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Fwd: Re: Apache2.0.36/TC4.1/mod_jk Problem

2002-05-07 Thread Anthony W. Marino

I'm having problems trying to compile mod_jk with the following:
/jakarta-tomcat-connectors-4.1.0-src/jk/native/apache-2.0/ ./build-unix.conf

I'm getting "undefined reference ..."  messages.

Any help is appreciated!

Thanks,
Anthony



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: someone plz help

2002-05-07 Thread Tim Cronin

I set all my browsers to not cache pages when developing.
It has bitten me many times...

-Original Message-
From: # Lalit Nagpal # [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 8:59 AM
To: Tomcat Users List
Subject: RE: someone plz help


my problem is solved  thanx tim anyway.
actually i just renamed my java file and recompiled it
and it worked. Wonder what is with IE ... was it using
cache data. Netscape was very descent and every
changes i made where detected by it in every request
that i made. wonder what the problem is with IE.

=
# Lalit Nagpal #

__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




uploading status to a user

2002-05-07 Thread # Lalit Nagpal #

hye

i am using oreilly classes (MultipartRequest class)
provided by jason hunter. Is it possible for me to
show to the user who is uploading file to my server
the upload status (progress bar etc, anything). I just
do not want the user to feel that the upload is not
working and cancel the submit operation. plz help and
thanx a lot

bye

=
# Lalit Nagpal #

__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




R: Help with hiding resources

2002-05-07 Thread Alessio Fiore

>Thank you Alessio,
>does this mean that if I put the jar files in WEB-INF/lib directory they
>will be invisible to the browser? The WEB-INF/lib directory is a
>subdirectory off of the Root directory called "applications", which is the
>directory hosting the jsp files launching the applets and as such it should
>be accessible by the applet that the codbase points to applications
>directory (at least this is my understanding). Does Tomcat prohibit the
html
>page generated by the  from accessing the jar files in the
>WEB-INF/lib directory?  And if so do they have to be in a generic directory
>off of the root directory?


Yes, WEB-INF and META-INF subdirs of a tomcat context root directory are not
accessible externally (so the browser doesn't have access to any file under
these dirs). They're just accessible internally (by the server-side
application). Your applet files (.class or .jar) must be visible by the
browser, because their reference is put in JSP-generated HTML page (that is
parsed and managed by the browser itself), so you have to put them under a
subdirectory of "applications" other than WEB-INF.

Regards
Alessio

>Sorry if my mumbling is confusing I am just trying to understand what my
>options are.

>Thanks

>Kris

-Original Message-
From: Alessio Fiore [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 9:37 AM
To: 'Tomcat Users List'
Subject: R: Help with hiding resources


Hi Kris, the jar that contains the applet and related classes *must* be
accessible by the browser. If not the browser could not load it and extract
the applet (throwing the java.io.FileNotFoundException).


-Messaggio originale-
Da: Kris Kras [mailto:[EMAIL PROTECTED]]
Inviato: martedì 7 maggio 2002 15.09
A: [EMAIL PROTECTED]
Oggetto: Help with hiding resources


Hello all,

I have an application using jsps, servlets and applets runing under Tomcat
4.03 and Struts 1.0 (win2k server).
My application is located under "C:\Tomcat4\webapps\applications\" and all
jsp files are there. Some jsps launch applets through  tags.
Applets are packaged in jars located in
"C:\Tomcat4\webapps\applications\jars\". A code fragment launching applets
looks like this:
http://www.domainmame.com/applications/jars/"; or
"http://www.domainmame.com/applications/jars/myapplet.jar"; and ultimatelly
decompiled. I would like to hide the resources (jar files and everything
else that is located in subdirectiories of "\applications\". I have tried
putting the jar files in "C:\Tomcat4\webapps\applications\WEB_INF\lib\"
where all other jar files (struts.jar, etc.) are located, but then
regardless of what I used for "archive" and "codebase" parameters in
 tag I get and file not found exception in the plugin console
(java.io.FileNotFoundException:
http://www.domainmame.com/applications/WEB-INF/lib/myapplet.jar) even though
the jar file is there.

I have tried setting the following values for "archive" and "codebase"
parameters in  tag with the jar file in
"C:\Tomcat4\webapps\applications\WEB_INF\lib\":

  archive = "myapplet.jar"
  codebase = "."

  archive = "/WEB-INF/lib/myapplet.jar"
  codebase = "."

  archive = "myapplet.jar"
  codebase = "/"

  archive = "myapplet.jar"
  codebase = "/applications/WEB-INF/lib/"

None of the combinations worked. Can anyone help me with configuring these
two parameters so the Tomcat can find myapplet.jar.

Or is there a better solution to hiding resources under Tomcat.

Any help would be greatly appreciated.

Thanks

Kris


--
To unsubscribe, e-mail:

For additional commands, e-mail:




- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation.



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:




- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the

Faster application start

2002-05-07 Thread Raphael

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

once I start my Tomcat the first application that is viewed is slow to be 
executed by Tomcat. Is there any way to improve the load of a particular 
application ?
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE81+Eph2ITK4xBkFERArLIAJ4pSfGXFHUudsUD4fGFN4khvzU44wCfRBRI
lLzW3f/OmzF+zGPtwIwaYMA=
=dlZJ
-END PGP SIGNATURE-


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Should i use J2re instead of jdk in my Tomcat server ?

2002-05-07 Thread Jeff

Assuming that there aren't any other problems lurking in the darkness,
installing the j2sdk should fix the problem.

Remember, .jsp pages are REALLY templates used by Tomcat to automatically
build and compile servlets. Without the j2sdk, Tomcat can't compile the
servlets, and .jsp pages won't work. There are probably other reasons why
the j2sdk is necessary, but this is the Big One.

- Original Message -
From: "Jose Euclides da Silva Junior - DIGR.O"
<[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 4:11 PM
Subject: Should i use J2re instead of jdk in my Tomcat server ?


> Its a simple doubt. I ve downloaded the j2re1.4 version to mount my TomCat
> Jsp/Servlet environment. But,  tomcat still asking for Java  home,
whenever
> i try to start it up. So, it always returns me an error. Otherwise, i
guess
> that if i install  j2sdk (instead of jre), i will get success! Am i right?
> Regards, Euclides.
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Strange JSP Problem

2002-05-07 Thread Raphael

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Post the JSP code


Le Mardi 07 Mai 2002 12:48, Collins, Jim a écrit :
> I have a strange JSP problem with Tomcat 4. When I start Tomcat everything
> is fine and the JSP's are working OK. But when I load a particular JSP
> which always fails all other JSP's then stop working even the examples, and
> just display an empty html page, here is the html:
>
> 
> 
>  http-equiv=Content-Type>
> 
>
> I have to restart Tomcat to get the JSP's working again. If anyone has any
> ideas what is causing this it would be appreciated.
>
> Thanks
>
> Jim.
>
>
> PLEASE READ: The information contained in this email is confidential
> and intended for the named recipient(s) only. If you are not an intended
> recipient of this email you must not copy, distribute or take any
> further action in reliance on it and you should delete it and notify the
> sender immediately. Email is not a secure method of communication and
> Nomura International plc cannot accept responsibility for the accuracy
> or completeness of this message or any attachment(s). Please examine this
> email for virus infection, for which Nomura International plc accepts
> no responsibility. If verification of this email is sought then please
> request a hard copy. Unless otherwise stated any views or opinions
> presented are solely those of the author and do not represent those of
> Nomura International plc. This email is intended for informational
> purposes only and is not a solicitation or offer to buy or sell
> securities or related financial instruments. Nomura International plc is
> regulated by the Financial Services Authority and is a member of the
> London Stock Exchange.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE81+LEh2ITK4xBkFERAkLgAJ4zHQ1c/Tl3WJ1Mr9N3D264B/omHwCghPx+
K8zTvkPihhrhA3Rz3j0z5Fw=
=MrTM
-END PGP SIGNATURE-


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help with hiding resources

2002-05-07 Thread Kris Kras

Thank you Alessio for the clarification,

Regards

Kris

-Original Message-
From: Alessio Fiore [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 10:12 AM
To: 'Tomcat Users List'
Subject: R: Help with hiding resources


>Thank you Alessio,
>does this mean that if I put the jar files in WEB-INF/lib directory they
>will be invisible to the browser? The WEB-INF/lib directory is a
>subdirectory off of the Root directory called "applications", which is the
>directory hosting the jsp files launching the applets and as such it should
>be accessible by the applet that the codbase points to applications
>directory (at least this is my understanding). Does Tomcat prohibit the
html
>page generated by the  from accessing the jar files in the
>WEB-INF/lib directory?  And if so do they have to be in a generic directory
>off of the root directory?


Yes, WEB-INF and META-INF subdirs of a tomcat context root directory are not
accessible externally (so the browser doesn't have access to any file under
these dirs). They're just accessible internally (by the server-side
application). Your applet files (.class or .jar) must be visible by the
browser, because their reference is put in JSP-generated HTML page (that is
parsed and managed by the browser itself), so you have to put them under a
subdirectory of "applications" other than WEB-INF.

Regards
Alessio

>Sorry if my mumbling is confusing I am just trying to understand what my
>options are.

>Thanks

>Kris

-Original Message-
From: Alessio Fiore [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 9:37 AM
To: 'Tomcat Users List'
Subject: R: Help with hiding resources


Hi Kris, the jar that contains the applet and related classes *must* be
accessible by the browser. If not the browser could not load it and extract
the applet (throwing the java.io.FileNotFoundException).


-Messaggio originale-
Da: Kris Kras [mailto:[EMAIL PROTECTED]]
Inviato: martedì 7 maggio 2002 15.09
A: [EMAIL PROTECTED]
Oggetto: Help with hiding resources


Hello all,

I have an application using jsps, servlets and applets runing under Tomcat
4.03 and Struts 1.0 (win2k server).
My application is located under "C:\Tomcat4\webapps\applications\" and all
jsp files are there. Some jsps launch applets through  tags.
Applets are packaged in jars located in
"C:\Tomcat4\webapps\applications\jars\". A code fragment launching applets
looks like this:
http://www.domainmame.com/applications/jars/"; or
"http://www.domainmame.com/applications/jars/myapplet.jar"; and ultimatelly
decompiled. I would like to hide the resources (jar files and everything
else that is located in subdirectiories of "\applications\". I have tried
putting the jar files in "C:\Tomcat4\webapps\applications\WEB_INF\lib\"
where all other jar files (struts.jar, etc.) are located, but then
regardless of what I used for "archive" and "codebase" parameters in
 tag I get and file not found exception in the plugin console
(java.io.FileNotFoundException:
http://www.domainmame.com/applications/WEB-INF/lib/myapplet.jar) even though
the jar file is there.

I have tried setting the following values for "archive" and "codebase"
parameters in  tag with the jar file in
"C:\Tomcat4\webapps\applications\WEB_INF\lib\":

  archive = "myapplet.jar"
  codebase = "."

  archive = "/WEB-INF/lib/myapplet.jar"
  codebase = "."

  archive = "myapplet.jar"
  codebase = "/"

  archive = "myapplet.jar"
  codebase = "/applications/WEB-INF/lib/"

None of the combinations worked. Can anyone help me with configuring these
two parameters so the Tomcat can find myapplet.jar.

Or is there a better solution to hiding resources under Tomcat.

Any help would be greatly appreciated.

Thanks

Kris


--
To unsubscribe, e-mail:

For additional commands, e-mail:




- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation.



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:




- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. 

Some JSP and Beans Questions

2002-05-07 Thread Frederick Aubert


Hi,

My questions will look pretty stupid to the experts, so to avoid bugging
everyone on this list, I¹d suggest that if you want to answer them, you can
address me directly at [EMAIL PROTECTED]

I tried to build an html form linked via JSP to a Java Bean. I then tried to
access the object instantiated from the field values obtained from the form.
Everything went fine as long as I kept using associated get/set methods. I
then tried to add a new method ³connect² to my bean, just to keep things
simple I made this method not taking any parameter not returning anything
and not doing any computation, but as soon as I tried to call it it launched
a bunch of exceptions and errors. Any idea? Is it forbidden to add such
method to a bean?

I also tried to create some multiple selection box (ie. You have a box of
given values, where the user can pick any number 0-max). I then tried to get
XXX parameter back using the automated conversion into a bean with property
XXX being of type java.util.Set, but I found myself stuck when I add to
implement the setXXX method. How can I achieve this multiple arguments
recuperation?

Thanks, Frederick


---
  ("`-''-/").___..--''"`-._
   `6_ 6  )   `-.  ( ).`-.__.`)   Frederick Aubert
   (_Y_.)'  ._   )  `._ `. ``-..-'
 _..`--'_..-_/  /--'_.' ,'[EMAIL PROTECTED]
(il),-''  (li),'  ((!.-'
--- 




RE: Frameset problem

2002-05-07 Thread Abraham Fathman

What is the problem that you are having?

I had a problem in a similar context with sessions. This is because the
first url I would goto was domain.com and then I would get redirected to
server.domain.com...

Abe

-Original Message-
From: Vincent Lambert [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 07, 2002 8:11 AM
To: 'Tomcat Users List'
Subject: Frameset problem


Hi,

I am using TC 4.0.3 with JDK 1.4 connected to apache with webapp
connector. Every thing works find except when i call two or more JSP
within a frameset !

Did someone experience the same problem and how can I fixe it.

Thanks in advance,

Regards,
Vince

PS : My files...

httpd.conf :


ServerName www.test6.vla
DocumentRoot C:\dev\projets\FrameSet
WebAppConnection warpTest6 warp localhost:8008
WebAppDeploy test5 warpTest6 /webapp



server.xml:







index.html:











--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Strange JSP Problem

2002-05-07 Thread Collins, Jim

It is not the JSP itself that is causing the problem because in some cases I
can run it. I have a servlet that I use to launch all other servlets that
are typically located on NFS not under the WebRoot. When I load a JSP I copy
the JSP to the WebRoot and then instantiate JspServlet and get this to
service the request. This normally works fine unless I use a symbolic link
and Tomcat complains that the file name is to long. But when this happens I
can't display any JSP, I just get a blank screen. I did try deleting the
generated .java and .class files in the work directory and then refreshing
the web page, this did not work though the files were generated again but
the resulting html had no content.

Thanks

Jim.

> -Original Message-
> From: Raphael [mailto:[EMAIL PROTECTED]]
> Sent: 07 May 2002 15:21
> To: Tomcat Users List
> Subject: Re: Strange JSP Problem
> 
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Post the JSP code
> 
> 
> Le Mardi 07 Mai 2002 12:48, Collins, Jim a écrit :
> > I have a strange JSP problem with Tomcat 4. When I start 
> Tomcat everything
> > is fine and the JSP's are working OK. But when I load a 
> particular JSP
> > which always fails all other JSP's then stop working even 
> the examples, and
> > just display an empty html page, here is the html:
> >
> > 
> > 
> >  > http-equiv=Content-Type>
> > 
> >
> > I have to restart Tomcat to get the JSP's working again. If 
> anyone has any
> > ideas what is causing this it would be appreciated.
> >
> > Thanks
> >
> > Jim.
> >
> >
> > PLEASE READ: The information contained in this email is confidential
> > and intended for the named recipient(s) only. If you are 
> not an intended
> > recipient of this email you must not copy, distribute or take any
> > further action in reliance on it and you should delete it 
> and notify the
> > sender immediately. Email is not a secure method of 
> communication and
> > Nomura International plc cannot accept responsibility for 
> the accuracy
> > or completeness of this message or any attachment(s). 
> Please examine this
> > email for virus infection, for which Nomura International 
> plc accepts
> > no responsibility. If verification of this email is sought 
> then please
> > request a hard copy. Unless otherwise stated any views or opinions
> > presented are solely those of the author and do not 
> represent those of
> > Nomura International plc. This email is intended for informational
> > purposes only and is not a solicitation or offer to buy or sell
> > securities or related financial instruments. Nomura 
> International plc is
> > regulated by the Financial Services Authority and is a member of the
> > London Stock Exchange.
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE81+LEh2ITK4xBkFERAkLgAJ4zHQ1c/Tl3WJ1Mr9N3D264B/omHwCghPx+
> K8zTvkPihhrhA3Rz3j0z5Fw=
> =MrTM
> -END PGP SIGNATURE-
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:



PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat redirect

2002-05-07 Thread joshua wentworth

I was hoping of something within the Tomcat configuration itself since we
don't use an index.jsp file. To be more specific about my problem, Whenever
a servlet calls another servlet in Tomcat it isn't intercepting the
/servlet/ directive and replacing it with /spike/servlet/ which is what it
should be doing. Perhaps I'm overlooking something obvious in the
configuration that will do this, but I've tried putting a




Entry in the server.xml file, but that didn't seem to do it either...
Someone smack me with a clue stick and tell me what I'm doing wrong?

Josh
- Original Message -
From: "Oki DZ" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 8:17 PM
Subject: Re: Tomcat redirect


On 05/07 04:19 joshua wentworth wrote:
> I am trying to have Tomcat redirect certain requests to other applications
> or other sites. But I can't find anything in the documentation or in any
of
> the messageboards about any kind of forward or redirect function in
Tomcat.
> Is there such a function, and if so where can I find documentation on it?

You can use the following in my index.jsp, so that the main page will be
redirected to some other location: <%
response.sendRedirect(response.encodeRedirectURL(""));
%>

Oki



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Classpath problems with Tomcat4 and RedHat 7.2

2002-05-07 Thread Jose Ferrer

I am having problems reading a resource file I placed in 
/var/tomcat4/common/lib. I also tried placing it in 
/var/tomcat4/common/classes.

I wrote a small JSP which lists the classpath and I notice it prints out as 
/var/tomcat/common/lib  (missing the 4). Does anyone know where this is 
set?

Jose Ferrer



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: SessionMgmt: No Cookies sent - Instead only URL-Rewritting active

2002-05-07 Thread Jeff

I've observed the same phenomenon.

It's just a theory, but I suspect it might have to do with Internet Explorer
6 itself. I think Microsoft quietly changed IE6's default cookie-acceptance
behavior to automatically reject all cookies from sites not meeting its
criteria for auto-acceptance. Taking a wild guess, IE6 might now
automatically reject cookies from sites accessed via IP addresses that don't
resolve to a hostname.

Another possibility: a few years ago, when anti-cookie hysteria was being
fanned by magazines eager to scare naive readers and people were disabling
cookies for stupid reasons (like thinking a "malevolent cookie" could
reformat their hard drive), Microsoft quietly introduced a special anonymous
cookie-in-all-but-name ("session id") that persisted only for the duration
of a single session (I think it even went away if you browsed to another
site or were inactive for more than an hour), but could not be disabled (so
IIS could depend upon its availability and use it to track users from page
to page within the session and match the correct IIS session variables with
the right user).  I'm not sure whether Tomcat and other servlet containers
take advantage of it (or whether they'd even be ABLE to without lying to the
browser and pretending to be IIS), but I see two likely scenarios:

1) Tomcat (and other servlet containers) can't/don't use the special
anonymous session ID, and IE6 is now denying session-cookies by default
because something is triggering the behavior (non-resolvable IP, etc.)

2) Tomcat (and other servlet containers) DO use MSIE session IDs when
available, but IE6 now denies even THAT to sites that fail to meet its
criteria for acceptablity (possibly holding sites openly running a server
other than IIS to a higher standard)

>I was using Tomcat 3.2.1 and switched to Catalina 4.0.3 (both on Windows
>2000). Now my browser (IE6.0 on Windows 2000) gets no cookies anymore. It
>seems that the session management ist now handled using URL rewritting and
I
>don't know why.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re[6]: file path problem

2002-05-07 Thread Jacob Kjome

Hello Bharanidharan,

Glad I could help :-)

As for your new questionwell, only if you loaded the template in the servlet and 
then had the
servlet return the result in the response.  You wouldn't be able to
get a direct connection to the template inside the WEB-INF directory
from a browser requested http call.  You can access anything you want
anywhere on your system on the server-side with Java.

What are these "templates"?  Are they html files that are supposed to
be served up by the web server without modification?  To me,
"template" means that it provides a general structure that is ready to
be filled in with data.  That would be done by loading the template up
in the servlet, dynamically adding data where specified in the
template, and then returning the result of the structure + data to the
web client.

Maybe I'm misunderstanding something because I've never worked with
jetspeed, but that should be the way it works.

Jake

Tuesday, May 07, 2002, 8:36:10 AM, you wrote:

MB> jake,
MB>   your explanation is excellent. I completely understand whats going on
MB> now.. but again a quick question.. In jetspeed, we have template files under
MB> Web-inf directory but the template directory is mapped in
MB> jetspeedResources.properties file. So i should be able to access the
MB> templates under Web-inf directory as jetspeed does. 


MB> thanks
MB> bharani.

MB> -Original Message-
MB> From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
MB> Sent: Monday, May 06, 2002 5:40 PM
MB> To: Tomcat Users List
MB> Subject: Re[4]: file path problem


MB> Hello Bharanidharan,

MB> Ah, I didn't see that before.

MB> You don't want to store your static files under WEB-INF.  That is
MB> purely for servlets and other general classes and some config stuff
MB> such as the web.xml that you don't want to have directly accessible
MB> via the web.

MB> You would put your html file one directory up from WEB-INF in your
MB> "jetspeed" directory.  This is also where you would put .jsp files.

MB> Also, you don't actually have to provide the /servlet/* mapping in
MB> your own web.xml.  You will get that functionality already because it
MB> is in Tomcat's default web.xml.  All you need to know is that it is
MB> the functionality that it provides.

MB> Now, keep in mind that nothing within WEB-INF will be accessible
MB> without some sort of mapping.  We are using the default /servlet/
MB> mapping that Tomcat provides.

MB> So, when you see:

MB> http://www.myhost.com/jetspeed/servlet/myservlet.NewLogin

MB> The "/servlet" part of of that URL is virtual.  The mapping is
MB> provided by the web server.  The request goes through an invoker
MB> servlet that runs the requested servlet for you.  That is much different
MB> than going to your
MB> html file which should be at...

MB> http://www.myhost.com/jetspeed/templates/vm/navigations/html/loggedinportlet
MB> .html

MB> Although, that assumes that you would move the root of "templates"
MB> into the "jetspeed" directory rather than have it exist under the
MB> WEB-INF directory.

MB> As you can see, the server needs no mapping information for static
MB> files other than knowing what directory or virtual directory
MB> http://www.myhost.com/jetspeed/ points to.  After that, you just
MB> follow the directory structure within the "jetspeed" directory to
MB> determine the URL path to the static document.  This is not so with
MB> servlets.  You can't just browse to a servlet at some physical path on
MB> the disk.  You refer to servlets through servlet mappings.

MB> BTW, if you created a directory called "servlet" to store static
MB> files, you wouldn't be able to get to them because Tomcat would
MB> intercept the pattern /servlet/ and try to map the named entity that
MB> comes after that rather than serving the named entity directly from
MB> that directory.

MB> For instance, if you had:
MB> /webapps/jetspeed/servlet/templates/vm/navigations/html/loggedinportlet.html

MB> and tried to get to that page via:
MB> http://www.myhost.com/jetspeed/servlet/templates/vm/navigations/html/loggedi
MB> nportlet.html

MB> Tomcat would report an http 404 error because it tries to find a
MB> servlet to invoke named
MB> "templates/vm/navigations/html/loggedinportlet.html" or with a
MB> class name of "templates/vm/navigations/html/loggedinportlet.html"

MB> Which brings to mind another trick.  You can name your servlet and get
MB> there via the servlet-name rather than having to specify the whole
MB> package + Servlet class name adding the following to your web.xml:

MB> 
MB> newlogin
MB> myclasses.NewLogin
MB> 

MB> Now you can get to your servlet via the class-name:

MB> http://www.myhost.com/jetspeed/servlet/myservlet.NewLogin

MB> or via the servlet-name:

MB> http://www.myhost.com/jetspeed/servlet/newlogin

MB> You can also, then, provide your own mapping for the servlet named
MB> "newlogin" such as:

MB> 
MB> newlogin
MB> /login
MB> 

MB> which allows you to get to your 

Disabling URL Rewriting and relying on cookies

2002-05-07 Thread Stephanos Piperoglou

I'm developing a Web App on Tomcat 3.2.4 (and Struts 1.0.2) and I've
been using URL rewriting throughout to make everything nice and
relocateable. As has been pointed out before on this list, the first
time a browser accesses the web-app, the session id cookie is set but
cannot yet be retrieved so URL rewriting is performed even though the
browser supports cookies.

This causes all kinds of problems I want to avoid. The
";jsessionid=foobar" method is just too clunky and doesn't work well
with several other bits of the whole that don't recognise it as a query
string (a good example is when I use the Struts  tag to
set the codebase for an applet; also IE's visited links, autocomplete
passwords and other history-related functions don't work because IE
thinks it's a different page, other exaples too), and I desperately want
to disable it. Is there any way to disable session tracking via URL and
require cookies instead? They're a hard requirement for the webapp
anyway (for other reasons).

-S.


_
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: TOMCAT & SSL !!!

2002-05-07 Thread t . riteshmenon

Hi,

I was looking for the postigs under " How to enforce SSL" - if
anybody cud throw some light, as iwas unable to locate it.


thanx!

-Original Message-
From: Steve D George [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 3:48 PM
To: Tomcat Users List
Subject: Re: TOMCAT & SSL !!!



Hi, have a look for postings titled 'How to enforce SSL' that were posted
over the last few days. Assuming you have gone through the How-to-SSL
document in the tomcat docs and set up a certificate, to enforce SSL for a
certain directory in your context, you need something like this in your
web.xml.


  

  Entire Application
  /*


  trackeruser


  CONFIDENTIAL

  

  
  
BASIC
Location Tracker Application
  

The important piece is the user-data-constraint and the
transport-guarantee. This tells tomcat that all requests to the url pattern
(in my case it is the whole of my context) should be sent over HTTPS. If a
request is received over HTTP, tomcat will redirect the request at whatever
port is defined in server.xml as the 'redirectPort' for the HTTP connector.
This is probably 8443. You then need to make sure that you have an SSL only
connector on that port but I guess you should already have that if you've
got the SSL working already.

Cheers.

Steve.



 

  t.riteshmenon@iflexso

  lutions.com  To:
[EMAIL PROTECTED]
   cc:

  30/04/2002 11:10 Subject:  TOMCAT & SSL
!!!  
  Please respond to

  "Tomcat Users List"

 

 





Hi All,

My application requires that certain pages on the site are accessed via
SSL,
is
there a way in tomcat to reject the connection of http to a specific page
(ie securePage.jsp) but still allow http access to other pages (ie.
standardPage.jsp).

Also i'm using cookies - so i wanted to know whether these cookies will
be visible in both the http & https contexts.

Thanks in advance,

Ritesh


This message contains privileged and confidential information and is
intended only for the individual named.If you are not the intended
recipient
you should not disseminate,distribute,store,print, copy or deliver this
message.Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.E-mail
transmission cannot be guaranteed to be secure or error-free as information
could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or
contain viruses.The sender therefore does not accept liability for any
errors or omissions in the contents of this message which arise as a result
of e-mail transmission. If verification is required please request a
hard-copy version.



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





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

This message contains privileged and confidential information and is
intended only for the individual named.If you are not the intended recipient
you should not disseminate,distribute,store,print, copy or deliver this
message.Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.E-mail
transmission cannot be guaranteed to be secure or error-free as information
could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or
contain viruses.The sender therefore does not accept liability for any
errors or omissions in the contents of this message which arise as a result
of e-mail transmission. If verification is required please request a
hard-copy version.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE : Frameset problem

2002-05-07 Thread Vincent Lambert

Apache is not responding any more...


-Message d'origine-
De : Abraham Fathman [mailto:[EMAIL PROTECTED]] 
Envoye : mardi 7 mai 2002 16:31
A : 'Tomcat Users List'
Objet : RE: Frameset problem


What is the problem that you are having?

I had a problem in a similar context with sessions. This is because the
first url I would goto was domain.com and then I would get redirected to
server.domain.com...

Abe

-Original Message-
From: Vincent Lambert [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 07, 2002 8:11 AM
To: 'Tomcat Users List'
Subject: Frameset problem


Hi,

I am using TC 4.0.3 with JDK 1.4 connected to apache with webapp
connector. Every thing works find except when i call two or more JSP
within a frameset !

Did someone experience the same problem and how can I fixe it.

Thanks in advance,

Regards,
Vince

PS : My files...

httpd.conf :


ServerName www.test6.vla
DocumentRoot C:\dev\projets\FrameSet
WebAppConnection warpTest6 warp localhost:8008
WebAppDeploy test5 warpTest6 /webapp



server.xml:







index.html:











--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




mod_jk 2 jar file

2002-05-07 Thread Liam Morley

I'm looking for a jar file that has the mod_jk 2 connector. I know it's
bundled in the Tomcat 3 release, but I don't want to download the whole
thing just to get a few class files:( Can anybody point me to a quick
location where I can grab the class files? I'd prefer not to build them
from source, but I will if there's no other solution...

Thanks,
Liam Morley


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE-Initialize the servlet with Tomcat

2002-05-07 Thread "Bührle, Martin, FCI1"

Hi List,

we are using
Tomcat 4.0.1
mod_webapp / WARP-Connector
Apache 1.3

The servlet we are using is a CMS-System (opencms). When we are changing
Web-Content in the CMS-database we see the changes in tomcat (Port 8080)
immediately, but not in the Pages served by Apache.

The problem is, that even a Apache-Restart is not enough. We have to restart
Apache AND Tomcat to see the changes in the CMS-pages via
Apache/WARP-Connector/Tomcat.

Is there a possibility to "restart" Tomcat or the servlet "OpenCMS" in a way
that existing connections are not affected and that we can see the changes
within the content of the servlet?
I saw something like "reloadable=true" in server.xml-file, but HOW does this
work together with the WARP-Connector and Apache?

Thanks for help


Best regards
 Martin

_
Martin Buehrle, FCI1
EADS - European Aeronautic Defence and Space Company
85705 UNTERSCHLEISSHEIM
Telefax: +49 89 3179-8927
eMail: [EMAIL PROTECTED]
_




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re[2]: Tomcat redirect

2002-05-07 Thread Jacob Kjome

Hello joshua,

Well, actually, all you've done here is specify a context called
"servlet" which has it's docbase sitting on the file system as
"/spike/servlet".  This would assume that you are on a Unix system and
you have a directory called "spike" off the root of your sytem with a
directory called "servlet" inside that.

In this case, the address to your webapp would be:

http://myserver.com/servlet/

However, I would avoid calling your context "servlet" because I think
it will conflict with the default servlet mapping that Tomcat provides
for you.  In fact I think you are confusing the /servlet/* mapping that Tomcat provides
for all webapps via its default web.xml with setting up a context.

Let's assume that you place your new context in Tomcat's 'webapps"
directory and it is called "myservlets".  You can either not bother
explicitly stating the  for this webapp in the Server.xml and
let Tomcat create a default one for it, or you can go ahead and
specify it like this:



The path says that requests to http://myserver.com/myservlets refer to
a Tomcat-served Servlet context.

The docBase says where the context's directory exists on the file
system.  Here, we are saying that it exists in the current directory
(relative the webapps directory).  You could also put this elsewhere
on your file system, but you must then provide a path relative to
webapps directory by saying something like "../../../../myservlets"
which says "myservlets" is located 4 directories back from wherever
the "webapps" directory exists or you can specify a hardcoded path
like "C:\myapps\myservlets" on windows or "/myapps/myservlets" on
Unix.

Now with that set up, calling your servlet that redirects to another
servlet might go something like this:

http://myserver.com/myservlets/servlet/MyRedirectServlet

which might redirect to another servlet "MyRedirectResultServlet"

You'd have to make sure that the redirection goes to
"/servlet/MyRedirectResultServlet" in order for Tomcat to catch this
request as a request to this other servlet.

Did that answer the question or am I missing something?  Bottom line,
rename your context to something other than "servlet" to avoid
confusion.

Jake

Tuesday, May 07, 2002, 10:08:41 AM, you wrote:

jw> I was hoping of something within the Tomcat configuration itself since we
jw> don't use an index.jsp file. To be more specific about my problem, Whenever
jw> a servlet calls another servlet in Tomcat it isn't intercepting the
jw> /servlet/ directive and replacing it with /spike/servlet/ which is what it
jw> should be doing. Perhaps I'm overlooking something obvious in the
jw> configuration that will do this, but I've tried putting a
jw> 
jw>   docBase="/spike/servlet" />
jw> 

jw> Entry in the server.xml file, but that didn't seem to do it either...
jw> Someone smack me with a clue stick and tell me what I'm doing wrong?

jw> Josh
jw> - Original Message -
jw> From: "Oki DZ" <[EMAIL PROTECTED]>
jw> To: "Tomcat Users List" <[EMAIL PROTECTED]>
jw> Sent: Monday, May 06, 2002 8:17 PM
jw> Subject: Re: Tomcat redirect


jw> On 05/07 04:19 joshua wentworth wrote:
>> I am trying to have Tomcat redirect certain requests to other applications
>> or other sites. But I can't find anything in the documentation or in any
jw> of
>> the messageboards about any kind of forward or redirect function in
jw> Tomcat.
>> Is there such a function, and if so where can I find documentation on it?

jw> You can use the following in my index.jsp, so that the main page will be
jw> redirected to some other location: <%
jw> response.sendRedirect(response.encodeRedirectURL(""));
%>>

jw> Oki



jw> --
jw> To unsubscribe, e-mail:
jw> 
jw> For additional commands, e-mail:
jw> 


jw> --
jw> To unsubscribe, e-mail:   
jw> For additional commands, e-mail: 



-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: help, JDBCRealm, Why Need to authenticate three times to login

2002-05-07 Thread Eddie Bush

I'm hardly a guru, so you probably want to investigate further.  However, it
looks to me like your login page is protected by your security constraint.
I don't know if that's the problem.  I do know that my login page is outside
of my url pattern and I just have to log in one time.

Regards,

Eddie

- Original Message -
From: "Hillel Bilman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 12:50 AM
Subject: help, JDBCRealm, Why Need to authenticate three times to login


> Dear Tomcat Users
>
> I've installed tomcat v4.03 with JDBCRealm
> When you login incorrectly you go to the error
> page however if you login correctly you need to
> login three times before you can get to the
> index.jsp.
>
> Thanks for any assistance
>
>
> my web.xml is:
>
> 
>
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application 2.3//EN"
>
> "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>
>
> 
>
> 
> 2
> 
>
>   
>   
>  
> WebInterface
>  
>  /login/*
>  GET
>  POST
>   
>   
>  manager
>  customer
>   
>
>
>
>   
>  FORM
>   
>
>   
> /login/login.jsp
>
> /login/error.jsp
>   
>
>
> server.xml:
>
>   className="org.apache.catalina.realm.JDBCRealm"
> debug="99"
>
> driverName="org.postgresql.Driver"
>
>
connectionURL="jdbc:postgresql://localhost/catalina?user=dbuser;password=dbp
as
> s"
> userTable="users"
> userNameCol="user_name" userCredCol="user_pass"
>  userRoleTable="user_roles"
> roleNameCol="role_name"/>
>
> 
>docBase="bulkinterface" debug="0"
> reloadable="true" crossContext="true">
>  className="org.apache.catalina.logger.FileLogger"
>
> prefix="localhost_interface." suffix=".txt"
> timestamp="true"/>
>  
>
> I've Switched off default Memory Realm
>
> The login.jsp I've used is from the examples:
>
> 
> 
> Login Page for Examples
> 
> 
>   
> 
>   Username:
>name="j_username">
> 
> 
>   Password:
>name="j_password">
> 
> 
>value="Log In">
>   
> 
>   
> 
> 
> 
>
> Best Regards
>
> Hillel Bilman
> Manager HZB Technologies
> mailto:[EMAIL PROTECTED]
> cell:083232
> tel:(011)4436164
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: help, JDBCRealm, Why Need to authenticate three times to login

2002-05-07 Thread Barney Hamish

If I were you I'd check the error logs or the jvm.stdout or whatever. It
could be that there is a problem creating the connection to the database to
authenticate the user. If this is the case there should be error messages
indicating problems connecting to the database.

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 5:58 PM
To: Tomcat Users List
Subject: Re: help, JDBCRealm, Why Need to authenticate three times to
login


I'm hardly a guru, so you probably want to investigate further.  However, it
looks to me like your login page is protected by your security constraint.
I don't know if that's the problem.  I do know that my login page is outside
of my url pattern and I just have to log in one time.

Regards,

Eddie

- Original Message -
From: "Hillel Bilman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 12:50 AM
Subject: help, JDBCRealm, Why Need to authenticate three times to login


> Dear Tomcat Users
>
> I've installed tomcat v4.03 with JDBCRealm
> When you login incorrectly you go to the error
> page however if you login correctly you need to
> login three times before you can get to the
> index.jsp.
>
> Thanks for any assistance
>
>
> my web.xml is:
>
> 
>
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application 2.3//EN"
>
> "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>
>
> 
>
> 
> 2
> 
>
>   
>   
>  
> WebInterface
>  
>  /login/*
>  GET
>  POST
>   
>   
>  manager
>  customer
>   
>
>
>
>   
>  FORM
>   
>
>   
> /login/login.jsp
>
> /login/error.jsp
>   
>
>
> server.xml:
>
>   className="org.apache.catalina.realm.JDBCRealm"
> debug="99"
>
> driverName="org.postgresql.Driver"
>
>
connectionURL="jdbc:postgresql://localhost/catalina?user=dbuser;password=dbp
as
> s"
> userTable="users"
> userNameCol="user_name" userCredCol="user_pass"
>  userRoleTable="user_roles"
> roleNameCol="role_name"/>
>
> 
>docBase="bulkinterface" debug="0"
> reloadable="true" crossContext="true">
>  className="org.apache.catalina.logger.FileLogger"
>
> prefix="localhost_interface." suffix=".txt"
> timestamp="true"/>
>  
>
> I've Switched off default Memory Realm
>
> The login.jsp I've used is from the examples:
>
> 
> 
> Login Page for Examples
> 
> 
>   
> 
>   Username:
>name="j_username">
> 
> 
>   Password:
>name="j_password">
> 
> 
>value="Log In">
>   
> 
>   
> 
> 
> 
>
> Best Regards
>
> Hillel Bilman
> Manager HZB Technologies
> mailto:[EMAIL PROTECTED]
> cell:083232
> tel:(011)4436164
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: RE : Frameset problem

2002-05-07 Thread Whitcomb, Roger

What OS?  I have been using FRAMESET with multiple JSPs (including some that define 
APPLETS) for a while with no problems.  But I have been using mod_jk (this is on Win 
NT and Win 2K) to connect to Apache (1.3.23 and 1.3.24).

Roger Whitcomb
Computer Associates
Senior Software Engineer
Development
Phone: +1 408 965 8653
FAX: +1 408 965 8805
[EMAIL PROTECTED]  


-Original Message-
From: Vincent Lambert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 8:35 AM
To: 'Tomcat Users List'
Subject: RE : Frameset problem


Apache is not responding any more...


-Message d'origine-
De : Abraham Fathman [mailto:[EMAIL PROTECTED]] 
Envoye : mardi 7 mai 2002 16:31
A : 'Tomcat Users List'
Objet : RE: Frameset problem


What is the problem that you are having?

I had a problem in a similar context with sessions. This is because the
first url I would goto was domain.com and then I would get redirected to
server.domain.com...

Abe

-Original Message-
From: Vincent Lambert [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 07, 2002 8:11 AM
To: 'Tomcat Users List'
Subject: Frameset problem


Hi,

I am using TC 4.0.3 with JDK 1.4 connected to apache with webapp
connector. Every thing works find except when i call two or more JSP
within a frameset !

Did someone experience the same problem and how can I fixe it.

Thanks in advance,

Regards,
Vince

PS : My files...

httpd.conf :


ServerName www.test6.vla
DocumentRoot C:\dev\projets\FrameSet
WebAppConnection warpTest6 warp localhost:8008
WebAppDeploy test5 warpTest6 /webapp



server.xml:







index.html:











--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Classpath problems with Tomcat4 and RedHat 7.2

2002-05-07 Thread Larry Meadors

Do you have a CATALINA_HOME environment variable set? That might cause
this...

>>> [EMAIL PROTECTED] 05/07/02 09:21AM >>>
I am having problems reading a resource file I placed in 
/var/tomcat4/common/lib. I also tried placing it in 
/var/tomcat4/common/classes.

I wrote a small JSP which lists the classpath and I notice it prints
out as 
/var/tomcat/common/lib  (missing the 4). Does anyone know where this is

set?



Re: Does mod_webapp support name-based virtual TOMCAT hosts?

2002-05-07 Thread Jeff

Ah... ok, I just assumed that "Tomcat-Standalone" established the baseline
values that got inherited by the "Tomcat-Apache" service and were used
absent a conflicting value there.

There's still one problem, though...  I changed the appBase in the
Tomcat-Apache section to an absolute path (/export/home/jeff/tomcat), but
it's still being ignored, and Tomcat is still trying to deploy the app into
/usr/local/jakarta-tomcat-4.0.3-LE-jdk14/webapps/ (/usr/local/tomcat is a
symlink) instead.

Is this a bug with Tomcat or mod_webapp, or am I still doing something
wrong? I know that Java itself would consider "/export/home/jeff/tomcat" to
be a relative pathname under Windows (because it doesn't begin with a drive
letter), but this is running under SunOS5.8 ... so if it's being interpreted
as relative, I don't know what it could possibly be relative TO since it
begins with a slash ;-)

As an alternate theory as to what might be wrong, are there any requirements
that all the directories LEADING UP to /export/home/jeff/tomcat (/export,
/export/home, and /export/home/jeff) be read/execute for any particular
group or user, or is it sufficient for just appBase
("/export/home/jeff/tomcat") and its contents to be read/write/execute? It
hasn't bitten me in a while, but years ago I went through lots of grief over
APACHE's refusal to serve files unless it had permission to traverse the
ENTIRE path (from / to the directory)...

Thanks!



my new Tomcat-Apache section:








  
  

  
  


 
  


- Original Message -
From: "Abraham Fathman" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 9:38 PM
Subject: RE: Does mod_webapp support name-based virtual TOMCAT hosts?


> Jeff,
>
> I have this working with a very similar configuration. First of all the
> virtual-hosts you have are defined in the Tomcat-Standalone section -
> therefore they don't apply to mod_webapp which is only the Tomcat-Apache
> section.
>
> Second,
> According to your httpd.conf you are trying to connect to a webapp
> called test. Try changing your WebAppDeploy in httpd.conf to say:
>
> WebAppDeploy examples  conn  /examples/
>
> After restarting apache try
> http://tomcat.i300.net/examples/jsp/index.html
>
> When using mod_webapp all of the virtual hosting is done in httpd.conf.
> Every web app that is deployed will use it's own classloader and
> therefore it's own static variables, application object, etc...
>
> This means that you could deploy the SAME application under two
> different virtual hosts and they couldn't share static variables.
>
> Let me know if this helps,
>
> Abraham
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Appending to TOMCAT's class path

2002-05-07 Thread Tim Cronin

the startup scripts (under 4.X) for tomcat do not use the System classpath
setting
by default. In a production environment I'm fine with putting my jars
in the common\lib directory but in development I want to be able
to add my source tree to the classpath tomcat uses. once I do this by
changing the setclasspath script It stops finding internal files. one
example
is creating a custom realm. I fails to find the BaseRealm file that is
in the server\lib\catalina.jar once I add that to the script it fails to
find 
other files in additional jars.

Does anyone have a solution other than having to make a new jar file every
time
I recompile? 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Re[2]: Tomcat redirect

2002-05-07 Thread joshua wentworth

Yeah, I figured that out a bit later. The problem seems to be that Tomcat is
just ignoring the call to /servlet/Whatever.
The situation is like this, I'm trying to get as specific as possible now.
The code looks like this:
 

And if someone clicks on that button they get a 404 and Tomcat returns the
error that it can't find /servlet/CatalogServlet. This exists without any
 stuff setup in server.xml.  The problem is that in the original
call to the original servlet we have apache redirecting the request to
http://our.server.com:8080/spike/servlet/OurServlet and when OurServlet
calls OtherServlet via the code above it tries to locate it on
http://our.server.com:8080/servlet/OtherServlet and that doesn't work. It
has to have the /spike/ in there. So... Any idea how I can do that? One of
the issues is that I can't change the code in the servlet itself (Otherwise
fixing this would be trivial).

Josh

- Original Message -
From: "Jacob Kjome" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 12:01 PM
Subject: Re[2]: Tomcat redirect


> Hello joshua,
>
> Well, actually, all you've done here is specify a context called
> "servlet" which has it's docbase sitting on the file system as
> "/spike/servlet".  This would assume that you are on a Unix system and
> you have a directory called "spike" off the root of your sytem with a
> directory called "servlet" inside that.
>
> In this case, the address to your webapp would be:
>
> http://myserver.com/servlet/
>
> However, I would avoid calling your context "servlet" because I think
> it will conflict with the default servlet mapping that Tomcat provides
> for you.  In fact I think you are confusing the /servlet/* mapping that
Tomcat provides
> for all webapps via its default web.xml with setting up a context.
>
> Let's assume that you place your new context in Tomcat's 'webapps"
> directory and it is called "myservlets".  You can either not bother
> explicitly stating the  for this webapp in the Server.xml and
> let Tomcat create a default one for it, or you can go ahead and
> specify it like this:
>
> 
>
> The path says that requests to http://myserver.com/myservlets refer to
> a Tomcat-served Servlet context.
>
> The docBase says where the context's directory exists on the file
> system.  Here, we are saying that it exists in the current directory
> (relative the webapps directory).  You could also put this elsewhere
> on your file system, but you must then provide a path relative to
> webapps directory by saying something like "../../../../myservlets"
> which says "myservlets" is located 4 directories back from wherever
> the "webapps" directory exists or you can specify a hardcoded path
> like "C:\myapps\myservlets" on windows or "/myapps/myservlets" on
> Unix.
>
> Now with that set up, calling your servlet that redirects to another
> servlet might go something like this:
>
> http://myserver.com/myservlets/servlet/MyRedirectServlet
>
> which might redirect to another servlet "MyRedirectResultServlet"
>
> You'd have to make sure that the redirection goes to
> "/servlet/MyRedirectResultServlet" in order for Tomcat to catch this
> request as a request to this other servlet.
>
> Did that answer the question or am I missing something?  Bottom line,
> rename your context to something other than "servlet" to avoid
> confusion.
>
> Jake
>
> Tuesday, May 07, 2002, 10:08:41 AM, you wrote:
>
> jw> I was hoping of something within the Tomcat configuration itself since
we
> jw> don't use an index.jsp file. To be more specific about my problem,
Whenever
> jw> a servlet calls another servlet in Tomcat it isn't intercepting the
> jw> /servlet/ directive and replacing it with /spike/servlet/ which is
what it
> jw> should be doing. Perhaps I'm overlooking something obvious in the
> jw> configuration that will do this, but I've tried putting a
> jw> 
> jw>  jw>  docBase="/spike/servlet" />
> jw> 
>
> jw> Entry in the server.xml file, but that didn't seem to do it either...
> jw> Someone smack me with a clue stick and tell me what I'm doing wrong?
>
> jw> Josh
> jw> - Original Message -
> jw> From: "Oki DZ" <[EMAIL PROTECTED]>
> jw> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> jw> Sent: Monday, May 06, 2002 8:17 PM
> jw> Subject: Re: Tomcat redirect
>
>
> jw> On 05/07 04:19 joshua wentworth wrote:
> >> I am trying to have Tomcat redirect certain requests to other
applications
> >> or other sites. But I can't find anything in the documentation or in
any
> jw> of
> >> the messageboards about any kind of forward or redirect function in
> jw> Tomcat.
> >> Is there such a function, and if so where can I find documentation on
it?
>
> jw> You can use the following in my index.jsp, so that the main page will
be
> jw> redirected to some other location: <%
> jw> response.sendRedirect(response.encodeRedirectURL(""));
> %>>
>
> jw> Oki
>
>
>
> jw> --
> jw> To unsubscribe, e-mail:
> jw> 
> jw> Fo

RE: RE : Frameset problem

2002-05-07 Thread Richard Bailey

I too have been using framesets with no problem, in fact one page with a 
frameset is a jsp page.
What error are you getting?

Regards,
Richard

At 12:08 PM 2002-05-07 -0400, you wrote:
>What OS?  I have been using FRAMESET with multiple JSPs (including some 
>that define APPLETS) for a while with no problems.  But I have been using 
>mod_jk (this is on Win NT and Win 2K) to connect to Apache (1.3.23 and 1.3.24).
>
>Roger Whitcomb
>Computer Associates
>Senior Software Engineer
>Development
>Phone: +1 408 965 8653
>FAX: +1 408 965 8805
>[EMAIL PROTECTED] 
>
>
>-Original Message-
>From: Vincent Lambert [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, May 07, 2002 8:35 AM
>To: 'Tomcat Users List'
>Subject: RE : Frameset problem
>
>
>Apache is not responding any more...
>
>
>-Message d'origine-
>De : Abraham Fathman [mailto:[EMAIL PROTECTED]]
>Envoye : mardi 7 mai 2002 16:31
>A : 'Tomcat Users List'
>Objet : RE: Frameset problem
>
>
>What is the problem that you are having?
>
>I had a problem in a similar context with sessions. This is because the
>first url I would goto was domain.com and then I would get redirected to
>server.domain.com...
>
>Abe
>
>-Original Message-
>From: Vincent Lambert [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, May 07, 2002 8:11 AM
>To: 'Tomcat Users List'
>Subject: Frameset problem
>
>
>Hi,
>
>I am using TC 4.0.3 with JDK 1.4 connected to apache with webapp
>connector. Every thing works find except when i call two or more JSP
>within a frameset !
>
>Did someone experience the same problem and how can I fixe it.
>
>Thanks in advance,
>
>Regards,
>Vince
>
>PS : My files...
>
>httpd.conf :
>
>
> ServerName www.test6.vla
> DocumentRoot C:\dev\projets\FrameSet
> WebAppConnection warpTest6 warp localhost:8008
> WebAppDeploy test5 warpTest6 /webapp
>
>
>
>server.xml:
>
>
>  docBase="C:\dev\projets\FrameSet\webapp" />
>  prefix="test6." siffix=".out"
> timestamp="true"/>
>
>
>
>index.html:
>
>
> 
> 
> 
> 
> 
>
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: SessionMgmt: No Cookies sent - Instead only URL-Rewritting active

2002-05-07 Thread Brandon Cruz

You are right.  With IE6, cookies must be accompanied by a privacy policy,
which is a basic xml file.  If this policy is not supplied, then IE6 won't
allow tomcat to even set a session cookie.

There is a place at w3c.org where you can answer a bunch of questions and it
will generate the policy for you and tell you how to use it.


Brandon

-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 10:22 AM
To: Tomcat Users List
Subject: Re: SessionMgmt: No Cookies sent - Instead only URL-Rewritting
active


I've observed the same phenomenon.

It's just a theory, but I suspect it might have to do with Internet Explorer
6 itself. I think Microsoft quietly changed IE6's default cookie-acceptance
behavior to automatically reject all cookies from sites not meeting its
criteria for auto-acceptance. Taking a wild guess, IE6 might now
automatically reject cookies from sites accessed via IP addresses that don't
resolve to a hostname.

Another possibility: a few years ago, when anti-cookie hysteria was being
fanned by magazines eager to scare naive readers and people were disabling
cookies for stupid reasons (like thinking a "malevolent cookie" could
reformat their hard drive), Microsoft quietly introduced a special anonymous
cookie-in-all-but-name ("session id") that persisted only for the duration
of a single session (I think it even went away if you browsed to another
site or were inactive for more than an hour), but could not be disabled (so
IIS could depend upon its availability and use it to track users from page
to page within the session and match the correct IIS session variables with
the right user).  I'm not sure whether Tomcat and other servlet containers
take advantage of it (or whether they'd even be ABLE to without lying to the
browser and pretending to be IIS), but I see two likely scenarios:

1) Tomcat (and other servlet containers) can't/don't use the special
anonymous session ID, and IE6 is now denying session-cookies by default
because something is triggering the behavior (non-resolvable IP, etc.)

2) Tomcat (and other servlet containers) DO use MSIE session IDs when
available, but IE6 now denies even THAT to sites that fail to meet its
criteria for acceptablity (possibly holding sites openly running a server
other than IIS to a higher standard)

>I was using Tomcat 3.2.1 and switched to Catalina 4.0.3 (both on Windows
>2000). Now my browser (IE6.0 on Windows 2000) gets no cookies anymore. It
>seems that the session management ist now handled using URL rewritting and
I
>don't know why.



--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Appending to TOMCAT's class path

2002-05-07 Thread Larry Meadors

Why not put your source in the WEB-INF/classes directory of your context
or put them in any other directory, and use ant to build and have it
build the classes into that directory?
 
Larry

>>> [EMAIL PROTECTED] 05/07/02 10:12AM >>>
Does anyone have a solution other than having to make a new jar file
every
time
I recompile? 




Running an external application from a Java servlet environment

2002-05-07 Thread Helen Dawn Pringle

Dear People,

I am trying to invoke Windows Media Player from within a Java Servlet environment 
using Tomcat however I can only invoke the application but I CAN'T seem to 
automatically get it to play any content. I have to physically type in the path and 
then WIndows media player will play it. Is there any way that I can not only launch 
the media player AND play the content from within there? If I can't why not? I am 
guessing that Java Servlets have only a sandbox environment involved in there!

Regards

Helen Pringle


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Classpath problems with Tomcat4 and RedHat 7.2

2002-05-07 Thread Jose Ferrer

Yes, CATALINA_HOME is set to /var/tomcat4

Here is my simple jsp

<%@ page language="java" %>
<%@ page import = "java.util.*"  %>
<%@ page import = "java.io.*"  %>
<%  Properties prop = System.getProperties();   %>
Java class path: <%=prop.getProperty("java.class.path")%>

<%
Properties props = new Properties();
FileInputStream fin = new FileInputStream("DBConnMgr.properties");
props.load(fin);
%>

<%=props.getProperty("admin.log")%>

The java.class.path returned is
Java class path: 
/usr/java/j2sdk1.4.0/lib/tools.jar:/var/tomcat/common/lib/:/var/tomcat4/  
bin/bootstrap.jar
Notice the missing 4 in the common/lib classpath.
It is interesting that the bootstrap.jar is listed as being in /var/tomcat4 
but common/lib is listed as being in /var/tomcat. I'm still trying to 
figure out where the classpath is set. I know how to do this when tomcat is 
started from a shell but not as a daemon.

If I place the DBConnMgr.properties file in my root directory it works. 
When I place it in /var/tomcat4/common/lib (or any other supposedly valid 
classpath) it does not.

Jose Ferrer


On Tuesday, May 07, 2002 12:10 PM, Larry Meadors 
[SMTP:[EMAIL PROTECTED]] wrote:
> Do you have a CATALINA_HOME environment variable set? That might cause
> this...
>
> >>> [EMAIL PROTECTED] 05/07/02 09:21AM >>>
> I am having problems reading a resource file I placed in
> /var/tomcat4/common/lib. I also tried placing it in
> /var/tomcat4/common/classes.
>
> I wrote a small JSP which lists the classpath and I notice it prints
> out as
> /var/tomcat/common/lib  (missing the 4). Does anyone know where this is
>
> set?
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re[4]: Tomcat redirect

2002-05-07 Thread Jacob Kjome

Hello joshua,

Well, take a look at the form action:

action="/servlet/CatalogServlet"

This isn't even a servlet to servlet call.  This is a browser to
servlet call.  On top of that, you are telling the form to be
sumbmitted to http://our.server.com:8080/servlet/CatalogServlet

This tells Tomcat to look in the ROOT context and find a servlet
called "CatalogServlet".  However, you want to look in the "spike"
context.

Just change your action to the following:

Assuming you are at a web address that looks like:

http://our.server.com/spike/servlet/SomeServlet

action="CatalogServlet"

will be translated by the browser as a request to:

http://our.server.com/spike/servlet/CatalogServlet

or

if you don't want to count on being in the /spike/servlet path already
like above, then provide a hard path off the root of the web server:

action="/spike/servlet/CatalogServlet"

Which translates to the following no matter what your current URL is:

http://our.server.com/spike/servlet/CatalogServlet


If you are wondering how to dynamically write this link in your
servlet, just do:

req.getServletContext() + "/servlet/CatalogServlet"

That will translate to:

"/spike/servlet/CatalogServet" which is what you want.

Note, it also works if you are using the ROOT context since
req.getServletContext() will return "/" in that case.

Does that help?

Jake


Tuesday, May 07, 2002, 11:16:35 AM, you wrote:

jw> Yeah, I figured that out a bit later. The problem seems to be that Tomcat is
jw> just ignoring the call to /servlet/Whatever.
jw> The situation is like this, I'm trying to get as specific as possible now.
jw> The code looks like this:
jw>  >

jw> And if someone clicks on that button they get a 404 and Tomcat returns the
jw> error that it can't find /servlet/CatalogServlet. This exists without any
jw>  stuff setup in server.xml.  The problem is that in the original
jw> call to the original servlet we have apache redirecting the request to
jw> http://our.server.com:8080/spike/servlet/OurServlet and when OurServlet
jw> calls OtherServlet via the code above it tries to locate it on
jw> http://our.server.com:8080/servlet/OtherServlet and that doesn't work. It
jw> has to have the /spike/ in there. So... Any idea how I can do that? One of
jw> the issues is that I can't change the code in the servlet itself (Otherwise
jw> fixing this would be trivial).

jw> Josh

jw> - Original Message -
jw> From: "Jacob Kjome" <[EMAIL PROTECTED]>
jw> To: "Tomcat Users List" <[EMAIL PROTECTED]>
jw> Sent: Tuesday, May 07, 2002 12:01 PM
jw> Subject: Re[2]: Tomcat redirect


>> Hello joshua,
>>
>> Well, actually, all you've done here is specify a context called
>> "servlet" which has it's docbase sitting on the file system as
>> "/spike/servlet".  This would assume that you are on a Unix system and
>> you have a directory called "spike" off the root of your sytem with a
>> directory called "servlet" inside that.
>>
>> In this case, the address to your webapp would be:
>>
>> http://myserver.com/servlet/
>>
>> However, I would avoid calling your context "servlet" because I think
>> it will conflict with the default servlet mapping that Tomcat provides
>> for you.  In fact I think you are confusing the /servlet/* mapping that
jw> Tomcat provides
>> for all webapps via its default web.xml with setting up a context.
>>
>> Let's assume that you place your new context in Tomcat's 'webapps"
>> directory and it is called "myservlets".  You can either not bother
>> explicitly stating the  for this webapp in the Server.xml and
>> let Tomcat create a default one for it, or you can go ahead and
>> specify it like this:
>>
>> 
>>
>> The path says that requests to http://myserver.com/myservlets refer to
>> a Tomcat-served Servlet context.
>>
>> The docBase says where the context's directory exists on the file
>> system.  Here, we are saying that it exists in the current directory
>> (relative the webapps directory).  You could also put this elsewhere
>> on your file system, but you must then provide a path relative to
>> webapps directory by saying something like "../../../../myservlets"
>> which says "myservlets" is located 4 directories back from wherever
>> the "webapps" directory exists or you can specify a hardcoded path
>> like "C:\myapps\myservlets" on windows or "/myapps/myservlets" on
>> Unix.
>>
>> Now with that set up, calling your servlet that redirects to another
>> servlet might go something like this:
>>
>> http://myserver.com/myservlets/servlet/MyRedirectServlet
>>
>> which might redirect to another servlet "MyRedirectResultServlet"
>>
>> You'd have to make sure that the redirection goes to
>> "/servlet/MyRedirectResultServlet" in order for Tomcat to catch this
>> request as a request to this other servlet.
>>
>> Did that answer the question or am I missing something?  Bottom line,
>> rename your context to something other than "servlet" to avoid
>> confusion.
>>
>> Jake
>>
>> Tuesday, May 07, 2002, 10:08:41 AM, you wrote:
>>
>> jw> I was 

Re: Running an external application from a Java servletenvironment

2002-05-07 Thread Larry Meadors

I presume you are trying to run the code on the server?
 
If so, I did it (with winamp) by creating a play list then calling
this:
 
Runtime.getRuntime().exec(mp3PlayerPath + " " +
tmp.getAbsolutePath());
 
I suspect that the WiMP has a similar type of command line that would
do the same thing.
 
Larry

>>> [EMAIL PROTECTED] 05/07/02 10:28AM >>>
Dear People,

I am trying to invoke Windows Media Player from within a Java Servlet
environment using Tomcat however I can only invoke the application but I
CAN'T seem to automatically get it to play any content. I have to
physically type in the path and then WIndows media player will play it.
Is there any way that I can not only launch the media player AND play
the content from within there? If I can't why not? I am guessing that
Java Servlets have only a sandbox environment involved in there!




Re: Running an external application from a Java servlet environment

2002-05-07 Thread Jacob Kjome

Hello Helen,

The media player is a client side thing.  It has no clue whatsoever
that you sent the media content via a servlet or a static file.  You
just have to make sure that when you send the content in the response
that you set the appropriate mime-type.  If the user has media player
installed *and* it is associated with that mime-type, then media
player will be automatically launched on the users machine to play the
content.

Jake

Tuesday, May 07, 2002, 11:28:50 AM, you wrote:

HDP> Dear People,

HDP> I am trying to invoke Windows Media Player from within a Java Servlet environment 
using Tomcat however I can only invoke the application but I CAN'T seem to 
automatically get it to play any
HDP> content. I have to physically type in the path and then WIndows media player will 
play it. Is there any way that I can not only launch the media player AND play the 
content from within there? If
HDP> I can't why not? I am guessing that Java Servlets have only a sandbox environment 
involved in there!

HDP> Regards

HDP> Helen Pringle


HDP> __
HDP> Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

HDP> Get your own FREE, personal Netscape Mail account today at 
http://webmail.netscape.com/


HDP> --
HDP> To unsubscribe, e-mail:   
HDP> For additional commands, e-mail: 



-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Does tomcat4 do logging cleanup

2002-05-07 Thread Quinlan, William P (Bill)

Does tomcat4 do logging cleanup, such as removing accumulated backup logs and trimming 
the catalina.out log?  
Where may I find documentation on how this is done?  How do I configure the parameter 
that controls the amount of disk
space dedicated to this task?
Thanks,

Bill Quinlan 





Problems with memory

2002-05-07 Thread Rich

Hello all,

I have a fairly complex web application that appears to have a memory issue.
I've come to this conclusion by making requests to my application while
watching 'top' output. In an attempt to track this down, I made the servlet
simpler by stripping out functionality. I continued doing this until what
I'm now left with is a "Hello world" servlet. Even with this simple program,
it still appears as though I have a memory leak. Its not much, but "top"
shows an increase in memory consumption ever 5-10 requests. Finally, I just
started requesting the tomcat-docs resource ... and I get the same thing!
Again, the increase in memory usage to shows is small however the increase
does appear to be there.

Am I interpreting these results incorrectly? I am at a loss as to how to
track down a memory issue in my own servlets, if I can't start at some
baseline.

I'm running Tomcat version 4.0.3 on Linux Redhat version 6.2

Thank you,

Rich


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Re[4]: Tomcat redirect

2002-05-07 Thread joshua wentworth

Thanks, I went ahead and told the developers that they were just going to
have to fix their code to be correct. Ideally we didn't want to change the
code, we just wanted to kludge tomcat to work with the original call
(backwards compatibility issue with the code). Thanks again.

Josh
- Original Message -
From: "Jacob Kjome" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 12:38 PM
Subject: Re[4]: Tomcat redirect


> Hello joshua,
>
> Well, take a look at the form action:
>
> action="/servlet/CatalogServlet"
>
> This isn't even a servlet to servlet call.  This is a browser to
> servlet call.  On top of that, you are telling the form to be
> sumbmitted to http://our.server.com:8080/servlet/CatalogServlet
>
> This tells Tomcat to look in the ROOT context and find a servlet
> called "CatalogServlet".  However, you want to look in the "spike"
> context.
>
> Just change your action to the following:
>
> Assuming you are at a web address that looks like:
>
> http://our.server.com/spike/servlet/SomeServlet
>
> action="CatalogServlet"
>
> will be translated by the browser as a request to:
>
> http://our.server.com/spike/servlet/CatalogServlet
>
> or
>
> if you don't want to count on being in the /spike/servlet path already
> like above, then provide a hard path off the root of the web server:
>
> action="/spike/servlet/CatalogServlet"
>
> Which translates to the following no matter what your current URL is:
>
> http://our.server.com/spike/servlet/CatalogServlet
>
>
> If you are wondering how to dynamically write this link in your
> servlet, just do:
>
> req.getServletContext() + "/servlet/CatalogServlet"
>
> That will translate to:
>
> "/spike/servlet/CatalogServet" which is what you want.
>
> Note, it also works if you are using the ROOT context since
> req.getServletContext() will return "/" in that case.
>
> Does that help?
>
> Jake
>
>
> Tuesday, May 07, 2002, 11:16:35 AM, you wrote:
>
> jw> Yeah, I figured that out a bit later. The problem seems to be that
Tomcat is
> jw> just ignoring the call to /servlet/Whatever.
> jw> The situation is like this, I'm trying to get as specific as possible
now.
> jw> The code looks like this:
> jw>  >
>
> jw> And if someone clicks on that button they get a 404 and Tomcat returns
the
> jw> error that it can't find /servlet/CatalogServlet. This exists without
any
> jw>  stuff setup in server.xml.  The problem is that in the
original
> jw> call to the original servlet we have apache redirecting the request to
> jw> http://our.server.com:8080/spike/servlet/OurServlet and when
OurServlet
> jw> calls OtherServlet via the code above it tries to locate it on
> jw> http://our.server.com:8080/servlet/OtherServlet and that doesn't work.
It
> jw> has to have the /spike/ in there. So... Any idea how I can do that?
One of
> jw> the issues is that I can't change the code in the servlet itself
(Otherwise
> jw> fixing this would be trivial).
>
> jw> Josh
>
> jw> - Original Message -
> jw> From: "Jacob Kjome" <[EMAIL PROTECTED]>
> jw> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> jw> Sent: Tuesday, May 07, 2002 12:01 PM
> jw> Subject: Re[2]: Tomcat redirect
>
>
> >> Hello joshua,
> >>
> >> Well, actually, all you've done here is specify a context called
> >> "servlet" which has it's docbase sitting on the file system as
> >> "/spike/servlet".  This would assume that you are on a Unix system and
> >> you have a directory called "spike" off the root of your sytem with a
> >> directory called "servlet" inside that.
> >>
> >> In this case, the address to your webapp would be:
> >>
> >> http://myserver.com/servlet/
> >>
> >> However, I would avoid calling your context "servlet" because I think
> >> it will conflict with the default servlet mapping that Tomcat provides
> >> for you.  In fact I think you are confusing the /servlet/* mapping that
> jw> Tomcat provides
> >> for all webapps via its default web.xml with setting up a context.
> >>
> >> Let's assume that you place your new context in Tomcat's 'webapps"
> >> directory and it is called "myservlets".  You can either not bother
> >> explicitly stating the  for this webapp in the Server.xml and
> >> let Tomcat create a default one for it, or you can go ahead and
> >> specify it like this:
> >>
> >> 
> >>
> >> The path says that requests to http://myserver.com/myservlets refer to
> >> a Tomcat-served Servlet context.
> >>
> >> The docBase says where the context's directory exists on the file
> >> system.  Here, we are saying that it exists in the current directory
> >> (relative the webapps directory).  You could also put this elsewhere
> >> on your file system, but you must then provide a path relative to
> >> webapps directory by saying something like "../../../../myservlets"
> >> which says "myservlets" is located 4 directories back from wherever
> >> the "webapps" directory exists or you can specify a hardcoded path
> >> like "C:\myapps\myservlets" on windows or "/myapps/myservlets"

Directory access control?

2002-05-07 Thread Golan

Greetings:

I am wondering/hoping that it is possible to control HTTP directory access
for Tomcat via either the server's root web.xml or server.xml. Is this
possible with a STAND-ALONG Tomcat?

For example...

The system knows, automatically, to deny access to the ./WEB-INF/ directory.
How does it know this and is it possible to specify other "off limits"
directories?

Thanks.

Tal Golan
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat 4.0 DB connection pooling (using JNDI) and Oracle DB

2002-05-07 Thread Darije Ramljak

hi,

I'm having trouble getting pooled database connections using JNDI resources in 
Tomcat 40


I've tried the example from Tomcat's documentation (JNDI - how-to) and it 
worked fine for the DataSource objects

now I'm trying to use ConnectionPoolDataSource and it's just not working
I've tried everything

can someone post a "server.xml" and "web.xml" parts for configuring  JNDI 
resources for ConnectionPoolDataSource



///Darije

 H T h i n e t - - W e b M a i l 
Ova poruka poslana je upotrebom HThinet WebMail usluge.
https://webmail.hinet.hr



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Can somebody help me with this one: Choosing between standard Tomcat 4.0.3 and jdk1.4 LE

2002-05-07 Thread Sankaranarayanan (Ganesh) Ganapathy

Any hep will be greatly appreciated.

>  -Original Message-
> From: Sankaranarayanan (Ganesh) Ganapathy  
> Sent: Monday, May 06, 2002 3:05 PM
> To:   '[EMAIL PROTECTED]'
> Subject:  Choosing between standard Tomcat 4.0.3 and jdk1.4 LE
> 
> Hi All,
> 
> I want to user tomcat with jdk 1.3 and jdk 1.4.
> 
> The question I am trying to answer is if I should use the Tomcat 4.0.3 standard or 
>the JDK 1.4 LE version
> 
> The difference that is mentioned in the apache site is that standard edition 
>includes optional libraries and xml parser while the other one doesnt. I guess to run 
>the jdk1.4 LE on jdk1.2+ the user needs to add an XML parser, I understand that part. 
> 
> I dont understand what it means to have/not have the optional libraries (Tyrex, 
>JavaMail, Java Activation Framework, JNDI or JDBC standard extension) - more so about 
>tyrex, is there any functionality enabled /disabled in tomcat because of the same?  - 
>or does it mean that apps running in tomcat that use javamail api or jndi or jdbc 
>standard extension api will not work unless these are added.
> 
> Does the tomcat 4.0.3 with the optional libraries and xerces parser continue to work 
>as it is with jdk1.4?
> 
> Any help will be greatly appreicated.
> 
> Thanx in advance
> Ganesh
> 
> 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: manager reload not processing new security constraints

2002-05-07 Thread Lawlor, Frank

The application security constraints are in
its web.xml, not server.xml.

Does anyone know if reload is supposed to
process the web.xml?

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.



> -Original Message-
> From: Cox, Charlie [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 06, 2002 11:58 AM
> To: 'Tomcat Users List'
> Subject: RE: manager reload not processing new security constraints
> 
> 
> I don't think that manager reads server.xml on reload. You can use the
> manager's stop/start instead.
> 
> Charlie
> 
> > -Original Message-
> > From: Lawlor, Frank [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 06, 2002 12:09 PM
> > To: 'Tomcat (E-mail)'
> > Subject: manager reload not processing new security constraints
> > 
> > 
> > Tomcat 4.0.3:
> > 
> > If I add a security constraint to the web.xml of my application
> > and do a manager/reload of the app, it claims to have 
> > restarted the app OK, but the new constraint is not effected.
> > 
> > If I restart Tomcat, the new constraint does take effect.
> > 
> > Is this a bug in the manger reload?
> > 
> > Frank Lawlor
> > Athens Group, Inc.
> > (512) 345-0600 x151
> > Athens Group, an employee-owned consulting firm integrating 
> technology
> > strategy and software solutions.
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> > 
> > For additional commands, e-mail: 
> > 
> > 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ?? Class Loaders, Static Initializers, Open Files ??

2002-05-07 Thread Tony LaPaso

Thank you all for the replies. The unfortunate part of this is
that my servlet runs in a shared Tomcat environment so I don't
have the luxury of putting classes/JARs wherever I want.

I *will* be able to but some code in the destroy() method to
inform the XXX class that it should close the file. I was just
wondering if there was a better way..

Thanks again.




- Original Message -
From: "Cox, Charlie" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 8:05 AM
Subject: RE: ?? Class Loaders, Static Initializers, Open Files ??


> you can move it to \common\lib which is loaded by a different
class loader,
> but then it will be visible to all contexts.
>
> Using a static initializer like that will also cause problems
if you try to
> use the manager to control your app since manager drops the
classloader and
> creates a new one when you reload.
>
> maybe instead of a static initializer, you can use a servlet's
init() and
> have it load on startup. This way you can use a class and
utilize the
> destroy() method to do your cleanup.
>
> Charlie
>
> > -Original Message-
> > From: tamir [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 07, 2002 3:36 AM
> > To: 'Tomcat Users List'
> > Subject: RE: ?? Class Loaders, Static Initializers, Open
Files ??
> >
> >
> > Hi Tony,
> > Here is my notion:
> > What you're using is tomcat automatic class reloading. When
> > you compile
> > class MyServlet tomcat
> > drop it's current class loader and creates a new one which
> > loads all your
> > classes again.
> > I think, if you should try to remove you class XXX outside of
> > web-inf/classes and
> > put it tomcat_home/common/lib in a jar.
> > Then, tomcat won't reload your XXX class, and your static
> > file will be ok.
> > try it.
> >
> > Tamir
> >
> > -Original Message-
> > From: Tony LaPaso [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 07, 2002 8:25 AM
> > To: [EMAIL PROTECTED]
> > Subject: ?? Class Loaders, Static Initializers, Open Files ??
> >
> >
> > Hi all,
> >
> > This is a core Java language issue but its roots are in
servlets.
> >
> > I have a servlet (running on Tomcat v4.0.3), MyServlet, which
> > calls Class.forName("XXX") in it's init() method.
> >
> > Now class XXX has a static initializer that opens a file for
> > output and keeps it open. Later, I change the code in
MyServlet
> > and recompile it. The Tomcat notices the change and
automatically
> > loads the new version of MyServlet, using a different class
> > loader than was used for the previous version.
> >
> > But when the new version of MyServlet calls
Class.forName("XXX"),
> > the static initializer in XXX cannot open the file because
the
> > previous version has it open.
> >
> > So even though the first class loader is being
> > "dropped/abandoned", there is still a class loaded by that
class
> > loader (class XXX) that has a file open. And of course, I do
not
> > have the code for XXX.
> >
> > Is there any way to specify, either to the JVM or to Tomcat,
that
> > the file opened by XXX's static initializer should be closed?
I'm
> > guessing this is "just the way it works". The previous class
> > loader will be GCed, as will the previous version of
MyServlet,
> > but the file opened by XXX stays open until the VM goes
down...
> >
> > Thanks...
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help with hiding resources

2002-05-07 Thread Kris Kras

One more question Alessio (if you don't mind),

If I have to put the jars in a subdirectory of a tomcat context root
directory then is there any way to hide them from someone that can download
them simply by typing http://mydomainname/applications/jars/myjarfile.jar?

Thanks again.

Regards

Kris
-Original Message-
From: Alessio Fiore [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 10:12 AM
To: 'Tomcat Users List'
Subject: R: Help with hiding resources


>Thank you Alessio,
>does this mean that if I put the jar files in WEB-INF/lib directory they
>will be invisible to the browser? The WEB-INF/lib directory is a
>subdirectory off of the Root directory called "applications", which is the
>directory hosting the jsp files launching the applets and as such it should
>be accessible by the applet that the codbase points to applications
>directory (at least this is my understanding). Does Tomcat prohibit the
html
>page generated by the  from accessing the jar files in the
>WEB-INF/lib directory?  And if so do they have to be in a generic directory
>off of the root directory?


Yes, WEB-INF and META-INF subdirs of a tomcat context root directory are not
accessible externally (so the browser doesn't have access to any file under
these dirs). They're just accessible internally (by the server-side
application). Your applet files (.class or .jar) must be visible by the
browser, because their reference is put in JSP-generated HTML page (that is
parsed and managed by the browser itself), so you have to put them under a
subdirectory of "applications" other than WEB-INF.

Regards
Alessio

>Sorry if my mumbling is confusing I am just trying to understand what my
>options are.

>Thanks

>Kris

-Original Message-
From: Alessio Fiore [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 9:37 AM
To: 'Tomcat Users List'
Subject: R: Help with hiding resources


Hi Kris, the jar that contains the applet and related classes *must* be
accessible by the browser. If not the browser could not load it and extract
the applet (throwing the java.io.FileNotFoundException).


-Messaggio originale-
Da: Kris Kras [mailto:[EMAIL PROTECTED]]
Inviato: martedì 7 maggio 2002 15.09
A: [EMAIL PROTECTED]
Oggetto: Help with hiding resources


Hello all,

I have an application using jsps, servlets and applets runing under Tomcat
4.03 and Struts 1.0 (win2k server).
My application is located under "C:\Tomcat4\webapps\applications\" and all
jsp files are there. Some jsps launch applets through  tags.
Applets are packaged in jars located in
"C:\Tomcat4\webapps\applications\jars\". A code fragment launching applets
looks like this:
http://www.domainmame.com/applications/jars/"; or
"http://www.domainmame.com/applications/jars/myapplet.jar"; and ultimatelly
decompiled. I would like to hide the resources (jar files and everything
else that is located in subdirectiories of "\applications\". I have tried
putting the jar files in "C:\Tomcat4\webapps\applications\WEB_INF\lib\"
where all other jar files (struts.jar, etc.) are located, but then
regardless of what I used for "archive" and "codebase" parameters in
 tag I get and file not found exception in the plugin console
(java.io.FileNotFoundException:
http://www.domainmame.com/applications/WEB-INF/lib/myapplet.jar) even though
the jar file is there.

I have tried setting the following values for "archive" and "codebase"
parameters in  tag with the jar file in
"C:\Tomcat4\webapps\applications\WEB_INF\lib\":

  archive = "myapplet.jar"
  codebase = "."

  archive = "/WEB-INF/lib/myapplet.jar"
  codebase = "."

  archive = "myapplet.jar"
  codebase = "/"

  archive = "myapplet.jar"
  codebase = "/applications/WEB-INF/lib/"

None of the combinations worked. Can anyone help me with configuring these
two parameters so the Tomcat can find myapplet.jar.

Or is there a better solution to hiding resources under Tomcat.

Any help would be greatly appreciated.

Thanks

Kris


--
To unsubscribe, e-mail:

For additional commands, e-mail:




- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation.



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


RE: manager reload not processing new security constraints

2002-05-07 Thread Lawlor, Frank

Charlie,

Your suggestion to use stop/start worked.
I still don't know if reload is supposed
to process the web.xml (would be nice if 
this was made clear), but start/stop does
the job.

Thanks,

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.



> -Original Message-
> From: Cox, Charlie [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 06, 2002 11:58 AM
> To: 'Tomcat Users List'
> Subject: RE: manager reload not processing new security constraints
> 
> 
> I don't think that manager reads server.xml on reload. You can use the
> manager's stop/start instead.
> 
> Charlie
> 
> > -Original Message-
> > From: Lawlor, Frank [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 06, 2002 12:09 PM
> > To: 'Tomcat (E-mail)'
> > Subject: manager reload not processing new security constraints
> > 
> > 
> > Tomcat 4.0.3:
> > 
> > If I add a security constraint to the web.xml of my application
> > and do a manager/reload of the app, it claims to have 
> > restarted the app OK, but the new constraint is not effected.
> > 
> > If I restart Tomcat, the new constraint does take effect.
> > 
> > Is this a bug in the manger reload?
> > 
> > Frank Lawlor
> > Athens Group, Inc.
> > (512) 345-0600 x151
> > Athens Group, an employee-owned consulting firm integrating 
> technology
> > strategy and software solutions.
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> > 
> > For additional commands, e-mail: 
> > 
> > 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >