[RESULT][VOTE] Tomcat 5.5.12 is stable

2005-10-09 Thread Yoav Shapira
Hi,
The 5.5.12 stability vote is now over, and the release is stable.  The
following votes were cast for stable:
Jeanfrancois Arcand
Allistair Crossley
Henri Gomez
Jim Jagielski (not sure if this one is binding in the strictest sense of the
word)
Remy Maucherat
Peter Rossbach
Yoav Shapira
Mladen Turk

There were no beta or alpha votes.  I'll go update the web site.  

There have been no code changes since the alpha release, so if you already have
the 5.5.12-alpha distribution you don't have to go download a new distro.

Thank you,

Yoav Shapira
System Design and Management Fellow
MIT Sloan School of Management
Cambridge, MA, USA
[EMAIL PROTECTED] / www.yoavshapira.com

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



[ANN] Tomcat sources moved to Subversion

2005-10-05 Thread Yoav Shapira
Hi,
FYI, the Tomcat source code has been moved to Apache's Subversion (SVN)
repository.  The old CVS repositories are now locked down: they can still be
used for checking out code, but no further work will be done in them.  For
details on how to work with SVN, please see
http://www.apache.org/dev/version-control.html.  Please note that we are still
verifying some of the build scripts to make sure they work in the new
structure.  Thanks,

Yoav

--- Henri Yandell [EMAIL PROTECTED] wrote:

 Date: Wed, 5 Oct 2005 21:17:10 -0400
 From: Henri Yandell [EMAIL PROTECTED]
 To: Tomcat Developers List tomcat-dev@jakarta.apache.org
 Subject: Re: CVS-SVN Schedule
 
 On 10/2/05, Mark Thomas [EMAIL PROTECTED] wrote:
  Mark Thomas wrote:
   Mladen Turk wrote:
   Can somebody make a firm statement on the timings?
   1. Until when (Date:Hour:Minute) commits could be done
   2. Wen the CVS will be locked for commit (same format)
 
  This is now set for Wednesday 5th October 2005 at 8pm US Eastern time.
  It should be completed by 11pm US Eastern time.
 
 All done :)
 
 http://svn.apache.org/repos/asf/tomcat/connectors/
 http://svn.apache.org/repos/asf/tomcat/jasper/
 http://svn.apache.org/repos/asf/tomcat/container/catalina/
 http://svn.apache.org/repos/asf/tomcat/container/tc5/
 
 svn co https://svn.apache.org/repos/asf/tomcat/connectors/
 jakarta-tomcat-connectors
 svn co https://svn.apache.org/repos/asf/tomcat/jasper/ jakarta-tomcat-jasper
 svn co https://svn.apache.org/repos/asf/tomcat/container/catalina/
 jakarta-tomcat-catalina
 svn co https://svn.apache.org/repos/asf/tomcat/container/tc5/
 jakarta-tomcat-5
 
 I'll keep checking email and the jira entry on and off tonight in case
 there are problems. CVS is locked down, all commits should goto
 tomcat-dev, Mark's modification scripts are all successfully run and
 read/write is set to anyone in tomcat (in the asf-authorization file
 that Remy can edit).
 
 Hen
 
 -
 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]



[ANN] Apache Tomcat 5.5.12-alpha Released

2005-09-23 Thread Yoav Shapira
23 September 2005 - Apache Tomcat 5.5.12-alpha Released

The Apache Tomcat team is proud to announce the immediate availability of
Tomcat 5.5.12-alpha. This version contains several bug fixes, including an
import change to session attribute storage concurrency that is required by the
upcoming Servlet Specification v2.5. In addition to these changes, this release
is a significant milestone for two reasons:

This release is the last one to be done using the CVS repository at Apache. The
Tomcat team is moving to the Subversion (SVN) repository as part of the overall
Apache initiative to do so. Access instructions for the SVN repository are
available at http://www.apache.org/dev/version-control.html. The move is
expected to be complete within the next week.

This release is also likely the last one to use the Jakarta pages. As part of
Tomcat's move to a top-level project (TLP) at Apache, we will be migrating our
content to http://tomcat.apache.org, which is still under construction at this
time. That site will have its own download pages and related information. We
will keep the key jakarta URLs intact with redirection, but please keep an eye
out and update your bookmarks to http://tomcat.apache.org as/when appropriate.
As part of the TLP move, distribution names have changed from jakarta-tomcat-*
to apache-tomcat-*, and similar minor branding changes will gradually become
visible in the web site and documentation. We thank the Jakarta project for its
support over the years, and we will continue collaborating on projects and
issues of common interest.

The Release notes are available at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html

Downloads:
Binaries: http://jakarta.apache.org/site/binindex.cgi#tomcat-5.5
Sources: http://jakarta.apache.org/site/sourceindex.cgi#tomcat-5.5

The Apache Tomcat Team

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



[ANN] Apache Jakarta Tomcat v5.5.10-alpha Released

2005-07-24 Thread Yoav Shapira
The Apache Jakarta Tomcat team is proud to announce the immediate availability
of Tomcat 5.5.10-alpha. This build contains 110 improvements, including bug
fixes, enhancements, and documentation updates.  There are several interesting
new features, such as Apache Portable Runtime (APR)-based HTTP/1.1 and AJP/1.3
protocol handlers with SSL support, an experimental NIO-Socket channel for the
AJP/1.3 connector, improved support for Java 5 using the Eclipse 3.1 JDT,
clustering support at the Engine and Host levels, and more.

The Release notes are available at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html

Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi#tomcat-5.5
Sources: http://jakarta.apache.org/site/sourceindex.cgi#tomcat-5.5

The Apache Jakarta Tomcat Team 

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



[ANN] Tomcat 5.5.9 voted stable

2005-04-11 Thread Yoav Shapira
The Apache Jakarta Tomcat team is proud to announce the immediate availability
of Tomcat 5.5.9 stable. This build contains numerous bug fixes, documentation
updates, and other improvements.

Please note that while all core features have been tested and voted stable,
there is a known issue in this build related to the clustering module. The fix
for this issue is available by itself at Bugzilla, and will be included in
subsequent Tomcat releases. Again, this issue only impacts users of Tomcat's
native clustering module.

Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html

Downloads: http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi

The stability voting thread is available at MARC at AIMS.

The Apache Jakarta Tomcat Team 

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



[ANN] Apache Jakarta Tomcat v5.5.9-alpha Released

2005-03-27 Thread Yoav Shapira
The Apache Jakarta Tomcat team is proud to announce the immediate availability
of Tomcat 5.5.9-alpha. This build contains numerous bug fixes, documentation
updates, and other improvements.

Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html

Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi#tomcat-5.5
Sources: http://jakarta.apache.org/site/sourceindex.cgi#tomcat-5.5

The Apache Jakarta Tomcat Team 

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



[ANN] Apache Jakarta Tomcat 5.5.8-alpha Released

2005-02-20 Thread Yoav Shapira
The Apache Jakarta Tomcat team is proud to announce the immediate availability
of Tomcat 5.5.8-alpha. This build contains numerous bug fixes, documentation
updates, and other improvements. 

Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES 

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html 

Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi#tomcat-5.5 
Sources: http://jakarta.apache.org/site/sourceindex.cgi#tomcat-5.5 

The Apache Jakarta Tomcat Team

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



[VOTE][RESULT] Tomcat 5.5.7 Stability

2005-01-30 Thread Yoav Shapira
The Apache Jakarta Tomcat team is proud to announce that Tomcat 5.5.7 has been
voted stable after substantial evaluation and testing.  The vote thread is
archived at http://marc.theaimsgroup.com/?t=11067421773r=1w=2 among other 
places.

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



[ANN] Apache Jakarta Tomcat 5.5.6-alpha Released

2004-12-12 Thread Yoav Shapira
The Apache Jakarta Tomcat team is proud to announce the immediate availability
of Tomcat 5.5.6-alpha. This build contains numerous bug fixes, documentation
updates, and other improvements. 

Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES 

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html 

Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi#tomcat-5.5 
Sources: http://jakarta.apache.org/site/sourceindex.cgi#tomcat-5.5 

The Apache Jakarta Tomcat Team


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



[ANN] Tomcat 5.0.30-beta Released

2004-11-25 Thread Yoav Shapira
The Apache Jakarta Tomcat team is proud to announce the immediate availability
of Tomcat 5.0.30-beta. The release contains a significant number of bug fixes,
and we expect it to be ratified as a Stable release when the vote takes place
next week as usual. 

Release notes: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/RELEASE-NOTES 

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html 

Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi#tomcat-5.0 
Sources: http://jakarta.apache.org/site/sourceindex.cgi#tomcat-5.0 

The Apache Jakarta Tomcat Team 

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



[ANN] Apache Jakarta Tomcat 5.5.4-alpha Released

2004-10-30 Thread Yoav Shapira
The Apache Jakarta Tomcat team is proud to announce the immediate availability
of Tomcat 5.5.4-alpha. This build contains numerous bug fixes and other
improvments, and hopefully gets us closer to the first stable 5.5 release. 

Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES 

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html 

Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi#tomcat-5.5 
Sources: http://jakarta.apache.org/site/sourceindex.cgi#tomcat-5.5 

The Apache Jakarta Tomcat Team 

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



Re: Problem using IIOP from servlet in Tomcat 5.0.18

2004-09-16 Thread Yoav Shapira
Hi,
I have some problem when people spam me ;)  Please stick to the mailing list
and avoid personal emails.  And remember
http://jakarta.apache.org/tomcat/faq/tomcatuser.html#why.

Thanks,

Yoav

--- Gaurav Handa [EMAIL PROTECTED] wrote:

 hi 
 
  I have some problem in calling the methods which use corba from the tomcat.
 
  1) I have configured eclipse 3.0 and Tomcat 5.0.18 on my machine
  2) I have a class which communicates with my server using IIOP . The method
 which does that is tested and it works fine standalone ie when invoked from
 main method of its class.
  3) When I try to call the same method from my servlet using this class
 instance it gives exception  :
 
org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 208 completed:
 Maybe
   at com.sun.corba.se.internal.iiop.IIOPConnection.purge_calls(Unknown
 Source)
   at com.sun.corba.se.internal.iiop.ReaderThread.run(Unknown Sourc
 
   Any help will be highly appreciated. 
 
  Thanks in advance :)
 
 Regards,
 Gaurav Handa
 9281
 
 


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



[ANN] Apache Jakarta Tomcat 5.5.1 Released

2004-09-07 Thread Yoav Shapira
The Apache Jakarta Tomcat team is proud to announce the immediate availability
of Tomcat 5.5.1. This second build in the 5.5 branch contains a number of
significant stability improvements over 5.5.0, as well as a host of
documentation updates and minor fixes. 

Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES 

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html 

Downloads: 
Binaries: http://jakarta.apache.org/site/binindex.cgi
Sources: http://jakarta.apache.org/site/sourceindex.cgi 

The Apache Jakarta Tomcat Team

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



[ANN] Apache Jakarta Tomcat 5.5.0 Released

2004-08-31 Thread Yoav Shapira
The Tomcat Team announces the immediate availability of Apache Jakarta Tomcat
5.5.0. 

This is the first release of the new Tomcat 5.5 branch, and as such it is not
yet stable. We expect significant additional changes, including possible
changes to packaging, dependencies, and Tomcat internal APIs, before the first
5.5 stable release is made. 

Please note that we are still in the process of updating documentation for this
branch. Of special note is the JRE 5.0 requirement: running with JRE 1.4 is
also possible, and instructions are provided with the distribution. 

Release notes: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES 

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/changelog.html 

Downloads: Binaries: http://jakarta.apache.org/site/binindex.cgi Sources:
http://jakarta.apache.org/site/sourceindex.cgi 

The Apache Jakarta Tomcat Team 

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



[ANN] Apache Jakarta Tomcat 5.0.28 Released

2004-08-29 Thread Yoav Shapira
The Tomcat Team announces the immediate availability of Apache Jakarta Tomcat 
5.0.28.

Please refer to the change log for the list of changes:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html

Release notes:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/RELEASE-NOTES

Downloads:
Binaries: http://jakarta.apache.org/site/binindex.cgi
Sources: http://jakarta.apache.org/site/sourceindex.cgi

Please note that the stability rating (alpha/beta/stable) for this release will
be announced separately in about a week.

The Apache Jakarta Tomcat Team



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



RE: Servlet mappings?

2003-09-04 Thread Yoav Shapira
Hey,
Mike's suggestion is good.  A purer approach is possible with tomcat 5,
because the 2.4 servlet spec allows for a servlet to be mapped as a
welcome-file.

Yoav Shapira

