RE: Images caching

2006-01-17 Thread Bello Martinez Sergio
Thanks a lot, of course it has helped

> -Mensaje original-
> De:   Rob Gregory [SMTP:[EMAIL PROTECTED]
> Enviado el:   martes, 17 de enero de 2006 19:39
> Para: 'Tomcat Users List'
> Asunto:   RE: Images caching
> 
> Code as requested, Hope this helps mate:-
> 
> 
> package com.my.filters;
> /**
>  * Title:   CacheFilter
>  * Description: This filter sets headers for all requests directed via
> the
>  * filter mappings. This allows the browser to be forced
> to
> use
>  * the cached version of the file. 
> *
>  * Most of the work required by this filter is done via the configuration
> parameters
>  * within the web.xml deployment descriptor as follows:-
>  *
>  * 
>  *  BrowserCache
>  *   com.my.filters.CacheFilter
>  *  
>  *Cache-Control
>  *private,max-age=3600
>  *  
>  *  
>  *Pragma
>  *cache
>  *  
>  * 
>  *
>  * 
>  *  BrowserCache
>  *  *.gif
>  * 
>  * 
>  *  BrowserCache
>  *  *.css
>  * 
>  * 
>  *  BrowserCache
>  *  *.js
>  * 
>  * 
>  * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.42
> **
> **
>  */
> import com.ieseries.core.Constants;
> import java.io.IOException;
> import java.util.Enumeration;
> import javax.servlet.Filter;
> import javax.servlet.FilterChain;
> import javax.servlet.FilterConfig;
> import javax.servlet.ServletException;
> import javax.servlet.ServletRequest;
> import javax.servlet.ServletResponse;
> import javax.servlet.http.HttpServletResponse;
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> 
> /**
>  *  Project Core
>  */
> public class CacheFilter implements Filter {
> 
>   FilterConfig objFilterConfig;
>   
>   // Create a log attribute to allow access to log files
>   private static final Log log = LogFactory.getLog(CacheFilter.class);
>   
>   private static final String VERSION_STRING = CacheFilter.class.getName()
> +
> 
>'/' +
> Constants.VERSION_NUMBER;
> 
>  
>   /**
>* init
>* @param filterConfig the filter configuration object
>*/
>   public void init(FilterConfig filterConfig) {
> this.objFilterConfig = filterConfig;
>   }
> 
>   /**
>* doFilter
>* @param req the ServletRequest object
>* @param res the ServletResponse object
>* @param filterChain the FilterChain
>* @throws IOException
>* @throws ServletException
>*/
>   public void doFilter(ServletRequest req,
>ServletResponse res,
>FilterChain filterChain) throws IOException,
> ServletException {
> if (log.isDebugEnabled()) log.debug("Doing Filter Cache");
> HttpServletResponse response = (HttpServletResponse) res;
> 
> // set the provided HTTP response parameters
> Enumeration enu = objFilterConfig.getInitParameterNames();
> while ( enu.hasMoreElements() ) {
>   String headerName = (String) enu.nextElement();
>   // response.setHeader(headerName,
> objFilterConfig.getInitParameter(headerName));
>   // RG : use addHeader not setHeader so multiple headers can be
> added...
>   if (log.isDebugEnabled()) log.debug("Setting Header : " +
> objFilterConfig.getInitParameter(headerName));
>   response.addHeader(headerName,
> objFilterConfig.getInitParameter(headerName));
> }
> 
> // pass the request/response on to the rest of the filters
> filterChain.doFilter(req, response);
>   }
> 
>   /**
>* toString
>* @return string containing the version information
>*/
>   public String toString() {
> return VERSION_STRING;
>   }  
> 
>   /**
>* destroy
>*/
>   public void destroy() {
> if (log.isDebugEnabled()) log.debug("Destroy Cache Filter");
> this.objFilterConfig = null;
>   }
> 
> 
> }
> 
> 
> 
> 
> 
> 
> -Original Message-
> From: Bello Martinez Sergio [mailto:[EMAIL PROTECTED] 
> Sent: 17 January 2006 07:12
> To: Tomcat Users List
> Subject: RE: Images caching
> 
> Hi Rob Gregory,
> I would thank a lot those code examples about setting headers with
> filters. 
> I've read a lot about this problem yesterday and I've discovered that
> there
> are a
> problem with IE6 images caching, so I'm very interested in the workaround
> you've
> suggested.
> 
> Thanks a lot (thanks to Alex Hyde, too)
> 
> > -Mensaje original-
> > De: Rob Gregory [SMTP:[EMAIL PROTECTED]
> > Enviado el: martes, 17 de enero de 2006 1:12
> > Para:   'Tomcat Users List'
> > Asunto: RE: Images caching
> > 
> > Hey Guys,
> > 
> > We had the exact same issue when last tested for performance and even
> thou
> > the image had not changed the webapp made a request back to the server
> to
> > check... I resolved this by setting headers on the images when they were
> > originally served up by Tomcat (using a servlet filter). I can post code
> > examples if needed.
> > 
> > Hope this helps.
> > Rob Gregory
> > 
> > --

Re: Encrypting/Protecting JSP/Struts source code (UNCLASSIFIED)

2006-01-17 Thread Nikola Milutinovic

Rob Gregory wrote:


Good comments, but how would you encrypt the config files when Struts needs
these to run out code (hence before I can decrypt). While I personally
prefer Cocoon over struts these are pretty much 'Sister' projects so the
same solution would help me also.
 



This is a valid question. You would have to override some of Struts 
functionality, locate where it loads config files and add a hook for 
decryption. Not a trivial task, but should not be impossible. The 
biggest issue with this is that by doing so, you're creating your own 
Struts port/branch and you would have to maintain it plus all upgrades. 
Switching over to a newer release of Struts would require you to build 
your Struts again, with the your changes.


Not something I would recomend. And again, it is not impossible to 
crack. In my oppinion, it is not worth the time, unless your securtity 
requirements are really high. But then, the machine's security is 
probably more important than encrypting config files.


Nix.

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



Re: Database Connectivity of JSP(Tomcat 4.x) with Oracle 8i

2006-01-17 Thread Anto Paul
On 1/18/06, gupta vidhi <[EMAIL PROTECTED]> wrote:
> hello,
>
>   i'm using jakarta-tomcat-4.1.31and jdk-1_5_0_02-windows-i586-p-iftw in WIN 
> 2000 Professional.
>   I wish to connect Oracle 8.0(plus) with JSP pages.
>   i request you to kindly tell me how to do this?

If you are learning JSP you can connect to a database using JDBC. It
is same as using JDBC in any other java application. What you should
take care is to put the JDBC driver library in the WEB-INF\lib
directory of the application so that Tomcat sees it.

--
rgds
Anto Paul

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



Database Connectivity of JSP(Tomcat 4.x) with Oracle 8i

2006-01-17 Thread gupta vidhi
hello,
   
  i'm using jakarta-tomcat-4.1.31and jdk-1_5_0_02-windows-i586-p-iftw in WIN 
2000 Professional.
  I wish to connect Oracle 8.0(plus) with JSP pages. 
  i request you to kindly tell me how to do this?
   
  Regards,
  Vidhi


-
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
whatever.

Classes in tomcat/common cannot load org.apache.catalina.*

2006-01-17 Thread Ken Johanson

Hello,

I'm looking for a way to be able to load classes in org.apache.catalina, 
like in Yoav Shapira's Tomcat Realm example ( 
http://wiki.apache.org/tomcat/HowTo#head-42e95596753a1fa4a4aa396d53010680e3d509b5 
).


The problem is, when my compiled classes (which wrap that entire 
operation) are packaged and placed into 'common', I get a 
NoClassDefFoundError: org/apache/catalina/ServerFactory.


Is there a config that will allow that classloader to access the 
server's libs?


I *can* load the server libs if I place the same wrapper class into the 
webapp's classloader, and have privileged=true for the host's context... 
however this is less than ideal since I would like for the class to be 
available to all webapps (when the privileged=true privilege is granted).


Thanks,
ken



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



Can I Use Tomcat with VXWorks ?

2006-01-17 Thread praveen.mar

Hello All,

Can Tomcat run on VXWorks ?   My requirement is to run JSP/Servlets on
VXWorks.   Can any one help?

Regards,
Praveen .P
* ESN 6877-5367
* +91-80-28520408 extn. 82335
*  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]> 





The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

Re: Does tomcat 5.0 officially support JDK1.5?

2006-01-17 Thread HuangHao



--- HuangHao <[EMAIL PROTECTED]> wrote:

i folks,


I am going to run Tomcat 5.0.* with JDK 1.5, I wonder whether Tomcat 5 officially support 
JDK1.5 yet. I found in Apache site 
 that "Tomcat 5 
has been extensively tested with JDK 1.3.1 as well as JDK1.4.2, and the latter is 
recommended.", but can't find anything about jdk1.5. could you please give me some guide 
or references,thanks in advance. Hewitt
  

For 1.5 specific things you'll need to be using Tomcat
5.5.x

Wade

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


Thanks. As a requirement, my application need to support both Tomcat 5.0 
and 5.5. But my application requires JDK1.5 for some reason. I 
understand it is OK with JDK1.5+Tomcat5.5, but I want to make sure 
JDK1.5+Tomcat 5.0 can work too.  I can start  Tomcat 5.0 with  JDK1.5 
but that can't be regarded as a fully support certificate.


Does apache has official announcement about this issue?

Thanks

Hao


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



tomcat 5 and cgi execution

2006-01-17 Thread Linda Solomon

Hi,

I am upgrading from tomcat 4 to tomcat 5.

I have a combination of java apps, applets and cgi programs written in 
perl and c++.

My web-application worked just fine with tomcat 4.

I followed the instructions for configuring tomcat 5 for cgi.
However, tomcat 5 contains a new xml variable:
executable - The of the executable to be used to run the script. Default 
is perl.


Using the default allows the perl cgis to work fine, but the c++ cgi's 
do not work.
Changing the executable value to /bin/csh or /bin/sh and none of the 
cgi's work.

Perhaps because the environment isn't set?

What are my choices for the executable parm?
What value will make my perl scripts AND c++ programs work?

Thanks,

Linda




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



Re: Does tomcat 5.0 officially support JDK1.5?

2006-01-17 Thread Wade Chandler
--- HuangHao <[EMAIL PROTECTED]> wrote:

> Hi folks,
> > I am going to run Tomcat 5.0.* with JDK 1.5, I
> wonder whether Tomcat 5
> > officially support JDK1.5 yet. I found in Apache
> site
> >
>

> > that "Tomcat 5 has been extensively tested with
> JDK 1.3.1 as well as JDK
> > 1.4.2, and the latter is recommended.", but can't
> find anything about
> > jdk1.5.
> > could you please give me some guide or references,
> thanks in advance.
> >
> > Hewitt
> 
For 1.5 specific things you'll need to be using Tomcat
5.5.x

Wade

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



Does tomcat 5.0 officially support JDK1.5?

