RE: Connection Pooling with different databases problems

2001-05-02 Thread altuga

u can try  DbConnectionBroker for pooling connections ;
www.javaexchange.com 

it is easy and powerful . 

regards ..

-Original Message-
From: Sab This [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 6:28 AM
To: [EMAIL PROTECTED]
Subject: Connection Pooling with different databases problems


Dear all,

I used Tomcat 3.2.1 with Poolman 1.4.1 running on an
iis4 webserver. I have configured Poolman serving 4
databases with the MSSQL server installed on the same
machine. All servlets run well and can get connections
at the beginning, however, general error (from Tomcat
console) and access violation (windows system
alert)occur from time to time which rendered the JVM
(I used sun jdk 1.3.01) and Tomcat died. I already
spend alot of time to fix this but still didnt get any
clues

Thanks

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Any instance of Win2K with TOMCAT?

2001-05-02 Thread Sachin Phatak

Hi! Everybody,
1. Has anyone out there used this combination successfuly - TOMCAT (running
as an NT service), IIS5 on Windows 2000 Server?

2. TOMCAT works fine on port 8080 but when I call the default examples
context, via IIS (i.e. on port 80) I get a 404.
The log files seem to show the redirection (using isapi_redirect.dll) being
executed.
Can anyone suggest a possible cause &/or solution?

3. What do the entries in isapi.log mean?

log file entries:
isapi.log
[jk_uri_worker_map.c (334)]: jk_uri_worker_map_t::uri_worker_map_close, NULL
parameter
[jk_uri_worker_map.c (184)]: In jk_uri_worker_map_t::uri_worker_map_free,
NULL parameters

IIS Log
2001-05-03 04:39:40 192.168.0.250 - W3SVC3 PODCWS 192.168.0.250 80 GET
/jakarta/isapi_redirect.dll+ - 404 2 3406 270 0 HTTP/1.1 podc.cop
Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0)
ASPSESSIONIDQMFC=GCNHONGAPFOLKILALHEBIEDJ -

Any help will be highly appreciated.

thanks
sachin




Basic Authentication via .htaccess

2001-05-02 Thread Cory L Hubert



   Can someone point me in the right 
direction.   I need to setup Basic Authenication.   I am 
currently using a .htaccess file and I would like to use it to authenticate 
users.  So I have in my web.xml
 
 
 


Protected 
Area
/free?action=getMemberform
 
DELETE
GET
POST
PUT
 

 

admin


 

BASIC
Admin

 
    
Obviously I don't have a realm named Admin or a role named Admin.   
Does anyone know how to get it to use the 
.htaccess?


Re: Connection Pooling with different databases problems

2001-05-02 Thread Winfried Klum

> 
> Dear all,
> 
> I used Tomcat 3.2.1 with Poolman 1.4.1 running on an
> iis4 webserver. I have configured Poolman serving 4
> databases with the MSSQL server installed on the same
> machine. All servlets run well and can get connections
> at the beginning, however, general error (from Tomcat
> console) and access violation (windows system

Are you using JNDI for Driver-Access ? I figured out that this is the
only access-mode in wich poolman isn't corrupting database access from
different web-apps (Servlets) 

> alert)occur from time to time which rendered the JVM
> (I used sun jdk 1.3.01) and Tomcat died. I already
> spend alot of time to fix this but still didnt get any
> clues
> 
> Thanks
> 
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/



RE: tomcat

2001-05-02 Thread Warren Crossing



run it 
on an e450 
 
http://www.sun.com/servers/workgroup/450/
 
=)

  -Original Message-From: Hariy 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, 3 May 2001 3:13 
  PMTo: [EMAIL PROTECTED]Subject: 
  tomcat
  How to increase the speed of tomcat. 



RE: JDBC Realm

2001-05-02 Thread Warren Crossing



j2ee 
web application security from a jdbc database

  -Original Message-From: Hariy 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, 3 May 2001 3:13 
  PMTo: [EMAIL PROTECTED]Subject: JDBC 
  Realm
  What is JDBC 
Realm.


tomcat

2001-05-02 Thread Hariy



How to increase the speed of tomcat. 



JDBC Realm

2001-05-02 Thread Hariy



What is JDBC Realm.


Re: Connection Pooling with different databases problems

2001-05-02 Thread Chonsiu208

Hey manI've got the same problem.can u pls remind me if there's
solution ? thx !!
- Original Message -
From: Sab This <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 11:28 AM
Subject: Connection Pooling with different databases problems


> Dear all,
>
> I used Tomcat 3.2.1 with Poolman 1.4.1 running on an
> iis4 webserver. I have configured Poolman serving 4
> databases with the MSSQL server installed on the same
> machine. All servlets run well and can get connections
> at the beginning, however, general error (from Tomcat
> console) and access violation (windows system
> alert)occur from time to time which rendered the JVM
> (I used sun jdk 1.3.01) and Tomcat died. I already
> spend alot of time to fix this but still didnt get any
> clues
>
> Thanks
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>



Re: Tomcat, IIS and virtual hosts

2001-05-02 Thread David Crooke

Apache is a much better solution for virtual hosts than IIS

Brian Murray wrote:

> 
> >Can someone send me an example of how to configure Tomcat to work with
> >virtual hosts?
>
> Hi Mr. Lebowitz.  I've been after the same thing.  Unfortunately the score sits at 
>Requests 2,
> Responses 0.  If you receive any help off the list, I'd greatly appreciate it if you 
>would share
> it with me.  If I receive any, I'll certainly pass it along to you.  Good luck.
>
> =
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/




Re: Tomcat, IIS and virtual hosts

2001-05-02 Thread Brian Murray


>Can someone send me an example of how to configure Tomcat to work with
>virtual hosts?

Hi Mr. Lebowitz.  I've been after the same thing.  Unfortunately the score sits at 
Requests 2,
Responses 0.  If you receive any help off the list, I'd greatly appreciate it if you 
would share
it with me.  If I receive any, I'll certainly pass it along to you.  Good luck.

=


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Re: Servlet --> File --> Web-browser

2001-05-02 Thread alan leung

can any one helps me out?
thanks again.

--- alan leung <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a servlet reads a file from FileInputStream
> and
> copy those bytes to ServletOutputStream and send
> back
> to web browser.
> 
> But if user click CANCEL while downloading in
> netscape. i will get an exception in doGet method.
> -->
> IOException in doGet(): java.net.SocketException:
> Connection aborted by peer: socket write error
> 
> if user click CANCEL in IE (Internet Explorer). i
> didn't get any exception print out.
> 
> Both cases is browser connect to servlet engine
> directly (tomcat)
> 
> if browser connects to apache server --> then
> tomcat;
> no exception got caught for netscape and IE if user
> click CANCEL while download. 
> 
> What i think is clicking CANCEL while downloading a
> file would lost the TCP connection without ending
> it.
> which would always rise an IOException right?  Why
> if
> i use apache server w/ tomcat or IE connect to
> tomcat
> directly won't cause IOException in doGet() method?
> 
> thanks.
> 
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great
> prices
> http://auctions.yahoo.com/


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Connection Pooling with different databases problems

2001-05-02 Thread Sab This

Dear all,

I used Tomcat 3.2.1 with Poolman 1.4.1 running on an
iis4 webserver. I have configured Poolman serving 4
databases with the MSSQL server installed on the same
machine. All servlets run well and can get connections
at the beginning, however, general error (from Tomcat
console) and access violation (windows system
alert)occur from time to time which rendered the JVM
(I used sun jdk 1.3.01) and Tomcat died. I already
spend alot of time to fix this but still didnt get any
clues

Thanks

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Tomcat, IIS and virtual hosts

2001-05-02 Thread Robert J. Lebowitz

I recently installed Tomcat 3.2.1 on an NT 4.0 server running IIS according
to Gil Shachor's directions, using JavaService to install it as an NT
Service.  Everything worked exactly as it supposed to; my JSPs are working
fine.

However, on a separate NT 4.0 server, following the same directions, I've
been unable to get the server to redirect correctly.  I know that Tomcat is
running because I can call up my JSPs and the Tomcat examples using:

http://localhost:8080/examples/jsp/index.html

However, what I really want is to be able to use the URL

http://localhost/examples/jsp/index.html


I realized that primary difference between the two servers is that one runs
virtual hosts.  I suspect that the configuration for Tomcat on IIS must be
different when you have virtual hosts.  I've looked for examples in the
documentation, but haven't found any; most examples seem to be geared for
Apache.  I discovered the  directive for server.xml, but my efforts
at getting it to work failed.

Can someone send me an example of how to configure Tomcat to work with
virtual hosts?

Rob




JSP re-compile performance under heavy load

2001-05-02 Thread Jason_Henriksen



I am considering a design where a thread calls a  long running query, uses
the results to generate a JSP and then write the new JSP over the old JSP.
Tomcat would then notice the update, recompile the JSP and display the new
query results.  The query/rewrite would happen once every 10 minutes.  The
query could take up to a minute to run.

