Re[2]: Running Tomcat as Non-Root
Hello Gabriel! LG> So I'm going to take that as a no. No one has bothered to pester sun LG> about this. LG> So I realize that its possible that you could only drop privs down to a LG> single user in the vm, but gee wouldn't that be hugely better then what LG> we have today, where if I want to run <1024 I have to run as superuser? LG> Surely you can see the benefit. 1) Looks there might be some sense in such an api. 2) On the other hand we go somewhat OS specific here - only *nix-es, don't we? 3) In fact we do not strictly have to ask Sun for this, we can do it with JNI. Would be interested to see how jakarta-commons-sandbox/daemon do it. 4) I would vote for such feature request at Sun. Go ahead add it! -Anton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MOD_JK2 Error (shm.fil 13 Permission Denied)
Just put touch and chown shm.file in Apache control script (either apachectl or /etc/init.d/apache), and if you want in catalina.sh too At 16:11 18.07.2003 -0700, you wrote: My Apache HTTPD and Tomcat installation cosists for following version: 1. RedHat 8.0 2. Apache HTTPD 2.0.47 (from source) 3. Tomcat 4.1.24 (binary) 4. JK2 Connector (jakarta-tomcat-connector-4.1.24-src) I followed all the setup instructions to install JK2 connector. I am running HTTPD and Tomcat as same user (not as root ofcourse) [point to note here is that HTTPD is started as root but later switched to different user defined in httpd.conf file] A part of workers2.properties looks like: -- [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers file=/usr/local/apache/httpd/logs/shm.file size=100 debug=0 disabled=0 - I start HTTPD first, wait, and then Tomcat. Tomcat (MOD_JK2) reports errors as seen in the following log. I could the reason, why permission denied, since HTTPD starts up as root first and then switch to other user, in meantime "shm.file" gets created as root and so is not accessible by tomcat (which is started as other user and not root). INFO: Starting Coyote HTTP/1.1 on port 8080 [Fri Jul 18 15:16:27 2003] ( info ) [jk_config_file.c (320)] cfg.update() Updating config /usr/local/apache/httpd/conf/workers2.properties 0 1058551783 [Fri Jul 18 15:16:27 2003] ( info ) [jk_config_file.c (331)] config.setConfig(): Reading properties /usr/local/apache/httpd/conf/workers2.properties 7 [Fri Jul 18 15:16:27 2003] ( info ) [jk_logger_file.c (184)] Initializing log file stderr [Fri Jul 18 15:16:27 2003] (error ) [jk_shm.c (150)] shm.create(): error opening file /usr/local/apache/httpd/logs/shm.file 13 Permission denied [Fri Jul 18 15:16:27 2003] (error ) [jk_shm.c (358)] shm.create(): error mmapping /usr/local/apache/httpd/logs/shm.file [Fri Jul 18 15:16:27 2003] ( info ) [jk_workerEnv.c (403)] workerEnv.init() ok /usr/local/apache/httpd/conf/workers2.properties Jul 18, 2003 3:16:27 PM org.apache.jk.apr.AprImpl init INFO: JK2: Initialized apr Jul 18, 2003 3:16:27 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Jul 18, 2003 3:16:27 PM org.apache.jk.common.ChannelUn init INFO: JK: listening on unix socket: /usr/local/apache/jakarta/tomcat/work/jk2.socket [Fri Jul 18 15:16:27 2003] ( info ) [jk_jni_aprImpl.c (472)] jkInvoke() invoke 593e1450 Jul 18, 2003 3:16:27 PM org.apache.jk.common.ChannelJni init INFO: JK2: listening on channel.jni:jni Jul 18, 2003 3:16:27 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=11/174 config=/usr/local/apache/jakarta/tomcat/conf/jk2.properties Consider other senario, assuming there is no such file like "shm.file" (since I started HTTPD before, so I shut it down and delete the shm.file), start Tomcat first it runs fine and does not log any error (see the log), I assume here that this is not a serious problem. Comments !!! INFO: Initializing Coyote HTTP/1.1 on port 8080 GlobalResourcesLifecycleListener: Naming exception processing jdbc: org.apache.naming.NamingContext:[EMAIL PROTECTED] javax.naming.NamingException: Could not create resource factory, ClassNotFoundException:org.apache.commons.dbcp.BasicDataSourceFactory Starting service Tomcat-Standalone Apache Tomcat/4.1.24-LE-jdk14 Jul 18, 2003 3:31:20 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8080 [Fri Jul 18 15:31:20 2003] ( info ) [jk_config_file.c (320)] cfg.update() Updating config /usr/local/apache/httpd/conf/workers2.properties -2130427774 1058551783 [Fri Jul 18 15:31:20 2003] ( info ) [jk_config_file.c (331)] config.setConfig(): Reading properties /usr/local/apache/httpd/conf/workers2.properties 7 [Fri Jul 18 15:31:20 2003] ( info ) [jk_logger_file.c (184)] Initializing log file stderr [Fri Jul 18 15:31:20 2003] ( info ) [jk_workerEnv.c (403)] workerEnv.init() ok /usr/local/apache/httpd/conf/workers2.properties Jul 18, 2003 3:31:20 PM org.apache.jk.apr.AprImpl init INFO: JK2: Initialized apr Jul 18, 2003 3:31:20 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Jul 18, 2003 3:31:20 PM org.apache.jk.common.ChannelUn init INFO: JK: listening on unix socket: /usr/local/apache/jakarta/tomcat/work/jk2.socket [Fri Jul 18 15:31:20 2003] ( info ) [jk_jni_aprImpl.c (472)] jkInvoke() invoke 5990f450 Jul 18, 2003 3:31:20 PM org.apache.jk.common.ChannelJni init INFO: JK2: listening on channel.jni:jni Jul 18, 2003 3:31:20 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=2/209 config=/usr/local/apache/jakarta/tomcat/conf/jk2.properties - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with auto-generating mod_jk
Hi all. I use Apache2 <-> mod_jk <-> mod_jk Been a while since I had to auto-generate mod_jk. I have some new virtual hosts which I inserted into server.xml. I copied server.xml to the Apache server, started and stopped Tomcat and got a new .../conf/auto/mod_jk.conf It has all the new virtual hosts, but it doesn't have definitions for , the LoadModule and AddModule and the entries for the workers.properties. In other words, incomplete. I can cut and past the virtual hosts from the new mod_jk.conf to the old one, but that's hardly the point. What have I done wrong ??? Maybe should just add them manually to the old copy ??? TIA :( - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running Tomcat as Non-Root
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am Friday 18 July 2003 23:07 schrieb John Turner: > Because then ANYONE with a user account could bind a service to those > ports. ... unless there are proper access privileges on ports as on files. I consider the start-as-root pattern as a hack (not a bad one though ;-) Mit freundlichem Gruß / With kind regards Holger Klawitter - -- lists klawitter de -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.2 (GNU/Linux) iQIXAwUBPxkeRIeO6/fAymJdFAKSiAgAhvFu2+F01dRiSg1QCaXdVP/Lh+rrbd0h GkEQffvf8mLZEY/2cLwhX0JFRWQJhhXHRSsS7hPj90YHzqUlWEspmwrDFbTYtxX4 fL/c9Cxe/9z+rgng7OxLm3krKX/eeaJeahSDK4ytOAX/CHB1ipB0/RoygUjuSxft +v3ClIUVub/pvAMO1f5l60/VvPwToFyDKlqi2ptyY5A/TeHVqTMHJYSnjGu2tmue IDqOUUnLzUy2EljTqjKxUtdEDPQVNU1BfQFrbBPN0tjui6Hgr6vmrthyPSjxrUR+ cjhrWAEBV4CzTgS6JrsTfTyPWFRezdwWvugzylbT1MT4SRATdn6kiwf8D/lXIrar qWOfs/gRHHPI+Y/JsR4PbdbmUMl+/QBWzHl77pUqA5FMmwX3ibb6VR0wKinbn36W QQYUT8ZglrOXaxIcuF3TbXq6+mqyT2sbxik7DfkuM5i1RC05/1kGNCj8OpEOP8jv xe38M9n/V35qGLc0VM8cSRRCgJ9H1AS69/nnEpEWX5PKO8w7BFhaMMbNeYLm3Cqx 2fx0rD5ht5np8zYIwvWmx+xVVRD4s36BHH+l1mwMKQysyqX3YWxeWykCO8Wvthhe /uNiFPz/vAbCG00H6p6awEfHz1ulKIwpiOtTruMV2J8CG+zGjTFB8ZsqZl096nRK eETT87ov0r6oyg== =MBse -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nedd Help with mod_jk or mod_jk2 in HPUX.
http://marc.theaimsgroup.com/?l=tomcat-user&m=105613524120716&w=2 ?? Jeff usually posts links to the HPUX downloads - here's some more of his messages in case the one above might not work ... http://marc.theaimsgroup.com/?a=10337599615&r=1&w=2 -Tim jume wrote: Hi All, Does anyone have a mod_jk or mod_jk2 connector compiled for HPUX 11 they can share? Thanks Julio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to clean objects in user's session
Older versions of tomcat have their Enumeration from session.getAttributeNames() backed by an Iterator. So if a change is made you get the ConcurrentModificationException. I know tomcat 5 does not have this problem but I don't know about tomcat4. Since your using 4.1.24 - I am guessing the change was not backported. The easiest solution is to call invalidate - but this also usually logs the user out too so it may not be acceptable. Once a session is invalidated - it can't be used anymore for getting and setting stuff. The alternative is clone/copy the Enumeration (probably the hard way by an extra iteration) - then iterate through the copied version. The copied version has no relation to the list so you can clear its atributes without the exception. -Tim Imran Balkhi wrote: Hello, Our application is divided into multiple vertical views (ie, multiple company). User can work in only one vertical slice at a time (ie, abc company). Currently users have to logout and login again to change the vertical. There is a business requirement to provide ability to switch verticals without the need to logout and relogin. Here are my options. 1) invalidate the session object and create a new session. I am not sure if this is possible with logout and relogin routine. We are using our own authentication. 2) remove vertical specific objects from user's session. This option seems to be less intrusive on users. However, I am not able to remove objects Here is the test code if((userPreference.getCurrentCompanyId() > 0) && userPreference.getCurrentCompanyId() != companyId){ Enumeration sessionAttributes = session.getAttributeNames(); while(sessionAttributes.hasMoreElements()) { String name = (String) sessionAttributes.nextElement(); if ((name.compareTo("userSession") != 0) && //exclude vertical independent objects (name.compareTo("style") != 0) && (name.compareTo("moduleID") != 0) && (name.compareTo("listNavigatorMap") != 0)) logger.debug ("Name : " + name); session.removeAttribute(name); } } } I am getting ConcurrentModificationException, detials are in attached file. Can any one point out what am I doing wrong or let me know if there are better ways to get to goal. Thanks, Imran - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where can i find mod_webapp ?
Hi, i am looking for a connector between Apache 1.3 and TomCat 4.1.18. Can anybody help me? Regards, Euclides. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where can i find mod_webapp ?
mod_webapp is deprecated, you should use mod_jk(2): http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/connectors.html Yann > Hi, > i am looking for a connector between Apache 1.3 and TomCat 4.1.18. Can > anybody help me? > Regards, > Euclides. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: Where can i find mod_webapp ?
Sorry, but i guess i am a little bit confused. First, which file(s) should i download ? Second, where can i find the main steps to install it? Thanks, Euclides. -Mensagem original- De: Yann Cibron [mailto:[EMAIL PROTECTED] Enviada em: sabado, 19 de julho de 2003 11:01 Para: [EMAIL PROTECTED] Assunto: Re: Where can i find mod_webapp ? mod_webapp is deprecated, you should use mod_jk(2): http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/connectors.html Yann > Hi, > i am looking for a connector between Apache 1.3 and TomCat 4.1.18. Can > anybody help me? > Regards, > Euclides. - 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: Where can i find mod_webapp ?
This should you get started: http://jakarta.apache.org/tomcat/faq/connectors.html HTH, Yann > Sorry, > but i guess i am a little bit confused. First, which file(s) should i > download ? Second, where can i find the main steps to install it? > Thanks, Euclides. > > -Mensagem original- > De: Yann Cibron [mailto:[EMAIL PROTECTED] > Enviada em: sabado, 19 de julho de 2003 11:01 > Para: [EMAIL PROTECTED] > Assunto: Re: Where can i find mod_webapp ? > > > mod_webapp is deprecated, you should use mod_jk(2): > > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/connectors.html > > Yann > > > Hi, > > i am looking for a connector between Apache 1.3 and TomCat 4.1.18. Can > > anybody help me? > > Regards, > > Euclides. > > > > > - > 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: RES: Where can i find mod_webapp ?
Look at the docs: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html and the archive: http://www.mail-archive.com/[EMAIL PROTECTED]/msg98062.html At 11:10 19.07.2003 -0300, you wrote: Sorry, but i guess i am a little bit confused. First, which file(s) should i download ? Second, where can i find the main steps to install it? Thanks, Euclides. -Mensagem original- De: Yann Cibron [mailto:[EMAIL PROTECTED] Enviada em: sabado, 19 de julho de 2003 11:01 Para: [EMAIL PROTECTED] Assunto: Re: Where can i find mod_webapp ? mod_webapp is deprecated, you should use mod_jk(2): http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/connectors.html Yann > Hi, > i am looking for a connector between Apache 1.3 and TomCat 4.1.18. Can > anybody help me? > Regards, > Euclides. - 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]
missing setWrapper()
Hi, i've some trouble with a servlet that extends ManagerServlet (i have to give users the capability of stop and start only a limited subset of application, without having a 'manager' role), as: public class proveapache extends ManagerServlet { when tomcat runs this servlet i obtain the following exception javax.servlet.UnavailableException: Container has not called setWrapper() for this servlet at org.apache.catalina.servlets.ManagerServlet.init(ManagerServlet.java:444) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) So i added the following lines to server.xml I restart tomcat and the same location now gives me a 404 error I suppose that a wrapped class cannot be a normal servlet in webapps space, but rather a class in a separate package, but i don't know if i'm right, and how to add classes visible to web application in a "clean" way and then wich parameters are correct in web.xml for that wrapped class. I beg pardon for my poor english :) Thanks, -- Gian-Luca Dei Rossi (acaso) http://wwwstud.dsi.unive.it/~gdeiross/ ** PACE ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Standalone with Jboss
Harsh, As I have said before, download and install the JBoss-Tomcat bundle and run it on a certain port. Then you can install the Tomcat standalone on another port. There is no conflict as long as they are on different ports. JBoss-Tomcat bundle does not use CATALINA_HOME, so you can keep that for your standalone Tomcat. Currently, I have applications running on my JBoss-Tomcat bundle and applications running on my Tomcat standalone, all on the same computer, and I don't have any problem whatsoever. Oh, by the way, my computer has a 2GHz P4 processor with 1G memory though. But there should be no problem with a lesser computer. Later on when you want to move to another computer, all you have to do is to move the JSPs, servlets, beans, etc to the new webapps location on the new computer. It is very easy. Hope this helps. - Original Message - From: "Harsh Nagpal" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Thursday, July 17, 2003 12:38 AM Subject: RE: Tomcat Standalone with Jboss > Well the truth is that I'm new to Jboss and tomcat > > I need Jboss and tomcat to run on separate VMs (and later on, on diff > machines). I need them to interact, as in the EJB would be the JBoss > machine and the the servlet/webservice on the another machine. How do i > accomplish this? > > > Harsh > > On Thu, 2003-07-17 at 00:17, Shapira, Yoav wrote: > > > > Howdy, > > Download and install JBoss, download and install tomcat. ;) > > > > You're going to need to be more specific... > > > > > > Yoav Shapira > > Millennium ChemInformatics > > > > > > >-Original Message- > > >From: Harsh Nagpal [mailto:[EMAIL PROTECTED] > > >Sent: Wednesday, July 16, 2003 2:46 AM > > >To: [EMAIL PROTECTED] > > >Subject: Tomcat Standalone with Jboss > > > > > >Hi! > > > > > >How do you setup JBoss and Standalone Tomcat(4.1.24) > > > > > >Any help would be appreciated > > > > > >-Harsh > > > > > > > > >- > > >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] > > > > > > - > 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]
Loosing DBCP object - how to solve it?
Hi guys, i have made a bean which creates a Data Base Connection Pool instance once, so that others systems components can use it. This beans is instanced when the Controller Servlet's init method runs. In other words, just one time this bean is instanced! Whenever i wanna get a connection object, i just call the bean's connection method, without creating new instances. However, i am getting the following errror, in which probably, the garbage collector is killing this object instance. BeanTip error - java.sql.SQLException: Timeout waiting for idle object I guess i could use a Singleton to deal with this situation, but i dont know how to! Could anybody help me, please. Regards, Euclides. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: (How to) Tomcat as a Linux service
Hi, Is this good for RH Linux 7.2 Thanks Kevin -Original Message- From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] Sent: 18 July 2003 23:43 To: 'Tomcat Users List' Subject: RE: (How to) Tomcat as a Linux service Euclides, Save the attached file in "/etc/init.d/" and update the paths to suit your needs. Once that's done, you can use it like any other service. Later, Jeremy -Original Message- From: Jose Euclides da Silva Junior - DATAPREVRJ [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 4:45 PM To: '[EMAIL PROTECTED]' Subject: (How to) Tomcat as a Linux service Hi everybody, where can i find tips about how to make TomCat be a Linux's service? Regards, Euclides. - 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: autoloading TLDs
There are two places in the JSP spec that are relevent. 1) Section 7.4 under the description of (for why it is done at startup). 2) Section 7.3.1 for why it does files of the form WEB-INF/*.tld "Dmitry Beransky" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I've noticed that Tomcat 4.1 autoprocesses .tld files from WEB-INFO > directory. I've looked through the servlet specs as well as Tomcat docs > and couldn't find anything describing this behavior. Any pointers? > > Thanks > Dmitry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adherence to DTD issue
Actually, all declarations must come before any declarations in the 2.2 DTD as well. It's just that Tomcat 3.2.x didn't enforce this. Tomcat 3.3.x does enforce it by default, but you can turn it off (for backwards compatibility reasons). "Shapira, Yoav" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Howdy, Tomcat 4.x uses the Servlet Specification v2.3 DTD. You're using the 2.2 DTD. Switch to 2.3. Among the DTD differences is the fact all declarations must come before any declarations. You're violating this requirement. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Gregory, Carlton [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 17, 2003 1:43 PM >To: '[EMAIL PROTECTED]' >Subject: Adherence to DTD issue > > >I have altered a web.xml file in my \webapps\test\WEB-INF directory. >Upon startup I get a parse error about the structure of the file. >I opened the file in XML spy and it said it was an tag unexpected >child element. >I then downloaded the DTD from sun and printed it out. I am adhering to the >DTD from what it seems. > >2.2//EN" >"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> > > > > Hello3 > > > Hello3 > > > > >Hello3 > > >/test/Hello3 > > > --- IT GIVES THE ERROR AT THIS LINE > > SurveyServlet > > >SurveyServlet > > > > >SurveyServlet > > >/MedSurvey > > > >Any ideas? Need more info? > > >- >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: Running Tomcat as Non-Root
> > Because then ANYONE with a user account could bind a service to those > > ports. > ... unless there are proper access privileges on ports as on files. > I consider the start-as-root pattern as a hack (not a bad one though ;-) I was going to let a sleeping dog lie, but that's exactly what I think. This is not a Java bug. This should be an operating system configuration issue. Lukas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jasper - including unbalanced jsp fragment
I would like to include static content from one file (call it header.inc) as part of the jsp text of another (mypage.jsp). Specifically, header.inc is supposed to include common html, head, and body content, following which mypage.jsp will contain page-specific content. So header.inc contains Common title and mypage.jsp starts with <%@ include file="header.inc" %> and goes on with the body content, ending with closing tags for body and html. This fails in jasper with an unterminated tag error at the end of header.inc. Of course, there are unterminated tags there (html and body), but that is intentional; they're terminated in the text of the full mypage.jsp, post-inclusion. I had thought that the inclusion was done first, before page parsing. Am I missing something? Surely I can't be the only person who wants to include unbalanced page fragments, right? Also, would/can this work for the dynamic inclusion techniques (c:import, jsp:include)? I may need those for other purposes, and my initial experiments ran into similar complaints about unterminated tags.
RE: How to clean objects in user's session
Thanks Tim, your suggestion works. Here is the changed code Enumeration sessionAttributes = session.getAttributeNames(); ArrayList list = new ArrayList(); while(sessionAttributes.hasMoreElements()) { String name = (String) sessionAttributes.nextElement(); if ((name.compareTo("userSession") != 0) && (name.compareTo("style") != 0) && (name.compareTo("moduleID") != 0) && (name.compareTo("listNavigatorMap") != 0)) list.add(name); } } Iterator iList = list.iterator(); while(iList.hasNext()) { session.removeAttribute((String) iList.next()); } Imran -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Saturday, July 19, 2003 5:48 AM To: Tomcat Users List Subject: Re: How to clean objects in user's session Older versions of tomcat have their Enumeration from session.getAttributeNames() backed by an Iterator. So if a change is made you get the ConcurrentModificationException. I know tomcat 5 does not have this problem but I don't know about tomcat4. Since your using 4.1.24 - I am guessing the change was not backported. The easiest solution is to call invalidate - but this also usually logs the user out too so it may not be acceptable. Once a session is invalidated - it can't be used anymore for getting and setting stuff. The alternative is clone/copy the Enumeration (probably the hard way by an extra iteration) - then iterate through the copied version. The copied version has no relation to the list so you can clear its atributes without the exception. -Tim Imran Balkhi wrote: > Hello, > > Our application is divided into multiple vertical views (ie, multiple > company). User can work in only one vertical slice at a time (ie, abc > company). Currently users have to logout and login again to change the > vertical. There is a business requirement to provide ability to switch > verticals without the need to logout and relogin. Here are my options. > > > 1) invalidate the session object and create a new session. I am not sure > if this is possible with logout and relogin routine. We are using our own > authentication. > > 2) remove vertical specific objects from user's session. This option > seems to be less intrusive on users. However, I am not able to remove > objects Here is the test code > > if((userPreference.getCurrentCompanyId() > 0) && > userPreference.getCurrentCompanyId() != companyId){ > Enumeration sessionAttributes = session.getAttributeNames(); > while(sessionAttributes.hasMoreElements()) { > String name = (String) sessionAttributes.nextElement(); > if ((name.compareTo("userSession") != 0) && //exclude vertical > independent objects > (name.compareTo("style") != 0) && > (name.compareTo("moduleID") != 0) && > (name.compareTo("listNavigatorMap") != 0)) > logger.debug ("Name : " + name); > session.removeAttribute(name); > } > } > } > > I am getting ConcurrentModificationException, detials are in attached file. > > Can any one point out what am I doing wrong or let me know if there are > better ways to get to goal. > > Thanks, > Imran > > > - 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: Jasper - including unbalanced jsp fragment
A quick clarification -- this actually only causes problems on server-side taglib items, like Struts html taglib. So the problem occurs when I have in Header.inc but the close tag is elsewhere. I would think that Jasper would be combining the text pieces into one file before the taglib ever got to see the content, but that's apparently not the case. Can someone please explain this? -Original Message- From: Craig Berry Sent: Saturday, July 19, 2003 6:07 PM To: [EMAIL PROTECTED] Subject: Jasper - including unbalanced jsp fragment I would like to include static content from one file (call it header.inc) as part of the jsp text of another (mypage.jsp). Specifically, header.inc is supposed to include common html, head, and body content, following which mypage.jsp will contain page-specific content. So header.inc contains Common title and mypage.jsp starts with <%@ include file="header.inc" %> and goes on with the body content, ending with closing tags for body and html. This fails in jasper with an unterminated tag error at the end of header.inc. Of course, there are unterminated tags there (html and body), but that is intentional; they're terminated in the text of the full mypage.jsp, post-inclusion. I had thought that the inclusion was done first, before page parsing. Am I missing something? Surely I can't be the only person who wants to include unbalanced page fragments, right? Also, would/can this work for the dynamic inclusion techniques (c:import, jsp:include)? I may need those for other purposes, and my initial experiments ran into similar complaints about unterminated tags. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Recycling Tomcat
Hi! We are running Tomcat 4.1.24 on a Mandrake 9.1 Linux box. Occasionally we need to recycle Tomcat and the only way the administrator has found which works is to delete the lock file for Tomcat and then start Tomcat. I have to believe that there is a more elegant way to do it. I would also love to be able to recycle Tomcat remotely. I am remote from the server but have access to it from SSH, which gives me a secure command line to the server. Can anyone help with suggestions for either problem? Rhino---rhino1 AT sympatico DOT ca"If you want the best seat in the house, you'll have to move the cat."
Jasper, Java, and X11 Dependencies
Hello, I'm having a problem where I log into a server w/telnet, and run JBoss (w/embedded tomcat). The server fails in jasper with X11 auth problem. I have a workaround: use ssh -X to handle X. If I use ssh -X instead of telnet, everything works fine. But because I can't explain why there is any X11 dependency for our server-side app, my boss deems this fix a "hack", and requires me to find a "real solution". The error is: Can't connect to X11 window server ... Why is there any X11 dependency on a server-side app? We have no servlets or anything like that. We are using apache struts. Precisely: My login page comes up (a JSP page) This page forwards to my first app page, which causes the X11 error. Figuring maybe something on this page was too complex (graphical, or whatever), I replaced it with another JSP page containing "Hello world" and nothing else. No dice... same X11 problem. I've tried building a new Linux server w/o any X11 installed on the box at all. This time I get even stranger errors: 00:12:49,053 ERROR [Engine] ApplicationDispatcher[/codatest] Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /opt/java/jre/lib/i386/libfontmanager.so: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) [clip] When I created a symlink to fix this I got my old X11 error back again! It seems something is still trying to use graphics. Is there a way to handle this situation or is using ssh -X my only option? Any explanation of this situation would be most appreciated. Thanks! Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jasper, Java, and X11 Dependencies
Tomcat out-of-the-box has absolutely zero X11 dependencies. It must be something in your webapp. There are two ways to deal with this: 1) If you are using a 1.4.x JVM, you could try running it as 'headless'. 2) Install Xvfb, to provide a virtual X11 server. "Greg Zoller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I'm having a problem where I log into a server w/telnet, and run JBoss > (w/embedded tomcat). > > The server fails in jasper with X11 auth problem. > > I have a workaround: use ssh -X to handle X. If I use ssh -X instead of > telnet, everything works fine. But because I can't explain why there is > any X11 dependency for our server-side app, my boss deems this fix a > "hack", and requires me to find a "real solution". > > The error is: > > Can't connect to X11 window server ... > > Why is there any X11 dependency on a server-side app? We have no > servlets or anything like that. We are using apache struts. > > Precisely: > > My login page comes up (a JSP page) > This page forwards to my first app page, which causes the X11 error. > Figuring maybe something on this page was too complex (graphical, or > whatever), I replaced it with another JSP page containing "Hello world" > and nothing else. No dice... same X11 problem. > > I've tried building a new Linux server w/o any X11 installed on the box > at all. This time I get even stranger errors: > > 00:12:49,053 ERROR [Engine] ApplicationDispatcher[/codatest] > Servlet.service() for servlet jsp threw exception > org.apache.jasper.JasperException: > /opt/java/jre/lib/i386/libfontmanager.so: libstdc++-libc6.1-1.so.2: > cannot open shared object file: No such file or directory > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 54) > [clip] > > When I created a symlink to fix this I got my old X11 error back > again! > > It seems something is still trying to use graphics. > > Is there a way to handle this situation or is using ssh -X my only option? > > Any explanation of this situation would be most appreciated. > > Thanks! > Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]