2006-01-17 Thread HuangHao
Hi folks,
> I am going to run Tomcat 5.0.* with JDK 1.5, I wonder whether Tomcat 5
> officially support JDK1.5 yet. I found in Apache site
> 
> that "Tomcat 5 has been extensively tested with JDK 1.3.1 as well as JDK
> 1.4.2, and the latter is recommended.", but can't find anything about
> jdk1.5.
> could you please give me some guide or references, thanks in advance.
>
> Hewitt

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



Re: problem with tomcat and SSL

2006-01-17 Thread Jack
I have post the solution for this, its title: "solution for ssl on tomcat"
dated 2005.12.30

You should have found it if you spent a little bit effor to search the 
answer.




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



Re: I can't install TomCat in my computer

2006-01-17 Thread Glen Mazza

Patricio wrote:


In logs folder of Tomcat 5.5 I have this messages:

This release of Apache Tomcat was packaged to run on J2SE 5.0 
or later. It can be run on earlier JVMs by downloading and 
installing a compatibility package from the Apache Tomcat 
binary download page.




It appears you're not using J2SE 5.0 on your machine.  Best to download 
it from the Sun site.


Next time, also best to "ask questions the smart way":  Let us know the 
machine you're running (Win/Linux, etc.), the version of Tomcat, the 
version of J2SE, and what you're precisely doing to start up Tomcat. 
Much of this information you provided after being asked, but your 
original "I can't get Tomcat to work" is just too vague for 
troubleshooting, and results in fewer people able to help you out.


Regards,
Glen

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



Re: UTF-8 JavaScript and HTML Files

2006-01-17 Thread Erik Onnen

Rob Gregory wrote:

I don't have the time to fully understand your question (time for bed) but
after scanning your issues this post may help:-

Topic regarding UTF-8 vs ISO encoding
http://wiki.apache.org/tomcat/Tomcat/UTF-8

Sorry if I'm really off topic but the linked document is small and
interesting as to why it's needed...

Hope it helps.
Rob



Thanks for trying to help Rob, per my original post I've implemented all 
points in this post and then some. From the original post:


The current configuration:

1) Not using APR, sendfile should not be an issue
2) My locale is set: "export LC_ALL=en_US.utf8"
3) File encoding is set for the JDK: "-Dfile.encoding=UTF-8"
4) contextDefaultEncoding is set to "UTF-8" in the global web.xml
5) I've created a Filter to explicitly set the type as per: 
http://wiki.apache.org/tomcat/Tomcat/UTF-8


-- added per Mark's suggestion --

6) Added fileEncoding to init-param of DefaultServlet

-erik


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



RE: UTF-8 JavaScript and HTML Files

2006-01-17 Thread Rob Gregory
I don't have the time to fully understand your question (time for bed) but
after scanning your issues this post may help:-

Topic regarding UTF-8 vs ISO encoding
http://wiki.apache.org/tomcat/Tomcat/UTF-8

Sorry if I'm really off topic but the linked document is small and
interesting as to why it's needed...

Hope it helps.
Rob

-Original Message-
From: Erik Onnen [mailto:[EMAIL PROTECTED] 
Sent: 18 January 2006 00:42
To: Tomcat Users List
Subject: Re: UTF-8 JavaScript and HTML Files

Thanks for the suggestion, Mark. I hadn't tried that yet and I wasn't 
sure what exactly was serving the static content so your suggestion will 
help me get further on my own. Unfortunately, I'm still seeing the same 
problem after the suggested change. Perhaps I need to undo some of my 
previous changes?

In doing some additional testing, I can confirm that the problem does 
not present on MAC OSX or Windows2K3, so it seems to be localized to 
Tomcat(5.029|5.5.14|5.5.15)/SunJDK-1.5.05-b5/(SUSE10|SLES9).

In some additional testing, I've also got files that are saved in 
different encodings such as iso-8859-1 which aren't serving properly 
either. To reduce the number of variables in the equation, I've moved 
from lots of problematic files to two simple test html files, each with 
a meta tag declaring it's proper charset.

Finally, all files serve properly with Jetty6 on the same machine.

-erik

Mark Thomas wrote:
> Erik Onnen wrote:
>> Verified and re-verified, that's why I went the path of configuring
>> multibyte support to begin with.
> Have you changed fileEncoding for the default servlet in conf/web.xml?
> If not, try setting it to UTF-8. It controls the encoding used to read
> static files and defaults to the platform default.
> 
> Mark
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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


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



RE: Encrypting/Protecting JSP/Struts source code (UNCLASSIFIED)

2006-01-17 Thread Rob Gregory
Good comments, but how would you encrypt the config files when Struts needs
these to run out code (hence before I can decrypt). While I personally
prefer Cocoon over struts these are pretty much 'Sister' projects so the
same solution would help me also.

Discussion appreciated.
Rob 

-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] 
Sent: 17 January 2006 21:28
To: Tomcat Users List
Subject: Re: Encrypting/Protecting JSP/Struts source code (UNCLASSIFIED)

Samara, Fadi N Mr ACSIM/ASPEX wrote:

>Classification:  UNCLASSIFIED 
>Caveats: NONE
>-Original Message-
>From: Tom Burke [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, January 17, 2006 10:19 AM
>To: Tomcat Users List
>Subject: Encrypting/Protecting JSP/Struts source code
>
>My company is has developed and is now marketing/selling a line-of-business
>TSP/Tomcat application which we sell to corporate customers to runs on
their
>servers in their intranets.
>
>It's suddenly become clear to my company that when we deploy a WAR on a
>customers' site, the source code is completely visible to anyone who has
>access to the server's drives, and this is belatedly causing some concern.
>Obviously there are clauses in our license that formally protect our
>intellectual property and at a corporate level we are relaxed, but my boss
>is quite concerned about the delinquent administrator who simply downloads
&
>walks away with the code.
>
>Is there any way in which the deployed WAR file, and all the files that
>explode out of it, can be hidden/encrypted/protected on the server, while
>still allowing them to be executed by Tomcat? The app is almost completely
>JSP/Struts, there is hardly any HTML at all (if any in fact).
>  
>

There is some nonsense here, so let us clear it out.

First of all, Java classes are compiled binary entities, no source 
there. Sure, there are tools for reverse engineering, decompilers. You 
can make life harder for them by using obfuscators, I believe Jakarta 
has a good one.

Next, for JSPs, well, yes they are source, but in Struts applications, 
they should have a limited role. Even so, there are JSP precompilers, 
Ant has a task for that. Couple it with an obfuscator and your source is 
unreadable. The only thing that remains are the config files. You could 
theoretically encrypt them, keeping the key inside your code, which will 
get obfuscated, anyway.

Does that satisfy you?

Nix.

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


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



malformed HTTP?

2006-01-17 Thread Patricio Keilty
Hi guys,
i recently tried to migrate my webapps from version 5.5.4 to a brand new 5.5.12
installation, so i just copied original $CATALINA_HOME/conf/server.xml & all
$CATALINA_HOME/webapps to ver 5.5.12 corresponding folders. When i entered the
manager webapp, i started seeing "broken" html, kind of source code view in my
browser window, and also some Response HTTP Header data appended. I first blame
on my FireFox browser, but Mozilla and IE will also show not well formed html,
this made me think tomcat was responding with "malformed" HTTP.
Comparing my old server.xml fine with the one in v5.5.4 binaries, i could see a
difference in  attributes: maxHttpHeaderSize="8192" was not set in
my old config. After adding this attribute value to every Connector boila!, my
browser started showing usual apps list html screen. I cannot conclude this is a
problem with Tomcat Connectors, since i´m no Tomcat expert, just wanted to alert
the list just in case.

Apologises for not providing more detailed info right now, i´m in a hurrybut
i can provide some in case it is needed.

This is my Server Information

Tomcat Version  JVM Version JVM Vendor  OS Name OS Version  
OS Architecture
Apache Tomcat/5.5.121.5.0_04-b05Sun Microsystems Inc.   Windows 2003
5.2 x86


Regards,
--Patricio


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



Re: UTF-8 JavaScript and HTML Files

2006-01-17 Thread Erik Onnen
Thanks for the suggestion, Mark. I hadn't tried that yet and I wasn't 
sure what exactly was serving the static content so your suggestion will 
help me get further on my own. Unfortunately, I'm still seeing the same 
problem after the suggested change. Perhaps I need to undo some of my 
previous changes?


In doing some additional testing, I can confirm that the problem does 
not present on MAC OSX or Windows2K3, so it seems to be localized to 
Tomcat(5.029|5.5.14|5.5.15)/SunJDK-1.5.05-b5/(SUSE10|SLES9).


In some additional testing, I've also got files that are saved in 
different encodings such as iso-8859-1 which aren't serving properly 
either. To reduce the number of variables in the equation, I've moved 
from lots of problematic files to two simple test html files, each with 
a meta tag declaring it's proper charset.


Finally, all files serve properly with Jetty6 on the same machine.

-erik

Mark Thomas wrote:

Erik Onnen wrote:

Verified and re-verified, that's why I went the path of configuring
multibyte support to begin with.

Have you changed fileEncoding for the default servlet in conf/web.xml?
If not, try setting it to UTF-8. It controls the encoding used to read
static files and defaults to the platform default.

Mark


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



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



Re: Any issues with using Access Log Valve in production??

2006-01-17 Thread Tim Funk
It depends. In a nutshell, it shouldn't be a performance issue. Why? Since 
access log writing occurs after the request has been sent to the client- 
there is no performance penalty with respect to the client. *BUT* if all you 
threads are in use then your clients will have a small wait period. But if 
you are running out of workers - you probably have configuration issues.


On CPU starved devices, it might be handy to not use the access log valve.

-Tim

Edmon Begoli wrote:


Hey all,

Can someone tell me if there are any significant performance issues with
using *Access Log Valve on* the heavily used production box?



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



Re: Is the JK Connector the definite one to use as a web connecto r?

2006-01-17 Thread Georg Sauer-Limbach

Chris Mooring wrote:

Thanks for the info. I think unless I can set up virtual directories on the
Tomcat HTTP server, I might be forced into using another webserver and
connector (jk - soon to be jk3 ;)).


What do you mean exactly by "virtual directories"?

If it is something like mapping URL paths to file 
system paths, then you can achieve something with 
Tomcat's


... >


element in server.xml, which maps the virtual 
(URL) 'path' to the physical docBase directory.

Note that 'path' is not limited to one directory
part, ie /urlPath/plus/more is also possible.

Furthermore, inside the web.xml deployment
descriptors you can specify which servlet/JSP is 
invoked for a certain URL pattern. See

 element.

Regards,
Georg

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



JNDI-based c3p0 pool in META-INF/context.xml not releasing resources?

2006-01-17 Thread David Perkowski
I'm running Tomcat 5.5.12 on Mac OS X and have recently switched from  
using a Hibernate-configured DBCP to using a JNDI-configured/owned  
c3p0 pool. I recognize that this may not necessarily be the correct  
place to ask this question, since the problem may be with c3p0, but  
perhaps other users may recognize these problems because c3p0 is  
commonly used with Tomcat.


