Pair programming review meeting

2001-07-16 Thread Kevin Kucks

Hi All,

You are invited to a meeting at 3:00 PM on Friday 20th July to discuss 
how the pair programming facilities are being used, problems 
encountered, practices employed, etc. and to explore how the pair 
programming practices can be enhanced, tightened, etc, and to explore 
any need to change or improve login and other security procedures.

Kevin

-- 

Project Leader
Plugged-In Software
www.PIsoftware.com
[EMAIL PROTECTED]





Internationalisation problems in Tomcat 3.3?

2001-07-16 Thread Ben Kelley

Hi.

I've seen a couple of posts about problems with i18n and Tomcat. I am having
trouble with this, and at this point I'm suspecting a bug somewhere.

The same test servlet works fine with Apache JServ 1.0, but displays
??? in Tomcat 3.3m4.

Consider the test servlet below. If you call http://yourserver/servlet/test
you get just English. if You call http://yourserver/servlet/test?lang=ja
it should display some Japanese (encoded as euc-jp).

The Japanese text uses the unicode escapes for the appropriate characters.

As I was writing this e-mail, I hit refresh on my site and the Japanese
version worked. I loaded up some English pages, and the Japanese version
went back to ??.

If you uncomment out the resp.getCharacterEncoding() lines you should find
that you get the correct answer for each case.

Any thoughts?

 - Ben Kelley.

import javax.servlet.*;
import javax.servlet.http.*;

import java.io.*;

public class test extends HttpServlet
{
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
{
try
{
if ((req.getParameter(lang) != null) 
req.getParameter(lang).equals(ja))
{
resp.setContentType(text/html; charset=euc-jp);
PrintWriter out = resp.getWriter();
out.println(htmlheadtitleJapanese/title/head);
out.println(body);
out.println(pJapanese/p);
// out.println(pEncoding is  +
resp.getCharacterEncoding());

out.println(pLocation = \u6240\u5728\u5730\uff1a/p);
out.println(pLatest research updates =
\u76f4\u8fd1\u306e\u30ea\u30b5\u30fc\u30c1\u53ca\u3073\u66f4\u65b0/p);
out.println(/body);
out.println(/html);
}
else
{
resp.setContentType(text/html; charset=iso-8859-1);
PrintWriter out = resp.getWriter();
out.println(htmlheadtitleEnglish/title/head);
out.println(body);
out.println(pEnglish/p);
// out.println(pEncoding is  +
resp.getCharacterEncoding());
out.println(/body);
out.println(/html);
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
}

Ben Kelley - [EMAIL PROTECTED]
Senior Web Developer - ResearchWeb
UBS Warburg, Sydney, Australia


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  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.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.




RE: java.lang.SecurityException: sealing violation?

2001-07-16 Thread Dan - Blue Lotus Software

I had the same problem...with the nightly build.  The milestone build was
fine, however.  No changes in code.  I'd recommend going with m5 until this
is fixed (Craig?).

-dan

-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
e.org]On Behalf Of [EMAIL PROTECTED]
Sent: Friday, July 13, 2001 7:46 PM
To: [EMAIL PROTECTED]
Subject: java.lang.SecurityException: sealing violation?


Okay, I gave up on my tomcat installation. I wiped
everything clean and then got all the source in the
hopes that it might work better if I compiled
vs. dropping binaries.

So, there are many confusing aspects of the
installation instructions regarding building the
source. Seems like maybe the docs don't match up with
the behavior of the current releases?

Anyway, I plodded thru, I think I got everything
straight. BUT, when I run startup.sh, I get the
following:

java.lang.SecurityException: sealing violation

I followed the install instructions that came with the
JSSE from Sun. Have no idea what this error means.

Can anyone help?

Thanks.

 - Jeremy




Re: please help please help

2001-07-16 Thread HGhoreishi
In a message dated 7/15/01 12:54:12 PM Pacific Daylight Time, 
[EMAIL PROTECTED] writes:
 
I did downloaded jsdk2.1 again  installed it now it works thanks.

 
hossein.
 




Hi 
I did install tomcat3.2.2  jsdk2.1 on win98 os 
 after startup  shutdown got these massages . 
I have no idea what this means ? 
Would you please someone help. 
 Regards 
 Hossein 

Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion' 
has value '1.4', but '1.3' is required. 
Error: could not find java.dll 
Error: could not find Java 2 Runtime Environment. 

 Tried to start tomcat 
 

c:\java\tomcat2\tomcat-3.2.1\binstartup 
Unable to set CLASSPATH dynamically. 
Note: To set the CLASSPATH dynamically on Win9x systems 
 only DOS 8.3 names may be used in TOMCAT_HOME! 
Setting your CLASSPATH statically. 

Using CLASSPATH: 
c:\java\tomcat2\tomcat-3.2.1\classes;c:\java\tomcat2\tomcat-3.2 



.1\lib\ant.jar;c:\java\tomcat2\tomcat-3.2.1\lib\jasper.jar;c:\java\tomcat2\tom 

ca 



t-3.2.1\lib\jaxp.jar;c:\java\tomcat2\tomcat-3.2.1\lib\parser.jar;c:\java\tomca 

t2 



\tomcat-3.2.1\lib\servlet.jar;c:\java\tomcat2\tomcat-3.2.1\lib\webserver.jar;c 

:\ 



java\tomcat2\tomcat-3.2.1\lib\ant.jar;c:\java\tomcat2\tomcat-3.2.1\classes,c:\ 

ja 



va\tomcat2\tomcat-3.2.1\lib\jasper.jar;c:\java\tomcat2\tomcat-3.2.1\lib\jaxp.j 

ar 



;c:\java\tomcat2\tomcat-3.2.1\lib\parser.jar;c:\java\tomcat2\tomcat-3.2.1\lib\ 

se 
rvlet.jar;c:\java\tomcat2\tomcat-3.2.1\lib\webserver.jar 

Starting Tomcat in new window 
C:\java\tomcat2\tomcat-3.2.1\bin 

 tried to stop tomcat 

C:\java\tomcat2\tomcat-3.2.1\binshutdown 
Unable to set CLASSPATH dynamically. 
Note: To set the CLASSPATH dynamically on Win9x systems 
 only DOS 8.3 names may be used in TOMCAT_HOME! 
Setting your CLASSPATH statically. 

Using CLASSPATH: 
c:\java\tomcat2\tomcat-3.2.1\classes;c:\java\tomcat2\tomcat-3.2 



.1\lib\ant.jar;c:\java\tomcat2\tomcat-3.2.1\lib\jasper.jar;c:\java\tomcat2\tom 

ca 



t-3.2.1\lib\jaxp.jar;c:\java\tomcat2\tomcat-3.2.1\lib\parser.jar;c:\java\tomca 

t2 



\tomcat-3.2.1\lib\servlet.jar;c:\java\tomcat2\tomcat-3.2.1\lib\webserver.jar;c 

:\ 



java\tomcat2\tomcat-3.2.1\lib\ant.jar;c:\java\tomcat2\tomcat-3.2.1\classes,c:\ 

ja 



va\tomcat2\tomcat-3.2.1\lib\jasper.jar;c:\java\tomcat2\tomcat-3.2.1\lib\jaxp.j 

ar 



;c:\java\tomcat2\tomcat-3.2.1\lib\parser.jar;c:\java\tomcat2\tomcat-3.2.1\lib\ 

se 
rvlet.jar;c:\java\tomcat2\tomcat-3.2.1\lib\webserver.jar 

Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion' 
has value '1.4', but '1.3' is required. 
Error: could not find java.dll 
Error: could not find Java 2 Runtime Environment. 
C:\java\tomcat2\tomcat-3.2.1\bin 



C:\java\tomcat2\tomcat-3.2.1\binshutdown 
Unable to set CLASSPATH dynamically. 
Note: To set the CLASSPATH dynamically on Win9x systems 
 only DOS 8.3 names may be used in TOMCAT_HOME! 
Setting your CLASSPATH statically. 

Using CLASSPATH: 
c:\java\tomcat2\tomcat-3.2.1\classes;c:\java\tomcat2\tomcat-3. 



.1\lib\ant.jar;c:\java\tomcat2\tomcat-3.2.1\lib\jasper.jar;c:\java\tomcat2\tom 
c 



t-3.2.1\lib\jaxp.jar;c:\java\tomcat2\tomcat-3.2.1\lib\parser.jar;c:\java\tomca 
t 



\tomcat-3.2.1\lib\servlet.jar;c:\java\tomcat2\tomcat-3.2.1\lib\webserver.jar;: 
t 
mcat_home\lib 

Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion' 
has value '1.4', but '1.3' is required. 
Error: could not find java.dll 
Error: could not find Java 2 Runtime Environment. 
C:\java\tomcat2\tomcat-3.2.1\bin 





--- Headers 
Return-Path: [EMAIL PROTECTED]

Received: from rly-yc04.mx.aol.com (rly-yc04.mail.aol.com [172.18.149.36]) 
by air-yc05.mail.aol.com (v79.27) with ESMTP id MAILINYC57-0715155412; Sun, 
15 Jul 2001 15:54:12 -0400
Received: from apache.org (h31.sny.collab.net [64.208.42.41]) by 
rly-yc04.mx.aol.com (v79.20) with ESMTP id MAILRELAYINYC42-0715155347





Help on Thread Pool Exception

2001-07-16 Thread Manjunath BHat


Hi,

I have encountered following exception while running tomcat.
**
2001-07-14 09:30:18 - ThreadPool: Unexpected exception -
sjava.lang.InterruptedEx
ception
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
480)
at java.lang.Thread.run(Thread.java:484)
***

What may be the cause for the Exception. I am running Tomcat with
IIS4.0 on
WinNT
In tomcat-home/conf/tomcat.properties following lines .
# Thread Pool parameters


# Enables or disables the use of the thread pool.
# Syntax: pool=[true|false] (boolean)
# Default: false
# WARNING: the pool has not been extensively tested and may generate
deadlocks.
# For this reason, we advise against using this code in production
environments.
pool=false

# Indicates the number of idle threads that the pool may contain.
# Syntax: pool.capacity=(int)0
# Default: 10
# NOTE: depending on your system load, this number should be low for
contantly
# loaded servers and should be increased depending on load bursts.
pool.capacity=10

Should I change value for parameter pool to true???
What should be the optimum value for pool.capacity for the
production
environment???


Thanks in advance


Manjunath


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




connector

2001-07-16 Thread Jeff Hoare

Hi,
I've compiled a static version of mod_webapp.so so I can integrate tomcat 
(version 4 beta 5) with my apache server (1.3.14). Problem is when I test the 
config it says the module can't be loaded because of an undefined symbol 
(pthread_sigmask).

Has anyone encountered this problem, and/or is there a solution?

Regards Jeff




404 page

2001-07-16 Thread mwhitman

How do  you set up a 404 error page for tomcat?
I can't seem to find it.




Virtual directory mapping

2001-07-16 Thread Mark Florence

I can't seem to figure how to set up a virtual directory
mapping for my Web application. I want to map (say) the
context-relative path:

/usr

To a directory on my server outside the webapps directory:

c:\usr

Many thanks for any help.



Re: Can use ASP pages in Tomcat

2001-07-16 Thread Alberto Torna Jr.

Though I have not tried this yet, there is a Pearl Interpretation of ASP for Apache. 
http://www.nodeworks.com/asp/ That is assuming you've integrated Apache Web Server. 

From: "Bakhtawar Singh Gill" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED] 
To: [EMAIL PROTECTED] 
Subject: Can use ASP pages in Tomcat 
Date: Mon, 16 Jul 2001 05:20:22 
 
Get your FREE download of MSN Explorer at http://explorer.msn.com
Hi Friends,


Be patient, I am from Microsoft platform and do not know anything about tomcat and I have few question please help me to get their answer. I will be great full to all of you.
The questions are as follows:


Is it possible to use ASP pages in the Tomcat.
If the answer for the first question is yes then how I am able to use component developed in C++ or V.B to run in the tomcat.
In ISS we have MTS to run component and what we have in Tomcat.
Thanks

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




Re: Virtual directory mapping

2001-07-16 Thread Manjunath BHat

hi,
In server.xml add following lines,

Context path=/usr docBase=C:/usr debug=0 reloadable=true
/Context
To Check whether this change has been implemented
1) In Tomcat startup console see for /usr context
2) Look into work folder

I assume ur platform is Win NT

Good luck