Will tomcat do this acceptably if the server is under heavy load?  If this
would create a performance/memory problem, is there anything in my code
that could be done to minimize it?  Is there any help I could provide in
the Tomcat code to optimize this?  (I've never coded anything for Tomcat,
but I'd love an excuse to get involved)

I know that JSP re-compilation is not generally used as a production
feature.  Could it be reasonably used this way, or am I better off to
examine another avenue?  (Such as holding the results in memory and
re-printing them for each request, which would be memory prohibitive)

Thanks,
   Jason Henriksen



--
Warning : The information contained in this message may be privileged and confidential 
and protected from disclosure. If the reader of this message is not the intended 
recipient, you are hereby notified that any dissemination, distribution or copying of 
this communication is strictly prohibited. If you have received this communication in 
error, please notify us immediately by replying to this message and then delete it 
from your computer. All e-mail sent to this address will be received by the Providian 
Financial corporate e-mail system and is subject to archiving and review by someone 
other than the recipient.

==




Re: back button

2001-05-02 Thread Greg Chakmakian

My pleasure.  I'm glad that experience came back to help someone out.

-greg




On Wednesday, May 2, 2001, at 03:58 PM, Abraham Liu wrote:

> Hi greg,
> Thank you for a wondful idea.
> ABe liu
>
> -Original Message-
> From: Greg Chakmakian [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 30, 2001 2:23 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: back button
>
>
> You can also trick it with some JavaScript.  When the user goes back 
> check
> to see if there is anything in the browser's forward history (i.e.
> history(1) or something like that, I don't remember the exact syntax).  
> If
> there is something in the forward history then just do a
> location.href="someurl.jsp" redirect to the page you want them to go to.
> That might be a work-around.  Total speculation here because I've never
> tried this before, but I don't see why it wouldn't work.
>
> -greg
>
>
>
>
>
> -Original Message-
> From: Wolle [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 30, 2001 5:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: back button
>
>
> Hei ,
> that can't you block explicit,
> you could only check, when you create the Page (wich comes up when you 
> press
> the back button), if some record is in use already, and then redirect 
> to the
> prefered site.
>
> Greetings,
> Michael
>
>
> Abraham Liu wrote:
>
>> Hi,
>> How can  I  do something so user can't click "back button" for some
>> particular pages. Ex. user can't click "back button" to go back to the
>> confirm page to insert record again.
>> I know it is off-topic. But I think lots of gurus in this list know 
>> how to
>> do. Please help me.
>> Thanks
>> Abe Liu
>



RE: mod_jk

2001-05-02 Thread J. Patrick Lanigan

I am also having a problem, although I finally was able to build mod_jk.so.
Apache chokes when I include the tomcat/conf/mod_jk.conf file. It gives me
the following...

Begin
Output
[root@domain]# /usr/local/apache/bin/apachectl start
Syntax error on line 8 of /usr/local/tomcat/conf/mod_jk.conf:
API module structure `jk_module' in file /usr/local/apache/libexec/mod_jk.so
is garbled - perhaps this is not an Apache module DSO?
/usr/local/apache/bin/apachectl start: httpd could not be started
End
Output

Also, I get the following when starting tomcat...

Begin
Output
Guessing TOMCAT_HOME from tomcat.sh to /usr/local/tomcat/bin/..
Setting TOMCAT_HOME to /usr/local/tomcat/bin/..
Using classpath:
/usr/local/tomcat/bin/../lib/ant.jar:/usr/local/tomcat/bin/../lib/jasper.jar
:/usr/local/tomcat/bin/../lib/jaxp.jar:/usr/local/tomcat/bin/../lib/parser.j
ar:/usr/local/tomcat/bin/../lib/servlet.jar:/usr/local/tomcat/bin/../lib/tes
t:/usr/local/tomcat/bin/../lib/webserver.jar
[root@figmental apache1.3]# 2001-05-02 08:42:13 - ContextManager: Adding
context Ctx( /examples )
2001-05-02 08:42:13 - ContextManager: Adding context Ctx( /admin )
Starting tomcat. Check logs/tomcat.log for error messages
2001-05-02 08:42:14 - ContextManager: Adding context Ctx(  )
2001-05-02 08:42:14 - ContextManager: Adding context Ctx( /test )
FATAL:java.io.IOException: Address already in use
java.io.IOException: Address already in use
at java.net.PlainSocketImpl.socketBind(PlainSocketImpl.java:native)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:43)
at java.net.ServerSocket.(ServerSocket.java:53)
at java.net.ServerSocket.(ServerSocket.java:30)
at
org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerS
ocketFactory.java:97)
at
org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java
:239)
at
org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188)
at
org.apache.tomcat.core.ContextManager.start(ContextManager.java:527)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
End
Output

I do not, however, have any directories named test.

Any help would be greatly appreciated.
Thanks,
Patrick




Re: JDBCRealm enhancements

2001-05-02 Thread Peter B. West

Following Ignacio's suggestion, I checked out the cvs of 3.3 and tested
the message digest password fucntions again.  They are working as (not)
advertised.  Not being familiar with Java or Java security, I am still
not sure of the supported message digest algorithms, but, according to
http://java.sun.com/products/jdk/1.2/docs/guide/security/CryptoSpec.html#AppA,
they include MD5, MD2 and SHA.  I tested MD5.  I wrote a small app to
generate md5 versions of the plaintext passwords in the users table of
my postgresql 7.1 database.

The html howto on JDBCRealm in the distribution is out of date and a bit
misleading.  It documents this entity in server.xml:

 

In 3.3, this entity becomes JDBCRealm, and the className attribute
disappears.  This is documented in the server.xml file.  The howto has
this in the discussion of attributes to the previous entity.

Digest The algorithm used for digest passwords or "No" for plain
passwords, the values can be "MD5", etc... (Optional)

I have used lower-case `digest'; i.e.
digest="MD5"
 
Then there is the following setion on digested passwords.

Using digested passwords

To use digested password you need to store them digested. To achieve
this, you will need to use the same digest strategies that JDBCrealm
uses to store the passwords, inside JDBCRealm there is a static method
with signature final public static String Digest(String password,String
algorithm) this method is provided as a tool to be used outside
JDBCRealm by an application that want to store passwords readable by
JDBCRealm.

Again, the method is all lower case, i.e.
final public static String digest(String password, String algorithm)

Furthermore, there is a main in JDBCRealm.java which allows the class to
be used as an app to generate the digested passwords.  Format is

java org.apache.tomcat.modules.aaa.JDBCRealm -a MD5 passwd1 [passwd2
...]

and the -a argument is your desired algorithm.

Ignacio, I have just put a note in bugzilla.  I have a patchfile for the
howto.  Where should I send it?

Peter

"Ignacio J. Ortega" wrote:
> 
> digested passwords is on 3.3 nightly builds not exactly as yours ..some
> slightly better  with MessageDigest and bit more configurable...the
> other can be done but i think it's partiicular need for your app,
> subject of inheritance thought .. in all cases the changes only can go
> to 3.3 ..3.2.x is in bug fix only mode..
> 
> Thanks for the feedback..
> 
> post the RFE in http://nagoya.apache.org/bugzilla with your code as an
> attach following guidelines on jakarta site
> http://jakarta.apache.org/site/source.html ..
> 
> TIA
> 
> Saludos ,
> Ignacio J. Ortega
> 
> > -Mensaje original-
> > De: Christian Hargraves [mailto:[EMAIL PROTECTED]]
> > Enviado el: miércoles 2 de mayo de 2001 16:37
> > Para: [EMAIL PROTECTED]
> > Asunto: JDBCRealm enhancements
> >
> >
> > First off. Is JDBCRealm just an example of what can be done
> > or is it meant
> > for actual use?
> >
> > If it's only meant as an example of how to write a
> > RequestInterceptor, then
> > don't bother to read on, please just respond and tell me so.
> >
> > We need to add some functionality to JDBCRealm that I think a
> > lot of other
> > people might also be able to use.
> >
> > The following modifications are:
> >
> > 1) The option to put in the password encode type -- This is for those
> > companies that encode the password (I think most do).
> > Currently only 'base64' and 'none' are supported. This is
> > done by adding an
> > attribute in the server.xml tag in the RequestInterceptor called
> > encryptMethod.
> > I just used the SecurityTools.base64Decode(password) method
> > to do this.
> >
> > 2) The option of storing the userid as well as the username.
> > -- This is done
> > by adding another optional attribute that states the userid column.
> > This enables user-role table to be queried against the userid
> > instead of the
> > username for those sites that have a lot of users. It also
> > throws the userid
> > in the session for those that need the userid throughout the entire
> > application.
> >
> > Please tell me what you think. We already added the
> > functionality so there is
> > no work for anyone else to do, but to review the code.
> >
> > Christian Hargraves
> >

-- 
Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"



Cannot build servletapi 4b3

2001-05-02 Thread Anthony W . Marino

./build.sh: line 35:  1502 Segmentation fault  ${JAVA_HOME}/bin/java 
-classpath ${CLASSPATH} org.apache.tools.ant.Main -buildfile ${BUILDFILE} "$@"


Any suggestions?


Thank you,
Anthony



Preserving session state from https to http on tomcat

2001-05-02 Thread Ben Wong

Hi,

I am using form login and I'd like to send my username/password via https to
the server. That can be easily accomplished by setting up the https
connection on port 8443 on tomcat. The problem is after logging in, I'd like
to switch back to http with the user "login state" preserved from the https
session. But alas, switching from https to http wipes out session info on
Netscape (4.7). When my post login jsp pages reference the previously set
session login object via http, null is returned. However, if I stay in
https, everything is fine.

I know bea weblogic has a solution where the server can be set to inhibit
the server port number from being included in the cookie sent back to
Netscape. This way only the domain name is sent. But I can't find that a
similar setting in Tomcat.

Any advice on this would be greatly appreciated.

Thanks

Ben Wong




RE: Tomcat3.2.1 - JDK1.3.x - and NT service

2001-05-02 Thread Robert Finneran

I run Tomcat 3.2.1 with JDK 1.3.1 under Windows 2000 with Microsoft IIS5 and
mod_jk.
I had a lot of problems with NT services using JDK 1.3.0. Fortunatley, JDK
1.3.1 has fixed the issues I was having.

Regards!

-Original Message-
From: Mark Mynsted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 4:50 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Tomcat3.2.1 - JDK1.3.x - and NT service


Yes, and yes.  I use JavaService.  It works great.

Sincerely yours;

Mark Mynsted



VHA Management Information Systems Client Services
[EMAIL PROTECTED]
(972) 830 - 0592, Internal x1592

>>> [EMAIL PROTECTED] 5/2/2001 6:21:30 PM >>>
Hi,

I run tomcat as a service with jdk1.3.x and Tomcat3.2.1 on NT 4.0. When I
log off tomcat dies because of the jdk1.3.x problem.

Is anybody here running tomcat as a service with other programs like
javaserve etc? Does it solve the problem?

Any help will be greatly appreciated.

Thanx
Ganesh




Re: Tomcat3.2.1 - JDK1.3.x - and NT service

2001-05-02 Thread Mark Mynsted

Yes, and yes.  I use JavaService.  It works great.

Sincerely yours;

Mark Mynsted



VHA Management Information Systems Client Services
[EMAIL PROTECTED]
(972) 830 - 0592, Internal x1592

>>> [EMAIL PROTECTED] 5/2/2001 6:21:30 PM >>>
Hi,

I run tomcat as a service with jdk1.3.x and Tomcat3.2.1 on NT 4.0. When I
log off tomcat dies because of the jdk1.3.x problem.

Is anybody here running tomcat as a service with other programs like
javaserve etc? Does it solve the problem?

Any help will be greatly appreciated.

Thanx
Ganesh




Fixed Tomcat white pages and no responses problem...for me anyway.

2001-05-02 Thread Rainer Mager

Hi all,

I know quite a few people have experienced problems with Tomcat such that a
web hit will hang (never return) or give an immediate empty page. These
incidences are somewhat dependant on traffic and when under heavy load seem
to increase. Anyway, we too saw this problem with Tomcat 3.2.x and 3.3.x (we
haven't tried 4.0 yet). Well, for us anyway, we managed to get around this
problem with 3.3.
Basically, I ran Tomcat from within a debugger (Borland JBuilder) and found
that when these errors occur Tomcat didn't seem to be at fault, that is, I
could find no threads doing anything wrong. This, compounded with other
tests, eventually led me to believe the problem was in the communication
from Apache to Tomcat. I tested this by running Tomcat stand-alone and with
Apache (Ajp13) under heavy loads. When running with Apache we could
reproduce the problem within minutes, to the point where the server (the
combination of Apache and Tomcat) was in a state where nearly every second
or third hit had the above problem. When running with Tomcat stand-alone
(running servlets on port 8080) and Apache serving static pages on port 80
we could not reproduce the problem after hours of testing.
Obviously the big problem with this solution is the need to run on
multiple, non-standard, ports. If you have the above problems and can live
with this then you might want to try our solution. Of course you could
alternatively run everything through Tomcat on port 80 but this has its own
limitations.

Today I hope to begin testing these problems with 3.2.2b4 which I have
heard may not have the existing problem. Anyone else with news on this
front?


--Rainer

\///Rainer Mager
 \  ///
  \\\VANGUARD   Ever Green Bldg., 5F
   \\\///   3-3-2 Naka-Meguro, Meguro-ku, Tokyo 153-0061
\\//Phone: 5768-2855  Fax: 5768-2856
 \/ Email:  [EMAIL PROTECTED]    Web:
www.vgkk.co.jp 





Tomcat3.2.1 - JDK1.3.x - and NT service

2001-05-02 Thread Sankaranarayanan Ganapathy

Hi,

I run tomcat as a service with jdk1.3.x and Tomcat3.2.1 on NT 4.0. When I
log off tomcat dies because of the jdk1.3.x problem.

Is anybody here running tomcat as a service with other programs like
javaserve etc? Does it solve the problem?

Any help will be greatly appreciated.

Thanx
Ganesh



FW: mod_jk

2001-05-02 Thread Laurence Mayer


I am having problems compiling mod_jk on 
Redhat 6.2
Apache 1.3.12-2
jakarta-tomcat-3.2.1
tomcat-mod-3.2.1-1.i386

There errors are like :
In file included from mod_jk.c:66
/usr/include/apache/ap_config.h:85: sys/types.h: No such file or directory

I get many many like this.

Ideas or suggestions?

Thanks
Laurence



-Original Message-
From: Milt Epstein [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 8:09 PM
To: '[EMAIL PROTECTED]'
Subject: Re: mod_jk build on Solaris


On Wed, 2 May 2001, Mark Crouch wrote:

> I tried updating the apxs perl script with the following:
>
> my $CFG_TARGET= 'q(httpd)';# substituted via
> Makefile.tmpl
> my $CFG_CC= 'q(gcc)';# substituted via
> Makefile.tmpl
> my $CFC_CFLAGS= 'q( -DSOLARIS=260 -DMOD_PERL -DUSE_PERL_SSI
> -I/usr/local/include -DUSE_EXPAT -I../lib/expat-lite `../apaci`)';
> my $CFC_CFLAGS_SHLIB  = 'q(-fPIC -DSHARED_MODULE)';
> my $CFG_LD_SHLIB  = 'q(ld)';
> my $CFG_LDFLAGS_SHLIB = 'q(-G)';
> my $CFG_LIBS_SHLIB= 'q()';
> my $CFG_PREFIX= 'q(/usr/apache)';
> my $CFG_SBINDIR   = 'q(/usr/apache/bin)';
> my $CFG_INCLUDEDIR= 'q(/usr/apache/include)';
> my $CFG_LIBEXECDIR= 'q(/usr/apache/libexec)';
> my $CFG_SYSCONFDIR= 'q(/usr/apache)';
>
> When executing the script, I now receive the following errors:
>
>   Global symbol "$CFG_FLAGS" requires explicit package name at
> /usr/apache/bin/apxs line 91.
>   Global symbol "$CFG_CFLAGS_SHLIB" requires explicit package name at
> /usr/apache/bin line 371.
>
> I was unable to copy verbatim the settings that John had mentioned due to
> differences in the location of certain apache directories.
> Does anyone have an idea why this is failing?

I don't really know what you're trying to do, but the above looks like
a simple perl problem.  Note that when you define the variables, the
names are $CFC_CFLAGS and $CFC_CFLAGS_SHLIB, while the error messages
 ^   ^
are for $CFG_CFLAGS and $CFG_CFLAGS_SHLIB.  Looks like a simple typo.
   ^   ^

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]



mod_jk

2001-05-02 Thread Laurence Mayer

I am having problems compiling mod_jk on 
Redhat 6.2
Apache 1.3.12-2
jakarta-tomcat-3.2.1
tomcat-mod-3.2.1-1.i386

There errors are like :
In file included from mod_jk.c:66
/usr/include/apache/ap_config.h:85: sys/types.h: No such file or directory

I get many many like this.

Ideas or suggestions?

Thanks
Laurence



-Original Message-
From: Milt Epstein [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 8:09 PM
To: '[EMAIL PROTECTED]'
Subject: Re: mod_jk build on Solaris


On Wed, 2 May 2001, Mark Crouch wrote:

> I tried updating the apxs perl script with the following:
>
> my $CFG_TARGET= 'q(httpd)';# substituted via
> Makefile.tmpl
> my $CFG_CC= 'q(gcc)';# substituted via
> Makefile.tmpl
> my $CFC_CFLAGS= 'q( -DSOLARIS=260 -DMOD_PERL -DUSE_PERL_SSI
> -I/usr/local/include -DUSE_EXPAT -I../lib/expat-lite `../apaci`)';
> my $CFC_CFLAGS_SHLIB  = 'q(-fPIC -DSHARED_MODULE)';
> my $CFG_LD_SHLIB  = 'q(ld)';
> my $CFG_LDFLAGS_SHLIB = 'q(-G)';
> my $CFG_LIBS_SHLIB= 'q()';
> my $CFG_PREFIX= 'q(/usr/apache)';
> my $CFG_SBINDIR   = 'q(/usr/apache/bin)';
> my $CFG_INCLUDEDIR= 'q(/usr/apache/include)';
> my $CFG_LIBEXECDIR= 'q(/usr/apache/libexec)';
> my $CFG_SYSCONFDIR= 'q(/usr/apache)';
>
> When executing the script, I now receive the following errors:
>
>   Global symbol "$CFG_FLAGS" requires explicit package name at
> /usr/apache/bin/apxs line 91.
>   Global symbol "$CFG_CFLAGS_SHLIB" requires explicit package name at
> /usr/apache/bin line 371.
>
> I was unable to copy verbatim the settings that John had mentioned due to
> differences in the location of certain apache directories.
> Does anyone have an idea why this is failing?

I don't really know what you're trying to do, but the above looks like
a simple perl problem.  Note that when you define the variables, the
names are $CFC_CFLAGS and $CFC_CFLAGS_SHLIB, while the error messages
 ^   ^
are for $CFG_CFLAGS and $CFG_CFLAGS_SHLIB.  Looks like a simple typo.
   ^   ^

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]



Servlet Classloader problems Tomcat 3.2.1

2001-05-02 Thread August Gresens

I am trying to deploy a servlet in Tomcat 3.2 which uses a 
classloader. I am having problem with the classloader not finding the 
classes I have installed in the WEB-INF/lib directory.

 From other threads, I have discovered that this a configuration issue 
that has to do with the classloader hierarchy.

The solution ( described in a thread called "Re:Servlet Classloader" 
posted on Feb 2nd, 2001 ) describes the work around to the problem, 
which is unclear to me:

"place a copy of the dispatcher servlet into each apps 
WEB-INF/classes directory."

Can anyone tell me what this means? Does anyone know if this problem 
has been addressed in version 4.0 of Tomcat?

Thanks,

August Gresens



Mail Notification

2001-05-02 Thread Administrator

The attached message has had some or all attachments deleted because of the following 
reason:

Message contains attachments: tomcat.reg

Additional Information:

none





Hi, 
I thought you wouldn´t mind to include a link to a 
.REG file in http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-iis-howto.html, 
to make the installation simpler.
 
So here it is.
Bruno GazzeraDepartamento de SistemasPaginar.netArenales 1239, Puerta 1, Piso1(CA1061AR) Capital Federal, ArgentinaTel/Fax (54 11) 4815 1212[EMAIL PROTECTED]http://www.paginar.net 

 tomcat.reg



TC 3.2.2b4 URI Rewriting with mod_ssl

2001-05-02 Thread Wolle

I have testet the TC3.2.2b4 now with the ajp13 protocol over the new
mod_jk-eapi.so
and mod_jk-stdapi.so (release 4/30), and nothing will work with URI
Rewriting.
Have I  something more to  do ? set TOMCAT_OPS like below, or to copy
the
jsee.jar and jnet.jar in the lib dir ?

Greetings and sorry for the massive questions,
Michael

Marc Saegesser wrote:

> There were two problems that I knew about and both are described in
the bug
> report http://nagoya.apache.org/bugzilla/show_bug.cgi?id=578.  One
problem
> is addressed by defining
> java.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol and
other
> problem was that it wouldn't set the default port correctly for https
URLs.
>
> Both of these bugs have been fixed in beta 4.  If your still seeing a
> problem there must be something else wrong that I haven't seen yet.
One
> thing to note, however, is that there is a known issue with AJP12 that

> prevents URL rewritting from working correctly on ports other than
443.  For
> example, if your using Apache to serve HTTPS on port 8443 then Tomcat
won't
> know that the connection is secure and will think the URL scheme is
actually
> HTTP.  This is a limitation of the AJP protocol and we can't fix it.
The
> AJP13 protocol does not have this problem.
>
> > -Original Message-
> > From: Wolle [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 01, 2001 2:55 PM
> > To: [EMAIL PROTECTED]
> > Subject: Tomcat 3.2.2 beta 4 & mod_ssl & URI
> >
> >
> > Hello,
> > i have one question about the session tracking (URI) with mod_ssl.
> > You have said, that you have fixed it.
> > But in TC3.2.2b4 it isn't fixed, did you mean you fixed it only
> > in the final
> > release ?
> > I think session tracking and mod_ssl is some important thing,
> > that should work
> > together.
> >
> > Please worte back,
> > Michael
> >




Servlets, Beans, and Threading

2001-05-02 Thread Sean

Hello All,

If I have a process that needs to run within Tomcat to communicate with a
remote server, and that process needs it's own thread of execution, what
would be the best way to go about this in the Tomcat/Servlet container
world?  I am not sure if each Servlet has it's own thread of execution so I
wasn't sure if I should just subclass Servlet or HttpServlet.  I am not sure
of the ramifications of having a bean manage it's own threads and how that
would effect Tomcat in general.

Does anyone have any pointers, ideas, or suggestions on how they have done
this or would go about doing this nicely in Tomcat?  Would this be cross
container code or Tomcat specific?

Thanks,
Sean




integrating Tomcat with PWS on NT

2001-05-02 Thread Lyle H. Ward

All,

I'm getting "java.lang.NullPointerException
at org.apache.tomcat.service.JNIEndpointConnector.start(JNIEndpointConne
ctor.java:110)" 

Question 1. Should uriworkermap.properties and uriworkermap.properties-auto
be similar? uriworkermap.properties is set to use jni only and
uriworkermap.properties-auto does not contain any reference to jni. It's
default is ajp12.

Question 2. For an NT installation, does the path separator matter in the
conf files. e.g. in server.xml there is path="logs/tomcat.log" and 




Question 3. The jni_connect.dll appears to be failing to load with a
java.lang.NullPointerException. Any Ideas?

Thank you, Lyle

E:\jakarta\tomcat-3.2.1>bin\tomcat run
Including all jars in E:\JAKARTA\TOMCAT-3.2.1\lib in your CLASSPATH.

Using CLASSPATH: E:\JAKARTA\TOMCAT-3.2.1\classes;E:\JAKARTA\TOMCAT-3.2.1\lib\ant
.jar;E:\JAKARTA\TOMCAT-3.2.1\lib\jasper.jar;E:\JAKARTA\TOMCAT-3.2.1\lib\jaxp.jar
;E:\JAKARTA\TOMCAT-3.2.1\lib\parser.jar;E:\JAKARTA\TOMCAT-3.2.1\lib\servlet.jar;
E:\JAKARTA\TOMCAT-3.2.1\lib\webserver.jar;E:\JDK1.3\LIB;E:\JDK1.3\lib\tools.jar

Starting tomcat. Check logs/tomcat.log for error messages
Failed to loadLibrary() e:/jakarta/tomcat-3.2.1/bin/win32/i386/jni_connect.dll
Library e:/jakarta/tomcat-3.2.1/bin/win32/i386/jni_connect.dll loaded
FATAL:java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.tomcat.service.JNIEndpointConnector.start(JNIEndpointConne
ctor.java:110)
at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
E:\jakarta\tomcat-3.2.1>



 






Contributed .REG file for IIS installation

2001-05-02 Thread Bruno Gazzera



Hi, 
I thought you wouldn´t mind to include a link to a 
.REG file in http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-iis-howto.html, 
to make the installation simpler.
 
So here it is.
Bruno GazzeraDepartamento de SistemasPaginar.netArenales 1239, Puerta 1, Piso1(CA1061AR) Capital Federal, ArgentinaTel/Fax (54 11) 4815 1212[EMAIL PROTECTED]http://www.paginar.net 

 tomcat.reg


Re: tomcat.log

2001-05-02 Thread Paul Ramos

How about a cron to remove them daily or at specific intervals. I have not run into the same problem. However all my logs on all my servers get deleted or moved on a regular basis.

From: Georges Boutros <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED] 
To: "Tomcat (E-mail)" <[EMAIL PROTECTED]>
Subject: tomcat.log 
Date: Wed, 2 May 2001 14:14:25 -0400 

hi, 

i'm testing the durability of tomcat under a heavy attack of users , 

i got a problem with the tomcat.log and jasper.log , those 2 files got so 
big they took all the available space on my harddisk 

which have failed my test. 


does anyone know how to manage the log files not to get so big. 

thanks 

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


Re: tomcat.log

2001-05-02 Thread Mark Mynsted

You could consider logging fewer events.  

Sincerely yours;

Mark Mynsted



VHA Management Information Systems Client Services
[EMAIL PROTECTED]
(972) 830 - 0592, Internal x1592

>>> [EMAIL PROTECTED] 5/2/2001 1:14:25 PM >>>
hi,

i'm testing the durability of tomcat under a heavy attack of users ,

i got a problem with the tomcat.log and jasper.log , those 2 files got so
big they took all the available space on my harddisk

which have failed my test.


does anyone know how to manage the log files not to get so big.

thanks

Georges




RE: JDBCRealm enhancements

2001-05-02 Thread Ignacio J. Ortega

digested passwords is on 3.3 nightly builds not exactly as yours ..some
slightly better  with MessageDigest and bit more configurable...the
other can be done but i think it's partiicular need for your app,
subject of inheritance thought .. in all cases the changes only can go
to 3.3 ..3.2.x is in bug fix only mode..

Thanks for the feedback..