The problem I have is that when I redeploy my application, which  
itself contains the c3p0 pool  in a META-INF/context.xml  
file, I eventually reach a point -- after 2 or 3 deploys -- where my  
database (PostgreSQL, as it happens) complains about too many clients  
connecting.


I am confident that Hibernate is not involved because the problems  
begin on redeployment, when the pool tries to acquire and validate  
JDBC connections, before Hibernate is given a connection.


Could this perhaps be a failure of Tomcat to un-initialize the pool  
on undeployment (which I perform in my build file using Tomcat's Ant  
tasks, prior to deployment of the new WAR file)? Or perhaps it is a  
failure of c3p0 to release resources when Tomcat asks it to?


I liked that my deployment cycle didn't have to involve restarting  
Tomcat, and I think I can probably solve this by putting the c3p0  
configuration in  in server.xml, but I really  
like that my WAR file is totally self-contained right now. It deploys  
fine the first time, but subsequent deployments (second or third  
time) produce the problem I have outlined here.


Can anyone offer suggestions, or share experiences that could  
illuminate a path forward?


Thanks very much.

David

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



Re:2nd Request: How do you programmatically determine Tomcat Version

2006-01-17 Thread andy gordon
All, 
 
 Surprising no one responded the first time. Looking at the source, I noticed a 
org.apache.catalina.util.ServerInfo class in that does access version 
information but it is local to the server and not available from an MBean. I 
need to access version information over RMI (JSR 160). 
 
 Any suggestions? Should an enhancement request be entered? Does it make sense 
for this kind of information be available from the Service or Server MBean? 
 
 How would you programmatically determine that you were running Tomcat 5.5.9 
versus 5.08 or Tomcat 4.x for instance?  
 
 Any thougts would be helpful? 
 
 Thanks 
 
 Andy Gordon
 
 
  andy gordon <[EMAIL PROTECTED]> wrote:   All, 
  
 Is there are way to determine the version of tomcat that is running from an 
application that is connecting to tomcat via JSR 160 on a local machine. I 
would like to be able to find the tomcat version from an MBean if possible.
  Thank you
   
   
  
  - andy gordon 
  

  
-
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
whatever.



-
Yahoo! Photos – Showcase holiday pictures in hardcover
 Photo Books. You design it and we’ll bind it!

Re: Encrypting/Protecting JSP/Struts source code (UNCLASSIFIED)

2006-01-17 Thread Nikola Milutinovic

Samara, Fadi N Mr ACSIM/ASPEX wrote:

Classification:  UNCLASSIFIED 
Caveats: NONE

-Original Message-
From: Tom Burke [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 10:19 AM

To: Tomcat Users List
Subject: Encrypting/Protecting JSP/Struts source code

My company is has developed and is now marketing/selling a line-of-business
TSP/Tomcat application which we sell to corporate customers to runs on their
servers in their intranets.

It's suddenly become clear to my company that when we deploy a WAR on a
customers' site, the source code is completely visible to anyone who has
access to the server's drives, and this is belatedly causing some concern.
Obviously there are clauses in our license that formally protect our
intellectual property and at a corporate level we are relaxed, but my boss
is quite concerned about the delinquent administrator who simply downloads &
walks away with the code.

Is there any way in which the deployed WAR file, and all the files that
explode out of it, can be hidden/encrypted/protected on the server, while
still allowing them to be executed by Tomcat? The app is almost completely
JSP/Struts, there is hardly any HTML at all (if any in fact).
 



There is some nonsense here, so let us clear it out.

First of all, Java classes are compiled binary entities, no source 
there. Sure, there are tools for reverse engineering, decompilers. You 
can make life harder for them by using obfuscators, I believe Jakarta 
has a good one.


Next, for JSPs, well, yes they are source, but in Struts applications, 
they should have a limited role. Even so, there are JSP precompilers, 
Ant has a task for that. Couple it with an obfuscator and your source is 
unreadable. The only thing that remains are the config files. You could 
theoretically encrypt them, keeping the key inside your code, which will 
get obfuscated, anyway.


Does that satisfy you?

Nix.

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



Re: UTF-8 JavaScript and HTML Files

2006-01-17 Thread Mark Thomas
Erik Onnen wrote:
> Verified and re-verified, that's why I went the path of configuring
> multibyte support to begin with.
Have you changed fileEncoding for the default servlet in conf/web.xml?
If not, try setting it to UTF-8. It controls the encoding used to read
static files and defaults to the platform default.

Mark


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



Any issues with using Access Log Valve in production??

2006-01-17 Thread Edmon Begoli
Hey all,

Can someone tell me if there are any significant performance issues with
using *Access Log Valve on* the heavily used production box?

--
Thank you,
Edmon Begoli
http://blogs.ittoolbox.com/eai/software


RE: Dynamic Datasource Configuration - JNDI read only context

2006-01-17 Thread Rob Gregory
Thanks David,

I appreciate you confirming the read-only status of the Tomcat context. 

Is there a reason for this being readonly as I ideally need to bind
The dynamic source to the standard context (i.e. literally replace any
defined within the context.xml file) as the datasource is used by my own
classes AND xsp's provided by Cocoon and I'm not sure Cocoon can be
configured to obtain connections from the ServletContext. At least I have
something else to 'Google' during my lack of life ;o)

Cheers
Rob

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: 17 January 2006 14:09
To: Tomcat Users List
Subject: Re: Dynamic Datasource Configuration - JNDI read only context

Your results are correct.  The JNDI provided by tomcat is read-only.  
You'll need to put your DataSource object into your own JNDI context or 
store the DataSource in your ServletContext.  Personally I like the idea 
of putting the javax.sql.DataSource object in the ServletContext and 
using it from there as needed.

--David

Rob Gregory wrote:

>Hi Guys and thanks in advance for any pointers.
>
> 
>
>I am running Tomcat 5.5.9 and would like to remove the need to specify
>database configuration details within the context.xml file e.g.
>
> 
>
>  
>name="jdbc/one"
>
>type="javax.sql.DataSource"
>
>username="user"
>
>password="pass"
>
>driverClassName="oracle.jdbc.driver.OracleDriver"
>
>maxIdle="2"
>
>maxWait="5000"
>
>maxActive="50"
>
>validationQuery="SELECT count(*) FROM dual"
>
>url="jdbc:oracle:thin:@server:1521:sid"
>
>  />
>
> 
>
>I need to provide (apache commons db) datasources 'on the fly' and after
>trying every thing I can think of such as trying to register the details
>against JNDI as follows:-
>
> 
>
>  //Hashtable env = new Hashtable();
>   //env.put(Context.INITIAL_CONTEXT_FACTORY,
>"org.apache.naming.java.javaURLContextFactory");
>   //env.put(Context.URL_PKG_PREFIXES, "org.apache.naming");
>   
> 
>//System.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.fscontex
t
>.RefFSContextFactory");
> 
>//System.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.apache.naming.jav
a
>.javaURLContextFactory");
>
>   //System.setProperty(Context.PROVIDER_URL, " 
>file:///tmp");
>   //InitialContext ic = null;
>   Context ic = null;
>   try {
> //ic = new InitialContext(env);  
> ic = new InitialContext();
> 
> if (log.isDebugEnabled()) log.debug("Creating logindb
>references");
> // Construct DriverAdapterCPDS reference
> Reference cpdsRef = new
>Reference("org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS",
>   "org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS",
>null);
> cpdsRef.add(new StringRefAddr("driver", strDriver));
> cpdsRef.add(new StringRefAddr("url", strUrl));
> cpdsRef.add(new StringRefAddr("user",
>objLoginDB.getUsername()));
> cpdsRef.add(new StringRefAddr("password",
>objLoginDB.getPassword()));
> //ic.rebind("java:comp/env/jdbc/cpdslogindb", cpdsRef);
> ic.bind("java:/comp/env/jdbc/cpdslogindb", cpdsRef);
> 
> if (log.isDebugEnabled()) log.debug("Creating connection
>pool");
> // Construct PerUserPoolDataSource reference
> Reference ref = new
>Reference("org.apache.commons.dbcp.datasources.PerUserPoolDataSource",
> 
>"org.apache.commons.dbcp.datasources.PerUserPoolDataSourceFactory", null);
> ref.add(new StringRefAddr("dataSourceName",
>"java:/comp/env/jdbc/cpdslogindb"));
> ref.add(new StringRefAddr("defaultMaxActive",
>Config.getParam("pool.max.active")));
> ref.add(new StringRefAddr("defaultMaxIdle",
>Config.getParam("pool.max.idle")));
> ref.add(new StringRefAddr("defaultMaxWait",
>Config.getParam("pool.max.wait")));
> //ic.rebind("jdbc/" + "logindb", ref); 
> //ic.bind("logindb", ref);
> ic.bind("java:/comp/env/jdbc/logindb", ref);
> 
>   } catch (NamingException ne) {
> log.error("Failed while doing JNDI on connection
logindb");
> log.debug(ne.getMessage(), ne); 
>   }
>
> 
>
>The results of this indicate that the Tomcat Initial Context seems to be
>'READ-ONLY' ??
>
> 
>
>Any pointers into what I am doing wrong are greatly appreciated.
>
> 
>
>Thanks
>
>Rob
>
> 
>
>
>  
>


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


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

Re: UTF-8 JavaScript and HTML Files

2006-01-17 Thread Erik Onnen

Caldarale, Charles R wrote:
From: Erik Onnen [mailto:[EMAIL PROTECTED] 
Subject: UTF-8 JavaScript and HTML Files


1) Not using APR, sendfile should not be an issue
2) My locale is set: "export LC_ALL=en_US.utf8"
3) File encoding is set for the JDK: "-Dfile.encoding=UTF-8"
4) contextDefaultEncoding is set to "UTF-8" in the global web.xml
5) I've created a Filter to explicitly set the type as per: 
http://wiki.apache.org/tomcat/Tomcat/UTF-8


What code set is the file itself stored in?  You might want to verify
that it's UTF-8 as well.

 - Chuck


Verified and re-verified, that's why I went the path of configuring 
multibyte support to begin with.


-erik

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



RE: Images caching

2006-01-17 Thread Rob Gregory
Code as requested, Hope this helps mate:-


package com.my.filters;
/**
 * Title:   CacheFilter
 * Description: This filter sets headers for all requests directed via
the
 * filter mappings. This allows the browser to be forced to
use
 * the cached version of the file. 
*
 * Most of the work required by this filter is done via the configuration
parameters
 * within the web.xml deployment descriptor as follows:-
 *
 * 
 *  BrowserCache
 *   com.my.filters.CacheFilter
 *  
 *Cache-Control
 *private,max-age=3600
 *  
 *  
 *Pragma
 *cache
 *  
 * 
 *
 * 
 *  BrowserCache
 *  *.gif
 * 
 * 
 *  BrowserCache
 *  *.css
 * 
 * 
 *  BrowserCache
 *  *.js
 * 
 * 
 * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.42

 */
