RE: XLT file won't open in associated application (Excel)

2004-09-30 Thread Václavík Radek
Hi,
I am asking for it as a static resource, therefore I have no way to modify
the response in servlet. But if I don't get this solved, I probably have to
do it through servlet...

Radek

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 29, 2004 2:31 PM
 To: Tomcat Users List
 Subject: RE: XLT file won't open in associated application (Excel)
 
 
 
 Hi,
 When you do the download, are you streaming it yourself from 
 a servlet, or asking for it as a static resource?  If the 
 former, you should use the http-equiv content-disposition header.
 
 Yoav Shapira
 Millennium Research Informatics
 
 
 -Original Message-
 From: Václavík Radek [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 29, 2004 4:52 AM
 To: '[EMAIL PROTECTED]'
 Subject: XLT file won't open in associated application (Excel)
 
 Hi all,
 
 I am trying to download an XLT (Excel template) file from 
 Tomcat server,
 but
 instead of running excel and opening the file, browser (IE 
 6) shows the
 file
 in binary.
 
 I have tried setting the MIME mapping in web.xml for this 
 site such as:
   mime-mapping
 extensionxlt/extension
 mime-typeapplication/vnd.ms-excel/mime-type
   /mime-mapping
 
 (I have tried also msexcel, excel). But I still can't 
 get the browser
 to
 run Excel.
 
 When I put the same file onto MS IIS server and try to 
 download it, Excel
 runs and opens the file correctly. I have inspected HTTP requests and
 responses from both servers and found no relevant difference.
 
 I also have similar problem with dot file type (MS Word 
 document template).
 I have added the following to web.xml:
 
   mime-mapping
 extensiondot/extension
 mime-typeapplication/msword/mime-type
   /mime-mapping
 
 and when I run the Tomcat server on localhost while 
 developing, this works
 fine and runs Word. But when I deploy the application to 
 production Tomcat
 server, Word is not run and binary file is displayed again. 
 With dot file
 type this does not work in either case (as mentioned above).
 
 
 I am using Tomcat 5.0.12 for developing and 5.0.19 for production.
 
 
 Thanks for possible solutions.
 
 
 Radek
 
 _
 
 Ing. Radek Václavík
 ICS Department - webmaster
 
 ZeNTIVA a.s.
 U Kabelovny 130, 102 37 Praha 10
 Czech Republic
 tel. +420 267 243 296
 _
 
 
 
 
 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]
 


RE: [OT] Re: log4j.properties file co-opting container logging. - Found word(s) optin in the subject

2004-09-30 Thread Pawson, David
 

-Original Message-
From: Jacob Kjome

 Do you know what logger is used by default by commons-logging in 
 Tomcat if log4j isn't present?


I'm not very privy to the internals of commons-logging, but 
I think they have some sort of simple logger which is used 
when there is no other logging implementation available.  
Don't quote me on that, though.

Is it the commons-logging that produces
catalina_log.date.txt? Is there a config file as per log4j?

Even when testing, this file becomes quite significant.
It would be nice to reduce/minimise its output.

regards DaveP


** snip here **


-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




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



RE : Synchronization in cluster

2004-09-30 Thread LERBSCHER Jean-Pierre
Hi,
What are your needs? Why distributed singleton or distributed locking are so
important ?
Perhaps you can use Database to implement locking functionality and Jgroups
library to replicate state (or distributed singleton) across members of a
group (see www.jgroups.org).

-Message d'origine-
De : Igor [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 29 septembre 2004 20:42
À : [EMAIL PROTECTED]
Objet : Re: Synchronization in cluster

Hello!

 if you are talking about distributed locking, then the answer is no

Thank you for reply !

Our web application uses locking and Singleton pattern. I am making
researches - is there a possibility to move to cluster architecture or load
balancing.

Distributed locking is not possible.
Distiributed Singleton (static variables) seems not to be possible too.

So web applications, that use locking or Singleton cannot use cluster
architecture or load balancing.

Maybe there is indirect way of implementing distributed locking or
distributed Singleton? For example, code that needs synchronization may be
concentrated in main Tomcat, and other Tomcats will call this code via
http or SOAP?

Is there any way to move web application with locking and Singleton to
cluster or load balancing?

Thank you,
Igor

-
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 : User authentication in multi repositories

2004-09-30 Thread LERBSCHER Jean-Pierre
Hi,
Yes, it's typically the object of the JAAS API.
You can configure the JAASRealm and develop your login modules to access
multiple LDAP services. You have to think at the rules to use to
authenticate sub-group of users in corporate domain and others in other
repository.

-Message d'origine-
De : QM [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 29 septembre 2004 23:52
À : Tomcat Users List
Objet : Re: User authentication in multi repositories

On Wed, Sep 29, 2004 at 01:50:31PM -0300, Ac?cio Furtado Costa wrote:
: We would like to know, if it is possible for an application to
authenticate
: users in multiple LDAP Services. For instance, one sub-group of users will
: authenticate on  our corporate domain (Active Directory) and  another
: sub-group (clients, supliers) in other repository (ADAM- Active Directory
: Application Mode, NDS, etc).

An application, perhaps. ;)
Tomcat's JNDI-based Realm, out of the box, likely no.

This thread came up a few weeks ago.  You can search the archive for
details; the highlights boiled down to: sync'ing up your AD setups[1] or
writing custom code.

[1] = I'm not an AD expert; but I understand one offered solution
involved creating some sort of master AD instance that delegated to
the others on the backend.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
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: How can I deploy 2 tomcat and work on both of them at the same ti me?

2004-09-30 Thread Alex

Ensure that in $CATALINA_HOME$/conf/server.xml that you have different
ports declared for each instance.  there are four in total i do believe.

On Wed, 29 Sep 2004, Bachler, Elisabeth (Elisabeth) wrote:

 Date: Wed, 29 Sep 2004 09:49:31 +0200
 From: Bachler, Elisabeth (Elisabeth) [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Subject: How can I deploy 2 tomcat and work on both of them at the same
 ti me?

 Hello,

 I have tomcat jakarta-tomcat-5.0.19 installed on my machine under /opt
 Now, I have installed another tomcat (same version) under another root
 directory.
 I need to have two versions working at the same time. Under one, I will have
 a client web version and under the other one, my test version. Both can be
 working at the same time but I can't manage to make it running.
 Could you help me ?


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



RE: Tomcat 5/Apache 2/JK2- production quality?

2004-09-30 Thread Alex

Inititally I would have agreed.  However, after lots of reading, monkeying
around, and working out everything, I can now say that we have implemented
successfully the jk2 adapter with both iis5 and apache2 withiout issue.
for it to work properly, i found you needed to have virtual-hosts in
tomcat ..  if you were doing something a bit more complex with multiple
hosts.

how many exact pages/traffic do they get?  i can't answer that right now.
i'll take a look in a bit.  haven't noticed any problems though.

-alex - pass the salt...

On Wed, 29 Sep 2004, Brantley Hobbs wrote:

 Date: Wed, 29 Sep 2004 08:19:53 -0400
 From: Brantley Hobbs [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: RE: Tomcat 5/Apache 2/JK2- production quality?

 I second this.

 I've had nothing but trouble out of JK2, configuration difficulties on Apache and 
 just flatly broken on IIS.

 The original JK adapter has worked great.

 -Brantley


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



RE: WAR file deployment snag - any suggestions?

2004-09-30 Thread Chris Ward

Thanks very much for this.  There are some very good points in here 
that have got me thinking.

At present I have only one Tomcat running and a small number of users
(it's an intranet) but the complexity and resource requirements of the
application set is growing.  I don't have any experience of larger scale
web systems so all suggestions are welcome.


Saving the XML files was an initial step at caching things that I can
control.  I did play around with holding onto the (dom4j) Documents in
the ServletContext but I was concerned that this would swallow all the 
memory unless I used some sort of soft-reference caching system.
I posted a question about this to this list - but I never heard back -
must have been too dull a question (or the wrong list)!

I imagine spreading the apps over multiple Tomcats/machines would allow
me
to do more in-memory caching.  Feels like this is a move toward Web
Services
- I don't know much about them.

Thanks again for your response - I'd be interested in hearing any other
pearls of wisdom.


Chris



 
 
 On Wed, Sep 29, 2004 at 06:27:13PM +0100, Chris Ward wrote:
 : Only having to release one file is great, but I've hit a problem
 : of my own making.  My webapp writes various XML files to datestamped
 : dir within the webapp context. When I deploy the WAR file I purge
 : all these generated files.
 :  [snip]
 : Should I use a different context to hold my data?
 
 That's one option; but another (likely more scalable) idea 
 would be to put files in a filesystem, where they belong.
 
 The idea is to setup a directory outside of the Tomcat 
 context path -- specify it in a properties file, or in a 
 context param, whatever -- and write the data there.
 
 As the system grows to support multiple Tomcat instances 
 spread across different machines, you could share the 
 filesystem via NFS (not pretty, but it works), stuff the docs 
 in a database (not pretty, but it works), or have the 
 mid-tier Tomcat instances push the data to another, internal 
 Tomcat setup that writes the files to a clustered/RAID'd fs.
 
  etc, etc, depending on how valuable these docs are and 
 how much this app grows.
 
 By not writing to your context, you can wrap everything up in 
 a WAR file and, better still, gain (a little) more security 
 by making the WAR file owned and served by two different user 
 accounts.
 
 -QM
 
 -- 
 
 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com
 
 
 -
 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: Norton AntiVirus and False Positives In Tomcat

2004-09-30 Thread Joel
  Sounds like NAV may have returned some false
  positives.  The only
  virus-like content I would expect inside a plain
  HTML doc would be
  rogue JavaScript.
 
 Indeed.  I looked at the HTML page myself - it's
 unaltered, and there's nothing rogue in there that I
 can see.

Links with strange urls?

  Perhaps you could point your admin to the web
  resources you found, those
  concerning false positives from NAV?
 
 I agree - I already sent the link yesterday afternoon.
 
  This could become a sticky issue of corporate
  politics, depending on
  your organization's structure.  You may have to get
  your management to
  talk to the admin's management.
  
  -QM
 
 You're right on there.  This could be very sticky and
 uncomfortable.  I'm not sure how receptive corp will
 be.
 
 Thanks - MOD

For a little smoke screen, you might even mention the recent jpeg
vulnerabilities and the issues Norton seems to be having seeing those.
Might even create enough reverse heat to motivate a move to *nix.

-- 
Joel [EMAIL PROTECTED]


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



Unable to compile class for JSP

2004-09-30 Thread A Leg
Hi
I had some pb my my projects jsps. I am obliged to precompile them.
I tried to get the same problem with a small appli.
I write a very simple jsp :
html
body
%java.util.Date d = new java.util.Date();%
Todays date is %= d.getDate()%  hello!
/body
/html
When I start tomcat everythings seems ok,
When I launch the page I have the same problem :
*an exception*
org.apache.jasper.JasperException: Unable to compile class for JSP
*root cause*
java.lang.SecurityException: class 
org.apache.tools.ant.taskdefs.optional.IContract's signer information does not match 
signer information of other classes in the same package
Full error page below.
Any help appreciated
Best regards
Andre
 HTTP Status 500 -

*type* Exception report
*message*
*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._

*exception*
org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:513)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:258)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:205)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:241)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:263)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
*root cause*
java.lang.SecurityException: class 
org.apache.tools.ant.taskdefs.optional.IContract's signer information does not match 
signer information of other classes in the same package
java.lang.ClassLoader.checkCerts(ClassLoader.java:599)
java.lang.ClassLoader.defineClass(ClassLoader.java:532)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
java.net.URLClassLoader.access$100(URLClassLoader.java:55)
java.net.URLClassLoader$1.run(URLClassLoader.java:194)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:187)

org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:473)

org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:810)

org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:709)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:141)
org.apache.tools.ant.Project.init(Project.java:274)
org.apache.jasper.compiler.Compiler.getProject(Compiler.java:114)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:416)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:397)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:507)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:258)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:205)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:241)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:263)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
*note* _The full stack trace of the root cause is available in the 
Tomcat logs._


 Sun-Java-System/Web-Services-Pack-1.4



MemoryRealm in a Context

2004-09-30 Thread Andy Hutchinson
Setup is Tomcat 5.0.28, J2SE 1.4.2, Redhat 9.
I've been using a MemoryRealm in a Host container and everything works 
fine. It is ideal for a computer to computer link over HTTPS to 
authenticate access.

I've now decided that I want a different setup on a per Context basis. The 
docs for the realm component say that a Realm can be inside a Context 
container so I moved the Realm section from the Host to the Context and 
restarted Tomcat.

Now when I try and authenticate the debug log shows that the realm is being 
treated as a JAAS realm and consequently fails.

Is there something clever going on here that I'm not aware of or do I need 
to made further config changes?

Cheers,
Andy. 

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


Re: WAR file deployment snag - any suggestions?

2004-09-30 Thread QM
On Thu, Sep 30, 2004 at 09:22:42AM +0100, Chris Ward wrote:
: I imagine spreading the apps over multiple Tomcats/machines would allow
: me
: to do more in-memory caching.  Feels like this is a move toward Web
: Services
: - I don't know much about them.

This seems to have grown into a general app design question, of which
I'm little help since I'm not working on your team. ;)

All I can say, then, is to take a high-level look at what's supposed to
happen and go from there.  Ask yourself, what's to be achieved from
storing this XML?  Is it acceptable to lose it on system restart/crash
or is it part of some corporate doc-retention policy? What are your
tradeoffs between CPU (parsing XML from disk), RAM (storing in memory),
and network (pushing data between hosts)?

If you design this with flexibility in mind, you can easily move between
in-memory, on-disk, and fetched-from-elsewhere storage (aka web services
or another webapp).

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Unable to compile class for JSP

2004-09-30 Thread QM
On Thu, Sep 30, 2004 at 11:36:40AM +0300, A Leg wrote:
: org.apache.jasper.JasperException: Unable to compile class for JSP
: java.lang.SecurityException: class 
org.apache.tools.ant.taskdefs.optional.IContract's signer information does not match 
signer information of other classes in the same package

Sounds like IContract is in a sealed JAR, and somewhere in the classpath
there's another copy.

Do you have duplicate JARs, between WEB-INF/lib and Tomcat's various lib
dirs?

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Unable to compile class for JSP

2004-09-30 Thread A Leg
Hi
Probably because JWSDP 1.4 force me to use ant of them distrib which is 
1.5xx
and some others elements I use need 1.6.1 or more. So I have both 
releases install 1.6.1is in my classpath and jwsdp ant is set in the 
setenv.sh script.
This must generate a conflict.

I probably have to swictch to tomcat 5.028 which will enable me tu use 
ant1.6.1 for everything. (yes ?)
I use only jsp and servlets. Do I need to download something more than 
Tomcat distrib ?

Best regards
Andre
QM wrote:
On Thu, Sep 30, 2004 at 11:36:40AM +0300, A Leg wrote:
: org.apache.jasper.JasperException: Unable to compile class for JSP
: java.lang.SecurityException: class 
org.apache.tools.ant.taskdefs.optional.IContract's signer information does not match 
signer information of other classes in the same package
Sounds like IContract is in a sealed JAR, and somewhere in the classpath
there's another copy.
Do you have duplicate JARs, between WEB-INF/lib and Tomcat's various lib
dirs?
-QM
 


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


A new problem!

2004-09-30 Thread hoseinjany
Dear all Readers

I have a new problem as follows:

I started Tomcat with JSDK and it is working great on the localhost as:
http://localhost:8080 http://localhost:8080/  

But when I want to connect to it from other computers I cannot and receive
this error: 



The page cannot be displayed


The page you are looking for is currently unavailable. The Web site might be
experiencing technical difficulties, or you may need to adjust your browser
settings.

 

 

I should mention that I am using TCP/IP filtering on this server and I am
sure that the TCP port 8080 is signed as to be allowed coming in. I should
tell that I cannot telnet to the 8080 port of the server.

It might be the port problem as I cannot telnet to that port but there is no
other place to check that port to be open!

Please help.

Thanks,

Ali Hoseinjany



RE: A new problem!

2004-09-30 Thread Bedrijven.nl
use http://machinename:8080