From: Mark Florence [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Virtual directory mapping
Date: Mon, 16 Jul 2001 08:51:02 -0400

I can't seem to figure how to set up a virtual directory
mapping for my Web application. I want to map (say) the
context-relative path:

   /usr

To a directory on my server outside the webapps directory:

   c:\usr

Many thanks for any help.

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




Mod_jk error

2001-07-16 Thread Lakshminarayanan Ramakrishnan
Title: Mod_jk error






Hi 


This is what is available in mod_kk error log when i start Apache with tomcat every time


[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61

[jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1


What does this mean?


Pls Help


Thanx


Lax





RE: Tomcat Frames

2001-07-16 Thread Cory Powers

I'm not opening any resources on these frame pages, I am only using a couple
of application scope beans that always remain open. I did notice that it
works when I reduce the number of frames to 3.

-Original Message-
From: RV Tobin [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 14, 2001 10:22 AM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat  Frames


I think I've solved my problem.  I don't know if it'll help anyone else
experiencing this, and it's hard to tell if I've really fixed it this time,
because the situation seems to get better sometimes, and then gets worse
again, but so far it looks like it's okay now.

I use UD4 to write my JSPs, and the MM code does not close all the
connections.  It closes the recordsets and the database connections, but it
does not explicitly close the preparedStatements, and that results in memory
leaks.  I think the problem is exacerbated when you use frames, because the
connections never get closed, the frames are always displaying and getting
refreshed, and so, eventually, it takes longer and longer to refresh the
pages.  I've gone through all  my pages and added the statement to close the
preparedStatements, and the pages seem to be loading correctly now every
time, regardless of how often I refresh them.

Val

- Original Message -
From: Cory Powers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 13, 2001 11:34 AM
Subject: Tomcat  Frames


 I saw an earlier post that described the exact same problem I was having
 with Tomcat 3.2.2 Final and Tomcat 4.0b5 but, I have not seen a response
 yet. I have made a bug report in Bugzilla with no response from there
 either. Here is the problem once again...

 I have an index.html file that contains 4 frames all of which are jsp
pages.
 It has been working fine for 2 months. I recently added a link to one of
the
 pages and when I brought the frames page tomcat would not load the
modified
 page, the browser will constantly try and load the page with no success. I
 go directly to the page URL (outside of the frameset) and the page
compiles
 and loads just fine. I go back to the frames page and the page will still
 not load. Tomcat is compiling the page OK but will not server the page.

 Has anyone seen a similar problems.

 BTW I have restarted the server and tried accessing Tomcat directly on
port
 8080 instead of using apache and neither have resolved the problem.

 Thanks,
 Cory
 [EMAIL PROTECTED]



RE: Ordering of parameters in HTTPRequest Object

2001-07-16 Thread Michael Wentzel

 Hello all, I am new to this mailing list, and Tomcat, so please pe 
 patient...
 
 I am using Servlets to recieve html form submissions.
 
 Problem is that the form fields are in a particular order on 
 the form, but 
 when I get the Parameters from the request object this field order is 
 gone...
 
 The post data comes in in the proper order, but I can not recover the 
 ordering.  If it was only 1 form I was dealing with, I could 
 write code to 
 format a response, but the app is very generalized, and it is 
 designed to 
 handle many different forms.
 
 So the question.   Is there no way in tomcat to preserve the 
 ordering of 
 parameters from a form submission?

No.  This is servlet API thing, not a tomcat thing.  I think it's a bad
idea to develop servlet to depend on the order in which a request object
is formed because you never know for sure that an ordering is going to
be fixed.  For example, say a hashing algorithm is used for speed up
access.  How do you order the elements of a hash table?  The only thing
I could suggest is preface every form element with its' order, 1st element
would be 0_elementname and 9th element would be 8_elementname, then order
the elements yourself, but I think this is kind of sloppy.


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com



Report generation

2001-07-16 Thread Uri Cohen
Title: Report generation






I have a report which is written as jsp file, and processed at runtime. The jsp generates a report about objects in memory, using their attributes (The object is a JavaBean). The problem now is that I want to save the reports for future use, even when the object has been removed from the memory. Is there any way to save the output of jsp processing to a file?


Regards, 


-

Uri Cohen

Software Developer

Applications Group

Proficiency, Ltd.


tel: +972.2.548.0295  

cel: +972.54.834022

fax: +972.2.586.8371

email: mailto:[EMAIL PROTECTED]


The Intelligence in Engineering Supply Chain Collaboration

http://www.proficiency.com






Tomcat JSPs with custom tags SLOW

2001-07-16 Thread Jerome Jacobsen

I develop using Oracle's Web-to-Go servlet container (comes with JDeveloper
3.2.3 IDE).  My production environment is Tomcat 3.2.  The production
environment always seemed just as quick or quicker than my development
environment concerning JSPs, until now.  I recently started to replace the
use of scriptlets with custom tags in my JSPs.  Web-to-Go is much faster
than Tomcat for the JSPs containing custom tags.  My app still has many JSPs
that do not contain custom tags and Tomcat is still as fast or faster than
Web-to-Go for those scriptlet pages.

Are there any performance coding/tuning tips for custom tag development and
usage with Tomcat?

Does Tomcat 4.0 have better performance with custom tags?

-Jerome




multiple sites on jakarta apache platform

2001-07-16 Thread mwhitman

i want to host 4 websites on a single machine using apache/tomcat.
(We have a seperate Oracle server.)

Reading through the documentation it looks to me like you need a seperate 
instance of
tomcat for each virtual server.  Is this the correct?

Would 4 different instances of tomcat bog down a server.

What is the typical way to do this?

-Mike




RE: Tomcat Frames

2001-07-16 Thread Cory Powers

UPDATE: I changed the name of the frame in the frameset and it started
working. The problem did come back once I updated the page again but, I
changed the name and it started working again. There is obviously a bug
somewhere in the code causing this I have filed a bug report(#2605) and I am
waiting on a response.

Cory
-Original Message-
From: Cory Powers 
Sent: Monday, July 16, 2001 9:16 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Tomcat  Frames


I'm not opening any resources on these frame pages, I am only using a couple
of application scope beans that always remain open. I did notice that it
works when I reduce the number of frames to 3.

-Original Message-
From: RV Tobin [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 14, 2001 10:22 AM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat  Frames


I think I've solved my problem.  I don't know if it'll help anyone else
experiencing this, and it's hard to tell if I've really fixed it this time,
because the situation seems to get better sometimes, and then gets worse
again, but so far it looks like it's okay now.

I use UD4 to write my JSPs, and the MM code does not close all the
connections.  It closes the recordsets and the database connections, but it
does not explicitly close the preparedStatements, and that results in memory
leaks.  I think the problem is exacerbated when you use frames, because the
connections never get closed, the frames are always displaying and getting
refreshed, and so, eventually, it takes longer and longer to refresh the
pages.  I've gone through all  my pages and added the statement to close the
preparedStatements, and the pages seem to be loading correctly now every
time, regardless of how often I refresh them.

Val

- Original Message -
From: Cory Powers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 13, 2001 11:34 AM
Subject: Tomcat  Frames


 I saw an earlier post that described the exact same problem I was having
 with Tomcat 3.2.2 Final and Tomcat 4.0b5 but, I have not seen a response
 yet. I have made a bug report in Bugzilla with no response from there
 either. Here is the problem once again...

 I have an index.html file that contains 4 frames all of which are jsp
pages.
 It has been working fine for 2 months. I recently added a link to one of
the
 pages and when I brought the frames page tomcat would not load the
modified
 page, the browser will constantly try and load the page with no success. I
 go directly to the page URL (outside of the frameset) and the page
compiles
 and loads just fine. I go back to the frames page and the page will still
 not load. Tomcat is compiling the page OK but will not server the page.

 Has anyone seen a similar problems.

 BTW I have restarted the server and tried accessing Tomcat directly on
port
 8080 instead of using apache and neither have resolved the problem.

 Thanks,
 Cory
 [EMAIL PROTECTED]



jdbc

2001-07-16 Thread Andrea Mari

Hi,

how can I escape automatically the query strinng when it contains invalid
character as ' or \ ?

I know that in php there is a directive that do it.

Can you help me?

Andrea




Cross-Site Scripting Vulnerability

2001-07-16 Thread Stefan . Raschke


Hi all

this has probably been discussed long ago,
but I couldn't find any hints.

Is this fixed in tomcat 3.2.2?

thanks a lot

gruss

stefan



Multiple Vendor Java Servlet Container Cross-Site Scripting Vulnerability
=

Affected products:
=
  Tomcat 3.2.1, 3.2.2-beta, 4.0-beta
 http://jakarta.apache.org/tomcat/
  JRun 3.0
 http://www.allaire.com/products/jrun/index.cfm
  WebSphere 3.5 FP2, 3.02, VisualAge for Java 3.5 Professional
 http://www-4.ibm.com/software/webservers/
  Resin
 http://www.caucho.com/products/resin/


Not affected:

  Unknown


Problem:
===
  Accessing the following URLs, the JavaScript code will be executed
  in the browser on the server's domain.

  Tomcat 3.2.1:

http://Tomcat/jsp-mapped-dir/SCRIPTalert(document.cookie)/SCRIPT.jsp
  JRun 3.0:
http://JRun/SCRIPTalert(document.cookie)/SCRIPT.shtml
http://JRun/SCRIPTalert(document.cookie)/SCRIPT.jsp
http://JRun/SCRIPTalert(document.cookie)/SCRIPT.thtml
  WebSphere 3.5 FP2:

http://WebSphere/webapp/examples/SCRIPTalert(document.cookie)/SCRIPT
  WebSphere 3.02:
http://WebSphere/SCRIPTalert(document.cookie)/SCRIPT.jsp
  VisualAge for Java 3.5 Professional:

http://VisualAge-WebSphere-Test-Environment/SCRIPTalert(document.cookie)/SCRIPT

  Resin 1.2.2:
http://Reisin/SCRIPTalert(document.cookie)/SCRIPT.jsp

http://www.caucho.com/SCRIPTdocument.write(document.cookie)/SCRIPT.jsp

  These pages produce output like this:
  =
  Error 404
  An error has occurred while processing request:
  http://WebSphere/webapp/examples/**

  Message: File not found: //**
  StackTrace: com.ibm.servlet.engine.webapp.WebAppErrorReport: File not
found: //**
  at
javax.servlet.ServletException.init(ServletException.java:107)
  at
com.ibm.websphere.servlet.error.ServletErrorReport.init(ServletErrorReport.java:31)

  at
com.ibm.servlet.engine.webapp.WebAppErrorReport.init(WebAppErrorReport.java:20)

  at
com.ibm.servlet.engine.webapp.WebAppDispatcherResponse.sendError(WebAppDispatcherResponse.java:97)

  ...
  =
  **: The JavaScript code is executed here.

  This vulnerability is quite similar to IIS cross-site scripting
  vulnerabilities (MS00-060) reported by Microsoft on August 25, 2000.
  http://www.microsoft.com/technet/security/bulletin/ms00-060.asp


Impact:
==
  For the detail about cross-site scripting, see the following pages.
  http://www.cert.org/advisories/CA-2000-02.html
  http://www.microsoft.com/TechNet/security/crssite.asp
  http://www.apache.org/info/css-security/


Vendor status:
=

  Tomcat:
  ==
Notified:
  16 Mar 2001 04:32:02 +0900,
[EMAIL PROTECTED]
  17 Mar 2001 18:55:45 +0900, [EMAIL PROTECTED]
Response:
  17 Mar 2001 20:07:42 -
Fix:
  30 Mar 2001, Tomcat 4.0-beta-2 (maybe)
  11 May 2001, Tomcat 3.2.2-beta-5 (maybe)
Announcement:
  http://jakarta.apache.org/tomcat/news.html

  Sun Microsystems does not publish Tomcat vulnerabilities.
  http://java.sun.com/products/jsp/tomcat/
  http://java.sun.com/sfaq/chronology.html

  JRun:
  
Notified:
  13 Mar 2001 23:11:54 +0900, [EMAIL PROTECTED]
Response:
  13 Mar 2001 09:43:49 -0500
  14 Mar 2001 09:05:03 -0500
Fix:
  28 Jun 2001, Patches for JRun 3.0 and JRun 2.3.3 are available.
Announcement:
  http://www.allaire.com/handlers/index.cfm?ID=21498Method=Full
  Macromedia Product Security Bulletin (MPSB01-06)
  JRun 3.1, JRun 3.0, JRun 2.3.3: Cross-site scripting vulnerability
  (a.k.a. JavaScript code execution vulnerability)

  WebSphere:
  =
Notified:
  20 Mar 2001 08:13:30 +0900, ***@us.ibm.com
Response:
  22 Mar 2001 09:14:01 -0500
  23 Mar 2001 00:02:58 +0900
Fix:
  PQ47386V302x (?)
  http://www-4.ibm.com/software/webservers/appserv/efix.html
Announcement:
  
http://www-6.ibm.com/jp/domino01/software/websphere.nsf/TechWeb/EC48D03C7060EAFA49256A1C0009C9F4?openDocumentViewName=TechWeb

  (in Japanese)

  Resin:
  =
Notified:
  16 Mar 2001 02:26:47 +0900, [EMAIL PROTECTED], [EMAIL PROTECTED]
Response:
  None
Fix:
  Unknown
Announcement:
  Unknown
  http://www.caucho.com/products/resin/changes.xtp

Workaround:
==
  Customize error pages.


--
Hiromitsu Takagi, Ph.D.
National Institute of Advanced Industrial Science and Technology,
Tsukuba Central 2, 1-1-1, Umezono, Tsukuba, Ibaraki 305-8568, Japan
http://www.etl.go.jp/~takagi/





RE: Tomcat JSPs with custom tags SLOW

2001-07-16 Thread Michael Wentzel

 I recently started to replace the use of scriptlets with 
 custom tags in my JSPs.  Web-to-Go is much faster
 than Tomcat for the JSPs containing custom tags.  My app 
 still has many JSPs that do not contain custom tags and 
 Tomcat is still as fast or faster than Web-to-Go for those 
 scriptlet pages.

I would suggest putting some timing tracking code into your
tag code as well as the jsp's themselves to try to figure out
where exactly the time is being consumed.

In addition, you could try messing around with one of the
existing tomcat tag libs and see if they give you the same
problem.


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com



RE: jdbc

2001-07-16 Thread William Kaufman

(You know, this has nothing at all to do with Tomcat, or even servlets,...)

Use a PreparedStatement, and call setString().

-- Bill K. 

 -Original Message-
 From: Andrea Mari [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 6:58 AM
 To: [EMAIL PROTECTED]
 Subject: jdbc
 
 
 Hi,
 
 how can I escape automatically the query strinng when it 
 contains invalid
 character as ' or \ ?
 
 I know that in php there is a directive that do it.
 
 Can you help me?
 
 Andrea
 



RE: Report generation

2001-07-16 Thread Deacon Marcus

Hi,
Yes, partially. You can define custom tag implementing BodyTag, such tags
get everything inside of them and can do anything with it, including
buffering, saving to a file as html, and much more.

Greetings,
 deacon Marcus

-Original Message-
From: Uri Cohen [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 4:18 PM
To: Tomcat mailing list (E-mail)
Subject: Report generation


I have a report which is written as jsp file, and processed at runtime. The
jsp generates a report about objects in memory, using their attributes (The
object is a JavaBean). The problem now is that I want to save the reports
for future use, even when the object has been removed from the memory. Is
there any way to save the output of jsp processing to a file?


Regards,
-
Uri Cohen
Software Developer
Applications Group
Proficiency, Ltd.
tel: +972.2.548.0295
cel: +972.54.834022
fax:  +972.2.586.8371
email: mailto:[EMAIL PROTECTED]
The Intelligence in Engineering Supply Chain Collaboration
http://www.proficiency.com




RE: Ordering of parameters in HTTPRequest Object

2001-07-16 Thread Deacon Marcus

Hi,

 -Original Message-
 From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 2:39 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Ordering of parameters in HTTPRequest Object


  Hello all, I am new to this mailing list, and Tomcat, so please pe
  patient...
 
  I am using Servlets to recieve html form submissions.
 
  Problem is that the form fields are in a particular order on
  the form, but
  when I get the Parameters from the request object this field order is
  gone...
 
  The post data comes in in the proper order, but I can not recover the
  ordering.  If it was only 1 form I was dealing with, I could
  write code to
  format a response, but the app is very generalized, and it is
  designed to
  handle many different forms.
 
  So the question.   Is there no way in tomcat to preserve the
  ordering of
  parameters from a form submission?

 No.  This is servlet API thing, not a tomcat thing.  I think it's a bad
 idea to develop servlet to depend on the order in which a request object
 is formed because you never know for sure that an ordering is going to
 be fixed.  For example, say a hashing algorithm is used for speed up
 access.  How do you order the elements of a hash table?  The only thing
 I could suggest is preface every form element with its' order, 1st element
 would be 0_elementname and 9th element would be 8_elementname, then order
 the elements yourself, but I think this is kind of sloppy.

Maybe provide another hidden field in your form specifing order (field
type=hidden name=field-order value=f1,f2,f3  or something), then add
a filter (assuming you use T4.0/S2.3) prividing custom Request adding
methods for getting other fields by numbers.



 ---
 Michael Wentzel
 Software Developer
 Software As We Think - http://www.aswethink.com

Greetings,
 deacon Marcus




RE: Report generation

2001-07-16 Thread Michael Wentzel

 I have a report which is written as jsp file, and processed at runtime.
The jsp 
 generates a report about objects in memory, using their attributes (The
object is a  JavaBean). The problem now is that I want to save the reports
for future use, even  when the object has been removed from the memory. Is
there any way to save the 
 output of jsp processing to a file?

I can think of several ways to approach this.  You could create serialized
strings
for the object and create a repository for these.  This would reduce the
size of the repository over reproducing the entire report in the repository
but it means that whenever the report is requested again it would have to be
regenerated.

You could also have all your output go to a StringBuffer then .toString()
the StringBuffer at the end of the jsp as well as outputting to some sort of
repository.

Either of these techniques could be encapsulated into a bean or tag.  Just a
couple of ideas.



--- 
Michael Wentzel 
Software Developer 
Software As We Think - http://www.aswethink.com 



JasperException / classpath(?) problem

2001-07-16 Thread howard fraser

I wonder if anyone can shed any light on the following - I have looked
through the archived messages, but to no avail.

I have tomcat 3.2.2 installed on Windows 2000 SP2 with jdk1.3.1.  I do not
have a CLASSPATH environment variable set.  When I start tomcat it first
says

Using CLASSPATH:
C:\tomcat\classes;C:\tomcat\lib\ant.jar;C:\tomcat\lib\jasper.jar;C:\tomcat\l
ib\jaxp.jar;
C:\tomcat\lib\parser.jar;C:\tomcat\lib\servlet.jar;C:\tomcat\lib\webserver.j
ar;C:\jdk1.3.1\lib\tools.jar

...which seems fine to me (all the above mentioned jars exist).

When I try to run the jsp examples that come with tomcat (e.g. number guess)
I get the following exception...

org.apache.jasper.JasperException: Unable to compile class for
JSPC:\tomcat\work\localhost_8080%2Fexamples\jsp\num\_0002fjsp_0002fnum_0002f
numguess_jsp.java:3: Class num.NumberGuessBean not found in import.
import num.NumberGuessBean;

Is there sthg else I need to add to my classpath in order that tomcat can
locate num.NumberGuessBean?

Many thanks in advance for any help


howard




RE: jdbc

2001-07-16 Thread Randy Layman


You can also use the connection's meta data - there is a method to
get the escape character (and I believe another method to get the list of
characters that need escaping).

Randy

 -Original Message-
 From: William Kaufman [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 10:13 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: jdbc
 
 
 (You know, this has nothing at all to do with Tomcat, or even 
 servlets,...)
 
 Use a PreparedStatement, and call setString().
 
 -- Bill K. 
 
  -Original Message-
  From: Andrea Mari [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 16, 2001 6:58 AM
  To: [EMAIL PROTECTED]
  Subject: jdbc
  
  
  Hi,
  
  how can I escape automatically the query strinng when it 
  contains invalid
  character as ' or \ ?
  
  I know that in php there is a directive that do it.
  
  Can you help me?
  
  Andrea
  
 



Re: Need workaround for Tomcat security.

2001-07-16 Thread Andrew Robson

Hi,
  No workaround I'm afraid. I can confirm that the problem
affects form - based JDBCRealm as well. Tried putting
*/admin/* into url pattern and broke security completely.
I wonder whether a JkMount directive with approriately
placed wildcards might work but haven't had time to try.
I'd be very interested if you find a solution. 
Presumably no-one on the list has one?

andrew 

On Sun, 15 Jul 2001, you wrote:
 Ok, i needed to put some security constraints to a dircetory, so I added this 
 to my web.xml:
  security-constraint
   display-nameUQoS Amin Area/display-name
   web-resource-collection
  web-resource-nameUQoS Amin Area/web-resource-name
url-pattern/admin/*/url-pattern
   /web-resource-collection
 I use BASIC authentication using the memory realm.
 Works like it supposed to when someone goes to my http://xxx/webapp/Admin/ or 
 something below, HOWEVER, if they type http://xxx/webapp//Admin/ (or even 
 more slashes), all security checkings are bypassed, anyone arr let right in !
 (same things happens always, try it with the 'security' example shipped with 
 Tomcat.
 Sever bug!, I have posted it to BugZilla. This applies to atleast Tomcat 
 3.2.1 and 3.2.2. 
 And I need it fixedas soon as possible. Does anyone know a workaround to 
 thisone.(I'd rather not upgrade to Tomcat 4 yet,seems like its fixed here.)
 -- 
 Nils O. Selåsdal
-- 

Andrew Robson 






Integrating tomcat with a notes server

2001-07-16 Thread Brandon Cruz

Does anyone have any experience integrating tomcat with a lotus notes
server.  I am looking to do this for and intranet application and wanted to
see if anyone has experience with this...

Brandon Cruz
Norvax Inc.
www.norvax.com




Re: Integrating tomcat with a notes server

2001-07-16 Thread hische






There seems to be a connector for it:
http://free.tagish.net/domino-tomcat/index.jsp
Haven't tried it myself though.

Regards,

Wilko Hische


Please respond to [EMAIL PROTECTED]

To:        [EMAIL PROTECTED]
cc:         (bcc: Wilko Hische/HADV/NL)
Subject:        Integrating tomcat with a notes server


[IMAGE]
Does anyone have any experience integrating tomcat with a lotus notes
server.  I am looking to do this for and intranet application and wanted to
see if anyone has experience with this...

Brandon Cruz
Norvax Inc.
www.norvax.com


(Embedded image moved to file: pic22997.pcx)

 pic22997.pcx


Re: relative path to real one

2001-07-16 Thread Aditya Anand

Use ServletContext.getRealPath(xyz); to do this.
This assumes that xyz is a resource in your context
root
--- Jaume Pausas [EMAIL PROTECTED] wrote:
 Hi!
 
 Is it possible to translate a relative path to its
 absolute one in the web
 pages under Tomcat 4.0b5?
 
 So if I have a context named mycontext and some
 day I decided to change
 its name to myothercontext how can I manage to
 perform any changes?
 
 Thanks,
 JPausas
 
 
 
 
 

___
 ¡Tienes cuentas de e-mail GRATIS en Excite España!
 A tu disposición en http://correo.excite.es 
 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



read-only initial context

2001-07-16 Thread Aditya Anand

Hi i'm trying to bind an object to java:comp/env
using initial context and i get the attached exception
message. I am using tomcat-4.0-b5, Clearly the message
says the context is read-only, how do i change this.
The same code executes fine over resin and jrun.

TIA

Aditya
--- The Exception ---
javax.naming.NamingException: Context is read only
at
org.apache.naming.NamingContext.checkWritable(NamingContext.java:935)
at
org.apache.naming.NamingContext.bind(NamingContext.java:863)
at
org.apache.naming.NamingContext.rebind(NamingContext.java:249)
at
org.apache.naming.NamingContext.rebind(NamingContext.java:264)
at
org.apache.naming.SelectorContext.rebind(SelectorContext.java:253)
at
javax.naming.InitialContext.rebind(InitialContext.java:366)
at
com.casewerks.web.controller.Controller.init(Controller.java:34)
at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:833)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3277)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:413)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:641)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:300)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:278)
at
org.apache.catalina.core.StandardService.start(StandardService.java:353)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:458)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:725)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:647)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:177)
at java.lang.reflect.Method.invoke(Native
Method)
at 
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:196)


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Problems with install