import com.ieseries.core.Constants;
import java.io.IOException;
import java.util.Enumeration;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 *  Project Core
 */
public class CacheFilter implements Filter {

  FilterConfig objFilterConfig;
  
  // Create a log attribute to allow access to log files
  private static final Log log = LogFactory.getLog(CacheFilter.class);
  
  private static final String VERSION_STRING = CacheFilter.class.getName() +

   '/' +
Constants.VERSION_NUMBER;

 
  /**
   * init
   * @param filterConfig the filter configuration object
   */
  public void init(FilterConfig filterConfig) {
this.objFilterConfig = filterConfig;
  }

  /**
   * doFilter
   * @param req the ServletRequest object
   * @param res the ServletResponse object
   * @param filterChain the FilterChain
   * @throws IOException
   * @throws ServletException
   */
  public void doFilter(ServletRequest req,
   ServletResponse res,
   FilterChain filterChain) throws IOException,
ServletException {
if (log.isDebugEnabled()) log.debug("Doing Filter Cache");
HttpServletResponse response = (HttpServletResponse) res;

// set the provided HTTP response parameters
Enumeration enu = objFilterConfig.getInitParameterNames();
while ( enu.hasMoreElements() ) {
  String headerName = (String) enu.nextElement();
  // response.setHeader(headerName,
objFilterConfig.getInitParameter(headerName));
  // RG : use addHeader not setHeader so multiple headers can be
added...
  if (log.isDebugEnabled()) log.debug("Setting Header : " +
objFilterConfig.getInitParameter(headerName));
  response.addHeader(headerName,
objFilterConfig.getInitParameter(headerName));
}

// pass the request/response on to the rest of the filters
filterChain.doFilter(req, response);
  }

  /**
   * toString
   * @return string containing the version information
   */
  public String toString() {
return VERSION_STRING;
  }  

  /**
   * destroy
   */
  public void destroy() {
if (log.isDebugEnabled()) log.debug("Destroy Cache Filter");
this.objFilterConfig = null;
  }


}






-Original Message-
From: Bello Martinez Sergio [mailto:[EMAIL PROTECTED] 
Sent: 17 January 2006 07:12
To: Tomcat Users List
Subject: RE: Images caching

Hi Rob Gregory,
I would thank a lot those code examples about setting headers with filters. 
I've read a lot about this problem yesterday and I've discovered that there
are a
problem with IE6 images caching, so I'm very interested in the workaround
you've
suggested.

Thanks a lot (thanks to Alex Hyde, too)

> -Mensaje original-
> De:   Rob Gregory [SMTP:[EMAIL PROTECTED]
> Enviado el:   martes, 17 de enero de 2006 1:12
> Para: 'Tomcat Users List'
> Asunto:   RE: Images caching
> 
> Hey Guys,
> 
> We had the exact same issue when last tested for performance and even thou
> the image had not changed the webapp made a request back to the server to
> check... I resolved this by setting headers on the images when they were
> originally served up by Tomcat (using a servlet filter). I can post code
> examples if needed.
> 
> Hope this helps.
> Rob Gregory
> 
> -Original Message-
> From: ALEX HYDE [mailto:[EMAIL PROTECTED] 
> Sent: 16 January 2006 23:38
> To: Tomcat Users List
> Subject: Re: Images caching
> 
> Hey Bello,
> 
> I'm fairly new to this but don't mind putting my two
> pence worth in. 
> 
> I'm not that sure about the client side but I've heard
> mention of something called Squid which can cache
> static content quite well and would sit as a proxy in
> front of Tomcat. 
> 
> Gluck
> 
> --- Bello Martinez  Sergio <[EMAIL PROTECTED]> wrote:
> 
> > Hi all,
> > I have a web application in Tomcat 5.0 (standalone)
> > that does

Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Leon Rosenberg
No but i have an update on my case, I'm managing to kill the JVM in 60
seconds, with errors in HotSpot compiler:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x002a95fbe300, pid=771, tid=1085610352
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode)
# Problematic frame:
# V  [libjvm.so+0x4fa300]
#

We tried to run the machine with no-smp kernel, same shit, but need
more time to crash. Now we are making a memtest to ensure that it's
not a hardware problem...

However, does anyone knows about any known problems with 64bit versions?
We have some irregularities,
first we are using jdk1.5_06 for amd64 on xeonem64t machines, but sun
says its ok (there is no other intel / linux jdk available also)

second: other communicating vms, before and after the server in
question, are 32 bit, could it be a problem?

regards
Leon


On 1/17/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>
> Did you check if the new parameter (Xms, Xmx)values are registered for
> your service ? (I am not sure how it works on Linux ).
> Here is a similar issue but on Windows platform.
> I am working with 64 bit java on Windows 2003 and 64-bit AMD Opteron
> processor with 16 GB RAM.
> I am getting OOME due to PermGen space. I set the following parameteres in
> my service.bat file :
> JvmXms = 6g  JvmXmx = 6g JvmX = 256mb.
> The problem is when I start the tomcat service it is not taking these
> values.  I checked the windows registry
> and these parameter values are not inserted.  Do you have any idea like
> what might be the problem and
> how to fix these issue ? Any help would be greatly appereciated.
>
> (Note: The same application on 32-bit works just fine .)
>
> Thank you,
> Aparna.
>
>
>
>
>
>
> "Leon Rosenberg" <[EMAIL PROTECTED]>
> 01/17/2006 03:43 AM
> Please respond to
> "Tomcat Users List" 
>
>
> To
> "Tomcat Users List" 
> cc
>
> Subject
> Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?
>
>
>
>
>
>
> On 1/17/06, Tim Funk <[EMAIL PROTECTED]> wrote:
> > Just because you get an OOM error doesn't mean its a heap issue. See the
> faq
> > for details:
> >
> > http://tomcat.apache.org/faq/memory.html#why
> >
> > -Tim
>
> Sure, but when ps shows virtual memory usage of 34 GB, I assume it's a
> memory issue, isn't it?
> P.S. (There is no tomcat involed :-) )
>
> >
> > Leon Rosenberg wrote:
> > > Hi,
> > >
> > > sorry for OT, but since there is so much combined Java experience
> > > here, it's the fastest way of getting an answer.
> > >
> > > We have problems with 64bit java (on amd/debian64, with16GB real
> > > memory). Regardsless how much memory we allow the vm (via -Xmx, -Xms)
> > > it takes all it can (up to 34gb virtual memory, 16Gb real memory).
> > > Since we have more than one VM running on the machine  (5VMs all below
> > > 1Gb ram) we are running in an outofmemory after a day of running.
> > >
> > > Is this a bug? Are there any new undocumented switches for proper
> > > memory configuration?
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>

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



Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Aparna_Maddireddy
Hi,

I am setting the PermGen with JvmX option (JvmX 256mb). 

Thank you,
Aparna




"Peter Lin" <[EMAIL PROTECTED]> 
01/17/2006 09:15 AM
Please respond to
"Tomcat Users List" 


To
"Tomcat Users List" 
cc

Subject
Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?






permgen isn't affected by the normal

-Xms -Xmx

you have to explicitly set the permGen using the proper setting. I forget
the exact syntax at the moment, but it should be archived on the mailing
list.

peter


On 1/17/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
> Did you check if the new parameter (Xms, Xmx)values are registered for
> your service ? (I am not sure how it works on Linux ).
> Here is a similar issue but on Windows platform.
> I am working with 64 bit java on Windows 2003 and 64-bit AMD Opteron
> processor with 16 GB RAM.
> I am getting OOME due to PermGen space. I set the following parameteres 
in
> my service.bat file :
> JvmXms = 6g  JvmXmx = 6g JvmX = 256mb.
> The problem is when I start the tomcat service it is not taking these
> values.  I checked the windows registry
> and these parameter values are not inserted.  Do you have any idea like
> what might be the problem and
> how to fix these issue ? Any help would be greatly appereciated.
>
> (Note: The same application on 32-bit works just fine .)
>
> Thank you,
> Aparna.
>
>
>
>
>



Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Peter Lin
permgen isn't affected by the normal

-Xms -Xmx

you have to explicitly set the permGen using the proper setting. I forget
the exact syntax at the moment, but it should be archived on the mailing
list.

peter


On 1/17/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
> Did you check if the new parameter (Xms, Xmx)values are registered for
> your service ? (I am not sure how it works on Linux ).
> Here is a similar issue but on Windows platform.
> I am working with 64 bit java on Windows 2003 and 64-bit AMD Opteron
> processor with 16 GB RAM.
> I am getting OOME due to PermGen space. I set the following parameteres in
> my service.bat file :
> JvmXms = 6g  JvmXmx = 6g JvmX = 256mb.
> The problem is when I start the tomcat service it is not taking these
> values.  I checked the windows registry
> and these parameter values are not inserted.  Do you have any idea like
> what might be the problem and
> how to fix these issue ? Any help would be greatly appereciated.
>
> (Note: The same application on 32-bit works just fine .)
>
> Thank you,
> Aparna.
>
>
>
>
>


Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Aparna_Maddireddy
Hi,


Did you check if the new parameter (Xms, Xmx)values are registered for 
your service ? (I am not sure how it works on Linux ).
Here is a similar issue but on Windows platform. 
I am working with 64 bit java on Windows 2003 and 64-bit AMD Opteron 
processor with 16 GB RAM.
I am getting OOME due to PermGen space. I set the following parameteres in 
my service.bat file :
JvmXms = 6g  JvmXmx = 6g JvmX = 256mb.
The problem is when I start the tomcat service it is not taking these 
values.  I checked the windows registry 
and these parameter values are not inserted.  Do you have any idea like 
what might be the problem and 
how to fix these issue ? Any help would be greatly appereciated.

(Note: The same application on 32-bit works just fine .)

Thank you,
Aparna.






"Leon Rosenberg" <[EMAIL PROTECTED]> 
01/17/2006 03:43 AM
Please respond to
"Tomcat Users List" 


To
"Tomcat Users List" 
cc

Subject
Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?






On 1/17/06, Tim Funk <[EMAIL PROTECTED]> wrote:
> Just because you get an OOM error doesn't mean its a heap issue. See the 
faq
> for details:
>
> http://tomcat.apache.org/faq/memory.html#why
>
> -Tim

Sure, but when ps shows virtual memory usage of 34 GB, I assume it's a
memory issue, isn't it?
P.S. (There is no tomcat involed :-) )

>
> Leon Rosenberg wrote:
> > Hi,
> >
> > sorry for OT, but since there is so much combined Java experience
> > here, it's the fastest way of getting an answer.
> >
> > We have problems with 64bit java (on amd/debian64, with16GB real
> > memory). Regardsless how much memory we allow the vm (via -Xmx, -Xms)
> > it takes all it can (up to 34gb virtual memory, 16Gb real memory).
> > Since we have more than one VM running on the machine  (5VMs all below
> > 1Gb ram) we are running in an outofmemory after a day of running.
> >
> > Is this a bug? Are there any new undocumented switches for proper
> > memory configuration?
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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





