Singleton memory leak after redeploying.

2005-11-28 Thread kurrele
Hi to everyone!! This is my first email to this list, hope is the correct
one.

I've been analyzing my code with a profiler (JProbe) because I was getting
an
OutOfMemoryException after a few redeploys of my application.

After some tests, it turned out that my static fields were not GCed after
redeploying, getting stuck with the classloader which loaded my classes.

After that, I searched the bugzilla and found
  *Bug# *(Memory Leak in Classloader/Manager deploy/undeploy)*:*
20758http://issues.apache.org/bugzilla/show_bug.cgi?id=20758
where it says that the bug has been FIXED.

I tested it in Tomcat 4.1.24 and 5.0.28 getting the same result (memory leak
in static fields).

I attach here the servlet and singleton of my simple test webapp.

---
public class Test extends HttpServlet
{

MySingleton singleton = MySingleton.getInstance();

public void init(ServletConfig config) throws ServletException
{
super.init(config);

}

public void destroy()
{
singleton = null;
}

protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType(text/html);
PrintWriter out = response.getWriter();
out.println(htmlheadtitleJProbe TEST
singleton/title/headbodybJProbe TEST
singleton/bBR/body/html);
out.close();
}
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException
{
processRequest(request, response);
}

protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException
{
processRequest(request, response);
}
}


-
public class MySingleton
{

private static MySingleton _instance = new MySingleton();

public byte[] _charWidths = new byte[1024*1024];  // 1Meg mem
allocation!!.

private MySingleton()
{}

public static MySingleton getInstance()
{
return _instance;
}

public void finalize()
{
System.out.println(!!! END-MySingleton !!!);
_instance = null;
}
}


-

After redeploying this simple webapp a 1Meg leak can be found due to
MySingleton not being GCed.

Please I want to know If I'm leaving out something, the bug is not really
fixed or I need to take another approach.

Thanks.

 Juan F. S. (Spain).


How to set the admin console for 5.5.x

2005-11-28 Thread N S, Shridhar
Hi All,

I am having trouble setting up the admin console for Apache Tomcat/5.5.12. I
have downloaded the apache-tomcat-5.5.12-admin.zip file from Tomcat site.
Unzipped it and placed the admin folder under C:\Tomcat55\server\webapps
folder. When I try the below page:
http://localhost/admin/

I get the admin log in page. I enter admin and admin as
username/password as defined in tomcat-users.xml file. Next page displays:
Tomcat's administration web application is no longer installed by default.
Download and install the admin package to use it.

Any hepl is greatly appreciated.

Thank you.

Regards,
Shridhar


heap size problems (speed)

2005-11-28 Thread Cristian
Hello,

 I have an instance of tomcat with APR support which is set to allocate
more heap memory than default (by passing -Xmx512M option to JAVA_OPTS
in catalina.sh).

 Under this instance runs a test application which gets data from a
database and makes a cache with the fetched data (around 350M). When the
app is accessed it is supposed to return data from the cache (which is
in a form of a hashmap) faster than getting it from the database.

After the caching is done the application responds extremely slow and
above this many images aren't loaded or they are loaded partially in the
browser (I haven't checked to see if the images are the only ones that
are not loaded).

The system:
= Kernel: Linux server2 2.6.14-1.1637_FC4 #1 Wed Nov 9 18:19:37 EST 2005
i686 athlon i386 GNU/Linux

= Processor: AMD Duron 1000MHz

= Tomcat: 5.5.12 with APR 1.2.2 (compiled apart from apr-0.9.6-3.1 which
is in the distrib)

= RAM: 1G


The system has all updates.

I am not the one who wants the test so don't blame me for any stupidity
that you might found in this scenario :).

I get the same results on a different machine which is much faster and
has twice as much memory than this one from the test.

Thanks,
Cristian




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



Which ISAPI Filter?

2005-11-28 Thread Sue Roe
Hello

I have been asked to migrate a Java Web application to a Windows 2003
Server machine, running IIS 6. The application has been running fine on
Windows 2000 for about 18 months, with Tomcat 4.1 and with
isapi_redirect.dll up and running on IIS 5.

I decided not to upgrade to Tomcat 5, but see if I could get it all
running with Tomcat 4.1 and the same isapi filter, isapi_redirect.dll.
Although it looks like IIS 6 is picking the filter up (I have a green
arrow in IIS 6) the application start page is not being found when I try
to access it through post 80. I can find it if I go to Tomcat direct
(8080). 

Can anyone tell me if they have installed Tomcat 4.1 onto Windows 2003,
with IIS 6 and if so, do I need to install Isapi_redirect2.dll rather
than Isapi_redirect.dll? 

If I do need Isapi_redirect2.dll does anyone have the download page URL?
I can't seem to find it on the Jakarta Apache site!

Any tips gratefully received.

Many thanks

Sue Roe



***Disclaimer***

The contents of this Email may be privileged and are confidential. If you are 
not the intended recipient, any disclosure, copying, distribution or any action 
taken or omitted to be taken in reliance on it, is prohibited and may be 
unlawful.

Should you wish to use Email as a mode of communication, CMi plc and its 
subsidiaries are unable to guarantee the security of Email content outside of 
our own computer systems.

This footnote also confirms that this Email message has been checked by 
MIMESweeper for the presence of computer viruses. Whilst we run anti-virus 
software, you are solely responsible for ensuring that any Email or attachment 
you receive is virus free. We disclaim any liability for any damage you suffer 
as a consequence of receiving any virus.

Checkmate International plc (CMi)
Registered in England No: 1899857
Registered Office 4th Floor, 35 New Bridge Street, London, EC4V 6BW


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



heap size problems (speed) [2]

2005-11-28 Thread Cristian
Although it may seem obvious what is the problem, I forgot to ask the
question so I'm doing it now:

What could be the problem in the below described situation ?

I would appreciate if you point some docs that I should read to solve
the issue.

Thanks again,
Cristian

Original message follows:

Hello,

 I have an instance of tomcat with APR support which is set to allocate
more heap memory than default (by passing -Xmx512M option to JAVA_OPTS
in catalina.sh).

 Under this instance runs a test application which gets data from a
database and makes a cache with the fetched data (around 350M). When the
app is accessed it is supposed to return data from the cache (which is
in a form of a hashmap) faster than getting it from the database.

After the caching is done the application responds extremely slow and
above this many images aren't loaded or they are loaded partially in the
browser (I haven't checked to see if the images are the only ones that
are not loaded).

The system:
= Kernel: Linux server2 2.6.14-1.1637_FC4 #1 Wed Nov 9 18:19:37 EST 2005
i686 athlon i386 GNU/Linux

= Processor: AMD Duron 1000MHz

= Tomcat: 5.5.12 with APR 1.2.2 (compiled apart from apr-0.9.6-3.1 which
is in the distrib)

= RAM: 1G


The system has all updates.

I am not the one who wants the test so don't blame me for any stupidity
that you might found in this scenario :).

I get the same results on a different machine which is much faster and
has twice as much memory than this one from the test.

Thanks,
Cristian


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



Re: How to set the admin console for 5.5.x

2005-11-28 Thread N S, Shridhar
Hi Richard,

Firstly, thanks for the reply.

I have placed it under:
$CATALINA_HOME/server/webapps folder as indicated.

I get the login page for admin console, but after that I am getting the
error message.

Further help is appreciated.

Thank you.

Regards,
Shridhar