post the RFE in http://nagoya.apache.org/bugzilla with your code as an
attach following guidelines on jakarta site
http://jakarta.apache.org/site/source.html ..

TIA

Saludos ,
Ignacio J. Ortega


> -Mensaje original-
> De: Christian Hargraves [mailto:[EMAIL PROTECTED]]
> Enviado el: miércoles 2 de mayo de 2001 16:37
> Para: [EMAIL PROTECTED]
> Asunto: JDBCRealm enhancements
> 
> 
> First off. Is JDBCRealm just an example of what can be done 
> or is it meant 
> for actual use?
> 
> If it's only meant as an example of how to write a 
> RequestInterceptor, then 
> don't bother to read on, please just respond and tell me so.
> 
> We need to add some functionality to JDBCRealm that I think a 
> lot of other 
> people might also be able to use.
> 
> The following modifications are:
> 
> 1) The option to put in the password encode type -- This is for those 
> companies that encode the password (I think most do). 
> Currently only 'base64' and 'none' are supported. This is 
> done by adding an 
> attribute in the server.xml tag in the RequestInterceptor called 
> encryptMethod. 
> I just used the SecurityTools.base64Decode(password) method 
> to do this.
> 
> 2) The option of storing the userid as well as the username. 
> -- This is done 
> by adding another optional attribute that states the userid column. 
> This enables user-role table to be queried against the userid 
> instead of the 
> username for those sites that have a lot of users. It also 
> throws the userid 
> in the session for those that need the userid throughout the entire 
> application.
> 
> Please tell me what you think. We already added the 
> functionality so there is 
> no work for anyone else to do, but to review the code. 
> 
> Christian Hargraves
> 



Re: tomcat.log

2001-05-02 Thread Ben Ricker

You want to turn down the logging level in the server.xml file; if it is 
info, change it to 'warn'. Also, you could use logrotate running at a 
certain time frame to watch the log for a specific size and then "roll 
it". I am not sure what issues this raises with Tomcat alone. With 
apache, you have to HUP it (on Unix).

Ben Ricker
System Administrator
Wellinx.com

Georges Boutros wrote:

> hi,
> 
> i'm testing the durability of tomcat under a heavy attack of users ,
> 
> i got a problem with the tomcat.log and jasper.log , those 2 files got so
> big they took all the available space on my harddisk
> 
> which have failed my test.
> 
> 
> does anyone know how to manage the log files not to get so big.
> 
> thanks
> 
> Georges
> 
> 




RE: JDBCRealm changes

2001-05-02 Thread Filip Hanik

Hi Christian, I'm writing a document on interceptors at the moment, I can
help you out if you need my help.
The TC 3.2.1 JDBC realm is a pretty poor implementation since it is not
using a connection pool or anything, also, if the connection breaks it will
not reconnect either.

let me know if you need some assistance
reply to my personal email mailto:[EMAIL PROTECTED]
Filip

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

> -Original Message-
> From: Christian Hargraves [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 11:15 AM
> To: [EMAIL PROTECTED]
> Subject: JDBCRealm changes
>
>
> Hi all,
>
>   I sent a message earlier this morning about enhancing
> JDBCRealm. We are
> going to do this anyways. I think it would be better if we could
> somehow work
> together and put the changes in the tomcat release.
>   Does anyone have anything to say about this? Does anyone
> care? Is anyone out
> there? I'm beginnig to feel lonely..
>
> Anyways, I would appreciate some form of feedback, even if it's
> "go to hell
> and leave us alone."
>
> Thanks,
> Christian
>




Jakarta NT Service

2001-05-02 Thread MAURER,ALEXANDRE (HP-Switzerland,ex1)

Hi !

My environment : 
NT 4.0 Worksation SP5 192 Mb RAM

I managed to have Tomcat run on my NT notebook, I even managed to connect it
to Apache (well the instructions were very simple and clear). 
Tomcat is running using the startup batch files.

I still have a problem running Tomcat as a NT Service; I downloaded the
jk_nt_service.exe and configured to whole as described in the doc, which
works; well partially : 
- Registery entries are correctly done
- I can hence see the Service using the appropriate Control in the Control
Panel
.. but the service won't start  
net start JK_Tomcat ( the name I gave) results in : 
The JK_Tomcat service is starting.
(working)
The JK_Tomcat service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.

My questions are quite simple : 
Is there a way to produce verbose output from jk_nt_service ? 
Is there a place where log information about that can be found ? 

I tried to trace the Registery/File access done by the JVM (only one running
on my system) using some utilities from SysInternals but the JVM is not
started at all (or it does no Registery/File accesses I could trace !).

Thank you for your help 

--
Alexandre MAURER   Phone  : +41 (0) 1 735 7495
Hewlett-Packard SwitzerlandFax: +41 (0) 1 735 7708
HP Consulting Zurich   Mobile : +41 (0)79 634 8037
[mailto:[EMAIL PROTECTED]]
--  



RE: back button

2001-05-02 Thread Abraham Liu

Hi greg,
Thank you for a wondful idea. 
ABe liu

-Original Message-
From: Greg Chakmakian [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 2:23 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: back button


You can also trick it with some JavaScript.  When the user goes back check
to see if there is anything in the browser's forward history (i.e.
history(1) or something like that, I don't remember the exact syntax).  If
there is something in the forward history then just do a
location.href="someurl.jsp" redirect to the page you want them to go to.
That might be a work-around.  Total speculation here because I've never
tried this before, but I don't see why it wouldn't work.

-greg





-Original Message-
From: Wolle [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 5:02 PM
To: [EMAIL PROTECTED]
Subject: Re: back button


Hei ,
that can't you block explicit,
you could only check, when you create the Page (wich comes up when you press
the back button), if some record is in use already, and then redirect to the
prefered site.

Greetings,
Michael


Abraham Liu wrote:

> Hi,
> How can  I  do something so user can't click "back button" for some
> particular pages. Ex. user can't click "back button" to go back to the
> confirm page to insert record again.
> I know it is off-topic. But I think lots of gurus in this list know how to
> do. Please help me.
> Thanks
> Abe Liu




Socket write failed: 10053 error message

2001-05-02 Thread Zsolt Koppany

Hi,

sometime I get this error message under Windows-NTsp3 with tomcat-3.2.1.
Do you know what that is?

Zsolt


-- 
Zsolt Koppany
Intland GmbH www.intland.com
Schulze-Delitzsch-Strasse 16
D-70565 Stuttgart
Tel: +49-711-7871080 Fax: +49-711-7871017



Unsubscribing problem

2001-05-02 Thread Marian Ganuci

Hi, everybody


It seems that is no solution to get out this list, but to change the email
address. However, this is isn't a solution, or at least not a good one. I've
sent email to:
mailto:[EMAIL PROTECTED]  with the unsubscribe in
the subject field
STATUS: doesn't work

mailto:[EMAIL PROTECTED]
but with my very own data. My emal address is [EMAIL PROTECTED], so I sent
the email at
mailto:[EMAIL PROTECTED]
STATUS: doesn't work


Although, in the welcome message, it was clearly specified that a
confirmation email will be sent back to me, no such thing happened. So I
guess that we're all stuck in here, unless someone has another idea.



Marius




Re: GZIP, JSP and servlet

2001-05-02 Thread Cécile QUERAN

Servlet filters may be a very good idea for my problem.

mod-gzip is used -as far as I know- just to compress files when a .gz
version exists, which means it won't do anything for dynamic content, unless
the dynamic content is output in a file, which is not scalable nor
efficient.

Thanks a lot for your help.

L. QUERAN

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 1:27 PM
Subject: Re: GZIP, JSP and servlet


>
> I think the latest servlet spec. brings the concept of "filters" which you
> can install as the post-processor for your output streams. Tomcat 4.0
> should have support for this (and as far as I remember one sample filter
> that comes with it is the GZIP filter).
>
> Also Apache should have a way for this (mod_gzip?)
>
>




RE: [ERROR] OutputStream is already being used for this request

2001-05-02 Thread Tali Ambar


> I do not use pageContext.forward(..) or .include(..)  and there aren't any
> <%  written the following code is written in a Servlet:
> response.setContentType ("image/GIF");
> ServletOutputStream outStream = response.getOutputStream();
> int p1 = 1;
> int[] p2 = new int[1];
> byte bytes[] = new byte[1];
> stream.RemoteRead(bytes,p1,p2);
> outStream.write(bytes);
> I thought that they might be some flag which can dim the PrintWriter "out"
> and then I could pass the outtputStream to the client side.
> Thanks
> Tali
> -Original Message-
> You might need to make sure that no output is being sent to the browser
> prior to your attempting to open the outputStream. ANY spaces before the
> pageContext.forward(..) or .include(..) call may be sent to the browser
> and will create a JspWriter output stream that will conflict with your
> getOutputStream() call. One thing worth trying is to start your jsp file
> with the first characters "<%", the scriptlet openning tag, and make the
> call to the servlet before any output is generated in your jsp file. 
> I hope that helps, 
> -Mark [EMAIL PROTECTED]  
> 
> On Wed, 2 May 2001, Tali Ambar wrote: 
> > 
> > 
> > Hi
>  > 
> > 1. I'm trying to pass a stream to an html in order to see GIF files in a
> 
> > 
> > stream form on the browser. 
> > 2. I wrote (in a servlet) the following lines 
> > IStream stream = ...; // stream of a file in a GIF format 
> > response.setContentType ("image/GIF"); 
> > ServletOutputStream outStream = response.getOutputStream(); 
> > int p1 = 1; 
> > int[] p2 = new int[1]; 
>  > byte bytes[] = new byte[1];
> > stream.RemoteRead(bytes,p1,p2); 
>  > outStream.write(bytes); 
> > 3. This servlet is called by a jsp which is called from an Html file (by
> 
>  > the tag:  >) 
> > 4. When running only the servlet I can see the GIF file. 
> > 5. When I run the jsp I get the following error: 
>  > "Error 500: 
>  > OutputStream is already being used for this request 
>  > at
> org.apache.tomcat.core.ResponseImpl.getWriter(ResponseImpl.java:210)"
> > 6. running the html file fails 
> > 7. I can not use PrintWriter servlet because I need to pass binary data 
>  > and not test. 
> > Thanks 
>  > Tali 



RE: [ERROR] OutputStream is already being used for this request

2001-05-02 Thread Tali Ambar

I do not use pageContext.forward(..) or .include(..)  and there aren't any
<%  written the following code is written in a Servlet:
response.setContentType ("image/GIF");
ServletOutputStream outStream = response.getOutputStream();
int p1 = 1;
int[] p2 = new int[1];
byte bytes[] = new byte[1];
stream.RemoteRead(bytes,p1,p2);
outStream.write(bytes);
I thought that they might be some flag which can dim the PrintWriter "out"
and then I could pass the outtputStream to the client side.
Thanks
Tali
-Original Message-
You might need to make sure that no output is being sent to the browser
prior to your attempting to open the outputStream. ANY spaces before the
pageContext.forward(..) or .include(..) call may be sent to the browser and
will create a JspWriter output stream that will conflict with your
getOutputStream() call. One thing worth trying is to start your jsp file
with the first characters "<%", the scriptlet openning tag, and make the
call to the servlet before any output is generated in your jsp file. 
I hope that helps, 
-Mark [EMAIL PROTECTED]  

On Wed, 2 May 2001, Tali Ambar wrote: 
> 
> 
> Hi
 > 
> 1. I'm trying to pass a stream to an html in order to see GIF files in a 
> 
> stream form on the browser. 
> 2. I wrote (in a servlet) the following lines 
> IStream stream = ...; // stream of a file in a GIF format 
> response.setContentType ("image/GIF"); 
> ServletOutputStream outStream = response.getOutputStream(); 
> int p1 = 1; 
> int[] p2 = new int[1]; 
 > byte bytes[] = new byte[1];
> stream.RemoteRead(bytes,p1,p2); 
 > outStream.write(bytes); 
> 3. This servlet is called by a jsp which is called from an Html file (by 
 > the tag: ) 
> 4. When running only the servlet I can see the GIF file. 
> 5. When I run the jsp I get the following error: 
 > "Error 500: 
 > OutputStream is already being used for this request 
 > at org.apache.tomcat.core.ResponseImpl.getWriter(ResponseImpl.java:210)"
> 6. running the html file fails 
> 7. I can not use PrintWriter servlet because I need to pass binary data 
 > and not test. 
> Thanks 
 > Tali 



tomcat.log

2001-05-02 Thread Georges Boutros

hi,

i'm testing the durability of tomcat under a heavy attack of users ,

i got a problem with the tomcat.log and jasper.log , those 2 files got so
big they took all the available space on my harddisk

which have failed my test.


does anyone know how to manage the log files not to get so big.

thanks

Georges



JDBCRealm changes

2001-05-02 Thread Christian Hargraves

Hi all,

I sent a message earlier this morning about enhancing JDBCRealm. We are 
going to do this anyways. I think it would be better if we could somehow work 
together and put the changes in the tomcat release. 
Does anyone have anything to say about this? Does anyone care? Is anyone out 
there? I'm beginnig to feel lonely..

Anyways, I would appreciate some form of feedback, even if it's "go to hell 
and leave us alone." 

Thanks,
Christian



Re: mod_jk build on Solaris

2001-05-02 Thread Milt Epstein

On Wed, 2 May 2001, Mark Crouch wrote:

> I tried updating the apxs perl script with the following:
>
> my $CFG_TARGET= 'q(httpd)';# substituted via
> Makefile.tmpl
> my $CFG_CC= 'q(gcc)';# substituted via
> Makefile.tmpl
> my $CFC_CFLAGS= 'q( -DSOLARIS=260 -DMOD_PERL -DUSE_PERL_SSI
> -I/usr/local/include -DUSE_EXPAT -I../lib/expat-lite `../apaci`)';
> my $CFC_CFLAGS_SHLIB  = 'q(-fPIC -DSHARED_MODULE)';
> my $CFG_LD_SHLIB  = 'q(ld)';
> my $CFG_LDFLAGS_SHLIB = 'q(-G)';
> my $CFG_LIBS_SHLIB= 'q()';
> my $CFG_PREFIX= 'q(/usr/apache)';
> my $CFG_SBINDIR   = 'q(/usr/apache/bin)';
> my $CFG_INCLUDEDIR= 'q(/usr/apache/include)';
> my $CFG_LIBEXECDIR= 'q(/usr/apache/libexec)';
> my $CFG_SYSCONFDIR= 'q(/usr/apache)';
>
> When executing the script, I now receive the following errors:
>
>   Global symbol "$CFG_FLAGS" requires explicit package name at
> /usr/apache/bin/apxs line 91.
>   Global symbol "$CFG_CFLAGS_SHLIB" requires explicit package name at
> /usr/apache/bin line 371.
>
> I was unable to copy verbatim the settings that John had mentioned due to
> differences in the location of certain apache directories.
> Does anyone have an idea why this is failing?

I don't really know what you're trying to do, but the above looks like
a simple perl problem.  Note that when you define the variables, the
names are $CFC_CFLAGS and $CFC_CFLAGS_SHLIB, while the error messages
 ^   ^
are for $CFG_CFLAGS and $CFG_CFLAGS_SHLIB.  Looks like a simple typo.
   ^   ^

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]




RE: Why Use apache

2001-05-02 Thread Tony Armstrong

These questions seem to come up a bit. The answer to which server(s) to use
really depends on the situation you are in  e.g.:

1. You want to develop and test JSPs/servlets for yourself - Tomcat is fine,
you do not need to have another server.
2. You already have a production server e.g. IIS and want to add
JSPs/servlets and use Tomcat - well you would have to have a real strong
business case to change from IIS to Apache or another server
3. You have a business plan that incorporates a web server serving static
pages - high load, and has dynamic pages based on JSPs/servlets. This is
probably the hardest decision as it involves many aspects i.e. company
policy, current hardware etc

So the first thing to do is assess your needs, what do you really want. From
this you can narrow down the different scenarios.

One thing to remember, just because apache/tomcat are free (which is great)
there is always a cost involved.

> -Original Message-
> From: Martin Mauri [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 8:25 AM
> To:   [EMAIL PROTECTED]
> Subject:  Re: Why Use apache
> 
> It depends on which are the other servers...I'd sugeest using
> Tomcat-Apache.
> 
> > If I have all my static html and graphics loading off of other servers,
> is
> > there any reason to use Apache with Tomcat? Is the combination more
> stable
> > or is performance better with both running?
> >
> > thanks
> >
> > -dave
> >
> > At 11:00 AM 5/2/2001, Ronan Derby wrote:
> > >tomcat isn't as good as apache at serving static html files and images.
> > >also, with apache up and running you can do other stuff like execute
> cgi
> > >scripts and so on.
> > >
> > >-Original Message-
> > >From: Skinner, Dallas M [mailto:[EMAIL PROTECTED]]
> > >Sent: 02 May 2001 15:48
> > >To: [EMAIL PROTECTED]
> > >Subject: Why Use apache
> > >
> > >
> > >Excuse me if this question is obvious.  If Tomcat can be run in a
> standalone
> > >mode, why should it be used in conjunction with apache?
> > >
> > >Thanks
> > >
> > >Dallas Skinner



Re: Can I run EJBs

2001-05-02 Thread Ivan



You need JBoss , www.jboss.org

  - Original Message - 
  From: 
  Hari 
  Yellina 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, May 02, 2001 4:38 
  AM
  Subject: Can I run EJBs
  
  Hi all,. 
   
   Can I run EJBs in the tomcat. Please help 
  me.
   
  Regards,
  Yellina


RE: Problem with session tracking. Please help

2001-05-02 Thread Roberts Huw

Nope.  I have a JSP with only 26 lines (started with about 7 lines but I've
been 
adding more information).
What I'm finding now is that if I shut down my browser and restart it then
the 
result of HttpSession.getId is a new random string.  On the first refresh,
that 
id is also put in the browser cookie as "JSESSIONID".  Some other user
connecting 
from a browser running on a different machine can (not always) then "steal"
my session 
and rewrite HttpSession.getId.  Subsequently the other browser has getId and

JSESSIONID consistent with the new id, and my browser has getId and
JSESSIONID 
inconsistent(!!!) with the getId equal to the new id and JSESSIONID equal to
the old id.

Here's the JSP:

  
  
  Huw's snoop page
  
  

  <%HttpSession ss = request.getSession(true); %>
  SessionId: <%= ss.getId() %>
  IsNew: <%= ss.isNew() ? "true" : "false" %>
  <%Integer i = (Integer)ss.getAttribute("fred");
if (i == null) 
  i = new Integer(0); 
else 
  i = new Integer(i.intValue()+1);
ss.setAttribute("fred", i); 
  %>
  Count: <%= i.toString() %>
  <%Cookie[] cookie = request.getCookies(); %>
  Cookies:
  <%for (int j=0; j
  <%=cookie[j].getName()%> <%=cookie[j].getValue()%>
  <%}%>

  
  


Thanks,
Huw


>  -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: 02 May 2001 17:13
> To:   '[EMAIL PROTECTED]'
> Subject:  RE: Problem with session tracking.  Please help
> 
> I have seen a problem with sessions in the past due to bad 
> program design.
> Make sure that your servlets have no members. If so, they 
> would share them between all users.
> 
> Try to make a simple example first to make sure that you can 
> maintain session state.
> 
> Regards, Jan Kester
> 
> -Original Message-
> From: William Kaufman [SMTP:[EMAIL PROTECTED]]
> Sent: woensdag 2 mei 2001 17:10
> To:   '[EMAIL PROTECTED]'
> Subject:  RE: Problem with session tracking.  Please help
> 
> Are both the servers running on the same host?  This sounds 
> like a problem
> I've run into: since cookies are identified by host, all cookies
named
> "JSESSIONID" from the same host are considered the same cookie.  
> 
> In my case, the servlets are running on different ports on 
> the same machine.
> I can't see anything in the cookie spec (RFC 2109) which lets 
> you segregate
> cookies by port, so I'm out of luck (and maybe you are, too, 
> if that's what
> you're doing).
> 
> If this isn't your case, try seeing what Tomcat is putting in 
> the JSESSIONID
> cookie.  A cheezy way to do this would be to use IE: in the
security
> settings for your host, change the cookie settings to 
> "Prompt"; then, when
> hitting your site, you'll get an alert from which you can see 
> the cookie
> info.
> 
> 
> --
Bill K.
> 
> 
> > -Original Message-
> > From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 02, 2001 7:24 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: Problem with session tracking. Please help
> > 
> > 
> > 
> > 
> > > -Original Message-
> > > From: William Kaufman [mailto:[EMAIL PROTECTED]]
> > > Sent: 02 May 2001 15:02
> > > To: '[EMAIL PROTECTED]'
> > > Subject: RE: Problem with session tracking. Please help
> > > 
> > > 
> > > 1) Does your browser have cookies enabled?  If not, you need 
> > > to rewrite all
> > > your URLs, using HttpServletResponse.encode[Redirect]URL().
> > > 
> > 
> > Yes it does have cookies enabled.  Supposing I decide to use the
> > above code, should I just stick it at the top of my JSP?
> > 
> > > 2) Are you defining a cookie or URL parameter names 
> > > "jsessionid"?  That one
> > > is used by Tomcat to keep track of the session, and shouldn't 
> > > be set by the
> > > servlet.
> > > 
> > 
> > I'm not doing either of these things.
> > 
> > > 3) Does HttpSession.getId() keep returning new IDs, and 
> > > HttpSession.isNew()
> > > keep returning "true" on each call to your servlet?
> > > 
> > 
> > No.  What seems to be happening is that a browser will "steal"
> > a previously existing session while it is still owned by another
> > browser.  
> > 
> > I have two machines "A" and "B".  "A" looks at the page and gets
> > a session id (e.g.)"A1" and isNew() returns true.  "A" then 
> refreshes 
> > the page a number of times.  session id is still 