strange problem with extra sessions being created

2006-01-17 Thread Klotz Jr, Dennis
Hello.

This has got to be one of the strangest problems I've ever come across
and I'm running out of ideas. I have two different keystore.ks files.
One causes problems, the other does not. Please read on...

I have configured tomcat to use SSL with a self-signed certificate. One
version of the keystore.ks results in extra http sessions being created
whenever a user connects to our web app. Replace only the keystore.ks
with a different one and everything works as it should - only one http
session is generated.

This is crazy! Why would a keystore.ks make any difference in how many
http sessions get created?

I appreciate any ideas here. 


Sincerely,

-Dennis Klotz


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



Could not find a worker

2006-01-17 Thread Brian_Keats
Using google to find others that have encountered this problem produced 
many hits, but I was unable to find a solution to finding the subject 
error message in the mod_jk.log.  This error message will occur if 
definitions for the 'workers.properties' file is placed inside a 'virtual 
host declaration'.  Perhaps someone could add this as a solution to the 
FAQ as it seems to be a common problem that occurs but not much help is 
provided. 

I'm currently using J-T-C 1.2.15 with Tomcat 5.5.15.  I've tested using 
both apache 1.3.28 and apache 2.0.54 and have found that if the above 
error message occurs it is because mod_jk cannot find the 
workers.properties file.  To solve this place the JkWorkersFile definition 
outside of a  declaration. 



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



Re: Is the JK Connector the definite one to use as a web connecto r?

2006-01-17 Thread Mladen Turk

Chris Mooring wrote:

Hi Mladen,

Thanks for the info. I think unless I can set up virtual directories on the
Tomcat HTTP server, I might be forced into using another webserver and
connector (jk - soon to be jk3 ;)).



Sure, but it only shows that naming is useless, cause
it will be the same codebase as jk is.


I didn't know about that ab command either. That looks pretty useful. 



Huh, 'ab' is something that comes with Apache httpd for
quite some time :)

Regards,
Mladen.

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



RE: Is the JK Connector the definite one to use as a web connecto r?

2006-01-17 Thread Chris Mooring
Hi Mladen,

Thanks for the info. I think unless I can set up virtual directories on the
Tomcat HTTP server, I might be forced into using another webserver and
connector (jk - soon to be jk3 ;)).

I didn't know about that ab command either. That looks pretty useful. 

Thanks mate,
Chris 

-Original Message-
From: Mladen Turk [mailto:] 
Sent: 17 January 2006 16:03
To: Tomcat Users List
Subject: Re: Is the JK Connector the definite one to use as a web connector?

Chris Mooring wrote:
> Hi All,
> 
> I have just read various configuration documents for jk2 and jk. It seems
as
> though support for jk2 is no longer available.
> Is jk the recommended connector to use now? It seems odd...like I am using
a
> previous version. 
>

Right, use jk. In month or so it will be renamed to jk3 so all the
oddity will be lost :)

> Also, I'd still love to hear from anyone about my previous question on
> whether Tomcat's native HTTP server is a better option than using a setup
> such as IIS or Apache and a connector like JK. See my previous e-mail
pasted
> below;
> 

If you don't need a special things from native web server, then using
Tomcat Native will give you much higher performance if you
compare native web server and Tomcat.

Just as an example for ab -n 50 -c xx localhost:// (1k file)
Tomcat + Native: 14600 req/sec
Apache 2.0.54  : 9200 req/sec

What's interesting is that you can replicate that by yourself :)

Regards,
Mladen.



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


Connaught honoured AIM 'Decade of Excellence' Award 

Connaught awarded Partnering Contractor of the Year 2005 

Connaught wins AIM 'Company of the Year' award 2004 

West of England Business of the Year Award Winner 2003 

Why not visit our website http://www.connaught.plc.uk 

Disclaimer: 
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.  If you received
this in error, please contact the sender and delete this message. 

Connaught plc, Head Office 01392 444546 

The presence of this footer indicates that this message has been scanned for
viruses by Network Associates Group Shield

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



Re: Is the JK Connector the definite one to use as a web connector?

2006-01-17 Thread Mladen Turk

Chris Mooring wrote:

Hi All,

I have just read various configuration documents for jk2 and jk. It seems as
though support for jk2 is no longer available.
Is jk the recommended connector to use now? It seems odd...like I am using a
previous version. 



Right, use jk. In month or so it will be renamed to jk3 so all the
oddity will be lost :)


Also, I'd still love to hear from anyone about my previous question on
whether Tomcat's native HTTP server is a better option than using a setup
such as IIS or Apache and a connector like JK. See my previous e-mail pasted
below;



If you don't need a special things from native web server, then using
Tomcat Native will give you much higher performance if you
compare native web server and Tomcat.

Just as an example for ab –n 50 –c xx localhost:// (1k file)
Tomcat + Native: 14600 req/sec
Apache 2.0.54  : 9200 req/sec

What's interesting is that you can replicate that by yourself :)

Regards,
Mladen.



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



Re: Encrypting/Protecting JSP/Struts source code

2006-01-17 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Caldarale, Charles R wrote:
> Read up on servlets and JSPs on the Sun web site (or Google).
> Simplisticaly, servlets are the class files that contain compiled Java
> code for processing client requests.  Normally, JSPs are turned into
> servlets on first reference, but most (all?) development environments
> have a means of pre-compiling them before application deployment.  This
> not only avoids exposure of the source code, it also gets rid of the
> response hiccup that's seen on first reference.

  But, you can decompile class files.

  If you obfuscate them, then it makes it harder to read through the
code, and if it is hard enough it may be that the hacker will go elsewhere.

  JavaME applications are done this way, more for size than security,
but netbeans can easily use an obfuscator.

- --
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDzRUBikQgpVn8xrARA+EZAJ9x2J3UUwpH+as5f1E1GXpQw8VRiQCfQdQ/
AsAT1Mf48qVKRYJ94X2+Ne8=
=io5+
-END PGP SIGNATURE-

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



RE: Is the JK Connector the definite one to use as a web connecto r?

2006-01-17 Thread Chris Mooring

Hi Rémy,

Thanks for the reply. If that is the case, is it possible to set up virtual
directories with Tomcat's native HTTP server? Any hints on what config files
to look in would be appreciated. I did a search on Google and didn't turn up
to much valuable info.

Thanks again for the reply,
Chris

-Original Message-
From: Remy Maucherat [mailto:] 
Sent: 17 January 2006 15:51
To: Tomcat Users List
Subject: Re: Is the JK Connector the definite one to use as a web connector?

On 1/17/06, Chris Mooring <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have just read various configuration documents for jk2 and jk. It seems
as
> though support for jk2 is no longer available.
> Is jk the recommended connector to use now? It seems odd...like I am using
a
> previous version.
>
> Also, I'd still love to hear from anyone about my previous question on
> whether Tomcat's native HTTP server is a better option than using a setup
> such as IIS or Apache and a connector like JK. See my previous e-mail
pasted
> below;
>
> Thanks,
> Chris
>
> Previous question on performance of Tomcat native HTTP server vs
Apache/IIS
> and connectors.
>
> Hi All,
>
> I am trying to determine which will deliver better performance;
> 1) Tomcat's Native HTTP server
>
> 2) IIS or Apache with JK2 connectors

If you have only one server, 1 will be faster and easier to maintain
in almost all situations (proxying, even with a fairly optimized
protocol like AJP, is quite expensive).

--
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

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


Connaught honoured AIM 'Decade of Excellence' Award 

Connaught awarded Partnering Contractor of the Year 2005 

Connaught wins AIM 'Company of the Year' award 2004 

West of England Business of the Year Award Winner 2003 

Why not visit our website http://www.connaught.plc.uk 

Disclaimer: 
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.  If you received
this in error, please contact the sender and delete this message. 

Connaught plc, Head Office 01392 444546 

The presence of this footer indicates that this message has been scanned for
viruses by Network Associates Group Shield

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



RE: Encrypting/Protecting JSP/Struts source code

2006-01-17 Thread Caldarale, Charles R
> From: Tom Burke [mailto:[EMAIL PROTECTED] 
> Subject: Re: Encrypting/Protecting JSP/Struts source code
> 
> what's the file extension of a compiled servlet?

.jsp -> .java -> .class

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is the JK Connector the definite one to use as a web connector?

2006-01-17 Thread Remy Maucherat
On 1/17/06, Chris Mooring <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have just read various configuration documents for jk2 and jk. It seems as
> though support for jk2 is no longer available.
> Is jk the recommended connector to use now? It seems odd...like I am using a
> previous version.
>
> Also, I'd still love to hear from anyone about my previous question on
> whether Tomcat's native HTTP server is a better option than using a setup
> such as IIS or Apache and a connector like JK. See my previous e-mail pasted
> below;
>
> Thanks,
> Chris
>
> Previous question on performance of Tomcat native HTTP server vs Apache/IIS
> and connectors.
>
> Hi All,
>
> I am trying to determine which will deliver better performance;
> 1) Tomcat's Native HTTP server
>
> 2) IIS or Apache with JK2 connectors

If you have only one server, 1 will be faster and easier to maintain
in almost all situations (proxying, even with a fairly optimized
protocol like AJP, is quite expensive).

--
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

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



Re: Encrypting/Protecting JSP/Struts source code

2006-01-17 Thread Tom Burke
Thanks again. Indeed I will read up. But please give me one clue; as I 
say, I'm not the developer - he ought to know all this better than me! - 
what's the file extension of a compiled servlet?


Tom


- Original Message - 
From: Caldarale, Charles R

To: Tomcat Users List
Sent: Tuesday, January 17, 2006 3:43 PM
Subject: RE: Encrypting/Protecting JSP/Struts source code



