Re: Tomcat not sending JSESSIONID (servlet session cookie) with new sessions

2008-04-22 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Len,

Len Popp wrote:
| Have you set cookies="false" in the app's  declaration?
| That'd do it.

That wouldn't explain why Tomcat is adding the cookie to the response,
but the cookie isn't making it across the wire.

Tim, can you tell us a little more about the path of execution? I'm
wondering if you are handling a request, modifying the response, and
then forwarding (on the server side) to another process that maybe
blanks-out the response and effectively kills the cookie or something
like that.

Is there any SSL involved at all? I wouldn't expect the behavior you
describe to result from crossing an SSL boundary (I would expect the
browser to get the cookie, but refuse to send it with the next request).

Are there any special filters or valves that are being applied that
might be modifying the behavior of the response?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgOnOkACgkQ9CaO5/Lv0PBUIQCdH1Q39DcjEM7dm6caLbHLEIrz
PuQAnRuxPKiKx10EnGbV9fyM2ENTLSit
=ULgz
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat not sending JSESSIONID (servlet session cookie) with new sessions

2008-04-22 Thread Len Popp
Have you set cookies="false" in the app's  declaration? That'd do it.

What happens if you put a trivial test.jsp in webapps/ROOT and request
http://www.yourserver.com/test.jsp? By default a JSP will create a
session and you should get a JSESSIONID cookie.
-- 
Len

On Tue, Apr 22, 2008 at 7:28 PM, Timothy Washington
<[EMAIL PROTECTED]> wrote:
> Hello there - newbie question. I'm developing a browser-based application. I 
> i) copy the war file to the webapps/ directory, ii) startup tomcat and iii) 
> send an http request from Firefox.
>
>  In my handling servlet, if a session doesn't exist for this client, then I 
> create one (via request.getSession(true)). I expect that cookie (and by 
> extension the session) to still be there on the next request. However, 
> tomcat's HTTP response to the first request does not include the JSESSIONID 
> cookie. So effectively my application is still only request scoped (tomcat is 
> creating a new session with each request).
>
>  How can I get tomcat ( I've tried tomcat-5.5.25 and tomcat-6.0.16 ) to 
> reliably send the JSESSIONID cookie when a new session has been created? I 
> turned on Tomcat 6's RequestDumperValve, and got debugging info that 
> indicates that the JSESSIONID is being generated in the response. However, 
> when my browser receives the response, the cookie isn't there.
>
>
>  Tomcat's RequestDumperValve Log (on response)
>  END EchoServlet EV:  id='686bbca4f757b9ab4bae280
>  3119786e7249-7ffb' groupid='webkell' userid='root' />
>  Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO: ---
>  Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO:   authType=null
>  Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO:  contentLength=95
>  Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO:contentType=null
>  Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO: cookie=JSESSIONID=6014EF8C55BC4705D28863D117B1B334; 
> domain=null; path=/webkell
>  Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO: header=Content-Length=95
>  Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO: header=Date=Tue, 22 Apr 2008 23:18:35 GMT
>  Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO:message=null
>  Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO: remoteUser=null
>  Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO: status=200
>  Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve invoke
>  INFO: ===
>
>
>  Firefox Request Headers (from LiveHTTPHeaders):
>  POST /webkell/webkell HTTP/1.1
>  Host: localhost:8080
>  User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) 
> Gecko/20080404 Firefox/2.0.0.14
>  Accept: 
> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>  Accept-Language: en-us,en;q=0.5
>  Accept-Encoding: gzip,deflate
>  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>  Keep-Alive: 300
>  Referer: http://localhost:8080/webkell/
>  Content-Type: application/x-www-form-urlencoded
>  Content-Length: 63
>
>
>  Firefox Response Headers (from LiveHTTPHeaders):
>  HTTP/1.1 200 OK
>  Server: Apache-Coyote/1.1
>  Content-Length: 95
>  Date: Tue, 22 Apr 2008 23:18:35 GMT
>
>
>  Thanks for any help
>  Tim
>
>
>
>   __
>  Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
> favourite sites. Download it now at
>  http://ca.toolbar.yahoo.com.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat not sending JSESSIONID (servlet session cookie) with new sessions

2008-04-22 Thread Martin Gainty
Tim
try
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse
html
Encodes the specified URL by including the session ID in it, or,
if encoding is not needed, returns the URL unchanged.
The implementation of this method includes the logic to determine whether
the session ID needs to be encoded in the URL.

For example, if the browser supports cookies,
or session tracking is turned off,
URL encoding is unnecessary.

 http://www.idontknow.com/Idunno.html";)%>">Mongo
only pawn in game of life