-Oorspronkelijk bericht-
Van: hoseinjany [mailto:[EMAIL PROTECTED]
Verzonden: Wednesday, September 29, 2004 5:16 PM
Aan: [EMAIL PROTECTED]
Onderwerp: A new problem!


Dear all Readers

I have a new problem as follows:

I started Tomcat with JSDK and it is working great on the localhost as:
http://localhost:8080 http://localhost:8080/

But when I want to connect to it from other computers I cannot and receive
this error:



The page cannot be displayed


The page you are looking for is currently unavailable. The Web site might be
experiencing technical difficulties, or you may need to adjust your browser
settings.





I should mention that I am using TCP/IP filtering on this server and I am
sure that the TCP port 8080 is signed as to be allowed coming in. I should
tell that I cannot telnet to the 8080 port of the server.

It might be the port problem as I cannot telnet to that port but there is no
other place to check that port to be open!

Please help.

Thanks,

Ali Hoseinjany



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



RE: Recursive stack trace with Tiles and Filter - any ideas?

2004-09-30 Thread Shapira, Yoav

Hi,
As you know signal 11 crashes are internal to the JVM usually at a
native level.  A corrupt or incomplete JVM installation, or missing OS
patches for your JVM version, are the two most common causes for this.

Can you post the Java code for your error JSP?  That'll make helping you
a bit easier for people who don't feel like translating your
Struts/Tiles directives to Java in their head ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 6:52 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Recursive stack trace with Tiles and Filter - any ideas?

Sorry for the cross-post, but I'm not sure if this is more of a Tomcat
or Struts issue (in addition to certainly somehow being my code issue
:). Any suggestions are appreciated.

The last week or so have been having our Tomcat 5.0.19 server on SuSE
Linux crash with a Signal 11. We are using Struts 1.2.1. When I look in
the Tomcat logs the actual cause usually varies somewhat, but several
times we have seen what looks like a loop in error handling occur. I'm
headed in this evening to run memtest86 on our server, but wonder if
there might be something else that's the root cause.

Anyway, in case there is a common cause for this that I have missed,
I've enclosed snipped portions (even then its a large stacktrace) of
the latest exception we received today. Obviously somethings in a loop
and we either run out of memory, getting the Signal 11, or we go into a
section of memory that's bad. Both my error.jsp page and another JSP
page (PoStudent.jsp) are almost always involved.

The error.jsp is pretty simple, I've enclose it below just before the
stack trace.

Thanks in advance for any ideas - Richard


ERROR PAGE

%@ page language=java isErrorPage=true %
%@ include file=/common/taglibs.jspf %

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html
head
titlebean:message key=errorPage.title//title
link rel=stylesheet type=text/css media=all
href=%=request.getContextPath()%/styles/default.css /
/head
body
h1bean:message key=errorPage.heading//h1
p
logic:messagesPresent
html:messages id=error
span id=errorbean:write name=error
filter=false//spanbr
/html:messages
/logic:messagesPresent
br//p
h3You have reached this page because of an unanticipated software
error described below./h3
h3Please /h3
br/
%
if (exception != null) {
exception.printStackTrace(new java.io.PrintWriter(out));
} else {
%
!-- only show this if no error messages present --
logic:messagesNotPresent
bean:message key=errors.none/
/logic:messagesNotPresent
%
}
%
/body
/html


STACK TRACE FROM CATALINA.OUT

14:24:30,509 ERROR [TP-Processor33] InsertTag:? - ServletException in
'/layouts/baseLayout.jsp': null
javax.servlet.ServletException: Servlet execution threw an exception
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
a
tionFilterChain.java(Compiled Code))
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
t
erChain.java(Compiled Code))
   at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispat
c
her.java(Compiled Code))
   at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDis
p
atcher.java(Compiled Code))
   at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispa
t
cher.java(Compiled Code))
   at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.j
a
va(Inlined Compiled Code))
   at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java(
C
ompiled Code))
   at
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCon
t
extImpl.java:829)
   at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte
x
tImpl.java:800)
   at org.apache.jsp.error_jsp._jspService(error_jsp.java:150)
   at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java(Compiled
Code))
   at
javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
Code))
   at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
a
tionFilterChain.java(Compiled Code))
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
t
erChain.java(Compiled Code))
   at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispat
c
her.java(Compiled Code))
   at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDis
p
atcher.java(Compiled Code))
   at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispa
t
cher.java(Compiled Code))
   at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.j
a
va(Inlined Compiled Code))
   at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java(
C
ompiled Code))
   at

RE: A new problem!

2004-09-30 Thread John Najarian
Could you put an entry in the etc/hosts files.

-Original Message-
From: Bedrijven.nl [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 30, 2004 5:39 AM
To: 'Tomcat Users List'
Subject: RE: A new problem!

use http://machinename:8080

-Oorspronkelijk bericht-
Van: hoseinjany [mailto:[EMAIL PROTECTED]
Verzonden: Wednesday, September 29, 2004 5:16 PM
Aan: [EMAIL PROTECTED]
Onderwerp: A new problem!


Dear all Readers

I have a new problem as follows:

I started Tomcat with JSDK and it is working great on the localhost as:
http://localhost:8080 http://localhost:8080/

But when I want to connect to it from other computers I cannot and receive
this error:



The page cannot be displayed


The page you are looking for is currently unavailable. The Web site might be
experiencing technical difficulties, or you may need to adjust your browser
settings.





I should mention that I am using TCP/IP filtering on this server and I am
sure that the TCP port 8080 is signed as to be allowed coming in. I should
tell that I cannot telnet to the 8080 port of the server.

It might be the port problem as I cannot telnet to that port but there is no
other place to check that port to be open!

Please help.

Thanks,

Ali Hoseinjany



-
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: RE : Synchronization in cluster

2004-09-30 Thread Peter Lin
distributed locking of session data implies you need something like a
distributed cache. If that is the case, maybe you should look at
Coherence.

distributed locking is meant to solve a specific problem, so unless
you really need to synchronize distributed objects like a distributed
cache, I would avoid using it. some people tackle type of problem with
JMS.

unless you plan to extend TC5  session replication with these features
it's going to be  a while.

peter


On Thu, 30 Sep 2004 09:41:41 +0200, LERBSCHER Jean-Pierre
[EMAIL PROTECTED] wrote:
 Hi,
 What are your needs? Why distributed singleton or distributed locking are so
 important ?
 Perhaps you can use Database to implement locking functionality and Jgroups
 library to replicate state (or distributed singleton) across members of a
 group (see www.jgroups.org).


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



RE: Tomcat 4.1 Connection Pooling...

2004-09-30 Thread Shilpa Nalgonda
Thanks a lot to all who helped me with this...
I replaced all new updated jars: commons-dbcp-1.1.2.jar,
commons-pooling.1.2.jar and Classes12.jar, and the scalability problem
(ORA-00020: maximum number of processes (200) exceeded) is gone..

-Original Message-
From: Michael J. Makunas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 28, 2004 3:37 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1 Connection Pooling...


Just a thought (and I apologize if this was already mentioned.I
missed the very beginning of the thread), but I would also make sure you
have the latest connection pooling jars. I recently had a problem where
even though I had the tomcat configured to reclaim abandoned
connections, some were still remaining open. Turned out there was a bug
in the dbcp jar and upgrading to the latest solved it.

-Michael

Dale, Matt wrote:
 Every time your application uses a connection it should call the close()
method to return it to the pool. I had a similar problem where over a fairly
short period of time there was a database error which caused the execute to
throw an exception. I had forgotten to put a finally block in that section
so the connection never got closed. Once I put a finally block in with a
con.close() then it solved my problem.

 Ta
 Matt

 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: 28 September 2004 20:04
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...


 how can i check that and how to resolve it...

 -Original Message-
 From: Dale, Matt [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 28, 2004 3:06 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1 Connection Pooling...



 Perhaps your application is hanging on to the database connections and not
 returning them to the pool?

 -Original Message-
 From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
 Sent: 28 September 2004 19:43
 To: Tomcat Users List; Peter Lin
 Subject: RE: Tomcat 4.1 Connection Pooling...


 I have updated with classes12.jar, but still i have this problem.  But
Peter
 what ii sthe bug that you
 mentioned, i have the problem of
 java.sql.SQLException: ORA-00020: maximum number of processes (200)
exceeded


--
** Michael J. Makunas ** http://www.makunas.com/ **


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



org.apache.commons.digester.Digester error--- at tomcat startup...

2004-09-30 Thread Shilpa Nalgonda
I added some elements in web.xml on linux machine and i get this error, but
i cannot see any problem with web.xml, the same web.xml works fine on
windows...below is my web.xml...can someone please suggest


Sep 30, 2004 9:03:31 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 26 column 11: The content of element type
web-app must match
(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*).
org.xml.sax.SAXParseException: The content of element type web-app must
match
(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*).
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHand
lerWrapper.java:236)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:17
2)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:38
0)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:31
4)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:2049)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:9
33)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:1083)


web.xml...
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

display-nameMyPub XmlRpc/display-name
description
  This is the container to hold the MLRPC calls
/description
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/mydb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
servlet
servlet-nameXmlRpcServlet/servlet-name
servlet-classXmlRpcServlet/servlet-class
/servlet
servlet-mapping
servlet-nameXmlRpcServlet/servlet-name
url-pattern/rpc/url-pattern
/servlet-mapping
 /web-app
~


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



RE: org.apache.commons.digester.Digester error--- at tomcat start up...

2004-09-30 Thread Phillip Qin
Move resource-ref down to the end. You have to follow the order of each
element.

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] 
Sent: September 30, 2004 9:39 AM
To: Tomcat Users List
Subject: org.apache.commons.digester.Digester error--- at tomcat startup...


I added some elements in web.xml on linux machine and i get this error, but
i cannot see any problem with web.xml, the same web.xml works fine on
windows...below is my web.xml...can someone please suggest


Sep 30, 2004 9:03:31 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 26 column 11: The content of element type
web-app must match
(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*).
org.xml.sax.SAXParseException: The content of element type web-app must
match
(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*).
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHand
lerWrapper.java:236)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:17
2)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:38
0)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:31
4)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:2049)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:9
33)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:1083)


web.xml...
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

display-nameMyPub XmlRpc/display-name
description
  This is the container to hold the MLRPC calls
/description
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/mydb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
servlet
servlet-nameXmlRpcServlet/servlet-name
servlet-classXmlRpcServlet/servlet-class
/servlet
servlet-mapping
servlet-nameXmlRpcServlet/servlet-name
url-pattern/rpc/url-pattern
/servlet-mapping
 /web-app
~


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


!DSPAM:415c0db286331880812122!


RE: org.apache.commons.digester.Digester error--- at tomcat startup...

2004-09-30 Thread Shapira, Yoav

Hi,
As the error says pretty clearly, you can't put resource-ref before
servlet using your DTD.  So the same web.xml doesn't work on Windows
or any other platform.

Go validate your web.xml (using a tool like XMLSpy or one of the free
online validators) to see for yourself.  You can simply fix the element
order and stick with the 2.3 DTD, or move to the 2.4 schema  (if using
Tomcat 5.x) and then the element order doesn't matter.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 9:39 AM
To: Tomcat Users List
Subject: org.apache.commons.digester.Digester error--- at tomcat
startup...

I added some elements in web.xml on linux machine and i get this error,
but
i cannot see any problem with web.xml, the same web.xml works fine on
windows...below is my web.xml...can someone please suggest


Sep 30, 2004 9:03:31 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 26 column 11: The content of element type
web-app must match
(icon?,display-name?,description?,distributable?,context-
param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-
mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-
ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb
-
loca
l-ref*).
org.xml.sax.SAXParseException: The content of element type web-app
must
match
(icon?,display-name?,description?,distributable?,context-
param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-
mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-
ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb
-
loca
l-ref*).
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Erro
rHan
d
lerWrapper.java:236)
at
org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.ja
va:1
7
2)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.ja
va:3
8
0)
at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.ja
va:3
1
4)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValid
ator
.
java:2049)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.j
ava:
9
33)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XM
LDoc
u
mentFragmentScannerImpl.java:1083)


web.xml...
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

display-nameMyPub XmlRpc/display-name
description
  This is the container to hold the MLRPC calls
/description
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/mydb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
servlet
servlet-nameXmlRpcServlet/servlet-name
servlet-classXmlRpcServlet/servlet-class
/servlet
servlet-mapping
servlet-nameXmlRpcServlet/servlet-name
url-pattern/rpc/url-pattern
/servlet-mapping
 /web-app
~


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



Re: Tomcat 5.5 JRE 1.5