RE: Tomcat Performance..

2001-05-02 Thread Craig O'Brien

Hello,

Those are similar numbers to what I have been getting on Intel platforms
with Tomcat3.2.1.  You can boost Tomcat to about 90 pages per second using
ajp13, mod_jk, and reducing the log level to warn rather then info. (of
course your Servlet code makes a difference) There is actually a bug in the
logging with Tomcat 3.2.1 -- info actually gives you debug log level.
According to GOMEZ the ajp13 connector is not fully optimized and mod_jk is
still unfinished.  Apache's performance can be boosted by limiting the
modules that you use and reducing log levels as well.  Interestingly, I was
testing a servlet which displayed date, session variables, and generated a
random password and clocked in at about 88 pages per second with mod_jk.
When I direct connected to Tomcat I was able to get 463 pages per second
with no errors so there is allot of potential there. I was able to top out
at 1107 pages per second on that servlet with Resin. Consider your
bandwidth, of course, 50-60 pages per second can easily overwhelm a T1 line.
Indeed with a standard 45k+ page you would be lucky to anywhere near 25.

Regards,
Craig

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 8:50 AM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat Performance..


Kief Morris wrote:
>
>
> It sounds like you tested Tomcat on an HP, and Tomcat on an x86 with
> Solaris 8, vs. iPlanet on an Ultra running Solaris 2.6. You are then
guessing
> that the difference in performance is entirely due to the servlet engine?
>
> Have you tried testing Tomcat vs. iPlanet on *identical* hardware/OS
> platforms?
>


  Well, alas I haven't been able to talk the iPlanet folks into building
iWS for me on Solaris x86 yet so I can't test it that way. In testing
just straight normal everyday static HTML serving between Apache and
iPlanet between the two platforms I get a more expected performance
difference. Where the iWS server can spit back something like 200
requests per second and the Apache server can spit back 170 requests per
second. That would be what I expect. I've got a couple of other projects
I've got to get done here today and then I was planning on building the
Apache/Tomcat setup over on the Ultra 60 to see if the performance
numbers are still skewed as much on the same platform.


--
Steve Brunton   <[EMAIL PROTECTED]>  Phone: 404-827-2756
Chief Engineer Enterprise SystemsOne CNN Center, Atlanta GA
CNN Internet Technologies  ICBM: 84W 23' 45" 33N 45' 29"
<*> There's too much blood in my alcohol system. <*>




AW: Why Use apache

2001-05-02 Thread Ralph Einfeldt

There are some things to add:

- tomcat has to run as root to use a privileged
  port (like 80). Apache just opens the port as 
  root and spawns children under a different
  user id that process the requests.

- there are several modules around that only
  exist for apache (Like mod_gzip, mod_zlog)

- tomcat doesn't support Frontpage Server 
  Extensions (Or other CGI-Packages)
  (Please no flames, I'm not using it, but
   some of our customers)

Summary from previous posts:
- tomcat access logging is not standard
- apache will be faster in serving static content
- apache will be faster in 'speaking' http
- apache 'speaks' HTTP 1.1, tomcat 3.x speaks only 1.0
- apache is more stable
- apache is more secure

> -Ursprüngliche Nachricht-
> Von: Duncan Irvine [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 2. Mai 2001 18:04
> An: '[EMAIL PROTECTED]'
> Betreff: RE: Why Use apache
> 
> 
> I would suggest that Apache is also more secure - it's been 
> around longer,
> and has had more development, thus has had longer to mature.  
> If you hide
> Tomcat behind Apache, then any bugs that may appear in 
> Tomcat's URL parsing
> (for example) are less of a worry.
> 
> Duncan.
> 
> 
> > -Original Message-
> > From: David M. Rosner [mailto:[EMAIL PROTECTED]]
> > Sent: 02 May 2001 16:06
> > To: [EMAIL PROTECTED]
> > Subject: RE: Why Use apache
> > 
> > 
> > If I have all my static html and graphics loading off of 
> > other servers, is 
> > there any reason to use Apache with Tomcat? Is the 
> > combination more stable 
> > or is performance better with both running?
> > 
> > thanks
> > 
> > -dave
> > 
> > At 11:00 AM 5/2/2001, Ronan Derby wrote:
> > >tomcat isn't as good as apache at serving static html files 
> > and images.
> > >also, with apache up and running you can do other stuff like 
> > execute cgi
> > >scripts and so on.
> > >
> > >-Original Message-
> > >From: Skinner, Dallas M [mailto:[EMAIL PROTECTED]]
> > >Sent: 02 May 2001 15:48
> > >To: [EMAIL PROTECTED]
> > >Subject: Why Use apache
> > >
> > >
> > >Excuse me if this question is obvious.  If Tomcat can be run 
> > in a standalone
> > >mode, why should it be used in conjunction with apache?
> > >
> > >Thanks
> > >
> > >Dallas Skinner
> > 
> 
> 
> **
> **
> This message contains information which may be privileged
> and confidential and subject to legal privilege. If you are not
> the intended recipient, you may not peruse, use, disseminate,
> distribute or copy this message. If you have received this 
> message in error, please notify the sender immediately by 
> e-mail, facsimile, or telephone and return or destroy the 
> original message. Sopheon and its officers are not responsible
> for any statements or material in this e-mail and in any attachment
> to it which might give rise to any criminal or civil claim.
> **
> **
> 



RE: Problem with session tracking. Please help

2001-05-02 Thread William Kaufman

> I have only one tomcat server.  The "different machines" in question
> are different client machines.

So it sounds like you _are_ running into a similar issue as I am: one
browser instance (see below) connecting to one or more servlet containers
running on the same machine.  Right?

> Interestingly tomcat doesn't appear to be trying to put anything in
> the cookie!!!  I have another page which uses javascript to manipulate
> the cookie and (when I switch on your suggested option) IE prompts to 
> ask whether I should allow it to store that cookie.  In no other 
> circumstance does IE prompt to ask about storing a cookie.

IE will only ask once per browser instance (or process): if you start up
another IE (from a desktop icon, for instance), it'll ask again.  But if you
start a new window by selecting "File/New/Window" from the menu, it's the
same browser instance, and you'll share the same session ID; and, if the
original browser window was already connected to your server, IE won't ask
again for the new one.

And note that, if you disable per-session cookies and enable persistent
cookies in your browser, the cookies will now go to disk and be shared among
all browser instances: you'll once again run into servlets clobberring your
cookie, but opening new browser instances won't help you anymore.

-- Bill K.


> -Original Message-
> From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 8:49 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Problem with session tracking. Please help
> 
> 
> Apologies.  A misunderstanding.
> I have only one tomcat server.  The "different machines" in question
> are different client machines.
> 
> Interestingly tomcat doesn't appear to be trying to put anything in
> the cookie!!!  I have another page which uses javascript to manipulate
> the cookie and (when I switch on your suggested option) IE prompts to 
> ask whether I should allow it to store that cookie.  In no other 
> circumstance does IE prompt to ask about storing a cookie.
> 
> So...  How is tomcat keeping track of my session?
> Looks as though I may have to revert to your URL encode suggestion...
> 
> Thanks a lot
> Huw
> 
> 
> > -Original Message-
> > From: William Kaufman [mailto:[EMAIL PROTECTED]]
> > Sent: 02 May 2001 16:10
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: Problem with session tracking. Please help
> > 
> > 
> > Are both the servers running on the same host?  This sounds 
> > like a problem
> > I've run into: since cookies are identified by host, all 
> cookies named
> > "JSESSIONID" from the same host are considered the same cookie.  
> > 
> > In my case, the servlets are running on different ports on 
> > the same machine.
> > I can't see anything in the cookie spec (RFC 2109) which lets 
> > you segregate
> > cookies by port, so I'm out of luck (and maybe you are, too, 
> > if that's what
> > you're doing).
> > 
> > If this isn't your case, try seeing what Tomcat is putting in 
> > the JSESSIONID
> > cookie.  A cheezy way to do this would be to use IE: in the security
> > settings for your host, change the cookie settings to 
> > "Prompt"; then, when
> > hitting your site, you'll get an alert from which you can see 
> > the cookie
> > info.
> > 
> > 
> > 
> -- Bill K.
> > 
> > 
> > > -Original Message-
> > > From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, May 02, 2001 7:24 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: RE: Problem with session tracking. Please help
> > > 
> > > 
> > > 
> > > 
> > > > -Original Message-
> > > > From: William Kaufman [mailto:[EMAIL PROTECTED]]
> > > > Sent: 02 May 2001 15:02
> > > > To: '[EMAIL PROTECTED]'
> > > > Subject: RE: Problem with session tracking. Please help
> > > > 
> > > > 
> > > > 1) Does your browser have cookies enabled?  If not, you need 
> > > > to rewrite all
> > > > your URLs, using HttpServletResponse.encode[Redirect]URL().
> > > > 
> > > 
> > > Yes it does have cookies enabled.  Supposing I decide to use the
> > > above code, should I just stick it at the top of my JSP?
> > > 
> > > > 2) Are you defining a cookie or URL parameter names 
> > > > "jsessionid"?  That one
> > > > is used by Tomcat to keep track of the session, and shouldn't 
> > > > be set by the
> > > > servlet.
> > > > 
> > > 
> > > I'm not doing either of these things.
> > > 
> > > > 3) Does HttpSession.getId() keep returning new IDs, and 
> > > > HttpSession.isNew()
> > > > keep returning "true" on each call to your servlet?
> > > > 
> > > 
> > > No.  What seems to be happening is that a browser will "steal"
> > > a previously existing session while it is still owned by another
> > > browser.  
> > > 
> > > I have two machines "A" and "B".  "A" looks at the page and gets
> > > a session id (e.g.)"A1" and isNew() returns true.  "A" then 
> > refreshes 
> > > the page a number of times.  

Re: mod_jk build on Solaris

2001-05-02 Thread Mark Crouch

I tried updating the apxs perl script with the following:

my $CFG_TARGET= 'q(httpd)';# substituted via
Makefile.tmpl 
my $CFG_CC= 'q(gcc)';# substituted via
Makefile.tmpl
my $CFC_CFLAGS= 'q( -DSOLARIS=260 -DMOD_PERL -DUSE_PERL_SSI
-I/usr/local/include -DUSE_EXPAT -I../lib/expat-lite `../apaci`)';
my $CFC_CFLAGS_SHLIB  = 'q(-fPIC -DSHARED_MODULE)';
my $CFG_LD_SHLIB  = 'q(ld)';
my $CFG_LDFLAGS_SHLIB = 'q(-G)';
my $CFG_LIBS_SHLIB= 'q()';
my $CFG_PREFIX= 'q(/usr/apache)';
my $CFG_SBINDIR   = 'q(/usr/apache/bin)';
my $CFG_INCLUDEDIR= 'q(/usr/apache/include)';
my $CFG_LIBEXECDIR= 'q(/usr/apache/libexec)';
my $CFG_SYSCONFDIR= 'q(/usr/apache)';

When executing the script, I now receive the following errors:

Global symbol "$CFG_FLAGS" requires explicit package name at
/usr/apache/bin/apxs line 91.
Global symbol "$CFG_CFLAGS_SHLIB" requires explicit package name at
/usr/apache/bin line 371.

I was unable to copy verbatim the settings that John had mentioned due to
differences in the location of certain apache directories.
Does anyone have an idea why this is failing?



Mark Crouch
Web Application Developer
Voice: (616) 913-4103
Fax: (616) 456-5250
 <<...>> 




some doubts abt precompiling jsps.

2001-05-02 Thread kamesh jayachandran

Hai all,
As suggested I can precompile the jsps to classes,but the problem is
1)With jspc I am able to parse the jsps to java files.Now I can
compile.But tomcat follows its own naming convention when compiling the
jsps to classes upon request(if it is not precompiled).Shall I have to
follow the conventions in to make tomcat recognize it.But one solution
sugested is 
$./jspc.sh -webxml $TOMCAT_HOME/webapps/urcontext/WEB-INF/web.xml -d
$TOMCAT_HOME/webapps/urcontext/WEB-INF/classes -webapp
$TOMCAT_HOME/webapps/urcontext/

It parses the jsp files in the context "urcontext" to java files to my
classes folder now I have to compile it.

It generates the web.xml file which maps the jsp request to a compile
servlet.
According to my understanding each web application will have one
JSPServlet instance and depending on the request the corresponding pages
will be shown as the output stream of JSPServlet.(This is what I infer
from the extension mapping in the ROOT web.xml file).If I generate the
web.xml which points to each request to each servlet,It will lead to many
servlets instanaces instead of one JSPServlet.

Any other solution .
kamesh jayachandran

-- 
"I would suggest you to read through the following book and files:
* Kernighan & Pike, "The Practice of Programming"
* Documentation/CodingStyle
* drivers/net/aironet4500_proc.c
 and consider, erm, discrepancies. On the second thought, reading K&R
 might also be useful. IOW, no offense, but your C is bad beyond belief."
- Al Viro




RE: Problem with session tracking. Please help

2001-05-02 Thread Jan Kester

I have seen a problem with sessions in the past due to bad program design.
Make sure that your servlets have no members. If so, they would share them between all 
users.

Try to make a simple example first to make sure that you can maintain session state.

Regards, Jan Kester

-Original Message-
From:   William Kaufman [SMTP:[EMAIL PROTECTED]]
Sent:   woensdag 2 mei 2001 17:10
To: '[EMAIL PROTECTED]'
Subject:RE: Problem with session tracking.  Please help

Are both the servers running on the same host?  This sounds like a problem
I've run into: since cookies are identified by host, all cookies named
"JSESSIONID" from the same host are considered the same cookie.  

In my case, the servlets are running on different ports on the same machine.
I can't see anything in the cookie spec (RFC 2109) which lets you segregate
cookies by port, so I'm out of luck (and maybe you are, too, if that's what
you're doing).

If this isn't your case, try seeing what Tomcat is putting in the JSESSIONID
cookie.  A cheezy way to do this would be to use IE: in the security
settings for your host, change the cookie settings to "Prompt"; then, when
hitting your site, you'll get an alert from which you can see the cookie
info.


-- Bill K.