From: Tom Burke [mailto:[EMAIL PROTECTED]
Subject: Re: Encrypting/Protecting JSP/Struts source code

Well, the JSPs are among the things I am referring to. Showing my
ignorance, is a 'pre-compiled' file a binary file? And how would we
deploy these onto a server?


Read up on servlets and JSPs on the Sun web site (or Google).
Simplisticaly, servlets are the class files that contain compiled Java
code for processing client requests.  Normally, JSPs are turned into
servlets on first reference, but most (all?) development environments
have a means of pre-compiling them before application deployment.  This
not only avoids exposure of the source code, it also gets rid of the
response hiccup that's seen on first reference.

- 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 



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



Re: Encrypting/Protecting JSP/Struts source code

2006-01-17 Thread Mikolaj Rydzewski

Tom Burke wrote:


Is there any way in which the deployed WAR file, and all the files that explode 
out of it, can be hidden/encrypted/protected on the server, while still 
allowing them to be executed by Tomcat? The app is almost completely 
JSP/Struts, there is hardly any HTML at all (if any in fact).
 

You will have to use source code obfuscator, i.e. 
http://java-source.net/open-source/obfuscators


But when it comes to struts you'll have to disable from obfuscating 
class names and public methods (at least  Action.execute and ActionForm 
getters/setters).


Precompiling JSPs IMO doesn' make any good. In theory, JSP has nothing 
to application's bussines logic. So there's no point in preventing 
customer to change them.


--
Mikolaj Rydzewski  <[EMAIL PROTECTED]>
Becomo S.A.
tel. (12) 2927104




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Encrypting/Protecting JSP/Struts source code

2006-01-17 Thread David Smith
In the tomcat workflow, JSPs are first compiled to java source code, and 
then compiled a servlet class.  Pre-compiling takes care of this before 
deployment.  I believe there's an Ant task to do this for you.  In the 
end, all the JSPs and java classes are in compiled binary form that's 
harder although not impossible for a less than honorable admin to 
reverse engineer.


One of the benefits to this is there is no delay on the first request to 
a JSP because the server is compiling it.  That's a big plus even if you 
aren't concerned with releasing source code.


--David

Tom Burke wrote:

Thanks for this tip. I am not the developer, merely an in-house 
administrator who is having an interesting year learning Tomcat & 
MySQL...


Can I ask for some more clarification, please? You say
"If you're referring to your JSPs, you can precompile them and release 
everything

as servlets."

Well, the JSPs are among the things I am referring to. Showing my 
ignorance, is a 'pre-compiled' file a binary file? And how would we 
deploy these onto a server?


Tom


- Original Message - From: Caldarale, Charles R
To: Tomcat Users List
Sent: Tuesday, January 17, 2006 3:25 PM
Subject: RE: Encrypting/Protecting JSP/Struts source code



From: Tom Burke [mailto:[EMAIL PROTECTED]
Subject: Encrypting/Protecting JSP/Struts source code

It's suddenly become clear to my company that when we deploy
a WAR on a customers' site, the source code is completely
visible to anyone who has access to the server's drives, and
this is belatedly causing some concern.



Why are you putting your source code in the .war files?  If you're
referring to your JSPs, you can precompile them and release everything
as servlets.  There are also a variety of cource/class file obfuscators
available for the truly paranoid (try Google).

- Chuck



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




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



Is the JK Connector the definite one to use as a web connector?

2006-01-17 Thread Chris Mooring
Hi All,

I have just read various configuration documents for jk2 and jk. It seems as
though support for jk2 is no longer available.
Is jk the recommended connector to use now? It seems odd...like I am using a
previous version. 

Also, I'd still love to hear from anyone about my previous question on
whether Tomcat's native HTTP server is a better option than using a setup
such as IIS or Apache and a connector like JK. See my previous e-mail pasted
below;

Thanks,
Chris

Previous question on performance of Tomcat native HTTP server vs Apache/IIS
and connectors.

Hi All,

I am trying to determine which will deliver better performance;
1) Tomcat's Native HTTP server

2) IIS or Apache with JK2 connectors

I have read in one book (Professional Apache Tomcat 5 SE - Chapter 11) the
following info;
"Performance-Tomcat is inherently slower than a Web server. Therefore, it is
better for the
Web server to serve up static content, while Tomcat handles the dynamic
content (JSPs
and Servlets). Passing requests for static HTML pages, images, and style
sheets through a
Servlet container written in Java is not as efficient compared to a Web
server."

However, this book was written in 2004. 

The current documentation regarding Tomcat 5.5.x connectors at
 specifies a
contradictory view;
"When using a single server, the performance when using a native webserver
in front of the Tomcat instance is most of the time significantly worse than
a standalone Tomcat with its default HTTP connector, even if a large part of
the web application is made of static files. If integration with the native
webserver is needed for any reason, an AJP connector will provide faster
performance than proxied HTTP. AJP clustering is the most efficient from the
Tomcat perspective. It is otherwise functionally equivalent to HTTP
clustering."

Any ideas on which provides better performance would be appreciated.

Another point to note is that we require virtual directories for various
reasons. Is it possible to set these up using Tomcat's native HTTP server?
If not, this may force the issue of which architecture we use.

Once again, any help is appreciated.

Regards,
Chris



Connaught honoured AIM 'Decade of Excellence' Award 

Connaught awarded Partnering Contractor of the Year 2005 

Connaught wins AIM 'Company of the Year' award 2004 

West of England Business of the Year Award Winner 2003 

Why not visit our website http://www.connaught.plc.uk 

Disclaimer: 
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.  If you received
this in error, please contact the sender and delete this message. 

Connaught plc, Head Office 01392 444546 

The presence of this footer indicates that this message has been scanned for
viruses by Network Associates Group Shield

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



RE: Encrypting/Protecting JSP/Struts source code

