Progmatically retriving files in WEB-INF

2001-06-29 Thread Christopher Kirk


Hopefully somebody could point out where I am going wrong...


I am using WAR deployment under Tomcat3.2.1 on a WinNT4 box.

I have placed a file (me.txt) in the WEB-INF directory, and have written the
following servlet which tries to read the file.


public class MercuryServlet extends HttpServlet{
  public void init() throws ServletException {

InputStream inputStream
= getServletConfig().getServletContext().getResourceAsStream(me.txt);

if (inputStream == null) {
  System.out.println(NULL);
} else {
 System.out.println(NOT NULL);
}
  }
}


However, inputStream is always null!   Am I approaching this the wrong way,
or is this a bug in Tomcat?  (I have searched the bug database and failed to
find anything so I suspect my understanding of the Servlet spec is faulty).

I thought that the ServletContext object was used to access the WEB-INF
directory.. ?


Thanx in advance,

- Chris.


--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.



RE: Aw: Finding a Memory Leak in a Web Application

2001-06-28 Thread Christopher Kirk


Try using HAT (Heap Analysis Tool), you can download it from Sun. It allows
you to take snap shots of the heap at run time and exports it as HTML
pages.. letting you see just how many objects, and of what types have been
created. 

- Chris.

Brainbench MVP Java2

 -Original Message-
 From: Hunter Hillegas [mailto:[EMAIL PROTECTED]]
 Sent: 27 June 2001 23:04
 To: Tomcat User List
 Subject: Re: Aw: Finding a Memory Leak in a Web Application
 
 
 Whoops. Forgot to give my info:
 
 Tomcat 3.2.2 on JDK1.3.1 / Red Hat Linux 6.0 with updated libs.
 
 Running Apache 1.3.19 in front, using APJ12.
 
  From: [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  Date: Wed, 27 Jun 2001 23:50:55 +0200 (CEST)
  To: [EMAIL PROTECTED] 
 [EMAIL PROTECTED]
  Subject: Aw: Finding a Memory Leak in  a Web Application
  
  Simple question:
  What JDK version are you using ?`
  I had similiar problems with 1.2.x
  
  After upgrading, the were gone (an new appeared, quite 
 nomal with java i think
  :-)
 

I think my application is leaking. Over time the size of the Java process
grows but never shrinks back down.

I'm not sure of the best way to find the leak. I can't afford expensive
profiling tools like OptimizeIt, etc...

It may be something as simple as a design flaw on my part... Here's my
design:

requests come into a servlet which creates vectors of objects from database
data. These vectors are stored in the request scope and then I forward to a
JSP page where the results are displayed from the Vectors.

I assumed (incorrectly?) that since they were in the request scope they
would be garbage collected after the request was over (which is when the
page has been sent to the user, right?). Is this not the case?

Any help/suggestions anyone has would be great!

Hunter


--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.



RE: TOMCAT notSUCKS/not

2001-06-28 Thread Christopher Kirk


This raises a good point, people who put so much work into an open project
such as Tomcat are rarely praised and often have to put up with a lot of
unnecessary flak!


So lets take time out from the 'This Sucks' theme and say THANK YOU TOMCAT!



- Chris.

 -Original Message-
 From: James Radvan [mailto:[EMAIL PROTECTED]]
 Sent: 28 June 2001 10:56
 To: '[EMAIL PROTECTED]'
 Subject: RE: TOMCAT SUCKS
 
 
 I think openly criticising a product that many people have 
 worked hard to
 create and provide for your FREE use shows a remarkable lack 
 of gratitude,
 especially when you follow your blinkered criticism with a 
 request for help
 from the same people you just insulted.  If you want an 
 enterprise level
 system, pay for it.  Tomcat holds it's own against any 
 product on the market
 in it's space.
 
 -
 James Radvan
 Websphere Analyst/Architect
 London, UK
 [EMAIL PROTECTED]
 +44 7990 624899
 
 
 -Original Message-
 From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
 Sent: 28 June 2001 02:53
 To: [EMAIL PROTECTED]; Nick Stoianov
 Subject: Re: TOMCAT SUCKS
 
 On Thu, 28 Jun 2001 10:10, Nick Stoianov wrote:
  5th - I haven't met anybody in this mailing list who has a complex
  installation of Tomcat with a lot of virtual hosts , 
 different ports and
  load balancers. So - who will help me in situation like 
 this? No books ,
 no
  support, no help from the mailing list.
 
 
 
 
 Click here to visit the Argos home page http://www.argos.co.uk
 
 The information contained in this message or any of its 
 attachments may be privileged and confidential, and is 
 intended exclusively for the addressee.
 The views expressed may not be official policy, but the 
 personal views of the originator.  
 If you are not the addressee, any disclosure, reproduction, 
 distribution, dissemination or use of this communication is 
 not authorised.
 If you have received this message in error, please advise the 
 sender by using the reply facility in your e-mail software.
 All messages sent and received by Argos Ltd are monitored for 
 virus, high risk file extensions, and inappropriate content.  
 As a result users should be aware that mail may be accessed.
 
 
 


--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.



RE: Logging

2001-06-18 Thread Christopher Kirk


Best Approach:
In the Servlet 2.3 spec (So Tomcat 4.0) you could use Filters.. a Filter may
be run before or after a Servlet.. modifying what it sees, or what it
returns. 


- Chris.

 -Original Message-
 From: Roland Carlsson [mailto:[EMAIL PROTECTED]]
 Sent: 18 June 2001 9:45
 To: [EMAIL PROTECTED]
 Subject: Logging
 
 
 Hi!
 I wonder if it's possible to put a servlet or bean to 
 pre-process all or some of the requests that a tomcat-server 
 will serv? The use I'm thinking of is customized logging to 
 be able to track sessions much closer than the apache common 
 log does without have put logging-code on every page that is 
 requested.
 
 Regards
 Roland Carlsson
 
 


--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.



RE: MultiThreadModel-Problem?

2001-06-14 Thread Christopher Kirk



It isn't just 'static' variables that you have to be careful of, normal
instance variables should be avoided too.  You see, one instance of a
servlet
may service many many people (often there is only ever one instance of a
particular servlet!).

If you are sharing any data structure between threads, then you have
to protect them with synchronized blocks. That means that you could
use HashMap, even if it is being shared but you will have to make sure
that only one thread ever tries to access it at any time.. -ie by
gaining a lock on the HashMap itself.

I hope that helps, but with out seeing code I cann't be much more
exact.

- Chris.

Brainbench MVP Java2.


 -Original Message-
 From: Sebastian Schulz [mailto:[EMAIL PROTECTED]]
 Sent: 14 June 2001 16:09
 To: [EMAIL PROTECTED]
 Subject: MultiThreadModel-Problem?
 
 
 hi,
 
 i use a servlet in MultiThreadModel-mode (default).
 when 2 users at the same time makes the same request
 to the servlet (a operation that needs a bit) it seams, that
 only the request of the user who was perhaps a millisecond
 earlier is responded correct, the other seams to be ignored.
 
 (i think, this is perhaps a concurency-problem, but i do not use
 static variables and could not find an error)
 
 the second question is:  data-container like HashMap or HashSet
 are considered to be not Thread-save. Can i use such containers
 in a MultiThreadModel-Servlet or must i use only slower structures
 like Vector?
 
 your help is realy needed, many thanks
 in advance!
 
 basti
 


--

NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected.



RE: TOMCAT and ORACLE

2001-05-02 Thread Christopher Kirk



From 
my experience there are 2 things that are worth checking.


1) 
Make sure that the database has an instance named orcl in the TNA lookup (test 
the connection using Oracle tools, Net8 assistent will do).

2)If you are using 8i, then make sure that orcl 
is not a Service Name.. people often get SIDs and Service Names 
confused.

- 
Chris.


(Also, 
does 'myhost' actually exist.. or did you just change that when you posted it so 
we didn't know your machine name?)

  -Original Message-From: Lim SiewLing 
  [mailto:[EMAIL PROTECTED]]Sent: 02 May 2001 
  11:07To: [EMAIL PROTECTED]Subject: RE: 
  TOMCAT and ORACLE
  
  The connection string that I used is as follow:
  Class.forName("oracle.jdbc.driver.OracleDriver);
  Connection connection = 
  DriverManager.getConnection("jdbc:oracle:thin:@myhost:1521:orcl");
  where: myhost is the PC Name where the oracle database is resided
  Josephine
  
  From: John Towell <[EMAIL PROTECTED]>
  Reply-To: [EMAIL PROTECTED] 
  To: "'[EMAIL PROTECTED] '" 
  <[EMAIL PROTECTED]>
  Subject: RE: TOMCAT and ORACLE 
  Date: Tue, 1 May 2001 14:34:00 -0500 
  MIME-Version: 1.0 
  Received: from [64.208.42.41] by hotmail.com (3.2) with ESMTP 
  id MHotMailBCB85AA400C0400438AC40D02A29080E0; Tue May 01 12:33:56 2001 
  Received: (qmail 90123 invoked by uid 500); 1 May 2001 19:33:45 
  - 
  Received: (qmail 90094 invoked from network); 1 May 2001 
  19:33:43 - 
  Received: from cscexchange.cc.edu (140.104.1.155) by 
  h31.sny.collab.net with SMTP; 1 May 2001 19:33:43 - 
  Received: by cscexchange.cc.edu with Internet Mail Service 
  (5.5.2653.19)id ; Tue, 1 May 2001 14:34:05 -0500 
  From tomcat-user-return-33265-siewlinglim Tue May 01 12:35:14 
  2001 
  Mailing-List: contact [EMAIL PROTECTED]; run 
  by ezmlm 
  Precedence: bulk 
  list-help: 
  list-unsubscribe: 
  
  list-post: 
  Delivered-To: mailing list [EMAIL PROTECTED] 
  Message-ID: 
  [EMAIL PROTECTED] 
  X-Mailer: Internet Mail Service (5.5.2653.19) 
  X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 
   
  Hi Lim 
   
  It would help to see the connection string you're using ... 
   
  John 
   
  -Original Message- 
  From: Lim SiewLing 
  To: [EMAIL PROTECTED] 
  Sent: 5/1/01 2:22 PM 
  Subject: TOMCAT and ORACLE 
   
  Hi, 
  I'm currently engaged on a school project which uses 
  Tomcat3.2.1, ORACLE 
  and Java to develop an intranet application. 
  My program run smoothly when retrieving data in Access database 
  but the 
  data could not be retrieve using ORACLE. The error message that 
  I get is 
  "The Network adapter could not establish a connection". 
  Could anyone please help me by telling me what is the problems 
  of 
  connecting the Tomcat to the ORACLE? I had start the listener 
  and the 
  ORACLE database but still got the same error. 
  Do I need to configure the server.xml or web.xml file? Please 
  help 
  meYour help will be very much appreciated. 
   
  Regards, 
  Josephine 
   
   _ 
   
  Get Your Private, Free E-mail from MSN Hotmail at 
  http://www.hotmail.com 
   . 
   
   
  
  
  Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
  

-
This e-mail is intended only for the addressee(s) named above. It
may contain confidential or privileged information and if you are
not the intended addressee you are not  authorized  to  disclose,
copy, distribute or place any reliance on it  whatsoever  and  we
request that you inform our  postmaster ([EMAIL PROTECTED]) that
you have received this e-mail. Any attachment(s) to this  message
has been checked for viruses, but please rely on your  own  virus
checker and procedures. If you contact  us  by  e-mail,  we  will
store your name and address to facilitate communications.
-



RE: TOMCAT and ORACLE

2001-05-02 Thread Christopher Kirk



Your 
problem is the service name, the string you used was meant to use a SID.. try 
the following instead, it uses the service name as specified from your 
TNS.


jdbc:oracle:thin:@(description=(address=(host=myhost)(protocol=tcp)(port=1521))(connect_data=(service_name=oracle


  -Original Message-From: Lim SiewLing 
  [mailto:[EMAIL PROTECTED]]Sent: 02 May 2001 
  11:14To: [EMAIL PROTECTED]Subject: RE:
  TOMCAT and ORACLE
  
  The contents of my TnsName.ora is as follow:
  HRPDB =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(PORT = 1521)(HOST = myhost))
  )
  (CONNECT_DATA =
  (SERVICE_NAME = oracle)
  )
  )
  beside, I could connect to the database using SQL+.
  Regards,
  Josephine
  
  From: "Herrick, Chuck" <[EMAIL PROTECTED]>
  Reply-To: [EMAIL PROTECTED] 
  To: "'[EMAIL PROTECTED]'" 
  <[EMAIL PROTECTED]>
  Subject: RE: TOMCAT and ORACLE 
  Date: Tue, 1 May 2001 14:40:53 -0500 
  MIME-Version: 1.0 
  Received: from [64.208.42.41] by hotmail.com (3.2) with ESMTP 
  id MHotMailBCB8622100324004324F40D02A290EFB0; Tue May 01 13:05:53 2001 
  Received: (qmail 44949 invoked by uid 500); 1 May 2001 20:05:40 
  - 
  Received: (qmail 44931 invoked from network); 1 May 2001
  20:05:39 - 
  Received: from hqfirex1.agedwards.com (192.52.184.62) by
  h31.sny.collab.net with SMTP; 1 May 2001 20:05:39 - 
  Received: from hqmswpn1.agedwards.com by hqfirex1.agedwards.com 
  via smtpd (for h31.sny.collab.net [64.208.42.41]) with SMTP; 1 May 2001
  20:05:43 UT 
  Received: from hqhampn2.agedwards.com (hqhampn2.agedwards.com) 
  by hqmswpn1.agedwards.com (Content Technologies SMTPRS 4.2.1) with ESMTP id 
  <[EMAIL PROTECTED]>for 
  <[EMAIL PROTECTED]>; Tue, 1 May 2001 15:00:06 -0500 
  Received: from hqexchn2.agedwards.com (unverified) by 
  hqhampn2.agedwards.com (Content Technologies SMTPRS 2.0.15) with ESMTP id
  <[EMAIL PROTECTED]>for <[EMAIL PROTECTED]>; Tue, 
  01 May 2001 14:35:27 -0500 
  Received: by hqexchn2.agedwards.com with Internet Mail Service 
  (5.5.2650.21)id ; Tue, 1 May 2001 14:35:27 -0500 
  From tomcat-user-return-33269-siewlinglim Tue May 01 13:07:19 
  2001 
  Mailing-List: contact [EMAIL PROTECTED]; run 
  by ezmlm 
  Precedence: bulk 
  list-help: 
  list-unsubscribe: 
  
  list-post: 
  Delivered-To: mailing list [EMAIL PROTECTED]
  Message-Id: 
  <[EMAIL PROTECTED]>
  X-Mailer: Internet Mail Service (5.5.2650.21) 
  X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 
   
  It would also help to know if you've been able to connect to 
  your Oracle 
  using SQL+. And, the contents of your TNSNames.ora file.
   
-Original Message- 
From: John Towell [SMTP:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 2:34 PM 
To: '[EMAIL PROTECTED] ' 
Subject: RE: TOMCAT and ORACLE 

Hi Lim 

It would help to see the connection string you're using 
  ... 

John 

-Original Message- 
From: Lim SiewLing 
To: [EMAIL PROTECTED] 
Sent: 5/1/01 2:22 PM 
Subject: TOMCAT and ORACLE 

Hi, 
I'm currently engaged on a school project which uses
  Tomcat3.2.1, ORACLE 
and Java to develop an intranet application. 
My program run smoothly when retrieving data in Access 
  database but the 
data could not be retrieve using ORACLE. The error
  message that I get is 
"The Network adapter could not establish a connection". 
Could anyone please help me by telling me what is the 
  problems of 
connecting the Tomcat to the ORACLE? I had start the
  listener and the 
ORACLE database but still got the same error. 
Do I need to configure the server.xml or web.xml file? 
  Please help 
meYour help will be very much appreciated. 

Regards, 
Josephine 

_ 

Get Your Private, Free E-mail from MSN Hotmail at 
  http://www.hotmail.com 
. 

   
   
  *** 

  WARNING: All e-mail sent to and from this address will be
  received or 
  otherwise recorded by the A.G. Edwards corporate e-mail system 
  and is 
  subject to archival, monitoring or review by, and/or disclosure 
  to, 
  someone other than the recipient. 
  *** 

  
  
  Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
  

-
This e-mail is intended only for the addressee(s) named above. It
may contain confidential or privileged information and if you are
not the intended addressee you are not  authorized  to  disclose,
copy, distribute or place any reliance on it  whatsoever  and  we
request that you inform our  postmaster ([EMAIL PROTECTED]) that
you have received this e-mail. Any attachment(s) to this  message
has been checked for 

RE: Please urgent : Why french accentual characters (like à è) not display

2001-04-25 Thread Christopher Kirk


I don't know enough about your setup to be sure, but I have been hit by a
problem similar to this on a Solaris box running IPlanet. The problem was
that the file holding the translations was stored using a different encoding
to the one that was being used to read in the file. You have to be careful
with file encodings, especially as Java attempts to default to a file
encoding that it _believes_ is appropriate.. it can be wrong.  There is a
system property that can override the default.. I forget what it is though.
However all file streams can have the encoding explicetly set.


- Chris.



 -Original Message-
 From: William Kaufman [mailto:[EMAIL PROTECTED]]
 Sent: 25 April 2001 17:10
 To: '[EMAIL PROTECTED]'
 Subject: RE: Please urgent : Why french accentual characters 
 (like à è)
 not display
 
 
 OK, so it's not a browser issue: the characters are getting 
 damaged before
 they even get to the browser.  (Look at the page source--it's 
 got ?s in
 it.)
 
 Are you even sure the characters are right when you hand them 
 off to Tomcat?
 The reason I ask is that Oracle turns non-ASCII characters 
 into ? if you
 didn't set its language correctly.
 
 Try printing your data to System.err in your application 
 before writing it
 to the browser: if there are inappropriate question marks, 
 it's getting
 damaged by whatever you're using to read the data, not by 
 Tomcat or the
 browser: make sure your language in Java and whatever else 
 you're using is
 set correctly.
 
 -- Bill K.
 
 
  -Original Message-
  From: iscnet isc [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, April 25, 2001 8:48 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Please urgent : Why french accentual characters 
  (like à è)
  not display
  
  
  Yes, I have a problem whehn generating the french accentual 
 charcters,
  I seen them in IE 4 and 5, I always try in local network with 
  the IIS, it 
  works fine, but if I try with TOMCAT (which is installed in 
  our internet 
  server) it replaces all my accentual characters with ?, To 
  see really the 
  problem, please visit :
  http://www.isc-net.com/213bus   and try internet in search 
  (call to my 
  servlet)
  
  
  From: Sam Newman [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: Please urgent : Why french accentual characters 
  (like à è) not 
  display Date: Wed, 25 Apr 2001 16:31:41 +0100
  
  you mean in the browser? Have you tried using another 
  browser, or can you
  see the character in a normal static page?
  
  sam
  - Original Message -
  From: iscnet isc [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, April 25, 2001 4:26 PM
  Subject: Please urgent : Why french accentual characters 
  (like à è) not
  display
  
  
Hello,
I use tomcat, I wrote a servlet which works fine, but i 
  have a problem 
  in
the french accentual characters, they always are replaced 
  by ? character
Can some one help me?
   
Thank you

  _
  
Get Your Private, Free E-mail from MSN Hotmail at 
  http://www.hotmail.com.
   
  
  
  __
  ___
  Get Your Private, Free E-mail from MSN Hotmail at 
 http://www.hotmail.com.
 


-
This e-mail is intended only for the addressee(s) named above. It
may contain confidential or privileged information and if you are
not the intended addressee you are not  authorized  to  disclose,
copy, distribute or place any reliance on it  whatsoever  and  we
request that you inform our  postmaster ([EMAIL PROTECTED]) that
you have received this e-mail. Any attachment(s) to this  message
has been checked for viruses, but please rely on your  own  virus
checker and procedures. If you contact  us  by  e-mail,  we  will
store your name and address to facilitate communications.
-



RE: Asking for an Opionio on Apache Tomcat or Just Apache

2001-04-17 Thread Christopher Kirk


You said 'pretty transparent' to tomcat. Where is it not transparent?
Specifically I am wondering about cookies, do cookies work with SSL at all
or is it a possible configuration thing that has to be done correctly?

- Chris.

 Beyond the fact that Apache will give you a wealth of options for
 configuration, it serves static pages MUCH faster than 
 tomcat. Once you get
 SSL working with Apache, its pretty transparent to tomcat for 
 example - your
 servlets will use SSL without any extra work by yourself.
 
 sam
 
 


-
This e-mail is intended only for the addressee(s) named above. It
may contain confidential or privileged information and if you are
not the intended addressee you are not  authorized  to  disclose,
copy, distribute or place any reliance on it  whatsoever  and  we
request that you inform our  postmaster ([EMAIL PROTECTED]) that
you have received this e-mail. Any attachment(s) to this  message
has been checked for viruses, but please rely on your  own  virus
checker and procedures. If you contact  us  by  e-mail,  we  will
store your name and address to facilitate communications.
-



RE: Asking for an Opionio on Apache Tomcat or Just Apache

2001-04-17 Thread Christopher Kirk


Is that still the case if you disable cookies within a client? 
I find that Tomcat doesn't notice that cookies have been disabled and won't
rewrite the URL.. (this behaviour is only when I have SSL turned on at the
Apache end).


 -Original Message-
 From: Sam Newman [mailto:[EMAIL PROTECTED]]
 Sent: 17 April 2001 10:32
 To: [EMAIL PROTECTED]
 Subject: Re: Asking for an Opionio on Apache  Tomcat or Just Apache
 
 
 Well, I have run my servlets over SSL. They use session 
 tracking using the
 HttpSession object and it works fine. I haven't had to change ANY
 configuraation files at all.
 
 sam
 - Original Message -
 From: "Christopher Kirk" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 17, 2001 8:33 AM
 Subject: RE: Asking for an Opionio on Apache  Tomcat or Just Apache
 
 
 
  You said 'pretty transparent' to tomcat. Where is it not 
 transparent?
  Specifically I am wondering about cookies, do cookies work 
 with SSL at all
  or is it a possible configuration thing that has to be done 
 correctly?
 
  - Chris.
 
 


-
This e-mail is intended only for the addressee(s) named above. It
may contain confidential or privileged information and if you are
not the intended addressee you are not  authorized  to  disclose,
copy, distribute or place any reliance on it  whatsoever  and  we
request that you inform our  postmaster ([EMAIL PROTECTED]) that
you have received this e-mail. Any attachment(s) to this  message
has been checked for viruses, but please rely on your  own  virus
checker and procedures. If you contact  us  by  e-mail,  we  will
store your name and address to facilitate communications.
-



RE: Asking for an Opionio on Apache Tomcat or Just Apache

2001-04-17 Thread Christopher Kirk


Many thanx, I'll be very interested in your results.

My impressions of things is that HttpSession works on session ids. That
session id either comes from a cookie or a http GET paremeter.. The code

servletResponse.encodeURL(url);

is required to make the switch between the two different mechanisms. I find
that under my current setup with Apache/Tomcat/SSL, the encodeURL method
makes the wrong choice when the browser has had its cookies disabled. 

- Chris.

 -Original Message-
 From: Sam Newman [mailto:[EMAIL PROTECTED]]
 Sent: 17 April 2001 13:04
 To: [EMAIL PROTECTED]
 Subject: Re: Asking for an Opionio on Apache  Tomcat or Just Apache
 
 
 HmmI thought the use of HttpSession worked independantly 
 of cookies
 settings? I assumed it is something very different to the 
 Cookie object.
 That said, I'll give it a go and let you know.
 
 sam
 - Original Message -
 From: "Christopher Kirk" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 17, 2001 12:01 PM
 Subject: RE: Asking for an Opionio on Apache  Tomcat or Just Apache
 
 
 
  Is that still the case if you disable cookies within a client?
  I find that Tomcat doesn't notice that cookies have been 
 disabled and
 won't
  rewrite the URL.. (this behaviour is only when I have SSL 
 turned on at the
  Apache end).
 
 
 


-
This e-mail is intended only for the addressee(s) named above. It
may contain confidential or privileged information and if you are
not the intended addressee you are not  authorized  to  disclose,
copy, distribute or place any reliance on it  whatsoever  and  we
request that you inform our  postmaster ([EMAIL PROTECTED]) that
you have received this e-mail. Any attachment(s) to this  message
has been checked for viruses, but please rely on your  own  virus
checker and procedures. If you contact  us  by  e-mail,  we  will
store your name and address to facilitate communications.
-



RE: HttpSession expires !!!

2001-03-19 Thread Christopher Kirk


There is a solution built into the Servlet standard. Take a look at the
javax.servlets.http package.  There is an interfacecalled
HttpSessionBindingEvent, just implement this interface on the session
object.. by doing this the object will be notified when it is put into the
session, and when it is taken out.

fyi when a session is expired all of the objects in the session will be
removed, hence triggering the methods on HttpSessionBindingEvent.


- Chris.

Brainbench MVP Java2.

 -Original Message-
 From: Samuel Arnod-Prin [mailto:[EMAIL PROTECTED]]
 Sent: 19 March 2001 12:20
 To: [EMAIL PROTECTED]
 Subject: HttpSession expires !!!
 
 
 Hello,
 
 I've had to modify tomcat because I didn't know if there was 
 a solution,
 
 I would like to be warned when a HttpSession expires and becomes
 invalidated.
 Is there a way to do this ?
 Or should I keep my modification in tomcat class to the 
 expire() method
 ?
 
 thank you
 


-
This e-mail is intended only for the addressee(s) named above. It
may contain confidential or privileged information and if you are
not the intended addressee you are not  authorised  to  disclose,
copy, distribute or place any reliance on it  whatsoever  and  we
request that you inform the sender on  +44 1223 705000  that  you
have received this e-mail. Any attachment(s) to this message  has
been checked for viruses, but  please  rely  on  your  own  virus
checker and procedures. If you contact  us  by  e-mail,  we  will
store your name and address to facilitate communications.
-



RE: JDBC Connections

2001-03-16 Thread Christopher Kirk


Your problem is that your session object (holding the connection) is not
being notified when the session is dropped. nb, when a user closes a browser
is not when the session will be dropped. You'll have to add i) a time out to
the session (say 10 minutes?) and ii) give the user a logout button so that
they can logout cleanly and promptly. See the Servlet specs for more
details.

An object in the session scope can request to be notified of when it is
removed from the session (usually because the session is being closed down).
Take a look at javax.servlet.http.HttpSessionBindingListener, it is an
interface with 2 methods on it. Just make your object implement this
interface and the bind/unbind method will be called when the object is added
to the session/removed from the session respectively. Using these
notifications your object will be able to open/close the database
connection.


Warning. If you're holding a connection open for such a long time, make sure
that you're not locking any tables in the database between user requests
otherwise the scaleable performance of the web site will drastically suffer.


- Chris

Brainbench MVP Java2.

 -Original Message-
 From: Raffaele Carl [mailto:[EMAIL PROTECTED]]
 Sent: 16 March 2001 13:15
 To: [EMAIL PROTECTED]
 Subject: JDBC Connections
 
 
 Can anyone help me? I have:
 - SCO UnixWare 7.1.1
 - Informix Online 9.20 and JDBC 2.0
 - JDK 1.2.2
 - Tomcat 3.2.1
 When a make a JDBC connection to the DBMS with a JavaBean 
 (scope=session)
 and i close the browser, the connection remain up and it will 
 go down only
 after several hours.
 How can i do to set up a connection that dies when i close 
 the browser?
 Thank you.
 
 



RE: How to make tomcat parse a *.HTM File ??

2001-03-14 Thread Christopher Kirk


Have you tried setting  *.htm=ajp12, AND in httpd.conf move the mod_jk
higher up the list of modules (I believe that they are declared in a
'search' order)?

- Chris.


 -Original Message-
 From: Matthias Barmeier [mailto:[EMAIL PROTECTED]]
 Sent: 14 March 2001 17:01
 To: [EMAIL PROTECTED]
 Subject: How to make tomcat parse a *.HTM File ??
 
 
 Hi,
 
 
 I have a question:
 
   What do I have to do to make JSP code work in *.htm files.
   I would like to automatically add an authorization prefix to
   any *.html and *.htm page of my old web. The java program works
   fine but the % authorize this code % does not work.
   
   I use IIS and Tomcat 3.1. 
   
 Can anyone help ??
 
 Ciao
   Matze
 
 My uriworkermap
 
 #
 # Simple worker configuration file
 #
 
 # Mount the servlet context to the ajp12 worker
 /servlet/*=ajp12
 
 # Mount the examples context to the ajp12 worker
 /examples/*=ajp12
 
 # Advanced mount of the examples context
 # /examples/*.jsp=ajp12
 # /examples/servlet/*=ajp12
 /*.jsp=ajp12
 /*.htm=ajp12
 
 
 My web.xml
 
 I added this to ../conf/web.xml after teh *.jsp entry
 
   
   servlet-mapping
   servlet-namehtmtojsp/servlet-name
   url-pattern*.htm/url-pattern
   /servlet-mapping
 
 /*
 Dipl.-Inform. Matthias BarmeierTel: +49 (0)30 79 70 72 87
 bit-side GmbH  Fax: +49 (0)30 79 70 72 88
 Salzufer 14a Aufgang D Email: 
 [EMAIL PROTECTED]
 10587 Berlin   WWW: 
http://www.bit-side.com
*/


 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Cache problem with IE

2001-03-13 Thread Christopher Kirk


To verify Duncans point:
Cache-Control on the request is for proxies.
Cache-Control on the response is for proxies+browser.
(as stated by 'Core Servlets and JSPs by Marty Hall, published by Sun).


You could try Cache-Control 'no-store', or 'must-revalidate'.. to see if IE
handles them differently.

Also, just to check, you are setting the response to HTTP/1.1? Pragma was
never consistent between browsers, and Cache-Control will only be used if
the response specifies HTTP/1.1.

- Chris.


 -Original Message-
 From: Duncan Irvine [mailto:[EMAIL PROTECTED]]
 Sent: 13 March 2001 16:25
 To: '[EMAIL PROTECTED]'
 Subject: RE: Cache problem with IE
 
 
 I'm sure someone will jump on this from a great height if I'm 
 wrong, but I
 seem to recall that the cache settings are for intermediate 
 caches - not the
 browser.  The browser can cache pages as it sees fit - 
 provided that it
 checks to see if they've been updated, but the cache control 
 settings are
 there to stop intermediate caches from falsely reporting a page as not
 having changed.
 
 Duncan.
 
 
  -Original Message-
  From: Zsolt Koppany [mailto:[EMAIL PROTECTED]]
  Sent: 13 March 2001 16:13
  To: [EMAIL PROTECTED]
  Subject: Cache problem with IE
  
  
  Hi,
  
  with the code below I can get netscape not to cache a jsp 
 page but it
  does not work with Internet-Explorer.
  Does anybody know why?
  
  
  response.setHeader("Cache-Control", "no-cache");
  response.setHeader("Pragma", "no-cache");\
  
  
  
  Zsolt
  
  -- 
  Zsolt Koppany
  Intland GmbH www.intland.com
  Schulze-Delitzsch-Strasse 16
  D-70565 Stuttgart
  Tel: +49-711-7871080 Fax: +49-711-7871017
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, email: [EMAIL PROTECTED]
  
 
 
 **
 **
 This message contains information which may be privileged
 and confidential and subject to legal privilege. If you are not
 the intended recipient, you may not peruse, use, disseminate,
 distribute or copy this message. If you have received this 
 message in error, please notify the sender immediately by 
 e-mail, facsimile, or telephone and return or destroy the 
 original message. Sopheon and its officers are not responsible
 for any statements or material in this e-mail and in any attachment
 to it which might give rise to any criminal or civil claim.
 **
 **
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: ClassPath question?

2001-02-02 Thread Christopher Kirk
As far as classpaths are concerned, you can think of a jar file as a
directory (not a file). That is, unlike files (.class files especially) you
must explicitly specify the jar file on the class path.

That is, to pick up the servlet jar file, specify the following path. You
will have to do a similar thing for each of the other jar files too.

/usr/local/tomcat/lib/servlet.jar


- Ck

Brainbench MVP Java2.


 -Original Message-
 From: Jian Zhang [mailto:[EMAIL PROTECTED]]
 Sent: 02 February 2001 11:23
 To: '[EMAIL PROTECTED]'
 Subject: ClassPath question?
 
 
 Hello;
 
 Can anyone help with this compile error msg:
 
 javac HelloWorld.java
 
 HelloWorld.java:1: Package javax.servlet not found in import.
 import javax.servlet.*;
^
 I have included the servlet.jar in my classpath:
 
 printenv CLASSPATH
 /usr/local/jdk1.2.2/lib:/usr/local/tomcat/lib:/usr/local/ant/lib
 
 and servlet.jar is in the folder /usr/local/tomcat/lib
 
 what have I missed?
 
 Thanks in advance
 
 jian
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


RE: ClassPath question?

2001-02-02 Thread Christopher Kirk
_Normally_ the core java libraries are inserted onto the classpath for you,
hence
you may not always have to setup a classpath.

javax.* is not part of the core libraries, its name actually stands for 
'java extensions'. Over time some of these extensions, such as swing (javax.
swing)  
have made it into the normal distribution but others such as servlets have
not.

If you want to see what is or is not in the core distribution, go into the
libs
directory of the JVM installation of the JRE and open up rt.jar.. in there
you 
will find java.io, java.util etc etc.

- CK

Brainbench MVP Java2.

 -Original Message-
 From: Jian Zhang [mailto:[EMAIL PROTECTED]]
 Sent: 02 February 2001 11:51
 To: '[EMAIL PROTECTED]'
 Subject: RE: ClassPath question?
 
 
 Thanks. I just tried "/usr/local/tomcat/lib/servlet.jar" and 
 it worked.
 
 I noticed that the first line HelloWorld.java file is 
 "import java.io.*"
 But it did not create any problem on compiling given previous 
 classpath.
 
 Does it mean java libs have some difference from each other?
 
 
 jian
 
 
  As far as classpaths are concerned, you can think of a jar file as a
  directory (not a file). That is, unlike files (.class files 
  especially) you
  must explicitly specify the jar file on the class path.
  
  That is, to pick up the servlet jar file, specify the 
  following path. You
  will have to do a similar thing for each of the other jar files too.
  
  /usr/local/tomcat/lib/servlet.jar
  
  
  - Ck
  
  Brainbench MVP Java2.
  
  
   -Original Message-
   From: Jian Zhang [mailto:[EMAIL PROTECTED]]
   Sent: 02 February 2001 11:23
   To: '[EMAIL PROTECTED]'
   Subject: ClassPath question?
   
   
   Hello;
   
   Can anyone help with this compile error msg:
   
   javac HelloWorld.java
   
   HelloWorld.java:1: Package javax.servlet not found in import.
   import javax.servlet.*;
  ^
   I have included the servlet.jar in my classpath:
   
   printenv CLASSPATH
   /usr/local/jdk1.2.2/lib:/usr/local/tomcat/lib:/usr/local/ant/lib
   
   and servlet.jar is in the folder /usr/local/tomcat/lib
   
   what have I missed?
   
   Thanks in advance
   
   jian
   
   
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, email: 
 [EMAIL PROTECTED]
   
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, email: [EMAIL PROTECTED]
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


RE: 46 java threads???

2001-02-01 Thread Christopher Kirk

Where are you getting the figure '10Megs per thread' from? 
Each thread shares the same memory space, that means the 10Megs is shared
between the 46 threads and is not on a per thread basis.

- Chris

Brainbench MVP Java2.

 -Original Message-
 From: James Diggans [mailto:[EMAIL PROTECTED]]
 Sent: 01 February 2001 6:58
 To: [EMAIL PROTECTED]
 Subject: 46 java threads???
 
 
 I have tomcat running through mod_jk along with Apache. When tomcat is
 launched it does so flawlessly but launches FORTY SIX 'java' threads,
 each taking ~10MB of what gtop declares 'resident' memory (yes, 460MB
 total). Now I realize these are probably sharing a memory space (since
 I dont HAVE 460MB of RAM or swap) but is there a reason it's starting
 46 threads? And can anyone tell me where I can configure this? It
 seems .. high.
 
 Regards,
 - j
 
 --
 --
 James C. Diggans
 Excelsior Technologies, Inc.   At what point did we stop
 [EMAIL PROTECTED] being citizens and start
 http://www.excelsior-web.com   being mere 'consumers'?
 --
 --
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Session problem with WAP protocol

2001-01-17 Thread Christopher Kirk


I cann't explain the error message with out knowing more about the code; but
if you are trying to use cookies then that could be your problem. To my
knowledge (and I will point out that I have never tried it; so hopefully
somebody will back me up when I say that) WAP does not support cookies.


- Chris.

 -Original Message-
 From: Mauricio Nuez [mailto:[EMAIL PROTECTED]]
 Sent: 17 January 2001 13:07
 To: [EMAIL PROTECTED]
 Subject: Session problem with WAP protocol
 
 
 Hi all
 I'm working with the WAP protocol, but i get the following 
 error when i load
 a session:
 
 java.lang.IllegalArgumentException: Cookie name Path is a 
 reserved token
 
 Any comments?
 
 I'm using Tomcat 3.2.1 and the wap-emulator WINWAP
 
 Thanks in advance!
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: session tracking

2001-01-15 Thread Christopher Kirk


For session tracking to work, look at the following 2 methods

resonse.encodeURL
and
response.encodeRedirectURL


In this way, session tracking will only work when following links because
URL re-writting requires a link to modify whereas cookies go by the domain
within the HTTP request.

So, to make your example work you would have to add 

a href="%=response.encodeURL(address)%"Click me/a


- Chris

Brainbench MVP Java2



 -Original Message-
 From: Regis Muller [mailto:[EMAIL PROTECTED]]
 Sent: 15 January 2001 11:05
 To: [EMAIL PROTECTED]
 Subject: session tracking
 
 
 Im a bit confused cuz I were told session tracking automatically
 switched from cookies to url rewriting when cookies arent enabled in
 browser but it doesn't seem to work with this simple example :
 package coreservlets;
 
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 import java.net.*;
 import java.util.*;
 
 /** Simple example of session tracking.
  *  Taken from Core Servlets and JavaServer Pages
  *  from Prentice Hall and Sun Microsystems Press,
  *  http://www.coreservlets.com/.
  *  copy; 2000 Marty Hall; may be freely used or adapted.
  */
 
 public class ShowSession extends HttpServlet {
   public void doGet(HttpServletRequest request,
 HttpServletResponse response)
   throws ServletException, IOException {
 response.setContentType("text/html");
 PrintWriter out = response.getWriter();
 String title = "Session Tracking Example";
 HttpSession session = request.getSession(true);
 String heading;
 // Use getAttribute instead of getValue in version 2.2.
 Integer accessCount =
   (Integer)session.getAttribute("accessCount");
 if (accessCount == null) {
   accessCount = new Integer(0);
   heading = "Welcome, Newcomer";
 } else {
   heading = "Welcome Back";
   accessCount = new Integer(accessCount.intValue() + 1);
 }
 // Use setAttribute instead of putValue in version 2.2.
 session.setAttribute("accessCount", accessCount);
 
 out.println(ServletUtilities.headWithTitle(title) +
 "BODY BGCOLOR=\"#FDF5E6\"\n" +
 "H1 ALIGN=\"CENTER\"" + heading + "/H1\n" +
 "H2Information on Your Session:/H2\n" +
 "TABLE BORDER=1 ALIGN=\"CENTER\"\n" +
 "TR BGCOLOR=\"#FFAD00\"\n" +
 "  THInfo TypeTHValue\n" +
 "TR\n" +
 "  TDID\n" +
 "  TD" + session.getId() + "\n" +
 "TR\n" +
 "  TDCreation Time\n" +
 "  TD" +
 new Date(session.getCreationTime()) + "\n" +
 "TR\n" +
 "  TDTime of Last Access\n" +
 "  TD" +
 new Date(session.getLastAccessedTime()) + "\n" +
 "TR\n" +
 "  TDNumber of Previous Accesses\n" +
 "  TD" + accessCount + "\n" +
 "/TABLE\n" +
 "/BODY/HTML");
 
   }
 
   /** Handle GET and POST requests identically. */
 
   public void doPost(HttpServletRequest request,
  HttpServletResponse response)
   throws ServletException, IOException {
 doGet(request, response);
   }
 }
 
 Could anyone help me ? Is there a thing to configure to accept session
 tracking ?
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: session tracking

2001-01-15 Thread Christopher Kirk


Once the ID appears on the URL, the user will be able to use the reload
button.

However, you will need to get the session id onto the URL in the first
place!

A reasonable way of doing this, in this example would be to redirect the
user..

Try something like this,


session = request.getSession(false);

if (session == null) {
  session = request.getSession(true);
  response.sendRedirect(response.encodeURL());
  return;
}


What this code does is it checks to see if a session already exists, if it
does
then it does nothing and will continue with your code.. but if a session
does
not exist then it will create one, and then encode it into a URL. The code
will
then ask the users browser to go to that URL, instead of the original URL
that they typed in.

The only difference between the two URLs is that one looks like this

http://www.foo.com/myservlet

and the other one will be

http://www.foo.com/myservlet?jsession=asf2e4234asdf


- Chris.

Brainbench MVP Java2

 -Original Message-
 From: Regis Muller [mailto:[EMAIL PROTECTED]]
 Sent: 15 January 2001 13:34
 To: [EMAIL PROTECTED]
 Subject: Re: session tracking
 
 
 Thanks but how could it work when clicking on netscape reload button ?
 
 Christopher Kirk wrote:
 
  For session tracking to work, look at the following 2 methods
 
  resonse.encodeURL
  and
  response.encodeRedirectURL
 
  In this way, session tracking will only work when following 
 links because
  URL re-writting requires a link to modify whereas cookies 
 go by the domain
  within the HTTP request.
 
  So, to make your example work you would have to add
 
  a href="%=response.encodeURL(address)%"Click me/a
 
  - Chris
 
  Brainbench MVP Java2
 
   -Original Message-
   From: Regis Muller [mailto:[EMAIL PROTECTED]]
   Sent: 15 January 2001 11:05
   To: [EMAIL PROTECTED]
   Subject: session tracking
  
  
   Im a bit confused cuz I were told session tracking automatically
   switched from cookies to url rewriting when cookies arent 
 enabled in
   browser but it doesn't seem to work with this simple example :
   package coreservlets;
  
   import java.io.*;
   import javax.servlet.*;
   import javax.servlet.http.*;
   import java.net.*;
   import java.util.*;
  
   /** Simple example of session tracking.
*  Taken from Core Servlets and JavaServer Pages
*  from Prentice Hall and Sun Microsystems Press,
*  http://www.coreservlets.com/.
*  copy; 2000 Marty Hall; may be freely used or adapted.
*/
  
   public class ShowSession extends HttpServlet {
 public void doGet(HttpServletRequest request,
   HttpServletResponse response)
 throws ServletException, IOException {
   response.setContentType("text/html");
   PrintWriter out = response.getWriter();
   String title = "Session Tracking Example";
   HttpSession session = request.getSession(true);
   String heading;
   // Use getAttribute instead of getValue in version 2.2.
   Integer accessCount =
 (Integer)session.getAttribute("accessCount");
   if (accessCount == null) {
 accessCount = new Integer(0);
 heading = "Welcome, Newcomer";
   } else {
 heading = "Welcome Back";
 accessCount = new Integer(accessCount.intValue() + 1);
   }
   // Use setAttribute instead of putValue in version 2.2.
   session.setAttribute("accessCount", accessCount);
  
   out.println(ServletUtilities.headWithTitle(title) +
   "BODY BGCOLOR=\"#FDF5E6\"\n" +
   "H1 ALIGN=\"CENTER\"" + heading + "/H1\n" +
   "H2Information on Your Session:/H2\n" +
   "TABLE BORDER=1 ALIGN=\"CENTER\"\n" +
   "TR BGCOLOR=\"#FFAD00\"\n" +
   "  THInfo TypeTHValue\n" +
   "TR\n" +
   "  TDID\n" +
   "  TD" + session.getId() + "\n" +
   "TR\n" +
   "  TDCreation Time\n" +
   "  TD" +
   new Date(session.getCreationTime()) + "\n" +
   "TR\n" +
   "  TDTime of Last Access\n" +
   "  TD" +
   new Date(session.getLastAccessedTime()) + "\n" +
   "TR\n" +
   "  TDNumber of Previous Accesses\n" +
   "  TD" + accessCount + "\n" +
   "/TABLE\n" +
   "/BODY/HTML");
  
 }
  
 /** Handle GET and POST requests identically. */
  
 public void doPost(HttpServletRequest request,
HttpServletResponse response)