> -Original Message-
> From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 7:24 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Problem with session tracking. Please help
> 
> 
> 
> 
> > -Original Message-
> > From: William Kaufman [mailto:[EMAIL PROTECTED]]
> > Sent: 02 May 2001 15:02
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: Problem with session tracking. Please help
> > 
> > 
> > 1) Does your browser have cookies enabled?  If not, you need 
> > to rewrite all
> > your URLs, using HttpServletResponse.encode[Redirect]URL().
> > 
> 
> Yes it does have cookies enabled.  Supposing I decide to use the
> above code, should I just stick it at the top of my JSP?
> 
> > 2) Are you defining a cookie or URL parameter names 
> > "jsessionid"?  That one
> > is used by Tomcat to keep track of the session, and shouldn't 
> > be set by the
> > servlet.
> > 
> 
> I'm not doing either of these things.
> 
> > 3) Does HttpSession.getId() keep returning new IDs, and 
> > HttpSession.isNew()
> > keep returning "true" on each call to your servlet?
> > 
> 
> No.  What seems to be happening is that a browser will "steal"
> a previously existing session while it is still owned by another
> browser.  
> 
> I have two machines "A" and "B".  "A" looks at the page and gets
> a session id (e.g.)"A1" and isNew() returns true.  "A" then refreshes 
> the page a number of times.  session id is still "A1" and isNew()
> returns false.  Everything is wonderful.  Browser "B" looks 
> at the page
> and gets a session id "B1".  isNew() returns true, but the objects 
> attached to it are the objects that were
> associated with session "A1".  If "A" then does a refresh then the
> session id comes back as "B1" and the objects are the same objects.
> From this point on the two browsers share the session and session id
> and the objects attached to the session until the session is timed 
> out by tomcat.
> 
> > As for documentation, the servlet spec goes into this 
> stuff.  You can
> > download it at,
> > 
> > http://java.sun.com/products/servlet/download.html
> > 
> > 
> > 
> -- Bill K.
> > 
> 
> Thanks Bill.
> 
> > 
> > > -Original Message-
> > > From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, May 02, 2001 3:21 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: Problem with session tracking. Please help
> > > 
> > > 
> > > Hi All,
> > > 
> > > We're having a problem with session tracking.
> > > We are using tomcat pretty much "out of the box", without 
> > integrating
> > > with apache or anything like that.
> > > We are attaching an attribute to the session which we want 
> > (reasonably
> > > enough) to be "per session".
> > > We are then sending requests for information to tomcat 
> from several
> > > different client machines (sometimes logged on as the same 
> > > user, sometimes
> > > as different users, sometimes using Netscape, sometimes using 
> > > IE).  All
> > > machines are running Windows NT4.0.
> > > 
> > > What we are finding is that the Session objects are being 
> > > indiscriminately
> > > associated with the servlets.  We are getting the right number of
> > > session attributes created, but when we refresh the page we 
> > find that
> > > the new request is associated with the wrong session.
> > > 
> > > Help?  Is there anything obvious we are missing?  Is there a 
> > > document on
> > > how the session management works in tomcat?
> > > 
> > > We are using tomcat-3_3-m1
> > > 
> > > Thanks a lot,
> > > Huw
> > > 
> > > **
> > > **
> > > The in

AW: ODBC-JDBC ** with JSP ** : 'No suitable driver' for me OK

2001-05-02 Thread Egger Lothar

hello

for me it works with:
renaming classes12.zip to classes12.jar
in WEB-INF/lib/

regards
lothar

system:
linux 2.2.16 LVS dr. 6x pIII 800 round robin 
apache  1.3.14 mod_backhand; tomcat 3.2.1 
HTTP HTTPS
no ODBC ;)
i am using the thin driver.
connection pool 



> -Ursprüngliche Nachricht-
> Von: Brendan McKenna [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 02. Mai 2001 17:37
> An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Betreff: Re: ODBC-JDBC ** with JSP ** : 'No suitable driver' 
> 
> 
> Hi,
> 
>   If you unzipped the file into the WEB-INF/lib directory, then 
> you did it in the wrong place.  They should go in the WEB-INF/classes 
> directory.  I've been using that approach successfully here 
> for a while 
> now.
> 
>   Brendan
> 
> : Ok, I'll try that.
> : Nevertheless, I already tried to put the developped classtree of 
> : classes12.zip (oracle.jdbc) in the lib directory 
> (unzipped file), and 
> : it didn't work properly either. I may guess that renaming 
> the .zip in .jar 
> : would have the same (non-)effect, wouldn't it ?
> : 
> : Jean-François
> : 
> : 
> -- 
> Brendan McKenna  Email: 
> [EMAIL PROTECTED]
> Development Strategist   Phone: +353-61-338177
> Taringold Ltd.   Fax:   +353-61-338065
> 
> 



RE: Why Use apache

2001-05-02 Thread Duncan Irvine

I would suggest that Apache is also more secure - it's been around longer,
and has had more development, thus has had longer to mature.  If you hide
Tomcat behind Apache, then any bugs that may appear in Tomcat's URL parsing
(for example) are less of a worry.

Duncan.


> -Original Message-
> From: David M. Rosner [mailto:[EMAIL PROTECTED]]
> Sent: 02 May 2001 16:06
> To: [EMAIL PROTECTED]
> Subject: RE: Why Use apache
> 
> 
> If I have all my static html and graphics loading off of 
> other servers, is 
> there any reason to use Apache with Tomcat? Is the 
> combination more stable 
> or is performance better with both running?
> 
> thanks
> 
> -dave
> 
> At 11:00 AM 5/2/2001, Ronan Derby wrote:
> >tomcat isn't as good as apache at serving static html files 
> and images.
> >also, with apache up and running you can do other stuff like 
> execute cgi
> >scripts and so on.
> >
> >-Original Message-
> >From: Skinner, Dallas M [mailto:[EMAIL PROTECTED]]
> >Sent: 02 May 2001 15:48
> >To: [EMAIL PROTECTED]
> >Subject: Why Use apache
> >
> >
> >Excuse me if this question is obvious.  If Tomcat can be run 
> in a standalone
> >mode, why should it be used in conjunction with apache?
> >
> >Thanks
> >
> >Dallas Skinner
> 



This message contains information which may be privileged
and confidential and subject to legal privilege. If you are not
the intended recipient, you may not peruse, use, disseminate,
distribute or copy this message. If you have received this 
message in error, please notify the sender immediately by 
e-mail, facsimile, or telephone and return or destroy the 
original message. Sopheon and its officers are not responsible
for any statements or material in this e-mail and in any attachment
to it which might give rise to any criminal or civil claim.




RE: Problem with session tracking. Please help

2001-05-02 Thread Roberts Huw

Apologies.  A misunderstanding.
I have only one tomcat server.  The "different machines" in question
are different client machines.

Interestingly tomcat doesn't appear to be trying to put anything in
the cookie!!!  I have another page which uses javascript to manipulate
the cookie and (when I switch on your suggested option) IE prompts to 
ask whether I should allow it to store that cookie.  In no other 
circumstance does IE prompt to ask about storing a cookie.

So...  How is tomcat keeping track of my session?
Looks as though I may have to revert to your URL encode suggestion...

Thanks a lot
Huw


> -Original Message-
> From: William Kaufman [mailto:[EMAIL PROTECTED]]
> Sent: 02 May 2001 16:10
> To: '[EMAIL PROTECTED]'
> Subject: RE: Problem with session tracking. Please help
> 
> 
> Are both the servers running on the same host?  This sounds 
> like a problem
> I've run into: since cookies are identified by host, all cookies named
> "JSESSIONID" from the same host are considered the same cookie.  
> 
> In my case, the servlets are running on different ports on 
> the same machine.
> I can't see anything in the cookie spec (RFC 2109) which lets 
> you segregate
> cookies by port, so I'm out of luck (and maybe you are, too, 
> if that's what
> you're doing).
> 
> If this isn't your case, try seeing what Tomcat is putting in 
> the JSESSIONID
> cookie.  A cheezy way to do this would be to use IE: in the security
> settings for your host, change the cookie settings to 
> "Prompt"; then, when
> hitting your site, you'll get an alert from which you can see 
> the cookie
> info.
> 
> 
> -- Bill K.
> 
> 
> > -Original Message-
> > From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 02, 2001 7:24 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: Problem with session tracking. Please help
> > 
> > 
> > 
> > 
> > > -Original Message-
> > > From: William Kaufman [mailto:[EMAIL PROTECTED]]
> > > Sent: 02 May 2001 15:02
> > > To: '[EMAIL PROTECTED]'
> > > Subject: RE: Problem with session tracking. Please help
> > > 
> > > 
> > > 1) Does your browser have cookies enabled?  If not, you need 
> > > to rewrite all
> > > your URLs, using HttpServletResponse.encode[Redirect]URL().
> > > 
> > 
> > Yes it does have cookies enabled.  Supposing I decide to use the
> > above code, should I just stick it at the top of my JSP?
> > 
> > > 2) Are you defining a cookie or URL parameter names 
> > > "jsessionid"?  That one
> > > is used by Tomcat to keep track of the session, and shouldn't 
> > > be set by the
> > > servlet.
> > > 
> > 
> > I'm not doing either of these things.
> > 
> > > 3) Does HttpSession.getId() keep returning new IDs, and 
> > > HttpSession.isNew()
> > > keep returning "true" on each call to your servlet?
> > > 
> > 
> > No.  What seems to be happening is that a browser will "steal"
> > a previously existing session while it is still owned by another
> > browser.  
> > 
> > I have two machines "A" and "B".  "A" looks at the page and gets
> > a session id (e.g.)"A1" and isNew() returns true.  "A" then 
> refreshes 
> > the page a number of times.  session id is still "A1" and isNew()
> > returns false.  Everything is wonderful.  Browser "B" looks 
> > at the page
> > and gets a session id "B1".  isNew() returns true, but the objects 
> > attached to it are the objects that were
> > associated with session "A1".  If "A" then does a refresh then the
> > session id comes back as "B1" and the objects are the same objects.
> > From this point on the two browsers share the session and session id
> > and the objects attached to the session until the session is timed 
> > out by tomcat.
> > 
> > > As for documentation, the servlet spec goes into this 
> > stuff.  You can
> > > download it at,
> > > 
> > > http://java.sun.com/products/servlet/download.html
> > > 
> > > 
> > > 
> > -- Bill K.
> > > 
> > 
> > Thanks Bill.
> > 
> > > 
> > > > -Original Message-
> > > > From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, May 02, 2001 3:21 AM
> > > > To: '[EMAIL PROTECTED]'
> > > > Subject: Problem with session tracking. Please help
> > > > 
> > > > 
> > > > Hi All,
> > > > 
> > > > We're having a problem with session tracking.
> > > > We are using tomcat pretty much "out of the box", without 
> > > integrating
> > > > with apache or anything like that.
> > > > We are attaching an attribute to the session which we want 
> > > (reasonably
> > > > enough) to be "per session".
> > > > We are then sending requests for information to tomcat 
> > from several
> > > > different client machines (sometimes logged on as the same 
> > > > user, sometimes
> > > > as different users, sometimes using Netscape, sometimes using 
> > > > IE).  All
> > > > machines are running Windows NT4.0.
> > > > 
> > > > What we are finding is that the Session object

Re: Tomcat Performance..

2001-05-02 Thread Steve Brunton

Kief Morris wrote:
> 
> 
> It sounds like you tested Tomcat on an HP, and Tomcat on an x86 with
> Solaris 8, vs. iPlanet on an Ultra running Solaris 2.6. You are then guessing
> that the difference in performance is entirely due to the servlet engine?
> 
> Have you tried testing Tomcat vs. iPlanet on *identical* hardware/OS
> platforms?
> 


  Well, alas I haven't been able to talk the iPlanet folks into building
iWS for me on Solaris x86 yet so I can't test it that way. In testing
just straight normal everyday static HTML serving between Apache and
iPlanet between the two platforms I get a more expected performance
difference. Where the iWS server can spit back something like 200
requests per second and the Apache server can spit back 170 requests per
second. That would be what I expect. I've got a couple of other projects
I've got to get done here today and then I was planning on building the
Apache/Tomcat setup over on the Ultra 60 to see if the performance
numbers are still skewed as much on the same platform.


-- 
Steve Brunton   <[EMAIL PROTECTED]>  Phone: 404-827-2756
Chief Engineer Enterprise SystemsOne CNN Center, Atlanta GA
CNN Internet Technologies  ICBM: 84W 23' 45" 33N 45' 29"
<*> There's too much blood in my alcohol system. <*>



RE: Why Use apache

2001-05-02 Thread Doug Fields


>tomcat isn't as good as apache at serving static html files and images.
>also, with apache up and running you can do other stuff like execute cgi
>scripts and so on.

That said, I use it as a standalone web and servlet server. The primary 
drawback then becomes:

It does NOT keep logs like a "real" webserver. There is nothing to show 
traffic or which is amenable to analysis.

So, for a small site which doesn't care about logs, it's great and a lot 
easier to install, configure, and maintain than in combination with Apache.

Doug





Re: ODBC-JDBC ** with JSP ** : 'No suitable driver'

2001-05-02 Thread JFC

Hello ~

Actually I unzipped the classes12.zip file in 2 directories !
1°  %TOMCAT_HOME%\lib
2°  {my_webbApp}\WEB-INF\classes

Moreover, the classes12.zip file still remains in the %TOMCAT_HOME%/lib 
directory... ^-^

I nevertheless feel like it's still a CLASSPATH or dir problem...
Coz it works fine with a "java {my_MainClassName}" DOS command !

But thanx for your answers !
Jean-François


>Hi,

If you unzipped the file into the WEB-INF/lib directory, then 
you did it in the wrong place.  They should go in the WEB-INF/classes 
directory.  I've been using that approach successfully here for a while 
now.

Brendan

: Ok, I'll try that.
: Nevertheless, I already tried to put the developped classtree of 
: classes12.zip (oracle.jdbc) in the lib directory (unzipped file), and 
: it didn't work properly either. I may guess that renaming the .zip 
in .jar 
: would have the same (non-)effect, wouldn't it ?
: 
: Jean-François
: 
: 
-- 
Brendan McKennaEmail: [EMAIL PROTECTED]
Development StrategistPhone: +353-61-338177
Taringold Ltd.Fax:   +353-61-338065







Re: ODBC-JDBC ** with JSP ** : 'No suitable driver'

2001-05-02 Thread Brendan McKenna

Hi,

If you unzipped the file into the WEB-INF/lib directory, then 
you did it in the wrong place.  They should go in the WEB-INF/classes 
directory.  I've been using that approach successfully here for a while 
now.

Brendan

: Ok, I'll try that.
: Nevertheless, I already tried to put the developped classtree of 
: classes12.zip (oracle.jdbc) in the lib directory (unzipped file), and 
: it didn't work properly either. I may guess that renaming the .zip in .jar 
: would have the same (non-)effect, wouldn't it ?
: 
: Jean-François
: 
: 
-- 
Brendan McKennaEmail: [EMAIL PROTECTED]
Development Strategist Phone: +353-61-338177
Taringold Ltd. Fax:   +353-61-338065





Re: ODBC-JDBC ** with JSP ** : 'No suitable driver'

2001-05-02 Thread Benoit Jacquemont

> Ok, I'll try that.
> Nevertheless, I already tried to put the developped classtree of
> classes12.zip (oracle.jdbc) in the lib directory (unzipped file), and
> it didn't work properly either. I may guess that renaming the .zip in .jar
> would have the same (non-)effect, wouldn't it ?

No really, because Tomcat adds the jar files to the classpath, not the lib 
directory itself. If you unzip the file into the lib directory, it wouldn't 
have any effect because of that.

Benoît



Re: Newbie problem starting web server.

2001-05-02 Thread jackling

Thanks for Darrell's advice.
I've tried the method. But the message appear in the TOMSTART.LOG is
minimum:

"Starting tomcat. Check logs/tomcat.log for error messages"