2004-09-30 Thread Phillip Mangwiro
Caldarale, Charles R wrote:
From: Phillip Mangwiro [mailto:[EMAIL PROTECTED]
Subject: Tomcat 5.5  JRE 1.5
Can anyone send me the install doc or a link to jre1.5?
   

Sun renamed 1.5 to 5.0 some weeks back.  There's a link to the download on the right hand side of the Java home page (http://java.sun.com).
 

Tried link java.sun.com.
Got as far as the list page where it lists the JDK  JVM but kept on 
getting Document contains no data! error on clicking download.
Can you send me the actual link to the JRE  or JDK setup file?


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


method level synchronization doesn't work

2004-09-30 Thread Malia Noori
Hi,

 

I am using Tomcat 4.1 and I am accessing MS SQL Server database via JDBC.  I
have a JSP that calls a web bean.  This web bean has a section of code that
I want to synchronize, but when I synchronize the method, Tomcat doesn't
actually synchronize the threads.  (I tried this by having 2 users access my
JSP at the same time).  When I synchronize the code in the method by using a
mutex, it works.  

 

So, doing this doesn't work:

 

public synchronized void amethod()

{

 

  //some code that access the database and needs to be synchronized

}

 

But doing this works:

 

public void amethod()

{

 

String mutex = ;

 

synchronize(mutex)

{

 

  //some code that access the database and needs to be synchronized

 

}

}

 

 

Why does synchronization on the method doesn't work?  Does Tomcat not allow
locking of object caused by method level synchronization?  Any help will be
appreciated.

 

Thanks,

Malia

 



RE: Using shutdown script for different port

2004-09-30 Thread Dhruva B. Reddy
Back to my original issue--I was having trouble shutting down Tomcat
when the shutdown service was listening to a non-default port, but have
since sorted it out.

After going through the source code, I found that when processing the
shutdown command, the Bootstrap system just uses the configuration in
CATALINA_BASE, so all you need to do change the port in server.xml, and
make sure your shutdown script references the correct directory
hierarchy.

Thanks,
Dhruva


--- Steve Kirk [EMAIL PROTECTED] wrote:

 
 OK.  I didn't realise that, although I suppose it's obvious in
 hindsight.  I
 just saw the potential for it to go wrong if that localhost check
 failed,
 and disabled it.  I didn't actually test whether it could be shutdown
 from
 another host.
 
  -Original Message-
  From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday 29 September 2004 21:26
  To: Tomcat Users List
  Subject: RE: Using shutdown script for different port
  
  
  
  Hi,
  You must have a weird setup... The shutdown socket only accepts
  connections from its localhost.
  
  Yoav Shapira
  Millennium Research Informatics
  
  
  -Original Message-
  From: Steve Kirk [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, September 29, 2004 4:22 PM
  To: 'Tomcat Users List'
  Subject: RE: Using shutdown script for different port
  
  
  To be clear, the default setup _does_ allow shutdown using 
  telnet from
  any
  machine unless your host or network security blocks it.  Or at
 least
  that
  was the case when I installed mine.
  
  I have the shutdown feature disabled on my setup because I 
  didn't like
  the
  possible security hole. However I suggested it because I imagined
 you
  had
  already secured the shutdown port using firewalling but were
 looking
  for a
  way to stop each instance from the localhost.
  
   -Original Message-
   From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
   Sent: Wednesday 29 September 2004 21:11
   To: Tomcat Users List
   Subject: RE: Using shutdown script for different port
  
  
  
   Hi,
   Of course, you can only do this telnet from the local machine ;)
   Otherwise we'd have a nice security hole ;)
  
   Yoav Shapira
   Millennium Research Informatics
  
  
   -Original Message-
   From: Steve Kirk [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, September 29, 2004 4:10 PM
   To: 'Tomcat Users List'
   Subject: RE: Using shutdown script for different port
   
   
   You can certainly telnet to the shutdown port and send 
  the shutdown
   string.
   You could do this using a scripting tool or simple Java class.
 For
   example,
   telnet to localhost 8015 then send the string shutdown, or
  whatever
   string
   is configured in server.xml for that port.
   
-Original Message-
From: Dhruva B. Reddy [mailto:[EMAIL PROTECTED]
Sent: Wednesday 29 September 2004 20:21
To: tomcat
Subject: Using shutdown script for different port
   
   
I am running two instances of Tomcat 4.1 on one machine, from
 a
   common
installation (i.e., different CATALINA_BASE).  I have 
  the shutdown
service  for each instance listening on a different port (the
   original
instance on the default port of 8005, and the second instance
on 8015).
   
Getting the instances to listen on a different port was 
  easy, but
  I
can't seem to find any information on how to actually specify
 a
non-default port in the shutdown script.  Some documentation
that I did
manage to find suggested the following would work:
   
shutdown.sh port 8015
   
but I get the usage message when I try that.
   
Can anyone tell me how to do this?
   
Thanks,
Dhruva
   
   
   
___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
   
   
   
 
 -
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]
  
  
  
  
   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]
  
  
  
  
  
 


Question from a newbie! Please pardon me!

2004-09-30 Thread Venkat Radha Venkataramanan
Hello:

 

When I tried to compile my first servlet, using the command line,

 

javac -classpath $CATALINA_HOME/common/lib/servlet-api.jar HelloWorld.java

 

I get the following errors, mainly due to the fact that it's unable to find
the package javax.servlet.

 

HelloWorld.java:6: package javax.servlet does not exist

import javax.servlet.*;

^

HelloWorld.java:7: package javax.servlet.http does not exist

import javax.servlet.http.*;

^

HelloWorld.java:9: cannot resolve symbol

symbol  : class HttpServlet

location: class HelloWorld

public class HelloWorld extends HttpServlet {

^

HelloWorld.java:11: cannot resolve symbol

symbol  : class HttpServletRequest

location: class HelloWorld

public void doGet ( HttpServletRequest request, HttpServletResponse
resp

onse )

^

HelloWorld.java:11: cannot resolve symbol

symbol  : class HttpServletResponse

location: class HelloWorld

public void doGet ( HttpServletRequest request, HttpServletResponse
resp

onse )

^

HelloWorld.java:12: cannot resolve symbol

symbol  : class ServletException

location: class HelloWorld

throws ServletException, IOException{

   ^

6 errors

 

Can somebody guide me on how to resolve this issue?

 

Thanks.

 

Venkat



RE: Question from a newbie! Please pardon me!

2004-09-30 Thread John Najarian
Check your environment variables.

CATALINA_HOME   c:\tomcat or wherever you installed tomcat
Seem you have this set properly

CLASSPATH
c:\j2sdk1.4.2_03;c:\tomcat\common\lib\servlet-api.jar;c:\tomcat\common\lib\j
sp-api.jar;c:\tomcat\common\lib\tools.jar;.
There are different ways to do this but it seems like you need to have 
The servlet-api/jar in your CLASSPATH variable.  Mine is in
c:\tomcat\common\lib

JAVA_HOME   c:\j2sdk1.4.2_03 or wherever you installed the jdk

PATHC:\Perl\bin\;C:\j2sdk1.4.2_03\bin\.
Be sure to have the bin directory under your jdk installation included.

-Original Message-
From: Venkat  Radha Venkataramanan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 7:09 AM
To: 'Tomcat Users List'
Subject: Question from a newbie! Please pardon me!

Hello:

 

When I tried to compile my first servlet, using the command line,

 

javac -classpath $CATALINA_HOME/common/lib/servlet-api.jar HelloWorld.java

 

I get the following errors, mainly due to the fact that it's unable to find
the package javax.servlet.

 

HelloWorld.java:6: package javax.servlet does not exist

import javax.servlet.*;

^

HelloWorld.java:7: package javax.servlet.http does not exist

import javax.servlet.http.*;

^

HelloWorld.java:9: cannot resolve symbol

symbol  : class HttpServlet

location: class HelloWorld

public class HelloWorld extends HttpServlet {

^

HelloWorld.java:11: cannot resolve symbol

symbol  : class HttpServletRequest

location: class HelloWorld

public void doGet ( HttpServletRequest request, HttpServletResponse
resp

onse )

^

HelloWorld.java:11: cannot resolve symbol

symbol  : class HttpServletResponse

location: class HelloWorld

public void doGet ( HttpServletRequest request, HttpServletResponse
resp

onse )

^

HelloWorld.java:12: cannot resolve symbol

symbol  : class ServletException

location: class HelloWorld

throws ServletException, IOException{

   ^

6 errors

 

Can somebody guide me on how to resolve this issue?

 

Thanks.

 

Venkat




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



Tomcat 5.0.27 - Single Sign On PROBLEM

2004-09-30 Thread Marco
Hi,
I configurated my server web to use load balancing.
I use IIS 6 and ajp13 for this pourpose and two istance of tomcat 5.0.27 
on two different machine.

Load Balancing works fine but when I configureted tomcat to use 
SingleSignOn I had some problem. Sometimes, when I pass from an 
application to another one, tomcat asks me the autentication as if 
SingleSignOn doesn't works fine.

Follow tomcat and ajp13 configuration.
Master machine
.
.
.
   Engine name=slave defaultHost=localhost debug=0  
jvmRoute=master
.
.
.

Slave machine
.
.
.
   Engine name=slave defaultHost=localhost debug=0  
jvmRoute=slave
.
.
.

workers2.properties
[logger.file:0]
level=DEBUG
file=${serverRoot}/logs/iis.log
[config:]
file=${serverRoot}/bin/win32/i386/workers2.properties
debug=1
debugEnv=0
[channel.socket:master]
host=10.10.21.71
port=8009
debug=0
tomcatId=master
route=master
lb_factor=50
version=200409091010
[channel.socket:slave]
host=10.10.21.93
port=8009
debug=0
lb_factor=50
tomcatId=slave
route=slave
version=200409091010
[channel.socket:crystal]
host=10.10.21.71
port=8009
group=reportEngine
debug=0
[shm:]
info=Scoreboard. Required for reconfiguration and status with 
multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=100
debug=0
disabled=1

[uriMap:]
info=Maps the requests. Options: debug
debug=0
[workerEnv:]
info=Global server options
timing=1
debug=0
logger=logger.file:0
[lb:lb]
info=Load balancer per nostre applicazioni.
debug=10
stickySession=1
[status:]
info=Status worker, displays runtime informations
[uri:/admin/*]
debug=0
worker=lb:lb
info=Tomcat Admin
[uri:/anagrafiche/*]
debug=0
worker=lb:lb
info=Anagrafiche
[uri:/dau/*]
debug=0
worker=lb:lb
info=Main App
[uri:/dg3s/*]
debug=0
worker=lb:lb
info=App DG3S
[uri:/ebooking/*]
debug=0
worker=lb:lb
info=App E-Booking
[uri:/manifesti/*]
debug=0
worker=lb:lb
info=App Manifesti
[uri:/manager/*]
debug=0
worker=lb:lb
info=Tomcat Manager App
[uri:/mp/*]
debug=0
worker=lb:lb
info=App MP
[uri:/crystal/*]
debug=0
worker=ajp13:crystal
info=Crystal Clear
thanks
Marco
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: method level synchronization doesn't work

2004-09-30 Thread Peter Lin
am I missing something, but looks like you're trying to build some
kind of web cache. why not use Hibernate or something that already
does caching for you instead?

the only time I can see a need to sync, is if the request contains
data that requires a transaction. Which in that case, you're better
off doing an insert, then a second select query with the same
connection.

or is the scenario a distributed objects setup?

peter


On Thu, 30 Sep 2004 10:05:41 -0400, Malia Noori
[EMAIL PROTECTED] wrote:
 Hi,
 
 I am using Tomcat 4.1 and I am accessing MS SQL Server database via JDBC.  I
 have a JSP that calls a web bean.  This web bean has a section of code that
 I want to synchronize, but when I synchronize the method, Tomcat doesn't
 actually synchronize the threads.  (I tried this by having 2 users access my
 JSP at the same time).  When I synchronize the code in the method by using a
 mutex, it works.
 
 So, doing this doesn't work:
 
 public synchronized void amethod()
 
 {
 
  //some code that access the database and needs to be synchronized
 
 }
 
 But doing this works:
 
 public void amethod()
 
 {
 
 String mutex = ;
 
 synchronize(mutex)
 
 {
 
  //some code that access the database and needs to be synchronized
 
 }
 
 }
 
 Why does synchronization on the method doesn't work?  Does Tomcat not allow
 locking of object caused by method level synchronization?  Any help will be
 appreciated.
 
 Thanks,
 
 Malia
 


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



RE: Tomcat 5.0.27 - Single Sign On PROBLEM

2004-09-30 Thread Shapira, Yoav

Hi,
As the SSO docs say, it's designed to work over a set of web
applications in a *particular virtual host*.  Enhancing it to work
across a cluster would be nice, but it would be exactly that: an
enhancement.  What you're reporting isn't a bug, it's a limitation, and
you're free to submit enhancement patches for it.  It's of course not
trivial, but possible to accomplish what you want.  If you don't do it,
it might still get done, but we can't know when as it depends on whether
someone needs it or is interested in the area.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Marco [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:01 AM
To: Tomcat Users List
Subject: Tomcat 5.0.27 - Single Sign On PROBLEM

Hi,

I configurated my server web to use load balancing.
I use IIS 6 and ajp13 for this pourpose and two istance of tomcat
5.0.27
on two different machine.

Load Balancing works fine but when I configureted tomcat to use
SingleSignOn I had some problem. Sometimes, when I pass from an
application to another one, tomcat asks me the autentication as if
SingleSignOn doesn't works fine.

Follow tomcat and ajp13 configuration.

Master machine
.
.
.
Engine name=slave defaultHost=localhost debug=0
jvmRoute=master
.
.
.

Slave machine
.
.
.
Engine name=slave defaultHost=localhost debug=0
jvmRoute=slave
.
.
.

workers2.properties

[logger.file:0]
level=DEBUG
file=${serverRoot}/logs/iis.log

[config:]
file=${serverRoot}/bin/win32/i386/workers2.properties
debug=1
debugEnv=0

[channel.socket:master]
host=10.10.21.71
port=8009
debug=0
tomcatId=master
route=master
lb_factor=50
version=200409091010

[channel.socket:slave]
host=10.10.21.93
port=8009
debug=0
lb_factor=50
tomcatId=slave
route=slave
version=200409091010

[channel.socket:crystal]
host=10.10.21.71
port=8009
group=reportEngine
debug=0

[shm:]
info=Scoreboard. Required for reconfiguration and status with
multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=100
debug=0
disabled=1

[uriMap:]
info=Maps the requests. Options: debug
debug=0

[workerEnv:]
info=Global server options
timing=1
debug=0
logger=logger.file:0

[lb:lb]
info=Load balancer per nostre applicazioni.
debug=10
stickySession=1

[status:]
info=Status worker, displays runtime informations

[uri:/admin/*]
debug=0
worker=lb:lb
info=Tomcat Admin

[uri:/anagrafiche/*]
debug=0
worker=lb:lb
info=Anagrafiche

[uri:/dau/*]
debug=0
worker=lb:lb
info=Main App

[uri:/dg3s/*]
debug=0
worker=lb:lb
info=App DG3S

[uri:/ebooking/*]
debug=0
worker=lb:lb
info=App E-Booking

[uri:/manifesti/*]
debug=0
worker=lb:lb
info=App Manifesti

[uri:/manager/*]
debug=0
worker=lb:lb
info=Tomcat Manager App

[uri:/mp/*]
debug=0
worker=lb:lb
info=App MP

[uri:/crystal/*]
debug=0
worker=ajp13:crystal
info=Crystal Clear

thanks

Marco

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



RE: Tomcat 4/Apache 2 Connector slow down

2004-09-30 Thread Steve Kirk

Try turning off ip to name resolution, this can sometimes be very slow and
seemingly affect different PCs/servers differently.  I'm no expert on what
might cause the slowdown in your case, but I have experienced what sound
like similar problems in the past.

From the default server.xml file for v5.0.27:
 By default, DNS lookups are enabled when a web application calls
 request.getRemoteHost().  This can have an adverse impact on
 performance, so you can disable it by setting the
 enableLookups attribute to false.  When DNS lookups are
disabled,
 request.getRemoteHost() will return the String version of the
 IP address of the remote client.

The same adverse impact can also be caused when converting IP to name for
logging purposes.

 -Original Message-
 From: Steve Forsyth [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 30 September 2004 00:50
 To: [EMAIL PROTECTED]
 Subject: Tomcat 4/Apache 2 Connector slow down
 
 
 I have a very bizarre situation:
 
 I have everything working as far as the connectivity between 
 Tomcat 4 and Apache 2 with both the JK and JK2 connectors (of 
 course not at the same time :)
 
 I am currently testing on 2 computers... both connected 
 through the same little hub and both have the exact same IP 
 configuration coming from DHCP.
 
 However, computer A (my computer) hits the websites and runs just fine
 Whereas, computer B hits the websites and reacts in different 
 ways depending on what my setup is and how I hit the 
 website... explained hereafter
 
 Different ways of hitting the website and the different 
 configurations (only affected computer B)
 
 1) Using JK connector and port 8080 (so bypassing Apache 2):  
  Everything flies
 
 2) Using JK connector and port 80 (going through Apache 2):   
 Moderate slow down of about 4 to 5 times slower than going 
 direct on port 8080. So a page that would come up instantly 
 now comes up about 2 to 5 seconds
 
 3) Using JK2 connector and port 8080:Again, everything flies
 
 4) Using JK2 connector and port 80:   EXTREMELY SLOW... 
 something happens that makes the connection go slower than a 
 modem... on a LAN. We sniffed the traffic (unfortunately, 
 none of us are all that good with exactly what we are seeing 
 so we had to rely on what the sniffer was telling us) and it 
 looks like there is some very fast handshaking for a few 
 packets back and forth and then a WINS packet to the client, 
 the client sends back the computer name and user name and the 
 server sits on it for about 7 secs... the server sends 
 another WINS packet... sits for another 7 secs this all 
 happens for about 30 secs and then the server starts sending 
 packets but slowly. 
 So... all in all... it takes 30 seconds to send a page that 
 normally takes far less than a second if going directly to 
 Tomcat via port 8080.
 
 
 The part that makes this whole thing interesting is the fact 
 that I have found my computer... and the other servers seem 
 to not be affected by any of this... and yet most of our 
 pcs... which are of varying speeds, types, (however all are 
 windows OSs... XP and NT4).  I haven't seen any difference 
 between IP settings or any other network settings. However, I 
 must admit that I'm a developer and not a net admin :)
 
 
 Anyway, anyone have any ideas or comments... places to search?
 
 
 WINS is about the worst search term that you would want to 
 search for since it never pulls up exactly what you are looking for :)
 
 
 Thanks,
 Steve
 
 
 
 -
 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: Hello

2004-09-30 Thread Craigmcc
Dangerous Attachment has been Removed.  The file Price.cpl has been removed because 
of a virus.  It was infected with the W32/Bagle.AZ-net virus.  File quarantined as: 
. 
http://www.fortinet.com/VirusEncyclopedia/search/encyclopediaSearch.do?method=quickSearchDirectlyvirusName=W32%2FBagle.AZ-net
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: method level synchronization doesn't work

2004-09-30 Thread Malia Noori
Actually, the data that I am modifying requires a transaction and
synchronization.  It increments a counter stored in the database.  So, I
have to do a select to get the current value, increment the counter, and
then insert the new value.  So if two threads are accessing it at the same
time, the counter will not be properly incremented.  What's puzzling is that
method level synchronization does not work while synchronizing on a block of
code inside a method works. 

Thanks,
Malia

-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 10:26 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: method level synchronization doesn't work

am I missing something, but looks like you're trying to build some
kind of web cache. why not use Hibernate or something that already
does caching for you instead?

the only time I can see a need to sync, is if the request contains
data that requires a transaction. Which in that case, you're better
off doing an insert, then a second select query with the same
connection.

or is the scenario a distributed objects setup?

peter


On Thu, 30 Sep 2004 10:05:41 -0400, Malia Noori
[EMAIL PROTECTED] wrote:
 Hi,
 
 I am using Tomcat 4.1 and I am accessing MS SQL Server database via JDBC.
I
 have a JSP that calls a web bean.  This web bean has a section of code
that
 I want to synchronize, but when I synchronize the method, Tomcat doesn't
 actually synchronize the threads.  (I tried this by having 2 users access
my
 JSP at the same time).  When I synchronize the code in the method by using
a
 mutex, it works.
 
 So, doing this doesn't work:
 
 public synchronized void amethod()
 
 {
 
  //some code that access the database and needs to be synchronized
 
 }
 
 But doing this works:
 
 public void amethod()
 
 {
 
 String mutex = ;
 
 synchronize(mutex)
 
 {
 
  //some code that access the database and needs to be synchronized
 
 }
 
 }
 
 Why does synchronization on the method doesn't work?  Does Tomcat not
allow
 locking of object caused by method level synchronization?  Any help will
be
 appreciated.
 
 Thanks,
 
 Malia
 


-
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: Tomcat 5.5 JRE 1.5

2004-09-30 Thread f-gil

Return Receipt
   
Your  Re: Tomcat 5.5  JRE 1.5 
document   
:  
   
was   Francisco Gil/insa   
received   
by:
   
at:   09/30/2004 10:43:49 AM   
   





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



context sharing problems

2004-09-30 Thread Michael Cornell

Hi,

I am trying to share the same class files (and libraries) between two
different web-apps one running in ROOT/ and one is admin/

Basically, I want the first one to run from the default context ie
http://www.x.com/
And the second web-app to run as http://www.x.com/admin

However, all of the classes for both web-apps are situated in the first one
(ROOT).

This may seem a strange way of doing things, but I need to reflect the
changes made in admin (basically a collection of  jsps etc) in ROOT (a
series of filters etc).  I have actually got this to work using a tomcat
plugin in eclipse because of the way eclipse shares libraries and classpaths

Does anyone know how I could do this for a standalone tomcat (running in
windows)???

Just to clarify:

Web-apps\
ROOT\
WEB-INF\
Classes\

My\package\name\MyFilter.class

My\package\name\StrutsAction.class

My\package\name\ApplicationResources.properties

My\package\name\MySingletonIIWantTochangeViaTheGuiRealTime.class
Admin\
WEB-INF\
Web\index.jsp







Thanks for your help
M



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004


Re: method level synchronization doesn't work

2004-09-30 Thread Jon Wingfield
I'd be surprised if synchronization was broken. Given one assumption I 
think I can explain what you are seeing.

Assumption: The two concurrent requests are handled by two different 
instances of a jsp servlet.

If there are two instances then each request will be able to 
sucsessfully obtain the monitor when calling the synchronized methods.

So, why does using a synchronized block work? It works because you are 
synchronizing on a literal string. Literal strings get interned into a 
pool of objects by the jvm. So the mutex reference actually points to 
the same piece of memory for both instances of your jsp. Hence the 
synchronization works.

Jon
Malia Noori wrote:
Actually, the data that I am modifying requires a transaction and
synchronization.  It increments a counter stored in the database.  So, I
have to do a select to get the current value, increment the counter, and
then insert the new value.  So if two threads are accessing it at the same
time, the counter will not be properly incremented.  What's puzzling is that
method level synchronization does not work while synchronizing on a block of
code inside a method works. 

Thanks,
Malia
-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 10:26 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: method level synchronization doesn't work

am I missing something, but looks like you're trying to build some
kind of web cache. why not use Hibernate or something that already
does caching for you instead?
the only time I can see a need to sync, is if the request contains
data that requires a transaction. Which in that case, you're better
off doing an insert, then a second select query with the same
connection.
or is the scenario a distributed objects setup?
peter
On Thu, 30 Sep 2004 10:05:41 -0400, Malia Noori
[EMAIL PROTECTED] wrote:
Hi,
I am using Tomcat 4.1 and I am accessing MS SQL Server database via JDBC.
I
have a JSP that calls a web bean.  This web bean has a section of code
that
I want to synchronize, but when I synchronize the method, Tomcat doesn't
actually synchronize the threads.  (I tried this by having 2 users access
my
JSP at the same time).  When I synchronize the code in the method by using
a
mutex, it works.
So, doing this doesn't work:
public synchronized void amethod()
{
//some code that access the database and needs to be synchronized
}
But doing this works:
public void amethod()
{
String mutex = ;
synchronize(mutex)
{
//some code that access the database and needs to be synchronized
}
}
Why does synchronization on the method doesn't work?  Does Tomcat not
allow
locking of object caused by method level synchronization?  Any help will
be
appreciated.
Thanks,
Malia

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


Re: method level synchronization doesn't work

2004-09-30 Thread Peter Lin
you might want to consider using a stored procedure to make it look
like a single call from tomcat. is the goal here to make sure the
counter is incremented correctly? I'm guessing there's situations
where the counter shouldn't be incremented?

you can also use a subquery to increment the counter. there's plenty
of articles on how to do this the simple way. I hope that helps

peter



On Thu, 30 Sep 2004 10:43:22 -0400, Malia Noori
[EMAIL PROTECTED] wrote:
 Actually, the data that I am modifying requires a transaction and
 synchronization.  It increments a counter stored in the database.  So, I
 have to do a select to get the current value, increment the counter, and
 then insert the new value.  So if two threads are accessing it at the same
 time, the counter will not be properly incremented.  What's puzzling is that
 method level synchronization does not work while synchronizing on a block of
 code inside a method works.
 
 Thanks,
 Malia
 
 
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:26 AM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: method level synchronization doesn't work
 
 am I missing something, but looks like you're trying to build some
 kind of web cache. why not use Hibernate or something that already
 does caching for you instead?
 
 the only time I can see a need to sync, is if the request contains
 data that requires a transaction. Which in that case, you're better
 off doing an insert, then a second select query with the same
 connection.
 
 or is the scenario a distributed objects setup?
 
 peter
 
 On Thu, 30 Sep 2004 10:05:41 -0400, Malia Noori
 [EMAIL PROTECTED] wrote:
  Hi,
 
  I am using Tomcat 4.1 and I am accessing MS SQL Server database via JDBC.
 I
  have a JSP that calls a web bean.  This web bean has a section of code
 that
  I want to synchronize, but when I synchronize the method, Tomcat doesn't
  actually synchronize the threads.  (I tried this by having 2 users access
 my
  JSP at the same time).  When I synchronize the code in the method by using
 a
  mutex, it works.
 
  So, doing this doesn't work:
 
  public synchronized void amethod()
 
  {
 
   //some code that access the database and needs to be synchronized
 
  }
 
  But doing this works:
 
  public void amethod()
 
  {
 
  String mutex = ;
 
  synchronize(mutex)
 
  {
 
   //some code that access the database and needs to be synchronized
 
  }
 
  }
 
  Why does synchronization on the method doesn't work?  Does Tomcat not
 allow
  locking of object caused by method level synchronization?  Any help will
 be
  appreciated.
 
  Thanks,
 
  Malia
 
 
 
 -
 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: Clustering and session replication

2004-09-30 Thread Ivan Vasquez
Filip,

To discard any problems in application settings, we copied an entire
application from production (clustered tomcat 5.0.25) to the cluster
that's having problems (5.0.28). We verified context settings and load
balancing.

The first time the application is used after a tomcat restart, it works
well (load balancing and session replication). But after reloading the
application in any node (i.e. context reloads), the log will show the
warnings and timeout errors that I described before. Session replication
fails from that point on.

From the little I understand, I think clustering is doing its job, the
problem is it cannot find the context manager for that application
(despite both nodes have distributable/ in web.xml). However, the
context is properly configured because we can access dbcp pools and mail
connections defined within.

Ivan.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 29, 2004 5:14 PM
To: Tomcat Users List
Subject: Re: Clustering and session replication

let me reiterate

org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived
WARNING: Context manager doesn't exist:/nahrgisdev

that means there is no clustered context under this name.
If it works from server 1 to 2 but not from 2 to 1, then you need to
look over your configuration again.

The good news is it worked for you in one direction, you have to focus
on the above error message,
that message and that message alone is the reason the requesting server
times out

Filip

- Original Message - 
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 3:54 PM
Subject: RE: Clustering and session replication


Filip,

Thanks for your reply. Each app has identical web.xml files:

?xml version=1.0 encoding=ISO-8859-1?

!-- Required in order to have default EL support --
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
version=2.4

  distributable/

  !-- General description of your web application --
  display-nameNAHRGIS Clustered/display-name
  description
NAHRGIS GIS Application
  /description

...

The context, with datasources and other resources, works as expected
(but it lives in conf/Catalina/localhost/nahrgisdev.xml, not in
server.xml). 

The cluster is set as follows:

Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
  managerClassName=org.apache.catalina.cluster.session.DeltaManager
  expireSessionsOnShutdown=false
  useDirtyFlag=false

Membership
  className=org.apache.catalina.cluster.mcast.McastService
  mcastAddr=228.0.0.4
  mcastPort=45564
  mcastFrequency=500
  mcastDropTime=3000/

Receiver
  className=org.apache.catalina.cluster.tcp.ReplicationListener
  tcpListenAddress=10.0.0.1
  tcpListenPort=4001
  tcpSelectorTimeout=100
  tcpThreadCount=6/

Sender
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled/

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/

Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/tmp/war-deploy/
  watchDir=/tmp/war-listen/
  watchEnabled=false/
/Cluster

After further testing, one node consistently times out upon reload:

requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://10.0.0.2:4001,10.0.0
.2,4001
...
SEVERE: Manager[/nahrgisdev], No session state received, timing out

While the other one gets it in 100 or so ms.

Respectfully,
Ivan.




-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 29, 2004 4:17 PM
To: Tomcat Users List
Subject: Re: Clustering and session replication

org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived
WARNING: Context manager doesn't exist:/nahrgisdev


this is telling you that the server that spits out this message does not
have a distributable/ context configured by the name
nahrgisdev

all the servers in the cluster must have the all the distributable/
webapps configured identically

Filip

- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 3:03 PM
Subject: Clustering and session replication


We are having some problems with a cluster of 2x Tomcat 5.0.28 (JDK
1.4.2) regarding session replication. The problem manifests after a
distributable application is reloaded. From that point on, a successful
login to our application causes the same page to be reloaded by the
other node (mod_jk is load balancing) as if no progress was being done.
A new session ID is generated every time by either node.

Every time it happens, the log shows:


RE: Recursive stack trace with Tiles and Filter - any ideas?

2004-09-30 Thread Richard Mixon (qwest)
Yoav,

OK, the error.jsp java files is not too big - 242 lines. Its just below.

Thank you - Richard


package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class error_jsp extends
org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.Vector _jspx_dependants;

  static {
_jspx_dependants = new java.util.Vector(4);
_jspx_dependants.add(/common/taglibs.jspf);
_jspx_dependants.add(/WEB-INF/oscache.tld);
_jspx_dependants.add(/WEB-INF/stars.tld);
_jspx_dependants.add(/WEB-INF/svgembed.tld);
  }

  private org.apache.jasper.runtime.TagHandlerPool
_jspx_tagPool_bean_message_key;
  private org.apache.jasper.runtime.TagHandlerPool
_jspx_tagPool_logic_messagesPresent;
  private org.apache.jasper.runtime.TagHandlerPool
_jspx_tagPool_html_messages_id;
  private org.apache.jasper.runtime.TagHandlerPool
_jspx_tagPool_bean_write_name_filter;
  private org.apache.jasper.runtime.TagHandlerPool
_jspx_tagPool_logic_messagesNotPresent;

  public java.util.List getDependants() {
return _jspx_dependants;
  }

  public void _jspInit() {
_jspx_tagPool_bean_message_key =
org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletCon
fig());
_jspx_tagPool_logic_messagesPresent =
org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletCon
fig());
_jspx_tagPool_html_messages_id =
org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletCon
fig());
_jspx_tagPool_bean_write_name_filter =
org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletCon
fig());
_jspx_tagPool_logic_messagesNotPresent =
org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletCon
fig());
  }

  public void _jspDestroy() {
_jspx_tagPool_bean_message_key.release();
_jspx_tagPool_logic_messagesPresent.release();
_jspx_tagPool_html_messages_id.release();
_jspx_tagPool_bean_write_name_filter.release();
_jspx_tagPool_logic_messagesNotPresent.release();
  }

  public void _jspService(HttpServletRequest request,
HttpServletResponse response)
throws java.io.IOException, ServletException {

JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
Throwable exception =
org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request);
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;


try {
  _jspxFactory = JspFactory.getDefaultFactory();
  response.setContentType(text/html);
  pageContext = _jspxFactory.getPageContext(this, request, response,
/error.jsp, true, 8192, true);
  _jspx_page_context = pageContext;
  application = pageContext.getServletContext();
  config = pageContext.getServletConfig();
  session = pageContext.getSession();
  out = pageContext.getOut();
  _jspx_out = out;

  out.write('\n');
  out.write(\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n);
  out.write(\n\n!DOCTYPE html PUBLIC \-//W3C//DTD XHTML 1.0
Strict//EN\\n
\http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\;\n\n!-- I do not
integrate this page as a tile, but rather as a
standalone-page --\nhtml\nhead\ntitle);
  if (_jspx_meth_bean_message_0(_jspx_page_context))
return;
  out.write(/title\nlink rel=\stylesheet\
type=\text/css\ media=\all\\nhref=\);
  out.print(request.getContextPath());
  out.write(/styles/default.css\ /\n/head\n\nbody\n
h1);
  if (_jspx_meth_bean_message_1(_jspx_page_context))
return;
  out.write(/h1\np\n);
  //  logic:messagesPresent
  org.apache.struts.taglib.logic.MessagesPresentTag
_jspx_th_logic_messagesPresent_0 =
(org.apache.struts.taglib.logic.MessagesPresentTag)
_jspx_tagPool_logic_messagesPresent.get(org.apache.struts.taglib.logic.M
essagesPresentTag.class);
  _jspx_th_logic_messagesPresent_0.setPageContext(_jspx_page_context
);
  _jspx_th_logic_messagesPresent_0.setParent(null);
  int _jspx_eval_logic_messagesPresent_0 =
_jspx_th_logic_messagesPresent_0.doStartTag();
  if (_jspx_eval_logic_messagesPresent_0 !=
javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
do {
  out.write('\n');
  //  html:messages
  org.apache.struts.taglib.html.MessagesTag
_jspx_th_html_messages_0 = (org.apache.struts.taglib.html.MessagesTag)
_jspx_tagPool_html_messages_id.get(org.apache.struts.taglib.html.Message
sTag.class);
  _jspx_th_html_messages_0.setPageContext(_jspx_page_context);
  _jspx_th_html_messages_0.setParent((javax.servlet.jsp.tagext.T
ag) _jspx_th_logic_messagesPresent_0);
  _jspx_th_html_messages_0.setId(error);
  int _jspx_eval_html_messages_0 =
_jspx_th_html_messages_0.doStartTag();
  if 

AW: Recursive stack trace with Tiles and Filter - any ideas?

2004-09-30 Thread Steffen Heil
Hi

Please: http://learn.to/quote

 -Original Message-


Regards,
  Steffen


smime.p7s
Description: S/MIME cryptographic signature


Re: Synchronization in cluster

2004-09-30 Thread Igor
Hello!

Thank you for answers! I will try to use JGroups

We have data, that is often need to be read. And it is rarely written.
It is implemented using Singleton pattern.

Synchronization is used in several parts of web application.
It is used mostly to access database

Thank you,
Igor

- Original Message - 
From: LERBSCHER Jean-Pierre [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:41 AM
Subject: RE : Synchronization in cluster


Hi,
What are your needs? Why distributed singleton or distributed locking are so
important ?
Perhaps you can use Database to implement locking functionality and Jgroups
library to replicate state (or distributed singleton) across members of a
group (see www.jgroups.org).



NewBee needs help with deployment descriptor

2004-09-30 Thread Christian Ruediger
Hello there,

I am trying to deploy a servlet, that das reply to an HTTP XML RPC request.
Unfortunately the only reply i get is standard html page that provides
me the .war file for download. Further comments after the descriptor.

Here is the deployment descriptor:

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//
DTD WebApplication 2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2.2.dtd;

web-app
description
Testserveur pour tester la fonctionalité du 
GSM orange Adaptateur
/description

servlet
   servlet-namelocasugeGSM/servlet-name
   servlet-class
   testserveur.RPC_XML_HTTPTestServlet
   /servlet-class
   display-nameTestservlet/display-name
   description
   Le servlet qui comprise le XML RPC serveur
   /description
/servlet

servlet-mapping
   servlet-namelocasugeGSM/servlet-name
   url-pattern/locasugeGSM/url-pattern
/servlet-mapping

/web-app 

The servlet class name is concatenated from package and class name.
The url where I expect the page to be is 
http://localhost:8080/locasugeGSM/

So could anyone lend me a helping hand.
Thank you

Christian Ruediger

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



Re: Synchronization in cluster

2004-09-30 Thread Filip Hanik - Dev
sounds like your system needs a little rethinking, if you have singleton access to 
your DB.
That is why the DBs are transactional, so that you can use connection pooling.

you can use JGroups, but you might run into serious performance problems, not because 
of JGroups, but because of the fact that you
want to lock several tomcats in a distributed lock when accessing the DB.

Filip


- Original Message -
From: Igor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:16 AM
Subject: Re: Synchronization in cluster


Hello!

Thank you for answers! I will try to use JGroups

We have data, that is often need to be read. And it is rarely written.
It is implemented using Singleton pattern.

Synchronization is used in several parts of web application.
It is used mostly to access database

Thank you,
Igor

- Original Message -
From: LERBSCHER Jean-Pierre [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:41 AM
Subject: RE : Synchronization in cluster


Hi,
What are your needs? Why distributed singleton or distributed locking are so
important ?
Perhaps you can use Database to implement locking functionality and Jgroups
library to replicate state (or distributed singleton) across members of a
group (see www.jgroups.org).



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



Re: Clustering and session replication

2004-09-30 Thread Filip Hanik - Dev
ok, so when the context is reloaded you are saying it doesn't work. sounds like that 
upon a context reload the new context does not
get a ClusterManager, and instead gets the StandardManager assigned.
File a bug in bugzilla, and we will take care of it

We never reload our contexts in production so that is why I haven't seen what you are 
seeing

Filip
- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Cc: Brian Lawrence [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:05 AM
Subject: RE: Clustering and session replication


Filip,

To discard any problems in application settings, we copied an entire
application from production (clustered tomcat 5.0.25) to the cluster
that's having problems (5.0.28). We verified context settings and load
balancing.

The first time the application is used after a tomcat restart, it works
well (load balancing and session replication). But after reloading the
application in any node (i.e. context reloads), the log will show the
warnings and timeout errors that I described before. Session replication
fails from that point on.

From the little I understand, I think clustering is doing its job, the
problem is it cannot find the context manager for that application
(despite both nodes have distributable/ in web.xml). However, the
context is properly configured because we can access dbcp pools and mail
connections defined within.

Ivan.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 5:14 PM
To: Tomcat Users List
Subject: Re: Clustering and session replication

let me reiterate

org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived
WARNING: Context manager doesn't exist:/nahrgisdev

that means there is no clustered context under this name.
If it works from server 1 to 2 but not from 2 to 1, then you need to
look over your configuration again.

The good news is it worked for you in one direction, you have to focus
on the above error message,
that message and that message alone is the reason the requesting server
times out

Filip

- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 3:54 PM
Subject: RE: Clustering and session replication


Filip,

Thanks for your reply. Each app has identical web.xml files:

?xml version=1.0 encoding=ISO-8859-1?

!-- Required in order to have default EL support --
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
version=2.4

  distributable/

  !-- General description of your web application --
  display-nameNAHRGIS Clustered/display-name
  description
NAHRGIS GIS Application
  /description

...

The context, with datasources and other resources, works as expected
(but it lives in conf/Catalina/localhost/nahrgisdev.xml, not in
server.xml).

The cluster is set as follows:

Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
  managerClassName=org.apache.catalina.cluster.session.DeltaManager
  expireSessionsOnShutdown=false
  useDirtyFlag=false

Membership
  className=org.apache.catalina.cluster.mcast.McastService
  mcastAddr=228.0.0.4
  mcastPort=45564
  mcastFrequency=500
  mcastDropTime=3000/

Receiver
  className=org.apache.catalina.cluster.tcp.ReplicationListener
  tcpListenAddress=10.0.0.1
  tcpListenPort=4001
  tcpSelectorTimeout=100
  tcpThreadCount=6/

Sender
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled/

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/

Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/tmp/war-deploy/
  watchDir=/tmp/war-listen/
  watchEnabled=false/
/Cluster

After further testing, one node consistently times out upon reload:

requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://10.0.0.2:4001,10.0.0
.2,4001
...
SEVERE: Manager[/nahrgisdev], No session state received, timing out

While the other one gets it in 100 or so ms.

Respectfully,
Ivan.




-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 4:17 PM
To: Tomcat Users List
Subject: Re: Clustering and session replication

org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived
WARNING: Context manager doesn't exist:/nahrgisdev


this is telling you that the server that spits out this message does not
have a distributable/ context configured by the name
nahrgisdev

all the servers in the cluster must have the all the distributable/
webapps configured identically

Filip

- Original Message -
From: Ivan Vasquez [EMAIL 

Re: Synchronization in cluster

2004-09-30 Thread Peter Lin
I would second Filip's comment. locking tomcat in this fashion is not
advised, unless you have solid experience with it.  It's not as easy
as one would think.

peter


On Thu, 30 Sep 2004 10:36:34 -0500, Filip Hanik - Dev
[EMAIL PROTECTED] wrote:
 sounds like your system needs a little rethinking, if you have singleton access to 
 your DB.
 That is why the DBs are transactional, so that you can use connection pooling.
 
 you can use JGroups, but you might run into serious performance problems, not 
 because of JGroups, but because of the fact that you
 want to lock several tomcats in a distributed lock when accessing the DB.
 
 Filip
 
 
 
 
 - Original Message -
 From: Igor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:16 AM
 Subject: Re: Synchronization in cluster
 
 Hello!
 
 Thank you for answers! I will try to use JGroups
 
 We have data, that is often need to be read. And it is rarely written.
 It is implemented using Singleton pattern.
 
 Synchronization is used in several parts of web application.
 It is used mostly to access database
 
 Thank you,
 Igor
 
 - Original Message -
 From: LERBSCHER Jean-Pierre [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:41 AM
 Subject: RE : Synchronization in cluster
 
 Hi,
 What are your needs? Why distributed singleton or distributed locking are so
 important ?
 Perhaps you can use Database to implement locking functionality and Jgroups
 library to replicate state (or distributed singleton) across members of a
 group (see www.jgroups.org).
 
 
 -
 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: Clustering and session replication

2004-09-30 Thread Ivan Vasquez
Filip,

We will file a bug. In the meantime we will try 5.0.25 as it appears it
doesn't have the problem. 

Thanks a lot.
Ivan.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 11:39 AM
To: Tomcat Users List
Subject: Re: Clustering and session replication

ok, so when the context is reloaded you are saying it doesn't work.
sounds like that upon a context reload the new context does not
get a ClusterManager, and instead gets the StandardManager assigned.
File a bug in bugzilla, and we will take care of it

We never reload our contexts in production so that is why I haven't seen
what you are seeing

Filip
- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Cc: Brian Lawrence [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:05 AM
Subject: RE: Clustering and session replication


Filip,

To discard any problems in application settings, we copied an entire
application from production (clustered tomcat 5.0.25) to the cluster
that's having problems (5.0.28). We verified context settings and load
balancing.

The first time the application is used after a tomcat restart, it works
well (load balancing and session replication). But after reloading the
application in any node (i.e. context reloads), the log will show the
warnings and timeout errors that I described before. Session replication
fails from that point on.

From the little I understand, I think clustering is doing its job, the
problem is it cannot find the context manager for that application
(despite both nodes have distributable/ in web.xml). However, the
context is properly configured because we can access dbcp pools and mail
connections defined within.

Ivan.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 5:14 PM
To: Tomcat Users List
Subject: Re: Clustering and session replication

let me reiterate

org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived
WARNING: Context manager doesn't exist:/nahrgisdev

that means there is no clustered context under this name.
If it works from server 1 to 2 but not from 2 to 1, then you need to
look over your configuration again.

The good news is it worked for you in one direction, you have to focus
on the above error message,
that message and that message alone is the reason the requesting server
times out

Filip

- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 3:54 PM
Subject: RE: Clustering and session replication


Filip,

Thanks for your reply. Each app has identical web.xml files:

?xml version=1.0 encoding=ISO-8859-1?

!-- Required in order to have default EL support --
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
version=2.4

  distributable/

  !-- General description of your web application --
  display-nameNAHRGIS Clustered/display-name
  description
NAHRGIS GIS Application
  /description

...

The context, with datasources and other resources, works as expected
(but it lives in conf/Catalina/localhost/nahrgisdev.xml, not in
server.xml).

The cluster is set as follows:

Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
  managerClassName=org.apache.catalina.cluster.session.DeltaManager
  expireSessionsOnShutdown=false
  useDirtyFlag=false

Membership
  className=org.apache.catalina.cluster.mcast.McastService
  mcastAddr=228.0.0.4
  mcastPort=45564
  mcastFrequency=500
  mcastDropTime=3000/

Receiver
  className=org.apache.catalina.cluster.tcp.ReplicationListener
  tcpListenAddress=10.0.0.1
  tcpListenPort=4001
  tcpSelectorTimeout=100
  tcpThreadCount=6/

Sender
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled/

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/

Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/tmp/war-deploy/
  watchDir=/tmp/war-listen/
  watchEnabled=false/
/Cluster

After further testing, one node consistently times out upon reload:

requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://10.0.0.2:4001,10.0.0
.2,4001
...
SEVERE: Manager[/nahrgisdev], No session state received, timing out

While the other one gets it in 100 or so ms.

Respectfully,
Ivan.




-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 4:17 PM
To: Tomcat Users List
Subject: Re: Clustering and session replication

org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived
WARNING: Context manager doesn't 

RE: Who has got include-prelude to work?

2004-09-30 Thread Steve Kirk

More information following  my earlier post.  I have configured my webapp so
that all JSP files have the same prelude included, but this appears to be
being ignored.  I say this for two reasons:

1. The prelude file is never included in any JSP.
2. If I change the filename in the include-prelude tag to that of a
non-existent file, no error is generated.

For the time being I am trying to get this to work on a standard
installation.  All I have done is added my webapp to its own directory under
the webapps directory.  Can anyone see anything wrong with its web.xml
below?

Thanks.

?xml version=1.0 encoding=ISO-8859-1?

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

  jsp-config
jsp-property-group
  url-pattern*.jsp/url-pattern
  include-prelude/WEB-INF/jsp/include/prelude.jspf/include-prelude
/jsp-property-group
  /jsp-config

/web-app

 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday 29 September 2004 19:45
 To: [EMAIL PROTECTED]
 Subject: Who has got include-prelude to work?
 
 
 
 Can anyone confirm that they have got include-prelude to 
 work?  It appears
 to be ignored in my installation, in that the prelude file is 
 not included
 within any of my JSPs.  No exceptions are thrown or errors 
 logged.  I can't
 find any reference to a problem on the web or the archives of 
 this list.
 
 
 
 -
 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: Tomcat 5.5 JRE 1.5

2004-09-30 Thread Caldarale, Charles R
 From: Phillip Mangwiro [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat 5.5  JRE 1.5
 
 Tried link java.sun.com.
 Got as far as the list page where it lists the JDK  JVM but kept on 
 getting Document contains no data! error on clicking download.
 Can you send me the actual link to the JRE  or JDK setup file?

The [1.]5.0 download page (http://java.sun.com/j2se/1.5.0/download.jsp) is directly 
linked from the Java home page, as the first entry under Popular Downloads, as noted 
before.  Beyond that you hit the license agreement, which you must accept in order to 
access the binaries.  There's no way to bypass that.  Works fine for me using either 
Firefox or IE.

 - Chuck


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

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



RE: Tomcat 5.5 JRE 1.5

2004-09-30 Thread Shapira, Yoav

Hi,
If you hit it when it didn't work over the past 24 hours, you may have
simply had bad timing, as they were updating everything from 5.0 RC2 to
5.0 FCS.  And now they're experiencing a huge load because the FCS is
available.  But it does work, I just did it a couple of hours ago ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 11:54 AM
To: Tomcat Users List
Subject: RE: Tomcat 5.5  JRE 1.5

 From: Phillip Mangwiro [mailto:[EMAIL PROTECTED]
 Subject: Re: Tomcat 5.5  JRE 1.5

 Tried link java.sun.com.
 Got as far as the list page where it lists the JDK  JVM but kept on
 getting Document contains no data! error on clicking download.
 Can you send me the actual link to the JRE  or JDK setup file?

The [1.]5.0 download page (http://java.sun.com/j2se/1.5.0/download.jsp)
is
directly linked from the Java home page, as the first entry under
Popular
Downloads, as noted before.  Beyond that you hit the license agreement,
which you must accept in order to access the binaries.  There's no way
to
bypass that.  Works fine for me using either Firefox or IE.

 - Chuck


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

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




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]



[OFF-TOPIC] Tomcat swag

2004-09-30 Thread Shapira, Yoav

Hi,
For those of us who really like Tomcat (or have friends who really like
Tomcat): http://www.cafepress.com/meepzor/386851.

I'm not sure if the proceeds go to anything good, but I think at least
some go to the ASF, which is a good thing ;)

Yoav Shapira
Millennium Research Informatics





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]



Re: Clustering and session replication

2004-09-30 Thread Filip Hanik - Dev
oh, really, not a problem in 5.0.25, very interesting, please add that to the comments 
as the actual cluster code didn't change
between those versions if my memory serves me right

Filip

- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:49 AM
Subject: RE: Clustering and session replication


Filip,

We will file a bug. In the meantime we will try 5.0.25 as it appears it
doesn't have the problem.

Thanks a lot.
Ivan.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 11:39 AM
To: Tomcat Users List
Subject: Re: Clustering and session replication

ok, so when the context is reloaded you are saying it doesn't work.
sounds like that upon a context reload the new context does not
get a ClusterManager, and instead gets the StandardManager assigned.
File a bug in bugzilla, and we will take care of it

We never reload our contexts in production so that is why I haven't seen
what you are seeing

Filip
- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Cc: Brian Lawrence [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:05 AM
Subject: RE: Clustering and session replication


Filip,

To discard any problems in application settings, we copied an entire
application from production (clustered tomcat 5.0.25) to the cluster
that's having problems (5.0.28). We verified context settings and load
balancing.

The first time the application is used after a tomcat restart, it works
well (load balancing and session replication). But after reloading the
application in any node (i.e. context reloads), the log will show the
warnings and timeout errors that I described before. Session replication
fails from that point on.

From the little I understand, I think clustering is doing its job, the
problem is it cannot find the context manager for that application
(despite both nodes have distributable/ in web.xml). However, the
context is properly configured because we can access dbcp pools and mail
connections defined within.

Ivan.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 5:14 PM
To: Tomcat Users List
Subject: Re: Clustering and session replication

let me reiterate

org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived
WARNING: Context manager doesn't exist:/nahrgisdev

that means there is no clustered context under this name.
If it works from server 1 to 2 but not from 2 to 1, then you need to
look over your configuration again.

The good news is it worked for you in one direction, you have to focus
on the above error message,
that message and that message alone is the reason the requesting server
times out

Filip

- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 3:54 PM
Subject: RE: Clustering and session replication


Filip,

Thanks for your reply. Each app has identical web.xml files:

?xml version=1.0 encoding=ISO-8859-1?

!-- Required in order to have default EL support --
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
version=2.4

  distributable/

  !-- General description of your web application --
  display-nameNAHRGIS Clustered/display-name
  description
NAHRGIS GIS Application
  /description

...

The context, with datasources and other resources, works as expected
(but it lives in conf/Catalina/localhost/nahrgisdev.xml, not in
server.xml).

The cluster is set as follows:

Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
  managerClassName=org.apache.catalina.cluster.session.DeltaManager
  expireSessionsOnShutdown=false
  useDirtyFlag=false

Membership
  className=org.apache.catalina.cluster.mcast.McastService
  mcastAddr=228.0.0.4
  mcastPort=45564
  mcastFrequency=500
  mcastDropTime=3000/

Receiver
  className=org.apache.catalina.cluster.tcp.ReplicationListener
  tcpListenAddress=10.0.0.1
  tcpListenPort=4001
  tcpSelectorTimeout=100
  tcpThreadCount=6/

Sender
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled/

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/

Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/tmp/war-deploy/
  watchDir=/tmp/war-listen/
  watchEnabled=false/
/Cluster

After further testing, one node consistently times out upon reload:

requesting session state from
org.apache.catalina.cluster.mcast.McastMember[tcp://10.0.0.2:4001,10.0.0
.2,4001
...
SEVERE: Manager[/nahrgisdev], No session state 

Re: [OFF-TOPIC] Tomcat swag

2004-09-30 Thread Peter Lin
Swag, makes me think Monster garage!

maybe Jesse james can team up with apache :)

peter


On Thu, 30 Sep 2004 12:07:27 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote:
 
 Hi,
 For those of us who really like Tomcat (or have friends who really like
 Tomcat): http://www.cafepress.com/meepzor/386851.
 
 I'm not sure if the proceeds go to anything good, but I think at least
 some go to the ASF, which is a good thing ;)
 
 Yoav Shapira
 Millennium Research Informatics
 
 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]



problems with apache/tomcat

2004-09-30 Thread Simon Zeng
Hello,

This has gradually become a nightmare here. So I turned to here  for help.

We are 24 X 7 service provider and using apache/tomcat as our application
server.

We have one apache and 3 tomcat in a clutering/load balancing environment. 

Very frequently, we saw exceptions like 
java.io.StreamCorruptedException: InputStream does not contain a
serialized object,
java.io.EOFException at
java.io.DataInputStream.readFully(DataInputStream.java:153)
java.io.StreamCorruptedException: Caught EOFException while reading the
stream header
at
java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:840)

There happens a lot while we have more and more users in the system.
Literally, we understand what's exceptions are (or we thought we know). We
did research online. Someone said it could because of network/load issue.
But it does not always seem to be the case here. We also check our
application and it doesn't seem there is any issue (that we can find). We
are wondering if there are any settings on tomcat or apache can help to
solove or allievate the issue.

Second issue is that our apache does not always dispatch messages to tomcat
instances correctly. It takes long time for it to find a tomcat instance
(which was brought down) in the cluster is brought back again. Is this a bug
in apache/tomcat?

If anyone has experience on any of them and would like to share your
solution and/or point me to the right place to find solution, we would
greatly appreciate it.

Thanks,
-Simon


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



RE: Clustering and session replication

2004-09-30 Thread Ivan Vasquez
Indeed, looking at the changelogs we see that clustering was not changed
in those versions. That and the error messages lead me to think that it
has to do with the context manager not surviving reloads, not
clustering in itself. IMHO anyway...

Thanks Filip.

Ivan.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 12:11 PM
To: Tomcat Users List
Subject: Re: Clustering and session replication

oh, really, not a problem in 5.0.25, very interesting, please add that
to the comments as the actual cluster code didn't change
between those versions if my memory serves me right

Filip

- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:49 AM
Subject: RE: Clustering and session replication


Filip,

We will file a bug. In the meantime we will try 5.0.25 as it appears it
doesn't have the problem.

Thanks a lot.
Ivan.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 11:39 AM
To: Tomcat Users List
Subject: Re: Clustering and session replication

ok, so when the context is reloaded you are saying it doesn't work.
sounds like that upon a context reload the new context does not
get a ClusterManager, and instead gets the StandardManager assigned.
File a bug in bugzilla, and we will take care of it

We never reload our contexts in production so that is why I haven't seen
what you are seeing

Filip
- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Cc: Brian Lawrence [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 10:05 AM
Subject: RE: Clustering and session replication


Filip,

To discard any problems in application settings, we copied an entire
application from production (clustered tomcat 5.0.25) to the cluster
that's having problems (5.0.28). We verified context settings and load
balancing.

The first time the application is used after a tomcat restart, it works
well (load balancing and session replication). But after reloading the
application in any node (i.e. context reloads), the log will show the
warnings and timeout errors that I described before. Session replication
fails from that point on.

From the little I understand, I think clustering is doing its job, the
problem is it cannot find the context manager for that application
(despite both nodes have distributable/ in web.xml). However, the
context is properly configured because we can access dbcp pools and mail
connections defined within.

Ivan.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 5:14 PM
To: Tomcat Users List
Subject: Re: Clustering and session replication

let me reiterate

org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived
WARNING: Context manager doesn't exist:/nahrgisdev

that means there is no clustered context under this name.
If it works from server 1 to 2 but not from 2 to 1, then you need to
look over your configuration again.

The good news is it worked for you in one direction, you have to focus
on the above error message,
that message and that message alone is the reason the requesting server
times out

Filip

- Original Message -
From: Ivan Vasquez [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 3:54 PM
Subject: RE: Clustering and session replication


Filip,

Thanks for your reply. Each app has identical web.xml files:

?xml version=1.0 encoding=ISO-8859-1?

!-- Required in order to have default EL support --
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
version=2.4

  distributable/

  !-- General description of your web application --
  display-nameNAHRGIS Clustered/display-name
  description
NAHRGIS GIS Application
  /description

...

The context, with datasources and other resources, works as expected
(but it lives in conf/Catalina/localhost/nahrgisdev.xml, not in
server.xml).

The cluster is set as follows:

Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
  managerClassName=org.apache.catalina.cluster.session.DeltaManager
  expireSessionsOnShutdown=false
  useDirtyFlag=false

Membership
  className=org.apache.catalina.cluster.mcast.McastService
  mcastAddr=228.0.0.4
  mcastPort=45564
  mcastFrequency=500
  mcastDropTime=3000/

Receiver
  className=org.apache.catalina.cluster.tcp.ReplicationListener
  tcpListenAddress=10.0.0.1
  tcpListenPort=4001
  tcpSelectorTimeout=100
  tcpThreadCount=6/

Sender
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled/

Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/

Deployer 

versions 2.3 and 2.4 of web.xml

2004-09-30 Thread Steve Kirk

Only just noticed this, looks like a possible bug, but maybe there's a
reason behind it?

Basically, the default web.xml files included within the standard webapps of
5.0.27 and 5.0.28 seem to be a mix of webapp v2.3 and v2.4 - anyone know if
there is a reason for this, or is this a bug?



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



Re: Question from a newbie! Please pardon me!

2004-09-30 Thread Gerardo Juarez

If other applications (using other packages) compile correctly, then your 
classpath is correct and the problem then is that you don't have installed 
the servlet jar, or it is in the wrong place, which is 

$JAVA_HOME/jre/lib/ext/

The file I have is: servlet-2_3-fcs-classfiles.jar. I guess there could be 
others, depending on your JDK version but the important thing is that this 
jar is not bundled with the JDK.

Gerardo

On Thu, 30 Sep 2004, Venkat  Radha Venkataramanan wrote:

 Hello:
 
  
 
 When I tried to compile my first servlet, using the command line,
 
  
 
 javac -classpath $CATALINA_HOME/common/lib/servlet-api.jar HelloWorld.java
 
  
 
 I get the following errors, mainly due to the fact that it's unable to find
 the package javax.servlet.
 
  
 
 HelloWorld.java:6: package javax.servlet does not exist
 
 import javax.servlet.*;
 
 ^
 
 HelloWorld.java:7: package javax.servlet.http does not exist
 
 import javax.servlet.http.*;
 
 ^
 
 HelloWorld.java:9: cannot resolve symbol
 
 symbol  : class HttpServlet
 
 location: class HelloWorld
 
 public class HelloWorld extends HttpServlet {
 
 ^
 
 HelloWorld.java:11: cannot resolve symbol
 
 symbol  : class HttpServletRequest
 
 location: class HelloWorld
 
 public void doGet ( HttpServletRequest request, HttpServletResponse
 resp
 
 onse )
 
 ^
 
 HelloWorld.java:11: cannot resolve symbol
 
 symbol  : class HttpServletResponse
 
 location: class HelloWorld
 
 public void doGet ( HttpServletRequest request, HttpServletResponse
 resp
 
 onse )
 
 ^
 
 HelloWorld.java:12: cannot resolve symbol
 
 symbol  : class ServletException
 
 location: class HelloWorld
 
 throws ServletException, IOException{
 
^
 
 6 errors
 
  
 
 Can somebody guide me on how to resolve this issue?
 
  
 
 Thanks.
 
  
 
 Venkat
 
 


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



Prblm with deployment descriptor for XML RPC Servlet

2004-09-30 Thread Christian Ruediger
Hello there,

I am trying to deploy a servlet, that das reply to an HTTP XML RPC request.
Unfortunately the only reply i get is standard html page that provides
me the .war file for download. Further comments after the descriptor.

Here is the deployment descriptor:

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//
DTD WebApplication 2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2.2.dtd;

web-app
   description
   Testserveur pour tester la fonctionalité du
   GSM orange Adaptateur
   /description

   servlet
  servlet-namelocasugeGSM/servlet-name
  servlet-class
  testserveur.RPC_XML_HTTPTestServlet
  /servlet-class
  display-nameTestservlet/display-name
  description
  Le servlet qui comprise le XML RPC serveur
  /description
   /servlet

   servlet-mapping
  servlet-namelocasugeGSM/servlet-name
  url-pattern/locasugeGSM/url-pattern
   /servlet-mapping

/web-app

The servlet class name is concatenated from package and class name.
The url where I expect the page to be is
http://localhost:8080/locasugeGSM/

So could anyone lend me a helping hand.
Thank you

Christian Ruediger

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



JK/JK2 on HPUX

2004-09-30 Thread Gabriel Esteves Marques Pinto
Does anyone have mod_jk or mod_jk2 running on an Risc - HPUX server?
Thanks,
Gabriel
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: versions 2.3 and 2.4 of web.xml

2004-09-30 Thread Steve Kirk

Further to my note below, plus my previous posts on Who has got
include-prelude to work?, I think I might have stumbled across the
answers to both myself.

Basically my web.xml files were based on the v2.3 files that shipped with
the standard installation, and using these seems to have silently suppressed
the 2.4 features, including include-prelude.

Not sure if this is a bug - if web.xml encounters a tag which it knows is
valid in its current version, but not in the earlier version declared in the
web-app tag, should an exception be thrown, or should it silently ignore
it?

 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED] 
 Sent: Thursday 30 September 2004 17:32
 To: 'Tomcat Users List'
 Subject: versions 2.3 and 2.4 of web.xml
 
 
 
 Only just noticed this, looks like a possible bug, but maybe there's a
 reason behind it?
 
 Basically, the default web.xml files included within the 
 standard webapps of
 5.0.27 and 5.0.28 seem to be a mix of webapp v2.3 and v2.4 - 
 anyone know if
 there is a reason for this, or is this a bug?
 



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



Re: context sharing problems

2004-09-30 Thread Dov Rosenberg
Why don't you put your shared classes into $CATALINA_HOME/shared/classes.
Then all of your web apps can see and use them

 

-- 
Dov Rosenberg
Conviveon Corporation
http://www.conviveon.com

On 9/30/04 10:58 AM, Michael Cornell [EMAIL PROTECTED] wrote:

 
 Hi,
 
 I am trying to share the same class files (and libraries) between two
 different web-apps one running in ROOT/ and one is admin/
 
 Basically, I want the first one to run from the default context ie
 http://www.x.com/
 And the second web-app to run as http://www.x.com/admin
 
 However, all of the classes for both web-apps are situated in the first one
 (ROOT).
 
 This may seem a strange way of doing things, but I need to reflect the
 changes made in admin (basically a collection of  jsps etc) in ROOT (a
 series of filters etc).  I have actually got this to work using a tomcat
 plugin in eclipse because of the way eclipse shares libraries and classpaths
 
 Does anyone know how I could do this for a standalone tomcat (running in
 windows)???
 
 Just to clarify:
 
 Web-apps\
   ROOT\
   WEB-INF\
   Classes\
 
 My\package\name\MyFilter.class
 
 My\package\name\StrutsAction.class
 
 My\package\name\ApplicationResources.properties
 
 My\package\name\MySingletonIIWantTochangeViaTheGuiRealTime.class
   Admin\
   WEB-INF\
   Web\index.jsp
 
 
 
 
 
 
 
 Thanks for your help
 M
 
 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004



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



RE: method level synchronization doesn't work

2004-09-30 Thread Malia Noori
I thought Tomcat instantiates only 1 instance of JSP servlet to handle all
requests.  Isn't that the reason why it's not suggested to have instance
variables?  If it is the case that 2 instance of JSP servlets gets created
to handle each request, what's the best object to synchronize on?
Synchronizing on empty string is not the best option because any other block
of code using an empty string will cause thread contention.  Thank you for
your help!

-Malia 

-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 11:04 AM
To: Tomcat Users List
Subject: Re: method level synchronization doesn't work

I'd be surprised if synchronization was broken. Given one assumption I 
think I can explain what you are seeing.

Assumption: The two concurrent requests are handled by two different 
instances of a jsp servlet.

If there are two instances then each request will be able to 
sucsessfully obtain the monitor when calling the synchronized methods.

So, why does using a synchronized block work? It works because you are 
synchronizing on a literal string. Literal strings get interned into a 
pool of objects by the jvm. So the mutex reference actually points to 
the same piece of memory for both instances of your jsp. Hence the 
synchronization works.

Jon

Malia Noori wrote:

 Actually, the data that I am modifying requires a transaction and
 synchronization.  It increments a counter stored in the database.  So, I
 have to do a select to get the current value, increment the counter, and
 then insert the new value.  So if two threads are accessing it at the same
 time, the counter will not be properly incremented.  What's puzzling is
that
 method level synchronization does not work while synchronizing on a block
of
 code inside a method works. 
 
 Thanks,
 Malia
 
 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 30, 2004 10:26 AM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: method level synchronization doesn't work
 
 am I missing something, but looks like you're trying to build some
 kind of web cache. why not use Hibernate or something that already
 does caching for you instead?
 
 the only time I can see a need to sync, is if the request contains
 data that requires a transaction. Which in that case, you're better
 off doing an insert, then a second select query with the same
 connection.
 
 or is the scenario a distributed objects setup?
 
 peter
 
 
 On Thu, 30 Sep 2004 10:05:41 -0400, Malia Noori
 [EMAIL PROTECTED] wrote:
 
Hi,

I am using Tomcat 4.1 and I am accessing MS SQL Server database via JDBC.
 
 I
 
have a JSP that calls a web bean.  This web bean has a section of code
 
 that
 
I want to synchronize, but when I synchronize the method, Tomcat doesn't
actually synchronize the threads.  (I tried this by having 2 users access
 
 my
 
JSP at the same time).  When I synchronize the code in the method by using
 
 a
 
mutex, it works.

So, doing this doesn't work:

public synchronized void amethod()

{

 //some code that access the database and needs to be synchronized

}

But doing this works:

public void amethod()

{

String mutex = ;

synchronize(mutex)

{

 //some code that access the database and needs to be synchronized

}

}

Why does synchronization on the method doesn't work?  Does Tomcat not
 
 allow
 
locking of object caused by method level synchronization?  Any help will
 
 be
 
appreciated.

Thanks,

Malia




-
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: JK/JK2 on HPUX

2004-09-30 Thread Wendy Smoak
From: Gabriel Esteves Marques Pinto [EMAIL PROTECTED]
 Does anyone have mod_jk or mod_jk2 running on an Risc - HPUX server?

Yes.  It's whatever comes in their depot of Apache/Tomcat/connector.  I
then move to the latest Tomcat 4.1 since they're always behind, and that
requires editing some config files since they move things around every time
they do a release.

-- 
Wendy Smoak


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



RE: context sharing problems

2004-09-30 Thread Michael Cornell
Well, I could do (and this actually works) but the problem then is that the
web-apps are actually started up separately (in separate memory spaces) and
the 'admin' one cannot access the singleton in the 'ROOT' one that has been
initialised with some values..

I need some sort of context settings that point the classpath  (vm ??) to
the same place

Any ideas??

-Original Message-
From: Dov Rosenberg [mailto:[EMAIL PROTECTED]
Sent: 30 September 2004 18:10
To: Tomcat Users List
Subject: Re: context sharing problems

Why don't you put your shared classes into $CATALINA_HOME/shared/classes.
Then all of your web apps can see and use them



--
Dov Rosenberg
Conviveon Corporation
http://www.conviveon.com

On 9/30/04 10:58 AM, Michael Cornell [EMAIL PROTECTED] wrote:


 Hi,

 I am trying to share the same class files (and libraries) between two
 different web-apps one running in ROOT/ and one is admin/

 Basically, I want the first one to run from the default context ie
 http://www.x.com/
 And the second web-app to run as http://www.x.com/admin

 However, all of the classes for both web-apps are situated in the first
one
 (ROOT).

 This may seem a strange way of doing things, but I need to reflect the
 changes made in admin (basically a collection of  jsps etc) in ROOT (a
 series of filters etc).  I have actually got this to work using a tomcat
 plugin in eclipse because of the way eclipse shares libraries and
classpaths

 Does anyone know how I could do this for a standalone tomcat (running in
 windows)???

 Just to clarify:

 Web-apps\
   ROOT\
   WEB-INF\
   Classes\

 My\package\name\MyFilter.class

 My\package\name\StrutsAction.class

 My\package\name\ApplicationResources.properties

 My\package\name\MySingletonIIWantTochangeViaTheGuiRealTime.class
   Admin\
   WEB-INF\
   Web\index.jsp







 Thanks for your help
 M



 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004



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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004



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



RE: versions 2.3 and 2.4 of web.xml

2004-09-30 Thread Shapira, Yoav

Hi,
We're gradually transitioning to 2.4.  It's certainly not a bug, as
either DTD is valid and both are supported by Tomcat.  If anything, it's
kind of nice to have examples of both.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Steve Kirk [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 12:32 PM
To: 'Tomcat Users List'
Subject: versions 2.3 and 2.4 of web.xml


Only just noticed this, looks like a possible bug, but maybe there's a
reason behind it?

Basically, the default web.xml files included within the standard
webapps
of
5.0.27 and 5.0.28 seem to be a mix of webapp v2.3 and v2.4 - anyone
know if
there is a reason for this, or is this a bug?



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



RE: Prblm with deployment descriptor for XML RPC Servlet

2004-09-30 Thread Shapira, Yoav

Hi,
Your web.xml is syntactically fine, although I suggest you change to the 2.3 DTD.  
Take a look at the top of $CATALINA_HOME/conf/web.xml to see the DTD declaration and 
copy it instead of your current 2.2 delcaration.

For this servlet to be available at http://localhost:8080/locasugeGSM, you webapp must 
be deployed at context path  (the empty string: not / or null).  You can do this 
by overwriting the existing ROOT webapp that ships with Tomcat, or removing that 
webapp and adding an explicit Context declaration to $CATALINA_HOME/conf/server.xml 
with a path= attribute.

Make sure to read the Context configuration reference in the Tomcat docs for a more 
complete understanding of how to configure your webapp in Tomcat.  And if you haven't 
already read it, I strongly suggest you read the First Webapp guide in the Tomcat 
docs.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Christian Ruediger [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 12:50 PM
To: [EMAIL PROTECTED]
Subject: Prblm with deployment descriptor for XML RPC Servlet

Hello there,

I am trying to deploy a servlet, that das reply to an HTTP XML RPC request.
Unfortunately the only reply i get is standard html page that provides
me the .war file for download. Further comments after the descriptor.

Here is the deployment descriptor:

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//
DTD WebApplication 2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2.2.dtd;

web-app
   description
   Testserveur pour tester la fonctionalité du
   GSM orange Adaptateur
   /description

   servlet
  servlet-namelocasugeGSM/servlet-name
  servlet-class
  testserveur.RPC_XML_HTTPTestServlet
  /servlet-class
  display-nameTestservlet/display-name
  description
  Le servlet qui comprise le XML RPC serveur
  /description
   /servlet

   servlet-mapping
  servlet-namelocasugeGSM/servlet-name
  url-pattern/locasugeGSM/url-pattern
   /servlet-mapping

/web-app

The servlet class name is concatenated from package and class name.
The url where I expect the page to be is
http://localhost:8080/locasugeGSM/

So could anyone lend me a helping hand.
Thank you

Christian Ruediger

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



RE: context sharing problems

2004-09-30 Thread Shapira, Yoav

Hi,
Then put the singleton in the shared repository, not in ROOT.

In general, what you're trying to do is inadvisable and against the
spirit of the Servlet Specification: web applications are supposed to be
self-contained.  Features like a shared classloader repository are not
mandated by the Spec and are a convenience-type feature with different
levels of support and portability across containers.  Consider
alternative approaches to inter-webapp communication, such as over the
network, via shared storage (filesystem or DB), or via a messaging
platform such as JMS.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Michael Cornell [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 1:22 PM
To: Tomcat Users List
Subject: RE: context sharing problems

Well, I could do (and this actually works) but the problem then is that
the
web-apps are actually started up separately (in separate memory spaces)
and
the 'admin' one cannot access the singleton in the 'ROOT' one that has
been
initialised with some values..

I need some sort of context settings that point the classpath  (vm ??)
to
the same place

Any ideas??

-Original Message-
From: Dov Rosenberg [mailto:[EMAIL PROTECTED]
Sent: 30 September 2004 18:10
To: Tomcat Users List
Subject: Re: context sharing problems

Why don't you put your shared classes into
$CATALINA_HOME/shared/classes.
Then all of your web apps can see and use them



--
Dov Rosenberg
Conviveon Corporation
http://www.conviveon.com

On 9/30/04 10:58 AM, Michael Cornell [EMAIL PROTECTED]
wrote:


 Hi,

 I am trying to share the same class files (and libraries) between two
 different web-apps one running in ROOT/ and one is admin/

 Basically, I want the first one to run from the default context ie
 http://www.x.com/
 And the second web-app to run as http://www.x.com/admin

 However, all of the classes for both web-apps are situated in the
first
one
 (ROOT).

 This may seem a strange way of doing things, but I need to reflect
the
 changes made in admin (basically a collection of  jsps etc) in ROOT
(a
 series of filters etc).  I have actually got this to work using a
tomcat
 plugin in eclipse because of the way eclipse shares libraries and
classpaths

 Does anyone know how I could do this for a standalone tomcat (running
in
 windows)???

 Just to clarify:

 Web-apps\
   ROOT\
   WEB-INF\
   Classes\

 My\package\name\MyFilter.class

 My\package\name\StrutsAction.class

 My\package\name\ApplicationResources.properties

 My\package\name\MySingletonIIWantTochangeViaTheGuiRealTime.class
   Admin\
   WEB-INF\
   Web\index.jsp







 Thanks for your help
 M



 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004



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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004



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



Re: context sharing problems

2004-09-30 Thread Dov Rosenberg
I think you should evaluate how your app is designed. If you need to
communicate cross context/processes you should consider using something like
JMS to give you good isolation. Today you may want to have everything on a
single box, tomorrow you might want other servers.

Another option to consider is to change the need for a singleton type of
class or store some info in a database.

Dov Rosenberg

On 9/30/04 1:22 PM, Michael Cornell [EMAIL PROTECTED] wrote:

 Well, I could do (and this actually works) but the problem then is that the
 web-apps are actually started up separately (in separate memory spaces) and
 the 'admin' one cannot access the singleton in the 'ROOT' one that has been
 initialised with some values..
 
 I need some sort of context settings that point the classpath  (vm ??) to
 the same place
 
 Any ideas??
 
 -Original Message-
 From: Dov Rosenberg [mailto:[EMAIL PROTECTED]
 Sent: 30 September 2004 18:10
 To: Tomcat Users List
 Subject: Re: context sharing problems
 
 Why don't you put your shared classes into $CATALINA_HOME/shared/classes.
 Then all of your web apps can see and use them
 
 
 
 --
 Dov Rosenberg
 Conviveon Corporation
 http://www.conviveon.com
 
 On 9/30/04 10:58 AM, Michael Cornell [EMAIL PROTECTED] wrote:
 
 
 Hi,
 
 I am trying to share the same class files (and libraries) between two
 different web-apps one running in ROOT/ and one is admin/
 
 Basically, I want the first one to run from the default context ie
 http://www.x.com/
 And the second web-app to run as http://www.x.com/admin
 
 However, all of the classes for both web-apps are situated in the first
 one
 (ROOT).
 
 This may seem a strange way of doing things, but I need to reflect the
 changes made in admin (basically a collection of  jsps etc) in ROOT (a
 series of filters etc).  I have actually got this to work using a tomcat
 plugin in eclipse because of the way eclipse shares libraries and
 classpaths
 
 Does anyone know how I could do this for a standalone tomcat (running in
 windows)???
 
 Just to clarify:
 
 Web-apps\
   ROOT\
   WEB-INF\
   Classes\
 
 My\package\name\MyFilter.class
 
 My\package\name\StrutsAction.class
 
 My\package\name\ApplicationResources.properties
 
 My\package\name\MySingletonIIWantTochangeViaTheGuiRealTime.class
   Admin\
   WEB-INF\
   Web\index.jsp
 
 
 
 
 
 
 
 Thanks for your help
 M
 
 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
Dov Rosenberg
Conviveon Corporation
370 Centerpointe Circle, suite 1178
Altamonte Springs, FL 32701
http://www.conviveon.com
[EMAIL PROTECTED]
AOL IM: dovrosenberg
(407) 339-1177 x102
(407) 339-6704 (fax)
(800) 475-9890
(407) 310-8316 (cell)


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



JK2 2.0.4

2004-09-30 Thread Paul D. Hester
Has anyone had success installing the JK2 v2.0.4 connector with multiple
virtual hosts, with each host having there own port?  We have two users,
each with their own instance of Tomcat 4.1.31 running.  Each user has a
unique port.  I'm running Apache 2.0.50.  When I set up the
workers2.properties file with the two ports, all requests go through the
last port listed in the worker2.properties file and the first listed
port is being piped over to the second ports web page.
 
HELP  I'm about ready to jump out of my window
 
Paul
 


TOMCAT, run Servlet on UNIX

2004-09-30 Thread Daxin Zuo
 My computer is UNIX, Sparc. I use Tomcat version 5.0.28, path=
docBase=www,
 Apache 2.0.43. I can run the same JSP files from both TOMCAT and Apache
with DB connection pool for Oracle.
But I have difficult in Servlet. I cannot run servlet from Tomcat.

In webapps/www/WEB-INF/web.xml, I registered the Servlet:
  servlet
 servlet-nameServletTest/servlet-name
servlet-classServletTest/servlet-class
/servlet
servlet-mapping
servlet-nameServletTest/servlet-name
url-pattern/ServletTest/url-pattern
/servlet-mapping

 the class is in www/WEB-INF/classes, no package, compiled on UNIX with
JDK1.4.2. the class file mode is 777

in tomcat/conf/web.xml, I have:
servlet
servlet-nameinvoker/servlet-name
  

with http://myComputer:8080/ServletTest, I get error:
The request resource (/ServletTest) is not available.

I found the contents bellow in the tomcat/conf/web.xml:
servlet-mapping
servlet-nameinvoker/servlet-name
url-pattern/servlet/*/url-pattern
/servlet-mapping

I configureed a Tomcat the same why on windows 2000, it runs Servlet well,
but the docBase=ROOT.

Please forward instruction.
Thanks a lot.


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



RE: TOMCAT, run Servlet on UNIX

2004-09-30 Thread Shapira, Yoav

Hi,

I can run the same JSP files from both TOMCAT and Apache
with DB connection pool for Oracle.
But I have difficult in Servlet. I cannot run servlet from Tomcat.

You realize the JSPs are servlets, right? ;)

In webapps/www/WEB-INF/web.xml, I registered the Servlet:
  servlet
 servlet-nameServletTest/servlet-name
servlet-classServletTest/servlet-class
/servlet
servlet-mapping
servlet-nameServletTest/servlet-name
url-pattern/ServletTest/url-pattern
/servlet-mapping

This is fine.  With a servlet mapping, you don't need the invoker
servlet, so don't touch it or rely on it.

with http://myComputer:8080/ServletTest, I get error:
The request resource (/ServletTest) is not available.

It's an actual 404 error?

Any other errors during startup?

Yoav



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]



hiding the welcome file

2004-09-30 Thread khanaz
Hello:

I am interested in hiding the welcome file from my webapp.. Assume I am
connecting to http://www.mysite.com http://www.mysite.com/ .  Tomcat
4.1.29 and 5.0 will show that as http://www.mysite.com/index.jsp
http://www.mysite.com/index.jsp .  How do I go about hiding the index.jsp
without destryong the rest of my web app? I know that the Jakarta folks do
it in the example web application they include with their binary distro.
Has anyone figured out how to do it for our webapp?

 

Let me know

 

Thanks,

 

Azam Khan



Re: Recursive stack trace with Tiles and Filter - any ideas?

2004-09-30 Thread QM
On Thu, Sep 30, 2004 at 08:37:14AM -0400, Shapira, Yoav wrote:
: As you know signal 11 crashes are internal to the JVM usually at a
: native level.  A corrupt or incomplete JVM installation, or missing OS
: patches for your JVM version, are the two most common causes for this.

For the archives, sig11's (at least, on x86 architecture) may also be
indicative of RAM problems.

(Emphasis on may)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Security of Servlets

2004-09-30 Thread Rhino



We are giving some thought to putting a CGI-based Wiki, specifically 
OddMuse, on a website that runs on a Linux server. In 'Using Linux (Fourth 
Edition)', the authors warn that "The biggest cause for concern about protecting 
your site from external threats is CGI scripts." They go on to suggest various 
precautions that will reduce the risk.
This has me wondering if servlets are equally insecure or have a much 
stronger security model. I also have Jason Hunter's 'Java Servlet Programming 
(Second Edition)' which has a 30 page chapter on Security that details how 
various forms of authentication take place in servlets. However, I can't find 
any categorical statement that says servlets are actually any more secure than 
CGI. 

I was wondering if someone with extensive experience with the security 
aspects of both servlets and CGI can give me any sense of which is more secure 
and why?I need this information so that we can choose the right approach 
for our wiki.

Also, if servlets are more secure than CGI, is anyone aware of a wiki that 
runs as a servlet, preferably open source?


Rhino---rhino1 AT sympatico DOT ca"There are two ways of 
constructing a software design. One way is to make it so simple that there are 
obviously no deficiencies. And the other way is to make it so complicated that 
there are no obvious deficiencies." - C.A.R. Hoare


Re: Synchronization in cluster

2004-09-30 Thread Igor
Hello!

Thank you for advice ! I will think about restructure my application.

Users of my application can upload comma separeted files, that are imported
in database.
This process can take 10-30 minutes, if file is large, so new Thread is
started with import process and user is redirected to refreshing page, that
displays status of import. Information about import process is stored in
static variable (import thread and status jsp can access this information).

If it happens in one JVM, everething is ok. But what will be in the case of
load balancing?

Thank you,
Igor


- Original Message - 
From: Filip Hanik - Dev [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 6:36 PM
Subject: Re: Synchronization in cluster


 sounds like your system needs a little rethinking, if you have singleton
access to your DB.
 That is why the DBs are transactional, so that you can use connection
pooling.

 you can use JGroups, but you might run into serious performance problems,
not because of JGroups, but because of the fact that you
 want to lock several tomcats in a distributed lock when accessing the DB.

 Filip


 - Original Message -
 From: Igor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:16 AM
 Subject: Re: Synchronization in cluster


 Hello!

 Thank you for answers! I will try to use JGroups

 We have data, that is often need to be read. And it is rarely written.
 It is implemented using Singleton pattern.

 Synchronization is used in several parts of web application.
 It is used mostly to access database

 Thank you,
 Igor

 - Original Message -
 From: LERBSCHER Jean-Pierre [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:41 AM
 Subject: RE : Synchronization in cluster


 Hi,
 What are your needs? Why distributed singleton or distributed locking are
so
 important ?
 Perhaps you can use Database to implement locking functionality and
Jgroups
 library to replicate state (or distributed singleton) across members of a
 group (see www.jgroups.org).




Re: method level synchronization doesn't work

2004-09-30 Thread QM
On Thu, Sep 30, 2004 at 01:14:26PM -0400, Malia Noori wrote:
: I thought Tomcat instantiates only 1 instance of JSP servlet to handle all
: requests.  Isn't that the reason why it's not suggested to have instance
: variables?

Close, but not quite. ;)

The servlet spec permits a container to create as many instances of a
servlet class as it sees fit.  The same goes for creating and destroying
a servlet object several times over a context (webapp) lifetime.

That said, a servlet's main methods -- doGet(), doPost(), service() --
may be called concurrently for the same servlet object.  These methods
are thus meant to be thread-safe, and as such they shouldn't modify
object instance variables.  (It's fine to call such variables, as long
as they are read-only or at least treated as such.)


: If it is the case that 2 instance of JSP servlets gets created
: to handle each request, what's the best object to synchronize on?

I missed your original post, so I can say only this: when you find
yourself painted into a corner, it's time to revisit the design stage.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: context sharing problems

2004-09-30 Thread QM
On Thu, Sep 30, 2004 at 03:58:55PM +0100, Michael Cornell wrote:
: I am trying to share the same class files (and libraries) between two
: different web-apps one running in ROOT/ and one is admin/

I won't repeat what everyone else has said -- because that's all great
advice -- but also consider this: change your build/deployment processes
such that each app gets its own, separate copy of the needed JARs.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: NewBee needs help with deployment descriptor

2004-09-30 Thread QM
On Thu, Sep 30, 2004 at 05:22:55PM +0200, Christian Ruediger wrote:
: I am trying to deploy a servlet, that das reply to an HTTP XML RPC request.
: Unfortunately the only reply i get is standard html page that provides
: me the .war file for download. Further comments after the descriptor.
: [snip]
: http://localhost:8080/locasugeGSM/

For one, there's no need to announce that you're new to
Java/servlets/etc; this forum accepts questions from all skill levels.

Second, where did you put your WAR file?  Is it in
{tomcat dir}/webapps/locasugeGSM/{file}.war

or
{tomcat dir}/webapps/{file}.war

?

It should be the latter; the former (essentially) sets up a context
(webapp), the complete contents of which are a WAR file.

Check the logs to see what gets deployed at container start time.

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE: JK2 2.0.4

2004-09-30 Thread Dale, Matt
Yes it works fine.

You should post your workers2.properties so we can see what your mappings are.

Ta
Matt

-Original Message-
From: Paul D. Hester [mailto:[EMAIL PROTECTED]
Sent: 30 September 2004 19:34
To: [EMAIL PROTECTED]
Subject: JK2 2.0.4


Has anyone had success installing the JK2 v2.0.4 connector with multiple
virtual hosts, with each host having there own port?  We have two users,
each with their own instance of Tomcat 4.1.31 running.  Each user has a
unique port.  I'm running Apache 2.0.50.  When I set up the
workers2.properties file with the two ports, all requests go through the
last port listed in the worker2.properties file and the first listed
port is being piped over to the second ports web page.
 
HELP  I'm about ready to jump out of my window
 
Paul
 
Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

Re: Security of Servlets

2004-09-30 Thread QM
On Thu, Sep 30, 2004 at 02:55:45PM -0400, Rhino wrote:
: We are giving some thought to putting a CGI-based Wiki, specifically OddMuse,
: on a website that runs on a Linux server. In 'Using Linux (Fourth Edition)',
: the authors warn that The biggest cause for concern about protecting your
: site from external threats is CGI scripts. They go on to suggest various
: precautions that will reduce the risk.
: 
: This has me wondering if servlets are equally insecure or have a much stronger
: security model.

The authors of that book may have said CGI but what they probably
meant, in a larger scheme, was executables and other server-side
dynamic content.

Web servers that only dish out static content are tougher to crack (in a
certain sense) because they have a fairly rigid set of permissible
values: either the specified file exists under the doc root, or it
doesn't.

Executables and other server-side dynamic content( CGI, servlets/JSPs,
PHP, etc) permit end-users to interact with the server in a different
way: they must process user input, and in doing so, watch out for
malformed values.

So, other than a denial-of-service attack caused by flooding a CGI-based
service with requests (i.e. filling the process table as each httpd
process fork()s to spawn a new CGI child), there's not a whole lot of
difference between CGI, PHP, Java, etc.


: However, I can't find any
: categorical statement that says servlets are actually any more secure than
: CGI.

See above. ;)


: I was wondering if someone with extensive experience with the security aspects
: of both servlets and CGI can give me any sense of which is more secure and
: why? I need this information so that we can choose the right approach for our
: wiki.

See above. ;)

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE: TOMCAT, run Servlet on UNIX

2004-09-30 Thread Daxin Zuo
Thank you for your help.
On the browser, I see not other error, but when I start the Tomcat, I find
error in the logs/catalina.out, please check the last 4 lines:

Sep 30, 2004 11:46:58 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 30, 2004 11:46:59 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 9872 ms
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL
file:/usr/local/apache2/jakarta-tomcat-5.0.28/conf/Catalina/myComputerIP/www
.xml
Sep 30, 2004 11:47:02 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /balancer from URL
file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer
Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors


In the localhost_log.2004-09-30.txt:
2004-09-30 12:03:06 StandardContext[/balancer]Exception starting filter
BalancerFilter
java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
at
org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65)
at org.apache.webapp.balancer.RulesParser.init(RulesParser.java:43)
at org.apache.webapp.balancer.BalancerFilter.init(BalancerFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
Config.java:225)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil
terConfig.java:308)
at
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterCon
fig.java:79)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:36
98)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4349)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
23)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701
)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
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.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 11:35 AM
To: Tomcat Users List
Subject: RE: TOMCAT, run Servlet on UNIX