2006-01-17 Thread Caldarale, Charles R
> From: Tom Burke [mailto:[EMAIL PROTECTED] 
> Subject: Re: Encrypting/Protecting JSP/Struts source code
> 
> Well, the JSPs are among the things I am referring to. Showing my 
> ignorance, is a 'pre-compiled' file a binary file? And how would we 
> deploy these onto a server?

Read up on servlets and JSPs on the Sun web site (or Google).
Simplisticaly, servlets are the class files that contain compiled Java
code for processing client requests.  Normally, JSPs are turned into
servlets on first reference, but most (all?) development environments
have a means of pre-compiling them before application deployment.  This
not only avoids exposure of the source code, it also gets rid of the
response hiccup that's seen on first reference.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Encrypting/Protecting JSP/Struts source code

2006-01-17 Thread Tom Burke
Thanks for this tip. I am not the developer, merely an in-house 
administrator who is having an interesting year learning Tomcat & 
MySQL...


Can I ask for some more clarification, please? You say
"If you're referring to your JSPs, you can precompile them and release 
everything

as servlets."

Well, the JSPs are among the things I am referring to. Showing my 
ignorance, is a 'pre-compiled' file a binary file? And how would we 
deploy these onto a server?


Tom


- Original Message - 
From: Caldarale, Charles R

To: Tomcat Users List
Sent: Tuesday, January 17, 2006 3:25 PM
Subject: RE: Encrypting/Protecting JSP/Struts source code



From: Tom Burke [mailto:[EMAIL PROTECTED]
Subject: Encrypting/Protecting JSP/Struts source code

It's suddenly become clear to my company that when we deploy
a WAR on a customers' site, the source code is completely
visible to anyone who has access to the server's drives, and
this is belatedly causing some concern.


Why are you putting your source code in the .war files?  If you're
referring to your JSPs, you can precompile them and release everything
as servlets.  There are also a variety of cource/class file obfuscators
available for the truly paranoid (try Google).

- Chuck



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



RE: Encrypting/Protecting JSP/Struts source code

2006-01-17 Thread Caldarale, Charles R
> From: Tom Burke [mailto:[EMAIL PROTECTED] 
> Subject: Encrypting/Protecting JSP/Struts source code
> 
> It's suddenly become clear to my company that when we deploy 
> a WAR on a customers' site, the source code is completely 
> visible to anyone who has access to the server's drives, and 
> this is belatedly causing some concern.

Why are you putting your source code in the .war files?  If you're
referring to your JSPs, you can precompile them and release everything
as servlets.  There are also a variety of cource/class file obfuscators
available for the truly paranoid (try Google).

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Encrypting/Protecting JSP/Struts source code (UNCLASSIFIED)

2006-01-17 Thread Samara, Fadi N Mr ACSIM/ASPEX
Classification:  UNCLASSIFIED 
Caveats: NONE


Which code are you exactly trying to protect ? By struts code, I am assuimg
you mean your classes ? 

-Original Message-
From: Tom Burke [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 17, 2006 10:19 AM
To: Tomcat Users List
Subject: Encrypting/Protecting JSP/Struts source code

My company is has developed and is now marketing/selling a line-of-business
TSP/Tomcat application which we sell to corporate customers to runs on their
servers in their intranets.

It's suddenly become clear to my company that when we deploy a WAR on a
customers' site, the source code is completely visible to anyone who has
access to the server's drives, and this is belatedly causing some concern.
Obviously there are clauses in our license that formally protect our
intellectual property and at a corporate level we are relaxed, but my boss
is quite concerned about the delinquent administrator who simply downloads &
walks away with the code.

Is there any way in which the deployed WAR file, and all the files that
explode out of it, can be hidden/encrypted/protected on the server, while
still allowing them to be executed by Tomcat? The app is almost completely
JSP/Struts, there is hardly any HTML at all (if any in fact).

Tom Burke
Classification:  UNCLASSIFIED 
Caveats: NONE


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



Encrypting/Protecting JSP/Struts source code

2006-01-17 Thread Tom Burke
My company is has developed and is now marketing/selling a line-of-business 
TSP/Tomcat application which we sell to corporate customers to runs on their 
servers in their intranets.

It's suddenly become clear to my company that when we deploy a WAR on a 
customers' site, the source code is completely visible to anyone who has access 
to the server's drives, and this is belatedly causing some concern. Obviously 
there are clauses in our license that formally protect our intellectual 
property and at a corporate level we are relaxed, but my boss is quite 
concerned about the delinquent administrator who simply downloads & walks away 
with the code.

Is there any way in which the deployed WAR file, and all the files that explode 
out of it, can be hidden/encrypted/protected on the server, while still 
allowing them to be executed by Tomcat? The app is almost completely 
JSP/Struts, there is hardly any HTML at all (if any in fact).

Tom Burke

Re: Jsvc memory management experiences

2006-01-17 Thread Marco Rossi
I update my jsvc lauch script with -Xms and -Xmx options, but I have the same 
situation: once the memory has been taken is never released, free memory is 
constantly lowering at a lower rate than before, buf lowering. 

$DAEMON_HOME/bin/jsvc \
-user $TOMCAT_USER \
-home $JAVA_HOME \
-Dcatalina.home=$CATALINA_HOME \
-Djava.io.tmpdir=$TMP_DIR \
-outfile $CATALINA_HOME/logs/catalina.out \
-errfile '&1' \
-Xms128m \
-Xmx256m  \
$CATALINA_OPTS \
-cp $CLASSPATH \
org.apache.catalina.startup.Bootstrap
#
# To get a verbose JVM
#-verbose \
# To get a debug of jsvc. 
#-debug \



-
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
whatever.

Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Eric Rotick
On 1/17/06, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> On 1/17/06, Joost Kraaijeveld <[EMAIL PROTECTED]> wrote:
> > > Sure, but when ps shows virtual memory usage of 34 GB, I assume it's a
> > > memory issue, isn't it?
> > > P.S. (There is no tomcat involed :-) )
> > After a recent update of my Etch (2.6.15-1-amd64-k8-smp )based
> > workstation I suddenly experience memory problems also: overnight, while
> > the system does nothing (other than accepting my email) my swap grows
> > from 0 MB to > 3 GB and the performance of the system is gone (Dual
> > Opteron with 4 GB RAM). Only a MS derived solution (reboot) helps.
> > Redeploying my JBoss application also results in a rise of usage of
> > swap. JBoss refuses to use more than 1 GB, the same for my Eclipse.
> >
> > No solution, just a me-too post
> >
> > (BTW: do you use Sarge or Etch and which kernel?)
>
> uname -a
> Linux amd02 2.6.8-11-em64t-p4-smp #1 SMP Mon Oct 3 00:07:51 CEST 2005
> x86_64 GNU/Linux
>
> more /etc/apt/sources.list
> #deb file:///cdrom/ sarge main
>
> deb http://ftp.de.debian.org/debian-amd64/debian/ stable main
> deb-src http://ftp.de.debian.org/debian-amd64/debian/ stable main
>
> deb http://security.debian.org/ stable/updates main
>
> more /etc/debian_version
> 3.1
>
> It's sarge...
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

The use of ps and top as a way of determining memory use can be
misleading for processes with many threads. Although not totally
accurate, for a process with more than 5 threads the ps or top value
should be divided by the number of threads to get the actual amount of
memory used.

Also, consider that the ps/top value is all memory used by the process
not just the heap.

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



Re: Dynamic Datasource Configuration - JNDI read only context

2006-01-17 Thread David Smith
Your results are correct.  The JNDI provided by tomcat is read-only.  
You'll need to put your DataSource object into your own JNDI context or 
store the DataSource in your ServletContext.  Personally I like the idea 
of putting the javax.sql.DataSource object in the ServletContext and 
using it from there as needed.


--David

Rob Gregory wrote:


Hi Guys and thanks in advance for any pointers.



I am running Tomcat 5.5.9 and would like to remove the need to specify
database configuration details within the context.xml file e.g.



 



I need to provide (apache commons db) datasources 'on the fly' and after
trying every thing I can think of such as trying to register the details
against JNDI as follows:-



 //Hashtable env = new Hashtable();
  //env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.naming.java.javaURLContextFactory");
  //env.put(Context.URL_PKG_PREFIXES, "org.apache.naming");
  


//System.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.fscontext
.RefFSContextFactory");

//System.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.apache.naming.java
.javaURLContextFactory");
   
  //System.setProperty(Context.PROVIDER_URL, " 

file:///tmp");
  //InitialContext ic = null;
  Context ic = null;
  try {
//ic = new InitialContext(env);  
ic = new InitialContext();

if (log.isDebugEnabled()) log.debug("Creating logindb

references");
// Construct DriverAdapterCPDS reference
Reference cpdsRef = new
Reference("org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS",
  "org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS",
null);
cpdsRef.add(new StringRefAddr("driver", strDriver));
cpdsRef.add(new StringRefAddr("url", strUrl));
cpdsRef.add(new StringRefAddr("user",
objLoginDB.getUsername()));
cpdsRef.add(new StringRefAddr("password",
objLoginDB.getPassword()));
//ic.rebind("java:comp/env/jdbc/cpdslogindb", cpdsRef);
ic.bind("java:/comp/env/jdbc/cpdslogindb", cpdsRef);

if (log.isDebugEnabled()) log.debug("Creating connection

pool");
// Construct PerUserPoolDataSource reference
Reference ref = new
Reference("org.apache.commons.dbcp.datasources.PerUserPoolDataSource",

"org.apache.commons.dbcp.datasources.PerUserPoolDataSourceFactory", null);
ref.add(new StringRefAddr("dataSourceName",
"java:/comp/env/jdbc/cpdslogindb"));
ref.add(new StringRefAddr("defaultMaxActive",
Config.getParam("pool.max.active")));
ref.add(new StringRefAddr("defaultMaxIdle",
Config.getParam("pool.max.idle")));
ref.add(new StringRefAddr("defaultMaxWait",
Config.getParam("pool.max.wait")));
//ic.rebind("jdbc/" + "logindb", ref); 
//ic.bind("logindb", ref);

ic.bind("java:/comp/env/jdbc/logindb", ref);

  } catch (NamingException ne) {

log.error("Failed while doing JNDI on connection logindb");
log.debug(ne.getMessage(), ne); 
  }




The results of this indicate that the Tomcat Initial Context seems to be
'READ-ONLY' ??



Any pointers into what I am doing wrong are greatly appreciated.



Thanks

Rob




 




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



RE: Hibernate debugging problem in Tomcat 5.5.12

2006-01-17 Thread Matt Wiseley
Behrang,

You probably have .jar files for Hibernate that don't contain debug
information. If you want to debug the Hibernate code itself, get a
source code distribution and build it with debugging info (see
documentation for the javac ant tag), or just add the source files to
your IDE.

That said, I find it's usually less confusing to assume that libraries
like Hibernate are working, and focus on my code which is more likely
the culprit of a bug. You can do that by simply "stepping over" the
calls to compiled libraries. :)

Matt
 

-Original Message-
From: Behrang Saeedzadeh [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 16, 2006 6:50 PM
To: Tomcat Users List
Subject: Hibernate debugging problem in Tomcat 5.5.12

Hi all,

When I want to debug my Hibernate 3.1/WebWork 2.1.7 Web app (which is
deployed into Tomcat) with IDEA, when I add Hibernate related classes to
the watches, I cannot inspect them and instead I see a red message
reading: "Debug info unavailable..." Does anybody know what's possibly
causing this?

BTW - I can debug my DAO outside Tomcat with no problem.


--
"Science is a differential equation. Religion is a boundary limit" -
Alan Turing

Behrang Saeedzadeh
http://www.jroller.com/page/behrangsa
http://my.opera.com/behrangsa

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


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



Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Leon Rosenberg
On 1/17/06, Joost Kraaijeveld <[EMAIL PROTECTED]> wrote:
> > Sure, but when ps shows virtual memory usage of 34 GB, I assume it's a
> > memory issue, isn't it?
> > P.S. (There is no tomcat involed :-) )
> After a recent update of my Etch (2.6.15-1-amd64-k8-smp )based
> workstation I suddenly experience memory problems also: overnight, while
> the system does nothing (other than accepting my email) my swap grows
> from 0 MB to > 3 GB and the performance of the system is gone (Dual
> Opteron with 4 GB RAM). Only a MS derived solution (reboot) helps.
> Redeploying my JBoss application also results in a rise of usage of
> swap. JBoss refuses to use more than 1 GB, the same for my Eclipse.
>
> No solution, just a me-too post
>
> (BTW: do you use Sarge or Etch and which kernel?)

uname -a
Linux amd02 2.6.8-11-em64t-p4-smp #1 SMP Mon Oct 3 00:07:51 CEST 2005
x86_64 GNU/Linux

more /etc/apt/sources.list
#deb file:///cdrom/ sarge main

deb http://ftp.de.debian.org/debian-amd64/debian/ stable main
deb-src http://ftp.de.debian.org/debian-amd64/debian/ stable main

deb http://security.debian.org/ stable/updates main

more /etc/debian_version
3.1

It's sarge...

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



Pass objects to an embedded server

2006-01-17 Thread Claudio Sanchez
Hi,
I have an application that handles an embedded server instance (this
application start, stop and deploy wars on an embedded server).
Everything works fine, but now I need that some objects of the application
that handles tomcat can be acceded from the deployed wars.
There is a way to do that?
 
Thanks, Claudio.


Re: unpack war

2006-01-17 Thread David Delbecq
Try either of those:
- docBase="Upload-C.war"
manually extract the .war to Upload-C/
Le Mardi 17 Janvier 2006 12:56, [EMAIL PROTECTED] a écrit :
> hi,
> I'm using tomcat-4.1.29 on windows 2000
> I'm trying to change the server.xml to add logging for a context.
> when i add a logger to the context, the war file for the context is not
> getting extracted.
> if i remove this context tag from server.xml the war gets extracted
> successfully so there's no problem in the war file.
> 
> The host tag is as following:
> unpackWARs="true" autoDeploy="true">
> 
> The context tag in server.xml is as following :
>  debug="0" privileged="true">
> 
> prefix="localhost_upload-c_log." suffix=".txt"
>   timestamp="true"/>
> 
> 
> 
> so what's going wrong here.
> 
> regards,
> Mahesh Bhandare
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
David Delbecq
Royal Meteorological Institute of Belgium

-
Pingouins dans les champs, hiver méchant

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



Re: unpack war

2006-01-17 Thread mbhandare

hi
here's the log.
Actually the doc base set is correct still getting the error as directory
does not exist.
The directory is not present as the war has not extracted.
Thanks for your help.


2006-01-17 17:49:51 StandardContext[/Upload-C]: Resources start failed:
java.lang.IllegalArgumentException: Document base ..\webapps\Upload-C does
not exist or is not a readable directory
 at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:193)
 at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3344)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3474)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
 at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
 at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
 at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:700)
 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:324)
 at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
 at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
 at org.apache.commons.digester.Rule.end(Rule.java:276)
 at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
 at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
 at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown

Source)
 at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown

Source)
 at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at org.apache.commons.digester.Digester.parse(Digester.java:1567)
 at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:385)
 at
org.apache.catalina.core.StandardHost.install(StandardHost.java:819)
 at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:442)
 at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:399)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
 at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
 at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
 at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
 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:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

2006-01-17 17:49:51 StandardContext[/Upload-C]: Context startup failed due
to previous errors
2006-01-17 17:49:51 StandardContext[/Upload-C]: Exception during cleanup
after start failed
LifecycleException:  Container StandardContext[/Upload-C] has not been
started
 at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:3658)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3636)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
 at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
 at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
 at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:700)
 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.lan

Re: LOAD BALANCING IN TOMCAT

2006-01-17 Thread Markus Schönhaber
[EMAIL PROTECTED] wrote:
> I am using Tomcat as a service. But since requests pile up quite
> substantially, I'm exploring a way to do clustering of 4 separate Tomcat
> instances, and then do load balancing of the same.
>
> Pls let me know of any inputs on how to do the same.

http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

Regards
  mks

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



LOAD BALANCING IN TOMCAT

2006-01-17 Thread niladri.gupta

Hi

I am using Tomcat as a service. But since requests pile up quite
substantially, I'm exploring a way to do clustering of 4 separate Tomcat
instances, and then do load balancing of the same.

Pls let me know of any inputs on how to do the same.

Regards Niladri





The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

Re: unpack war

2006-01-17 Thread Philipp Jäggi
Hi Mahesha

You can post this message as often as you like but without the containing 
output of catalina.out you will never get an answer.


bye Philipp





[EMAIL PROTECTED] 
01/17/2006 12:56 PM
Please respond to
"Tomcat Users List" 


To
users@tomcat.apache.org
cc

Subject
unpack war






hi,
I'm using tomcat-4.1.29 on windows 2000
I'm trying to change the server.xml to add logging for a context.
when i add a logger to the context, the war file for the context is not
getting extracted.
if i remove this context tag from server.xml the war gets extracted
successfully so there's no problem in the war file.

The host tag is as following:


The context tag in server.xml is as following :


  



so what's going wrong here.