On Wed, 3 Sep 2003, Mike Cherichetti (Renegade Internet) wrote:

 I don't think this can be done with mappings.  You can put an index.jsp file
 with only a forward/redirect call in it to transfer control to your servlet.
 I've done this before, seems to work quite well.

 Mike

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 03, 2003 8:55 PM
 To: [EMAIL PROTECTED]
 Subject: Servlet mappings?


 I have a web app with multiple servlets. I would like one of those
 servlets to handle all requests to http://mywebserver/. Basically I want
 it to do the same thing as the welcome-file in the web.xml. How can I do
 this?


 Thank You,

 Justin A. Stanczak
 Web Manager
 Shake Learning Resource Center
 Vincennes University
 (812)888-5813




 -
 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: servlet mappings

2003-09-03 Thread Yoav Shapira
Howdy,

 It used to be that servlet mapping was straight-forward and now it seems to
 be obfuscated. For example I want the url

They haven't really changed in a long long time ;)

 myhostip:myport/webappname/Form

    This used to work and now it doesn't; Why !

 !-- servlet-mapping
 servlet-nameAeFormServlet/servlet-name
 url-pattern*/Form/url-pattern
 /servlet-mapping
 --

I doubt this used to work: review the servlet spec section on servlet
request matching to see.  Instead, have
url-pattern/Form/url-pattern
and that's it.

* in a url-pattern doesn't always mean the same as anything, especially
in the regular expression since of the word, because * doesn't match the
empty string.  So */Form is not matched on a request to /Form.  (All of
these are of course relative to your context base).

Set debug=99 for the context and/or connector in server.xml to see the
exact steps it is performing to match a servlet to incoming requests.

Yoav Shapira

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



Re: CV_Therapeutics

2003-08-23 Thread Yoav Shapira
Howdy,
These are being sent by viruses/worms from addresses that are subscribed
to the list.  I try to catch them before but because the addresses are
legit they don't show up for me to moderate...

Yoav Shapira

On Fri, 22 Aug 2003, Jens Skripczynski wrote:

 Hi,

 *aehm* how could this unrelated email make it to tomcat-user ?

 admin, hr:
   ole0.bmp
 
  Dear Applicant:
  We have received your employment inquiry and would like to thank you for giving us 
  the opportunity to review your resume. It will be evaluated by a member or our 
  Human Resources staff and then forwarded to those supervisors who may be able to 
  utilize your background and experience.
  If your qualifications match our current needs, we will contact you within four to 
  six weeks to arrange an interview. If there does not appear to be an appropriate 
  opportunity at this time, your resume will remain active for six months and will 
  be reviewed against future openings.
  Thank you for expressing interest in CV Therapeutics.
  Sincerely,
  Human Resources Department
 



 Ciao

 Jens Skripczynski


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



RE: E-Mail to CompuServe Customer Service

2003-08-23 Thread Yoav Shapira
Howdy,
That someone is me (for tomcat-user, tomcat-dev, and a couple of other
lists).  I don't verify emails from subscribed addresses --
that's automatically approved per Apache guidelines.  Otherwise I'd have
to check thousands of messages a day -- I get enough as it is ;(

Use a filter until the infected machines are cleaned/quarantined.

Yoav Shapira

On Fri, 22 Aug 2003, Kannan Sundararajan wrote:

 Normally there would be someone verifies the email before going inot users
 group.. But seems no one is verifying.. It is flooding already in my inbox..


 -Original Message-
 From: Mike Curwen [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 22, 2003 1:33 PM
 To: 'Tomcat Users List'
 Subject: RE: E-Mail to CompuServe Customer Service


 Is this
 http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
 tml

 ??



  -Original Message-
  From: CompuServe Customer Service [mailto:[EMAIL PROTECTED]
  Sent: Friday, August 22, 2003 12:27 PM
  To: Tomcat Users List
  Subject: E-Mail to CompuServe Customer Service


 -
 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: running tomcat from CD

2003-08-21 Thread Yoav Shapira
Howdy,
Note, however, that all FileLoggers have a configurable directory.  The
workDir for host and context is configurable as well.  The
system.out/system.err destination is set to
$CATALINA_HOME/logs/catalina.out in $CATALINA_HOME/bin/catalina.sh and can
be changed at will.

So a more accurate answer might be:
- You need to modify the above in your server.xml and catalina.sh before
burning your copy of tomcat to CD
- Whatever directory you use for your logs and workDir (which is required
by the servlet spec, as I said earlier) needs to be off the CD-ROM, but
accessible and writeable.

Yoav Shapira


 \On Thu, 21 Aug 2003, Halstead, Chris wrote:

 Clarify 'completely'.  If you have no access to writable disk you'll be unable to 
 produce logs or persist context data under ./work.  I suppose that you could do some 
 fancy stuff with a RAMdisk, assuming that you are running on an OS that supports 
 this.  With an out of the box binary set you wouldn't be successful...catalina.sh 
 will fail when it can't create ./logs/catalina.out.

 -chris

  -Original Message-
  From: samckins [mailto:[EMAIL PROTECTED]
  Sent: Thursday, August 21, 2003 9:30 AM
  To: [EMAIL PROTECTED]
  Subject: running tomcat from CD
 
 
 
  Is there a way to run Tomcat completely off of a CD-ROM?
 
  Thanks
  Scott
 
  -
  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: JNDI References To Tomcat 4.1

2003-08-15 Thread Yoav Shapira
Howdy,
I believe he was referring to external access to tomcat's JNDI provider,
which is tricky.  In-memory is easy and you're right a JDBC resource can
be configured (just like any other JNDI resource).

Of course, if tomcat's JNDI provider moves into its own jakarta-commons
component as we've been discussing, I bet you'd have standalone JNDI very
soon ;)

Yoav Shapira

On Fri, 15 Aug 2003, Micael wrote:

 This is mistaken, if you mean what you say.  There is a JDBC resource
 available via JNDI in Tomcat.  You have to code it, of course, but it
 definitely is available.

 At 02:53 PM 8/15/2003 -0500, Madere, Colin wrote:
 I think your inclinations that Tomcat is not a naming service are correct.
 I have not seen reference to anything that suggests you can set up resources
 in Tomcat that are available via JNDI.  JBoss, certainly, as it does provide
 a JNDI server (whatever the appropriate name for that is), as I've used that
 with JMS/JBossMQ.  AFAIK, the Tomcat JNDI setup stuff is just for processes
 internal to Tomcat, but that is an educated guess, not a known fact :)
 
 -Original Message-
 From: Jason Mowat [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 15, 2003 12:14 PM
 To: [EMAIL PROTECTED]
 Subject: JNDI References To Tomcat 4.1
 
 
 Greetings,
 
 I am trying to create a standalone application that references a DBCP on
 Tomcat.  I'm not sure if I can do this; I've seem some articles that seem to
 suggest that it can be done, but again, I'm not sure.  I've read
 http://www.mail-archive.com/[EMAIL PROTECTED]/msg08353.html.
 
 I have set up in tomcat/conf/server.xml the following context info:
 
DefaultContext
  Resource name=jdbc/test_db auth=Container
 type=javax.sql.DataSource/
 
  ResourceParams name=jdbc/test_db
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
 
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter
 
parameter
  nameurl/name
  valuejdbc:oracle:thin:@internal.sbgh.mb.ca:1521:test/value
 
/parameter
 
parameter
  nameusername/name
  valuetest/value
/parameter
 
parameter
  namepassword/name
  valuetest/value
/parameter
 
parameter
  namemaxActive/name
  value20/value
/parameter
 
parameter
  namemaxIdle/name
  value3/value
/parameter
 
parameter
  namemaxWait/name
  value100/value
/parameter
  /ResourceParams
 
/DefaultContext
 
 Note that I have not created any references in a web.xml, since I will not
 be running an application, per se, from Tomcat.  PERHAPS THIS IS WHERE MY
 PROBLEM IS?
 
 The client code I am using is not a servlet or a JSP; it's a simple piece of
 code to see if I can communicate with the database pool on Tomcat as
 configured above.
 
 Hashtable env = new Hashtable();
 env.put(
  Context.INITIAL_CONTEXT_FACTORY,
  org.apache.commons.dbcp.BasicDataSourceFactory
 );
 
 //  ***  THIS IS ANOTHER AREA WHERE I MAY BE WRONG! *** env.put(
  Context.PROVIDER_URL,
  http://localhost:8080;
 );
 
 try {
  InitialContext initCtx = new InitialContext(env);
  DataSource ds =
 (DataSource)initCtx.lookup(java:comp/env/jdbc/test_db);
  Connection conn = ds.getConnection();
  Statement stmt = conn.createStatement();
  ResultSet rset = stmt.executeQuery(SELECT * FROM tbl_test);
  conn.close();
  initCtx.close();
 }
 catch(NamingException e) {
  fail(Naming exception thrown);
 }
 catch (SQLException e) {
  fail(SQL Exception thrown);
 }
 
 I start Tomcat, assuming that the pool is set up.  Then I use the client to
 try to get an initial context from it.  This throws a naming exception,
 because it doesn't know how to get an initial context for
 org.apache.commons.dbcp.BasicDataSourceFactory at http://localhost:8080.
 
 My first question: can I do this?
 My second question: If I can't do it like this, do I need to set up a JNDI
 provider (like on JBoss) and set up the pooling there? My final question:
 It feels as if my problem is simply setting up the PROVIDER_URL properly
 so that it can get the context from Tomcat.  I've done LDAP PROVIDER_URLs
 before, but never one that gets a data source factory from a servlet
 container.  Can I use http over port 8080 to get the data source factory?
 Is there a different mechanism for getting the factory from code that is not
 residing within the servlet container?  Can this even be done on Tomcat?
 
 I appreciate any help that anyone can provide.
 
 Cheers,
 Jason
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED

Re: Tomcat version

2003-07-15 Thread Yoav Shapira
Howdy,
ServletContext#getServerInfo()

This is a FAQ, search the archives before you post.

Yoav Shapira

--- Billy Ng [EMAIL PROTECTED] wrote:
 Hi folks,
 
 Is there any api to get the tomcat version?
 
 Thanks!
 
 Billy Ng


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: Servlets/JSP crash, static content manager app OK

2003-07-02 Thread Yoav Shapira
Howdy,
See intermixed -- there are a lot of different questions here ;)

 This turned out to be the case, but for a funky reason.  By using the

JDBC drivers are a frequent cause for this.  Another is JMS clients.

 It turns out that the SCSI backplane was the real problem and had to be
 replaced.  Since getting this server back up was the main priority, I didn't
snip

Good piece of debugging there ;)  Those can be a pain.

 Connection.  I have since re-coded our ConnectionPool so that it abandons the
 Connection creation thread after 5 seconds (i.e. Thread.join(5000)).  There

It's interesting to hear this in light of the currently raging discussion among
the DBCP developers on whether DBCP should support abandoning connections after
a certain timeout.  See the DBCP messages from the past couple of days on the
jakarta-commons-dev mailing list for more details.

 Turn on debug=99 in server.xml (wherever you see debug=0).  Same
 thing for the servlets defined in $CATALINA_HOME/conf/web.xml.
  
 Wowthat's a lot of logging on a production machine.  It was very hard to
 find anything useful inside all the clutter, but by selective use of
 debug=99 in certain containers it was at least manageable.

Yup, that's a ton.  In the presence of a hard to reproduce problem, I prefer to
start with overkill and then turn things off as I narrow down / rule out
possible causes.  It's a subjective thing ;)

 
 No security manager.  I removed all the tomcat webapps besides manager and it
 didn't make a difference.  My real question is why does this runaway thread
 crash almost everything in Tomcat?  It doesn't seem to kill a lot of

It's a JVM effect.  It's not specific to tomcat, would likely happen in any
container.  The way it manifests itself might be particular to tomcat.

 resources.  If a single execution thread (from a servlet or JSP) goes on
 infinitely, why does it screw up the whole servlet container?  Or rather,
 part of the container since static pages and the manager app still worked
 fine even when things were bad.

It didn't sound like the manager app was fine (it was hanging and you had to
hit reload).  And I don't recall but I thought the static pages were simply
cached in your browser.

Consider the case of a single thread somewhere in the JVM doing
while(true);

Nothing else matters, the JVM will be stuck, no matter how well-written the
container is.

 On a related note, how do you know when you reach a load that exceeds the
 capacity of your server?  I'm happy to set up load-balancing if need be, but
 I have no idea how to detect the need other than anecdotal slowness.

You determine an acceptable response time for a page.  You write a script that
calls the page.  You use a tool to run the script that lets you increase the
number of concurrent requests.  You run the script, measure response time, and
when it drops below the acceptable range, you've reached your max capacity for
the current configuration.  Then you start tuning, e.g. maxProcessors for your
connector.

There are ample free (and non-free) tools to do the above: The Grinder, Load
(from PushToTest), JMeter, wget, etc etc.

Yoav Shapira


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: Page does not immediately display on restart

2003-07-02 Thread Yoav Shapira
Howdy,

   Please be sure to try and access the page after giving the command to
 restart the container but before it has finished restarting.

Are you serious? ;)  That's not a valid test IMHO and I'm not going to try it
at all.  While the container is restarting and it's restarting, and I don't
expect anything to be available.

Yoav Shapira


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Java Process Pool