Hi,

I can run the same JSP files from both TOMCAT and Apache
with DB connection pool for Oracle.
But I have difficult in Servlet. I cannot run servlet from Tomcat.

You realize the JSPs are servlets, right? ;)

In webapps/www/WEB-INF/web.xml, I registered the Servlet:
  servlet
 servlet-nameServletTest/servlet-name
servlet-classServletTest/servlet-class
/servlet
servlet-mapping
servlet-nameServletTest/servlet-name

RE: Security of Servlets

2004-09-30 Thread Shapira, Yoav

Hi,
I'd say it's easier to expose security flaws with CGI scripts than it is with 
Servlets, and vice versa it's easier to configure a secure environment for Servlets 
than it is for CGI scripts.

That's not the same as saying Servlets are more secure than CGI.  I don't think such 
a categorical statement would be valid for this case, and it's a waste of time looking 
for such a statement.

Both technologies require the system designer, deployer, and administrator to be 
conscious of security issues and address them proactively.

That said, I'd support the statement in the first paragraph on two grounds.  One is a 
simple historical comparison: use any search you like (plain Google, or forums like 
Bugtraq and CERT) and you'll see many more CGI-based attacked and vulnerabilities than 
Servlet-based ones.  Of course some of that is because CGI is an older and was more 
widely used for a long time, but those facts are irrelevant for the point of this 
discussion.