in the logs directory I do have tomcat.log. I saw the modified datetime that
it was created some date ago (I don't know how it was created.) That means,
this tomcat.log is not updated either.

So, I don't know what's wrong

my config again:
ver: Tomcat v3.1
OS: Windows98 (able to run on Win98? No need WinNT/2000, right?)

thanks again,
jackling.





- Original Message -
???: "Darrell Porter" <[EMAIL PROTECTED]>
???: <[EMAIL PROTECTED]>
: 2001?5?2? AM 03:30
??: RE: Newbie problem starting web server.


> The only output to the command window that appears are java specific in
> nature (disconnects from the database and the like) and there is not a
> non-programmatic way to change this that I am aware of...
>
> Darrell
>
>
> -Original Message-
> From: Peter B. West [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 30, 2001 10:28 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Newbie problem starting web server.
>
>
> Darrell Porter wrote:
> >
> > In the %TOMCAT_HOME%\bin directory is a file called TOMCAT.BAT
> > Searching through the file, you will find a code snippet that looks
> like
> > this:
> >
> > :startServer
> > echo Starting Tomcat in new window
> > if "%2" == "-security" goto startSecure
> > %_STARTJAVA% %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%"
> org.apache.
> > tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
> > goto cleanup
> >
> > At the line that begins %_STARTJAVA% add ">
> > %TOMCAT_HOME%\LOGS\TOMSTART.LOG" (without quotes) so that
>
> ... and without the newline; i.e.
>> %TOMCAT_HOME%\LOGS\TOMSTART.LOG
> (note the right angle bracket `>' at the beginning.  That's what does
> the redirect of the output.)
>
> How does this work with stderr on Windows?
>
> Peter
> --
> Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
> "Lord, to whom shall we go?"




Re: Newbie problem starting web server.

2001-05-02 Thread jackling

Thanks for Darrell's advice.
I've tried the method. But the message appear in the TOMSTART.LOG is
minimum:

"Starting tomcat. Check logs/tomcat.log for error messages"

in the logs directory I do have tomcat.log. I saw the modified datetime that
it was created some date ago (I don't know how it was created.) That means,
this tomcat.log is not updated either.

So, I don't know what's wrong

my config again:
ver: Tomcat v3.1
OS: Windows98 (able to run on Win98? No need WinNT/2000, right?)

thanks again,
jackling.





- Original Message -
???: "Darrell Porter" <[EMAIL PROTECTED]>
???: <[EMAIL PROTECTED]>
: 2001?5?2? AM 03:30
??: RE: Newbie problem starting web server.


> The only output to the command window that appears are java specific in
> nature (disconnects from the database and the like) and there is not a
> non-programmatic way to change this that I am aware of...
>
> Darrell
>
>
> -Original Message-
> From: Peter B. West [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 30, 2001 10:28 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Newbie problem starting web server.
>
>
> Darrell Porter wrote:
> >
> > In the %TOMCAT_HOME%\bin directory is a file called TOMCAT.BAT
> > Searching through the file, you will find a code snippet that looks
> like
> > this:
> >
> > :startServer
> > echo Starting Tomcat in new window
> > if "%2" == "-security" goto startSecure
> > %_STARTJAVA% %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%"
> org.apache.
> > tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
> > goto cleanup
> >
> > At the line that begins %_STARTJAVA% add ">
> > %TOMCAT_HOME%\LOGS\TOMSTART.LOG" (without quotes) so that
>
> ... and without the newline; i.e.
>> %TOMCAT_HOME%\LOGS\TOMSTART.LOG
> (note the right angle bracket `>' at the beginning.  That's what does
> the redirect of the output.)
>
> How does this work with stderr on Windows?
>
> Peter
> --
> Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
> "Lord, to whom shall we go?"




Re: Why Use apache

2001-05-02 Thread Martin Mauri

It depends on which are the other servers...I'd sugeest using Tomcat-Apache.

> If I have all my static html and graphics loading off of other servers, is
> there any reason to use Apache with Tomcat? Is the combination more stable
> or is performance better with both running?
>
> thanks
>
> -dave
>
> At 11:00 AM 5/2/2001, Ronan Derby wrote:
> >tomcat isn't as good as apache at serving static html files and images.
> >also, with apache up and running you can do other stuff like execute cgi
> >scripts and so on.
> >
> >-Original Message-
> >From: Skinner, Dallas M [mailto:[EMAIL PROTECTED]]
> >Sent: 02 May 2001 15:48
> >To: [EMAIL PROTECTED]
> >Subject: Why Use apache
> >
> >
> >Excuse me if this question is obvious.  If Tomcat can be run in a
standalone
> >mode, why should it be used in conjunction with apache?
> >
> >Thanks
> >
> >Dallas Skinner




How to host a website at home using tomcat?

2001-05-02 Thread Web master

Hello,

I would like to know, will it be possible to host more than one website 
using one static IP address using Tomcat or am I asking this question in 
a wrong forum?

Any tips would be greatly appreciated.
Thanks




RE: Problem with session tracking. Please help

2001-05-02 Thread William Kaufman

Are both the servers running on the same host?  This sounds like a problem
I've run into: since cookies are identified by host, all cookies named
"JSESSIONID" from the same host are considered the same cookie.  

In my case, the servlets are running on different ports on the same machine.
I can't see anything in the cookie spec (RFC 2109) which lets you segregate
cookies by port, so I'm out of luck (and maybe you are, too, if that's what
you're doing).

If this isn't your case, try seeing what Tomcat is putting in the JSESSIONID
cookie.  A cheezy way to do this would be to use IE: in the security
settings for your host, change the cookie settings to "Prompt"; then, when
hitting your site, you'll get an alert from which you can see the cookie
info.


-- Bill K.


> -Original Message-
> From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 7:24 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Problem with session tracking. Please help
> 
> 
> 
> 
> > -Original Message-
> > From: William Kaufman [mailto:[EMAIL PROTECTED]]
> > Sent: 02 May 2001 15:02
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: Problem with session tracking. Please help
> > 
> > 
> > 1) Does your browser have cookies enabled?  If not, you need 
> > to rewrite all
> > your URLs, using HttpServletResponse.encode[Redirect]URL().
> > 
> 
> Yes it does have cookies enabled.  Supposing I decide to use the
> above code, should I just stick it at the top of my JSP?
> 
> > 2) Are you defining a cookie or URL parameter names 
> > "jsessionid"?  That one
> > is used by Tomcat to keep track of the session, and shouldn't 
> > be set by the
> > servlet.
> > 
> 
> I'm not doing either of these things.
> 
> > 3) Does HttpSession.getId() keep returning new IDs, and 
> > HttpSession.isNew()
> > keep returning "true" on each call to your servlet?
> > 
> 
> No.  What seems to be happening is that a browser will "steal"
> a previously existing session while it is still owned by another
> browser.  
> 
> I have two machines "A" and "B".  "A" looks at the page and gets
> a session id (e.g.)"A1" and isNew() returns true.  "A" then refreshes 
> the page a number of times.  session id is still "A1" and isNew()
> returns false.  Everything is wonderful.  Browser "B" looks 
> at the page
> and gets a session id "B1".  isNew() returns true, but the objects 
> attached to it are the objects that were
> associated with session "A1".  If "A" then does a refresh then the
> session id comes back as "B1" and the objects are the same objects.
> From this point on the two browsers share the session and session id
> and the objects attached to the session until the session is timed 
> out by tomcat.
> 
> > As for documentation, the servlet spec goes into this 
> stuff.  You can
> > download it at,
> > 
> > http://java.sun.com/products/servlet/download.html
> > 
> > 
> > 
> -- Bill K.
> > 
> 
> Thanks Bill.
> 
> > 
> > > -Original Message-
> > > From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, May 02, 2001 3:21 AM
> > > To: '[EMAIL PROTECTED]'
> > > Subject: Problem with session tracking. Please help
> > > 
> > > 
> > > Hi All,
> > > 
> > > We're having a problem with session tracking.
> > > We are using tomcat pretty much "out of the box", without 
> > integrating
> > > with apache or anything like that.
> > > We are attaching an attribute to the session which we want 
> > (reasonably
> > > enough) to be "per session".
> > > We are then sending requests for information to tomcat 
> from several
> > > different client machines (sometimes logged on as the same 
> > > user, sometimes
> > > as different users, sometimes using Netscape, sometimes using 
> > > IE).  All
> > > machines are running Windows NT4.0.
> > > 
> > > What we are finding is that the Session objects are being 
> > > indiscriminately
> > > associated with the servlets.  We are getting the right number of
> > > session attributes created, but when we refresh the page we 
> > find that
> > > the new request is associated with the wrong session.
> > > 
> > > Help?  Is there anything obvious we are missing?  Is there a 
> > > document on
> > > how the session management works in tomcat?
> > > 
> > > We are using tomcat-3_3-m1
> > > 
> > > Thanks a lot,
> > > Huw
> > > 
> > > **
> > > **
> > > The information in this email is confidential and is 
> intended solely
> > > for the addressee(s).
> > > Access to this email by anyone else is unauthorised. If 
> you are not
> > > an intended recipient, you must not read, use or disseminate the
> > > information contained in the email.
> > > Any views expressed in this message are those of the individual
> > > sender, except where the sender specifically states them to be
> > > the views of Capco.
> > > 
> > > http://www.capco.co

Re: ODBC-JDBC ** with JSP ** : 'No suitable driver'

2001-05-02 Thread JFC

Ok, I'll try that.
Nevertheless, I already tried to put the developped classtree of 
classes12.zip (oracle.jdbc) in the lib directory (unzipped file), and 
it didn't work properly either. I may guess that renaming the .zip in .jar 
would have the same (non-)effect, wouldn't it ?

Jean-François


>Try to rename the classes12.zip into classes12.jar.

>Tomcat only adds the jar files existing in the lib directory to its 
>classpath.

>Benoît