2003-07-02 Thread Yoav Shapira
Howdy,
Commons-pool is a generic pooling framework.  It's not specific (and in fact
not that good, because of sync issues) for threads.  Similarly, it's not
specific to Processes.  You would just use GenericObjectPool.  If you want to
synchronize things (or otherwise control thread-safety), you'd have to
subclass/wrap GenericObjectPool yourself.

In fact, come to think of it, SynchronizedGenericObjectPool may not be that bad
an addition to commons-pool.

Yoav Shapira


--- James Carpenter [EMAIL PROTECTED] wrote:
 What pool implementation of the Commons-Pool utility provides process based
 pooling as opposed to thread based pooling?  Remember that I need a process
 pool to circumvent issues with my JNI extended java code not being thread
 safe.  (The underlying C library being wrapped isn't thread safe.)
 
 http://jakarta.apache.org/commons/pool/
 
 - Original Message - 
 From: Shapira, Yoav [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Wednesday, July 02, 2003 1:40 PM
 Subject: RE: Java Process Pool
 
 
 
 Howdy,
 You can use commons-pool for this.
 
 The approach itself (pooling processes) is risky and likely to be
 non-portable.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: James Carpenter [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 02, 2003 4:38 PM
 To: tomcat users list
 Subject: Java Process Pool
 
 Does anyone know of a convenient way to create a Java process pool.  A
 thread pool won't work as I am trying to pool some JNI code wrapping a
 C
 library that isn't thread safe.
 
 I would rather not have to create my own pooling mechanism.
 
 Sincerely,
 James Carpenter
 Email: [EMAIL PROTECTED]
 
 
 
 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential, proprietary
 and/or privileged.  This e-mail is intended only for the individual(s) to
 whom it is addressed, and may not be saved, copied, printed, disclosed or
 used by anyone else.  If you are not the(an) intended recipient, please
 immediately delete this e-mail from your computer system and notify the
 sender.  Thank you.
 
 
 -
 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]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: loadOnStartup: Default Context Resources unavailable?

2003-07-02 Thread Yoav Shapira
Howdy,

 Is there a place to put these definitions so that a new application
 deployed out of ant, for example, would be able to pick them up?

GlobalNamingResources in the server.xml file.

 Am I missing an easy way to create the context with resources using ant?

No, you're not AFAIK.

I still like putting them in the Context rather than some global place, on
the princinple that web appliations should be self-contained.  Having a
fallback/default/global configuration just complicates debugging.  However, I
see it would be useful in development/testing.

Yoav Shapira


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: tomcat and log4j

2003-06-30 Thread Yoav Shapira
Howdy,
It does work if you place logj4.properties in WEB-INF/classes and log4j.jar in
WEB-INF/lib.  If you could please be a bit more explicity when you say This
does not seem to be working perhaps I could help more.

Yoav Shapira

--- Dean A. Hoover [EMAIL PROTECTED] wrote:
 I want to use log4j inside a tomcat application. According
 to the log4j short manual, all I have to do is drop my
 log4j.properties file into WEB-INF/classes and then I can
 just use it. This does not seem to be working. Can someone
 help?
 
 Thanks.
 
 Dean Hoover
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: How to log all accessed URLs?

2003-06-30 Thread Yoav Shapira
Howdy,
Comment in the AccessLogValve in $CATALINA_HOME/conf/server.xml.

Yoav Shapira

--- Roman Fail [EMAIL PROTECTED] wrote:
 Is there an easy way to log all the URL's that clients have requested?  We
 are having serious intermittent problems on a production server, and a devil
 of a time figuring out what is causing them (Tomcat requires a kill -9 to
 stop!). I'm hoping we can examine the URLs from just before a crash and see
 if there is a pattern or a specific servlet/JSP with issues.
  
 I am also evaluating the RootCause profiler on the production server, which I
 haven't mastered well enough to get anything useful out of yet.  
  
 Tomcat 4.1.24 Standalone
 Sun HotSpot client JVM 1.4.1_02
 RH Linux 8.0 (2.4.18 kernel)
  
 Thanks!
  
 Roman Fail
 POS Portal, Inc.
  
  
  
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: Tomcat 5 - Jetspeed JSP Portlets do not display

2003-06-30 Thread Yoav Shapira
Howdy,

   Well, it looks like its Tomcat 5.0.3.  I downloaded and installed
 Tomcat 4.1.24 and the Jetspeed JSP Portlets work just fine with it. 
 Anybody on the Tomcat 5 team listening?

I am, for one ;)  Now that you've opened a bugzilla item about it, so will
others.  

I've looked at the item (by the way, it's not a Blocker and likely to be
demoted) and was disappointed to not see any error logs.  Are there any
messages at all?  Can you post the JSP page that's not rendering?

Yoav Shapira

=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Tomcat 5 - Jetspeed JSP Portlets do not display

2003-06-29 Thread Yoav Shapira
Howdy,
Are there any errors in the tomcat logs?  In the Jetspeed logs?  Considering
the developers of Jetspeed themselves use tomcat to develop and test, I'd be
surprised if there were out-of-the-box problems.

Yoav Shapira

--- grenoml [EMAIL PROTECTED] wrote:
 I have the following setup:
 J2SE 1.4.2-beta
 Tomcat 5.0.3
 Jetspeed 1.4-b4
 
   I installed the JPortal tutorials and I can add JSP Portlets to my
 panes, but there are problems.  The JSP Portlet title bar shows up on
 the pane but none of its contents will display.  This happens for any
 JSP Portlet type.  The only way I can manage to get the JSP Portlets to
 display is by selecting 'Edit account' at the top of the page (in the
 login area) and then just cancelling on the next page.  Has anyone else
 tried using Jetspeed JSP Portlets with Tomcat 5 and seen this behavior
 before?  Is this a Jetspeed problem?, a Tomcat problem?, a JDK
 problem?.  Any help would be appreciated.  
 
 thx,
 Gerry Reno
 
 P.S.  I also asked this question in the jetspeed-user list.
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: ServletException

2003-06-25 Thread Yoav Shapira
Howdy,
Perhaps the fact that in 4.0.x your JSPs were package-less and in 4.1.x they're
in org.apache.jsp?  (Or vice versa, I can never remember).

Anyways, why are you using the tomcat-specific HttpRequestFacade instead of the
servlet specification's HttpServletRequest?

Yoav Shapira

--- Woodrich, Jason D (Jason) [EMAIL PROTECTED] wrote:
 Ok, I tested this under standalone on 4.1 and on 4.0.6.  It works fine under
 4.0.6 but has the ServletException under 4.1.  Anyone know if anything
 changed between the versions that would prevent HttpRequestFacade methods
 from being accessible from objects outside of the JSP?
 
 Thanks
 
 Jason Woodrich
 - Avaya, Inc.
 - Knowledge Management  Tools Development 
 
 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 25, 2003 7:03 AM
 To: Tomcat Users List
 Subject: RE: ServletException
 
 
 
 Howdy,
 First try to reproduce this problem using tomcat-standalone, to take out
 the apache variable.  That will make debugging easier.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: Woodrich, Jason D (Jason) [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 24, 2003 9:47 PM
 To: [EMAIL PROTECTED]
 Subject: ServletException
 
 I'm getting a ServletException when I try to access methods in a
 HttpRequestFacade passed to one of my own classes.  It's being casted
 as a
 HttpServletRequest in hopes to maintain portability.  I'm able to
 access
 the methods fine from the JSP that passes the request variable, and the
 reference is exactly the same when compared ..  but for some reason
 whenever I call it from my class it freaks out and causes the
 ServletException which leads to the JasperException ..
 
 For example:
 
 jsp file:
 
 [EMAIL PROTECTED] language=java import=my package.* % --
 %
 Cheese hi;
 hi=new Cheese(request);
 %
 
 part of the class:
 
 public class Cheese {
   private HttpServletRequest _request;
   public Cheese (HttpServletRequest req) {
 System.out.println(uri: +req.getRequestURI());
 }
   }
 
 Returned is:
 org.apache.jasper.JasperException:
 javax/servlet/http/HttpServletRequest
  at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
 ava:
 254)
  at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295
 )
  at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
 atio
 nFilterChain.java:247)
  at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
 terC
 hain.java:193)
  at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
 ve.j
 ava:256)
  at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 invo
 keNext(StandardPipeline.java:643)
  at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
 480)
  at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
 ve.j
 ava:191)
  at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 invo
 keNext(StandardPipeline.java:643)
  at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
 480)
  at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24
 15)
  at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
 a:18
 0)
  at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 invo
 keNext(StandardPipeline.java:643)
  at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
 alve
 .java:171)
  at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 invo
 keNext(StandardPipeline.java:641)
  at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
 a:17
 2)
  at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 invo
 keNext(StandardPipeline.java:641)
  at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
 480)
  at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
 .jav
 a:174)
  at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 invo
 keNext(StandardPipeline.java:643)
  at
 org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve
 .jav
 a:221)
  at
 org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
 invo
 keNext(StandardPipeline.java:641)
  at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
 480)
  at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995

Re: Tomcat's Ant Tasks

2003-06-24 Thread Yoav Shapira
Howdy,
I don't particularly feel like download Appfuse and contributing patches to it
at the momeny -- no spare bandwidth ;(  However, a few comments on your wiki
page:

- If you have something that's working and are happy with, there's no need to
change to these ant tasks.

- Reload is not pointless, you don't have to do a deploy anyways if you want to
just reload an existing webapp (useful if you've changed, for example,
configuration files).

- The build.xml in the tomcat App Developer's guide contains task definitions
for these tasks, so you didn't have to write your own ;)

- I don't know why you're getting the JDBC driver null message, but I think
I've seen that before: searching the tomcat-user archives might help.

- I don't know why you're getting the IOException, and I don't think I've seen
it before, so I'd be curious if it's particular to your app, e.g. if something
in your app calls getRealPath() on startup or shutdown.

The Ant tasks are just another way to do things: some people find it
convenient.  I use them some times, when I feel like it.  I think Craig
McClanahan once mentioned he uses them exclusively now, hardly ever actually
restarting his tomcat instance.

Yoav Shapira

--- Raible, Matt [EMAIL PROTECTED] wrote:
 I'm having trouble using Tomcat's Ant Tasks.  I've written up a wiki page on
 how I'm using them and the problems I'm experiencing.  Any help is
 appreciated.
 
 http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks
 
 Thanks,
 
 Matt
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: custom error pages?

2003-06-21 Thread Yoav Shapira
Howdy,
Define an exception, e.g. MyException.  Define an error-page (in web.xml) for
that exception.  Throw that exception from your servlet.

Yoav Shapira

--- seera naveen [EMAIL PROTECTED] wrote:
 Hi,
  
 I am using FORM based authentication and JNDIRealm.  Is it possible to have
 custom error pages in Tomcat?  Apart from Invalid username and password, I
 want to check for another attribute and if that attribute is not set, I want
 to throw another message.
  
 Thanks
 Naveen
 
 SMS using the Yahoo! Messenger;Download latest version.


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Tomcat 4 and DecodeInterceptor

2003-06-21 Thread Yoav Shapira
Howdy,
Your DecodeInterceptor usage covered inappropriately designed web page ;)

Use a Filter to do this in tomcat 4.  You'll have to write a request charset
setting filter as that doesn't come built-in to tomcat.

Yoav Shapira

--- j p [EMAIL PROTECTED] wrote:
 Hi,
 
 I have problem moving my App. to tomcat 4. On TC 3.3 I used
 DecodeInterceptor  / feature to force cp-1250 when decoding request
 data.
 I've searched this in TC 4.1, but I didn't find anything with similar
 functionality.
 I have following problem: I have jsp page with form, which has set
 contentType to
 text/html; charset=windows-1250. When I'm processing posted data on
 another page,
 request.getParameter() returns incorrectly decoded strings - national
 characters are replaced with '?'.
 
 Any help?
 
 Thanks, Jan Peknik.
 


 Stydím se ho vytáhnout! A jaký je vᚠdùvod vymìnit svùj telefon za nový? 
 Nokia 6610 již od 6977 Kè. http://www.atlas.cz/clickAD.asp?ad=32086


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Tomcat Standalone and Virtual Hosting

2003-06-18 Thread Yoav Shapira
Howdy,
This partially depends on your OS.  If you're on windows, you can just run
tomcat on port 80.  If you're on unix, port 80 is privileged and you need to:
- Work around that, e.g. by using sudo or commons-launcher
- Put an Apache front-end to serve static content on port 80, and connect it to
tomcat for dynamic content.

Either tomcat or apache by themselves support virtual hosting.  For tomcat, you
simply add more Host elements in server.xml.  See the Host configuration
reference in the tomcat docs.

Yoav Shapira