The second ground is the existence of finer grained control over Java code.  To secure 
a CGI script, you'd have to peer-review its code, make sure the user running it has 
only the required privileges, etc.  With Servlets, you can apply extremely 
fine-grained security using a variety of approaches like PrivilegedActions, 
SecurityManager (these two are inside the JVM and portable), the security-constraint 
elements in web.xml (which can also be done for CGI in most servers, like httpd), and 
Java's built-in controls over memory allocation and such low-level matters.

So both technologies can be made secure, but it's easier to assure a given Servlet is 
secure than a given CGI script, IMHO.  If someone has tons of experience in CGI 
security assessments and little in Java, they might say the opposite ;)

As far as wiki implementations, let's see.  Of the top of my head, Friki is Java and 
open source (SourceForge).  MoinMoin is Python.  Litux is in the middle: Jython ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 2:56 PM
To: tomcat-user
Subject: Security of Servlets

We are giving some thought to putting a CGI-based Wiki, specifically OddMuse, on a 
website that runs on a Linux server. In 'Using Linux (Fourth Edition)', the authors 
warn that The biggest cause for concern about protecting your site from external 
threats is CGI scripts. They go on to suggest various precautions that will reduce 
the risk.
This has me wondering if servlets are equally insecure or have a much stronger 
security model. I also have Jason Hunter's 'Java Servlet Programming (Second Edition)' 
which has a 30 page chapter on Security that details how various forms of 
authentication take place in servlets. However, I can't find any categorical statement 
that says servlets are actually any more secure than CGI.
 