On 11/28/05, Richard Mixon [EMAIL PROTECTED] wrote:

 Shridhar,

 You have placed it in the wrong directory structure. Look at the paths in
 the zip/tar file - they show you the correct location. It is mostly under
 server/webapps - not webapps.

 HTH - Richard

  -Original Message-
  From: N S, Shridhar [mailto:[EMAIL PROTECTED]
  Sent: Monday, November 28, 2005 2:49 AM
  To: users@tomcat.apache.org
  Subject: How to set the admin console for 5.5.x
 
  Hi All,
 
  I am having trouble setting up the admin console for Apache
  Tomcat/5.5.12. I have downloaded the
  apache-tomcat-5.5.12-admin.zip file from Tomcat site.
  Unzipped it and placed the admin folder under
  C:\Tomcat55\server\webapps
  folder. When I try the below page:
  http://localhost/admin/
 
  I get the admin log in page. I enter admin and admin as
  username/password as defined in tomcat-users.xml file. Next
  page displays:
  Tomcat's administration web application is no longer
  installed by default.
  Download and install the admin package to use it.
 
  Any hepl is greatly appreciated.
 
  Thank you.
 
  Regards,
  Shridhar
 


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




RE: Tomcat stops responding

2005-11-28 Thread Allistair Crossley
That's an awful lot of processes. Quite possibly a problem with the
driver you are using ... It's not very well rated. 

If you want some advice, try using a non-DBCP pool (C3P0)
sourceforge.net/projects/c3p0, and also the best SQL Server driver out
there which is at jtds.sourceforge.net.

Add both c3p0 and jtds jars to your common/lib and redefine your
Resource as follows;

Resource 
name=jdbc/dbase 
auth=Container 
driverClass=net.sourceforge.jtds.jdbc.Driver 
minPoolSize=25 maxPoolSize=50 
acquireIncrement=1 
user=sa password=Abuja5^ 
factory=org.apache.naming.factory.BeanFactory 
type=com.mchange.v2.c3p0.ComboPooledDataSource 
jdbcUrl=jdbc:jtds:sqlserver://localhost:1433/dbase 
/


Restart SQL Server and Tomcat and see how you get on.

Allistair.

-Original Message-
From: Kamalmeet Singh [mailto:[EMAIL PROTECTED] 
Sent: 28 November 2005 12:12
To: Tomcat Users List
Subject: Tomcat stops responding

Hi,

 

I am facing a problem with tomcat 5.5. After working smoothly for
sometime(3-4 days), the server stopped working and resumed only after a
Tomcat restart. It stopped connecting to database. The same behavior was
observed twice.

 

The exception thrown was:

 

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
establishing socket.

at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)

at
com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at
com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at
com.microsoft.jdbc.sqlserver.tds.TDSConnection.init(Unknown Source)

at
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)

at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)

at com.microsoft.jdbc.base.BaseConnection.open(Unknown
Source)

at com.microsoft.jdbc.base.BaseDriver.connect(Unknown
Source)

at
org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(Dri
verConnectionFactory.java:37)

at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(Poolabl
eConnectionFactory.java:290)

at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericO
bjectPool.java:771)

at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedOb
jectPool.java:74)

at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataS
ource.java:95)

 

 

I am using settings  in my ROOT.xml

 

Resource name=jdbc/dbase auth=Container type=javax.sql.DataSource
username=user password=pass
driverClassName=com.microsoft.jdbc.sqlserver.SQLServerDriver
url=jdbc:microsoft:sqlserver://localhost:1433;databaseName=dbase
maxActive=5000 maxIdle=1 maxWait=100 removeAbandoned=true
removeAbandonedTimeout=2/

 

 

Additional info: In both cases the common thing was, that in SQL server
under management/process info I could see more than 3500 processes
connected to the database from tomcat, but in sleeping mode. (not sure
this has anything to do with problem).

also, I am  using Tomcat as Apache module using mod_jk 

 

I cannot make out anything of this, why suddenly server stops connecting
to database. Any ideas about the problem?

 

Regards

 

Kamal

 




FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


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



css and images (stupid question?)

2005-11-28 Thread Kristian Rink
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all;

playing around with tomcat in order to both learn using the package and
create a small web site there, I'm currently left with a problem which,
though probably being small (and not really related to tomcat), keeps
bugging me:

I'm trying to do the visual stuff of my jsp using a css style file,
which is good, so far. Within the css file, I'm using images for
backgrounds etc like that:


background: #fff url(/images/bg_header_blau.jpg) no-repeat top left;


My problem, right now, is where to put the images within the web
application so they're actually found when displaying the page.
Initially, I created a folder images within my web application and
referred to the images using url(images/...) with relative path names,
which didn't work. Also tried to place the images folder inside
$CATALINA_HOME/webapps and then using absolute image urls (/image/...),
which also didn't work.

So, where's the magic? I've always been through some tougher moments
with css and images while dynamically generating content, but right now
I feel really helpless about that. Can someone enlighten me?

Cheers and thanks,
Kris



- --
Kristian Rink *  http://zimmer428.net * jab: [EMAIL PROTECTED]
icq: 48874445 *  fon: ++49 176 2447 2771

Be yourself the kind of change you want to see in this world. (Gandhi)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDive4cxBAPOA1m6wRAnRxAJ90PaDKZsQQDo3M4CCd7WV5Syi/MgCdGhbs
hobJ1TqkErAqjLxZc6gV0kM=
=O7hF
-END PGP SIGNATURE-

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



RE: css and images (stupid question?)

2005-11-28 Thread Allistair Crossley
Your URLs if absolute would need to contain the web application name
unless your web appliation was the ROOT web application (the only one
that runs at /).  

Therefore if you webapp was called apple and was in webapps/apple, your
image refs would need to be

/apple/images/

You can use relative image URLs in your CSS OK BUT if you are linking
to a CSS sheet, again youd need the href to point to
/apple/css/mycss.css. 

Other than that, you can define your CSS styles in the head of your
pages and then use relative refs to your images, e.e ../images/

Allistair