regards,
Mahesh Bhandare


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




Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Joost Kraaijeveld
> Sure, but when ps shows virtual memory usage of 34 GB, I assume it's a
> memory issue, isn't it?
> P.S. (There is no tomcat involed :-) )
> 
> >
> > Leon Rosenberg wrote:
> > > Hi,
> > >
> > > sorry for OT, but since there is so much combined Java experience
> > > here, it's the fastest way of getting an answer.
> > >
> > > We have problems with 64bit java (on amd/debian64, with16GB real
> > > memory). Regardsless how much memory we allow the vm (via -Xmx, -Xms)
> > > it takes all it can (up to 34gb virtual memory, 16Gb real memory).
> > > Since we have more than one VM running on the machine  (5VMs all below
> > > 1Gb ram) we are running in an outofmemory after a day of running.
> > >
> > > Is this a bug? Are there any new undocumented switches for proper
> > > memory configuration?
After a recent update of my Etch (2.6.15-1-amd64-k8-smp )based
workstation I suddenly experience memory problems also: overnight, while
the system does nothing (other than accepting my email) my swap grows
from 0 MB to > 3 GB and the performance of the system is gone (Dual
Opteron with 4 GB RAM). Only a MS derived solution (reboot) helps.
Redeploying my JBoss application also results in a rise of usage of
swap. JBoss refuses to use more than 1 GB, the same for my Eclipse.

No solution, just a me-too post 

(BTW: do you use Sarge or Etch and which kernel?)

-- 
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: [EMAIL PROTECTED]
web: www.askesis.nl 



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



unpack war

2006-01-17 Thread mbhandare
hi,
I'm using tomcat-4.1.29 on windows 2000
I'm trying to change the server.xml to add logging for a context.
when i add a logger to the context, the war file for the context is not
getting extracted.
if i remove this context tag from server.xml the war gets extracted
successfully so there's no problem in the war file.

The host tag is as following:


The context tag in server.xml is as following :


  



so what's going wrong here.

regards,
Mahesh Bhandare


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



Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Leon Rosenberg
On 1/17/06, Tim Funk <[EMAIL PROTECTED]> wrote:
> Just because you get an OOM error doesn't mean its a heap issue. See the faq
> for details:
>
> http://tomcat.apache.org/faq/memory.html#why
>
> -Tim

Sure, but when ps shows virtual memory usage of 34 GB, I assume it's a
memory issue, isn't it?
P.S. (There is no tomcat involed :-) )

>
> Leon Rosenberg wrote:
> > Hi,
> >
> > sorry for OT, but since there is so much combined Java experience
> > here, it's the fastest way of getting an answer.
> >
> > We have problems with 64bit java (on amd/debian64, with16GB real
> > memory). Regardsless how much memory we allow the vm (via -Xmx, -Xms)
> > it takes all it can (up to 34gb virtual memory, 16Gb real memory).
> > Since we have more than one VM running on the machine  (5VMs all below
> > 1Gb ram) we are running in an outofmemory after a day of running.
> >
> > Is this a bug? Are there any new undocumented switches for proper
> > memory configuration?
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Tim Funk
Just because you get an OOM error doesn't mean its a heap issue. See the faq 
for details:


http://tomcat.apache.org/faq/memory.html#why

-Tim

Leon Rosenberg wrote:

Hi,

sorry for OT, but since there is so much combined Java experience
here, it's the fastest way of getting an answer.

We have problems with 64bit java (on amd/debian64, with16GB real
memory). Regardsless how much memory we allow the vm (via -Xmx, -Xms)
it takes all it can (up to 34gb virtual memory, 16Gb real memory).
Since we have more than one VM running on the machine  (5VMs all below
1Gb ram) we are running in an outofmemory after a day of running.

Is this a bug? Are there any new undocumented switches for proper
memory configuration?



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



unpack war

2006-01-17 Thread mbhandare
hi,
I'm using tomcat-4.1.29 on windows 2000
I'm trying to change the server.xml to add logging for a context.
when i add a logger to the context, the war file for the context is not
getting extracted.
if i remove this context tag from server.xml the war gets extracted
successfully so there's no problem in the war file.

The host tag is as following:


The context tag in server.xml is as following :


  



i believe that the problem is in the context tag, so what's going wrong
here.

regards,
Mahesh Bhandare


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



Which option to choose? Tomcats native HTTP server or IIS/Apache with connectors?

2006-01-17 Thread Chris Mooring
Hi All,

I am trying to determine which will deliver better performance;
1) Tomcat's Native HTTP server

2) IIS or Apache with JK2 connectors

I have read in one book (Professional Apache Tomcat 5 SE - Chapter 11) the
following info;
"Performance-Tomcat is inherently slower than a Web server. Therefore, it is
better for the
Web server to serve up static content, while Tomcat handles the dynamic
content (JSPs
and Servlets). Passing requests for static HTML pages, images, and style
sheets through a
Servlet container written in Java is not as efficient compared to a Web
server."

However, this book was written in 2004. 

The current documentation regarding Tomcat 5.5.x connectors at
 specifies a
contradictory view;
"When using a single server, the performance when using a native webserver
in front of the Tomcat instance is most of the time significantly worse than
a standalone Tomcat with its default HTTP connector, even if a large part of
the web application is made of static files. If integration with the native
webserver is needed for any reason, an AJP connector will provide faster
performance than proxied HTTP. AJP clustering is the most efficient from the
Tomcat perspective. It is otherwise functionally equivalent to HTTP
clustering."

Any ideas on which provides better performance would be appreciated.

Another point to note is that we require virtual directories for various
reasons. Is it possible to set these up using Tomcat's native HTTP server?
If not, this may force the issue of which architecture we use.

Once again, any help is appreciated.

Regards,
Chris


Connaught honoured AIM 'Decade of Excellence' Award 

Connaught awarded Partnering Contractor of the Year 2005 

Connaught wins AIM 'Company of the Year' award 2004 

West of England Business of the Year Award Winner 2003 

Why not visit our website http://www.connaught.plc.uk 

Disclaimer: 
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.  If you received
this in error, please contact the sender and delete this message. 

Connaught plc, Head Office 01392 444546 

The presence of this footer indicates that this message has been scanned for
viruses by Network Associates Group Shield

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



Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Leon Rosenberg
I would doubt it's a leak in our application since it runs since 15
month on 32bit java without having an OutOfMemory ever. The services
are started with following script(s):

more startMessagingAndFlirtContactServiceBundle.sh
#!/bin/bash

PATH=/usr/local/java/bin:$PATH
[ -n "$JACORB" ] || JACORB=/opt/jacorb
LIB_PATH=/opt/datingr4/lib
CP=`find app -name '*.jar' -printf :%p``find $LIB_PATH -follow -name '*.jar*' -p
rintf :%p``find $LIB_PATH -follow -name '*.zip' -printf :%p`
java -Xms512m -Xmx512m -Djacorb.config.dir=conf -Djacorb.home=$JACORB
-Djava.endorsed.dirs=$JACORB/lib -classpath
conf:$JACORB/lib/jacorb.jar$CP
-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
de.friendscout.datingr4.startups.StartMessagingAndFlirtContactService
Bundle >logs/startlog 2>logs/starterrors &

we have up to 5 similar services running on a 16 gig machine which
should work. The only memory consuming part are the caches, which are
all based on SoftReferences and are guaranteed to be freed by gc
before an outofmemory is thrown. ps shows the processes using 10 gig
of memory and more on a 64bit machine. Never happend neither on 32bit
system nor with 32bit java on 64bit system.

regards
Leon

On 1/17/06, Reynir Hubner <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
> How much memory is available on the computer when it throws the
> OutOfMemoryError ?
>
> I am sorry to say, but this sounds like a memory leak in your
> application, since the gc should collect loose memory, and not use all
> of it, unless it needs to. You will get out of memory errors, going
> above what's available on your machine, and also going above -Xmx settings.
>
> I have not heard of this as being bug. Does your application run better
> on 32bit systems ?
> Wich version of java do you use ?
>
> bye,
> - -reynir
>
>
> Leon Rosenberg wrote:
> > Hi,
> >
> > sorry for OT, but since there is so much combined Java experience
> > here, it's the fastest way of getting an answer.
> >
> > We have problems with 64bit java (on amd/debian64, with16GB real
> > memory). Regardsless how much memory we allow the vm (via -Xmx, -Xms)
> > it takes all it can (up to 34gb virtual memory, 16Gb real memory).
> > Since we have more than one VM running on the machine  (5VMs all below
> > 1Gb ram) we are running in an outofmemory after a day of running.
> >
> > Is this a bug? Are there any new undocumented switches for proper
> > memory configuration?
> >
> > Thanx in advance
> >
> > regards
> > Leon
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.5 (MingW32)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFDzMwZ19KgIQihNwgRAhudAKC270/PG+h7DcTLxt8uFpD6+xAj3ACfakuT
> L+zdMydPezlmnl0rfAjdi/M=
> =jCsN
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Tomcat 5.5 will not reload exploded applications when a class is recompiled

2006-01-17 Thread Julien Martin
Hello,
I have the following problem: Tomcat 5.5 will not reload exploded
applications when a class is recompiled. Is there any modification to be
applied to Tomcat. Note that my autodeploy attribute is set to true(host)
and that my reloadable attribute is also set to true(context).
Any clue very welcome,
Julien.


Re: [OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Reynir Hubner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,
How much memory is available on the computer when it throws the
OutOfMemoryError ?

I am sorry to say, but this sounds like a memory leak in your
application, since the gc should collect loose memory, and not use all
of it, unless it needs to. You will get out of memory errors, going
above what's available on your machine, and also going above -Xmx settings.

I have not heard of this as being bug. Does your application run better
on 32bit systems ?
Wich version of java do you use ?

bye,
- -reynir


Leon Rosenberg wrote:
> Hi,
> 
> sorry for OT, but since there is so much combined Java experience
> here, it's the fastest way of getting an answer.
> 
> We have problems with 64bit java (on amd/debian64, with16GB real
> memory). Regardsless how much memory we allow the vm (via -Xmx, -Xms)
> it takes all it can (up to 34gb virtual memory, 16Gb real memory).
> Since we have more than one VM running on the machine  (5VMs all below
> 1Gb ram) we are running in an outofmemory after a day of running.
> 
> Is this a bug? Are there any new undocumented switches for proper
> memory configuration?
> 
> Thanx in advance
> 
> regards
> Leon
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDzMwZ19KgIQihNwgRAhudAKC270/PG+h7DcTLxt8uFpD6+xAj3ACfakuT
L+zdMydPezlmnl0rfAjdi/M=
=jCsN
-END PGP SIGNATURE-

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



[OT] 64Bit Java doesn't honour Xmx,Xms settings?

2006-01-17 Thread Leon Rosenberg
Hi,

sorry for OT, but since there is so much combined Java experience
here, it's the fastest way of getting an answer.

We have problems with 64bit java (on amd/debian64, with16GB real
memory). Regardsless how much memory we allow the vm (via -Xmx, -Xms)
it takes all it can (up to 34gb virtual memory, 16Gb real memory).
Since we have more than one VM running on the machine  (5VMs all below
1Gb ram) we are running in an outofmemory after a day of running.

Is this a bug? Are there any new undocumented switches for proper
memory configuration?

Thanx in advance

regards
Leon

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