I was wondering if someone with extensive experience with the security aspects of both 
servlets and CGI can give me any sense of which is more secure and why? I need this 
information so that we can choose the right approach for our wiki.
 
Also, if servlets are more secure than CGI, is anyone aware of a wiki that runs as a 
servlet, preferably open source?
 
 
Rhino
---
rhino1 AT sympatico DOT ca
There are two ways of constructing a software design. One way is to make it so simple 
that there are obviously no deficiencies. And the other way is to make it so 
complicated that there are no obvious deficiencies. - C.A.R. Hoare



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]



Re: Synchronization in cluster

2004-09-30 Thread Filip Hanik - Dev
If it happens in one JVM, everething is ok. But what will be in the case of
load balancing?

and that is why they pay you the big bucks...to figure this stuff out :)
remember, sometimes the solution is super simple, just not thought of.

Filip

- Original Message - 
From: Igor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 1:58 PM
Subject: Re: Synchronization in cluster


Hello!

Thank you for advice ! I will think about restructure my application.

Users of my application can upload comma separeted files, that are imported
in database.
This process can take 10-30 minutes, if file is large, so new Thread is
started with import process and user is redirected to refreshing page, that
displays status of import. Information about import process is stored in
static variable (import thread and status jsp can access this information).

If it happens in one JVM, everething is ok. But what will be in the case of
load balancing?