2001-07-16 Thread Mike Sanders

Problem with Linux Install:

I have reinstalled RedHat 6.2 without Apache. I then installed JDK 1.2.2 and
set the paths in the .bashrc. When I attempt to install I do not get an
error but it just sits on the line that says:

Pool TcpConnector: Starting Ajp12connectionhandler on 8007

If I hit return I end up back at command line... Any ideas?




FW: Connector Pools and Downloads?

2001-07-16 Thread Brett Rizk



-Original Message-
From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 5:08 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Connector Pools and Downloads?


 Michael Rimov [[EMAIL PROTECTED]] wrote :
A while back I created a download manager so that I can provide
customized 
security, logging and management.  The download manager actually sends
the 
file through the servlet response after setting the appropriate content

types and length.  So far so good.

   The Problem

This is causing a serious problem under heavy loads.  In the case of
Resin,

the Apache -- Resin connectors came from a fixed block of connections
from

a pool.  Since a multi-megabyte download can take a long time, the 
connection pool can get filled up rather quickly, and all subsequent 
servlet responses just crash, or hang for minutes at a time per
request.

What do you call heavy load ? You can setup Tomcat to handle up to 
100 ajp13 threads (and even more) each one handling one download
situation.
In that case you'll have 100 Apache forked childs forwarding download
from
servlet engine to client (browser).


   What to do?