-Original Message-
From: Kristian Rink [mailto:[EMAIL PROTECTED] 
Sent: 28 November 2005 12:28
To: Tomcat Users List
Subject: css and images (stupid question?)



FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS 
Limited cannot guarantee that attachments are virus free or compatible with 
your systems and does not accept any liability in respect of viruses or 
computer problems experienced.
/FONT


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all;

playing around with tomcat in order to both learn using the package and
create a small web site there, I'm currently left with a problem which,
though probably being small (and not really related to tomcat), keeps
bugging me:

I'm trying to do the visual stuff of my jsp using a css style file,
which is good, so far. Within the css file, I'm using images for
backgrounds etc like that:


background: #fff url(/images/bg_header_blau.jpg) no-repeat top left;


My problem, right now, is where to put the images within the web
application so they're actually found when displaying the page.
Initially, I created a folder images within my web application and
referred to the images using url(images/...) with relative path names,
which didn't work. Also tried to place the images folder inside
$CATALINA_HOME/webapps and then using absolute image urls (/image/...),
which also didn't work.

So, where's the magic? I've always been through some tougher moments
with css and images while dynamically generating content, but right now
I feel really helpless about that. Can someone enlighten me?

Cheers and thanks,
Kris



- --
Kristian Rink *  http://zimmer428.net * jab: [EMAIL PROTECTED]
icq: 48874445 *  fon: ++49 176 2447 2771

Be yourself the kind of change you want to see in this world. (Gandhi)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDive4cxBAPOA1m6wRAnRxAJ90PaDKZsQQDo3M4CCd7WV5Syi/MgCdGhbs
hobJ1TqkErAqjLxZc6gV0kM=
=O7hF
-END PGP SIGNATURE-

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




FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is confidential and 
may be privileged. This email is intended solely for the named recipient only; 
if you are not authorised you must not disclose, copy, distribute, or retain 
this message or any part of it. If you have received this message in error 
please contact the sender at once so that we may take the appropriate action 
and avoid troubling you further.  Any views expressed in this message are those 
of the individual sender.  QAS Limited has the right lawfully to record, 
monitor and inspect messages between its employees and any third party.  Your 
messages shall be subject to such lawful supervision as QAS Limited deems to be 
necessary in order to protect its information, its interests and its 
reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound 

RE: css and images (stupid question?)

2005-11-28 Thread Allistair Crossley
Oh you can use aliases too if fronted with an apache web server 

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: 28 November 2005 12:33
To: Tomcat Users List
Subject: RE: css and images (stupid question?)

Your URLs if absolute would need to contain the web application name
unless your web appliation was the ROOT web application (the only one
that runs at /).  

Therefore if you webapp was called apple and was in webapps/apple, your
image refs would need to be

/apple/images/

You can use relative image URLs in your CSS OK BUT if you are linking
to a CSS sheet, again youd need the href to point to
/apple/css/mycss.css. 

Other than that, you can define your CSS styles in the head of your
pages and then use relative refs to your images, e.e ../images/

Allistair

-Original Message-
From: Kristian Rink [mailto:[EMAIL PROTECTED]
Sent: 28 November 2005 12:28
To: Tomcat Users List
Subject: css and images (stupid question?)



FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is
confidential and may be privileged. This email is intended solely for
the named recipient only; if you are not authorised you must not
disclose, copy, distribute, or retain this message or any part of it. If
you have received this message in error please contact the sender at
once so that we may take the appropriate action and avoid troubling you
further.  Any views expressed in this message are those of the
individual sender.  QAS Limited has the right lawfully to record,
monitor and inspect messages between its employees and any third party.
Your messages shall be subject to such lawful supervision as QAS Limited
deems to be necessary in order to protect its information, its interests
and its reputation.  

Whilst all efforts are made to safeguard Inbound and Outbound emails,
QAS Limited cannot guarantee that attachments are virus free or
compatible with your systems and does not accept any liability in
respect of viruses or computer problems experienced.
/FONT


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all;

playing around with tomcat in order to both learn using the package and
create a small web site there, I'm currently left with a problem which,
though probably being small (and not really related to tomcat), keeps
bugging me:

I'm trying to do the visual stuff of my jsp using a css style file,
which is good, so far. Within the css file, I'm using images for
backgrounds etc like that:


background: #fff url(/images/bg_header_blau.jpg) no-repeat top left;


My problem, right now, is where to put the images within the web
application so they're actually found when displaying the page.
Initially, I created a folder images within my web application and
referred to the images using url(images/...) with relative path names,
which didn't work. Also tried to place the images folder inside
$CATALINA_HOME/webapps and then using absolute image urls (/image/...),
which also didn't work.

So, where's the magic? I've always been through some tougher moments
with css and images while dynamically generating content, but right now
I feel really helpless about that. Can someone enlighten me?

Cheers and thanks,
Kris



- --
Kristian Rink *  http://zimmer428.net * jab: [EMAIL PROTECTED]
icq: 48874445 *  fon: ++49 176 2447 2771

Be yourself the kind of change you want to see in this world. (Gandhi)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDive4cxBAPOA1m6wRAnRxAJ90PaDKZsQQDo3M4CCd7WV5Syi/MgCdGhbs
hobJ1TqkErAqjLxZc6gV0kM=
=O7hF
-END PGP SIGNATURE-

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




FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK 
Disclaimer:  The information contained within this e-mail is
confidential and may be privileged. This email is intended solely for
the named recipient only; if you are not authorised you must not
disclose, copy, distribute, or retain this message or any part of it. If
you have received this message in error please contact the sender at
once so that we may take the appropriate action and avoid troubling you
further.  Any views expressed in this message are those of the
individual sender.  QAS Limited has the right lawfully to record,
monitor and inspect messages between its employees and any third party.
Your messages 

Re: How to set the admin console for 5.5.x

2005-11-28 Thread Dhaval Patel
Hi Shridhar,

  Tomcat Admin (for 5.5) zip or rar.gz file has following two main contents:

admin.xml
admin (webapps)

  You have to put admin.xml inside $CATALINA_HOME/conf/Catalina/localhost and
admin (webapps) inside $CATALINA_HOME/server/webapps . Also make sure that 
(which
you already did but one more time) that there is a user in tomcat-users.xml 
which
has admin role. 

  Put everything in proper places and restart the tomcat. You will see results.

  Hope it helps.

Regards,
D

--- N S, Shridhar [EMAIL PROTECTED] wrote:

 Hi Richard,
 
 Firstly, thanks for the reply.
 
 I have placed it under:
 $CATALINA_HOME/server/webapps folder as indicated.
 
 I get the login page for admin console, but after that I am getting the
 error message.
 
 Further help is appreciated.
 
 Thank you.
 
 Regards,
 Shridhar
 
 On 11/28/05, Richard Mixon [EMAIL PROTECTED] wrote:
 
  Shridhar,
 
  You have placed it in the wrong directory structure. Look at the paths in
  the zip/tar file - they show you the correct location. It is mostly under
  server/webapps - not webapps.
 
  HTH - Richard
 
   -Original Message-
   From: N S, Shridhar [mailto:[EMAIL PROTECTED]
   Sent: Monday, November 28, 2005 2:49 AM
   To: users@tomcat.apache.org
   Subject: How to set the admin console for 5.5.x
  
   Hi All,
  
   I am having trouble setting up the admin console for Apache
   Tomcat/5.5.12. I have downloaded the
   apache-tomcat-5.5.12-admin.zip file from Tomcat site.
   Unzipped it and placed the admin folder under
   C:\Tomcat55\server\webapps
   folder. When I try the below page:
   http://localhost/admin/
  
   I get the admin log in page. I enter admin and admin as
   username/password as defined in tomcat-users.xml file. Next
   page displays:
   Tomcat's administration web application is no longer
   installed by default.
   Download and install the admin package to use it.
  
   Any hepl is greatly appreciated.
  
   Thank you.
  
   Regards,
   Shridhar
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 




__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free. 
http://music.yahoo.com/unlimited/

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



Re: css and images (stupid question?)

2005-11-28 Thread Nikola Milutinovic

Kristian Rink wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all;

playing around with tomcat in order to both learn using the package and
create a small web site there, I'm currently left with a problem which,
though probably being small (and not really related to tomcat), keeps
bugging me:

I'm trying to do the visual stuff of my jsp using a css style file,
which is good, so far. Within the css file, I'm using images for
backgrounds etc like that:


background: #fff url(/images/bg_header_blau.jpg) no-repeat top left;


My problem, right now, is where to put the images within the web
application so they're actually found when displaying the page.
Initially, I created a folder images within my web application and
referred to the images using url(images/...) with relative path names,
which didn't work. Also tried to place the images folder inside
$CATALINA_HOME/webapps and then using absolute image urls (/image/...),
which also didn't work.

So, where's the magic? I've always been through some tougher moments
with css and images while dynamically generating content, but right now
I feel really helpless about that. Can someone enlighten me?
 



Well, your basic problem is that relative paths will not work, since 
pages can be in different directories. Absolute path has one problem, 
your application can be deployed under different paths. That problem is 
easy to solve, HttpServletRequest.getContextPath() will give you the 
deployment path. Just paste it on your desired CSS location, like this:


css.jsp
---
...

background: #fff url(%= request.getContextPath() %/images/bg_header_blau.jpg) 
no-repeat top left;

or, if you're using JSP 2.0

background: #fff url(${request.contextPath}/images/bg_header_blau.jpg) 
no-repeat top left;

...
---

Nix.

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



RE: How to set the admin console for 5.5.x

2005-11-28 Thread Caldarale, Charles R
 From: Richard Mixon [mailto:[EMAIL PROTECTED] 
 Subject: RE: How to set the admin console for 5.5.x
 
 You have placed it in the wrong directory structure. It is 
 mostly under server/webapps - not webapps.
 
  -Original Message-
  From: N S, Shridhar [mailto:[EMAIL PROTECTED] 
  Subject: How to set the admin console for 5.5.x
  
  Unzipped it and placed the admin folder under 
  C:\Tomcat55\server\webapps folder.

Richard, please read the original message a bit more carefully - the OP
had placed it exactly where you told him to.

For Shreedhar:  Did you restart Tomcat after updating tomcat-users.xml?
Does your admin userid include a role attribute of admin?  If both of
those check out, please send your tomcat-users.xml file to the list
(mask the passwords, if that's important).

 - 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: How to set the admin console for 5.5.x

2005-11-28 Thread Richard Mixon
Charles, thanks for pointing that out - its what I get for trying to help at
3:40am. I read too quickly and assumed it was the usual  problem with admin.
- Richard
 

 -Original Message-
 From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 28, 2005 8:02 AM
 To: Tomcat Users List
 Subject: RE: How to set the admin console for 5.5.x
 
  From: Richard Mixon [mailto:[EMAIL PROTECTED]
  Subject: RE: How to set the admin console for 5.5.x
  
  You have placed it in the wrong directory structure. It is mostly 
  under server/webapps - not webapps.
  
   -Original Message-
   From: N S, Shridhar [mailto:[EMAIL PROTECTED]
   Subject: How to set the admin console for 5.5.x
   
   Unzipped it and placed the admin folder under 
   C:\Tomcat55\server\webapps folder.
 
 Richard, please read the original message a bit more 
 carefully - the OP had placed it exactly where you told him to.
 ...


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



Re: JDBC Resource Configuration

2005-11-28 Thread Martin Gainty
Good Morning Martin-
If I understand your question correctly take a look at JSR-000221
https://jsecom16k.sun.com/ECom/EComActionServlet/DownloadPage:~:com.sun.sunit.sdlc.content.DownloadPageInfo;jsessionid=DDCBE747E2BD2C40EC2CC94C8DDB5F84;jsessionid=DDCBE747E2BD2C40EC2CC94C8DDB5F84

and look at the auth-mechanism provided from resource adapter deployment 
descriptor (jdbc provider)

websphere handles this situation and has some information that will help you
http://www-306.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/06061400.html

HTH,
Martin-
- Original Message - 
From: Martin Dubuc [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, November 28, 2005 9:51 AM
Subject: JDBC Resource Configuration


I am defining a number of JNDI resources in the
 server.xml file in the GlobalNamingResources section.
 As part of defining JDBC resources in this section,
 the username and password attributes are specified.
 The password is specified as clear text. I am
 wondering if there are ways to encrypt the passwords
 used for the JDBC resources or if it is possible not
 to define at all, but provide it in the Java sources
 instead.
 
 Martin
 
 
 
 __ 
 Yahoo! Music Unlimited 
 Access over 1 million songs. Try it free. 
 http://music.yahoo.com/unlimited/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


RE: reading file in ServletContextListener

2005-11-28 Thread GB Developer
whoops. 

I meant to say / is the root of the filesystem and _not_ having a slash
would mean the current directory, so that would be where tomcat has been
started from.  

And you want neither of those. 

 -Original Message-
 From: GB Developer [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 28, 2005 11:28 AM
 To: 'Tomcat Users List'
 Subject: RE: reading file in ServletContextListener
 
 would work, but where / is (without the getRealPath part) 
 is the directory from which Tomcat is being started, and 
 who knows (or should have to care) where that is.


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



Re: Singleton memory leak after redeploying.

2005-11-28 Thread Lionel Farbos
Hi Juan,

I think your problem can't be solved (only) by Tomcat.
The problem is that objets stay in memory because of pointers on static 
references...

To solve this :
You can embed a CleanupListener in your webapp.
This listener seem to be like this :

package com.yourWebApp;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class CleanupListener implements ServletContextListener 
{
  public MyCleanupListener() { super(); }
  public void contextInitialized(ServletContextEvent event) { }

  public void contextDestroyed(ServletContextEvent event) {
MySingleton.delInstance();
  }
}
---

Before this, you have to 
1) modify your MySingleton with :

public static void delInstance()
{
  if (_instance != null) { _instance._charWidths=null; }
  _instance = null;
}
2) add, in web.xml :
listener
  listener-classcom.yourWebApp.CleanupListener/listener-class
/listener

Notes :
- Perhaps your Listener will have to delete other objets like SQL drivers, 
commons logger, ...
- see also : 
http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669

Regards.

On Mon, 28 Nov 2005 08:29:13 +
kurrele [EMAIL PROTECTED] wrote:

 Hi to everyone!! This is my first email to this list, hope is the correct
 one.
 
 I've been analyzing my code with a profiler (JProbe) because I was getting
 an
 OutOfMemoryException after a few redeploys of my application.
 
 After some tests, it turned out that my static fields were not GCed after
 redeploying, getting stuck with the classloader which loaded my classes.
 
 After that, I searched the bugzilla and found
   *Bug# *(Memory Leak in Classloader/Manager deploy/undeploy)*:*
 20758http://issues.apache.org/bugzilla/show_bug.cgi?id=20758
 where it says that the bug has been FIXED.
 
 I tested it in Tomcat 4.1.24 and 5.0.28 getting the same result (memory leak
 in static fields).
 
 I attach here the servlet and singleton of my simple test webapp.
 
 ---
 public class Test extends HttpServlet
 {
 
 MySingleton singleton = MySingleton.getInstance();
 
 public void init(ServletConfig config) throws ServletException
 {
 super.init(config);
 
 }
 
 public void destroy()
 {
 singleton = null;
 }
 
 protected void processRequest(HttpServletRequest request,
 HttpServletResponse response)
 throws ServletException, IOException
 {
 response.setContentType(text/html);
 PrintWriter out = response.getWriter();
 out.println(htmlheadtitleJProbe TEST
 singleton/title/headbodybJProbe TEST
 singleton/bBR/body/html);
 out.close();
 }
 protected void doGet(HttpServletRequest request, HttpServletResponse
 response)
 throws ServletException, IOException
 {
 processRequest(request, response);
 }
 
 protected void doPost(HttpServletRequest request, HttpServletResponse
 response)
 throws ServletException, IOException
 {
 processRequest(request, response);
 }
 }
 
 
 -
 public class MySingleton
 {
 
 private static MySingleton _instance = new MySingleton();
 
 public byte[] _charWidths = new byte[1024*1024];  // 1Meg mem
 allocation!!.
 
 private MySingleton()
 {}
 
 public static MySingleton getInstance()
 {
 return _instance;
 }
 
 public void finalize()
 {
 System.out.println(!!! END-MySingleton !!!);
 _instance = null;
 }
 }
 
 
 -
 
 After redeploying this simple webapp a 1Meg leak can be found due to
 MySingleton not being GCed.
 
 Please I want to know If I'm leaving out something, the bug is not really
 fixed or I need to take another approach.
 
 Thanks.
 
  Juan F. S. (Spain).
 

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



Monitoring Tomcat conenction pool

2005-11-28 Thread Robert Palmer
Is there any tool available to monitor the database connection pools on 
a Tomcat server. I would like to be able to determine which connections 
are in use at any time.


Thanks

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



Java databases as alternative to MySQL on OS X Server? (OT)

2005-11-28 Thread Mieke Banderas

Given the sad, sad performance findings at:
No More Apple Mysteries, Part Two
Date: September 1st, 2005
http://www.anandtech.com/mac/showdoc.aspx?i=2520

are there any javabased DB alternatives, that may perform better than
MySQL (or PostgreSQL for that matter)? I prefer free, open sourced DBs or
otherwise with a license that could fit a small business/non profit
organisation.

I don't enough of JVMs to know if Javabased DBs are usually better
performancewise than MySQL/PostgreSQL, but my thought was that if
everything is kept within the JVM, the weak performance spots in OS X
would be minimized as threads would be handled within JVM rather than
within OS X. Threads being being the prime suspect in the weak MySQL
performance in OS X according Anandtech.

Do you have any thought and/or suggestions on this issue? Experiences you
could share?
My server runs Mac OS X Server 10.2.6 with Java 1.4.1/1.3.1. I can't use
Java 1.5 just yet.




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



SSL login page question

2005-11-28 Thread Santos, Paulo
Hi,

 

I have a form based login page and I want to make sure that HTTPS is
always used when logging in. But the catch is that the URL the user is
trying to go to may not be using HTTPS but HTTP. We just want to make
sure that the user logs into the web app using SSL always. The security
constraint for the login page is CONFIDENTIAL.  Is there any way to
ensure that the user logs in using SSL even though the URL they want to
go to uses HTTP?

 

Thanks in advance I'd appreciate any help,

 

Paulo

 

Example:  

 

User wants to go to http://someHostName/index.jsp

 

The login page comes up.

 

The user logs in and goes to the URL listed above.

 

I need to make sure that the login name and password are encrypted when
they submit the login data.



Re: heap size problems (speed) [2]

2005-11-28 Thread Cristian

- Original Message - 
From: Duan, Nick [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, November 28, 2005 7:30 PM
Subject: RE: heap size problems (speed) [2]


 Were you using the right JVM?  There were two JDK download for LINUX
on
 Sun's web site.

I have downloaded : J2SE(TM) Development Kit 5.0 Update 5
Linux self extracting file (although I think I should have get the rpm).

I've extrated it in a separate directory and set JAVA_HOME in tomcat to
point to that dir.

Does it make any difference other than the fact that this way it is not
rpm compliant?

 The main problem may be your AMD Duron processor which has a very
small
 cache size (I believe it's about 512K).  Once the processor cache
 reaches its limit, increasing the JVM heap size won't be very
effective.

This is even worse for my AMD Duron
cache size  : 64 KB

but on the other machine I have :
cache size  : 1024 KB
and still get the same results.

Cristian



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



Re: Java databases as alternative to MySQL on OS X Server? (OT)

2005-11-28 Thread Oded Arbel
On Monday, 28 בNovember 2005 19:59, Mieke Banderas wrote:
 are there any javabased DB alternatives, that may perform better than
 MySQL (or PostgreSQL for that matter)? I prefer free, open sourced
 DBs or otherwise with a license that could fit a small business/non
 profit organisation.

HSQLdb (formerly known as Hypersonic SQL) and Apache Derbi (formerly 
knows as cloudscape DB) are two Pure Java databases, which are free and 
open source, and at least the first can run in memory in the JVM. As 
for faster performing ? I think you'd be hard pressed to find something 
better performing then MySQL and Postgres. Might want to try firebird, 
though I wouldn't get your hopes up.

 I don't enough of JVMs to know if Javabased DBs are usually better
 performancewise than MySQL/PostgreSQL, 

I can't really see how it could be, and my experience indeed shows the 
opposite.

 but my thought was that if 
 everything is kept within the JVM, the weak performance spots in OS X
 would be minimized as threads would be handled within JVM rather than
 within OS X. Threads being being the prime suspect in the weak MySQL
 performance in OS X according Anandtech.

I'm not sure why do they think that, and I haven't read the entire 
article yet, but I doubt you'd get better performance from an internal 
DB then from a standalone highly optimized full RDBMs.

-- 
Oded Arbel
m-Wise mobile solutions
[EMAIL PROTECTED]

+972-9-9611212 (204)
+972-54-7340014

::..
The marvels of today's modern technology include the development of a 
soda can, when discarded will last forever ... and a $7,000 car which 
when properly cared for will rust out in two or three years.

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



Re: heap size problems (speed) [2]

2005-11-28 Thread Wade Chandler
--- Cristian [EMAIL PROTECTED] wrote:

 
 - Original Message - 
 From: Duan, Nick [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, November 28, 2005 7:30 PM
 Subject: RE: heap size problems (speed) [2]
 
 
  Were you using the right JVM?  There were two JDK
 download for LINUX
 on
  Sun's web site.
 
 I have downloaded : J2SE(TM) Development Kit 5.0
 Update 5
 Linux self extracting file (although I think I
 should have get the rpm).
 
 I've extrated it in a separate directory and set
 JAVA_HOME in tomcat to
 point to that dir.
 
 Does it make any difference other than the fact that
 this way it is not
 rpm compliant?
 
  The main problem may be your AMD Duron processor
 which has a very
 small
  cache size (I believe it's about 512K).  Once the
 processor cache
  reaches its limit, increasing the JVM heap size
 won't be very
 effective.
 
 This is even worse for my AMD Duron
 cache size  : 64 KB
 
 but on the other machine I have :
 cache size  : 1024 KB
 and still get the same results.
 
 Cristian
 
 
 

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

I don't think your CPU L caches are going to influence
the issues you are seeing...not noticeably..not with
todays hardware.  Cristian is resizing the java heap
to allow it to get larger than it was able before
(default or the Tomcat default setting).  In this case
heap being the amount of memory the java process is
going to be able to use for the process aside from the
static space which can not be controlled by the heap
setting being used.  

How much memory does your computer physically have
Cristian?  Are you also using -Xms512m?  I'll wait to
here about your memory first before making other
comments on that.  

The next thing I'm going to ask deals with another
issue we had on the list.  Do you also write to the
HashMap from your application?  Are you reading and
writing to this cache or your application loads this
cached data at start up and it is merely read from
that point on?  If you are writing to this data you
need to be sure to synchronize the HashMap because if
you don't you can get into some serious problems with
concurrency issues and HashMap resizing (synchronize
reads and writes).  If you load all of the data up
then only read from the application then synchronizing
the reads to the hash map won't matter (unless you
allow reading while the loading is occuring).  

The next question would be: Even if only reading and
you are are currently synchronizing the calls to this
cached data are the operations long?  If the
operations to a synchronized resource are very long
then other threads (requests in this case) will be
delayed while trying to access the HashMap.

Wade

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



Re: heap size problems (speed) [2]

2005-11-28 Thread Cristian
 I don't think your CPU L caches are going to influence
 the issues you are seeing...not noticeably..not with
 todays hardware.  Cristian is resizing the java heap
 to allow it to get larger than it was able before
 (default or the Tomcat default setting).  In this case
 heap being the amount of memory the java process is
 going to be able to use for the process aside from the
 static space which can not be controlled by the heap
 setting being used.

 How much memory does your computer physically have
 Cristian?  Are you also using -Xms512m?  I'll wait to
 here about your memory first before making other
 comments on that.


1G of RAM and I do not set -Xms512m
swap space is hit ocasionaly but not all the time.

 The next thing I'm going to ask deals with another
 issue we had on the list.  Do you also write to the
 HashMap from your application?  Are you reading and
 writing to this cache or your application loads this
 cached data at start up and it is merely read from
 that point on?  If you are writing to this data you
 need to be sure to synchronize the HashMap because if
 you don't you can get into some serious problems with
 concurrency issues and HashMap resizing (synchronize
 reads and writes).  If you load all of the data up
 then only read from the application then synchronizing
 the reads to the hash map won't matter (unless you
 allow reading while the loading is occuring).

The application only caches data at startup and after that it performs
only read operations regarding this cache.

 The next question would be: Even if only reading and
 you are are currently synchronizing the calls to this
 cached data are the operations long?  If the
 operations to a synchronized resource are very long
 then other threads (requests in this case) will be
 delayed while trying to access the HashMap.

I'm told that the accesses are not long ones ... The designer of this
test
just  accesses the HashMap. If it exists, OK they return the value.
If not they return the name of the requested key.

Please don't blame my lack of knowledge in this matter, this being only
what they've told me.
I am far away (hundreds of pages of java docs) from understanding the
functionality.
I'm only providing support on linux for tomcat (installation with APR
etc).
They wanted to test this scenario on linux because on windows they claim
it worked.

However I can understand advises and put them into practice if needed.
Also, as I said before, I am able to read some docs that would
eventually get me to the point of solving and understanding the problem.

 Wade

Thanks,
Cristian


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



Re: JSTL

2005-11-28 Thread Lists

Try this.

download : http://cvs.apache.org/builds/jakarta-taglibs/nightly/

In unix

gzip -c ~/dls/jakarta-taglibs-20051122.tar.gz | tar xvf -

mv  jstl.jar and standard.jar (from jakarta-taglibs/standard/lib/) to  
$CATALINA_HOME/shared/lib


Now its available to all your webapps..

This would resolve the WEB-INF/lib issue you pointed out.

Does that help?


On Nov 22, 2005, at 20:04, Behrang Saeedzadeh wrote:


Hi,

Isn't JSTL a standard part of the J2EE 1.4 Web containers? Shouldn't
it be available to Web apps out of the box with no need to include the
JAR files in the WEB-INF/lib and referencing to their tlds in the
web.xml?

Thanks in advance,
Behi

--
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]



Re: Java databases as alternative to MySQL on OS X Server? (OT)

2005-11-28 Thread Oded Arbel
On Monday, 28 בNovember 2005 19:59, Mieke Banderas wrote:
 Given the sad, sad performance findings at:
 No More Apple Mysteries, Part Two
 Date: September 1st, 2005
 http://www.anandtech.com/mac/showdoc.aspx?i=2520

 I don't enough of JVMs to know if Javabased DBs are usually better
 performancewise than MySQL/PostgreSQL, but my thought was that if
 everything is kept within the JVM, the weak performance spots in OS X
 would be minimized as threads would be handled within JVM rather than
 within OS X. Threads being being the prime suspect in the weak MySQL
 performance in OS X according Anandtech.

After reading the article I can say two things:

a) I think their take on the thread vs. process creation issue is 
completely wrong. They are basically saying thread creation on linux 
is the same as process creation and is very fast, but thread creation 
on MAC OSX is not the same as process creation because process creation 
also creates a task. Because we tested process creation to be slower on 
MAC OSX, we conclude that thread creation is slower. Am I the only one 
that see how broken the logic here ?

b) Even assuming they are right, you still want to choose MySQL over JVM 
space databases, because Java and Java databases are very much thread 
enabled and create and destroy many threads. MySQL OTOH uses very 
little threads - essentially it only creates a new thread to handle a 
new client, and even then a single thread handles several clients 
before another thread is required.

-- 
Oded Arbel
m-Wise mobile solutions
[EMAIL PROTECTED]

+972-9-9611212 (204)
+972-54-7340014

::..
General Failure's Fault. Not Yours.

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



Session-timeout

2005-11-28 Thread Dave Morrow
Hi all.  I have a server with multiple applications running under Tomcat 5.5

In TOMCAT_HOME/conf/web.xml session-timeout is set to 30

In TOMCAT_HOME/webapps/myapp/WEB-INF/web.xml session-timeout is set to -1 
(infinite)

Users are being timed out of their sessions after 30 minutes as opposed to 
never being timed out.  


David A. Morrow
Technical Systems Lead
Autodata Solutions Company
[EMAIL PROTECTED]
http://www.autodata.net

* PLEASE NOTE THAT EFFECTIVE DEC 1,2005 MY TELEPHONE NUMBER WILL CHANGE *

NEW !!! Tel: (519) 963-3020
Fax: (519) 451-6615 

 Poor planning on your part does not necessarily constitute an emergency on my 
part! 

This message has originated from Autodata Solutions. The attached material is 
the Confidential and Proprietary Information of Autodata Solutions. This email 
and any files transmitted with it are confidential and intended solely for the 
use of the individual or entity to whom they are addressed. If you have 
received this email in error please delete this message and notify the Autodata 
system administrator at [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]



Re: heap size problems (speed) [2]

2005-11-28 Thread Wade Chandler
--- Cristian [EMAIL PROTECTED] wrote:
  I don't think your CPU L caches are going to
 influence
  the issues you are seeing...not noticeably..not
 with
  todays hardware.  Cristian is resizing the java
 heap
  to allow it to get larger than it was able before
  (default or the Tomcat default setting).  In this
 case
  heap being the amount of memory the java process
 is
  going to be able to use for the process aside from
 the
  static space which can not be controlled by the
 heap
  setting being used.
 
  How much memory does your computer physically have
  Cristian?  Are you also using -Xms512m?  I'll wait
 to
  here about your memory first before making other
  comments on that.
 
 
 1G of RAM and I do not set -Xms512m
 swap space is hit ocasionaly but not all the time.
 
  The next thing I'm going to ask deals with another
  issue we had on the list.  Do you also write to
 the
  HashMap from your application?  Are you reading
 and
  writing to this cache or your application loads
 this
  cached data at start up and it is merely read from
  that point on?  If you are writing to this data
 you
  need to be sure to synchronize the HashMap because
 if
  you don't you can get into some serious problems
 with
  concurrency issues and HashMap resizing
 (synchronize
  reads and writes).  If you load all of the data up
  then only read from the application then
 synchronizing
  the reads to the hash map won't matter (unless you
  allow reading while the loading is occuring).
 
 The application only caches data at startup and
 after that it performs
 only read operations regarding this cache.
 
  The next question would be: Even if only reading
 and
  you are are currently synchronizing the calls to
 this
  cached data are the operations long?  If the
  operations to a synchronized resource are very
 long
  then other threads (requests in this case) will be
  delayed while trying to access the HashMap.
 
 I'm told that the accesses are not long ones ...
 The designer of this
 test
 just  accesses the HashMap. If it exists, OK they
 return the value.
 If not they return the name of the requested key.
 
 Please don't blame my lack of knowledge in this
 matter, this being only
 what they've told me.
 I am far away (hundreds of pages of java docs) from
 understanding the
 functionality.
 I'm only providing support on linux for tomcat
 (installation with APR
 etc).
 They wanted to test this scenario on linux because
 on windows they claim
 it worked.
 
 However I can understand advises and put them into
 practice if needed.
 Also, as I said before, I am able to read some docs
 that would
 eventually get me to the point of solving and
 understanding the problem.
 
  Wade
 
 Thanks,
 Cristian
 

I don't know really.  I've not seen issues with
HashMap in a Linux vs. Windows scenario (might check
JRE/JDK bug reports).  Since your swap isn't being hit
all the time I wouldn't say it would be that.  I don't
know really where to direct you without knowing more,
because the general issues don't seem to be the cause.
 Does the application perform badly with only a few
hits to the site?  Does the application get under
heavy load then stop working?

Wade

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



ClassNotFoundException when upgrading from 5.5.9 to 5.5.10+

2005-11-28 Thread David R Mulligan
When I start up tomcat 5.5.10-12 I am getting a ClassNotFoundException
for a custom class that implements Filter.  Under 5.5.9 and 5.5.1 the
class loads just fine.

My class lives in a jar file in shared/lib as some if it is required by
another webapp.  If I move the class files in question to the
webapp/classes dir tomcat appears to be able to find it but then it
gives a NoClassDefError instead.  I read the FAQ and looked but I cannot
find another servlet.jar anywhere so I do not believe this is the
problem.  The filter class is defined in the web.xml file for the
webapp.

I cannot find anything in the changelog from 5.5.10 and up that would
explain or even seem related to this.  I would appreciate any help I can
get at this point!

Thanks,
David


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



Re: Monitoring Tomcat conenction pool

2005-11-28 Thread Martin Gainty
Hello RObert

DBCP has configuration parameters available which will enable you to tune your 
connection pool check out
http://jakarta.apache.org/commons/dbcp/configuration.html

you can also set these parameters at the server.xml level 
check out this example at experts-exchange
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21306503.html

HTH,
Martin-
- Original Message - 
From: Robert Palmer [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, November 28, 2005 12:33 PM
Subject: Monitoring Tomcat conenction pool


 Is there any tool available to monitor the database connection pools on 
 a Tomcat server. I would like to be able to determine which connections 
 are in use at any time.
 
 Thanks
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Integration with MQSeries

2005-11-28 Thread Mukherjee, Maharshi
 Hi,
 
 We are planning to use Tomcat for MQSeries integration.
 
 We need to create Web services that will run on a webserver. These web
 services will get the data from MQ, transform the data and call a backend
 application.
 
 Can we do this using Tomcat? Can anyone give me some sort of overview of
 how to do that? Any pointer related to this will be most welcome.
 
 Thanks,
 Maharshi
 
 


Re: heap size problems (speed) [2]

2005-11-28 Thread Cristian S


- Original Message - 
From: Wade Chandler [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, November 28, 2005 11:27 PM
Subject: Re: heap size problems (speed) [2]


I don't know really.  I've not seen issues with
HashMap in a Linux vs. Windows scenario (might check
JRE/JDK bug reports).  Since your swap isn't being hit
all the time I wouldn't say it would be that.  I don't
know really where to direct you without knowing more,
because the general issues don't seem to be the cause.
Does the application perform badly with only a few
hits to the site?  Does the application get under
heavy load then stop working?


Unfortunatelly this test application performs badly from the first hit.
Frankly I have no ideea what's the point of loading almost 400M of data 
in memory in a HashMap.

Maybe this very approach has a design flaw when it comes to JAVA.

Luckly this is only a test and I'm being asked why it does not work on 
Linux and mostly if I can take it out from this won't budge state :).


Anyway, I will take a closer look at the problem of JRE/JDK possible 
bugs and perhaps at some kernel settings that might cause this.


Or maybe I'm just missing/mistaking something and I do not realize for 
the moment.



Wade


Thanks a lot,
Cristian


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



RE: Integration with MQSeries

2005-11-28 Thread Mark Benussi
If you want to run Web Services on Tomcat look at Apache AXIS.

From AXIS services you are going to post messages to an MQ manager, probably
via JMS.

Then you will need to monitor the queue at the other end to call your
backend application.

I don't wish to be rude here but how have you come to these decisions? Has
the system been designed in the way by an architect?

-Original Message-
From: Mukherjee, Maharshi [mailto:[EMAIL PROTECTED] 
Sent: 28 November 2005 22:31
To: 'users@tomcat.apache.org'
Subject: Integration with MQSeries

 Hi,
 
 We are planning to use Tomcat for MQSeries integration.
 
 We need to create Web services that will run on a webserver. These web
 services will get the data from MQ, transform the data and call a backend
 application.
 
 Can we do this using Tomcat? Can anyone give me some sort of overview of
 how to do that? Any pointer related to this will be most welcome.
 
 Thanks,
 Maharshi
 
 

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



RE: heap size problems (speed) [2]

2005-11-28 Thread Duan, Nick
1024 K is still relatively small compare to a heap size of 512M.  The
fact is that Duron is really the low-end of AMD processor family.  It
shouldn't be used for any serious computing purpose.  I'd like to
suggest doing the test at least on an Athlon.  Hardware is really cheap
nowadays.

ND 

-Original Message-
From: Cristian [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 28, 2005 1:27 PM
To: Tomcat Users List
Subject: Re: heap size problems (speed) [2]


- Original Message - 
From: Duan, Nick [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, November 28, 2005 7:30 PM
Subject: RE: heap size problems (speed) [2]


 Were you using the right JVM?  There were two JDK download for LINUX
on
 Sun's web site.

I have downloaded : J2SE(TM) Development Kit 5.0 Update 5
Linux self extracting file (although I think I should have get the rpm).

I've extrated it in a separate directory and set JAVA_HOME in tomcat to
point to that dir.

Does it make any difference other than the fact that this way it is not
rpm compliant?

 The main problem may be your AMD Duron processor which has a very
small
 cache size (I believe it's about 512K).  Once the processor cache
 reaches its limit, increasing the JVM heap size won't be very
effective.

This is even worse for my AMD Duron
cache size  : 64 KB

but on the other machine I have :
cache size  : 1024 KB
and still get the same results.

Cristian



-
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: heap size problems (speed) [2]

2005-11-28 Thread Caldarale, Charles R
 From: Cristian S [mailto:[EMAIL PROTECTED] 
 Subject: Re: heap size problems (speed) [2]
 
 Frankly I have no ideea what's the point of loading almost 
 400M of data in memory in a HashMap.

If it's worth doing, it's worth doing to excess.  Or maybe not.  Try
turning on -verbose:gc and see if you're going through a lot of garbage
collections.  If your max heap is 512mb and you're using 400mb of it for
the cache, there may not be much left for request processing.  Should
also try a memory profiler to see just how full the heap really is.

 - 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]



Unable to perform replication request.

2005-11-28 Thread John MccLain
I have 2 tomcat instances (t1, t2) each running in Eclipse (e1, e2).
I kick off tomcat in both. My app loads in both. I am using the JK
redirector from IIS to load balance between the 2 instances. I bring up a
browser and enter my URL (http://localhost/Acuity). I have a breakpoint in
the sessionListener of the app. It breaks there in t1, so I step through. At
the end of stepping through 'sessionCreated(event)', I run, and it
immediately gives me an exception in t2, and breaks in the session listener
breakpoint (same place) I set there

My Questions are:
1)When is sessionCreated called by Tomcat, i.e., exactly when does a session
get created and how?
2)I get an error at the end of t1.sessionCreated after it steps out of the
function. The error occurs somewhere after t1.sessionCreated and before
t2.sessionCreated. I THINK, it is a replication issue based on the exception
(see t2 exception below), however there may be code that is getting called
between exit of t1.sessionCreated and enter of t2.sessionCreated.
3) How do you debug issues like this???

t1 startup:
.
.
.
INFO: Start ClusterSender at cluster Catalina:type=Cluster,host=localhost
with name Catalina:type=ClusterSender,host=localhost
Nov 28, 2005 3:52:03 PM org.apache.catalina.cluster.mcast.McastService start
INFO: Sleeping for 2000 secs to establish cluster membership
Nov 28, 2005 3:52:05 PM org.apache.catalina.cluster.mcast.McastService
registerMBean
INFO: membership mbean registered
(Catalina:type=ClusterMembership,host=localhost)
Nov 28, 2005 3:52:05 PM org.apache.catalina.cluster.deploy.FarmWarDeployer
start
INFO: Cluster FarmWarDeployer started.
Nov 28, 2005 3:52:07 PM org.apache.catalina.cluster.session.DeltaManager
start
INFO: Register manager /Acuity to cluster element Host with name localhost
Nov 28, 2005 3:52:07 PM org.apache.catalina.cluster.session.DeltaManager
start
INFO: Starting clustering manager at /Acuity
Nov 28, 2005 3:52:07 PM org.apache.catalina.cluster.session.DeltaManager
getAllClusterSessions
INFO: Manager [/Acuity]: skipping state transfer. No members active in
cluster group.
='We are running Acuity in cluster mode. Current cluster Members:
org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.235:4001,catal
ina,192.168.1.235,4001, alive=100]
--
Acuity AppLifecycleListener - context created
=   'Acuity Web Application Initialized'   =

t2 startup:
.
.
.
INFO: Start ClusterSender at cluster Catalina:type=Cluster,host=localhost
with name Catalina:type=ClusterSender,host=localhost
Nov 28, 2005 3:53:30 PM org.apache.catalina.cluster.mcast.McastService start
INFO: Sleeping for 2000 secs to establish cluster membership
Nov 28, 2005 3:53:31 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster
memberAdded
INFO: Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.235:4001
,catalina,192.168.1.235,4001, alive=85703]
Nov 28, 2005 3:53:32 PM org.apache.catalina.cluster.mcast.McastService
registerMBean
INFO: membership mbean registered
(Catalina:type=ClusterMembership,host=localhost)
Nov 28, 2005 3:53:32 PM org.apache.catalina.cluster.deploy.FarmWarDeployer
start
INFO: Cluster FarmWarDeployer started.
Nov 28, 2005 3:53:34 PM org.apache.catalina.cluster.session.DeltaManager
start
INFO: Register manager /Acuity to cluster element Host with name localhost
Nov 28, 2005 3:53:34 PM org.apache.catalina.cluster.session.DeltaManager
start
INFO: Starting clustering manager at /Acuity
Nov 28, 2005 3:53:34 PM org.apache.catalina.cluster.session.DeltaManager
getAllClusterSessions
WARNING: Manager [/Acuity], requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.235:4001,catal
ina,192.168.1.235,4001, alive=89265]. This operation will timeout if no
session state has been received within 60 seconds.
Nov 28, 2005 3:53:34 PM org.apache.catalina.cluster.session.DeltaManager
waitForSendAllSessions
INFO: Manager [/Acuity]; session state send at 11/28/05 3:53 PM received in
203 ms.
='We are running Acuity in cluster mode. Current cluster Members:
org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.235:4001,catal
ina,192.168.1.235,4001, alive=90281]
org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.1.235:4002,catal
ina,192.168.1.235,4002, alive=2172]
--
Acuity AppLifecycleListener - context created
=   'Acuity Web Application Initialized'   =

t1/t2 sessionCreated code:
HttpSession session = event.getSession();
//session.setAttribute(machine, t1);
ServletContext context = session.getServletContext();
Hashtable sessionMap = (Hashtable) context.getAttribute( SessionMap );

if( sessionMap == null )
{
  sessionMap = new Hashtable();
  context.setAttribute( SessionMap, sessionMap );
}

//sessionMap.put( session, session ); //  Register that this session is
active


t2 exception:

Re: Java databases as alternative to MySQL on OS X Server? (OT)

2005-11-28 Thread Mieke Banderas
Oded Arbel said:

b) Even assuming they are right, you still want to choose MySQL over JVM 
space databases, because Java and Java databases are very much thread 
enabled and create and destroy many threads. 
But do they do it mainly within the OS or within the JVM? Top or PS
doesn't show individual processes within the JVM. I'm not clear on how
Java processes/threads relate to OS processes/threads. I'd like to know
where/how exactly Java threads are started/killed on Hotspot in OS X.
Doesn't java threads mainly intercommunicate within the JVM? Context
switches? 
Is it really a completely dead end that minimizing the OS threading in
Mac OS X and keeping threads within JVM could improve performance?
Of course the Java DB in question would have to be somewhat similar to
MySQL in performance, but possibly the Java DB could perform better with
many connections as that is where MySQL on OS X breaks down according to
anandtech.

MySQL OTOH uses very  
little threads - essentially it only creates a new thread to handle a 
new client, and even then a single thread handles several clients 
before another thread is required.
But according to the anandtech article OS X is the only platform where
performance breaks down after raising the amount of connections. So it
would seem until Apple fixes the performance problems - which certainly
may take a while-,  ways to use databases without creating many expensive
(in theory) OS threads could be desirable.

Obviously the only way to know for sure if this is true would be to test
load MySQL on ones own server and also test load a Java database. Do
anyone know of anyone who have done load testing on OS X and published
the results? I'm on OS X Server 10.2 so even older tests are of interest.
(I'm going to google it now of course)




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



Re: heap size problems (speed) [2]

2005-11-28 Thread Martin Gainty
Agreed for memory profiler I would check out
http://www.khelekore.org/jmp/

If this solution is workable you may want to set environment variable JAVA_OPTS 
to include -verbose:gc

Martin-

- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, November 28, 2005 6:18 PM
Subject: RE: heap size problems (speed) [2]


 From: Cristian S [mailto:[EMAIL PROTECTED] 
 Subject: Re: heap size problems (speed) [2]
 
 Frankly I have no ideea what's the point of loading almost 
 400M of data in memory in a HashMap.

If it's worth doing, it's worth doing to excess.  Or maybe not.  Try
turning on -verbose:gc and see if you're going through a lot of garbage
collections.  If your max heap is 512mb and you're using 400mb of it for
the cache, there may not be much left for request processing.  Should
also try a memory profiler to see just how full the heap really is.

 - 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: Java databases as alternative to MySQL on OS X Server? (OT)

2005-11-28 Thread Mieke Banderas
Mieke Banderas said:

I'd like to know
where/how exactly Java threads are started/killed on Hotspot in OS X.
Doesn't java threads mainly intercommunicate within the JVM? Context
switches? 
Is it really a completely dead end that minimizing the OS threading in
Mac OS X and keeping threads within JVM could improve performance?

It would seem so, as I now learnt that The HotSpot JVM uses native
threads. The only possible escape then would be to use another JVM that
doesn't on OS X. But I'm not sure how advisable that is. Anyone uses
alternative JVMs on OS X out there?

I downloaded AppPerfect Test Studio http://www.appperfect.com/
products/devsuite/jp.html to see if I can build a test case and test my
current server and perhaps make comparisons with some of the suggested
Java DBs later. AppPerfect support was very helpful suggesting test
methods. Anyone out there testing their webapplications with this product?

I wonder how much faster Linux could run on my G3 server hardware. I
would have lots of work replacing all the built in services in Mac OS X
Server to give me all that control also in Linux, buy maybe I have to.
I'm a bit cashstrapped for new hardware, so I need to get as much
performance I can. Or perhaps I should try to get a PC just for the DBs.


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



RE: Java databases as alternative to MySQL on OS X Server? (OT)

2005-11-28 Thread Caldarale, Charles R
 From: Mieke Banderas [mailto:[EMAIL PROTECTED] 
 Subject: Re: Java databases as alternative to MySQL on OS X 
 Server? (OT)
 
 It would seem so, as I now learnt that The HotSpot JVM 
 uses native threads. The only possible escape then would 
 be to use another JVM that doesn't on OS X. But I'm not 
 sure how advisable that is. Anyone uses alternative JVMs 
 on OS X out there?

The last JVM I know of that avoided native threads was Sun's 1.3 version
running in green threads mode.  Performance and stability were nothing
to brag about.  There are several academic JVMs kicking around with
varying degrees of stability and compliance with the spec that might not
use native threads.  None are really appropriate for production use.

I've only toyed with it, but Solaris 10, along with Postgres, is
available for free download, ready to install and run on an x64/x86
system.  Yet another learning curve...

 - 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: Web-application and Tomcat icon

2005-11-28 Thread Anto Paul
On 11/29/05, Aladin Alaily [EMAIL PROTECTED] wrote:
 Hello,

 Every time I deploy an application using Tomcat 5.5.12, the usual tomcat
 icon is being displayed in the url.

 I would like to know how I can replace that icon with my own... or
 better yet, no put any icon at all.


The icon displayed on the browser is favicon.ico that is in ROOT. You
can replace it with your own icon.


--
rgds
Anto Paul

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



RE: How to set the admin console for 5.5.x

2005-11-28 Thread Caldarale, Charles R
 From: N S, Shridhar [mailto:[EMAIL PROTECTED] 
 Subject: Re: How to set the admin console for 5.5.x
 
 I had followed all these steps, except that the admin 
 folder under ROOT was missing! Since, this is not documented
 in Tomcat documents, thought of sharing the exact steps.

An interesting theory, but it's not correct.  The webapps/ROOT/admin
directory contains only the dummy admin page that says the admin app
must be separately downloaded and installed.  This directory can be
completely removed with no ill effects (I've just tried it).  I suspect
that the real problem may have been that during your experimentation you
put the index.html file from webapps/ROOT/admin into
server/webapps/admin; when I did that, I got the same symptoms you did.

 - 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: Web-application and Tomcat icon

2005-11-28 Thread Caldarale, Charles R
 From: Anto Paul [mailto:[EMAIL PROTECTED] 
 Subject: Re: Web-application and Tomcat icon
 
 On 11/29/05, Aladin Alaily [EMAIL PROTECTED] wrote:
 
  I would like to know how I can replace that icon with my own... or
  better yet, no put any icon at all.
 
 The icon displayed on the browser is favicon.ico that is in ROOT. You
 can replace it with your own icon.

This is browser cuteness.  If you run a packet trace [I'm doing almost
anything tonight to avoid writing documentation], you'll see something
like:
GET /favicon.ico HTTP/1.1\r\n
coming from the browser near the end of a page load (at least with
Firefox).  Besides replacing favicon.ico, you can also just delete it
without harm other than having Firefox show a blank page icon instead.
IE, of course, won't show anything other than its own logo, AFAIK.

 - 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: JDBC Resource Configuration

2005-11-28 Thread Nikola Milutinovic

Martin Dubuc wrote:


I am defining a number of JNDI resources in the
server.xml file in the GlobalNamingResources section.
As part of defining JDBC resources in this section,
the username and password attributes are specified.
The password is specified as clear text. I am
wondering if there are ways to encrypt the passwords
used for the JDBC resources or if it is possible not
 



Well, you have to give credentials someplace, server.xml seams like a 
good place to do it. It can be made unreadable by users other than tomcat.



to define at all, but provide it in the Java sources
instead.
 



??? Isn't that stupid?

Sorry for lashing out, but one of the ideas of defining a JNDI resource 
IS the ability to move connection credentials, among other things, OUT 
of your source. Why would you want every developer on your team 
(including those 20 in India) to know your user/pass for the DB? What is 
the benefit?


Nix.

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



Re: Singleton memory leak after redeploying.

2005-11-28 Thread erh
On Mon, Nov 28, 2005 at 06:24:52PM +0100, Lionel Farbos wrote:
 Hi Juan,
 
 I think your problem can't be solved (only) by Tomcat.
 The problem is that objets stay in memory because of pointers on static 
 references...

but aren't those supposed to go away when the classloader is no longer
referenced?  If you can't get to the classloader that loaded the class
then you can't get to the static fields, so it should be gc'd.  no?

eric

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



Re: css and images (stupid question?)

2005-11-28 Thread Kristian Rink
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Terence et al;

and at first thanks for the many hints regarding this issue.

Terence M. Bandoian schrieb:
 My understanding is that relative URLs in CSS style sheets are relative
 to the location of the style sheet, not the HTML page which references
 the style sheet.

Yeah, indeed. I finally solved my problems by referencing to the css
within my jsps using the absolute server path, and now everything works
the way it's supposed to. Thanks guys! :)

Cheers,
Kris


- --
Kristian Rink *  http://zimmer428.net * jab: [EMAIL PROTECTED]
icq: 48874445 *  fon: ++49 176 2447 2771

Be yourself the kind of change you want to see in this world. (Gandhi)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDjAAAcxBAPOA1m6wRAo/FAJ4rbXr3c1BmJTK+Lf8mK8xQQuujDwCfUncH
hVp1o/q0DjeCoqMCFT7Qp3E=
=2WXq
-END PGP SIGNATURE-

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



unix user auth within servlets/jsps?

2005-11-28 Thread Kristian Rink
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all;

another question which probably can be considered stupid, but
nevertheless: I'm in an attempt of learning how to deal with
server-sided java by rebuilding an intranet solution formerly
implemented in Perl which currently runs atop gnu/linux. The java
solution I'm about to build is intended to fully replace this, which
requires me to do two basic things besides just presenting content:

- - users need to be enabled to upload files to some pre-defined folder
within the unix filesystem

- - users need to have a download page where they can fetch files from
within their $HOME


- From a Perl programmers point of view, determining which folders to use
might be an easy task doing some black text-processing magic using
/etc/passwd, but that's somehow not the way, I guess. Besides this,
users of course need to login to the site before they may up/download
anything, so I need to authenticate them against the Unix-style user
information stored locally. I'm not yet completely sure how to deal with
this... So, two questions:

* How to link a jsp/servlet-based app to any unix-based user management?
Will I have to take a dive into JAAS for this, or is there a faster way?

* Generally, since this is not really tomcat-related (just to the point
that I'm using tomcat for this): Can anyone recommend a good
mailing-list for j2ee newbies? :)

Thanks for any hints and bye.
Cheers,
Kris

- --
Kristian Rink *  http://zimmer428.net * jab: [EMAIL PROTECTED]
icq: 48874445 *  fon: ++49 176 2447 2771

Be yourself the kind of change you want to see in this world. (Gandhi)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDjAG/cxBAPOA1m6wRAhCFAJ93nOEvBmswoIPShERNzMHEN2vEowCfRn3z
J/0u0aHMlfJJm7tMeN0Nu98=
=xMMI
-END PGP SIGNATURE-

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



Re: Web-application and Tomcat icon

2005-11-28 Thread Nikola Milutinovic

Caldarale, Charles R wrote:

From: Anto Paul [mailto:[EMAIL PROTECTED] 
Subject: Re: Web-application and Tomcat icon


On 11/29/05, Aladin Alaily [EMAIL PROTECTED] wrote:
   


I would like to know how I can replace that icon with my own... or
better yet, no put any icon at all.
 


The icon displayed on the browser is favicon.ico that is in ROOT. You
can replace it with your own icon.
   



This is browser cuteness.  If you run a packet trace [I'm doing almost
anything tonight to avoid writing documentation], you'll see something
like:
GET /favicon.ico HTTP/1.1\r\n
coming from the browser near the end of a page load (at least with
Firefox).  Besides replacing favicon.ico, you can also just delete it
without harm other than having Firefox show a blank page icon instead.
IE, of course, won't show anything other than its own logo, AFAIK.
 



And the hilarious thing is that IE 5.5 introduced that Favourite Icon 
concept, I believe. It was taken out in 6.0. Talk about consistency...


I mean, I know it is just bells and whistles, but it was kinda nice.

Nix.

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