> Thanx, Tom. But I already did that, and also the nls* file matching the
> release.
> It doesn't work better..
>
> Jean-François
>
> >put the classes12.zip in the $TOMCAT_HOME/lib directory.
> >
> >regards, tom
> >
> >> -Ursprüngliche Nachricht-
> >
> > Von: JFC [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 2. Mai 2001 16:33
> > An: [EMAIL PROTECTED]
> > Betreff: ODBC-JDBC ** with JSP ** : 'No suitable driver'
> >
> >
> >
> > Hi  ~
> >
> > Sorry if this issue has recently come, I'm new to this mailing list.
> > Please  be lenient...  ^-^
> >
> > My problem is quite wide-spread, as I can see on different FAQ, but none
> > of  them solution it. Maybe you can help.
> >
> > I'm trying to run a JSP application under Jakarta on PC Win 2000 Server,
> > IIS 5, Jakarta as NT service.
> > And I'm getting the error "No suitable driver" on the getConnection(...)
> > method call, when trying to connect to an Oracle 8i instance.
> >
> > I mention that a standalone Java program running with the MS JVM calling
> > the same method with the same arguments on the same Oracle instance.
> >
> > Thank you for your help  ~
> >
> > JF





RE: tomcat3.2 as NT-Service

2001-05-02 Thread Sadasivakurup, Jiji L.


There is a known problem
 in JDK
1.3 that affects Java applications being run as Windows NT services. The bug
causes the service to terminate when the currently logged in user logs out.
The simplest way to work around this problem is to use JDK 1.2. If your
application requires JDK 1.3 features then you may want to look into
javaserv  or JavaService
. Users have reported
success with both of these packages but there may be others that work as
well. 

-Original Message-
From: Jürgen Wartenberg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 9:33 AM
To: '[EMAIL PROTECTED]'
Subject: tomcat3.2 as NT-Service


Hi,

I have installed Tomcat as NT_Service and I have changed the start mode to
'automatic'.

If I make a reboot, the Service starts and all looks fine.

If I only log out and make a new log in, the Service does not start !

Can anyone help ?

---
Juergen Wartenberg   - mailto:[EMAIL PROTECTED]   
in-GmbH  - http://www.in-gmbh.de
Am Seerhein 8- Tel: ++49 (0)7531/8145-51
D-78467 Konstanz - Fax: ++49 (0)7531/8145-81 
---
Informieren Sie sich auf unserer neuen Homepage über
Webapplikationen "Weblet by in"(TM)
---



RE: Why Use apache

2001-05-02 Thread Sadasivakurup, Jiji L.

Apache is faster for serving static pages. ( Images/html )

-Original Message-
From: Skinner, Dallas M [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 10:48 AM
To: [EMAIL PROTECTED]
Subject: Why Use apache


Excuse me if this question is obvious.  If Tomcat can be run in a standalone
mode, why should it be used in conjunction with apache?

Thanks

Dallas Skinner



RE: Why Use apache

2001-05-02 Thread David M. Rosner

If I have all my static html and graphics loading off of other servers, is 
there any reason to use Apache with Tomcat? Is the combination more stable 
or is performance better with both running?

thanks

-dave

At 11:00 AM 5/2/2001, Ronan Derby wrote:
>tomcat isn't as good as apache at serving static html files and images.
>also, with apache up and running you can do other stuff like execute cgi
>scripts and so on.
>
>-Original Message-
>From: Skinner, Dallas M [mailto:[EMAIL PROTECTED]]
>Sent: 02 May 2001 15:48
>To: [EMAIL PROTECTED]
>Subject: Why Use apache
>
>
>Excuse me if this question is obvious.  If Tomcat can be run in a standalone
>mode, why should it be used in conjunction with apache?
>
>Thanks
>
>Dallas Skinner




Tomcat is running but can't see the examples.

2001-05-02 Thread Mark Feder

Im trying to install the tomcat 3.2.1 on the following configuration:
NT server 4 sp6a 
IIS4
tomcat 3.2.1

i have managed to install it according to the documentation described in the
site, but when im trying to run the samples it is not working.

i asume it has something to do with the configuration of the port with the
iis, but i donno how to configureit with the IIS.
(in the IIS the ISAPI filter is installed and shown green.)

Can somewone pls help in solving the problem ??

im getting the following reponse:
 

http://michal-nts:8080/index.html
is returning me the tomcat index page

http://michal-nts/servlet/SnoopServlet
im getting a message of 
The page cannot be found
http://michal-nts:8080/servlet/SnoopServlet


im getting the folowing response:


Snoop Servlet

Servlet init parameters:

Context init parameters:

Context attributes:
   javax.servlet.context.tempdir =
C:\jt321\work\localhost_8080
   sun.servlet.workdir = C:\jt321\work\localhost_8080

Request attributes:

Servlet Name: SnoopServlet
Protocol: HTTP/1.1

Scheme: http
Server Name: michal-nts
Server Port: 8080
Server Info: Tomcat Web Server/3.2 (final) (JSP 1.1; Servlet
2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)
Remote Addr: 194.90.131.146
Remote Host: MICHAL-NTS
Character Encoding: null
Content Length: -1
Content Type: null
Locale: iw
Default Response Buffer: 8192

Parameter names in this request:

Headers in this request:
   User-Agent: Mozilla/4.0 (compatible; MSIE 6.0b; Windows
NT 4.0)
   Cookie: JSESSIONID=n3yndevba1
   Accept: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/msword, application/vnd.ms-powerpoint,
application/vnd.ms-excel, */*
   Host: michal-nts:8080
   Accept-Encoding: gzip, deflate
   Accept-Language: he
   Connection: Keep-Alive

Cookies in this request:
   JSESSIONID = n3yndevba1

Request Is Secure: false
Auth Type: null
HTTP Method: GET
Remote User: null
Request URI: /servlet/SnoopServlet
Context Path: 
Servlet Path: /servlet/SnoopServlet
Path Info: null
Path Trans: null
Query String: null

Requested Session Id: n3yndevba1
Current Session Id: n3yndevba1
Session Created Time: 988815110075
Session Last Accessed Time: 988815110075
Session Max Inactive Interval Seconds: 1800

Session values: 







Re: Why Use apache

2001-05-02 Thread Peter Davison

In a word: "speed".

Tomcat is a java application, which runs in a JVM and because of this it runs
fairly slowly.
Apache is (AFAIK) written in C and runs native, and therefore is a lot 
faster.

P.

On Wed, 2 May 2001 09:48:24 -0500 
"Skinner, Dallas M" <[EMAIL PROTECTED]> wrote:

RPD> Excuse me if this question is obvious.  If Tomcat can be run in a standalone
RPD> mode, why should it be used in conjunction with apache?
RPD> 
RPD> Thanks
RPD> 
RPD> Dallas Skinner



RE: Why Use apache

2001-05-02 Thread Mike Braden

This is a confusing part of Tomcat.

You definitely do not need Apache to use Tomcat.  It works
great by itself (and is easier to use that way).

You would add Apache into the mix for several reasons:

* You want to do something other than Java - Perl, PHP, etc.
* You are already running apache and you want to use Java
* Apache is faster at serving static content (tuned for performance)
  and your site has a heavy amount of traffic for static content
* You don't want to run Tomcat as root to be on port 80.  You
  are concerned about security
* You have a heavy load and want to have more than 1 Tomcat server
  i.e. load balancing multiple TC's behind Apache

Mike.
--
Mike Braden
[EMAIL PROTECTED]
[EMAIL PROTECTED]

-Original Message-
From: Skinner, Dallas M [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 10:48 AM
To: [EMAIL PROTECTED]
Subject: Why Use apache


Excuse me if this question is obvious.  If Tomcat can be run in a standalone
mode, why should it be used in conjunction with apache?

Thanks

Dallas Skinner




Re: Why Use apache

2001-05-02 Thread Milt Epstein

On Wed, 2 May 2001, Skinner, Dallas M wrote:

> Excuse me if this question is obvious.  If Tomcat can be run in a
> standalone mode, why should it be used in conjunction with apache?

Well, it's been asked many times, so you can check the archives for
answers.  But basically, Apache is more reliable, more robust, faster,
more flexible, more configurable, etc.  If you're only doing
JSP/servlet stuff, then maybe it would make sense to use Tomcat
standalone, but in general, I think it's much better to use it in
conjunction with Apache (or some web server).

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]




Re: Why Use apache

2001-05-02 Thread Nick Christopher

Is there a way to append a URL to the FAQ to every mail to the list?


"Skinner, Dallas M" wrote:

> Excuse me if this question is obvious.  If Tomcat can be run in a standalone
> mode, why should it be used in conjunction with apache?
>
> Thanks
>
> Dallas Skinner




Re: Why Use apache

2001-05-02 Thread Martin Mauri

tomcat-apache-howto.html


> Excuse me if this question is obvious.  If Tomcat can be run in a
standalone
> mode, why should it be used in conjunction with apache?
>
> Thanks
>
> Dallas Skinner




Re: Why USe Apache

2001-05-02 Thread JFC

Hello ~

Because it's written in Jakarta's specification : Tomcat serves static 
pages worse than Apache or IIS.
Maybe there are other reasons...

Jean-François

>Excuse me if this question is obvious.  If Tomcat can be run in a 
standalone
mode, why should it be used in conjunction with apache?

Thanks

Dallas Skinner




RE: Why Use apache

2001-05-02 Thread Ronan Derby

tomcat isn't as good as apache at serving static html files and images.
also, with apache up and running you can do other stuff like execute cgi
scripts and so on.

-Original Message-
From: Skinner, Dallas M [mailto:[EMAIL PROTECTED]]
Sent: 02 May 2001 15:48
To: [EMAIL PROTECTED]
Subject: Why Use apache


Excuse me if this question is obvious.  If Tomcat can be run in a standalone
mode, why should it be used in conjunction with apache?

Thanks

Dallas Skinner




Re: ODBC-JDBC ** with JSP ** : 'No suitable driver'

2001-05-02 Thread Benoit Jacquemont

Try to rename the classes12.zip into classes12.jar.

Tomcat only adds the jar files existing in the lib directory to its classpath.

Benoît
> Thanx, Tom. But I already did that, and also the nls* file matching the
> release.
> It doesn't work better..
>
> Jean-François
>
> >put the classes12.zip in the $TOMCAT_HOME/lib directory.
> >
> >regards, tom
> >
> >> -Ursprüngliche Nachricht-
> >
> > Von: JFC [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 2. Mai 2001 16:33
> > An: [EMAIL PROTECTED]
> > Betreff: ODBC-JDBC ** with JSP ** : 'No suitable driver'
> >
> >
> >
> > Hi  ~
> >
> > Sorry if this issue has recently come, I'm new to this mailing list.
> > Please  be lenient...  ^-^
> >
> > My problem is quite wide-spread, as I can see on different FAQ, but none
> > of  them solution it. Maybe you can help.
> >
> > I'm trying to run a JSP application under Jakarta on PC Win 2000 Server,
> > IIS 5, Jakarta as NT service.
> > And I'm getting the error "No suitable driver" on the getConnection(...)
> > method call, when trying to connect to an Oracle 8i instance.
> >
> > I mention that a standalone Java program running with the MS JVM calling
> > the same method with the same arguments on the same Oracle instance.
> >
> > Thank you for your help  ~
> >
> > JF



Re: Tomcat Boot: Help!

2001-05-02 Thread Mike Gruber

My script:


---
#!/bin/sh
#
# Start/Stop Jakarta Tomcat

# Source function library
. /etc/rc.d/init.d/functions

export PATH=$PATH:/usr/java/jdk1.3.0_02/bin
export JAVA_HOME=/usr/java/jdk1.3.0_02
export TOMCAT_HOME=/usr/java/jakarta-tomcat-3.2.1

case "$1" in
  start)
echo -n "Starting tomcat: "
daemon "/usr/java/jakarta-tomcat-3.2.1/bin/tomcat start"
echo
touch /var/lock/subsys/tomcat
;;
  stop)
echo -n "Shutting down tomcat: "
daemon "/usr/java/jakarta-tomcat-3.2.1/bin/tomcat stop"
echo
rm -f /var/lock/subsys/tomcat
rm -f /var/run/tomcat.pid
;;
  restart)
$0 stop
sleep 2
$0 start
;;
  *)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

exit 0
---

I have used other scripts as well, some that use "su", some that just call
/usr/java/jakarta-tomcat-3.2.1/bin/tomcat.sh...none of them have worked.  I
get the same results every time.  Tomcat appears to start (from reading the
logs) but then mysteriously dies before I can run "ps aux".  The script is
currently in /etc/rc.d/init.d with symbolic links in the various rcx.d
directories pointing to it.  When I run the script from the command line, it
works properly, but not while the system is booting.  What distro are you
using, and what versions of Tomcat, Apache, JDK are you using, if you don't
mind me asking?


MGRUBER

- Original Message -
From: "Darrell Porter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 6:38 PM
Subject: RE: Tomcat Boot: Help!


> What does your script look like?
>
> Where is it?
>
>
>
> -Original Message-
> From: Mike Gruber [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 01, 2001 10:17 AM
> To: [EMAIL PROTECTED]
> Subject: Tomcat Boot: Help!
>
>
> I am still desperately trying to get Tomcat 3.2.1 to start up at boot
time.
> It starts, but then dies before the login.  Running the exact same init
> script from the command line works no problem, so I am completely at a
loss
> as to the cause of the problem.  I am so desperate, I am even willing to
> completely change Linux distributions if anyone out there knows a distro
> that works with Tomcat.  I am currently using Caldera eServer 2.3 with
> jdk1.3.0_02 and apache 1.3.19.  Please reply to this post and tell me what
> distribution, versions, etc you are using to make tomcat load at boot
time.
> Any and all information will be greatly appreciated.
>
>
> MGRUBER
>




Why Use apache

2001-05-02 Thread Skinner, Dallas M

Excuse me if this question is obvious.  If Tomcat can be run in a standalone
mode, why should it be used in conjunction with apache?

Thanks

Dallas Skinner



Re: session timeout

2001-05-02 Thread Boris Niyazov


you're right, John: units, of course, are minutes ... it doesn't make sense that 
the default config for session timeout in tomcat is half a minute...
I don not know why my hands were typing seconds while I was thinking about 
minutes ...:-)

Thanks for the correction.
*
* Boris NiyazovPh:  212-854-4094  Fax: 212-854-1749 *
* Systems Manager  Email: [EMAIL PROTECTED] * 
* Columbia Law School  URL: http://www.law.columbia.edu *
*  
 



>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>list-help: 
>list-unsubscribe: 
>list-post: 
>Delivered-To: mailing list [EMAIL PROTECTED]
>Date: Wed, 02 May 2001 11:21:39 +0800
>From: "John Clark L. Naldoza" <[EMAIL PROTECTED]>
>X-Accept-Language: en
>MIME-Version: 1.0
>To: [EMAIL PROTECTED]
>Subject: Re: session timeout
>Content-Transfer-Encoding: 7bit
>X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
>
>Boris Niyazov wrote:
>> 
>> you probably can find in your web.xml:
>> 
>> 
>>
>> 30
>>
>> 
>> 
>> units seconds
>> hth
>> *
>> * Boris NiyazovPh:  212-854-4094  Fax: 212-854-1749 *
>> * Systems Manager  Email: [EMAIL PROTECTED] *
>> * Columbia Law School  URL: http://www.law.columbia.edu *
>> *
>
>Hi,
>
>
>Kindly check the web.dtd before coming up with this conclusion...;-)
>
>According to the web.dtd
>
>
>
>
>
>
>;-)
>
>Cheers,
>
>
>John Clark
>
>-- 
> /) John Clark Naldoza y Lopez   (\
>/ )Software Design Engineer II   ( \
>  _( (__  Web-Application Development_) )_
> (((\ \>  /_>Cable Modem Network Management System <_\   ( \_/ / NEC Telecom Software Phils., Inc.  \ \_/ )
>  \   /  \   /
>   \_/  phone: (+63 32) 233-9142 loc. 3112\_/
>   /   /  cellphone: (+63 919) 399-4742 \   \
>  /   / email: [EMAIL PROTECTED]\   \





Re: ODBC-JDBC ** with JSP ** : 'No suitable driver'

2001-05-02 Thread JFC

Thanx, Tom. But I already did that, and also the nls* file matching the 
release.
It doesn't work better..

Jean-François

>put the classes12.zip in the $TOMCAT_HOME/lib directory.

>regards, tom


>> -Ursprüngliche Nachricht-
> Von: JFC [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 2. Mai 2001 16:33
> An: [EMAIL PROTECTED]
> Betreff: ODBC-JDBC ** with JSP ** : 'No suitable driver'
>
>
>
> Hi  ~
>
> Sorry if this issue has recently come, I'm new to this mailing list.
> Please  be lenient...  ^-^
>
> My problem is quite wide-spread, as I can see on different FAQ, but none
> of  them solution it. Maybe you can help.
>
> I'm trying to run a JSP application under Jakarta on PC Win 2000 Server,
> IIS 5, Jakarta as NT service.
> And I'm getting the error "No suitable driver" on the getConnection(...)
> method call, when trying to connect to an Oracle 8i instance.
>
> I mention that a standalone Java program running with the MS JVM calling
> the same method with the same arguments on the same Oracle instance.
>
> Thank you for your help  ~
>
> JF
>
>






TC4 & SSL: Error in SSLServerSocketFactory: initProxy()?

2001-05-02 Thread Philippe Khalife


Dev environment: Win2K Pro, JDK1.3, TC4 B3, latest JSSE, openssl, apache
1.3.19
I don't have a connector for apache compiled on this platform yet, so I'm
trying  direct SSL on TOMCAT

The JSSE seem to be properly setup: I have the JSSE in the CLASSPATH also
under $JAVA_HOME\jre\lib\ext, and $CATALINA_HOME/server/lib, also registered
the Provider in $JAVA_HOME\jre\lib\security\java.security


Server.xml:

  



I tried both openssl certificates and keytool generated ceritificates.

I tried the code of SSLServerSocketFactory (initProxy) in a test class and
it works fine, with or without Security.addProvider(new
com.sun.net.ssl.internal.ssl.Provider());
So it's not a JVM setup issue. Is there a problem with this JSSE?

So what am I missing?
Your help will be greatly appreciated!!

PK

-
initProxy:  java.security.NoSuchAlgorithmException: Class
com.sun.net.ssl.intern
al.ssl.SSLContextImpl configured for SSLContext not a SSLContext
java.security.NoSuchAlgorithmException: Class
com.sun.net.ssl.internal.ssl.SSLCo
ntextImpl configured for SSLContext not a SSLContext
at com.sun.net.ssl.b.a([DashoPro-V1.2-120198])
at com.sun.net.ssl.SSLContext.getInstance([DashoPro-V1.2-120198])
at
org.apache.catalina.net.SSLServerSocketFactory.initProxy(SSLServerSoc
ketFactory.java:385)
at
org.apache.catalina.net.SSLServerSocketFactory.initialize(SSLServerSo
cketFactory.java:328)
at
org.apache.catalina.net.SSLServerSocketFactory.createSocket(SSLServer
SocketFactory.java:281)
at
org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.j
ava:734)
at
org.apache.catalina.connector.http.HttpConnector.start(HttpConnector.
java:888)
at
org.apache.catalina.core.StandardService.start(StandardService.java:3
60)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:458
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:707)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:627)
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:177)
Catalina.start: LifecycleException:  HttpConnector[8443].open:
java.io.IOExcept
ion: java.security.NoSuchAlgorithmException: Class
com.sun.net.ssl.internal.ssl.
SSLContextImpl configured for SSLContext not a SSLContext
LifecycleException:  HttpConnector[8443].open:  java.io.IOException:
java.securi
ty.NoSuchAlgorithmException: Class
com.sun.net.ssl.internal.ssl.SSLContextImpl c
onfigured for SSLContext not a SSLContext
at
org.apache.catalina.connector.http.HttpConnector.start(HttpConnector.
java:890)
at
org.apache.catalina.core.StandardService.start(StandardService.java:3
60)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:458
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:707)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:627)
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:177)




ODBC-JDBC ** with JSP ** : 'No suitable driver' : followsup !

2001-05-02 Thread JFC

Sorry I forgot the end of my last sentence in the post :

"I mention that a standalone Java program running with the MS JVM calling 
the same method with the same arguments on the same Oracle instance"...
succeeds in hooking the connection with the running instance.

Regards,
Jean-françois




JDBCRealm enhancements

2001-05-02 Thread Christian Hargraves

First off. Is JDBCRealm just an example of what can be done or is it meant 
for actual use?

If it's only meant as an example of how to write a RequestInterceptor, then 
don't bother to read on, please just respond and tell me so.

We need to add some functionality to JDBCRealm that I think a lot of other 
people might also be able to use.

The following modifications are:

1) The option to put in the password encode type -- This is for those 
companies that encode the password (I think most do). 
Currently only 'base64' and 'none' are supported. This is done by adding an 
attribute in the server.xml tag in the RequestInterceptor called 
encryptMethod. 
I just used the SecurityTools.base64Decode(password) method to do this.

2) The option of storing the userid as well as the username. -- This is done 
by adding another optional attribute that states the userid column. 
This enables user-role table to be queried against the userid instead of the 
username for those sites that have a lot of users. It also throws the userid 
in the session for those that need the userid throughout the entire 
application.

Please tell me what you think. We already added the functionality so there is 
no work for anyone else to do, but to review the code. 

Christian Hargraves



ODBC-JDBC ** with JSP ** : 'No suitable driver'

2001-05-02 Thread JFC


Hi  ~

Sorry if this issue has recently come, I'm new to this mailing list.
Please  be lenient...  ^-^

My problem is quite wide-spread, as I can see on different FAQ, but none
of  them solution it. Maybe you can help.

I'm trying to run a JSP application under Jakarta on PC Win 2000 Server, 
IIS 5, Jakarta as NT service.
And I'm getting the error "No suitable driver" on the getConnection(...) 
method call, when trying to connect to an Oracle 8i instance.

I mention that a standalone Java program running with the MS JVM calling 
the same method with the same arguments on the same Oracle instance.

Thank you for your help  ~

JF





RE: [ERROR] OutputStream is already being used for this request

2001-05-02 Thread Tali Ambar


> I do not use pageContext.forward(..) or .include(..)  and there aren't any
> <%  written the following code is written in a Servlet:
> response.setContentType ("image/GIF");
> ServletOutputStream outStream = response.getOutputStream();
> int p1 = 1;
> int[] p2 = new int[1];
> byte bytes[] = new byte[1];
> stream.RemoteRead(bytes,p1,p2);
> outStream.write(bytes);
> I thought that they might be some flag which can dim the PrintWriter "out"
> and then I could pass the outtputStream to the client side.
> Thanks
> Tali
> -Original Message-
> You might need to make sure that no output is being sent to the browser
> prior to your attempting to open the outputStream. ANY spaces before the
> pageContext.forward(..) or .include(..) call may be sent to the browser
> and will create a JspWriter output stream that will conflict with your
> getOutputStream() call. One thing worth trying is to start your jsp file
> with the first characters "<%", the scriptlet openning tag, and make the
> call to the servlet before any output is generated in your jsp file. 
> I hope that helps, 
> -Mark [EMAIL PROTECTED]  
> 
> On Wed, 2 May 2001, Tali Ambar wrote: 
> > 
> > 
> > Hi
>  > 
> > 1. I'm trying to pass a stream to an html in order to see GIF files in a
> 
> > 
> > stream form on the browser. 
> > 2. I wrote (in a servlet) the following lines 
> > IStream stream = ...; // stream of a file in a GIF format 
> > response.setContentType ("image/GIF"); 
> > ServletOutputStream outStream = response.getOutputStream(); 
> > int p1 = 1; 
> > int[] p2 = new int[1]; 
>  > byte bytes[] = new byte[1];
> > stream.RemoteRead(bytes,p1,p2); 
>  > outStream.write(bytes); 
> > 3. This servlet is called by a jsp which is called from an Html file (by
> 
>  > the tag:  >) 
> > 4. When running only the servlet I can see the GIF file. 
> > 5. When I run the jsp I get the following error: 
>  > "Error 500: 
>  > OutputStream is already being used for this request 
>  > at
> org.apache.tomcat.core.ResponseImpl.getWriter(ResponseImpl.java:210)"
> > 6. running the html file fails 
> > 7. I can not use PrintWriter servlet because I need to pass binary data 
>  > and not test. 
> > Thanks 
>  > Tali 



RE: Problem with session tracking. Please help

2001-05-02 Thread Roberts Huw



> -Original Message-
> From: William Kaufman [mailto:[EMAIL PROTECTED]]
> Sent: 02 May 2001 15:02
> To: '[EMAIL PROTECTED]'
> Subject: RE: Problem with session tracking. Please help
> 
> 
> 1) Does your browser have cookies enabled?  If not, you need 
> to rewrite all
> your URLs, using HttpServletResponse.encode[Redirect]URL().
> 

Yes it does have cookies enabled.  Supposing I decide to use the
above code, should I just stick it at the top of my JSP?

> 2) Are you defining a cookie or URL parameter names 
> "jsessionid"?  That one
> is used by Tomcat to keep track of the session, and shouldn't 
> be set by the
> servlet.
> 

I'm not doing either of these things.

> 3) Does HttpSession.getId() keep returning new IDs, and 
> HttpSession.isNew()
> keep returning "true" on each call to your servlet?
> 

No.  What seems to be happening is that a browser will "steal"
a previously existing session while it is still owned by another
browser.  

I have two machines "A" and "B".  "A" looks at the page and gets
a session id (e.g.)"A1" and isNew() returns true.  "A" then refreshes 
the page a number of times.  session id is still "A1" and isNew()
returns false.  Everything is wonderful.  Browser "B" looks at the page
and gets a session id "B1".  isNew() returns true, but the objects 
attached to it are the objects that were
associated with session "A1".  If "A" then does a refresh then the
session id comes back as "B1" and the objects are the same objects.
>From this point on the two browsers share the session and session id
and the objects attached to the session until the session is timed 
out by tomcat.

> As for documentation, the servlet spec goes into this stuff.  You can
> download it at,
> 
> http://java.sun.com/products/servlet/download.html
> 
> 
> -- Bill K.
> 

Thanks Bill.

> 
> > -Original Message-
> > From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 02, 2001 3:21 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: Problem with session tracking. Please help
> > 
> > 
> > Hi All,
> > 
> > We're having a problem with session tracking.
> > We are using tomcat pretty much "out of the box", without 
> integrating
> > with apache or anything like that.
> > We are attaching an attribute to the session which we want 
> (reasonably
> > enough) to be "per session".
> > We are then sending requests for information to tomcat from several
> > different client machines (sometimes logged on as the same 
> > user, sometimes
> > as different users, sometimes using Netscape, sometimes using 
> > IE).  All
> > machines are running Windows NT4.0.
> > 
> > What we are finding is that the Session objects are being 
> > indiscriminately
> > associated with the servlets.  We are getting the right number of
> > session attributes created, but when we refresh the page we 
> find that
> > the new request is associated with the wrong session.
> > 
> > Help?  Is there anything obvious we are missing?  Is there a 
> > document on
> > how the session management works in tomcat?
> > 
> > We are using tomcat-3_3-m1
> > 
> > Thanks a lot,
> > Huw
> > 
> > **
> > **
> > The information in this email is confidential and is intended solely
> > for the addressee(s).
> > Access to this email by anyone else is unauthorised. If you are not
> > an intended recipient, you must not read, use or disseminate the
> > information contained in the email.
> > Any views expressed in this message are those of the individual
> > sender, except where the sender specifically states them to be
> > the views of Capco.
> > 
> > http://www.capco.com
> > **
> > *
> > 
> 


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***




Re: Tomcat 4-beta 3: ready for prime time?

2001-05-02 Thread Peter Mutsaers


But for Tomcat, the beta versions are post-milestone "releases" ???
There have been 5 4.0 milestones (alpha) and now there are beta's, that appear to be 
more advanced and stable than the milestones.

Am I wrong in assuming that 4.0 is closer to a release than 3.3?






"Hari Yellina" <[EMAIL PROTECTED]> on 02.05.2001 13:31:39

Please respond to [EMAIL PROTECTED]

To:   <[EMAIL PROTECTED]>
cc:

Subject:  Re: Tomcat 4-beta 3: ready for prime time?


I am using 3.3 milestone. It is really ood. Please use it. Beta version are
not good for using.
- Original Message -
From: Peter Mutsaers <[EMAIL PROTECTED]>
To: tomcat-user <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 5:57 PM
Subject: Tomcat 4-beta 3: ready for prime time?



Hello,

A week ago I decided to switch from JRUN to Tomcat for my JSP/Servlet
environment. Naturally I started with the officially released version (3.2).

But, especially in the JSP department I found some bugs and inconveniences,
that have been fixed in later releases (3.3-milestone-x, and also 4.0).

Now I wonder, which version should I use in production? It is a stand-alone
Tomcat site for Intranet, so issues with the connectors to other webservers
are not important.
The site is low-volume (1 request per 10 seconds at prime time) but very
important, thus reliability/stability is vital.

Obviously, although 3.2 is the official release, by browsing through the CVS
logs it looks like the unreleased newer versions are of higher quality.

3.3-milestone-2 doesn't seem to have much advantage compared to version
4.0-beta3, since 4.0 seems closer to a real release (it has gone through 5
milestones already, and now seems very close to the final release after some
betas with relatively minor
changes and fixes).

What do you advice?

Peter Mutsaers


=










How to file a bug? (was Re: Final resolution on JCE exceptions and Tomcat (3.2.1)?)

2001-05-02 Thread Doug Fields

Hello all,

Give no response to the below message, I would like to file this as a 
formal bug report. It seems that I am not the only one having to deal with 
this bug as similar messages came out in the past six months.

Cheers,

Doug

At 06:00 PM 4/29/2001, Doug Fields wrote:
>Hello all,
>
>Today I encountered the same problem as several others (based upon my 
>search of the archive on mikal.org) regarding using Sun JCE 1.2.1 in a web 
>app deployed in Tomcat (3.2.1) by putting the four jar files in the 
>WEB-INF/lib dir. That is, it throws a SecurityException (see below).
>
>There were to suggestions made:
>
>1) Add -Djava.protocol.handler.pkgs=sun.net.www.protocol to the java 
>command for starting tomcat
>2) Move the 4 jar files into the tomcat lib dir
>
>The first doesn't work for me.
>
>The second isn't acceptable in the long term, and I'd like to avoid it in 
>the short term as well. The other problem, is, it doesn't work for me: I 
>get a NoClassDefFoundError: com/sun/crypto/provider/SunJCE.
>
>I fixed that by moving the tomcat dir out of "Program Files" which allowed 
>the classpath to be set properly.
>
>So, in the end, I got it working with option #2, above.
>
>Does anyone know how to get it working by putting the JCE files into the 
>lib dir of the web application (WEB-INF/lib)? Does this work propertly in 
>Tomcat 4?
>
>Thanks,
>
>Doug
>
>2001-04-29 05:42:03 - Ctx( X ): Exception in: R( X + /Login + null) - 
>java.lang.ExceptionInInitializerError: java.lang.SecurityException: Cannot 
>set up certs for trusted CAs
> at javax.crypto.b.([DashoPro-V1.2-120198])
> at javax.crypto.Cipher.getInstance([DashoPro-V1.2-120198])
> at X.User.(User.java:200)
> at X.servlet.Login.processRequest(Login.java:137)
> at X.servlet.Login.doPost(Login.java:197)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at 
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> at org.apache.tomcat.core.Handler.service(Handler.java:286)
> 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:210)
> at 
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at 
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:484)
>





Not Found (404)

2001-05-02 Thread Samuzeau Pascal

Hi,

I've mounted Tomcat under Apache's server.

I' had plenty of html pages under a lot of directories under my wwwuser.

When I try to reach those directories, I can't.
Each time I've got this error : Not Found(404)

What can I do ?

Sincerily
PS




Re: Newbie : Help integrating Tomcat with PWS on NT

2001-05-02 Thread Lyle H. Ward

Keith,

You and I are both working with the same configuration. Mine isn't working
yet either, however our problems are different so maybe swapping experiences
will help.

My green arrow is up. My problem is that the jni_connector has a context
problem. Tomcat was working in stand-alone before trying to integrate with IIS. 
I was waiting for someone to answer your Filter DLLs key question before
doing that entry. IIS in not logging attempts to connect to tomcat contexts.
I think this is due to the jni_connector failing to load. The jni_connector
is failing with a NPE. My tomcat logfiles are: isapi.log, jvm.stdout,
jvm.stderr, servlet.log, and jasper.log. I could try sending you a
screen-shot of my registry entries (off-list) if you think it might help. Or
we could go the other way and you send screen shots of the registry branch
and the MMC panels. Just be sure to send any attachments to me. We aren't
supposed to send attachments to the list. 

Lyle


At 02:59 PM 5/1/2001 -0700, you wrote:
>I am trying to develop some simple JSPs on NT4.0.1381, so I need a web
>server right? 
>I installed the NT Option pack and got PWS. I have it up and running. 
>Next I installed Tomcat 3.2.1. I can start it up and it seems to run fine
>but...
>Following the instructions in the "tomcat-iis-howto.html" I get everything
>looking right (checked it 3 times now)
>Problem: Under NT troubleshooting I cannot get the jakarta virtual directory
>to a show a green up arrow (does this happen in PWS?), nor does the logging
>occur for ISAPI redirector log file. This file is absent from my
>c:\tomcat3.2\logs dir.
>When I try the URL "http://localhost/examples/jsp/index.html"; in my browser
>I get the following error in my  winNT\system32\Logfiles\W3svc1\
>23:37:59 127.0.0.1 GET /jakarta/isapi_redirect.dll 500
>But every setting mentioned in troubleshooting has been checked and
>rechecked.
>
>There is one thing I'm not sure I did right: one of the instructions is not
>clear regarding "Configuring the ISAPI Redirector":
>8) ... For PWS, you'll need to use regedit and add/edit the "Filter
>DLLs" key under
>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\Parameters. This
>key contains a "," separated list of dlls ( full paths ) - you need to
>insert the full path to isapi_redirect.dll. 
>-- What does this mean, "the key contains", they are talking about values
>right? I created the "Filter DLLs" key, and I also had to create the value.
>What should I name the value (I named it jakarta also)? What type of value
>is it (I used string)? With just the full path to isapi_redirect.dll. right?
>
>Any other suggestions, like "just don't try it with PWS on NT" are welcome.
>Should I try to install Apache instead?
>-Keith
>
>




RE: [ERROR] OutputStream is already being used for this request

2001-05-02 Thread Mark Howell



Your best bet is to call the servlet directly.  I agree with the other
responders that suggest that using a jsp to dispatch a request to a
servlet that generates a non-html/text/wml/xml document should be avoided.
If you *have* to do so, then your jsp must be setup in an awkward way.

related to your step 3:
> 3. This servlet is called by a jsp which is called from an Html file
>(by the tag: , or pageContext.include|forward(). If
this is the case, then...

All of the proper headers must be sent from the dispatching jsp file
(myJsp.jsp), and none from the servlet.  I believe the jsp file will
always send response headers, and it is definitely an error to commit the
headers twice.

No output can be sent from the jsp file at all prior to dispatching to
the servlet, else a JspWriter might have been opened.  It would then
generate an error.

As an example, create a myJsp.jsp file that has no other characters other 
than:
<% @ page content-type="image/GIF" %>

(again, check the page tag for correct syntax, I still haven't referenced
the cheat sheet)

and coment out the following line in your servlet:
 //response.setContentType ("image/GIF");

The point is, that there are no white spaces that might cause output.
This is an ugly hack, and as another responder suggested, it is easily
broken by somebody putting white space in the file before the
 tag. 

All of that said, you should really consider calling the servlet directly
if at all possible.

-Mark
[EMAIL PROTECTED]


On Wed, 2 May 2001, Tali Ambar wrote:

> 
> > I do not use pageContext.forward(..) or .include(..)  and there aren't any
> > <%  written the following code is written in a Servlet:
> > response.setContentType ("image/GIF");
> > ServletOutputStream outStream = response.getOutputStream();
> > int p1 = 1;
> > int[] p2 = new int[1];
> > byte bytes[] = new byte[1];
> > stream.RemoteRead(bytes,p1,p2);
> > outStream.write(bytes);
> > I thought that they might be some flag which can dim the PrintWriter "out"
> > and then I could pass the outtputStream to the client side.
> > Thanks
> > Tali
> > -Original Message-
> > You might need to make sure that no output is being sent to the browser
> > prior to your attempting to open the outputStream. ANY spaces before the
> > pageContext.forward(..) or .include(..) call may be sent to the browser
> > and will create a JspWriter output stream that will conflict with your
> > getOutputStream() call. One thing worth trying is to start your jsp file
> > with the first characters "<%", the scriptlet openning tag, and make the
> > call to the servlet before any output is generated in your jsp file. 
> > I hope that helps, 
> > -Mark [EMAIL PROTECTED]  
> > 
> > On Wed, 2 May 2001, Tali Ambar wrote: 
> > > 
> > > 
> > > Hi
> >  > 
> > > 1. I'm trying to pass a stream to an html in order to see GIF files in a
> > 
> > > 
> > > stream form on the browser. 
> > > 2. I wrote (in a servlet) the following lines 
> > > IStream stream = ...; // stream of a file in a GIF format 
> > > response.setContentType ("image/GIF"); 
> > > ServletOutputStream outStream = response.getOutputStream(); 
> > > int p1 = 1; 
> > > int[] p2 = new int[1]; 
> >  > byte bytes[] = new byte[1];
> > > stream.RemoteRead(bytes,p1,p2); 
> >  > outStream.write(bytes); 
> > > 3. This servlet is called by a jsp which is called from an Html file (by
> > 
> >  > the tag:  > >) 
> > > 4. When running only the servlet I can see the GIF file. 
> > > 5. When I run the jsp I get the following error: 
> >  > "Error 500: 
> >  > OutputStream is already being used for this request 
> >  > at
> > org.apache.tomcat.core.ResponseImpl.getWriter(ResponseImpl.java:210)"
> > > 6. running the html file fails 
> > > 7. I can not use PrintWriter servlet because I need to pass binary data 
> >  > and not test. 
> > > Thanks 
> >  > Tali 
> 





Re: performance problem - too many processes

2001-05-02 Thread DENIZ DEMIR

Hi Saurabh,

Thank you for your advise, we will make these change now, but I want to ask
some question and answer your questions first.

>
> You can try the following things to make tomcat faster.
>
> 1) keep the log level low.

in server.xml file of tomcat or httpd.conf? do you mean "error" parameter
for low logging?

>
> 2) Set reloadable=false(Disable Servlet Auto-Reloading ) As it is very
> expensive.

do you mean the following parameter from server.xml




>
> 3) Configure PoolTcpConnector depending on the number of
requests/load.(this
> should help a lot).

First, We are a brokerage firm and approximately 1000 different customers
use our internet branch, and I guess 100 user at most use the web branche
simultaneously. what do you think about parameters for Pooling?
(max_threads, mx_spare_servers, min_spare_servers).

But now, the system has too many processes, when I look at with top or ps
commands.

>
> Can u tell how much RAM or perecntage of RAM are tomcat's processess using
?

I do not know, how can I see?

>
> 4) Give more RAM to tomcat.(if i am right the default setting is for
64MB).
> So even though you would be having 256 MB RAM but then u might not be
using
> it optimally.

I do not know how to make this change. But Now system runs under heavy
memory load now, I mean that the system uses some swap memory when the
server has heavy load (when it has about 400 processes, it has 3-5M free
memory, and uses 5-6M swap memory).

>
> Even i had similar problems, and tomcat's performance had improoved a lot
> after working on the
> above mentioned points.

this is very critical for us, if you help me it is very appreciated.

Thanks a lot again, and I am waiting for your reply.

Regards,
Deniz Demir.

>
> HTH,
>
> Shuklix
>
>
>
> -Original Message-
> From: DENIZ DEMIR [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 6:31 PM
> To: [EMAIL PROTECTED]
> Subject: performance problem - too many processes
>
>
> Hi,
>
> I have setup a web server with following configuration:
>
> - Redhat 7.0 - Kernel 2.2.16-22, PIII 650, 256M Ram
> - Tomcat 3.2.1
> - Apache 1.3.19
> - mod_jk
> - Inprise Application server for EJBs
>
> and the server has two SSL acceleration cards, and mod-ssl module for
> apache.
>
> I have configured the apache to use mod_jk and Ajp13 protocol, and I have
> left the default parameters for PoolTcpConnector.
> and the http.conf has the following parameters:
>
> MaxKeepAliveRequests 0
> MinSpareServers 16
> MaxSpareServers 64
> StartServers 20
> MaxClients 250
> MaxRequestPerChild 10
>
> When I make the server up, I see there are 100+ processes initially
(apprx.
> ~130), and in the load intervals it has near 400 process, why it has too
> many processes? is there any idea?
>
> Our old system has Apache JServ for JSP/Servlet and it runs much more
> efficient than tomcat, and much less processes were avaliable in the
system
> at that time.
>
> Response time of server was decreased very much. can anybody say me what
the
> reasons of this situation is, or where I am wrong, what I should do?
>
> I am waiting for your comments and ideas and solutions if any.
>
> Regards,
> Deniz Demir.




RE: Objects in Vector are loosing type

2001-05-02 Thread Joel Parramore


Well, Endre, comments such as "classloading is totally fucked", while having
a nice kewl sound-bite quality, really don't explain what is going on too
well to someone who hasn't encountered the problem before.

Speaking for myself, I had not seen any sort of explanation on the mailing
list before (haven't done an extensive archive check, admittedly, esp. on
the developer list), nor in the Jakarta FAQs.  Another poster commented that
this item keeps popping up; perhaps making this into a FAQ item would insure
that questions and comments on the topic would assist in preventing this
question from (re)occuring.  (Perhaps a weekly posting of FAQ items would
help as well, but that's another issue.)

Thanks for the explanation, though.  And your English is just fine. :-)

Regards,
Joel Parramore



> -Original Message-
> From: Endre Stolsvik [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 2:53 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Objects in Vector are loosing type
>
>
> On Mon, 30 Apr 2001, Joel Parramore wrote:
>
> |
> | Can or has or will someone work up a slightly more technical explanation
> | than
> |
> | > It's because tomcat's reloading are totally fucked.
>
> Well, Joel, it's because tomcat3x doesn't do this:
>
> a) stop the webapp
> b) destroys all servlets
> c) serializes all the Sessions
> d) throws away the ClassLoader for this webapp
> e) cleans away the webapp from all "caches" in the system
> f) restarts the whole webapp, as if for the first time, making a new
> ClassLoader for it.
> g) deserializes all the Sessions (now with the new ClassLoader)
> h) lets the users use the system again
>
> (Which is apparently how tomcat 4 should do it, but it never did for me.
> But I am doing a very weird ting according to the developers, I am running
> tomcat away from it's installation directory, and this is _not_
> supported.)
>
> What tomcat3x does, is to just ditches the ClassLoader and reloads the
> _first_ servlet you hit after a refresh of the .class-files timestamps.
> Even if you recompile your whole webapp, tomcat just reloads the first
> servlet a user hits. This means that all the other Servlets are still
> "cached" using the old ClassLoader, and you actually get two instanses of
> your webapp, all the old Session objects and all the other Servlets loaded
> with the old ClassLoader, while all the new Session objects and the one,
> first hit Servlet with the new ClassLoader.
>   It doesn't, as mentioned, do anything about the Session variables, and
> therefore you often get ClassCastExceptions when you try to handle and
> cast objects gotten from the Session within the one, new reloaded servlet.
> This because _it's_ version of the Class you try to cast the object gotten
> from the Session to, is loaded with the new ClassLoader, while the object
> you try to cast is loaded with the old. This is not considered the same
> Classes, and you get ClassCastException.
>
> This is so very, very wrong, and therefore I'd say it's "totally fucked"..
> This has been pointed out a whole bunch of times.
>
> Better? I'm not that fantastic with English, hope you excuse that, Joel.
>
> Endre.




RE: Problem with session tracking. Please help

2001-05-02 Thread William Kaufman

1) Does your browser have cookies enabled?  If not, you need to rewrite all
your URLs, using HttpServletResponse.encode[Redirect]URL().

2) Are you defining a cookie or URL parameter names "jsessionid"?  That one
is used by Tomcat to keep track of the session, and shouldn't be set by the
servlet.

3) Does HttpSession.getId() keep returning new IDs, and HttpSession.isNew()
keep returning "true" on each call to your servlet?

As for documentation, the servlet spec goes into this stuff.  You can
download it at,

http://java.sun.com/products/servlet/download.html


-- Bill K.


> -Original Message-
> From: Roberts Huw [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 3:21 AM
> To: '[EMAIL PROTECTED]'
> Subject: Problem with session tracking. Please help
> 
> 
> Hi All,
> 
> We're having a problem with session tracking.
> We are using tomcat pretty much "out of the box", without integrating
> with apache or anything like that.
> We are attaching an attribute to the session which we want (reasonably
> enough) to be "per session".
> We are then sending requests for information to tomcat from several
> different client machines (sometimes logged on as the same 
> user, sometimes
> as different users, sometimes using Netscape, sometimes using 
> IE).  All
> machines are running Windows NT4.0.
> 
> What we are finding is that the Session objects are being 
> indiscriminately
> associated with the servlets.  We are getting the right number of
> session attributes created, but when we refresh the page we find that
> the new request is associated with the wrong session.
> 
> Help?  Is there anything obvious we are missing?  Is there a 
> document on
> how the session management works in tomcat?
> 
> We are using tomcat-3_3-m1
> 
> Thanks a lot,
> Huw
> 
> **
> **
> The information in this email is confidential and is intended solely
> for the addressee(s).
> Access to this email by anyone else is unauthorised. If you are not
> an intended recipient, you must not read, use or disseminate the
> information contained in the email.
> Any views expressed in this message are those of the individual
> sender, except where the sender specifically states them to be
> the views of Capco.
> 
> http://www.capco.com
> **
> *
> 



  1   2   >