Thank you,
Igor


- Original Message - 
From: Filip Hanik - Dev [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 6:36 PM
Subject: Re: Synchronization in cluster


 sounds like your system needs a little rethinking, if you have singleton
access to your DB.
 That is why the DBs are transactional, so that you can use connection
pooling.

 you can use JGroups, but you might run into serious performance problems,
not because of JGroups, but because of the fact that you
 want to lock several tomcats in a distributed lock when accessing the DB.

 Filip


 - Original Message -
 From: Igor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:16 AM
 Subject: Re: Synchronization in cluster


 Hello!

 Thank you for answers! I will try to use JGroups

 We have data, that is often need to be read. And it is rarely written.
 It is implemented using Singleton pattern.

 Synchronization is used in several parts of web application.
 It is used mostly to access database

 Thank you,
 Igor

 - Original Message -
 From: LERBSCHER Jean-Pierre [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Thursday, September 30, 2004 10:41 AM
 Subject: RE : Synchronization in cluster


 Hi,
 What are your needs? Why distributed singleton or distributed locking are
so
 important ?
 Perhaps you can use Database to implement locking functionality and
Jgroups
 library to replicate state (or distributed singleton) across members of a
 group (see www.jgroups.org).




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



Re: JK/JK2 on HPUX

2004-09-30 Thread Gabriel Esteves Marques Pinto
Wendy,
I´m trying to compile mod_jk2 on HPUX11.11i, but it doenn´t work.
Can you send me your compile mod_jk2?
Thanks,
Gabriel
Wendy Smoak wrote:
From: Gabriel Esteves Marques Pinto [EMAIL PROTECTED]
 

Does anyone have mod_jk or mod_jk2 running on an Risc - HPUX server?
   

Yes.  It's whatever comes in their depot of Apache/Tomcat/connector.  I
then move to the latest Tomcat 4.1 since they're always behind, and that
requires editing some config files since they move things around every time
they do a release.
 




RE: JK2 2.0.4

2004-09-30 Thread Paul D. Hester
I've attached my workers.properties files.

Paul





-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 3:11 PM
To: Tomcat Users List
Subject: RE: JK2 2.0.4

Yes it works fine.

You should post your workers2.properties so we can see what your
mappings are.

Ta
Matt

-Original Message-
From: Paul D. Hester [mailto:[EMAIL PROTECTED]
Sent: 30 September 2004 19:34
To: [EMAIL PROTECTED]
Subject: JK2 2.0.4


Has anyone had success installing the JK2 v2.0.4 connector with multiple
virtual hosts, with each host having there own port?  We have two users,
each with their own instance of Tomcat 4.1.31 running.  Each user has a
unique port.  I'm running Apache 2.0.50.  When I set up the
workers2.properties file with the two ports, all requests go through the
last port listed in the worker2.properties file and the first listed
port is being piped over to the second ports web page.
 
HELP  I'm about ready to jump out of my window
 
Paul
 
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.15.1503;}\viewkind4\uc1\pard\f0\fs20 #define the shared 
memory file\par
[shm:]\par
file=/usr/local/apache-2.0.50/logs/jk2.log\par
size=100\par
debug=1\par
\par
# Define the communication channel\par
[channel.socket:localhost:8409]\par
[channel.socket:localhost:8209]\par
\par
#define the worker\par
[ajp13:localhost:8409]\par
channel=channel.socket:localhost:8409\par
\par
[ajp13:localhost:8209]\par
channel=channel.socket:localhost:8209\par
\par
[uri:/*]\par
group=ajp13:localhost:8409\par
\par
[uri:/*]\par
group=ajp13:localhost:8209\par
}

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

RE: Recursive stack trace with Tiles and Filter - any ideas?

2004-09-30 Thread Richard Mixon (qwest)
Steffen - thank you for the reminder. Yes, I should have snipped a lot
more the second time - Richard

Steffen Heil wrote:
 Hi

 Please: http://learn.to/quote

 -Original Message-
 

 Regards,
   Steffen


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



Re: Security of Servlets

2004-09-30 Thread Hassan Schroeder
Rhino wrote:
/* others having responded to the first issue(s), I'll just confine
   myself to this one :-)  */
is anyone aware of a wiki 
that runs as a servlet, preferably open source?
You might look at JSPWiki -- http://www.jspwiki.org/
FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

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


RE: TOMCAT, run Servlet on UNIX

2004-09-30 Thread Daxin Zuo
Yoav,
 Thank you. Please forward more instruction.
On the browser, I see no other errors, but when I start the Tomcat, I find
error messages in
1) the logs/catalina.out:

Sep 30, 2004 11:46:58 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 30, 2004 11:46:59 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 9872 ms
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL
file:/usr/local/apache2/jakarta-tomcat-5.0.28/conf/Catalina/myComputerIP/www
.xml
Sep 30, 2004 11:47:02 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /balancer from URL
file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer
Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors


2) In the localhost_log.2004-09-30.txt:
2004-09-30 12:03:06 StandardContext[/balancer]Exception starting filter
BalancerFilter
java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
at
org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65)
at org.apache.webapp.balancer.RulesParser.init(RulesParser.java:43)
at org.apache.webapp.balancer.BalancerFilter.init(BalancerFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
Config.java:225)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil
terConfig.java:308)
at
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterCon
fig.java:79)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:36
98)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4349)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
23)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701
)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
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.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