Since uploads and downloads seem to be a pretty common entity that
people 
desire for the servlet containers to do, I'm kind of at a loss on how
to go

about this.  AFAICT, the tomcat--Apache connector is going to have the

same problems. [If I'm misreading this, I'd LOVE to be corrected! :-)
(Also

if it isn't a problem is this true for both ajp12 and ajp13? (and ajp14
to 
be)? )]

You'll get the problem before that, at one time you Web-server (Apache
or
any
other one) will have no more process available to handle the download. 

Imagine you setup Apache Web-server to have up to 250 childs (forked or
threaded) 
25*10. You set Tomcat to have also 250 ajp13/ajp14 threads available. 
The 251th client will be rejected by Apache Web-Server before even
trying to
speak with Tomcat server :!

I suppose I can reference count the download manager and only allow so
many 
downloads, but then people are going to go elsewhere instead of wait for
a 
download to be available.

Don't forget that mod_jk support load-balancing and you could use 2 or
more
Tomcat using ajp13/ajp14 behind your Apache Web-Server





RE: Problems with install

2001-07-16 Thread Cory Powers

It should be loaded and running at that point. run this to make sure it is.

ps ax | grep tomcat

you should get a list of about 15 or so processes.

Cory

-Original Message-
From: Mike Sanders [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 12:06 PM
To: [EMAIL PROTECTED]
Subject: Problems with install


Problem with Linux Install:

I have reinstalled RedHat 6.2 without Apache. I then installed JDK 1.2.2 and
set the paths in the .bashrc. When I attempt to install I do not get an
error but it just sits on the line that says:

Pool TcpConnector: Starting Ajp12connectionhandler on 8007

If I hit return I end up back at command line... Any ideas?



Re: Problems with install

2001-07-16 Thread Mike Sanders

I only got a list of 2. The first was the path statement and the second was
the grep... I thought that jserv was causing this problem before but now it
is not installed and the same error is appearing!

- Original Message -
From: Cory Powers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 12:19 PM
Subject: RE: Problems with install


 It should be loaded and running at that point. run this to make sure it
is.

 ps ax | grep tomcat

 you should get a list of about 15 or so processes.

 Cory

 -Original Message-
 From: Mike Sanders [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 12:06 PM
 To: [EMAIL PROTECTED]
 Subject: Problems with install


 Problem with Linux Install:

 I have reinstalled RedHat 6.2 without Apache. I then installed JDK 1.2.2
and
 set the paths in the .bashrc. When I attempt to install I do not get an
 error but it just sits on the line that says:

 Pool TcpConnector: Starting Ajp12connectionhandler on 8007

 If I hit return I end up back at command line... Any ideas?





RE: When to start a new JVM?

2001-07-16 Thread Eoin Woods

 I mean, when do you know that current jvm is fully used 
 and that you should start a new one and balance the load 
 on two? 
Interesting question.  Generally, I'd suggest that you do a load test.  You
increase the load against the Tomcat instance until the CPU that Tomcat is
using isn't increasing any more but the client service time is.  This
suggests that you've reached the scalability limit of a single Tomcat
address space.  Then, graph your results.  You'll often find a sharp angle
in the graph where response time increases sharply with load.  Back off from
this point a little (say 10%) and that's your maximum  throughput for the
single JVM,

 Also, how do you know that current machine has enough load 
 and can't support any more requests, and load 
 should be balanced on two machines? 
This is easier to do.  Assuming you are using Unix, use tools like top(1m),
mpstat(1m) on Solaris and ps(1) to check CPU usage. Check memory usage (and
paging activity) with vmstat(1m).  For NT, PerfMon provides the same sort of
facilities via a GUI.

For Solaris you can also use the SEToolkit freeware package - it comes with
a tool called Zoom that provides instant feedback on whether important
areas of the machine are overloaded or not.  

Cheers,

Eoin.
-Original Message-
From: Bora Paksoy [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 15, 2001 5:21 AM
To: [EMAIL PROTECTED]
Subject: When to start a new JVM?


Hi there;

I am actually a java developer who was asked to manage
some Tomcat instance;) Hence, this question may sound
dumb, but excuse my sys-admin skills. 

Anyways, I know that you can start multiple-jvms and
even different instances on different machines, but I
was wondering how people decide when to start a new
JVM? I mean, when do you know that current jvm is
fully used and that you should start a new one and
balance the load on two? Also, how do you know that
current machine has enough load and can't support any
more requests, and load should be balanced on two
machines? Is there any tool that tells you that one
specific jvm process is fully loaded, likewise is
there any tool that tells you that this machine is
fully loaded and load should be distributed on
different machines ?

Thanks,
Baho.

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Ordering of parameters in HTTPRequest Object

2001-07-16 Thread Sean Tiley

Thank you all for your input / suggestions on my form field ordering 
problem.

I will have to think about a solution (though the hidden field idea is 
pretty good)

Sean Tiley


From: Deacon Marcus [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Ordering of parameters in HTTPRequest Object
Date: Mon, 16 Jul 2001 15:47:47 +0200

Hi,

  -Original Message-
  From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 16, 2001 2:39 PM
  To: '[EMAIL PROTECTED]'
  Subject: RE: Ordering of parameters in HTTPRequest Object
 
 
   Hello all, I am new to this mailing list, and Tomcat, so please pe
   patient...
  
   I am using Servlets to recieve html form submissions.
  
   Problem is that the form fields are in a particular order on
   the form, but
   when I get the Parameters from the request object this field order is
   gone...
  
   The post data comes in in the proper order, but I can not recover the
   ordering.  If it was only 1 form I was dealing with, I could
   write code to
   format a response, but the app is very generalized, and it is
   designed to
   handle many different forms.
  
   So the question.   Is there no way in tomcat to preserve the
   ordering of
   parameters from a form submission?
 
  No.  This is servlet API thing, not a tomcat thing.  I think it's a bad
  idea to develop servlet to depend on the order in which a request object
  is formed because you never know for sure that an ordering is going to
  be fixed.  For example, say a hashing algorithm is used for speed up
  access.  How do you order the elements of a hash table?  The only thing
  I could suggest is preface every form element with its' order, 1st 
element
  would be 0_elementname and 9th element would be 8_elementname, then 
order
  the elements yourself, but I think this is kind of sloppy.

Maybe provide another hidden field in your form specifing order (field
type=hidden name=field-order value=f1,f2,f3  or something), then add
a filter (assuming you use T4.0/S2.3) prividing custom Request adding
methods for getting other fields by numbers.

 
 
  ---
  Michael Wentzel
  Software Developer
  Software As We Think - http://www.aswethink.com

Greetings,
  deacon Marcus


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




RE: Ordering of parameters in HTTPRequest Object

2001-07-16 Thread Greg Trasuk

I agree with Michael, it's not a great idea to depend on the order of the
request parameters.  It makes the code more fragile and less resilient to
maintenance.  For example, you might want to change the layout of the form
to improve usability or change the aesthetics, which would change the order
in which the controls appear, and hence the order in which the fields are
submitted, which breaks your servlet.

Far better to name the parameters.  If naming is not possible, you might
want to look into reading the request body directly using the
ServletRequest.getReader() or ServletRequest.getInputStream() methods.  You
would then need to parse the data to extract the parameters.  I would
imagine that you could find similar code in the Tomcat sources, but it's
still going to be some work.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 8:39 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Ordering of parameters in HTTPRequest Object


 Hello all, I am new to this mailing list, and Tomcat, so please pe
 patient...

 I am using Servlets to recieve html form submissions.

 Problem is that the form fields are in a particular order on
 the form, but
 when I get the Parameters from the request object this field order is
 gone...

 The post data comes in in the proper order, but I can not recover the
 ordering.  If it was only 1 form I was dealing with, I could
 write code to
 format a response, but the app is very generalized, and it is
 designed to
 handle many different forms.

 So the question.   Is there no way in tomcat to preserve the
 ordering of
 parameters from a form submission?

No.  This is servlet API thing, not a tomcat thing.  I think it's a bad
idea to develop servlet to depend on the order in which a request object
is formed because you never know for sure that an ordering is going to
be fixed.  For example, say a hashing algorithm is used for speed up
access.  How do you order the elements of a hash table?  The only thing
I could suggest is preface every form element with its' order, 1st element
would be 0_elementname and 9th element would be 8_elementname, then order
the elements yourself, but I think this is kind of sloppy.


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com




RE: Problems with install

2001-07-16 Thread Cory Powers

Which build of Tomcat? Is the server responding on port 8080?

-Original Message-
From: Mike Sanders [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 12:28 PM
To: [EMAIL PROTECTED]
Subject: Re: Problems with install


I only got a list of 2. The first was the path statement and the second was
the grep... I thought that jserv was causing this problem before but now it
is not installed and the same error is appearing!

- Original Message -
From: Cory Powers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 12:19 PM
Subject: RE: Problems with install


 It should be loaded and running at that point. run this to make sure it
is.

 ps ax | grep tomcat

 you should get a list of about 15 or so processes.

 Cory

 -Original Message-
 From: Mike Sanders [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 12:06 PM
 To: [EMAIL PROTECTED]
 Subject: Problems with install


 Problem with Linux Install:

 I have reinstalled RedHat 6.2 without Apache. I then installed JDK 1.2.2
and
 set the paths in the .bashrc. When I attempt to install I do not get an
 error but it just sits on the line that says:

 Pool TcpConnector: Starting Ajp12connectionhandler on 8007

 If I hit return I end up back at command line... Any ideas?




RE: Report generation

2001-07-16 Thread Greg Trasuk

If you're trying to do this without altering the source code for the JSP,
you could try opening the page through a java.net.URLConnection object and
saving the content that gets returned in a file.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca 
-Original Message-
From: Uri Cohen [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 10:18 AM
To: Tomcat mailing list (E-mail)
Subject: Report generation


I have a report which is written as jsp file, and processed at runtime. The
jsp generates a report about objects in memory, using their attributes (The
object is a JavaBean). The problem now is that I want to save the reports
for future use, even when the object has been removed from the memory. Is
there any way to save the output of jsp processing to a file?


Regards, 
- 
Uri Cohen 
Software Developer 
Applications Group 
Proficiency, Ltd. 
tel: +972.2.548.0295
cel: +972.54.834022 
fax:  +972.2.586.8371 
email: mailto:[EMAIL PROTECTED] 
The Intelligence in Engineering Supply Chain Collaboration 
http://www.proficiency.com 

 winmail.dat


Way to require 128-bit SSL encryption with Tomcat 3.2.2?

2001-07-16 Thread Jonathan Eric Miller

Does anyone know if there is a way to require 128-bit SSL encryption using
Tomcat 3.2.2?

I found that if nothing else you can query the
javax.servlet.request.key_size attribute using Tomcat 4.0.

However, I would like to be able to do this with the current release version
of Tomcat and this version does not seem to set that attribute (neither does
3.3-m4).

Anyone know of some other way to require 128-bit SSL encryption.

If so, please be somewhat specific. Also, if you can, please CC
[EMAIL PROTECTED] in the response as I am not actually subscribed to
this list.

Thanks, Jon





Communication between Tomcat and Apache

2001-07-16 Thread Fabozzi Mauro
Title: Communication between Tomcat and Apache





I' like to know if is possible to communicate between Apache and Tomcat when they are on two different machine.
Is it sufficient to have the mod_jk module and the workers.properties file on the Apache machine, without any Tomcat installation, and the Tomcat server on the other machine?

Or I need always Tomcat installed on the Apache machine even if I have the servlets and JSP element on the other machine?

Thanks, Mauro.





Re: Problems with install

2001-07-16 Thread Mike Sanders

Thanks for your help! The Tomcat build is 3.2 and no the server is not
responding to port 80 requests.

Thanks in advance,
Mike

- Original Message -
From: Cory Powers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 12:40 PM
Subject: RE: Problems with install


 Which build of Tomcat? Is the server responding on port 8080?

 -Original Message-
 From: Mike Sanders [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 12:28 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Problems with install


 I only got a list of 2. The first was the path statement and the second
was
 the grep... I thought that jserv was causing this problem before but now
it
 is not installed and the same error is appearing!

 - Original Message -
 From: Cory Powers [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 12:19 PM
 Subject: RE: Problems with install


  It should be loaded and running at that point. run this to make sure it
 is.
 
  ps ax | grep tomcat
 
  you should get a list of about 15 or so processes.
 
  Cory
 
  -Original Message-
  From: Mike Sanders [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 16, 2001 12:06 PM
  To: [EMAIL PROTECTED]
  Subject: Problems with install
 
 
  Problem with Linux Install:
 
  I have reinstalled RedHat 6.2 without Apache. I then installed JDK 1.2.2
 and
  set the paths in the .bashrc. When I attempt to install I do not get an
  error but it just sits on the line that says:
 
  Pool TcpConnector: Starting Ajp12connectionhandler on 8007
 
  If I hit return I end up back at command line... Any ideas?
 





ajp13 dies unexpectately

2001-07-16 Thread maarten hartsuijker

we have been running tomcat 3.2.2 with apache, mod_jk and ajp13 support for 
about 3 weeks now. In those weeks it has died 2 times unexpectately and the 
only thing the mod_jk.og is showing me is a jk_ajp13_worker.c (586)]: Error 
connecting to the Tomcat process. 

With a netstat I can see that 8009 is not up anymore, so both times I have 
issued a shutdown and a start. That works but (ofcourse) I'd rather not have 
this problem at all.

Anyone had this before and, better yet, found a solution?

kind regards,

Maarten Hartsuijker




Re: ajp13 dies unexpectately

2001-07-16 Thread Michael Lai

Just curious, what version of apache are you using?  I am trying to get 
tomcat 3.2 to work with apache 2.0 but I couldn't compile mod_jk.  It 
says something like it couldn't find http_global_conf.h.

Regards,
Michael.

maarten hartsuijker wrote:

we have been running tomcat 3.2.2 with apache, mod_jk and ajp13 support for 
about 3 weeks now. In those weeks it has died 2 times unexpectately and the 
only thing the mod_jk.og is showing me is a jk_ajp13_worker.c (586)]: Error 
connecting to the Tomcat process. 

With a netstat I can see that 8009 is not up anymore, so both times I have 
issued a shutdown and a start. That works but (ofcourse) I'd rather not have 
this problem at all.

Anyone had this before and, better yet, found a solution?

kind regards,

Maarten Hartsuijker


.






how to reloads classes with out restart

2001-07-16 Thread Reynir Hübner

hi tomcat users, 

I´m thinking if anyone has a servlet or something in that way that
reloads classes with out restarting tomcat.
I´m using a servlet chaining mechanism that I wrote my self. the basic
functionality is it has a starter servlet (that always gets reloaded)
that reads an xml document that has the rest of the servlets in the
chain specified and the parameters for those, and some different
functionality in there.

So the first servlet in the chain gets reloaded (probably because it
get´s the request) but all the other servlets dont unless I restart the
server. The Javabeans dont either get reloaded unless I restart the
server. 

So now I´m thinking if there is a functionality within Tomcat that
triggers reload on all of the classes available with out restart. 
Such a functionality is important in a developement face of a web (it´s
timeconsuming to have to restart).
I can probably write some class or a servlet that reloads by
instanciating a new classloader..etc., but someone must have solved this
already (right ?)

how do you do it ?

thanx, 
 -r



RE: Ordering of parameters in HTTPRequest Object

2001-07-16 Thread Sean Tiley


Thanks very much...
I will look into the getInputStream().  It seems reasonable, but then wont I 
have to pass this around with the request object?

Sean

From: Greg Trasuk [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Ordering of parameters in HTTPRequest Object
Date: Mon, 16 Jul 2001 12:37:16 -0400

   I agree with Michael, it's not a great idea to depend on the order of the
request parameters.  It makes the code more fragile and less resilient to
maintenance.  For example, you might want to change the layout of the form
to improve usability or change the aesthetics, which would change the order
in which the controls appear, and hence the order in which the fields are
submitted, which breaks your servlet.

   Far better to name the parameters.  If naming is not possible, you might
want to look into reading the request body directly using the
ServletRequest.getReader() or ServletRequest.getInputStream() methods.  You
would then need to parse the data to extract the parameters.  I would
imagine that you could find similar code in the Tomcat sources, but it's
still going to be some work.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor.
http://stratuscom.ca

-Original Message-
From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 8:39 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Ordering of parameters in HTTPRequest Object


  Hello all, I am new to this mailing list, and Tomcat, so please pe
  patient...
 
  I am using Servlets to recieve html form submissions.
 
  Problem is that the form fields are in a particular order on
  the form, but
  when I get the Parameters from the request object this field order is
  gone...
 
  The post data comes in in the proper order, but I can not recover the
  ordering.  If it was only 1 form I was dealing with, I could
  write code to
  format a response, but the app is very generalized, and it is
  designed to
  handle many different forms.
 
  So the question.   Is there no way in tomcat to preserve the
  ordering of
  parameters from a form submission?

No.  This is servlet API thing, not a tomcat thing.  I think it's a bad
idea to develop servlet to depend on the order in which a request object
is formed because you never know for sure that an ordering is going to
be fixed.  For example, say a hashing algorithm is used for speed up
access.  How do you order the elements of a hash table?  The only thing
I could suggest is preface every form element with its' order, 1st element
would be 0_elementname and 9th element would be 8_elementname, then order
the elements yourself, but I think this is kind of sloppy.


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com


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




Security

2001-07-16 Thread Frank Lawlor

I'm starting to look at how to manage security and am wondering
what people's experiences are with various security managers.
For example, NT-security, Win2k Active directory/LDAP, 
IBM/Tivoli SecureWay, RYO, etc.

In my environment there may be multiple applications on a 
single server/host.

What are the pros and cons of the various approaches
(e.g., single vs. multiple realms)?

Thanks,

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






URL vs. cookies

2001-07-16 Thread Georges Boutros

hi,

i'd like to know where can i set tomcat to send the JSESSIONID on the URL
instead of using the cookies?

thanks

Georges



RE: URL vs. cookies

2001-07-16 Thread Filip Hanik

server.xml

RequestInterceptor 
className=org.apache.tomcat.request.SessionInterceptor
noCookies=false /

set noCookie to true

Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net 

-Original Message-
From: Georges Boutros [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 10:56 AM
To: Tomcat-User (E-mail)
Subject: URL vs. cookies


hi,

i'd like to know where can i set tomcat to send the JSESSIONID on the URL
instead of using the cookies?

thanks

Georges




Re: URL vs. cookies

2001-07-16 Thread Bo Xu

Georges Boutros wrote:

 hi,

 i'd like to know where can i set tomcat to send the JSESSIONID on the URL
 instead of using the cookies?

 thanks

 Georges

Hi :-)   good email for you   //haha :-)

*
n Sun, 20 May 2001, Robert Nicholson wrote:

 Question... how I force it to rewrite the URL to support url rewriting even

 if the browser supports cookies?


In 3.2, look in conf/server.xml for the string

noCookies=false

and change it to

noCookies=true

IIRC, this change is global to all webapps in this JVM.

In 4.0, the Context element includes a cookies attribute that you can
use to turn cookies on or off on a per-webapp basis.  It defaults to
true, so turn them off like this:

Context path=/examples ... cookies=false ...

Craig McClanahan
*


Bo
July 16, 2001






RE: JasperException / classpath(?) problem

2001-07-16 Thread Jann VanOver

Where did you put NumberGuessBean.class ??

It must go into WEB-INF/classes/num/ (because it is in package named num)

-Original Message-
From: howard fraser [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 7:29 AM
To: [EMAIL PROTECTED]
Subject: JasperException / classpath(?) problem


I wonder if anyone can shed any light on the following - I have looked
through the archived messages, but to no avail.

I have tomcat 3.2.2 installed on Windows 2000 SP2 with jdk1.3.1.  I do not
have a CLASSPATH environment variable set.  When I start tomcat it first
says

Using CLASSPATH:
C:\tomcat\classes;C:\tomcat\lib\ant.jar;C:\tomcat\lib\jasper.jar;C:\tomcat\l
ib\jaxp.jar;
C:\tomcat\lib\parser.jar;C:\tomcat\lib\servlet.jar;C:\tomcat\lib\webserver.j
ar;C:\jdk1.3.1\lib\tools.jar

...which seems fine to me (all the above mentioned jars exist).

When I try to run the jsp examples that come with tomcat (e.g. number guess)
I get the following exception...

org.apache.jasper.JasperException: Unable to compile class for
JSPC:\tomcat\work\localhost_8080%2Fexamples\jsp\num\_0002fjsp_0002fnum_0002f
numguess_jsp.java:3: Class num.NumberGuessBean not found in import.
import num.NumberGuessBean;

Is there sthg else I need to add to my classpath in order that tomcat can
locate num.NumberGuessBean?

Many thanks in advance for any help


howard



Need help with tomcat.policy and javamail

2001-07-16 Thread jack . chu

Hi,
 
I have a java servlet sending a email via smtp using JavaMail. The servlet
sends out the email fine when executed through telnet session. When I run
the servlet thru Tomcat, I get a java.security.AccessControlException:
access denied (java.net.SocketPermission stage.icarian.com resolve) error.
I'm running this on a cobalt server.
 
I'm assuming it's a security manager problem. I may be wrong. I need to know
how to configure the tomcat.policy.custom file to fix this problem.
 
The servlet code:
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
 
public class Mailer {
 
  private String host = stage.icarian.com;
  private String to;
  private String from;
  private String subject;
 
  public Mailer(String to, String from, String subject) {
this.to = to;
this.from = from;
this.subject = subject;
  }
 
  public void send() {
Properties props = new Properties();
props.setProperty(mail.smtp.host,host);
Session s = Session.getInstance(props,null);
try {
  MimeMessage msg = new MimeMessage(s);
  msg.setFrom(new InternetAddress(from));
  msg.addRecipient(msg.RecipientType.TO, new InternetAddress(to));
  msg.setSubject(subject);
  msg.setText();
  Transport transport = s.getTransport(smtp);
  transport.connect();
  transport.send(msg);
 

//  Transport.send(msg);
} catch (MessagingException mex) {
  mex.printStackTrace();
}
  }

 
My tomcat.policy file
grant codeBase file:/home/sites/site4/web/- {
  permission java.net.SocketPermission localhost:1024-, listen,connect;
  permission java.util.PropertyPermission *, read,write;
  permission java.lang.RuntimePermission accessClassInPackage.sun.io;
  permission java.io.FilePermission -, read,write,delete;
};
 
Thanks for any help.
Jack
 
 



Re: JasperException / classpath(?) problem

2001-07-16 Thread howard fraser

Yes, that's where it is, as per the defualt file structure when you unpack
tomcat.  It's a completely clean install, I'm just trying to get the
examples working.

Any other thoughts?

- Original Message -
From: Jann VanOver [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 7:46 PM
Subject: RE: JasperException / classpath(?) problem


 Where did you put NumberGuessBean.class ??

 It must go into WEB-INF/classes/num/ (because it is in package named
num)

 -Original Message-
 From: howard fraser [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 16, 2001 7:29 AM
 To: [EMAIL PROTECTED]
 Subject: JasperException / classpath(?) problem


 I wonder if anyone can shed any light on the following - I have looked
 through the archived messages, but to no avail.

 I have tomcat 3.2.2 installed on Windows 2000 SP2 with jdk1.3.1.  I do not
 have a CLASSPATH environment variable set.  When I start tomcat it first
 says

 Using CLASSPATH:

C:\tomcat\classes;C:\tomcat\lib\ant.jar;C:\tomcat\lib\jasper.jar;C:\tomcat\l
 ib\jaxp.jar;

C:\tomcat\lib\parser.jar;C:\tomcat\lib\servlet.jar;C:\tomcat\lib\webserver.j
 ar;C:\jdk1.3.1\lib\tools.jar

 ...which seems fine to me (all the above mentioned jars exist).

 When I try to run the jsp examples that come with tomcat (e.g. number
guess)
 I get the following exception...

 org.apache.jasper.JasperException: Unable to compile class for

JSPC:\tomcat\work\localhost_8080%2Fexamples\jsp\num\_0002fjsp_0002fnum_0002f
 numguess_jsp.java:3: Class num.NumberGuessBean not found in import.
 import num.NumberGuessBean;

 Is there sthg else I need to add to my classpath in order that tomcat can
 locate num.NumberGuessBean?

 Many thanks in advance for any help


 howard




Re: relative path to real one

2001-07-16 Thread Jaume Pausas

Hi!

  Use ServletContext.getRealPath(xyz); to do this.
  This assumes that xyz is a resource in your context
  root

   Is it possible to translate a relative path to its
   absolute one in the web
   pages under Tomcat 4.0b5?

hmm but I talking about static resources, calling from a web page not from
a servlet, perhaps with a filter that translates the code before sending to
the browser client ?? I don´t know but your idea seems to be perferct for
servlet callings.

What I want is to make a web application independent of its context name.

Thanks Best regards,
JPausas





___
¡Tienes cuentas de e-mail GRATIS en Excite España!
A tu disposición en http://correo.excite.es 




configuring user logs for tomcat

2001-07-16 Thread Esther Kim

Hi,

I'm using tomcat for both web server and app server for a web page/application (if i'm 
getting the terminology right) and need to have it create logs of users that access 
the application (ISPN and date/time).  Can you please refer me to directions on how to 
configure this for tomcat?

Thanks in advance! 




NSAPI for tomcat 3.3 with NES 3.6

2001-07-16 Thread Nagesh yencharla

HI,
Could nebody tell me where i can find the NSAPI for
tomcat 3.3 to use with NES 3.6.
Thank you,
~Nagesh

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: Need workaround for Tomcat security.

2001-07-16 Thread Jeff Kilbride

Andrew,

What version of Tomcat did this affect Form-based authentication on? I tried
the URL patterns mentioned on my Form-based Realm, and the Realm worked
correctly -- no security problems. I'm using TC 3.2.2 on Linux.

Thanks,
--jeff

- Original Message -
From: Andrew Robson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 7:29 AM
Subject: Re: Need workaround for Tomcat security.


 Hi,
   No workaround I'm afraid. I can confirm that the problem
 affects form - based JDBCRealm as well. Tried putting
 */admin/* into url pattern and broke security completely.
 I wonder whether a JkMount directive with approriately
 placed wildcards might work but haven't had time to try.
 I'd be very interested if you find a solution.
 Presumably no-one on the list has one?

 andrew

 On Sun, 15 Jul 2001, you wrote:
  Ok, i needed to put some security constraints to a dircetory, so I added
this
  to my web.xml:
   security-constraint
display-nameUQoS Amin Area/display-name
web-resource-collection
   web-resource-nameUQoS Amin Area/web-resource-name
 url-pattern/admin/*/url-pattern
/web-resource-collection
  I use BASIC authentication using the memory realm.
  Works like it supposed to when someone goes to my
http://xxx/webapp/Admin/ or
  something below, HOWEVER, if they type http://xxx/webapp//Admin/ (or
even
  more slashes), all security checkings are bypassed, anyone arr let right
in !
  (same things happens always, try it with the 'security' example shipped
with
  Tomcat.
  Sever bug!, I have posted it to BugZilla. This applies to atleast Tomcat
  3.2.1 and 3.2.2.
  And I need it fixedas soon as possible. Does anyone know a workaround to
  thisone.(I'd rather not upgrade to Tomcat 4 yet,seems like its fixed
here.)
  --
  Nils O. Selåsdal
 --

 Andrew Robson







Can I connect to an Access database?

2001-07-16 Thread Brandon Cruz

Does anyone know of a free driver that I can use to connect via jdbc from
Tomcat to a Microsoft Access database?  I have looked in the database on
java.sun.com, but there are 15 different choices.  Just looking for some
help on which direction to go.  Is this simple, or should I stay away from
connecting to access via jdbc entirely?

Brandon Cruz
Norvax Inc.
www.norvax.com




Re: ajp13 dies unexpectately

2001-07-16 Thread Jeff Kilbride

How many threads have you specified as max_threads in your PoolTCPConnector
for ajp13 in your server.xml file? If you haven't done this, and you're
running a reasonably high load, you should take a look at the minimal TC
user's guide here:

http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat_ug.html

The last example at the bottom of the page shows how to configure
max_threads, max_spare_threads, and min_spare_threads for the
PoolTCPConnector class. Tomcat doesn't react gracefully if the max_threads
number is ever reached and exceeded. I believe the default max is 50
threads. If you're getting more than 50 concurrent connections, you need to
raise this number or you'll have problems.

Thanks,
--jeff

- Original Message -
From: maarten hartsuijker
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 2:00 AM
Subject: ajp13 dies unexpectately


 we have been running tomcat 3.2.2 with apache, mod_jk and ajp13 support
for
 about 3 weeks now. In those weeks it has died 2 times unexpectately and
the
 only thing the mod_jk.og is showing me is a jk_ajp13_worker.c (586)]:
Error
 connecting to the Tomcat process.

 With a netstat I can see that 8009 is not up anymore, so both times I have
 issued a shutdown and a start. That works but (ofcourse) I'd rather not
have
 this problem at all.

 Anyone had this before and, better yet, found a solution?

 kind regards,

 Maarten Hartsuijker





Re: Tomcat + Apache on NT

2001-07-16 Thread Gary Dale

1) Tomcat won't start as a service if the configuration is invalid. 
However, you don't need to worry too much about the start order if the 
configuration doesn't change between restarts.

2) You don't need to include it if you have a custom config that 
includes the relevant information. Some people prefer to do this.

3) Use the Services control in NT. Set startup type to automatic.


Gregory Guthrie wrote:

 At 03:26 PM 07/09/2001 -0400, Gary Dale wrote:

 You only need to start Tomcat ahead of Apache if you have changed 
 Tomcat's configuration and are including the .conf-auto in 
 httpd.conf. What I suggest is setting them both to automatically 
 start, then if you change anything, shut them down and restart them 
 in the correct (Tomcat first) order.


 -- I don't quite get this;

 1) I didn't change tomcat's configuration,
 2) I did have httpd.conf include .conf-auto, I thought this was 
 required. (still do think this..!)
 3) How do you set them both to automatically start?

 Thanks,
 Gregory

 Emir Alikadic (ADNOC IST) wrote:


 Provided that you properly configured the Apache/Tomcat combo (with
 appropriate entry in the httpd.conf, as described in Tomcat docs), 
 you'll
 have to start Tomcat first and then start Apache. Manually.

 -Original Message-
 From: Gregory Guthrie [mailto:[EMAIL PROTECTED] ]
 Sent: Saturday, July 07, 2001 7:57 AM
 To: [EMAIL PROTECTED]
 Subject: Tomcat + Apache on NT

 It is not clear (to me) that I have to manually start both Tomcat and
 Apache servers on  NT (Win2K Pro). I expected Apache to start Tomcat
 as/if needed, but that fails, but everything works fine for Tomcat
 standalone, or if it is manually runing, and then Apache just connects
 to it.

 Is this correct? Is this documented somewhere? The closest thing I found
 was in the Tomcat-Apache HowTo setup where it says:  This step sets 
 various JServ internal parameters, in order:
   Instruct JServ not to start the Tomcat process. Automatically
 starting
   Tomcat is not implemented yet. 

 And then does:ApJServManual  on

 Is this correct understanding?

 Thanks.
 [EMAIL PROTECTED]

 
 *Dr. Gregory Guthrie
 *[EMAIL PROTECTED] (641)472-1125Fax: -1103
Computer Science Department
School of Computing and Information Science
Maharishi University of Management
   (Maharishi International University 1971-1995)
 http://www.mum.edu/cs_dept
 







Re: Need workaround for Tomcat security.

2001-07-16 Thread Andrew Robson

Jeff,
   TC 3.2.1 on linux. 
   Apache and mod_jk
It seems to me (without having had a chance to check)
that this must be a misconfig at the apache  
and apache/tomcat end of things rather than a tomcat bug as such.

Any thoughts? It would be a pretty big hole if it was a genuine
bug.

andrew
  
On Mon, 16 Jul 2001, you wrote:
 Andrew,
 
 What version of Tomcat did this affect Form-based authentication on? I tried
 the URL patterns mentioned on my Form-based Realm, and the Realm worked
 correctly -- no security problems. I'm using TC 3.2.2 on Linux.
 
 Thanks,
 --jeff
 
 - Original Message -
 From: Andrew Robson [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 7:29 AM
 Subject: Re: Need workaround for Tomcat security.
 
 
  Hi,
No workaround I'm afraid. I can confirm that the problem
  affects form - based JDBCRealm as well. Tried putting
  */admin/* into url pattern and broke security completely.
  I wonder whether a JkMount directive with approriately
  placed wildcards might work but haven't had time to try.
  I'd be very interested if you find a solution.
  Presumably no-one on the list has one?
 
  andrew
 
  On Sun, 15 Jul 2001, you wrote:
   Ok, i needed to put some security constraints to a dircetory, so I added
 this
   to my web.xml:
security-constraint
 display-nameUQoS Amin Area/display-name
 web-resource-collection
web-resource-nameUQoS Amin Area/web-resource-name
  url-pattern/admin/*/url-pattern
 /web-resource-collection
   I use BASIC authentication using the memory realm.
   Works like it supposed to when someone goes to my
 http://xxx/webapp/Admin/ or
   something below, HOWEVER, if they type http://xxx/webapp//Admin/ (or
 even
   more slashes), all security checkings are bypassed, anyone arr let right
 in !
   (same things happens always, try it with the 'security' example shipped
 with
   Tomcat.
   Sever bug!, I have posted it to BugZilla. This applies to atleast Tomcat
   3.2.1 and 3.2.2.
   And I need it fixedas soon as possible. Does anyone know a workaround to
   thisone.(I'd rather not upgrade to Tomcat 4 yet,seems like its fixed
 here.)
   --
   Nils O. Selåsdal
  --
 
  Andrew Robson
 
 
 
-- 






Re: Need workaround for Tomcat security.

2001-07-16 Thread Jeff Kilbride

Hi Andrew,

I know that there were some security-related problems with 3.2.1 and certain
URLs. I think a bug was found and fixed right around the time of 3.2.2 beta
5. I would suggest upgrading to 3.2.2. It's very painless -- all config
files stay the same, just copy your old ones into your 3.2.2 install
directory and change TOMCAT_HOME. I'm not seeing the problem on my
installation (TC 3.2.2, Linux, apache, mod_jk).

Thanks,
--jeff

- Original Message -
From: Andrew Robson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 1:39 PM
Subject: Re: Need workaround for Tomcat security.


 Jeff,
TC 3.2.1 on linux.
Apache and mod_jk
 It seems to me (without having had a chance to check)
 that this must be a misconfig at the apache
 and apache/tomcat end of things rather than a tomcat bug as such.

 Any thoughts? It would be a pretty big hole if it was a genuine
 bug.

 andrew

 On Mon, 16 Jul 2001, you wrote:
  Andrew,
 
  What version of Tomcat did this affect Form-based authentication on? I
tried
  the URL patterns mentioned on my Form-based Realm, and the Realm worked
  correctly -- no security problems. I'm using TC 3.2.2 on Linux.
 
  Thanks,
  --jeff
 
  - Original Message -
  From: Andrew Robson [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, July 16, 2001 7:29 AM
  Subject: Re: Need workaround for Tomcat security.
 
 
   Hi,
 No workaround I'm afraid. I can confirm that the problem
   affects form - based JDBCRealm as well. Tried putting
   */admin/* into url pattern and broke security completely.
   I wonder whether a JkMount directive with approriately
   placed wildcards might work but haven't had time to try.
   I'd be very interested if you find a solution.
   Presumably no-one on the list has one?
  
   andrew
  
   On Sun, 15 Jul 2001, you wrote:
Ok, i needed to put some security constraints to a dircetory, so I
added
  this
to my web.xml:
 security-constraint
  display-nameUQoS Amin Area/display-name
  web-resource-collection
 web-resource-nameUQoS Amin Area/web-resource-name
   url-pattern/admin/*/url-pattern
  /web-resource-collection
I use BASIC authentication using the memory realm.
Works like it supposed to when someone goes to my
  http://xxx/webapp/Admin/ or
something below, HOWEVER, if they type http://xxx/webapp//Admin/ (or
  even
more slashes), all security checkings are bypassed, anyone arr let
right
  in !
(same things happens always, try it with the 'security' example
shipped
  with
Tomcat.
Sever bug!, I have posted it to BugZilla. This applies to atleast
Tomcat
3.2.1 and 3.2.2.
And I need it fixedas soon as possible. Does anyone know a
workaround to
thisone.(I'd rather not upgrade to Tomcat 4 yet,seems like its fixed
  here.)
--
Nils O. Selåsdal
   --
  
   Andrew Robson
  
  
  
 --







Re: Need workaround for Tomcat security.

2001-07-16 Thread Nils O. Selåsdal

On Monday 16 July 2001 21:39, you wrote:
 Jeff,
TC 3.2.1 on linux.
Apache and mod_jk
 It seems to me (without having had a chance to check)
 that this must be a misconfig at the apache
 and apache/tomcat end of things rather than a tomcat bug as such.

 Any thoughts? It would be a pretty big hole if it was a genuine
 bug.
I did not have apache or mod_jk, plain Tomcat 3.2.2 installation.
The hole is there. And is big ;(



Re: Problems with install

2001-07-16 Thread Dmitri Colebatch

What output do you get when you start tomcat, and in the logs?

cheers
dim

On Mon, 16 Jul 2001, Mike Sanders wrote:

 Thanks for your help! The Tomcat build is 3.2 and no the server is not
 responding to port 80 requests.
 
 Thanks in advance,
 Mike
 
 - Original Message -
 From: Cory Powers [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 16, 2001 12:40 PM
 Subject: RE: Problems with install
 
 
  Which build of Tomcat? Is the server responding on port 8080?
 
  -Original Message-
  From: Mike Sanders [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 16, 2001 12:28 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Problems with install
 
 
  I only got a list of 2. The first was the path statement and the second
 was
  the grep... I thought that jserv was causing this problem before but now
 it
  is not installed and the same error is appearing!
 
  - Original Message -
  From: Cory Powers [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, July 16, 2001 12:19 PM
  Subject: RE: Problems with install
 
 
   It should be loaded and running at that point. run this to make sure it
  is.
  
   ps ax | grep tomcat
  
   you should get a list of about 15 or so processes.
  
   Cory
  
   -Original Message-
   From: Mike Sanders [mailto:[EMAIL PROTECTED]]
   Sent: Monday, July 16, 2001 12:06 PM
   To: [EMAIL PROTECTED]
   Subject: Problems with install
  
  
   Problem with Linux Install:
  
   I have reinstalled RedHat 6.2 without Apache. I then installed JDK 1.2.2
  and
   set the paths in the .bashrc. When I attempt to install I do not get an
   error but it just sits on the line that says:
  
   Pool TcpConnector: Starting Ajp12connectionhandler on 8007
  
   If I hit return I end up back at command line... Any ideas?
  
 
 
 




how to set virtual host for stand-alone Tomcat?

2001-07-16 Thread Jerry QU



Hi All,

how to set virtual hosts for stand-alone Tomcat?

does it have to be cooperate with Apache to use virtual 
hosts?

TIA

Jerry




Re: Pair programming review meeting

2001-07-16 Thread Richard Draucker

Are you sure there'll be enough room for everyone on this
list?  Will there be free food???



On Mon, 16 Jul 2001, you wrote:
 Hi All,
 
 You are invited to a meeting at 3:00 PM on Friday 20th July to discuss 
 how the pair programming facilities are being used, problems 
 encountered, practices employed, etc. and to explore how the pair 
 programming practices can be enhanced, tightened, etc, and to explore 
 any need to change or improve login and other security procedures.
 
 Kevin
 
 -- 
 
 Project Leader
 Plugged-In Software
 www.PIsoftware.com
 [EMAIL PROTECTED]











grand prix rules

2001-07-16 Thread Gus Tenrreiro

Hi Tracy, I got a question for you. 
In the grand prix rules under rule 11 it says

Scores will be tabulated based upon that competitor's best 5 event scores
Does that mean that no matter how many grand prix events you go to only 5
will be taken into account ??

Thanks

Gustavo E Tenrreiro

[EMAIL PROTECTED]

work: (650) 228-2861
cell  : (408) 373-8595
home: (408) 225-7097






accessing manager

2001-07-16 Thread John Riker

Using Tomcat 4.0b5 on Solaris as stand alone.  WHen I
enter the url/manager it asks for a password.  Using
any of the default ones in tomcat-users.xml let me in,
however on IE just gives me an error 403 Forbidden. 
Any ideas what I need to do to fix this?  Figured it
was a permission thing, however there is only one
file, web.xml, in that directory
tomcat/webapps/manager/WEB-INF.  Thanks.

J

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: Can I connect to an Access database?

2001-07-16 Thread guru

The standard JDBC-ODBC bridge works fine (as far as it goes).

 - A

On Mon, Jul 16, 2001 at 03:31:28PM -0500, Brandon Cruz wrote:
 Does anyone know of a free driver that I can use to connect via jdbc from
 Tomcat to a Microsoft Access database?  I have looked in the database on
 java.sun.com, but there are 15 different choices.  Just looking for some
 help on which direction to go.  Is this simple, or should I stay away from
 connecting to access via jdbc entirely?
 
 Brandon Cruz
 Norvax Inc.
 www.norvax.com

-- 
Alex Chaffee   mailto:[EMAIL PROTECTED]
jGuru - Java News and FAQs http://www.jguru.com/alex/
Creator of Gamelan http://www.gamelan.com/
Founder of Purple Technology   http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/



How to change the IP address

2001-07-16 Thread Neelu Shah

Hi All,

could someone tell me how to change the default IP address for tomcat (no
apache used)
from localhost to another IP address.

im running tomcat on Windows NT.

thanks
N




Re: Need workaround for Tomcat security.

2001-07-16 Thread Craig R. McClanahan



On Sun, 15 Jul 2001, Nils O. Selåsdal wrote:

 Ok, i needed to put some security constraints to a dircetory, so I added this 
 to my web.xml:
  security-constraint
   display-nameUQoS Amin Area/display-name
   web-resource-collection
  web-resource-nameUQoS Amin Area/web-resource-name
url-pattern/admin/*/url-pattern
   /web-resource-collection
 I use BASIC authentication using the memory realm.
 Works like it supposed to when someone goes to my http://xxx/webapp/Admin/ or 
 something below, HOWEVER, if they type http://xxx/webapp//Admin/ (or even 
 more slashes), all security checkings are bypassed, anyone arr let right in !
 (same things happens always, try it with the 'security' example shipped with 
 Tomcat.
 Sever bug!, I have posted it to BugZilla. This applies to atleast Tomcat 
 3.2.1 and 3.2.2. 
 And I need it fixedas soon as possible. Does anyone know a workaround to 
 thisone.(I'd rather not upgrade to Tomcat 4 yet,seems like its fixed here.)

It's not completely fixed in 4 -- some request URI paths still let you in.

 -- 
 Nils O. Selåsdal
 

Yep ... it is a serious bug, affecting all versions of Tomcat, and there
is no workaround.  The problem relates to the fact that normalization of
the request URI (i.e. removing // and /./, and compacting /../) is
not being performed consistently.  This is going to be fixed (in all
versions) such that the request URI received by the server will be
normalized *before* being used to map to a servlet, or to select a
security constraint.  As a side effect, the value returned when you call
request.getRequestURI() will always be normalized.

Look for announcements of the availability of patched versions shortly.

Craig McClanahan





Re: how to set virtual host for stand-alone Tomcat?

2001-07-16 Thread Dmitri Colebatch

Set them up the same as if you were using Apache.  Use the host wrapper
around your context.  From memory there's a simple example of syntax in
the default server.xml.

cheers
dim

On Tue, 17 Jul 2001, Jerry QU wrote:

 Hi All,
 
 how to set virtual hosts for stand-alone Tomcat?
 
 does it have to be cooperate with Apache to use virtual hosts?
 
 TIA
 
 Jerry
 
 
 




Re: grand prix rules

2001-07-16 Thread Adam Fowler

WTF? :-

Adam.

On Monday 16 July 2001 22:31, you wrote:
 Hi Tracy, I got a question for you.
 In the grand prix rules under rule 11 it says

 Scores will be tabulated based upon that competitor's best 5 event scores
 Does that mean that no matter how many grand prix events you go to only 5
 will be taken into account ??

 Thanks

 Gustavo E Tenrreiro

 [EMAIL PROTECTED]

 work: (650) 228-2861
 cell  : (408) 373-8595
 home: (408) 225-7097



Re: How to change the IP address

2001-07-16 Thread Dmitri Colebatch

What do you m ean by change the IP address.  Does the machine have
multiple IP addresses?  You should be able to determine IP info on a
windows box using winipcfg - I think that's right for NT, can never
remember.  Whatever IP address the box listens on tomcat will respond
to.  Is this what you want?

cheers
dim

On Mon, 16 Jul 2001, Neelu Shah wrote:

 Hi All,
 
 could someone tell me how to change the default IP address for tomcat (no
 apache used)
 from localhost to another IP address.
 
 im running tomcat on Windows NT.
 
 thanks
 N
 
 




ServletException in 4.0b5

2001-07-16 Thread Vernon Wu
I move one our small JSP application from 3.x to 4.0b5 for the reason of using servlet 2.3 specification: ServletContextListener, HttpSessionListener be more specific. 

I get the exception under the 4.0b5 with the following messages:


Exception Report:javax.servlet.ServletException: Class abc.control.ControllerServlet is not a Servlet
Root Cause:java.lang.ClassCastException: abc.control.ControllerServlet
...There is not any indication that anywhere my code is not approprt. What I shall do at this situation?I believe that I encounter the similar situation in the 3.x, and it can be resolved by recycle the Tomcat server. That method doesn't work for 4.0b5.Thanks.Vernon  Get your FREE download of MSN Explorer at http://explorer.msn.com


Applet-Servlet communication using Tomcat-Apache cooperation

2001-07-16 Thread Nancy Crisostomo Martinez

Hi everybody!!

I'm new using Tomcat, instead I'm new developing web applications, so I
need help and patient...
I'm trying to make a applet-servlet communication thru Apache-Tomcat
cooperation.

Before I tried it with a Blazix web server, but it was just for tests,
because the web server was installed locally in a PC.. and it works
perfect and I got the Applet-Servlet communication.

Now, I'm trying to do the same with Apache-Tomcat installed in a Solaris
Server, and I had been trying that communication for days and I can't
yet.

I'm trying to make an application that can solve a educational
situation, like registration of subjects in my database (Oracle).
In this case the Applet only is used like an interface for the user. The
user can register a new subject thru the Applet, then the Applet send an
object to the Servlet thru a serializable class (Ubc.class) [all this
using ObjectInputStream and ObjectOutputStream classes]. The Servlet
recieve the Ubc object and interpret it from register all data like a
field in a table of the database.
Anyway, if the user only want to see all the list of subjects, the
Applet sends the url of the Servlet next to a parameter (UserOption =
Display) and the servlet recieve the parameter and make a vector with
Ubc objects filling them with the database information and finally the
Servlet sends the vector with a writeObject method to the Applet, whose
displays the information in the screen. And that's all!!.

So, in Tomcat I create the next stucture:
tomcat-directory/webapps/proyectoprueba2/WEB-INF/classes/
---in classes directory store the servlet classes and the ubc.class

in Apache I did this:
apache-directory/htdocs/proyectoprueba2/
---in proyectoprueba2 directory store the html file that invokes the
applet class, of course, I store the applet class, and the ubc.class.

Now I invoke the html file and it works very well, but when I tried to
register a subject invoking the servlet thru the applet, I only got an
error:
   Error: 500
   Location: /proyectoprueba2/servlet/Servlet3
   Internal Servlet Error:

 java.lang.NullPointerException
 at java.lang.ClassLoader.resolveClass0(Native Method)
 at java.lang.ClassLoader.resolveClass0(Compiled Code)
 at java.lang.ClassLoader.resolveClass(Compiled Code)
 at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(Compiled Code)
 at
org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoader.java:174)

 at org.apache.tomcat.core.ServletWrapper.loadServlet(Compiled
Code)
 at org.apache.tomcat.core.ServletWrapper.init(Compiled Code)
 at org.apache.tomcat.core.Handler.service(Handler.java:254)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)

 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)

 at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
Code)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
 at java.lang.Thread.run(Compiled Code)


All the classes I did are part of a proyectoprueba2 package, so I had to
create the directory...
Where do I have put the Ubc class in Tomcat??
I'm working with Tomcat in a stand alone mode. Do I need to connect it
with Apache?? HOW???
I had been testing other servlets that are like HelloWorld... they
only print a text.. and they works perfect with Tomcat...

Can you help me???
I'll be waiting for your help
Thank you advanced..

Nancy.





RE: How to change the IP address

2001-07-16 Thread Filip Hanik

I think he means how you set the IP address the server should listen to on a
multi-homed host.

if this is the case I'm not sure you can do it in Tomcat 3.2.1

if it is possible it would look something like this

Connector className=org.apache.tomcat.service.PoolTcpConnector
Parameter name=handler

value=org.apache.tomcat.service.http.HttpConnectionHandler/
Parameter name=port
value=8080/
Parameter name=address
value=209.233.3.2/
/Connector



Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net

-Original Message-
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 4:57 PM
To: [EMAIL PROTECTED]
Subject: Re: How to change the IP address


What do you m ean by change the IP address.  Does the machine have
multiple IP addresses?  You should be able to determine IP info on a
windows box using winipcfg - I think that's right for NT, can never
remember.  Whatever IP address the box listens on tomcat will respond
to.  Is this what you want?

cheers
dim

On Mon, 16 Jul 2001, Neelu Shah wrote:

 Hi All,

 could someone tell me how to change the default IP address for tomcat (no
 apache used)
 from localhost to another IP address.

 im running tomcat on Windows NT.

 thanks
 N








jsp changes not reflected/ work dir ?

2001-07-16 Thread Bryan Murtha


Hello,

   OK, so I have a jsp page that has several jsp includes. I was having a 
problem with the changes being made in one of the includes being reflected 
in what I saw when I viewed the page through a browser. I tried touching all 
the files and restarting the server.
I then deleted all of the temp files from the work directory. Since then I 
have restarted the machine altoghter, but there are no updates
being reflected. In fact I removed the jsp include that contained the error. 
Again touched all the *.jsps. Then restarted the server and nothing 
happened. I think I might have really hosed things. Anyone have an idea on 
how to get tomcat to recognize the updates I've made?

Regards,
Bryan

Original Message Follows
From: Dmitri Colebatch [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: How to change the IP address
Date: Tue, 17 Jul 2001 09:57:25 +1000

What do you m ean by change the IP address.  Does the machine have
multiple IP addresses?  You should be able to determine IP info on a
windows box using winipcfg - I think that's right for NT, can never
remember.  Whatever IP address the box listens on tomcat will respond
to.  Is this what you want?

cheers
dim

On Mon, 16 Jul 2001, Neelu Shah wrote:

  Hi All,
 
  could someone tell me how to change the default IP address for tomcat (no
  apache used)
  from localhost to another IP address.
 
  im running tomcat on Windows NT.
 
  thanks
  N
 
 


_
Get your FREE download of MSN Explorer at http://explorer.msn.com




[FAQ] jGuru FAQ Update

2001-07-16 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .


SPONSORED BY developerWorks

need it? get it. tools, code and tutorials for open-standards based development.

Stay informed with dW's weekly email newsletter
http://www.jguru.com/misc/register_devworks.jsp?src=notify
-

Hi.  You asked to be notified daily when certain jGuru.com items get new entries.

You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp


++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP

While forwarding from one page to another by using RequestDispatcher, how do I avoid 
the error quot; OutputStream is already being used for this requestquot; ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455248

What is Ant? Do I need it to run Tomcat?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455192

++ Servlets FAQ: http://www.jguru.com/faq/Servlets

Is there a way in Tomcat to set up zones for servlets like in jserv?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455766

What is the difference between ServletContext.getInitParameter() and 
HttpServlet.getInitParameter() ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455711

How do I prevent users from viewing the contents of my WEB-INF directory?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455249

While forwarding from one page to another by using RequestDispatcher, how do I avoid 
the error quot; OutputStream is already being used for this requestquot; ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455248

How to allow the client to download and execute a .bat file?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455219

Can I spawn a background thread from my servlet?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455215

How can I generate an output in CSV format from a database query?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455207

What is a session and why is it required?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455205

How to allow the client to download and execute a .bat or .exe file?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455202

Why do I sometimes get the error ODBC Driver Manager ...function Sequence Error?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455201

How do I process FDF files created by the Acrobat Forms plug-in?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455199

++ Tomcat FAQ: http://www.jguru.com/faq/Tomcat

Is there a way in Tomcat to set up zones for servlets like in jserv?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455766

How do I upgrade from Tomcat 3 to Tomcat 4?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455735

Do I need to create my own web.xml file?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455725

What is the right way to set the JAVA_HOME environment variable on Windows NT?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455718

How do you pass options such as -Xrs to the JVM when your Tomcat container is running 
in-process within a Web server?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455716

If I deploy a WAR file while Tomcat is running,
is there a way to load (or reload) it without restarting Tomcat?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455587

Using Struts 1.0, why do I get the error cant remove Attributes from request scope?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455577

Can Tomcat be started as a user other than root under Unix?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455567

Is there any way to avoid servlet.log being deleted on restart of tomcat?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455369

When reloading a servlet that uses JNI, why do I get 
java.lang.UnsatisfiedLinkError: Native Library D:\WINNT\mynamesearch.dll already 
loaded in another classloader
?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455360

What is the password for the Tomcat admin webapp?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455354

How do I prevent users from viewing the contents of my WEB-INF directory?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455249

What is Ant? Do I need it to run Tomcat?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notifyEID=455192

How do I stop all running instances of Tomcat?
   

Re: How to change the IP address

2001-07-16 Thread Tim O'Neil

At 04:57 PM 7/16/2001, you wrote:
What do you m ean by change the IP address.  Does the machine have
multiple IP addresses?  You should be able to determine IP info on a
windows box using winipcfg - I think that's right for NT, can never
remember.  Whatever IP address the box listens on tomcat will respond
to.  Is this what you want?

You determine the ip on any Win95 and later machine w/ipconfig;
no params.





Not finding static files (Tomcat 3.2.2. on RH7)

2001-07-16 Thread Irv Thomae

 My servlet cannot seem to find static text files, no matter where I put them.
This feels like a pretty trivial problem - and I feel pretty dumb asking - 
but that's my only option, after ten hours of fruitless experiments, 
alternating with archive-searches of this list, comp.java.lang.*, Sun's 
Developer Connection, and so on.  
  I'm new to servlets but not to Java.


  Following examples from Jason Hunter's Java Servlet Programming (O'Reilly, 
2d ed.), I had a server file structure like this:

  [Tomcat root]
  |webapps
  |ROOT
   |WEB-INF
  |web.xml
  |classes
  [assorted 'whatever.class' files]

(Purists note: throughout this post, i will write [Tomcat root] as a 
short-cut for the actual path/usr/local/jakarta-tomcat-3.2.2  .)

If I understand Hunter correctly, /ROOT is the virtual equivalent of a 
file-system root - so if my servlet code refers to a file as 
/images/mypix.gif, Tomcat will expect to find that file on my system at
   [Tomcat root]/webapps/ROOT/images/mypix.gif  - is that correct?

Accordingly, I added two more directories off ROOT:

ROOT
   |html  --- contains text file fragment.txt
   |images
   |WEB-INF-- contains web.xml
 
  
But, the following code (which is supposed to read a fragment of HTML 
boilerplate from a file) consistently throws a FileNotFoundException:

System.setProperty(user.dir,[tomcat home]/webapps/ROOT);
System.setProperty(user.home,/);

String wantedFile = html/fragment.txt);
FileInputStream fis = new FileInputStream(wantedFile);

Even when a copy of tfragment.txt is placed directly in ROOT, and the 
namestring wantedFile is changed to just fragment.txt, the FileInputStr 
constructor still throws a FileNotFoundException.

The story gets more baffling.  To try to understand what was happening, I 
inserted these lines between the last 2 above:

 ServletConfig sConfig = getServletConfig();
 ServletContext ctext = sConfig.getServletContext();
 String realPath = ctext.getRealPath(wanted);

 out.println(Attempting to open ' + wanted ' as  + realPath);

 [where, of course, out is a previously-obtained PrintWriter object.)

  That diagnostic causes the browser to display the text
Attempting to open 'fragment.txt' as [tomcat root]/ROOT/html/fragment.txt

  which is then folowed by the FileNotFoundException report that
 html/fragment.txt wasn't found - even though it's there!!!

 Am I misunderstanding the mening of getRealPath() ??
 If not, why isn't the file - which really-truly *is* there - being Found?
 
 Humble thanks in advance for any and all enlightenment

  Irv Thomae








Question about copyright

2001-07-16 Thread zhang heng chong

Hello!
I am sorry for interrupted you.
I have a question about software copyright. 
I downloaded tomcat,apache from jakarta.apache.org,and I read licence. I am 
puzzled whether those softwares can be used by a profit-making company website .

best regards,

   zhang hengchong
   [EMAIL PROTECTED]




web.xml upgrading 3.1 - 3.2.2

2001-07-16 Thread John Gentilin


I am trying to upgrade my 3.1 install to 3.2 and I am using
the web.xml file in the conf directory for some special mappings
so Tomcat works in my development enviorment. After installing
the new version, it does not seem that Tomcat picks up my servlet
mappings. The classes are part of the system class path so I should
not have a visibility problem except for maybe a permissions problem
and is does not seem like Tomcat is even recognizing the URL. Can
anyone help with the problem, below is my web.xml changes.

Thanks
John G


servlet
servlet-name
cmd-mgr
/servlet-name
servlet-class
com.smart911.gca.CmdMgr
/servlet-class
/servlet

servlet-mapping
servlet-name
cmd-mgr
/servlet-name
url-pattern
/cmd/*
/url-pattern
/servlet-mapping






Re: Internationalisation problems in Tomcat 3.3?

2001-07-16 Thread Gregor Kovaè

Hi!

I had the same problems using a database. I don't know if this applies to 
your case, but nevertheless:
I created a database in Cp1250 or Latin2 encoding. Then I have put %@page 
contentType = text/html; charset=windows-1250 % on top of my JSP page 
and things work now.

Best regards,
 Kovi

P.S.: I have done this with MySQL, DB2 and Interbase.


At 17:09 16.7.01 +1000, you wrote:
Hi.

I've seen a couple of posts about problems with i18n and Tomcat. I am having
trouble with this, and at this point I'm suspecting a bug somewhere.

The same test servlet works fine with Apache JServ 1.0, but displays
??? in Tomcat 3.3m4.

Consider the test servlet below. If you call http://yourserver/servlet/test
you get just English. if You call http://yourserver/servlet/test?lang=ja
it should display some Japanese (encoded as euc-jp).

The Japanese text uses the unicode escapes for the appropriate characters.

As I was writing this e-mail, I hit refresh on my site and the Japanese
version worked. I loaded up some English pages, and the Japanese version
went back to ??.

If you uncomment out the resp.getCharacterEncoding() lines you should find
that you get the correct answer for each case.

Any thoughts?

  - Ben Kelley.

import javax.servlet.*;
import javax.servlet.http.*;

import java.io.*;

public class test extends HttpServlet
{
 protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 {
 try
 {
 if ((req.getParameter(lang) != null) 
req.getParameter(lang).equals(ja))
 {
 resp.setContentType(text/html; charset=euc-jp);
 PrintWriter out = resp.getWriter();
 out.println(htmlheadtitleJapanese/title/head);
 out.println(body);
 out.println(pJapanese/p);
 // out.println(pEncoding is  +
resp.getCharacterEncoding());

 out.println(pLocation = \u6240\u5728\u5730\uff1a/p);
 out.println(pLatest research updates =
\u76f4\u8fd1\u306e\u30ea\u30b5\u30fc\u30c1\u53ca\u3073\u66f4\u65b0/p);
 out.println(/body);
 out.println(/html);
 }
 else
 {
 resp.setContentType(text/html; charset=iso-8859-1);
 PrintWriter out = resp.getWriter();
 out.println(htmlheadtitleEnglish/title/head);
 out.println(body);
 out.println(pEnglish/p);
 // out.println(pEncoding is  +
resp.getCharacterEncoding());
 out.println(/body);
 out.println(/html);
 }
 }
 catch (Exception e)
 {
 e.printStackTrace();
 }
 }
}

Ben Kelley - [EMAIL PROTECTED]
Senior Web Developer - ResearchWeb
UBS Warburg, Sydney, Australia


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  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.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.




Who to starting jboss tomcat at service on RH7 Linux

2001-07-16 Thread
Title: Who to starting jboss  tomcat at service on RH7 Linux





 I'm a new jboss  tomcat user. I have a question.
 How to config, starting jboss  tomcat at service on RH7 Linux.


 Thanks,

ÉϺ£ÐÅͶ»¥ÁªÍøÓ¦Óü¼ÊõÓÐÏÞ¹«Ë¾
ÑîÖÓÀÚ bill.yang
Tel: 021-64664789-203
Fax: 021-34060483
Add: ÉϺ£ÊÐÐ˹ú·89Ū4ºÅ£¨ZIP£º200031£©