--- Latesha Williams [EMAIL PROTECTED] wrote:
 I have a web application deployed under Tomcat v4.1.18 (port 8080).  Is it
 also possible to configure the Tomcat Standalone Service to support virtual
 hosting, but on port 80?  If so, how is this accomplished?  What is the
 best practices method for storing static web content in this situation?
 Should the web content be placed in the Tomcat directory, or someplace else?
 Any guidance you can provide is appreciated.
 
 Latesha Williams
 Applications Support, Information Technology
 American Museum of Natural History
 [EMAIL PROTECTED]
 (W) 212.769.5947
 (C) 917.837.2460
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: newbie - program structure

2003-06-17 Thread Yoav Shapira
Howdy,
If you're just starting out with servlets/JSPs/webapps, follow the app
developer's guide instead of forming bad habits ;)  It's here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html

Don't worry about Apache front-end and JK or other connectors for now.  Just
develop, deploy, test on tomcat-standalone first.  You'll likely find that the
performance, including for static resources, is sufficient for your needs.

Yoav Shapira


--- [EMAIL PROTECTED] wrote:
 I guess I am confused.
 
 I set up my workers2.properties to link to
 /exmaples/jsp/*
 
 then when I type in the ip/port of myu web server (NOT
 tomcat) /examples/jsp/dates/dates.jsp for example it
 comes up.
 
 SO
 
 I thought hey, you don't I copy an example into my
 main www dir and see if that works.
 
 for some reason there are no jsp files in the
 examples, they are all .java and .class.  now I do use
 java files but I guess they do not actually in it is
 called by an htnl doc so not a big deal BUT why are
 these no .jsp? I searched all the examples/jsp and
 found no .jsp.
 
 what the heck is going on?
 
 correct me if I am wrong...
 what it seems to be is that when you set say
 /examples/jsp/*
 
 that is then placed into the tomcat path. so if I
 wanted to branch out my own stuff, I would need to add
 a dir somewhere (I can look into that) and then link
 to that, I guess jsp does not like the company of
 other stuff, just likes to be on it's own.
 
 still a little confused, and the file extensions! ???
 
 
 
 
 --- [EMAIL PROTECTED] wrote:
  ok, I am used to Java and PHP and had a question
  about
  where to put jsp/servlet code. what is the best
  thing
  to do?
  
  I am used to just putting it anywhere I want as long
  as I sperate it how I would like BUt with jsp it
  seems
  you need to tell it the actual folders the jsp is
  in.
  
  what I was looking for is like, here is my normal
  web
  page strucutre, full of sub dirs.
  
  /path/to/my/www/root/index.html et al
  
  when I see a jsp file, to send to tomcat.
  
  is this possible, I am not sure how the magic
  happens.
  
  where does the jsp file go? in the normal www
  structure and the processing is passed on that file
  to
  the tomcat process for execution, correct?
  
  I don't see how to set it up recurvisly it does not
  seem to work? I know I can do *.jsp etc.
  
  Thanks
  
  __
  Do you Yahoo!?
  SBC Yahoo! DSL - Now only $29.95 per month!
  http://sbc.yahoo.com
  
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: java processes created by tomcat

2003-06-17 Thread Yoav Shapira
Howdy,
How I wish people would search the archives ;(  This is a consequence of
linux's reporting of java threads as processes: all of these processes are one,
sharing the same amount of memory.

Yoav Shapira

--- siddharth [EMAIL PROTECTED] wrote:
 hello,
 
 
 I am running following servers on my linux machine
 
 1. tomcat4  using many JSPs and Servlets
 2. apache
 3. qmail
 4. postgresql
 etc.
 
 Tomcat is the only process which is usijg java.
 
 when i do 'top' and 'sort by memory usage' i get
 following output.
 
 -
 
  2:10pm  up  5:24,  5 users,  load average: 0.22,
 0.52, 0.83
 168 processes: 166 sleeping, 2 running, 0 zombie, 0
 stopped
 CPU states:  1.1% user, 17.6% system,  0.0% nice,
 81.1% idle
 Mem:   384416K av,  381356K used,3060K free,
 2324K shrd,   11720K buff
 Swap:  522072K av,   60548K used,  461524K free
71616K cached
 
 
 
   PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM
   TIME COMMAND
  9458 root   9   0  118M 115M 23768 S 0.0 30.8
   0:24 java
  9489 root   8   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9490 root   9   0  118M 115M 23768 S 0.0 30.8
   1:45 java
  9491 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9495 root   9   0  118M 115M 23768 S 0.0 30.8
   0:01 java
  9502 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9537 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9538 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9539 root   9   0  118M 115M 23768 S 0.0 30.8
   0:05 java
  9639 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9717 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9719 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9720 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9721 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9723 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9724 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9725 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9726 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9727 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9728 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9729 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9730 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9731 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9732 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9733 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9734 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9735 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9736 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9737 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9738 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9739 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9740 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9741 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9742 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
  9743 root   9   0  118M 115M 23768 S 0.0 30.8
   0:00 java
 
 -
 
 ***
 Notice that first page displayed by output of 'top' is
 full of JAVA processes ...
 
 
 is this a problem ? because my machine is getting
 heavily loaded. ( with around 400 MB of RAM )
 
 
 
 please help
 
 thanks.
 
 
 -- 
   siddharth
   [EMAIL PROTECTED]
 
 -- 
 http://www.fastmail.fm - Faster than the air-speed velocity of an
   unladen european swallow
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: CVS snapchot compile problems

2003-06-17 Thread Yoav Shapira
Howdy,
I guess you're trying to buld tomcat 5?  Are you going the download way or the
build.properties way?

Yoav Shapira

--- Antonio_Fiol_Bonnín [EMAIL PROTECTED] wrote:
 Hello,
 
 I have just followed the instructions on 
 http://jakarta.apache.org/tomcat/building.html and I get the following:
 
 [... (successful) beginning of build and some blank lines removed ...]
 build-servletapi:
  [echo] == Building: 
 ./binaries/servlet-api-2.4/lib/servlet-api.jar
 prepare:
 static:
 compile:
 examples:
 javadoc:
 jar:
  [copy] Copying 1 file to 
 /home/fiol/tomcat-build/jakarta-servletapi-5/jsr15
 4/build
   [jar] Building jar: 
 /home/fiol/tomcat-build/jakarta-servletapi-5/jsr154/bi
 naries/servlet-api-2.4/lib/servlet-api.jar
 dist:
 [... I understand that servlet API has been built correctly, then 
 jarred, so it's OK ...]
 [... however ...]
 build-jspapi:
  [echo] == Building: ./binaries/jsp-api-2.0/lib/jsp-api.jar
 prepare:
 static:
 compile:
 [javac] Compiling 42 source files to 
 /home/fiol/tomcat-build/jakarta-servlet
 api-5/jsr152/build/classes
 [javac] 
 /home/fiol/tomcat-build/jakarta-servletapi-5/jsr152/src/share/javax/
 servlet/jsp/JspFactory.java:58: cannot resolve symbol
 [javac] symbol  : class Servlet 
 [javac] location: package servlet
 [javac] import javax.servlet.Servlet;
 [javac]  ^
 [javac] 
 /home/fiol/tomcat-build/jakarta-servletapi-5/jsr152/src/share/javax/
 servlet/jsp/JspFactory.java:59: cannot resolve symbol
 [javac] symbol  : class ServletRequest 
 [javac] location: package servlet
 [javac] import javax.servlet.ServletRequest;
 [javac]  ^
 [javac] 
 /home/fiol/tomcat-build/jakarta-servletapi-5/jsr152/src/share/javax/
 servlet/jsp/JspFactory.java:60: cannot resolve symbol
 [javac] symbol  : class ServletResponse 
 [javac] location: package servlet
 [javac] import javax.servlet.ServletResponse;
 [javac]  ^
 [... and some more errors: it seems it is not finding the servlet API ...]
 
 Any clues?
 
 I am not quite familiar with ANT so I don't know how I can force the 
 JSR152 compile to include servlet-api.jar in its classpath. Would anyway 
 this be the solution? I suppose if it was, someone would have spotted it 
 before...
 
 Antonio Fiol
 
 
 

 ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s



=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: heap size config

2003-06-17 Thread Yoav Shapira
Howdy,

In Unix, java will make
 512MB swap every time we make a System Runtime call.

I don't think so: can you prove the above?

Will this
 hurt the Tomcat preformnace? 

Lowering -Xms will only slightly degrade performance during the allocation
phase.  The effects are negligible during that phase and none afterwards.

I read the article from Sun saying the -Xms and
 -Xmx should be the same.  Is it always true?

No.  Almost nothing in the realm of performance tuning is always true.  Setting
-Xms equal to -Xmx is useful only if you're going to have a constant level
memory usage more or less throughout the life of your JVM.  If you start low
and stay low until peak demand comes in, keeping -Xms low is more beneficial. 
GC and other operations are always faster on a smaller heap.

Of course, nothing is more beneficial then having stress tests to run against
different combinations of settings.  That way you can see the actual effect on
your system intead of relying on me or someone else's article.

Yoav Shapira



=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: FAQ? JDK 1.4 Logging in Tomcat - long and discussive

2003-06-16 Thread Yoav Shapira
Howdy,
You haven't missed something simple.  In fact, I'd venture you've spent more
time and thought (and reached better conclusions and solutions) that most
people who've considered the problem.

Ditch JDK 1.4 logging.  Use log4j.  Everything you want here can be done using
log4j's Repository Selector: and it's even done for you for a webapp/context
environment such as tomcat in Jacob Kjome's servlet context repository
selector, currently available in the log4j sandbox and slated for inclusion in
log4j 1.2.x.

Yoav Shapira

--- Tim Shaw [EMAIL PROTECTED] wrote:
 Feedback welcome - I've been working on this without much help, and 
 others may well have more experience (which I'd like to benefit from too).
 I would love to use a better approach than that described here ...
 
 I needed to be able to log my various (multiple-context) web apps. As I 
 couldn't get commons-logging to work with the JDK 1.4 logging, I went 
 the 'direct' route ... and it turns out it wasn't the commons-logging 
 that was the 'problem'. 'Logging' below refers to the JDK 1.4 
 java.util.logging facility ...
 
 Most of the stuff on the web just takes you through the api, and shows 
 how easy it is to get logging to work.
 That's fine - it actually is fairly easy to program to.
 
 However ...
 
 Running Tomcat, I wanted multiple applications logging to different 
 areas (files and/or db etc), and I started to run into difficult behaviour.
 
 The problem I had was to load my logging configurations into the 
 LogManager - not the mechanism, but the practice. This is a singleton, 
 within the scope of the bootstrap class loader. Consequently, the same 
 object is shared across all contexts (and Tomcat itself). This means 
 that resetting it and then loading an app-specific config file is not an 
 option. Loading an app-specific properties file is an option (via 
 getResourceAsStream), but that has the further restriction that each 
 web-app has to have a distinct namespace (see below). The properties 
 file is not very functional anyway - it specifies defaults for defaults!
 
 There is a 'config' option, which allows you to specify a Class for 
 logging initialisation ... but this class has to be accessible from the 
 bootstrap loader (common/lib, shared/lib ... nope! - it's gotta be in 
 jre/lib/ext).
 
 Ideally, I would like to be able to supply an app-specific logging 
 configuration file as part of the deployment of my web-app. Potentially, 
 this could be done by loading a data-file from the context and 
 interpreting it to provide the appropriate logging structure (loggers, 
 handlers etc).
 
 But ... I have controller servlets in different contexts extending the 
 same class from a 'utility' jar (implementing the Command pattern for 
 Servlets). Most of the code is in the super-class (action class 
 retrieval/activation etc).
 Following the logging examples, using the class name as the logging 
 context, and making the log variable visible (protected) down to the 
 sub-classes, I end up with multiple log files (logging expands the %u to 
 provide a unique filename when it can't open[?] the file ... I don't 
 even want to guess what it does when the %u isn't given).
 Additionally, I can't find a way to determine whether the logging had 
 been initialised for a given context.
 This means that (IMHO) utility classes cannot log!
 
 I have ended up by extending the logging.properties mechanism, in the 
 time-honoured way, by adding '.' separated properties for each 
 logging-context :
 eg context.handler.level = INFO
 context.handler.class = com.xxx.app.DBHandler
 etc
 These are then added into the (system-wide) logging.properties file, and 
 the Class which interprets them is specified in the config and has to be 
 jar'd into the jre/lib/ext.
 Additionally, I have removed all logging-system stuff from my utility 
 classes. I only get a Logger when I have a sufficiently unique path to 
 guarantee no conflicts.
 
 This gives me the flexibility I need to log multiple apps in an 
 appserver (tomcat) environment ... but I'm not very happy with it. It 
 could be refactored to allow each context's Controller to load their own 
 properties, and then interpret those (on my list of things to do), but 
 this relies on calling a log-initialisation routine ... not something I 
 want to do within 'client' JSP's (which live in another context). I have 
 put JSP's into a different package (component separation - no problem), 
 so the current setup allows me to specify that package as a root for 
 which logging is enabled ... but this would not work without 
 initialisation code unless I used the 'config' class approach.
 
 An additional restriction is still that I cannot log directly from the 
 utility super-class. I have to create log variables at the concrete level.
 
 Summary : I don't think jdk 1.4 logging has come of age - it's nice and 
 simple from the API POV ... but in real world usage it's lacking.
 
 Please tell me I've missed

Re: tomact shutdown issue

2003-06-16 Thread Yoav Shapira
Howdy,
There's always the obvious question: are you sure tomcat is running when you're
shutting it down?  The simplest cause for this error message is that tomcat is
not running.

A slightly less obvious reason is that tomcat could not start up properly, and
could not open a listening socket on the shutdown port.  Use netstat or an
equivalent command to make sure tomcat is listening on the shutdown port when
you're issuing the shutdown command.

Yoav Shapira

--- [EMAIL PROTECTED] wrote:
 tomcat 4.1.24
 redhat 7.3
 apache 1.3.20 
 jdk j2sdk1.4.1_02
 
 tomcat is installed and is runnable
 
 when I try to close down using either the shutdown or
 the redhat shutdown script I get the error given
 below, now I have spent time searching and looking int
 he archive and see this is produced when tomcat is not
 running and is shutdown already, however this is not
 true in my case, if I do a ps auwx, I am still showing
 it running. The amazing thing is that sometimes it
 does shutdown, but it takes a few tries. ODD
 
 Please help
 
 PS I am a tomcat newbie so if you need any listings of
 files please let me know
 
 Thanks
 
 
 shutdown error 
 --
 Using CATALINA_BASE:   /var/tomcat4
 Using CATALINA_HOME:   /var/tomcat4
 Using CATALINA_TMPDIR: /var/tomcat4/temp
 Using JAVA_HOME:   /usr/java/j2sdk1.4.1_02
 Catalina.stop: java.net.ConnectException: Connection
 refused
 java.net.ConnectException: Connection refused
 at
 java.net.PlainSocketImpl.socketConnect(Native Method)
 at
 java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
 at
 java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
 at
 java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
 at java.net.Socket.connect(Socket.java:426)
 at java.net.Socket.connect(Socket.java:376)
 at java.net.Socket.init(Socket.java:291)
 at java.net.Socket.init(Socket.java:119)
 at
 org.apache.catalina.startup.Catalina.stop(Unknown
 Source)
 at
 org.apache.catalina.startup.Catalina.execute(Unknown
 Source)
 at
 org.apache.catalina.startup.Catalina.process(Unknown
 Source)
 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(Unknown
 Source)
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Best practice development directory layout for deploying exploded war

2003-06-13 Thread Yoav Shapira
Howdy,
My advice would be to follow the guide here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html

Don't use the space under tomcat's webapps directories as a live development
space.  Only deploy built applications there.  That means develop them
elsewhere on your file system, in a version-controlled tree.  Have an ant
script that builds your app and deploys it to the tomcat installation.

Yoav Shapira

--- White, Joshua A (HTSC, CASD) [EMAIL PROTECTED] wrote:
 Hello all,
 
 My company is contemplating the idea of deploying servlet applications on
 Tomcat in production. (woohoo!)
 
 I am hoping that some of you may suggest some best practices for laying out
 your development directory structure.  I have my directory structure layed
 out like an expanded war file.  If I point tomcat to this directory for
 expanded deployment, it makes it easy to edit/source control jsp files.  It
 also makes copying/updating/deleting jar/lib files a pain.  Do people set up
 a empty classes directory under the web-inf to source control their
 properties files or is it better to put them in a separate directory and
 copy them there?
 
 Is the best practice to do it this way or to copy your jsp/classes/libs to
 another exploded directory all together?
 
 Best Regards,
 
 Joshua
 
 
 
 
 
   
 
 
 This communication, including attachments, is for the exclusive use of 
 addressee and may contain proprietary, confidential or privileged 
 information. If you are not the intended recipient, any use, copying, 
 disclosure, dissemination or distribution is strictly prohibited. If 
 you are not the intended recipient, please notify the sender 
 immediately by return email and delete this communication and destroy all
 copies.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: rotating catalina.out

2003-06-12 Thread Yoav Shapira
Howdy,

 I am gonna ask the developers to switch to log4j instead of System.out, they
 might give me the finger :)

I wouldn't give you the finger ;)  There was a discussion in the winter about
making tomcat 5.x use log4j internally.

Yoav Shapira


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: rotating catalina.out

2003-06-12 Thread Yoav Shapira
Howdy,

 OTOH - After the startup message - nothing really should be written to it
 without making an effort to do so. So only badly written code which uses
 System.out/err will be the victim. This is the incentive to use a real
 logging package. Allowing rotation allows reward of bad code.

I agree in principal but reality is different.  People writing a module often
can't/don't require the user of the module (which is another software app) to
install a logging package.  System.out/System.err is the lower common
denominator, and I think it's a reasonable thing to use if you don't know
whether logging services will be available elsewhere.

This why containers should provide their administrator with means to divert
System.out/System.err into the container's logging mechanism.  Tomcat does this
with the swallowOutput feature.  IMHO, swallowOutput should be true by default,
so maybe I'll push for that in tomcat 5 ;)

When swallowOutput is true, the output gets redirected to the appopriate tomcat
logger, which rolls itself over nightly automatically.

Yoav Shapira

=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Class cast exception ...

2003-06-12 Thread Yoav Shapira
Howdy,
Print out the value of session.getAttribute(DBREADER) before you set it: that
way you can see what its real runtime class is.  It probably won't be that
locationHelper class you're trying to cast into...

Yoav Shapira

--- Mufaddal Khumri [EMAIL PROTECTED] wrote:
 Made a typo in my previous email .. heres the corrected email:
 
 I get the following error in tomcat:
 
 java.lang.ClassCastException
   at 
 org.apache.jsp.EditOffering_jsp._jspService(EditOffering_jsp.java:129)
 
 I looked at EditOffering_jsp.java and it has this at line 129:
 
 locationHelper = 
 (com.wavesinmotion.cw.classes.jsphelpers.LocationHelper) 
 pageContext.getAttribute(locationHelper, PageContext.SESSION_SCOPE);
 
 which in the corresponding .jsp page is:
 
 jsp:useBean id=locationHelper 
 class=com.wavesinmotion.cw.classes.jsphelpers.LocationHelper 
 scope=session
   jsp:setProperty name=locationHelper
property=dbReader
value=%= 
 session.getAttribute(DBREADER)% /
   jsp:setProperty name=locationHelper
property=dbWriter
value=%= 
 session.getAttribute(DBWRITER)% /
 /jsp:useBean
 
 Does anybody have any idea as to why i am getting this class cast 
 exception ?
 
 Thanks.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: webapp outside of CATALINA_HOME/webapp

2003-06-11 Thread Yoav Shapira
Howdy,

 when I start tomcat,  the file localhost_med_log.txt has the following
 errors:-
 
 2003-06-11 19:03:27 StandardContext[/jmed]: Error configuring application
 listener of class listeners.ContextListener
 java.lang.ClassNotFoundException: listeners.ContextListener
 
 and
 
 2003-06-11 19:03:27 StandardContext[/jmed]: Error configuring application
 listener of class listeners.SessionListener
 java.lang.ClassNotFoundException: listeners.SessionListener

So, make those listener classes available under your docBase (c:\med..)
WEB-INF\classes\... or WEB-INF\lib directory ;)

Yoav Shapira

=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: JVM Profilers

2003-06-11 Thread Yoav Shapira
Howdy,

 I am considering purchase of JProfiler, OptimizeIt 5.5, or JProbe.  Does
 anyone have wisdom to share on the features of each?  Are there other good
 profilers I should consider?

I like OptimizeIt, having used them all.  But the features are fairly similar. 
A Profiler is a key tool I highly recommend using frequently.

However, profilers are not designed for production use.  They will require much
more memory (often an order of magnitude) and slow down the system (again,
often by an order of magnitude or more) when running.  For production, there's
no substitute for good logging that you can control at runtime, e.g. log4j.

 We have been experiencing regular JVM crashes on our production Tomcat 4.1.24

What does the hs_err file say?

 installation.  Originally we were running the Sun HotSpot 1.4.1_02 client,
 then server (on RH Linux 8.0).  Now we've switched to BEA JRockit 8.1 and are
 still having crashes, clearly something is bad in our code - or perhaps we

Maybe you need to try on a different OS?  A different linux kernel?  On
Solaris, for example, you will get JDK crashes unless you download the Sun OS
patches for the JDK.

 We recently migrated from a Windows 2000/ServletExec 3.1/Sun HotSpot client
 1.3.1 environment which didn't have these problems - I'm not sure what to
 think at this point.  

And the code didn't change, right?  You only migrated do a different OS and a
different VM?

 Please reply directly to me (and cc the list) as I receive only the digest
 version.

Use the archives ;)  I like the ones at AIMS.

Yoav Shapira


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Installing Tomcat on solaris

2003-06-11 Thread Yoav Shapira
Howdy,
What errors are in the tomcat logs?

Yoav Shapira

--- Ozge Gundogdu [EMAIL PROTECTED] wrote:
 
 
 
  Hi;
  I have been trying to install tomcat 4.0.4 on solaris 5.7. and set the
  environment variables
  JAVA_HOME=/usr/java1.2
  CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.6
  then I run tomcat with this command,
  ./startup.sh
  It gives normal response like that
  
  Using CATALINA_BASE: /usr/local/jakarta-tomcat-4.0.6
  Using CATALINA_HOME: /usr/local/jakarta-tomcat-4.0.6
  Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4.0.6/temp
  Using JAVA_HOME: /usr/java1.2
  
  But when I did ps , I cannot see any instances of java running. and when I
  run http://localhost:8080 it gives page cannot be displayed  error.
  
  Thaks for your response!
  
  Ozge Gundogdu
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: tomcat linker error

2003-06-11 Thread Yoav Shapira
Howdy,

 also.. why do you believe that its a dll and not a jar error? thanks. --alex

Because System.loadLibrary() is not a call for jars or classes.  It's for JNI
resources, which on windows are DLLs 99% of the time.  As I said previously,
there's very little chance of help on this topic on this list: you should ask
whoever wrote the msjava.tools.nativ.MSJNIManager component for documentation /
assistance.

Yoav Shapira

=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Migration to Tomcat from Weblogic 5.1

2003-06-10 Thread Yoav Shapira
Howdy,
If your web application is coded and deployd according to the servlet
specification, you should just be able to drop it into tomcat without changes.

The more Weblogic-specific stuff you have, the more painful your migration will
be.  For example, all com.bea or com.weblogic classes you use will need to be
removed and the classes using them rewritten.  If your web.xml has non-standard
elements or elements in a non-standard order, you will need to correct that. 
If you rely on an invoker servlet, i.e. you have URLs like
/servlet/com.yourcompany.yourservlet in your webapp, you will need to either
comment in tomcat's invoker servlet or map your servlets in your web.xml file.

Other than that, give it a shot and let us know if you run into any problems...

Yoav Shapira

--- Subramaniam Kumar [EMAIL PROTECTED] wrote:
 Can someone point to 'migration steps' to migrate from Weblogic 5.1 to Tomcat
 4.1.24.
  
 I would like to gather all the migration details which will help the
 application developers. Even if the document doesn't exits , I think it will
 be useful for the Tomcat user community.
  
 I greatly appreciate if folks could share their knowledge/experience.
 
 
 -
 Do you Yahoo!?
 Free online calendar with sync to Outlook(TM).


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Tomcat and JNDI - Basic Question

2003-06-10 Thread Yoav Shapira
Howdy,
It might be that the fallback behavior is to use a public no-args constructor,
ala JavaBeans.

Yoav Shapira

--- Renato Romano [EMAIL PROTECTED] wrote:
 In the tomcat documentation it is said that to configure a new JNDI
 resource you should put a Resource entry in the Context portion of my
 app, and a following ResourceParams, indicating the java class name of
 the factory (the class that must implement ObjectFactory). This seems
 quite correct: in order to build an object, I need a Factory!! But I
 noticed it works fine even if the ResourceParams is not present ?? The
 conclusion is: I'm surely missing something !! How can Tomcat know how
 to build my object if I don't give the name of the factory class ???
 
 
   Context path=/dg3s docBase=dg3s reloadable=true
   Resource name=myJndiName type=com.blabla.MyType/
   !-- The following is not useful ?
   ResourceParams name=myJndiName
   parameter
   namefactory/name
   valuecom.blabla.MyTypeFactory/value
   /parameter
   /ResourceParams
   --
   /Context
 
 Any Help Appreciated!!
 Renato
 
 
 Renato Romano
 Sistemi e Telematica S.p.A.
 Calata Grazie - Vial Al Molo Giano
 16127 - GENOVA
 
 e-mail: [EMAIL PROTECTED]
 Tel.:   010 2712603
 _
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: lag when restarting tomcat

2003-06-10 Thread Yoav Shapira
Howdy,
You can reduce startup time by eliminating unneeded applications.  In
production servers, I hardly ever leave anything but the webapp itself: I
remove the admin, manager, docs, webdav, examples, ROOT contexts.  

Things that affect shutdown include your custom finalizers, if any.  Similarly,
destroy() methods in servlets, filters, and various shutdown methods in
listeners can take time to invoke and execute.

If you're really annoyed by this and care enough to contribute code, why don't
you profile tomcat startup to see where CPU time is spent, and then suggest
patches? ;)

Yoav Shapira

--- Euan Guttridge [EMAIL PROTECTED] wrote:
 If I bounce tomcat via the /bin/shutdown.sh  /bin/startup.sh scripts it
 takes at least 20 seconds until it responds again. This is still after my
 war has been unpacked and jsps compiled.. Any suggestions please?
  
 Running standalone, on linux 2*700mhz, 1GB. One application 30mb.
  
  
 Thanks
 Euan
  
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: [SOLVED] -Xincgc, -Xms600, -Xmx600

2003-06-09 Thread Yoav Shapira
Howdy,

 I finally managed to get my issue sorted out. After installing Tomcat
 on another machine to do some testing I noticed that it had the following
 value in the registry:
 
 JVM Library: C:\jdk1.3.1_03\jre\bin\hotspot\jvm.dll
snip
 Any comments?

Yeah, windows sucks ;)  I dislike it when settings like this are not
transparent and easy to debug.

Second comment: glad you got it fixed, and thanks for posting the update.

Yoav Shapira


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Assessing Tomcat's State

2003-06-08 Thread Yoav Shapira
Howdy,
Note that the premise of your question is flawed without a precise definition
of starting up and shutting down.  Consider a tomcat instance with N
webapps, each of which with one ServletContextListener.  Tomcat on startup will
send the contextInitialized event to each of these listeners.  Each listener
may do things that take a long time, and may or may not do them in the
background.  

In the above scenario, when is the starting up state over and the started
state entered?  Is it when tomcat sends all N events, or when all N events are
done processing?

Similar scenarios can easily be construed for shutting down, and they are not
limited to listeners as filters and servlets can all do varying amounts of
processing on startup and shutdown.

All of this may not matter in your scenario, so you may not have to worry about
it at all ;)  But they are important to keep in mind if you're trying to come
up with some sort of general solution.

Yoav Shapira


--- Francisco J. Bido [EMAIL PROTECTED] wrote:
 That's a good idea.  Thanks!
 
 Take care,
 -FB
 
 
 On Saturday, June 7, 2003, at 03:23  PM, Tim Funk wrote:
 
  The easy kluge is to hack the startup scripts  (or write wrappers) 
  around the startup scripts to maintain this status in some file, for 
  arguements sake: cowbell.txt
 
  In startup.sh -- echo starting  cowbell.txt
  In startup.sh, a timer does wgets on a static asset. Once the asset is 
  returned correctly: echo started  cowbell.txt
 
  In shutdown.sh -- echo stopping  cowbell.txt
  In shutdown.sh -- A timer looking for the java process id. Once the 
  process ID is gone, echo stopped  cowbell.txt
 
 
  -Tim
 
  Francisco J. Bido wrote:
  Thanks Tim,
  Those suggestions work pretty well for checking the running and the 
  stopped states.  The ones giving me a headache are really starting 
  up and shutting down.The only thing I can think of at this 
  point is to monitor the size of catalina.out and trigger an event 
  went it doesn't change.
  This is nasty since many things can cause the file to appear idle 
  i.e., a busy CPU.  Any thoughts on these assessing these remaining 
  states?
  -FB
  On Saturday, June 7, 2003, at 02:41  PM, Tim Funk wrote:
  Depending on your needs if you just need UP or down, you can use 
  wget or a similar agent.
 
  You can also set CATALINA_PID in unix before calling the startup 
  scripts and the file referenced by CATALINA_PID will contain the 
  process ID.
 
  Or you can write a LifeCycle Listener to trap startup and shutdown 
  events.
 
 
  -Tim
 
  Francisco J. Bido wrote:
 
  Is there any way to assess Tomcat's state via an environment 
  variable?  For example, I would like to poll an environment 
  variable to see if Tomcat is:
  1. starting up
  2. running
  3. shutting down
  4. stopped
  There're a bunch of other states out there but the above fulfill my 
  immediate needs.
  Parsing through the catalina.out log file is the only way I know 
  how to do this but this is approach is way too clumsy and ugly.
  Thanks!
  -FB
 
 
 
  -
  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]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: All threads are busy, waiting

2003-06-08 Thread Yoav Shapira
Howdy,

 Is it the maxProcessor option?

Yes.  See the configuration reference for the Connector element for details.

Yoav Shapira


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Clear user session

2003-06-08 Thread Yoav Shapira
Howdy,
Something else is modifying the session (adding/removing attributes or
otherwise modifying the backing collection of your session_var enumeration)
while you're iterating through it.

  while(session_var.hasMoreElements())
  {
  String key=(String)session_var.nextElement();

You need to make the above code synchronized on the session.  This may not be
as trivial as it sounds: for example, it might be impossible if your
environment is clustered.

Alternative options include doing this on session passivation or destruction
(probably the former), using the appopriate listener.  

Why are you clearing all the attributes instead of a specific one?  

Yoav Shapira


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Run Tomcat not as root

2003-06-08 Thread Yoav Shapira
Howdy,
Tomcat is a java program: whatever runs the java command is what runs tomcat. 
So if you create a user named tomcat with permission to run
$JAVA_HOME/bin/java, you're pretty much all set.  Make sure the user has rwx
permissions to tomcat's logs, temp, and work directories, and at least read
permissions for all the webapps.

Yoav Shapira

--- [EMAIL PROTECTED] wrote:
 Hi,
 How do I get it so that Tomcat does not run as root when I start it up on
 
 Linux? I know in Apache I create a new group and user and set it inthe 
 httpd.conf file. What is the best way to have the Tomcat run as user tomcat.
 
 Thanks,
 Kevin
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: Assessing Tomcat's State

2003-06-08 Thread Yoav Shapira
Howdy,
I use nagios for this: www.nagios.org.

Yoav Shapira


=
Yoav Shapira
[EMAIL PROTECTED]

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Figuring out which Unix process is which

2002-03-19 Thread Yoav Shapira

Hi,
We run multiple instance of tomcat using the same JAVA_HOME,
so when we run a ps command (Solaris 2.8) we see a bunch
of java processes, but can't tell which one is which instance
of tomcat.  Does anyone have any ideas to help this problem?

It's not possible for us to run the processes as different 
users, and the path is too long for the different CATALINA_OPTS
to show through.  

I realize this may be more of a Unix question, but if anyone
has suggestions, I'll be glad to hear them.  Thanks in advance,

Yoav Shapira
Millennium Pharmaceuticals

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Problems using own XML parser

2002-03-13 Thread Yoav Shapira

Hi,
JAXP is just a set of interfaces to isolate you from the parser
implementation class.  We use JAXP and have switched from Xerces
to Crimson and back at runtime without restarting the server and
without any problems.  

As to the performance of various parsers: you may find that what
matters more than the parser implementation is your approach,
e.g. SAX, DOM, XSLT, etc.  Just a couple of days ago, Sun
published a performance comparison of various parsers (including
Crimson and Xerces.  I don't remember if aelfred was included)
and various parsing approaches.  Check it out on the java.sun.com
site (there's also a link from www.theserverside.com).

Good luck, 

Yoav Shapira

John Wadkin wrote:
 
 Rick,
 
 Simple question, here comes the complex answer :)
 
 I'm a student who's working for my Uni for a year. I'm working on a small
 project to look at how best to implement a new Government recommendation -
 that all Higher Education institutions in the UK have some sort of Personal
 Development Planning (PDP) for students.
 The project is funded by the Higher Education Funding Council (HEFC -
 f-ki), so we don't have a lot of cash! Unlike America, education in the UK
 hasn't yet sold out to the big multinationals (Coca Cola day). This means
 that instead of using a proper server, I'm having to make do with a
 workstation - a Sun Ultra 10. I'm no expert on servers, loads, load
 balancing and all that, but I should imagine that performance will be a
 problem. In view of this, I'm keen to squeeze as much out of the server as
 I can. The person who actually wrote the servlet recommends using Aelfred
 because of it's speed, hence my asking about using a parser other than
 Xerces.
 Thanks to Charlie, I checked the bug database - didn't think it would be
 bug, and it isn't. The bug database mentioned postings on the list about XML
 parsers, which I've read. From what I can tell (it isn't too clear):
 
 4.0.1 only works with xerces.jar in common/lib - no per-WebApp parser is
 permitted
 4.0.4 will allow per-WebApp parsers so long as it implements something
 called JAXP - i.e. xerces
 
 Looks like the developers have been reading Microsoft's marketing strategy
 :) I might have it totally wrong - I don't fully understand all the stuff
 about parsers and classLoaders - nor should I!
 
 Thanks,
 
 John
 
 
 Quote for the week:
 
 The stupid neither forgive nor forget; the naive forgive and forget; the
 wise forgive but do not forget.
 
 Thomas Szasz, The Second Sin (1973)
 
 -Original Message-
 From: Rick K [mailto:[EMAIL PROTECTED]]
 Sent: 13 March 2002 06:09
 To: Tomcat Users List
 Subject: RE: Problems using own XML parser
 
 Maybe you covered this before, but:
 Why doesn't Xerces meet your needs?
 
 I'm not much of an XML expert, I'm just curious.
 
 --- John Wadkin [EMAIL PROTECTED] wrote:
  Charlie,
 
  It seems from:
 
 
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6374
 
 
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6628
 
  That webApps *can't* have their own parser. Stuck
  with Xerces 1, then! Taken
  a week to find that out :)
 
  Thanks,
 
  John
 
  Quote for the week:
 
  The stupid neither forgive nor forget; the naive
  forgive and forget; the
  wise forgive but do not forget.
 
  Thomas Szasz, The Second Sin (1973)
 
 
  -Original Message-
  From: Cox, Charlie [mailto:[EMAIL PROTECTED]]
  Sent: 12 March 2002 16:27
  To: 'Tomcat Users List'
  Subject: RE: Problems using own XML parser
 
 
  see the archives or bugzilla as this was addressed
  in 4.0.3 or 4.0.4b1(I
  don't remember which one)
 
  Charlie
 
   -Original Message-
   From: John Wadkin [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, March 12, 2002 10:59 AM
   To: 'Tomcat Users List'
   Subject: RE: Problems using own XML parser
  
  
   I'm not privy to the workings of the servlet.
  There's a
   properties file I
   edit to indicate the name of the SAX driver:
  
   #Xerces
  
  sax.driver.name=org.apache.xerces.parsers.SAXParser
  
   OR
  
   #Aelfred
   sax.driver.name=com.microstar.xml.SAXDriver
  
   Xerces works fine, but Aelfred doesn't. The driver
  names are
   correct and as
   I said, TomCat does load aelfred.jar
  
   Yes - I too would like to know if it's possible to
  use another parser!
  
   Thanks,
  
   John
  
   Quote for the week:
  
   The stupid neither forgive nor forget; the naive
  forgive and
   forget; the
   wise forgive but do not forget.
  
   Thomas Szasz, The Second Sin (1973)
  
  
   -Original Message-
   From: Evguenia Krylova
  [mailto:[EMAIL PROTECTED]]
   Sent: 12 March 2002 15:52
   To: Tomcat Users List
   Subject: RE: Problems using own XML parser
  
  
   Isn't it that udner Tomcat 4x you can specify
  class path for a
   context in server.xml. I saw something like this
  in the
   comments portion of server.xml. I have not tried
  this, but would
   like to know if you found a way to use another
  parser with Tomcat.
  
   I assume you don't use JAXP

I WANT System.exit(0) ;)

2002-02-21 Thread Yoav Shapira

Hi,
So tomcat4.0.2 remove the System.exit(0) call at the end of the
Bootstrap class, and there are good reasons to not have it there
(for embedded invocations of tomcat, etc.).  I'm also aware
of the possible harm of System.exit(0) and the use of SecurityManager
to prevent that.

Here's my situation, though: I use 3rd party code that I trust but
cannot modify, and I think this code creates threads and does not
interrupt/kill them appropriately.  Therefore, when I shutdown 
tomcat, the tomcat process never dies.  It stays resident in memory
etc.  This is not acceptable for us, so we can't use tomcat4.0.2.

I know relying on System.exit(0) is not a good idea.  Does anyone
have other ideas, suggestions, etc on this issue?  All appreciated,
and thanks in advance,

Yoav

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Manager options...

2002-02-20 Thread Yoav Shapira

Hi,
Sorry to bump in late in the thread, maybe this was already raised,
but in your server.xml, did you specify the privileged=true 
attribute for the Manager context?

Yoav

 If i enter http://myserver/managerstuff/list
 
 it then ask for login/password - OK
 
 and then generates an exeption below:
 
 javax.servlet.ServletException: Error allocating a servlet instance
 at
 org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:619)
 ../..
 - Root Cause -
 java.lang.SecurityException: Servlet of class
 org.apache.catalina.servlets.ManagerServlet is privileged and cannot be
 loaded by this web application

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: JAXP

2002-02-14 Thread Yoav Shapira

Hi,
It's in the Sun XML pack (among other places), at
http://java.sun.com/xml/downloads/javaxmlpack.html

Yoav Shapira


[EMAIL PROTECTED] wrote:
 
 I got it about 6 months ago and you're right, I can't seem
 to find it again.
 
 
 Where did you find jaxp.jar, if you did?  I
 have been looking everywhere

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Compression Filter Performance

2002-02-14 Thread Yoav Shapira

Hi,
I have a compression filter (variation of Jason Hunter's JavaWorld
article filter) working exactly as I want it to.  It wraps the
response in a GZIP output stream (if the client can handle it,
and the compression threshold is exceeded), and the client deals with
it.  

My question is, how can I measure how compressed my response is 
versus running without using the filter?  (I don't mind recycling
the server and changing web.xml between runs).  

Thanks in advance,

Yoav Shapira
Millennium Pharmaceuticals

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: null DataSource when trying to get JNDI InitialContext

2002-02-14 Thread Yoav Shapira

Hi,
I'm not sure if it matters, but did you try giving the name
of the driver class separated by periods instead of slashes, e.g.
com.ibm.db2.jdbc.app.DB2Driver
?

Yoav Shapira

George M. Coles wrote:
 
 Hi all,
 I am using tomcat for the firs time. I have v. 4.02, using jdk 1.4.
 
 I am attempting to deploy my app, which uses JNDI to look up a connection
 for its data access. I am using DB2 I have  placed the db2 jdbc zip file in
 my WEB-INF/libs dir. My server.xml looks like this:
 
 Context path=/pl docBase=E:/projects/fa/fa 
debug=5
 privileged=true
 Resource name=jdbc/PATHLINE 
auth=Container
 type=javax.sql.DataSource description=Pathline Database
 ResourceParams name=jdbc/PATHLINE
 parameter
 
namedriverClassName/name
 
valueCOM/ibm/db2/jdbc/app/DB2Driver/value
 /parameter
 parameter
 
namedriverName/name
 
valuejdbc:db2:PATHLINE/value
 /parameter
 parameter
 nameuser/name
 
valuedb2admin/value
 /parameter
 parameter
 namepassword/name
 
valuepassword/value
 /parameter
 /ResourceParams
 /Resource
 /Context
 
 When I do my context lookup, which should return a DataSource, the
 DataSource is null. I do not, however, get a naming exception, as I would
 expect if the resource could not be found.
 
 Has anyone had a similar experience? I am not quite knowlegeable enough
 about JNDI or Tomcat to see where my problem is.
 
 thanks,
 George Coles
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Log messages

2002-01-25 Thread Yoav Shapira

Hi,
Look at log4j: 
http://jakarta.apache.org/log4j

We've been using it for a while, both for development and production
logging, and it's just great.  Most of JSR47 (java.util.logging)
is based on log4j, and it's also used by several commercial and/or
big products like JBoss.

Yoav

James Adams wrote:
 
 Is there a class I can use to write log messages to the Tomcat log files
 ?  Can anyone explain how this is done ?  Also I have looked a wee bit
 at java.util.logging - can this also be used, or is it a better solution
 ?
 
 Thanks for any suggestions.
 
 -James Adams
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: java.lang.outofmemory exception

2002-01-03 Thread Yoav Shapira

Hi,
Default JVM allows for 64MB max to the heap.  You may want to 
increase that by using CATALINA_OPTS, e.g.:
CATALINA_OPTS='-Xmx128m'
would allow the JVM to use up to 128MB of memory.  There are many
other settings available, see the Java runtime options on java.sun.com.

Yoav

Frank Diakovasilis wrote:
 
 I wrote an application that, run within Tomcat(4.0) and really beaten on,
 throws an outofmemory exception.  The thing is, I don't think It is my app,
 and when viewing task manager, I see that there is plenty of memory
 available.  Has anybody come across this, is there a setting in Tomcat (or
 jvm for that matter) that will let me allocate more of the available memory
 to the app?

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat 4.0.1 Installation Problem (JAXP 1.1 Download)

2001-12-28 Thread Yoav Shapira

Hi,

1) I don't remember having to download JAXP myself for tomcat 
installation.  Doesn't tomcat come with and use Xerces internally?

2) You can get JAXP binaries, including xalan.jar, by download the
Java XML Pack (fall '01 is tested with tomcat 4.0.1, I don't know
about the latest, winter '01, but it should work):
http://java.sun.com/xml/downloads/javaxmlpack.html

3) PS files are PostScript.  It's text with all kinds of markup,
you probably downloaded some documentation instead of the binaries.

Good luck,

Yoav

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Filter mapping question

2001-12-28 Thread Yoav Shapira

Hi,
I have a servlet and a filter I want to be run when that servlet
is accessed.  However, the servlet is never accessed directly via
the browser.  Rather, it's embedded in a frameset and launched
using something like this:
a href=javascript:void(0); 
   onClick=thatframe.src='http://myhost/mycontext/myservlet'; return
true;
click here
/a

So in my web.xml, I have:
filter
  filter-namemyFilter/filter-name
  filter-classmyFilterClass/filter-class
/filter-name

filter-mapping
  filter-namemyFilter/filter-name
  servlet-namemyServlet/servlet-name
/filter-mapping

servlet
  servlet-namemyServlet/servlet-name
  servlet-classmyServletClass/servlet-class
/servlet

The problem is, tomcat never calls doFilter() for my filter when that
servlet is called.  The filter gets initialized appropriately (I have
logging comments on the filter's init(), doFilter(), destroy() methods).

If I go to http://myhost/mycontext/myservlet myself, the filter does
get called, so I know it has to do with the calling mechanism,
filter-mapping,
or something along these lines.

Thanks in advance, and sorry for the long post,

Yoav Shapira
Millennium Pharmaceuticals, Inc.
[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: How to get webapp name

2001-12-17 Thread Yoav Shapira

Hi,
Maybe what you're looking for is the webapp's context, and for
that you can try HttpServletRequest.getContextPath():
public java.lang.String getContextPath()
Returns the portion of the request URI that indicates the context of the
request. The context path always comes first in a request URI. The path
starts with a / character but does not end with a / character. For
servlets in the default (root) context, this method returns .
Returns:
a String specifying the portion of the request URI that indicates the
context of the request

Yoav

Neil Aggarwal wrote:
 
 Micael:
 
 I am looking for the name of the web application.
 
 For example, if I look at http://dev.leads-unlimited.com/leads/index.jsp
 
 The webapp name is leads.
 
 It is the same name as the directory that contains the
 JSP files.
 
 Thanks,
 Neil.
 
 --
 Neil Aggarwal
 JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
 Custom Internet DevelopmentWebsites, Ecommerce, Java, databases
 
  -Original Message-
  From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, December 16, 2001 4:04 PM
  To: Tomcat Users List
  Subject: Re: How to get webapp name
 
 
  At 02:29 PM 12/16/01 -0600, you wrote:
  Hello:
  
  Is there a way to get the webapp name in a JSP page?
  
  Thanks,
   Neil.
 
 
  Hi, Neil,
 
  Cannot tell what ou want here.  Try stating it differently.  What do you
  mean by webapp?
 
  -- micael
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Solaris VM crash? Full docs included

2001-12-06 Thread Yoav Shapira

Hi there,
So last night the JVM crashed on one of our big servers.  It had been
running without a problem for a while, but we've been experimenting
with tuning garbage collection, as this particular JVM is typically
around ~400MB in memory during the day.  Here are the details (sorry
for this long message, but I know it's a pointless question without
all the details I can provide).

Tomcat: 4.0.1 ($JAVA_HOME = /dvl/info/prj/infra/jdk1.3.1)
JVM: Sun JVM v1.3.1-b24 for Solaris
Server uname -a output: SunOS serverName 5.8 Generic_108528-04 sun4u
sparc SUNW,Ultra-Enterprise
(The server is a 12-CPU, 2GB RAM, big machine, and it had plenty of
available
memory, CPU usage was low all night without any spikes, nothing
suspicious)
(Java runtime parameters below)

Relevant catalina.out section:
---
Unexpected Signal : 11 occurred at PC=0xfe0c7d18
Function name=JVM_ArrayCopy
Library=/dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/server/libjvm.so

Current Java thread:

Dynamic libraries:
0x1
/dvl/info/prj/infra/jdk1.3.1/bin/../bin/sparc/native_threads/jav
a
0xff35  /usr/lib/libthread.so.1
0xff39  /usr/lib/libdl.so.1
0xff20  /usr/lib/libc.so.1
0xff33  /usr/platform/SUNW,Ultra-Enterprise/lib/libc_psr.so.1
0xfe00 
/dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/server/libjvm.so
0xff2d  /usr/lib/libCrun.so.1
0xff1e  /usr/lib/libsocket.so.1
0xff10  /usr/lib/libnsl.so.1
0xff0d  /usr/lib/libm.so.1
0xff30  /usr/lib/libw.so.1
0xff0b  /usr/lib/libmp.so.2
0xff08 
/dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/native_threads/libhpi
.so
0xff05  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libverify.so
0xfe7c  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libjava.so
0xff02  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libzip.so
0xfccd  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libnet.so
0xfccb  /usr/lib/nss_files.so.1
0xda3e  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libawt.so
0xd668 
/dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/motif21/libmawt.so
0xda39 
/dvl/info/prj/infra/jdk1.3.1/bin/../jre/lib/sparc/libmlib_image.
so
0xd640  /usr/dt/lib/libXm.so.4
0xd9c9  /usr/openwin/lib/libXt.so.4
0xda15  /usr/openwin/lib/libXext.so.0
0xda13  /usr/openwin/lib/libXtst.so.1
0xd740  /usr/openwin/lib/libX11.so.4
0xd9ee  /usr/openwin/lib/libSM.so.6
0xd97d  /usr/openwin/lib/libICE.so.6
0xd97a  /usr/openwin/lib/libdga.so.1
0xd630 
/dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libfontmanager.so
0xd942  /usr/openwin/lib/libdps.so.5

Local Time = Thu Dec  6 06:50:32 2001
Elapsed Time = 24574
#
# HotSpot Virtual Machine Error : 11
# Error ID : 4F530E43505002CC 01
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Server VM (1.3.1-b24 mixed mode)
#
# An error report file has been saved as hs_err_pid15459.log.
# Please refer to the file for further information.
#

-
End catalina.out excerpt
-

The error report file hs_err_pid15459.log contains a verbatim
copy of the above, no additional information.

Needless to say, the server died immediately, which I suppose is OK
to expect from Tomcat given such an internal JVM crash.  So no 
complaints, I'm just wondering if anyone has seen this crash before?

My theory is that it had to do with us slightly tweaking the
Java runtime parameters we'd been using, in an effort to improve
garbage collection on the machine.  
Previous CATALINA_OPTS=
CATALINA_OPTS='-server -Xms300m -Xmx500m -Xmaxf0.30 -Xminf0.10
-XX:NewRatio=1 -verbose:gc'
New ones, started last night, that probably caused the error:
CATALINA_OPTS='-server -Xms300m -Xmx500m -Xmaxf0.30 -Xminf0.10 -Xincgc
-verbose:gc -XX:MaxNewSize=100m -XX:NewSize=10m'

I realize this is as much a question to Sun as to tomcat-users, so
I'm reporting this bug there as well.  Thanks in advance for any
ideas,

Yoav

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: AW: Solaris VM crash? Full docs included

2001-12-06 Thread Yoav Shapira

Hi,
Thanks a bunch for the quick reply.  It seems relevant and I'll try
updating the system.

Yoav

Ralph Einfeldt wrote:
 
 Is completely a question to sun.
 
 I suspect that it is a bug in the incremental gc.
 
 May be you should upgrade to JVM 1.3.1_01
 There two bugs fixed that might help you:
 
 (Don't know if this changes where between v1.3.1-b24 and 1.3.1_01)
 
http://developer.java.sun.com/developer/bugParade/bugs/4469343.html
   (Might solve the problem)
http://developer.java.sun.com/developer/bugParade/bugs/4450681.html
   (Might give better information what caused the signal)
 
  -Ursprüngliche Nachricht-
  Von: Yoav Shapira [mailto:[EMAIL PROTECTED]]
  Gesendet: Donnerstag, 6. Dezember 2001 15:30
  An: Tomcat Users List
  Betreff: Solaris VM crash? Full docs included
 
 
  Hi there,
  So last night the JVM crashed on one of our big servers.  It had been
  running without a problem for a while, but we've been experimenting
  with tuning garbage collection, as this particular JVM is typically
  around ~400MB in memory during the day.  Here are the details (sorry
  for this long message, but I know it's a pointless question without
  all the details I can provide).
 
  Tomcat: 4.0.1 ($JAVA_HOME = /dvl/info/prj/infra/jdk1.3.1)
  JVM: Sun JVM v1.3.1-b24 for Solaris
  Server uname -a output: SunOS serverName 5.8 Generic_108528-04 sun4u
  sparc SUNW,Ultra-Enterprise
  (The server is a 12-CPU, 2GB RAM, big machine, and it had plenty of
  available
  memory, CPU usage was low all night without any spikes, nothing
  suspicious)
  (Java runtime parameters below)
 
  Relevant catalina.out section:
  ---
  Unexpected Signal : 11 occurred at PC=0xfe0c7d18
  Function name=JVM_ArrayCopy
  Library=/dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/server/libjvm.so
 
  Current Java thread:
 
  Dynamic libraries:
  0x1
  /dvl/info/prj/infra/jdk1.3.1/bin/../bin/sparc/native_threads/jav
  a
  0xff35  /usr/lib/libthread.so.1
  0xff39  /usr/lib/libdl.so.1
  0xff20  /usr/lib/libc.so.1
  0xff33  /usr/platform/SUNW,Ultra-Enterprise/lib/libc_psr.so.1
  0xfe00
  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/server/libjvm.so
  0xff2d  /usr/lib/libCrun.so.1
  0xff1e  /usr/lib/libsocket.so.1
  0xff10  /usr/lib/libnsl.so.1
  0xff0d  /usr/lib/libm.so.1
  0xff30  /usr/lib/libw.so.1
  0xff0b  /usr/lib/libmp.so.2
  0xff08
  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/native_threads/libhpi
  .so
  0xff05
  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libverify.so
  0xfe7c  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libjava.so
  0xff02  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libzip.so
  0xfccd  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libnet.so
  0xfccb  /usr/lib/nss_files.so.1
  0xda3e  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libawt.so
  0xd668
  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/motif21/libmawt.so
  0xda39
  /dvl/info/prj/infra/jdk1.3.1/bin/../jre/lib/sparc/libmlib_image.
  so
  0xd640  /usr/dt/lib/libXm.so.4
  0xd9c9  /usr/openwin/lib/libXt.so.4
  0xda15  /usr/openwin/lib/libXext.so.0
  0xda13  /usr/openwin/lib/libXtst.so.1
  0xd740  /usr/openwin/lib/libX11.so.4
  0xd9ee  /usr/openwin/lib/libSM.so.6
  0xd97d  /usr/openwin/lib/libICE.so.6
  0xd97a  /usr/openwin/lib/libdga.so.1
  0xd630
  /dvl/info/prj/infra/jdk1.3.1/jre/lib/sparc/libfontmanager.so
  0xd942  /usr/openwin/lib/libdps.so.5
 
  Local Time = Thu Dec  6 06:50:32 2001
  Elapsed Time = 24574
  #
  # HotSpot Virtual Machine Error : 11
  # Error ID : 4F530E43505002CC 01
  # Please report this error at
  # http://java.sun.com/cgi-bin/bugreport.cgi
  #
  # Java VM: Java HotSpot(TM) Server VM (1.3.1-b24 mixed mode)
  #
  # An error report file has been saved as hs_err_pid15459.log.
  # Please refer to the file for further information.
  #
 
  -
  End catalina.out excerpt
  -
 
  The error report file hs_err_pid15459.log contains a verbatim
  copy of the above, no additional information.
 
  Needless to say, the server died immediately, which I suppose is OK
  to expect from Tomcat given such an internal JVM crash.  So no
  complaints, I'm just wondering if anyone has seen this crash before?
 
  My theory is that it had to do with us slightly tweaking the
  Java runtime parameters we'd been using, in an effort to improve
  garbage collection on the machine.
  Previous CATALINA_OPTS=
  CATALINA_OPTS='-server -Xms300m -Xmx500m -Xmaxf0.30 -Xminf0.10
  -XX:NewRatio=1 -verbose:gc'
  New ones, started last night, that probably caused the error:
  CATALINA_OPTS='-server -Xms300m -Xmx500m -Xmaxf0.30 -Xminf0.10 -Xincgc
  -verbose:gc -XX:MaxNewSize=100m -XX:NewSize=10m'
 
  I realize this is as much a question to Sun as to tomcat-users, so
  I'm reporting this bug

Re: Known Memory clean-up issues?

2001-11-29 Thread Yoav Shapira

Howdy,

 Any harm in forcing garbage collection to run?

You cannot force garbage collection to run, only suggest it to the
JVM via methods like System.gc().  If you're having difficulty
tracking down memory usage, try a profiler like OptimizeIt that has
entire memory trees.

In addition, you can use parameters like hprof and verbosegc on
the java command line to assist you in monitoring garbage collection.

Yoav Shapira

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: JSP compilation error.

2001-11-27 Thread Yoav Shapira

Howdy,
Thanks for the reply ;)  I'd actually figured it out, and it was
that evil don't have more than one Servlet/JSP jar in your classpath
issue ;)  (I totally agree with that requirement, by the way).
Turns out the weblogic.jar that's packaged with Weblogic Server 6.0
has javax.servlet and javax.servlet.jsp, older versions than tomcat's,
of course, in it.  Had to repackage the JAR, but problem is solved.

Yoav

David Smith wrote:
 
 Have you taken a look at the .java file that's generated from the .jsp file?
 It's located in $CATALINA_BASE/work and should give you more insight into
 what's happening.
 
 --David
 
 On Monday 26 November 2001 11:08 am, you wrote:
  Hi there,
  Tomcat 4.0.1 on Solaris (SunOS 5.6), JDK 1.3.1, trying to run a
  a jsp page gives the following error:
 
  org.apache.jasper.JasperException: Unable to compile class for JSP
  /home/shapira/jakarta-tomcat-4.0.1/work/localhost/MyDrugDiscovery/jsp/utils
 /sql$jsp.java:309: Incompatible type for method. Explicit cast needed to
  convert
  java.lang.Throwable to java.lang.Exception.
  if (pageContext != null) pageContext.handlePageException(t);
   ^
  1 error
 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
at
  org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspS
 ervlet.java:177) at
  org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.j
 ava:189) at
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  (snip)
 
  There's no line ilke the above anywhere in my code, so it must be
  internal
  somewhere.
 
  Any clues?
 
  When I try to run jsp to pre-compile the file, I get a
  java.util.EmptyStackException -- what's that all about??
 
  Thanks,
 
  Yoav Shapira
  Millennium Pharmaceuticals
  [EMAIL PROTECTED]
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




JSP compilation error.

2001-11-26 Thread Yoav Shapira

Hi there, 
Tomcat 4.0.1 on Solaris (SunOS 5.6), JDK 1.3.1, trying to run a 
a jsp page gives the following error:

org.apache.jasper.JasperException: Unable to compile class for JSP
/home/shapira/jakarta-tomcat-4.0.1/work/localhost/MyDrugDiscovery/jsp/utils/sql$jsp.java:309:
Incompatible type for method. Explicit cast needed to convert
java.lang.Throwable to java.lang.Exception.
if (pageContext != null) pageContext.handlePageException(t);
 ^
1 error

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
(snip)

There's no line ilke the above anywhere in my code, so it must be
internal
somewhere.

Any clues?

When I try to run jsp to pre-compile the file, I get a 
java.util.EmptyStackException -- what's that all about??

Thanks,

Yoav Shapira
Millennium Pharmaceuticals
[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Shutdown Tomcat

2001-11-01 Thread Yoav Shapira

Howdy,
My two cents... Solaris 2.6 on an Ultra 10, tomcat 4.0.1, takes about
20 seconds for complete startup, less than five seconds for complete
shutdown (process gone and everything).  My setup right now has
3 webapps, one of which spawns a couple of threads (but takes care
to terminate them appropriately)... 

Yoav

Steve Brunton wrote:
 
 Evan Swanson wrote:
 
  Yeah, I have been wondering the same thing.
 
  On unix is seems that you have to kill the process.
  Shutdown.bat and shutdown.sh do not seem to stop the Tomcat process.
  I am guessing they just log off all of the sessions 'gracefully'
  You then have to manually kill the process?
 
  I am not sure if this is a problem with tomcat or it is supposed to be that
  way.
 
  It seems to be the same effect when you use the manager application to
  shutdown tomcat so I am guessing that it was designed to work that way.
 
  I have been unable to find any doco on the subject.
 
  Does anybody know a better way of shutting down the server than killing the
  process?
 
 
   I've got Tomcat 4.0.1/JDK1.3.1_01 shutting down happily on Solaris x86
 just spiffy like. It does seem to take it a while to spool everything
 down. Currently it's only loading about 10 servlets and if I tail the
 output log as the thing is shutting down I can see it hitting all the
 destroy() methods and shutting down JNDI, JDBC and LDAP connections.
 Make sure that all your servlets clean up after themselves and it should
 shutdown fine.
 
 --
 Steve Brunton   [EMAIL PROTECTED]  Phone: 404-827-2756
 Chief Engineer Enterprise SystemsOne CNN Center, Atlanta GA
 CNN Internet Technologies  ICBM: 84W 23' 45 33N 45' 29
 * I used to have a handle on life, but it broke. *
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: set SessionID (PLEASE HELP)

2001-10-31 Thread Yoav Shapira

Howdy,
The sessionID is an internal identifier assigned and used by the 
web server (typically).  Maybe you want to consider using your own
session variable with a different name, that you can assign and control 
manually?  It would be your responsibility to guarantee uniqueness, 
but that's usually not a big hassle, and the flexibility is worth it.

Yoav

[EMAIL PROTECTED] wrote:
 
 Hi,
 
 I have to set the sessionID manually - how to do it???
 I want to extract the sessionID from an encoded POST- or GET-variable, and want my 
session to bind to it!!!
 
 thanks
 michi
 
   
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: getRemoteAddr() vs getRemoteHost()

2001-10-27 Thread Yoav Shapira

Hi,
My guess is you need to enable remote address lookups in your 
server.xml.  Since they are expensive to log, they are usually turned
off by default, and the behavior is to simply return the address
rather than the host.

Yoav

Miao, Franco CAWS:EX wrote:
 
  When I put the following code in my Jsp, it comes up two identical
 remote IP addresses, instead of one remote IP and one remote host name. My
 computer  has Internet IP and valid Internet DNS server. Any suggestion
 about
 that?
 
 Thanks!
 
 out.print( request.getRemoteAddr() );
 out.print( request.getRemoteHost() );
 
 Franco



Can't open InputStream to manager??

2001-10-25 Thread Yoav Shapira

Hi there,

I have a servlet that tries to do something like:

URL url = new
URL(http://manageruser:[EMAIL PROTECTED]:myport/manager/list;);
URLConnection con = url.openConnection();
BufferedReader bin = new BufferedReader(new
InputStreamReader(con.getInputStream);

The third line throws an exception.  The connection itself is fine,
I can call stuff like con.getContentLength() and it works (correctly)
without a problem.  

Is the manager app coded specifically to disallow opening stream to it?
Has anyone else tried/encountered something like this?

Thanks!

Yoav Shapira
Millennium Pharmaceuticals



Re: Chaning location of initial web page

2001-10-04 Thread Yoav Shapira

Hi,
You can always use HTML or JSP forwarding, along the lines of:

html
head
meta http-equiv=REFRESH content=0; URL=/miiq/index.html
/head
/html

Or something like
html
head
titleJSP Forwarder/title
/head
body
jsp:forward page=/miiq/index.html
/body
/html

Good luck,

Yoav

Ryan Brown wrote:

 We are having a alot of trouble changing the location of the first page that
 displays on Tomcat 3.2.3 server.  If i start the server and then point my
 browser to http://localhost:8080/ it brings up the following file:
 d:\jakarta-tomcat-3.2.3\webapps\root\index.html
 how do I change this so that it brings up an index.html in a different
 directory on my harddrive:
 d:\webdevelopment\miiq\index.html
 I have searched all of the documentation and the mailing list archive and I
 have only gotten more confused.  We have all of our development for our site
 in the above directory and need it to be the default directory when we are
 working.

 Thanks,

 Ryan Brown
 MI-Assistant Software
 Email: [EMAIL PROTECTED]




Re: Newbie: Tomcat EJBs

2001-10-03 Thread Yoav Shapira

Hi,
It's still there.  For the adventurous, try the new JBoss2.4.1-Tomcat4.0
integrated download:
http://prdownloads.sourceforge.net/jboss/JBoss-2.4.2_Tomcat-4.0.zip

Otherwise, you can just go to jboss.org and download the latest
release-quality thing, which is integrated with Tomcat 3.2.3 I believe.
Good luck ;)

Yoav
- Original Message -
From: Shane Geiger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 3:27 PM
Subject: RE: Newbie: Tomcat  EJBs


 A while ago someone sent me a link to a product on sourceforge that was
 apparently a combination JBoss-Tomcat product.