After I run http://myComputer:8080/ServletTest, There are no any new error
mesage added into these two files.

Thank you.

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 11:35 AM
To: Tomcat Users List
Subject: RE: TOMCAT, run Servlet on UNIX



Hi,

I can run the same JSP files from both TOMCAT and Apache
with DB connection pool for Oracle.
But I have difficult in Servlet. I cannot run servlet from Tomcat.

You realize the JSPs are servlets, right? ;)

In webapps/www/WEB-INF/web.xml, I registered the Servlet:
  servlet
 servlet-nameServletTest/servlet-name

RE: method level synchronization doesn't work

2004-09-30 Thread Malia Noori
Thank you for replying, but I would appreciate it if you could expand on
your explanation.  Here is my original post:

Actually, the data that I am modifying requires a transaction and
 synchronization.  It increments a counter stored in the database.  So, I
 have to do a select to get the current value, increment the counter, and
 then insert the new value.  So if two threads are accessing it at the same
 time, the counter will not be properly incremented.  What's puzzling is
that
 method level synchronization does not work while synchronizing on a block
of
 code inside a method works. 


Regardless of what persistence mechanism I use (i.e. Hibernate, EJB, etc), I
have to synchronize on the method that increments the counter stored in the
database.  I can't avoid this due to business logic.  Please let me know if
there is alternative to synchronization.   

Thanks,
Malia


-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 3:01 PM
To: Tomcat Users List
Subject: Re: method level synchronization doesn't work

On Thu, Sep 30, 2004 at 01:14:26PM -0400, Malia Noori wrote:
: I thought Tomcat instantiates only 1 instance of JSP servlet to handle all
: requests.  Isn't that the reason why it's not suggested to have instance
: variables?

Close, but not quite. ;)

The servlet spec permits a container to create as many instances of a
servlet class as it sees fit.  The same goes for creating and destroying
a servlet object several times over a context (webapp) lifetime.

That said, a servlet's main methods -- doGet(), doPost(), service() --
may be called concurrently for the same servlet object.  These methods
are thus meant to be thread-safe, and as such they shouldn't modify
object instance variables.  (It's fine to call such variables, as long
as they are read-only or at least treated as such.)


: If it is the case that 2 instance of JSP servlets gets created
: to handle each request, what's the best object to synchronize on?

I missed your original post, so I can say only this: when you find
yourself painted into a corner, it's time to revisit the design stage.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


-
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: Using XInclude in tomcat's config files

2004-09-30 Thread Shankar Unni
Shankar Unni wrote:
Is it possible to configure Tomcat to be able to use XInclude to include 
fragments of XML into Tomcat's own configuration files (server.xml, the 
various webapp web.xml's, etc.)?
Bump? No one's tried this yet?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Using XInclude in tomcat's config files

2004-09-30 Thread QM
On Thu, Sep 30, 2004 at 02:35:35PM -0700, Shankar Unni wrote:
: Is it possible to configure Tomcat to be able to use XInclude to include 
: fragments of XML into Tomcat's own configuration files (server.xml, the 
: various webapp web.xml's, etc.)?
: 
: Bump? No one's tried this yet?

I'll give it a try: do the include magic at build time, with some clever
(or not-so-clever) Ant action.  

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



AW: method level synchronization doesn't work

2004-09-30 Thread Steffen Heil
Hi

 I have to synchronize on the method ...

No you do not need to synchonize on the method, you need to synchronize.
You can synchronize on anything.

The easiest would be to do the following:

public static synchronized void amethod()
{
  //some code that access the database and needs to be synchronized
}

Just make your method static.

Synchonization will not occur on the instance object any more, but on the
Class object of your instance.
Since tomcat may instantiate multiple servlets, it may only do so in the
same classloader. Therefor all instances belong to the same Class object and
will synchronize as you required.

Regards,
  Steffen


smime.p7s
Description: S/MIME cryptographic signature


Re: method level synchronization doesn't work

2004-09-30 Thread QM
On Thu, Sep 30, 2004 at 05:31:25PM -0400, Malia Noori wrote:
: Thank you for replying, but I would appreciate it if you could expand on
: your explanation.  Here is my original post:
: 
: Actually, the data that I am modifying requires a transaction and
:  synchronization.  It increments a counter stored in the database.  So, I
:  have to do a select to get the current value, increment the counter, and
:  then insert the new value.

This needn't be done within code; you could perform a database-level
transaction.  For example, using raw SQL calls that would come down to:

. set the Connection's autoCommit to false
. do the DB work
. call the Connection's commit() method


I recall EJBs have their own transaction mechanism, and I'd be
shocked[1] if something as popular as Hibernate didn't have one as well.
Check the respective docs.

Whatever the case, there should be no need to try to synchronize this at
the app/code level.

-QM

[1] = I've been shocked before, though... ;)


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: method level synchronization doesn't work

2004-09-30 Thread Frank W. Zammetti
Why not just let SQL do the update?  Do the following:
update my_table set counter_field = counter_field + 1 (where clause here 
if needed)

(off the top of my head, my syntax might be off)
In other words, why not let the database handle the concurrency issue? 
That's kind of what they're there for (partly anyway).

Malia Noori wrote:
Thank you for replying, but I would appreciate it if you could expand on
your explanation.  Here is my original post:
Actually, the data that I am modifying requires a transaction and
synchronization.  It increments a counter stored in the database.  So, I
have to do a select to get the current value, increment the counter, and
then insert the new value.  So if two threads are accessing it at the same
time, the counter will not be properly incremented.  What's puzzling is
that
method level synchronization does not work while synchronizing on a block
of
code inside a method works. 


Regardless of what persistence mechanism I use (i.e. Hibernate, EJB, etc), I
have to synchronize on the method that increments the counter stored in the
database.  I can't avoid this due to business logic.  Please let me know if
there is alternative to synchronization.   

Thanks,
Malia
-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 3:01 PM
To: Tomcat Users List
Subject: Re: method level synchronization doesn't work

On Thu, Sep 30, 2004 at 01:14:26PM -0400, Malia Noori wrote:
: I thought Tomcat instantiates only 1 instance of JSP servlet to handle all
: requests.  Isn't that the reason why it's not suggested to have instance
: variables?
Close, but not quite. ;)
The servlet spec permits a container to create as many instances of a
servlet class as it sees fit.  The same goes for creating and destroying
a servlet object several times over a context (webapp) lifetime.
That said, a servlet's main methods -- doGet(), doPost(), service() --
may be called concurrently for the same servlet object.  These methods
are thus meant to be thread-safe, and as such they shouldn't modify
object instance variables.  (It's fine to call such variables, as long
as they are read-only or at least treated as such.)
: If it is the case that 2 instance of JSP servlets gets created
: to handle each request, what's the best object to synchronize on?
I missed your original post, so I can say only this: when you find
yourself painted into a corner, it's time to revisit the design stage.
-QM
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Using XInclude in tomcat's config files

2004-09-30 Thread Robert Koberg
Shankar Unni wrote:
Shankar Unni wrote:
Is it possible to configure Tomcat to be able to use XInclude to 
include fragments of XML into Tomcat's own configuration files 
(server.xml, the various webapp web.xml's, etc.)?

Bump? No one's tried this yet?
Haven't tried it, but have you set the:
org.xml.sax.parser=org.apache.xerces.parsers.XIncludeParserConfiguration
?
best,
-Rob
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JK2 2.0.4

2004-09-30 Thread Paul D. Hester
I've attached my workers.properties file below.

Paul






#define the shared memory file
[shm:]
file=/usr/local/apache-2.0.50/logs/jk2.log
size=100
debug=1

# Define the communication channel
[channel.socket:localhost:8409]
[channel.socket:localhost:8209]

#define the worker
[ajp13:localhost:8409]
channel=channel.socket:localhost:8409

[ajp13:localhost:8209]
channel=channel.socket:localhost:8209

[uri:/*]
group=ajp13:localhost:8409

[uri:/*]
group=ajp13:localhost:8209 


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



RE: TOMCAT, run Servlet on UNIX

2004-09-30 Thread Daxin Zuo
Hi,
   After check some configuration, I can run Servlet on Tomcat. But I still
get the errors when I start the Tomcat.
   In addition, when I run the same servlet from Apache:
http://myComputerIP:8008/ServletTest, I get the error message on the screen:
  The requested URL /ServletTest was not found on this server.
in the error_log:
  File does not exist:/usr/local/apache2/htdocs/ServletTest

  Apache looks for the Servlet in its doc home folder.
  Please teach me how to let Apache direct the request in Servlet to Tomcat.

Thanks


-Original Message-
From: Daxin Zuo [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 2:20 PM
To: Tomcat Users List
Subject: RE: TOMCAT, run Servlet on UNIX


Yoav,
 Thank you. Please forward more instruction.
On the browser, I see no other errors, but when I start the Tomcat, I find
error messages in
1) the logs/catalina.out:

Sep 30, 2004 11:46:58 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 30, 2004 11:46:59 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 9872 ms
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL
file:/usr/local/apache2/jakarta-tomcat-5.0.28/conf/Catalina/myComputerIP/www
.xml
Sep 30, 2004 11:47:02 AM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /balancer from URL
file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer
Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors


2) In the localhost_log.2004-09-30.txt:
2004-09-30 12:03:06 StandardContext[/balancer]Exception starting filter
BalancerFilter
java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
at
org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65)
at org.apache.webapp.balancer.RulesParser.init(RulesParser.java:43)
at org.apache.webapp.balancer.BalancerFilter.init(BalancerFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
Config.java:225)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil
terConfig.java:308)
at
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterCon
fig.java:79)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:36
98)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4349)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
23)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701
)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
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.start(Bootstrap.java:287)
at 

RE: JK2 2.0.4

2004-09-30 Thread Dale, Matt

I've replied to your offlist email, basically you have mapped everything coming in to 
apache to both of the tomcats so it will always take the first matching route.

You need to be more specific with your uri's and define the exact webapp names if the 
webapps are different across the 2 tomcats. If the webapps are the same then perhaps 
you could just miss out the apache section and run 1 tomcat with 2 virtual hosts.

Ta
Matt


-Original Message-
From: Paul D. Hester [mailto:[EMAIL PROTECTED]
Sent: 30 September 2004 23:00
To: 'Tomcat Users List'
Subject: RE: JK2 2.0.4


I've attached my workers.properties file below.

Paul






#define the shared memory file
[shm:]
file=/usr/local/apache-2.0.50/logs/jk2.log
size=100
debug=1

# Define the communication channel
[channel.socket:localhost:8409]
[channel.socket:localhost:8209]

#define the worker
[ajp13:localhost:8409]
channel=channel.socket:localhost:8409

[ajp13:localhost:8209]
channel=channel.socket:localhost:8209

[uri:/*]
group=ajp13:localhost:8409

[uri:/*]
group=ajp13:localhost:8209 


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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

META-INF/context.xml for expanded directories

2004-09-30 Thread Branko Peteh
Hi,

It seems that having META-INF/context.xml only works for war deployments.
Would it be possible to add this capability for expanded directories as well?
That would make those two deployment cases similar.

Thanks,
Branko

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



RE: method level synchronization doesn't work

2004-09-30 Thread Mike Curwen
Ok, since it's been brought forward...

how do you update and retrieve all in one query?  This is for: I need a new
primary key, and I need it to be thread safe.
 
something that would run on mysql?
 
unless you can get this magic query, it's not quite as simple as let the
databse handle it, is it?


 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, September 30, 2004 7:42 PM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: method level synchronization doesn't work
 
 
 that would be the easiest way.
 
 but you made it too easy, I thought people are suppose to 
 suffer and stumble :)
 
 peter
 
 
 On Thu, 30 Sep 2004 17:46:51 -0400, Frank W. Zammetti 
 [EMAIL PROTECTED] wrote:
  Why not just let SQL do the update?  Do the following:
  
  update my_table set counter_field = counter_field + 1 (where clause 
  here if needed)
  
  (off the top of my head, my syntax might be off)
  
  In other words, why not let the database handle the 
 concurrency issue? 
  That's kind of what they're there for (partly anyway).
 
 
 -
 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: method level synchronization doesn't work

2004-09-30 Thread Frank W. Zammetti
Well, I'm not sure it was stated that a return value was needed.  The 
way I read the original post was basically (to paraphrase): I need to 
update a counter field, and the way I intend to do it is to retrieve the 
current value, modify it, and then write it out again as two separate 
queries.  If that's the scenario, I don't see any reason the SQL 
statement I gave (assuming I got the syntax right) wouldn't work just fine.

If your saying that you need to do the update and then retrieve the 
value for some reason, then I agree, it's not as straight-forward.  One 
thing that MIGHT work, although I'd frankly have to go try it myself to 
be sure, is a subquery, something along the lines of:

select (update table set counter=counter+1) as counter from table
Even if the theory is correct, I'm not sure about how 
database-independant it may or may not be.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
Mike Curwen wrote:
Ok, since it's been brought forward...
how do you update and retrieve all in one query?  This is for: I need a new
primary key, and I need it to be thread safe.
 
something that would run on mysql?
 
unless you can get this magic query, it's not quite as simple as let the
databse handle it, is it?


-Original Message-
From: Peter Lin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 30, 2004 7:42 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: method level synchronization doesn't work

that would be the easiest way.
but you made it too easy, I thought people are suppose to 
suffer and stumble :)

peter
On Thu, 30 Sep 2004 17:46:51 -0400, Frank W. Zammetti 
[EMAIL PROTECTED] wrote:

Why not just let SQL do the update?  Do the following:
update my_table set counter_field = counter_field + 1 (where clause 
here if needed)

(off the top of my head, my syntax might be off)
In other words, why not let the database handle the 
concurrency issue? 

That's kind of what they're there for (partly anyway).
-
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]


  1   2   >