In your Servlet code
 response.sendRedirect(encodeRedirectURL(http://www.idontknow.html));

HTH
Martin-
- Original Message -
From: "Timothy Washington" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, April 22, 2008 7:28 PM
Subject: Tomcat not sending JSESSIONID (servlet session cookie) with new
sessions


> Hello there - newbie question. I'm developing a browser-based application.
I i) copy the war file to the webapps/ directory, ii) startup tomcat and
iii) send an http request from Firefox.
>
> In my handling servlet, if a session doesn't exist for this client, then I
create one (via request.getSession(true)). I expect that cookie (and by
extension the session) to still be there on the next request. However,
tomcat's HTTP response to the first request does not include the JSESSIONID
cookie. So effectively my application is still only request scoped (tomcat
is creating a new session with each request).
>
> How can I get tomcat ( I've tried tomcat-5.5.25 and tomcat-6.0.16 ) to
reliably send the JSESSIONID cookie when a new session has been created? I
turned on Tomcat 6's RequestDumperValve, and got debugging info that
indicates that the JSESSIONID is being generated in the response. However,
when my browser receives the response, the cookie isn't there.
>
>
> Tomcat's RequestDumperValve Log (on response)
> END EchoServlet EV: 
> Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO: ---
> Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO:   authType=null
> Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO:  contentLength=95
> Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO:contentType=null
> Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO: cookie=JSESSIONID=6014EF8C55BC4705D28863D117B1B334;
domain=null; path=/webkell
> Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO: header=Content-Length=95
> Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO: header=Date=Tue, 22 Apr 2008 23:18:35 GMT
> Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO:message=null
> Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO: remoteUser=null
> Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO: status=200
> Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve
invoke
> INFO: ===
>
>
> Firefox Request Headers (from LiveHTTPHeaders):
> POST /webkell/webkell HTTP/1.1
> Host: localhost:8080
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14)
Gecko/20080404 Firefox/2.0.0.14
> Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=
0.8,image/png,*/*;q=0.5
> Accept-Language: en-us,en;q=0.5
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 300
> Referer: http://localhost:8080/webkell/
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 63
>
>
> Firefox Response Headers (from LiveHTTPHeaders):
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Content-Length: 95
> Date: Tue, 22 Apr 2008 23:18:35 GMT
>
>
> Thanks for any help
> Tim
>
>
>   __
> Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
favourite sites. Download it now at
> http://ca.toolbar.yahoo.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat not sending JSESSIONID (servlet session cookie) with new sessions

2008-04-22 Thread Timothy Washington
Hello there - newbie question. I'm developing a browser-based application. I i) 
copy the war file to the webapps/ directory, ii) startup tomcat and iii) send 
an http request from Firefox. 

In my handling servlet, if a session doesn't exist for this client, then I 
create one (via request.getSession(true)). I expect that cookie (and by 
extension the session) to still be there on the next request. However, tomcat's 
HTTP response to the first request does not include the JSESSIONID cookie. So 
effectively my application is still only request scoped (tomcat is creating a 
new session with each request). 

How can I get tomcat ( I've tried tomcat-5.5.25 and tomcat-6.0.16 ) to reliably 
send the JSESSIONID cookie when a new session has been created? I turned on 
Tomcat 6's RequestDumperValve, and got debugging info that indicates that the 
JSESSIONID is being generated in the response. However, when my browser 
receives the response, the cookie isn't there. 


Tomcat's RequestDumperValve Log (on response)
END EchoServlet EV: 
Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: ---
Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO:   authType=null
Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO:  contentLength=95
Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO:contentType=null
Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: cookie=JSESSIONID=6014EF8C55BC4705D28863D117B1B334; 
domain=null; path=/webkell
Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=Content-Length=95
Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=Date=Tue, 22 Apr 2008 23:18:35 GMT
Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO:message=null
Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: remoteUser=null
Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: status=200
Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: ===


Firefox Request Headers (from LiveHTTPHeaders):
POST /webkell/webkell HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) 
Gecko/20080404 Firefox/2.0.0.14
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Referer: http://localhost:8080/webkell/
Content-Type: application/x-www-form-urlencoded
Content-Length: 63


Firefox Response Headers (from LiveHTTPHeaders):
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 95
Date: Tue, 22 Apr 2008 23:18:35 GMT


Thanks for any help
Tim


  __
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now at
http://ca.toolbar.yahoo.com.

Re: Compiling jni/native on Debian Etch

2008-04-22 Thread Rainer Jung

configure in versoin 1.1.12 is broken. See:

http://marc.info/?t=120171192500012&r=1&w=2

Regards,

Rainer

Andrew Miehs schrieb:

Dear List,

has anyone else tried to compile apr and the native tomcat libraries on 
etch?


debian40-64:/usr/local/src/tomcat-native-1.1.12-src/jni/native# 
./configure --with-apr=/usr/local/apr --with-java-home=/usr/local/java


I get loads of messages including

./configure: line 5472: JAVA_HOME: command not found
./configure: line 5473: JAVA_PLATFORM: command not found
./configure: line 5474: JAVA_OS: command not found
./configure: line 5475: CC: command not found
./configure: line 5476: CFLAGS: command not found
./configure: line 5477: LDFLAGS: command not found
./configure: line 5478: CPPFLAGS: command not found
./configure: line 5479: ac_ct_CC: command not found
./configure: line 5480: EXEEXT: command not found
./configure: line 5481: OBJEXT: command not found
./configure: line 5482: so_ext: command not found
./configure: line 5483: lib_target: command not found
./configure: line 5484: TCNATIVE_LIBNAME: command not found
./configure: line 5485: EXTRA_OS_LINK: command not found
./configure: line 5486: TCNATIVE_EXPORT_LIBS: command not found
./configure: line 5487: TCNATIVE_PRIV_INCLUDES: command not found
./configure: line 5488: TCNATIVE_INCLUDES: command not found
./configure: line 5489: TCNATIVE_LDFLAGS: command not found
./configure: line 5490: TCNATIVE_LIBS: command not found
./configure: line 5491: INCLUDE_RULES: command not found
./configure: line 5492: INCLUDE_OUTPUTS: command not found
./configure: line 5493: LIBOBJS: command not found
./configure: line 5494: LTLIBOBJS: command not found


at the end.

It seems to compile and work - but I am not happy about all the errors - 
and yes, I tried setting 'JAVA_HOME' but this made no difference


COnfused..

Andrew


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to figure out if a user is authenticated when using single sign on?

2008-04-22 Thread FR
I recently attempted to upgrade our sites from tomcat 5.5.17, and at
some point the behavior of request.getUserPrincipal() changed so it
now returns null for all URLs except those declared to require
authentication.  (Actually, it seems like the behavior was changed
long before 5.5.17, but regressed then was fixed again).  That
completely sucks and seems completely contrary to what the servlet
javadoc implies, but whatever, deal with it or write my own container,
I guess.

The standard workaround mentioned is to place user information in
session, but that won't work across webapps using Single Sign On.  I
have a bunch of webapps, only one of which is protected and requires
login, the rest work fine without logging in, but display different
information when the user is logged in.  This worked great when
getUserPrincipal returned a Principal on every URL after login, but I
can't figure out any way to do it now.  I can just pass the userid
around in every URL, but that seems... not good... and involves
changing a lot of links.

 Is there any way of seeing if a user has been authenticated (and get
their username) that works across webapps?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: custom timeout/expiry implementation

2008-04-22 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Farhan,

mfs wrote:
| Actually i need to provide my own session timeOut/expiry
implementation and
| i was wondering what would be the easiest way to achieve this, i am using
| tomcat for development but oc4j for production, and i was wondering if
| somehow i can hook in my implementation into various servlet containers..

You could use a Filter to check whatever condition should expire
sessions. The Filter can certainly call HttpSession.invalidate() at any
time.

Filters are (usually) cross-container because they only have access to
standard Servlet-API stuff.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgOQ2gACgkQ9CaO5/Lv0PAAKACgwmdE9sTrDP/a1V4WdaYfVN8V
N+cAnA+Q784oRGuFiBmHbfHNjLlt/GWS
=bLPb
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question on concurrent request to the same servlet

2008-04-22 Thread Juha Laiho

Dikan Xing wrote:

When two (almost) concurrent requests to the SAME servlet occurs (for example,I 
type the same url in two individual browser window), I find that Tomcat seems 
not to work on the second request until the first is done.


Are the two browser windows truly individual, or could they be part of the same
browser process? It seems that browsers may constrain themselves in several ways
when accessing a single resource (server, URL).


However, in my situtaion, my servlet should wait for some other resources to 
respond. Those resources are quick-responded, but transimssion of requests to & 
responses from those resources cost much time. Therefore, if the servlet could be 
run (service method be called) immediately instead of the previous is done, the 
total response time could be reduced.


Then you should, as Christopher mentioned, check that the contention is not 
caused
by those other resources (either via some pooling/synchronization  mechanism 
within
your app only letting one request at a time to touch the external resource, or
somehow the external resource itself being able to only service a single request
at a given time).


Is there any option in Tomcat so that I can configurate it to call the same 
servlet service method (doGet, doPost) simultanously instead of one by one?


No options needed -- not even if you're using SingleThreadModel in your servlet.

I just wrote a small test and ran it in Tomcat 6.0.14 (not current, but that's
what I happened to have at hand);

I wrote two servlets, with request body essentially "Thread.sleep(5000)", 
followed
by a printout identifying the servlet (class and instance). One of the servlets
was a regular servlet, another was a servlet implementing SingleThreadModel.

Then I wrote a test program; a Java command-line application to spawn five 
threads
for making requests to the regular servlet (MTServlet, as in multi-threaded), 
and
another five threads for making requests to the servlet implementing 
SingleThreadModel
(STServlet).

Below is output from a run of the test program against a server hosting these 
two
servlets:

Start: Tue Apr 22 21:56:28 EEST 2008
Hello from STServlet instance 3
Hello from MTServlet instance 1
Hello from MTServlet instance 1
Hello from STServlet instance 2
Hello from MTServlet instance 1
Hello from MTServlet instance 1
Hello from MTServlet instance 1
Hello from STServlet instance 5
Hello from STServlet instance 4
Hello from STServlet instance 6
Stop: Tue Apr 22 21:56:34 EEST 2008

So, all servlets finished within six seconds of starting the first one -- even 
those
implementing the SingleThreadModel. It should also be noted that all MTServlet 
calls
are handled by a single MTServlet instance (in parallel), but with STServlet the
parallelism comes from Tomcat creating several instances of the servlet (as 
allowed
by the Servlet Specification for servlets implementing the SingleThreadModel).

I've seen something like you describe, and it was when someone had either 
declared
the doGet() method (or another method called within doGet()) as synchronized, or
had written a synchronized code block referring to some single object for all 
requests.

--
..Juha

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with JNDI using a changed context root path

2008-04-22 Thread Stefan Dirschnabel
Thank you very much :). Deploying the application as ROOT.war solved all
my problems ;) and in fact my parameters in the context.xml were
useless.


Am Montag, den 21.04.2008, 08:19 -0500 schrieb Caldarale, Charles R:
> > From: Felix Schumacher [mailto:[EMAIL PROTECTED] 
> > Subject: Re: Problem with JNDI using a changed context root path
> > 
> > Remember to move the corresponding context file as well, so move
> > conf/Catalina/localhost/mywebapp.xml to
> > conf/Catalina/localhost/ROOT.xml.
> 
> The above .xml file is not always created; regardless, it should be
> deleted, not just renamed, since it likely contains invalid attributes
> from the previous deployment.
> 
> > > My context.xml in the META-INF:
> > > 
> > > 
> 
> You must remove both the path and docBase attributes - neither are
> allowed and they are possibly messing up Tomcat's internal structures
> during deployment.  As Felix noted, rename your .war file to ROOT.war
> (and remove Tomcat's default ROOT directory) in order to make it the
> default webapp.
> 
> > >
> It's probably inappropriate to use the "warfilename" as part of JNDI
> lookup, since the name of the .war file (and therefore the webapp) is
> subject to change; use a fixed value, both there and in the code doing
> the lookup.
> 
> > > My context tag in the server.xml:
> > >  > >  docBase="warfilename"
> > >  reloadable="true" />
> 
> You must not have the  defined twice; I think the one in
> server.xml will be overridden by the one in META-INF/context.xml, but
> you should not count on it.  For that matter, you should never place
>  elements in server.xml in modern versions of Tomcat.  If you
> absolutely insist on putting your  in server.xml, the path for
> the default app is an empty string "", not a slash.  Read the doc:
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: NotSerializableException: StandardSessionFacade

2008-04-22 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
> Subject: Re: NotSerializableException: StandardSessionFacade
> 
> That's the weirdest stack trace I've ever see. readObject calls
> something that throws a WriteAbortedException? Totally weird.

We already discussed that, back at the beginning of this thread.  It's
due to the object being read in not being serializable now.  It's not
quite clear, however, how the thing got written out in the first place.

> I wonder if you have a class that implements its own read/write
> methods that calls the wrong method (read calls write or similar).

No, it's because the webapp has stored the session object (actually the
facade) into the session - for no apparent reason.  The facade is not
serializable, of course.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why does Tomcat become slow during weekends?

2008-04-22 Thread David kerber

murthy gandikota wrote:
David kerber <[EMAIL PROTECTED]> wrote:
  
Just a SWAG: Maybe the traffic slows down so much that the database (if 
there is one) is timing out connections and dumping stuff from its 
cache, so that when people do hit it, the db has to create a new 
connection and read lots of stuff from disk, which was in RAM cache 
during the week?

D



  This seems likely as we have seen some problems with DB connections. I am not 
sure how to keep the DB connections alive when there is no traffic on the 
website.
  
What we ended up doing was extending the connection timeout setting in 
the database so that it would keep it alive over a weekend.  Of course, 
this will use a few more resources on the DB server, but that's not 
likely to be limiting. 

I don't know what you could do about the cold cache issue, though; maybe 
a cron job to periodically run some typical queries against the 
database?  Actually, that would take care of the connection timeout 
issues as well.


D



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Bending Jasper to My Will

2008-04-22 Thread Andy Clark

Alan Chaney wrote:
Correct me if I am wrong but you want to have a 

> level of configuration which is more than just
> appearance.

It's mostly for appearance but that also ties in
with functionality. For example, if a page displays
the preferences that a user can change, a skin
author can change which preferences are "available"
by rewriting the prefs page to not include those
elements. But these changes are specific to a
class of users that are assigned (or have chosen)
that skin.

The next thing which isn't clear to me is at who 

> will choose the feature set. Is this going to be
> a runtime thing or a startup configuration thing?
> Will your end-users be able to configure things
> or will it be the result of specific programming
> work?

These changes will be made by customers themselves
or professional services.

We provide a tag library that exposes all of the
functionality of our web application. We use this
tag library to build the default skin of the app
but customers often want to tweak the appearance
in ways that go beyond simple CSS changes.

In addition, right now there is no way for them
to localize their changes to a particular skin.
If they make changes to a presentation tag (or
JSP) then all other skins see those changes.

And one of my primary goals is to allow users to
create custom skins without any configuration
changes to the web container. Just drop in the
skin and it works.

I'm currently exploring ways to work around the
problem within the confines of what JSPs allow.
But I'm having limited success with that route...

-AndyC

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



custom timeout/expiry implementation

2008-04-22 Thread mfs

Guys,

Guys

Actually i need to provide my own session timeOut/expiry implementation and
i was wondering what would be the easiest way to achieve this, i am using
tomcat for development but oc4j for production, and i was wondering if
somehow i can hook in my implementation into various servlet containers..

Thanks in advance

Farhan.
-- 
View this message in context: 
http://www.nabble.com/custom-timeout-expiry-implementation-tp16825415p16825415.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why does Tomcat become slow during weekends?

2008-04-22 Thread murthy gandikota


David kerber <[EMAIL PROTECTED]> wrote:
>Just a SWAG: Maybe the traffic slows down so much that the database (if 
>there is one) is timing out connections and dumping stuff from its 
>cache, so that when people do hit it, the db has to create a new 
>connection and read lots of stuff from disk, which was in RAM cache 
>during the week?
>D

  This seems likely as we have seen some problems with DB connections. I am not 
sure how to keep the DB connections alive when there is no traffic on the 
website.
   
  Thanks 
  Murthy 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: NotSerializableException: StandardSessionFacade

2008-04-22 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Massimo,

MassimoH wrote:
|
| Christopher Schultz-2 wrote:
|> This shouldn't be a fatal error. All Tomcat versions I have used will
|> simply give-up restoring sessions and continue starting up.
|>
|> The OP didn't post the entire stack trace, so it's tough to tell what's
|> really going on. Massimo, can you re-post the stack trace in its
entirety?
|>
|
| This is not a fatal error, however, I'd like to get this resolved. Can I
| simply turn off restoring sessions? That just means that when I
restart the
| server, I lose client web session data, right? That's not a problem.

Yes, you can turn it off. See
http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html

| The full stack trace? It's quite big. Here it is...
|
| - IOException while loading persisted sessions:
| java.io.WriteAbortedException: writing aborted;
| java.io.NotSerializableException:
| org.apache.catalina.session.StandardSessionFacade
| java.io.WriteAbortedException: writing aborted;
| java.io.NotSerializableException:
| org.apache.catalina.session.StandardSessionFacade
| at
| java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
| at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)

That's the weirdest stack trace I've ever see. readObject calls
something that throws a WriteAbortedException? Totally weird. I wonder
if you have a class that implements its own read/write methods that
calls the wrong method (read calls write or similar).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgOMmIACgkQ9CaO5/Lv0PDAhQCgqPMWQ8hQJ9N2HyBikbS1UQD0
mCQAnA64tSQdsCBQVDykr/mtwFKjxJ2W
=Z/Bg
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IE and Mozilla issue with Cookies with setVersion(1)

2008-04-22 Thread Mark Thomas

Rajeev Angal wrote:
You indiated earlier on this thread that a "patch for 6.0.16" is being 
worked on to fix the v1 cookies issue  - any idea when it will be released?
There has been some discussion of this on the dev list. No specific 
timetable as yet.


Also would appreciate if I can get a bugzila number to track it - I can 
seem to find it as I searched the bug list.

As I recall, I don't think there was one. A quick search found this:
http://svn.apache.org/viewvc?rev=639909&view=rev

There may have been others - you'd have to check the svn history to be sure.

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bending Jasper to My Will

2008-04-22 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andy,

Andy Clark wrote:
| I want Jasper to look for JSP and Tag files in a
| specific location (e.g. based on a request param);
| and then fall back to a default location if the
| file is not found. This would be extremely useful
| for skinning a webapp.

I realize this doesn't answer your question (sorry!), but this is
exactly what Tiles was written do to. I think there is a JSP Tiles
implementation, but, of course, you'd still have to re-hack all your
existing files to make it happen.

Unfortunately, I don't think you're going to find a silver-bullet
solution that you can code-up in in a weekend. Fully-customizable
private-labeling solutions usually have to be done from the ground-up,
unless you are willing to settle for simple CSS replacements.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAkgOMLEACgkQ9CaO5/Lv0PCl5ACY79bSXXb2UPBmxjza5hKi+zwi
7ACgiJFnC2VUj1jNhNgx5kcVaAEiXpg=
=bad+
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NotSerializableException: StandardSessionFacade

2008-04-22 Thread MassimoH


Christopher Schultz-2 wrote:
> 
> This shouldn't be a fatal error. All Tomcat versions I have used will
> simply give-up restoring sessions and continue starting up.
> 
> The OP didn't post the entire stack trace, so it's tough to tell what's
> really going on. Massimo, can you re-post the stack trace in its entirety?
> 

This is not a fatal error, however, I'd like to get this resolved. Can I
simply turn off restoring sessions? That just means that when I restart the
server, I lose client web session data, right? That's not a problem.

The full stack trace? It's quite big. Here it is...

- IOException while loading persisted sessions:
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
org.apache.catalina.session.StandardSessionFacade
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
org.apache.catalina.session.StandardSessionFacade
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at java.util.ArrayList.readObject(ArrayList.java:593)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at
org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1402)
at
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:931)
at
org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:394)
at
org.apache.catalina.session.StandardManager.load(StandardManager.java:321)
at
org.apache.catalina.session.StandardManager.start(StandardManager.java:637)
at
org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:432)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4160)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(

Re: IE and Mozilla issue with Cookies with setVersion(1)

2008-04-22 Thread Rajeev Angal

Hi Mark :
You indiated earlier on this thread that a "patch for 6.0.16" is being  
worked on to fix the v1 cookies issue  - any idea when it will be  
released?
Also would appreciate if I can get a bugzila number to track it - I  
can seem to find it as I searched the bug list.


thanks,
-rajeev

On Mar 20, 2008, at 6:00 AM, Mark Thomas wrote:


Ronald Klop wrote:
On Wed Mar 19 23:13:33 CET 2008 Tomcat Users List > wrote:

Rajeev Angal wrote:
> I misspoke - this is happening on Tomcat 6.0.16 only .
> 6.0.10 is working fine on all browsers.
> > Any pointers highly appreciated.

It is a known issue in 6.0.16. A patch is currently under  
consideration.


Mark

Is it an issue on any 5.5.x version?


Yes, the latest. It is a side-effect of the recent cookie security  
fixes so for v0 cookies you can either have secure or working but  
not both.


One work-around would be to use v1 cookies.

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



64-Bit isapi

2008-04-22 Thread Panian, Ardo
I figured out how to get the isapi_redirect.dll to work on 64-bit windows
systems.

The key to this was once the correct source code was downloaded from
Jakarta, it had to be compiled using Visual Studios 2008 C++ build
environment.  This is (in my experience) a very finicky *.dll that had to be
compiled on the server that was hosting it, or else release" version would
not load.  I also found that the "debug" version is more likely to load on a
similar the "Proc_build".

-- 
Sincerely,
Ardo S. Panian
H: 508-969-9935
M: 781-771-6728
F: 484-771-6726


Re: Bending Jasper to My Will

2008-04-22 Thread Alan Chaney

Andy

I've followed this thread with a some interest because it ties up with 
some things I've done in the past. I think you are trying to use a 
technology in an inappropriate way to solve the wrong problem.


Correct me if I am wrong but you want to have a level of configuration 
which is more than just appearance.


You want to:

1. be able to add/remove features from a particular page
2. be able to reorder features

Is that correct?

The next thing which isn't clear to me is at who will choose the feature 
set. Is this going to be a runtime thing or a startup configuration 
thing? Will your end-users be able to configure things or will it be the 
result of specific programming work?


Alan Chaney



Andy Clark wrote:

Lucas wrote:
  To answer the original question, there is a 

 > mechanism that Tomcat provides to handle the
 > specific thing you want to achieve. The solution
 > is very Tomcat specific, so I do not really
 > recommend it, anyhow, if you really _need_to_have
 > _this_ then the way to achieve it is the following:


[...]


Thanks for the suggestion but I think I am out
of luck because we're using a different web
container. Even though there's a ton of different
web containers, they all seem to use Jasper so
that's where I was attempting to tackle the
problem.

But, referring to your specific suggestion, I
wonder if there would be a problem. When I was
browsing the Jasper source, I noticed that it
caches the resolved JSP/tag files. Which means
that if I only change the resolution mechanism,
it won't work. Because unless I am also able to
modify the cache ID, then whichever source file
is resolved first for a specific JSP/tag, then
that one will be cached and be returned the next
time it's referenced, even if the user's skin is
different. (If that makes any sense.)


PS: This will make yous web app not 100% standard,

 > and if you have to migrate this behavior to other
 > web containers, it might get trickier, so be sure
 > that you really need this.

Understood. Which is also why I'm hoping that
the Jasper developers would be open to patches
that allow it to be extended in this way.


Ahh, just one more thing, do not even try to

 > modify Jasper itself unless you know what you
 > are doing; Most people experimenting with

Jasper end up in nothing.


That way leads madness. Got it. :)

-AndyC

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



!DSPAM:480e21ea50971721312192!



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bending Jasper to My Will

2008-04-22 Thread Andy Clark

Lucas wrote:
  To answer the original question, there is a 

> mechanism that Tomcat provides to handle the
> specific thing you want to achieve. The solution
> is very Tomcat specific, so I do not really
> recommend it, anyhow, if you really _need_to_have
> _this_ then the way to achieve it is the following:


[...]


Thanks for the suggestion but I think I am out
of luck because we're using a different web
container. Even though there's a ton of different
web containers, they all seem to use Jasper so
that's where I was attempting to tackle the
problem.

But, referring to your specific suggestion, I
wonder if there would be a problem. When I was
browsing the Jasper source, I noticed that it
caches the resolved JSP/tag files. Which means
that if I only change the resolution mechanism,
it won't work. Because unless I am also able to
modify the cache ID, then whichever source file
is resolved first for a specific JSP/tag, then
that one will be cached and be returned the next
time it's referenced, even if the user's skin is
different. (If that makes any sense.)


PS: This will make yous web app not 100% standard,

> and if you have to migrate this behavior to other
> web containers, it might get trickier, so be sure
> that you really need this.

Understood. Which is also why I'm hoping that
the Jasper developers would be open to patches
that allow it to be extended in this way.


Ahh, just one more thing, do not even try to

> modify Jasper itself unless you know what you
> are doing; Most people experimenting with

Jasper end up in nothing.


That way leads madness. Got it. :)

-AndyC

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bending Jasper to My Will

2008-04-22 Thread Andy Clark

Hassan wrote:

 I think that this is a non-starter because the app
 is already written (quite nicely, I might add) in
 straight JSPs.


If it's already "quite nicely" written, why doesn't 

> it do what you want? :-)

Excellent point! But ultimately there are limitations
in the extensibility of the engine that limit what we
can do. We're often pushing the boundaries of what
the technology can handle. Oh well... nothing is
perfect.

-AndyC

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat context.xml and classpath

2008-04-22 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matteo,

matteof wrote:
| I'm currently working on a project that uses a specific oracle driver
| version put in common/lib and it cannot be changed at the moment.
| The problem is that i have to deploy another application on production
| server which datasource (defined in META-INF/context.xml)  doesn't fit
very
| well with drivers mentioned before.
| My question is if it's possible to force a resource to load a  jar from a
| specific path and avoid conflicts.

Not really. Your best bet is to run another instance of Tomcat and
segregate either your new application or the old application.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgOFckACgkQ9CaO5/Lv0PCj1gCeO3pb4ORvsRUwyjapM4YYlgat
Z0QAn34f/aPZemEAldXeHvkmAIYC0+CR
=I8Cq
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 6 DIGEST auth

2008-04-22 Thread Mark Thomas

DIGLLOYD INC wrote:
Is the realm the  specified in the  in 
web.xml? (eg "Tomcat Manager Application")

Yes.

(link above) suggest "localhost:80" might be the realm, but that makes 
no sense to me, as this would tie it to a specific port.

That is the default you get if you don't specify one.

The book I have -- "Tomcat, The Definitive Guide, 2nd Edition" is in 
conflict with the above documentation, making no mention of digesting 
with the username and realm.  The book suggest doing:

bin/digest.sh -a MD5 user-password

As does the docs. This is for digested passwords with BASIC or FORM auth.


But the tomcat 6 docs referenced above suggest doing:
bin/digest.sh -a MD5 username:realm-name:password

This is for digested passwords with DIGEST auth.



--obviously very different approaches!

Because they have different uses.

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why does Tomcat become slow during weekends?

2008-04-22 Thread David kerber

murthy gandikota wrote:

Peter Crowther <[EMAIL PROTECTED]> wrote:> From: murthy gandikota 
[mailto:[EMAIL PROTECTED]
  

We have a website based on embedded Tomcat with Jboss 4.0.2.
We noticed that every weekend the Tomcat becomes sluggish.



Backups? Congestion on the network due to a site that's only accessed heavily 
at weekends?
   
  There are no backups. The website uses DB2 which is backed up infrequently. And all of our users use the site during business hours on weekdays.
  
  

We theorized that JVM is busy with garbage collection.
Is that realistic?



No. The JVM collects garbage at intervals measured in seconds or minutes, and 
takes milliseconds or seconds. It also doesn't know about weekends :-).

  I forgot to mention that there is an apache/mod-jk load balancer in the front end. On weekends we end up restarting everything including apache and jboss. 
   
  

Does anyone have any other suggestions?



I'd guess system maintenance of some kind. Is this on a physical server or a 
virtual one?

  There is no other system maintenance more than what I have mentioned. The 
Tomcat runs on a physical server. Heard a virtual server will be even slower.
  
- Peter


  Thanks
  Murthy
  
Just a SWAG:  Maybe the traffic slows down so much that the database (if 
there is one) is timing out connections and dumping stuff from its 
cache, so that when people do hit it, the db has to create a new 
connection and read lots of stuff from disk, which was in RAM cache 
during the week?


D



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Comodo as a CA

2008-04-22 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

I'm asking the Tomcat community this because everyone always surprises
me with their wide customer experiences.

I need to get new SSL certs for a domain name switch we're doing, soon.
VeriSign's SGC/EV SSL certs are ridiculously expensive and so I'm
looking for alternatives. Comodo offers a product that is
indistinguishable (to me) to VeriSign's SGC/EV cert, but it costs 1/4 as
much.

Does anyone have any experience with Comodo? Specifically, has anyone
run across any customers whose browsers do not trust Comodo as a CA?

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgOEuAACgkQ9CaO5/Lv0PDpmQCdFCHiNBH5yUUWToxSEv0Pf9rX
aNAAoJlbH4Wg2pTwFO2NYkrv5Yyn7gu3
=NOzQ
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Directories in Tomcat 5.5\temp

2008-04-22 Thread Caldarale, Charles R
> From: hezjing [mailto:[EMAIL PROTECTED] 
> Subject: Re: Directories in Tomcat 5.5\temp
> 
> Yes, I'm using antiResourceLocking as shown in Tomcat 
> 5.5\webapps\myapp\META-INF

Unless you really, really need that, I'd turn it off.

> I stopped Tomcat service normally (using Monitor Tomcat).

I don't know what that is, but I suspect it's causing an abrupt
termination rather than an orderly shutdown.  You should be using either
the shutdown script or the tomcat5w.exe program to stop the Tomcat
service.

> The following are the steps I performed,

The exact same steps (using the tomcat5w.exe program to start/stop the
service) work fine for me, and result in an empty temp directory.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Java VM slowly eats all memory up - without JVM heap OutOfMemory failures!

2008-04-22 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stephanie,

Stephanie Wullbieter wrote:
| -Xmx768m
| -verbose:gc

Do you see GC activity in stdout? You should be able to get some heap
metrics easily by looking at that. What does the heap use curve look like?

|  total   used   free sharedbuffers cached
| Mem:   15558281522108  33720  0  71984  78676
| -/+ buffers/cache:1371448 184380
| Swap:   265064 265064  0
|
| So the host seems to be under memory pressure and it's a question of
time that it comes to instability.

To quote a wise newsgroup (or blog?) sage: "what good memory if you're
not using it?". Seriously. Why are you worried that your machine's
memory is not free? 'free' reports that no wrap is being used. It looks
like your kernel is managing your memory quite well.

| ps aux
| tomcatp  19814  0.7 85.5 1860356 1330700 ? Sl   Apr08 152:48
/home/tomcatp/prod/java2/bin/java -Dtomcat

Okay, this is kinda weird. You started the JVM with a 768MiB heap, and
the process appears to be using a little less than double that. It seems
to me that your heap has reached its maximum size (768MiB), which
accounts for a bit over half of the allocation of memory. How many
connectors do you have enabled in Tomcat? Per connector, how many
connections are you allowing it to accept? Are you using any special
connector like NIO, APR, or Comet?

If you have a lot of threads allocated through connectors, they all need
lots of memory to stay running.

| The Java VM has no OutOfMemory failures, the JVM usage is about 600
MiB, and does not go over 700 MiB (768 MiB JVM Heap).
| So it looks like Java VM is using about 700 MiB for itself. Is that
normal?

Yes, if you have lots of threads.

|
| When the tomcat is started, java only uses 300 MiB overall, then it
increases constantly.

Your JVM will never release heap memory back to the operating system, so
a process memory size that only increases is not cause for alarm. If you
are getting no OOMEs and everything runs properly, why are you so concerned?

You never mentioned what type of "problem" occurred to your application.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgOEYMACgkQ9CaO5/Lv0PCjUQCfTTGM9YSq7VS9l+IgEMr/osYN
iJ0An18KjNs8KBpjz5TnX8FsF2vD0T/P
=ZnOF
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Why does Tomcat become slow during weekends?

2008-04-22 Thread Peter Crowther
> From: murthy gandikota [mailto:[EMAIL PROTECTED]
> Peter Crowther <[EMAIL PROTECTED]> wrote:>
> From: murthy gandikota [mailto:[EMAIL PROTECTED]
> > We have a website based on embedded Tomcat with Jboss 4.0.2.
> > We noticed that every weekend the Tomcat becomes sluggish.
[...]
>   There is no other system maintenance more than what I have
> mentioned. The Tomcat runs on a physical server. Heard a
> virtual server will be even slower.

Generally yes.  If it was on a virtual server, I'd have suggested that another 
virtual server on the same host might have been hogging resources - but that's 
not an option.

My next suggestion is to look for the gross cause of the slowdown.  Performance 
Monitor (on Windows) or top / vmstat (on UNIX) and see whether you're short of 
memory, CPU or disk bandwidth when the system goes slow.  If one of those is 
the problem, the next step is to narrow down which process is the memory, CPU 
or I/O hog and find out why it only happens at weekends.  If you're not short 
of any of those, the next step would probably be to look at your database 
server and try to work out whether that's somehow causing the slowdown.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why does Tomcat become slow during weekends?

2008-04-22 Thread Philip Wigg
> We have a website based on embedded Tomcat with Jboss 4.0.2. We noticed that 
> every weekend the Tomcat becomes sluggish. I mean there are no errors like 
> HTTP404. The website simply hangs. We theorized that JVM is busy with garbage 
> collection. Is that realistic? Does anyone have any other suggestions?

What's the load average or CPU busy time of the server? Do you, or
might you expect, to get more website traffic at weekends?

Are there any obvious causes of Tomcat hanging? For example, if you
look inside the Tomcat manager application can you see if you are
running out of free heap space?

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hs_err_pidPID.log reading

2008-04-22 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

Caldarale, Charles R wrote:
|> From: Pop Olimpiu [mailto:[EMAIL PROTECTED]
|> Subject: hs_err_pidPID.log reading
|>
|> After following the error logs I found an hs_err_pidPID.log
|> which seams to show me what is the problem
|
| This is a JVM, not Tomcat, problem.  I would try moving to the latest
| version of 1.6 and see if the problem persists.  If it does, file a bug
| report with Sun, as described in the message you're seeing.

My experience with Sun has been that they casually look at SIGSEGV
reports, but basically nothing ever gets fixed. The reason is that seg
faults, though sometimes caused by bad code in the VM, are usually due
to other outrageous reasons like stray alpha particles and bad hardware.
As stupid as this sounds, it's often the truth. Every time I've heard of
a SIG11 happening on a Java app, a hardware replacement has fixed it
100% of the time.

For the OP:
http://www.bitwizard.nl/sig11/

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgOD3AACgkQ9CaO5/Lv0PC8CACeJyZ6xDjzUzUFaJWcUsa52pRx
1l4An3wY/B755cToHX3VkAspsNrEHpmd
=nQm4
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Directories in Tomcat 5.5\temp

2008-04-22 Thread hezjing
Yes, I'm using antiResourceLocking as shown in Tomcat 5.5\webapps\myapp\META-INF






I stopped Tomcat service normally (using Monitor Tomcat).
The following are the steps I performed,

1) Stopped Tomcat 5.5 service.
2) Delete all files in Tomcat 5.5\temp\.
3) Started Tomcat 5.5 service.
4) Tomcat created Tomcat 5.5\temp\0-myapp\.
5) Opened IE and load http://localhost:8080/myapp, then closed IE.
6) Stopped Tomcat 5.5 service.

7) Tomcat 5.5\temp\0-myapp still exists


On Tue, Apr 22, 2008 at 11:53 PM, Caldarale, Charles R
<[EMAIL PROTECTED]> wrote:
> > From: hezjing [mailto:[EMAIL PROTECTED]
> > Subject: Re: Directories in Tomcat 5.5\temp
> >
> > When I look further into these directories, they contain the same (and
> > only) JAR files of my web application,
> > e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar
> > Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar
>
> You must have antiResourceLocking set to "true" for those (or possibly
> all) webapps.  Doing so will indeed cause Tomcat to use the temp
> directory; however, with a normal Tomcat shutdown, these will be
> removed.  Are you terminating Tomcat abnormally, or are you just poking
> around while it's running?
>
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 

Hez

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Why does Tomcat become slow during weekends?

2008-04-22 Thread murthy gandikota


Peter Crowther <[EMAIL PROTECTED]> wrote:> From: murthy gandikota 
[mailto:[EMAIL PROTECTED]
> We have a website based on embedded Tomcat with Jboss 4.0.2.
> We noticed that every weekend the Tomcat becomes sluggish.

Backups? Congestion on the network due to a site that's only accessed heavily 
at weekends?
   
  There are no backups. The website uses DB2 which is backed up infrequently. 
And all of our users use the site during business hours on weekdays.
  
> We theorized that JVM is busy with garbage collection.
> Is that realistic?

No. The JVM collects garbage at intervals measured in seconds or minutes, and 
takes milliseconds or seconds. It also doesn't know about weekends :-).

  I forgot to mention that there is an apache/mod-jk load balancer in the front 
end. On weekends we end up restarting everything including apache and jboss. 
   
> Does anyone have any other suggestions?

I'd guess system maintenance of some kind. Is this on a physical server or a 
virtual one?

  There is no other system maintenance more than what I have mentioned. The 
Tomcat runs on a physical server. Heard a virtual server will be even slower.
  
- Peter

  Thanks
  Murthy

   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Security with WebLogic (JAASRealm)

2008-04-22 Thread LaurenceNoton

Hello

I am trying to use a JAASRealm for authentication.  I have set up the Realm
and it is authenticating with a WebLogic instance and returns a user back
(WLSUserImpl) with their groups (if any WLSGroupImpl).  I have a custom
verison of the WebLogic provided UsernamePasswordLoginModule which doesnt
pass in a URLCallback!

I now want to look up an EJB on the remote WebLogic server within a servlet,
this works too but if I call a secured method (requirings you to have a
Group) I get a security error.  User  cannot..

I have managed to get the Subject from the HTTPSession and then with that
call weblogic.security.Security.runAs( subject, new
MyEJBLookUpAndCallAction() );  I have the weblogic.jar in the tomcat
classpath, and this works fine.  Is there away to make is cleaner and just
be able to look up the ejb and call it with out having to do the run as? 
For some reason Tomcat is not assoicating the Subject with the thread.

Also: I have debugged the login module and a Subject is created correctly -
with WLSUserImpl and WLSGroupImpl, but the Subject I get back from the
HTTPSession only has the user in it with no groups.


Any help is appreciated.

Thanks,

Laurence.

-- 
View this message in context: 
http://www.nabble.com/Security-with-WebLogic-%28JAASRealm%29-tp16824943p16824943.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 6 DIGEST auth

2008-04-22 Thread DIGLLOYD INC

I've read this doc:
http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#Digested%20Passwords

But I cannot get it to authenticate.

I'm putting the digested password for myusers into tomcat-users.xml as  
directed.


One problem is that it's not at all clear what the realm is--

Is the realm the  specified in the  in  
web.xml? (eg "Tomcat Manager Application")  Or something else?  The  
docs (link above) suggest "localhost:80" might be the realm, but that  
makes no sense to me, as this would tie it to a specific port.


 
BASIC
Tomcat Manager Application
  


The book I have -- "Tomcat, The Definitive Guide, 2nd Edition" is in  
conflict with the above documentation, making no mention of digesting  
with the username and realm.  The book suggest doing:

bin/digest.sh -a MD5 user-password

But the tomcat 6 docs referenced above suggest doing:
bin/digest.sh -a MD5 username:realm-name:password

--obviously very different approaches!


Lloyd Chambers
http://diglloyd.com

[Mac OS X 10.5.2 Intel, Tomcat 6.0.16]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat is not rendering JSP content on Port 80

2008-04-22 Thread Alan Chaney



BeasC wrote:

My intent is to have an Apache + JK + Tomcat server that uses apache only to
service static web content and and sends all dynamic content to Tomcat (so
that it handles all the JSP).  I downloaded and installed Apache 2.2, Tomcat
6.0, and J2SE 1.5 (Becuase j2se 1.6 was buggy and giving problems).  When
initially configuring the server, I included the following lines in the
Apache HTTPD.conf file:

LoadModule jk_module modules/mod_jk-1.2.26-httpd-2.2.4.so



Apache 2.2 comes with mod_proxy as default. Either way, you must also 
configure apache to use either mod_jk or mod_proxy.


You are trying to do this by using the 'auto config' mechanism in tomcat.


and in Tomcat I included:



and

I personally have never used this and in the installations which I have 
with Apache 2.2. I use mod_proxy so others may be able to help you more 
here, but I still think that your problem is that your attempt to 
service static documents with apache is overlapping with your attempts 
to serve dynamic information from tomcat.


Have you checked that the workers.properties file is being created 
correctly? What does it have in it?


You have explicitly set forwardAll to false, which is OK, but it also 
means that you must configure apache NOT to look at the same folders 
that you are using for tomcat. See the comment about noRoot and 
forwardAll in the javadocs.


"Warning: When false, some configuration in the web.xml may not be 
duplicated in Apache. Review the mod_jk conf file to see what 
configuration is actually being set in Apache."


It would help if you could give us your folder layout and how you
expect that to map to your url structure.





Basing most of the tutorials I have read about setting up this type of
servers, I thought this steps were sufficient to enable the server to work
in the above descirbed way.  It appears, however, that I am missing
something...  

Trouble with tutorials is that they are mainly created by people in 
their spare time and they can't possibly cover every variation and 
condition in a world where individual components of a project are 
released on their own timescales and to meet their own objectives. I 
always seem to find something doesn't quite work right when I try to do 
it by rote from a tutorial and I end up debugging it myself, just using 
the tutorial as a guide.




-Carl
 


Alan Chaney wrote:
The effect you are observing is because you have configured your setup 
to have the jsp files in the path of the document root for apache. 
Apache knows nothing about jsp files so it is just returning the source 
to you.


You have not specified O/S, JVM or Apache or Tomcat version.

You might like to read the tomcat documentation before going any further:

http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html

would be a good place to start if you intend to use apache + tomcat, 
together with


http://tomcat.apache.org/tomcat-6.0-doc/connectors.html

if you want to configure your version of tomcat to directly serve port 
80 and not use apache at all.


A 'tomcat only' installation working with port 80 can easily be 
configured in Windows using the control panel (or so I believe as I 
don't use Windows myself). For a linux setup there are some additional 
complications - see:


http://commons.apache.org/daemon/index.html

to avoid running tomcat as root.

Also you may find looking at archives of this list helpful.


If you can't find the answers in the above and generally,

http://tomcat.apache.org/connectors-doc/index.html

then maybe you could specify your system more clearly and I'm sure 
people will be able to give you more specific help.



Alan Chaney









BeasC wrote:

I can get Tomcat to render JSP content if I try to (for example) access
the
JSP installation examples using http://localhost:8080/examples/jsp  But
when
I try to try http://localhost/examples/jsp I get nothing but the raw html
code of the page (of a specific example).
I have an Apache - Tomcat server, and Apache is listening on port 80
(Which
is the default port used when accessing the server using its IP address.
Tomcat has the following code lines in its server.xml file, that I think
might serve as reference point to what I'm talking about:



and

   connectionTimeout="2" 
   redirectPort="8443" /> 


Any help would be greatly appreciated.

-Carl

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat is not rendering JSP content on Port 80

2008-04-22 Thread Caldarale, Charles R
> From: BeasC [mailto:[EMAIL PROTECTED] 
> Subject: Re: Tomcat is not rendering JSP content on Port 80
> 
> My intent is to have an Apache + JK + Tomcat server that uses 
> apache only to service static web content and and sends all 
> dynamic content to Tomcat (so that it handles all the JSP).

If all you're using httpd for is to serve static content, you're wasting
your time and creating much more complexity than you need.  Current
Tomcat versions don't need assistance for serving static content, other
than for heavy SSL traffic; in that case, use the APR connector and
OpenSSL - still much simpler than adding httpd to the mix.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: first authentication attempt fails - mysql timeout

2008-04-22 Thread Robert Jacobson

Christopher Schultz  wrote:

Yes, using DataSourceRealm is the preferred configuration.


Thank you for confirming that :)


[...] By the way, there's no reason not
to upgrade to the most recent Connector/J, either. 


Sorry..  are you referring to the mysql-connector JAR file?  In my
troubleshooting process I upgraded that to 5.1.6 (i.e.
mysql-connector-java-5.1.6-bin.jar).  Obviously it didn't fix things,
but it didn't seem to hurt either :)


Yes. You should use the validationQuery attribute on your 
element.


Thanks.  After searching Google to find an example (I'm lazy, shoot me!
:-D  ), I added this to my server.xml file.  I also removed the
autoReconnect parameter from the connection URL.  This does appear to
have resolved the issue!

Thanks to you, and to David Smith, for your thoughtful and clear responses!

--
Rob


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Directories in Tomcat 5.5\temp

2008-04-22 Thread Caldarale, Charles R
> From: hezjing [mailto:[EMAIL PROTECTED] 
> Subject: Re: Directories in Tomcat 5.5\temp
> 
> When I look further into these directories, they contain the same (and
> only) JAR files of my web application,
> e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar
> Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar

You must have antiResourceLocking set to "true" for those (or possibly
all) webapps.  Doing so will indeed cause Tomcat to use the temp
directory; however, with a normal Tomcat shutdown, these will be
removed.  Are you terminating Tomcat abnormally, or are you just poking
around while it's running?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Directories in Tomcat 5.5\temp

2008-04-22 Thread Mark Thomas

hezjing wrote:

Hi Chuck

Hmmm ... I don't think my web application is explicitly writting
anything into the directory

When I look further into these directories, they contain the same (and
only) JAR files of my web application,
e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar
Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar


Deployment with the tag option?

Use of the anti-locking attributes?

Mark


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Directories in Tomcat 5.5\temp

2008-04-22 Thread David Smith
I *think* the antiResourceLocking in tomcat may cause this if configured 
in your  element.  Those with better knowledge might want 
to comment further.  Last I know the webapp is copied/expanded to either 
temp or work when it's enabled.


--David

hezjing wrote:

Hi Chuck

Hmmm ... I don't think my web application is explicitly writting
anything into the directory.

When I look further into these directories, they contain the same (and
only) JAR files of my web application,
e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar
Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar


On Tue, Apr 22, 2008 at 11:09 PM, Caldarale, Charles R
<[EMAIL PROTECTED]> wrote:
  

From: hezjing [mailto:[EMAIL PROTECTED]
Subject: Directories in Tomcat 5.5\temp

Can anyone explaines why these directories are created?
  

Your webapps are creating them.



and why these directories are not being clean-up by Tomcat?
  

Tomcat merely provides the workspace for the webapps; usage of it,
including any desired cleanup, is up to the webapps.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat is not rendering JSP content on Port 80

2008-04-22 Thread BeasC

My intent is to have an Apache + JK + Tomcat server that uses apache only to
service static web content and and sends all dynamic content to Tomcat (so
that it handles all the JSP).  I downloaded and installed Apache 2.2, Tomcat
6.0, and J2SE 1.5 (Becuase j2se 1.6 was buggy and giving problems).  When
initially configuring the server, I included the following lines in the
Apache HTTPD.conf file:

LoadModule jk_module modules/mod_jk-1.2.26-httpd-2.2.4.so

and in Tomcat I included:



and



Basing most of the tutorials I have read about setting up this type of
servers, I thought this steps were sufficient to enable the server to work
in the above descirbed way.  It appears, however, that I am missing
something...  

-Carl
 

Alan Chaney wrote:
> 
> The effect you are observing is because you have configured your setup 
> to have the jsp files in the path of the document root for apache. 
> Apache knows nothing about jsp files so it is just returning the source 
> to you.
> 
> You have not specified O/S, JVM or Apache or Tomcat version.
> 
> You might like to read the tomcat documentation before going any further:
> 
> http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html
> 
> would be a good place to start if you intend to use apache + tomcat, 
> together with
> 
> http://tomcat.apache.org/tomcat-6.0-doc/connectors.html
> 
> if you want to configure your version of tomcat to directly serve port 
> 80 and not use apache at all.
> 
> A 'tomcat only' installation working with port 80 can easily be 
> configured in Windows using the control panel (or so I believe as I 
> don't use Windows myself). For a linux setup there are some additional 
> complications - see:
> 
> http://commons.apache.org/daemon/index.html
> 
> to avoid running tomcat as root.
> 
> Also you may find looking at archives of this list helpful.
> 
> 
> If you can't find the answers in the above and generally,
> 
> http://tomcat.apache.org/connectors-doc/index.html
> 
> then maybe you could specify your system more clearly and I'm sure 
> people will be able to give you more specific help.
> 
> 
> Alan Chaney
> 
> 
> 
> 
> 
> 
> 
> 
> 
> BeasC wrote:
>> I can get Tomcat to render JSP content if I try to (for example) access
>> the
>> JSP installation examples using http://localhost:8080/examples/jsp  But
>> when
>> I try to try http://localhost/examples/jsp I get nothing but the raw html
>> code of the page (of a specific example).
>> I have an Apache - Tomcat server, and Apache is listening on port 80
>> (Which
>> is the default port used when accessing the server using its IP address.
>> Tomcat has the following code lines in its server.xml file, that I think
>> might serve as reference point to what I'm talking about:
>> 
>> 
>> 
>> and
>> 
>> >connectionTimeout="2" 
>>redirectPort="8443" /> 
>> 
>> Any help would be greatly appreciated.
>> 
>> -Carl
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Tomcat-is-not-rendering-JSP-content-on-Port-80-tp16817685p16824726.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Directories in Tomcat 5.5\temp

2008-04-22 Thread hezjing
Hi Chuck

Hmmm ... I don't think my web application is explicitly writting
anything into the directory.

When I look further into these directories, they contain the same (and
only) JAR files of my web application,
e.g. Tomcat 5.5\temp\0-myapp\WEB-INF\lib\*.jar
Tomcat 5.5\temp\1-myapp\WEB-INF\lib\*.jar


On Tue, Apr 22, 2008 at 11:09 PM, Caldarale, Charles R
<[EMAIL PROTECTED]> wrote:
> > From: hezjing [mailto:[EMAIL PROTECTED]
> > Subject: Directories in Tomcat 5.5\temp
> >
> > Can anyone explaines why these directories are created?
>
> Your webapps are creating them.
>
> > and why these directories are not being clean-up by Tomcat?
>
> Tomcat merely provides the workspace for the webapps; usage of it,
> including any desired cleanup, is up to the webapps.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 

Hez

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question on concurrent request to the same servlet

2008-04-22 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dikan

Dikan Xing wrote:
| When two (almost) concurrent requests to the SAME servlet occurs (for
| example, I type the same url in two individual browser window), I
| find that Tomcat seems not to work on the second request until the
| first is done.

This indicates a resource under contention. Are you using a database
connection pool with only one connection in the pool? Or perhaps another
pooled resource with only a single resource to share? Also check for
synchronized blocks of code that may be interfering with each other.

| However, in my situtaion, my servlet should wait for some other
| resources to respond. Those resources are quick-responded, but
| transimssion of requests to & responses from those resources cost
| much time. Therefore, if the servlet could be run (service method be
| called) immediately instead of the previous is done, the total
| response time could be reduced.

Could you be a little more specific? What resources do you need to wait
for, and why it is that sometimes you don't necessarily have to wait?
Tomcat does not impose any prerequisites before calling the service
methods of your servlet that should be waiting around for anything.

| My servlet usually responds in about 15 seconds. My user accepts this
| amount of time, but not 60 seconds. When 5 requests almost
| concurrently occur, currently, the last response will not be
| available until 15*5=75 seconds elapses. This is terrible

I think you have some resource contention that needs to be fixed before
you resort to any asynchronous solutions.

| Is there any option in Tomcat so that I can configurate it to call
| the same servlet service method (doGet, doPost) simultanously instead
| of one by one?

The only Servlet API-related thing here would be using the
SingleThreadModel interface for your servlet. Are you using that?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgOA9kACgkQ9CaO5/Lv0PA3mwCgoDZULGD6PmRlH7WRvqXQ3I5/
xAcAnjtxZdLA+d8VPSHmQQpo/ZrV5ROr
=Oqg/
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Directories in Tomcat 5.5\temp

2008-04-22 Thread Caldarale, Charles R
> From: hezjing [mailto:[EMAIL PROTECTED] 
> Subject: Directories in Tomcat 5.5\temp
> 
> Can anyone explaines why these directories are created?

Your webapps are creating them.

> and why these directories are not being clean-up by Tomcat?

Tomcat merely provides the workspace for the webapps; usage of it,
including any desired cleanup, is up to the webapps.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Why does Tomcat become slow during weekends?

2008-04-22 Thread Peter Crowther
> From: murthy gandikota [mailto:[EMAIL PROTECTED]
> We have a website based on embedded Tomcat with Jboss 4.0.2.
> We noticed that every weekend the Tomcat becomes sluggish.

Backups?  Congestion on the network due to a site that's only accessed heavily 
at weekends?

> We theorized that JVM is busy with garbage collection.
> Is that realistic?

No.  The JVM collects garbage at intervals measured in seconds or minutes, and 
takes milliseconds or seconds.  It also doesn't know about weekends :-).

> Does anyone have any other suggestions?

I'd guess system maintenance of some kind.  Is this on a physical server or a 
virtual one?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Why does Tomcat become slow during weekends?

2008-04-22 Thread murthy gandikota
We have a website based on embedded Tomcat with Jboss 4.0.2. We noticed that 
every weekend the Tomcat becomes sluggish. I mean there are no errors like 
HTTP404. The website simply hangs. We theorized that JVM is busy with garbage 
collection. Is that realistic? Does anyone have any other suggestions?
   
  Thanks
  Murthy

   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Compiling jni/native on Debian Etch

2008-04-22 Thread Andrew Miehs

Dear List,

has anyone else tried to compile apr and the native tomcat libraries  
on etch?


debian40-64:/usr/local/src/tomcat-native-1.1.12-src/jni/native# ./ 
configure --with-apr=/usr/local/apr --with-java-home=/usr/local/java


I get loads of messages including

./configure: line 5472: JAVA_HOME: command not found
./configure: line 5473: JAVA_PLATFORM: command not found
./configure: line 5474: JAVA_OS: command not found
./configure: line 5475: CC: command not found
./configure: line 5476: CFLAGS: command not found
./configure: line 5477: LDFLAGS: command not found
./configure: line 5478: CPPFLAGS: command not found
./configure: line 5479: ac_ct_CC: command not found
./configure: line 5480: EXEEXT: command not found
./configure: line 5481: OBJEXT: command not found
./configure: line 5482: so_ext: command not found
./configure: line 5483: lib_target: command not found
./configure: line 5484: TCNATIVE_LIBNAME: command not found
./configure: line 5485: EXTRA_OS_LINK: command not found
./configure: line 5486: TCNATIVE_EXPORT_LIBS: command not found
./configure: line 5487: TCNATIVE_PRIV_INCLUDES: command not found
./configure: line 5488: TCNATIVE_INCLUDES: command not found
./configure: line 5489: TCNATIVE_LDFLAGS: command not found
./configure: line 5490: TCNATIVE_LIBS: command not found
./configure: line 5491: INCLUDE_RULES: command not found
./configure: line 5492: INCLUDE_OUTPUTS: command not found
./configure: line 5493: LIBOBJS: command not found
./configure: line 5494: LTLIBOBJS: command not found


at the end.

It seems to compile and work - but I am not happy about all the errors  
- and yes, I tried setting 'JAVA_HOME' but this made no difference


COnfused..

Andrew

smime.p7s
Description: S/MIME cryptographic signature


Directories in Tomcat 5.5\temp

2008-04-22 Thread hezjing
Hi

I'm developing and testing application (Tomcat 5.5\webapps\myapp)
using Tomcat 5.5 on Windows XP.

After some times, I notice that there are directories created in Tomcat 5.5\temp
1-myapp, 2-myapp, 3-myapp and etc.

These directories are there even after I restarted Tomcat.

Can anyone explaines why these directories are created?
and why these directories are not being clean-up by Tomcat?


-- 

Hez

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Share session cookie across subdomains

2008-04-22 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Zach,

Zach Cox wrote:
| That's what I was afraid of - that Request class is huge (2600+ lines) and
| has lots of fields (50+) some of which are private.  So if I create a
| Request subclass that accepts another Request in the constructor,
there are
| 2 options:
| 1) initialize as many of the superclass's fields of the new instance as
| possible using values from the passed-in Request
| 2) wrap the passed-in Request & delegate method calls to it (100+ methods)

#2 is what you want to do. The constructor should look like this:

public Request(Request wrapped)
{
~this.wrapped = wrapped;
}

That's it. Every other method should look like this:

public whatever doWhatever(args)
{
~super.doWhatever(args);
}

| #2 is also not a good idea: my new Request subclass is not a true
| wrapper/adapter since I'm overriding one of the methods to get my desired
| behavior (configureSessionCookie).  That method is not called directly,
| rather is a protected method called by a public method so I have to
| pick-and-choose which methods get delegated and which don't, which results
| in state split across two Request objects which gets very confusing and is
| also very error-prone.

Just override the protected method. Protected methods were made to be
overridden. You are doing the exact same thing that is encouraged by the
Servlet API itself (see javax.servlet.http.HttpServletRequestWrapper).

| Overall, I'm going to call the Request API unsuitable for extension and in
| particular, I'm going to say overriding configureCookieSession in a
Request
| subclass is not a viable solution to the cross-subdomain session cookie
| problem.

Okay, happy coding.

| To make Request suitable for extension I can see 2 possible solutions:
| 1) Provide a way to specify the fully-qualified name of my Request
subclass
| in server.xml so Tomcat instantiates that instead of
| org.apache.catalina.connector.Request

You won't have to do this if you modify Request.java directly, which is
what you'll have to do in order to...

| 2) Provide a copy constructor in org.apache.catalina.connector.Request
that
| initializes its state based on the state of the passed-in Request

I'd be careful with this. You might not be able to get some of the
internal state this way.

If I were you, I'd start by submitting a bugzilla enhancement and patch
to achieve #1 above (a way to specify the class name for the request
class). Right now, each connector has "new Request()" hard-coded into
its constructor. This won't be an easy task, as you will have to either
modify the arguments to the connector's constructor (yuck), add a static
class field to specify the Request class to use (and break convention
within the Tomcat code), and in either case you'll have to modify every
connector implementation (or, at least the ones you are currently using)
/and/ any code that interacts with the connectors (because of the new
constructor args, new static field, whatever).

Trust me. Use a Valve even if you don't want to use a wrapper as I
suggest. Otherwise, you have to modify Tomcat code for each release,
which is horribly unmaintainable.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgN6rkACgkQ9CaO5/Lv0PCV6wCfV9Yh/wcd9aksuk1KXEUN1G9z
O2AAnj6c8dkK1x/APNSyCrmLYcPoe1Ef
=Px/z
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SIlly bug creating havoc

2008-04-22 Thread Parag Dhanuka
THanks a ton... had set a very cache for my DB and thts what was causing the
problems now everythig seems fine :)

On Mon, Apr 21, 2008 at 9:12 PM, Hassan Schroeder <
[EMAIL PROTECTED]> wrote:

> On Mon, Apr 21, 2008 at 7:54 AM, Parag Dhanuka <[EMAIL PROTECTED]>
> wrote:
> > I am using an apache server to act as a load balancer to my tomcat
> server...
>
> I don't see anything in that conf about load balancing, but regardless,
>
> >  I pinged tomcat to see if I can connect to it and I saw I could not
>
> it sounds like your app has a problem; I would eliminate the front-end
> stuff and stress-test directly against Tomcat to resolve that first...
>
> FWIW,
> --
> Hassan Schroeder  [EMAIL PROTECTED]
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Parag Dhanuka


Re: Share session cookie across subdomains

2008-04-22 Thread Zach Cox

That's what I was afraid of - that Request class is huge (2600+ lines) and
has lots of fields (50+) some of which are private.  So if I create a
Request subclass that accepts another Request in the constructor, there are
2 options:
1) initialize as many of the superclass's fields of the new instance as
possible using values from the passed-in Request
2) wrap the passed-in Request & delegate method calls to it (100+ methods)

#1 is very error-prone, as many of the set methods in Request do things
other than just setting the instance variable to a new value and in a future
release when Request inevitably changes it will be broken.

#2 is also not a good idea: my new Request subclass is not a true
wrapper/adapter since I'm overriding one of the methods to get my desired
behavior (configureSessionCookie).  That method is not called directly,
rather is a protected method called by a public method so I have to
pick-and-choose which methods get delegated and which don't, which results
in state split across two Request objects which gets very confusing and is
also very error-prone.

Overall, I'm going to call the Request API unsuitable for extension and in
particular, I'm going to say overriding configureCookieSession in a Request
subclass is not a viable solution to the cross-subdomain session cookie
problem.  

To make Request suitable for extension I can see 2 possible solutions:
1) Provide a way to specify the fully-qualified name of my Request subclass
in server.xml so Tomcat instantiates that instead of
org.apache.catalina.connector.Request
2) Provide a copy constructor in org.apache.catalina.connector.Request that
initializes its state based on the state of the passed-in Request

If I'm missing something, please correct me.

Thanks,
Zach




Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Zach,
> 
> Zach Cox wrote:
> | Hi Chris - I thought about doing that, but that existing Request
> | object could have state that my newly created Request will not have -
> | Request does not have a copy constructor and does not wrap another
> | Request object.
> 
> That's why you have to write your own Request class that extends the
> existing Request class, includes a constructor that takes the "wrapped"
> Request, and delegates nearly all operations to this wrapped object.
> 
> | Is it OK to just create a fresh, new, un-initialized Request object &
> | pass it to the next valve in the chain?
> 
> No, you have to do what I have described above.
> 
> - -chris
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkgNCmQACgkQ9CaO5/Lv0PARGACgrCxjxUQfVFqxfjilm/wFeQuk
> RkIAoJEM7Jp45BpuBTuR1+M/N2x8mHIh
> =Dork
> -END PGP SIGNATURE-
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Share-session-cookie-across-subdomains-tp16787390p16823816.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: hs_err_pidPID.log reading

2008-04-22 Thread Caldarale, Charles R
> From: Pop Olimpiu [mailto:[EMAIL PROTECTED] 
> Subject: hs_err_pidPID.log reading
> 
> After following the error logs I found an hs_err_pidPID.log 
> which seams to show me what is the problem

This is a JVM, not Tomcat, problem.  I would try moving to the latest
version of 1.6 and see if the problem persists.  If it does, file a bug
report with Sun, as described in the message you're seeing.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JMXProxy

2008-04-22 Thread Liang Xiao Zhu

Hi everyone,

I want monitoring Tomcat applications below webapps. So I am using JMX 
for to do this. Exactly I am interested in the timing for every process, 
so I am using this 
http://localhost:port/manager/jmxproxy/?query=RequestProcessor for 
extract what I want, I am monitoring /processingTime, /but I dont know 
which one, I mean that there are several /processingTime /for the same 
application. So my question is: which objectName I have to take in 
account for monitoring some applications?


Thanks in advance!!!

Regards


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat context.xml and classpath

2008-04-22 Thread matteof

Hi to all,
I'm currently working on a project that uses a specific oracle driver
version put in common/lib and it cannot be changed at the moment.
The problem is that i have to deploy another application on production
server which datasource (defined in META-INF/context.xml)  doesn't fit very
well with drivers mentioned before.
My question is if it's possible to force a resource to load a  jar from a
specific path and avoid conflicts.

Thanks in advance
Matteo
-- 
View this message in context: 
http://www.nabble.com/Tomcat-context.xml-and-classpath-tp16823801p16823801.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access SQL Server 2005 and 2000 on same machine

2008-04-22 Thread Etienne Giraudy
Probably the answer is just in jTDS FAQ in http://jtds.sourceforge.net/faq.html
Check the answer to "What is the URL format used by jTDS?"

My .2
E-
On 4/22/08, Alexander Diedler <[EMAIL PROTECTED]> wrote:
> No, the Services on the same Port and same IP.
>  SQL Server allow up to 99 Instances on one machine. Only the Instance Name 
> is important to identify the correct Instance. But how I can Access a SQL 
> Server by Instance with Tomcat?
>
>  Alex
>
>
>  
>
>  From: David Smith [mailto:[EMAIL PROTECTED]
>  Sent: Tue 4/22/2008 12:50 PM
>  To: Tomcat Users List
>  Subject: Re: Access SQL Server 2005 and 2000 on same machine
>
>
>
>
>  Ok... how do you get two services on the same port?  Are they bound to
>  different IPs?  They can't both respond on the same address and port.
>
>  --David
>
>  Alexander Diedler wrote:
>  > Hello,
>  > We have installed a SQL 2000 and SQL 2005 Server Express on the same 
> server and same Port (1433)
>  > Now we have no chance to tell the Tomcat in Conf Directory, which SQL 
> Server Version and Database has to be choosen for the Application.
>  > I know, that there are Instance Names like 127.0.0.1\sqlexpress or 
> 127.0.0.1\default but how use it in Tomcat 6.0.14 on Windows 2003 Server?
>  > Here a Example from /conf/Catalina/localhost/root.xml
>  >
>  >   >auth="Container"
>  >type="javax.sql.DataSource"
>  > maxActive="100"
>  > maxIdle="30"
>  > maxWait="1"
>  > username="sa"
>  > password="xxx"
>  > removeAbandoned="true"
>  > removeAbandonedTimeout="60"
>  > logAbandoned="true"
>  > driverClassName="net.sourceforge.jtds.jdbc.Driver"
>  > url="jdbc:jtds:sqlserver://testsqlserver:1433/tecracer4;charset=Cp1252"
>  > />
>  >
>  >
>  >
>  > -
>  > To start a new topic, e-mail: users@tomcat.apache.org
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>
>  -
>  To start a new topic, e-mail: users@tomcat.apache.org
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> -
>  To start a new topic, e-mail: users@tomcat.apache.org
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Access SQL Server 2005 and 2000 on same machine

2008-04-22 Thread Alexander Diedler
No, the Services on the same Port and same IP.
SQL Server allow up to 99 Instances on one machine. Only the Instance Name is 
important to identify the correct Instance. But how I can Access a SQL Server 
by Instance with Tomcat?
 
Alex
 



From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Tue 4/22/2008 12:50 PM
To: Tomcat Users List
Subject: Re: Access SQL Server 2005 and 2000 on same machine



Ok... how do you get two services on the same port?  Are they bound to
different IPs?  They can't both respond on the same address and port.

--David

Alexander Diedler wrote:
> Hello,
> We have installed a SQL 2000 and SQL 2005 Server Express on the same server 
> and same Port (1433)
> Now we have no chance to tell the Tomcat in Conf Directory, which SQL Server 
> Version and Database has to be choosen for the Application.
> I know, that there are Instance Names like 127.0.0.1\sqlexpress or 
> 127.0.0.1\default but how use it in Tomcat 6.0.14 on Windows 2003 Server?
> Here a Example from /conf/Catalina/localhost/root.xml
> 
> auth="Container"
>type="javax.sql.DataSource"
> maxActive="100"
> maxIdle="30"
> maxWait="1"
> username="sa"
> password="xxx"
> removeAbandoned="true"
> removeAbandonedTimeout="60"
> logAbandoned="true"
> driverClassName="net.sourceforge.jtds.jdbc.Driver"
> url="jdbc:jtds:sqlserver://testsqlserver:1433/tecracer4;charset=Cp1252"
> />
> 
> 
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Access SQL Server 2005 and 2000 on same machine

2008-04-22 Thread David Smith
Ok... how do you get two services on the same port?  Are they bound to 
different IPs?  They can't both respond on the same address and port.


--David

Alexander Diedler wrote:

Hello,
We have installed a SQL 2000 and SQL 2005 Server Express on the same server and 
same Port (1433)
Now we have no chance to tell the Tomcat in Conf Directory, which SQL Server 
Version and Database has to be choosen for the Application.
I know, that there are Instance Names like 127.0.0.1\sqlexpress or 
127.0.0.1\default but how use it in Tomcat 6.0.14 on Windows 2003 Server?
Here a Example from /conf/Catalina/localhost/root.xml
 

   auth="Container"
   type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="1"
username="sa"
password="xxx"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://testsqlserver:1433/tecracer4;charset=Cp1252"
/> 
 
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Java VM slowly eats all memory up - without JVM heap OutOfMemory failures!

2008-04-22 Thread Rainer Jung

Stephanie Wullbieter schrieb:

Dear list members,

a tomcat machine has a problem because java eats the memory up. Here some data:

1.555.828 KiB host RAM

java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

Tomcat Version 4.1.31

java ist started with the command /home/tomcatp/prod/java2/bin/java 
-Dtomcat.worker=2 -server -Djava.library.path=/home/tomcatp/prod/dctm5/dfc 
-Xmx768m -verbose:gc -Dcom.sun.jndi.ldap.connect.pool.timeout=6 
-Dcom.sun.jndi.ldap.connect.pool.maxsize=5000 -Djava.awt.headless=true 
-Djava.endorsed.dirs=/home/tomcatp/prod/tomcat4/common/endorsed -classpath 
/home/tomcatp/prod/dctm5/dfc/dfc.jar:/home/tomcatp/prod/dctm5/dfc/bsf.jar:/home/tomcatp/prod/dctm5/dfc/log4j.jar:/home/tomcatp/prod/dctm5/dfc/xalan.jar:/home/tomcatp/prod/dctm5/dfc/xml-apis.jar:/home/tomcatp/prod/dctm5/dfc/workflow.jar:/home/tomcatp/prod/dctm5/dfc/subscription.jar:/home/tomcatp/prod/dctm5/dfc/xforms.jar:/home/tomcatp/prod/dctm5/dfc/All-MB.jar:/home/tomcatp/prod/dctm5/dfc/ci.jar:/home/tomcatp/prod/dctm5/dfc/bpmutil.jar:/home/tomcatp/prod/dctm5/dfc/mail.jar:/home/tomcatp/prod/dctm5/dfc/activation.jar:/home/tomcatp/prod/dctm5/config:/home/tomcatp/prod/java2/lib/tools.jar:/home/tomcatp/prod/tomcat4/bin/bootstr

ap.

 jar -Dcatalina.base=/home/tomcatp/prod/tomcat4 
-Dcatalina.home=/home/tomcatp/prod/tomcat4 
-Djava.io.tmpdir=/home/tomcatp/prod/tomcat4/temp 
org.apache.catalina.startup.Bootstrap start

After e.g. 14 days running (200 application users), the java applications on 
the tomcat get instable, i think due to memory problems because the memory of 
the host gets eaten slowly but constantly up. In the end it looks like this:

free -k
 total   used   free sharedbuffers cached
Mem:   15558281522108  33720  0  71984  78676
-/+ buffers/cache:1371448 184380
Swap:   265064 265064  0

So the host seems to be under memory pressure and it's a question of time that 
it comes to instability.

ps aux
tomcatp  19814  0.7 85.5 1860356 1330700 ? Sl   Apr08 152:48 
/home/tomcatp/prod/java2/bin/java -Dtomcat

The Java VM has no OutOfMemory failures, the JVM usage is about 600 MiB, and 
does not go over 700 MiB (768 MiB JVM Heap).
So it looks like Java VM is using about 700 MiB for itself. Is that normal?

Yesterday the tomcat got problems with one application. So I switched to a 
fallback server and did not restart the tomcat but only reloaded the little 
application that did not work properly anymore. So there were no users anymore 
on that tomcat. And now, after 12h, the memory usage of java is still the same, 
it has not decreased. So what's up there? Why is there no memory freed if the 
applications are not used anymore? When the tomcat is started, java only uses 
300 MiB overall, then it increases constantly.

It would be fine, if someone could help me or give me a tip how to analyze the 
tomcat to get more info what could be the problem.

Could it be a solution to decrease the JVM heap?


Just a shot in the dark (since you are using somewhat old versions of 
everything): there was a bug in java.io.File.deleteOnExit() that lead to 
a leak in native memory. This problem hit a lot of code using 
File.deleteOnExit(), e.g. commons-fileupload and others.


See:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4513817
https://issues.apache.org/jira/browse/FILEUPLOAD-95
http://blogs.sun.com/chegar/#diagnosing_deleteonexit_issues

Regards,

Rainer


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Access SQL Server 2005 and 2000 on same machine

2008-04-22 Thread Alexander Diedler
Hello,
We have installed a SQL 2000 and SQL 2005 Server Express on the same server and 
same Port (1433)
Now we have no chance to tell the Tomcat in Conf Directory, which SQL Server 
Version and Database has to be choosen for the Application.
I know, that there are Instance Names like 127.0.0.1\sqlexpress or 
127.0.0.1\default but how use it in Tomcat 6.0.14 on Windows 2003 Server?
Here a Example from /conf/Catalina/localhost/root.xml
 
 
 
 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: RE: Java VM slowly eats all memory up - without JVM heap OutOfMemory failures!

2008-04-22 Thread Peter Crowther
> From: Stephanie Wullbieter [mailto:[EMAIL PROTECTED]
> SUSE LINUX Enterprise Server 9 (i586)
> Linux-Kernel 2.6.5-7

man strace
man ltrace

Good luck!  I'd use strace as it gives you more information, but ltrace may be 
a faster way of finding open/close mismatches.  Annoyingly, you'll have to 
start Tomcat with strace - you might want to do that on your test system, 
assuming you have one.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RE: Java VM slowly eats all memory up - without JVM heap OutOfMemory failures!

2008-04-22 Thread Stephanie Wullbieter
Thank You for the tip!
The OS is
SUSE LINUX Enterprise Server 9 (i586)
Linux-Kernel 2.6.5-7

> Can you monitor the system calls made by the application over a period of
> time, looking for systematic mismatches between resources that are opened
> and resources that are closed?  I'm not sure which variant of UNIX you're
> running, but most have some way of monitoring a process' system calls.  If
> you have the /proc filesystem on your system, looking through /proc for your
> process may also help.

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TC 5.5: stdout_YYYYMMDD.log gets too big - howto limit/rotate?

2008-04-22 Thread Stephanie Wullbieter
Found this:

How do I rotate catalina.out?
http://www.apache-korea.org/tomcat/faq/misc.html#catalina.out


-- 
Pt! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.net.SocketException: SSL handshake error

2008-04-22 Thread Indu biju
On Tue, Apr 22, 2008 at 10:59 AM, Indu biju <[EMAIL PROTECTED]> wrote:

> Dear All,
>
> I am trying to install SSL certificate for Tomcat
>
> i bought SSL cert from GeoTrust  and configured the domain with https://
>
> But when i try to make a payment with bank, the call returns error. I
> contacted the bank and they said i have to import their verisign certificate
> to my trusted keystore. I did that, and now my keystore has three
> certificates trusted, 2 from verisign and 1 ours. But when i try the payment
> i get an error-- No available certificate corresponds to the SSL cipher
> suites which are enabled.
>
> Please tell me how this can be corrected .
>
> Apr 22, 2008 10:42:48 AM org.apache.tomcat.util.net.PoolTcpEndpoint
> acceptSocket
> SEVERE: Endpoint [SSL: ServerSocket[addr=
> 0.0.0.0/0.0.0.0,port=0,localport=8443]] ignored exception:
> java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException: No
> available certificate corresponds to the SSL cipher suites which are
> enabled.
> java.net.SocketException: SSL handshake errorjavax.net.ssl.SSLException:
> No available certificate corresponds to the SSL cipher suites which are
> enabled.
>  at
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:113)
>  at
> org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:368)
>  at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:549)
>  at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>  at java.lang.Thread.run(Unknown Source)
>
>
> Thanks
>
>
>


RE: Java VM slowly eats all memory up - without JVM heap OutOfMemory failures!

2008-04-22 Thread Peter Crowther
> From: Stephanie Wullbieter [mailto:[EMAIL PROTECTED]
> a tomcat machine has a problem because java eats the memory
> up. Here some data:
>
> 1.555.828 KiB host RAM
>
> java version "1.4.2_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
> Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
>
> Tomcat Version 4.1.31
[...]
> The Java VM has no OutOfMemory failures, the JVM usage is
> about 600 MiB, and does not go over 700 MiB (768 MiB JVM Heap).
> So it looks like Java VM is using about 700 MiB for itself.
> Is that normal?

Sounds like your application is not correctly releasing some operating system 
resource, so the JVM is keeping hold of the resource.  This would cause memory 
to be reserved outside the Java heap but inside the process.  Good candidates 
are: files, threads (which have both a Java stack and a host stack, and it 
might be the host stack not being released), almost anything JNI.  I've no 
doubt there are other possibilities as well!

Can you monitor the system calls made by the application over a period of time, 
looking for systematic mismatches between resources that are opened and 
resources that are closed?  I'm not sure which variant of UNIX you're running, 
but most have some way of monitoring a process' system calls.  If you have the 
/proc filesystem on your system, looking through /proc for your process may 
also help.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Java VM slowly eats all memory up - without JVM heap OutOfMemory failures!

2008-04-22 Thread Stephanie Wullbieter
Dear list members,

a tomcat machine has a problem because java eats the memory up. Here some data:

1.555.828 KiB host RAM

java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

Tomcat Version 4.1.31

java ist started with the command /home/tomcatp/prod/java2/bin/java 
-Dtomcat.worker=2 -server -Djava.library.path=/home/tomcatp/prod/dctm5/dfc 
-Xmx768m -verbose:gc -Dcom.sun.jndi.ldap.connect.pool.timeout=6 
-Dcom.sun.jndi.ldap.connect.pool.maxsize=5000 -Djava.awt.headless=true 
-Djava.endorsed.dirs=/home/tomcatp/prod/tomcat4/common/endorsed -classpath 
/home/tomcatp/prod/dctm5/dfc/dfc.jar:/home/tomcatp/prod/dctm5/dfc/bsf.jar:/home/tomcatp/prod/dctm5/dfc/log4j.jar:/home/tomcatp/prod/dctm5/dfc/xalan.jar:/home/tomcatp/prod/dctm5/dfc/xml-apis.jar:/home/tomcatp/prod/dctm5/dfc/workflow.jar:/home/tomcatp/prod/dctm5/dfc/subscription.jar:/home/tomcatp/prod/dctm5/dfc/xforms.jar:/home/tomcatp/prod/dctm5/dfc/All-MB.jar:/home/tomcatp/prod/dctm5/dfc/ci.jar:/home/tomcatp/prod/dctm5/dfc/bpmutil.jar:/home/tomcatp/prod/dctm5/dfc/mail.jar:/home/tomcatp/prod/dctm5/dfc/activation.jar:/home/tomcatp/prod/dctm5/config:/home/tomcatp/prod/java2/lib/tools.jar:/home/tomcatp/prod/tomcat4/bin/bootstrap.
 jar -Dcatalina.base=/home/tomcatp/prod/tomcat4 
-Dcatalina.home=/home/tomcatp/prod/tomcat4 
-Djava.io.tmpdir=/home/tomcatp/prod/tomcat4/temp 
org.apache.catalina.startup.Bootstrap start

After e.g. 14 days running (200 application users), the java applications on 
the tomcat get instable, i think due to memory problems because the memory of 
the host gets eaten slowly but constantly up. In the end it looks like this:

free -k
 total   used   free sharedbuffers cached
Mem:   15558281522108  33720  0  71984  78676
-/+ buffers/cache:1371448 184380
Swap:   265064 265064  0

So the host seems to be under memory pressure and it's a question of time that 
it comes to instability.

ps aux
tomcatp  19814  0.7 85.5 1860356 1330700 ? Sl   Apr08 152:48 
/home/tomcatp/prod/java2/bin/java -Dtomcat

The Java VM has no OutOfMemory failures, the JVM usage is about 600 MiB, and 
does not go over 700 MiB (768 MiB JVM Heap).
So it looks like Java VM is using about 700 MiB for itself. Is that normal?

Yesterday the tomcat got problems with one application. So I switched to a 
fallback server and did not restart the tomcat but only reloaded the little 
application that did not work properly anymore. So there were no users anymore 
on that tomcat. And now, after 12h, the memory usage of java is still the same, 
it has not decreased. So what's up there? Why is there no memory freed if the 
applications are not used anymore? When the tomcat is started, java only uses 
300 MiB overall, then it increases constantly.

It would be fine, if someone could help me or give me a tip how to analyze the 
tomcat to get more info what could be the problem.

Could it be a solution to decrease the JVM heap?


Many Thanks!

Stephanie
-- 
Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! 
http://games.entertainment.gmx.net/de/entertainment/games/free

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]