5.0.16 sample can't deploy, gets zip exception
hi, just tried 5.0.16 (trying to get this to work for a class i am teaching this thursday). all is well until the install. i get a: install: [deploy] FAIL - Encountered exception java.util.zip.ZipException: error in opening zip file BUILD FAILED file:H:/htdocs/ltu/servlets/sample/build.xml:90: FAIL - Encountered exception java.util.zip.ZipException: error in opening zip file the complete output from the build is at the end. i modified the build file by making install depend on dist and removed a lot of comments. the myapp.war unjars fine with: 0 Tue Dec 16 21:24:28 PST 2003 META-INF/ 107 Tue Dec 16 21:24:26 PST 2003 META-INF/MANIFEST.MF 0 Tue Dec 16 21:24:26 PST 2003 WEB-INF/ 0 Tue Dec 16 21:24:28 PST 2003 WEB-INF/classes/ 0 Tue Dec 16 21:24:28 PST 2003 WEB-INF/classes/mypackage/ 0 Tue Dec 16 21:24:26 PST 2003 WEB-INF/lib/ 0 Tue Dec 16 21:24:26 PST 2003 images/ 2353 Tue Dec 16 21:24:22 PST 2003 WEB-INF/classes/mypackage/Hello.class 871 Tue Dec 16 21:24:22 PST 2003 WEB-INF/classes/mypackage/index.html 834 Tue Dec 16 21:24:22 PST 2003 WEB-INF/classes/index.html 608 Tue Dec 16 21:24:20 PST 2003 index.html 975 Tue Dec 16 21:24:20 PST 2003 hello.jsp 1441 Tue Dec 16 21:24:20 PST 2003 images/tomcat.gif if i unpack shut down tomcat and put myapp-0.1-dev.war (or renaming to myapp.war) into webapps and restart tomcat, i can get to where he unpacked it, the jsp says: Context Path: /myapp Path Information: null Query String: null Request Method: GET Servlet Path: /hello.jsp but the servlet class can not be found as it is asking for hello, i guess this is because i did not alter the .xml files where the mappings live. iirc, there was some mention of supplying your own. has anyone gotten the sample to install from ant? if not, where can find the doc on making my own .xml files to define the mappings (assuming that works) instead of munging tomcat's files or should i just go back to doing it the old way? any pointers would be appreciated thanks build.xml: http://localhost:8080/manager"/> destdir="${build.home}/WEB-INF/classes" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}"> username="${manager.username}" password="${manager.password}" path="${app.path}" war="file://${build.home}"/> username="${manager.username}" password="${manager.password}" path="${app.path}"/> output from ant: Detected Java version: 1.4 in: D:\BIN\J2SDK1.4.1_01\JRE Detected OS: Windows 98 +User task: propertyfile org.apache.tools.ant.taskdefs.optional.PropertyFile +User task: vsscheckin org.apache.tools.ant.taskdefs.optional.vss.MSVSSCHECKIN +User task: sql org.apache.tools.ant.taskdefs.SQLExec +User task: cvspass org.apache.tools.ant.taskdefs.CVSPass +User task: p4reopen org.apache.tools.ant.taskdefs.optional.perforce.P4Reopen +User task: csc org.apache.tools.ant.taskdefs.optional.dotnet.CSharp +User task: dirname org.apache.tools.ant.taskdefs.Dirname +User task: wlrun org.apache.tools.ant.taskdefs.optional.ejb.WLRun +User task: p4label org.apache.tools.ant.taskdefs.optional.perforce.P4Label +User task: p4revert org.apache.tools.ant.taskdefs.optional.perforce.P4Revert +User task: replaceregexp org.apache.tools.ant.taskdefs.optional.ReplaceRegExp +User task: get org.apache.tools.ant.taskdefs.Get +User task: jjtree org.apache.tools.ant.taskdefs.optional.javacc.JJTree +User task: sleep org.apache.tools.ant.taskdefs.Sleep +User task: jarlib-display org.apache.tools.ant.taskdefs.optional.extension.JarLibDisplayTask +User task: dependset org.apache.tools.ant.taskdefs.DependSet +User task: zip org.apache.tools.ant.taskdefs.Zip +User task: patch org.apache.tools.ant.taskdefs.Patch +User task: jspc org.apache.tools.ant.taskdefs.optional.jsp.JspC +User task: style org.apache.tools.ant.taskdefs.XSLTProcess +User task: test org.apache.tools.ant.taskdefs.optional.Test +User task: tstamp org.apache.tools.ant.taskdefs.Tstamp +User task: unwar org.apache.tools.ant.taskdefs.Expand +User task: vsshistory org.apache.tools.ant.taskdefs.optional.vss.MSVSSHISTORY +User task: icontract org.apache.tools.ant.taskdefs.optional.IContract +User task: cvschangelog org.apache.tools.ant.taskdefs.cvslib.ChangeLogTask +User task: p4submit org.apache.tools.ant.taskdefs.optional.perforce.P4Submi
Re: Benefits of Apache Server
I 'd like to know what does the "static resources" exactly mean? html? css? javascripts? It's hard to google explanation of "static resources". If HTML scripts are generated by servlet (there is no html files in my web app),will apache be a must? Chris TIA - Original Message - From: "Wendy Smoak" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Wednesday, December 17, 2003 8:00 AM Subject: RE: Benefits of Apache Server > Could someone point me where I might find what real added > benefit (performance, security or otherwise) that I might > recieve by integrating Apache with my Tomcat Server? Isn't there a Wiki somewhere? This would be a really good topic for it... Apache is better at CGI, and much faster serving static resources. It's one of those things where if you have to ask, you probably don't need it. :) As long as Tomcat does what you need, don't complicate your life with Apache and the connector. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Security Policy
Hi list , With regards to the security manager in tomcat, is it possible to ship a policy file with each webapp ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and Log4J
All, I have been trying all day to get Tomcat and Log4J to cooperate. I have looked through many posts to this mailing list but have been unable to find any extra information that helps me. I am running Tomcat 4.1.27 on a Windows 2000 machine. My web app has log4j-1.2.8.jar in its WEB-INF/lib directory. I have a config file called log4j.xml in my WEB-INF directory. To load the configuration, I have a ContextStartupListener implementation with this code in it: //first things first - initialise the logging sub-system try { System.out.println("Initialising Log4J . . ."); String configFile = WebAppContext.getContextParameter("log4j-config-file"); //provide default if ((configFile == null) || ("".equals(configFile.trim( { configFile = "/WEB-INF/log4j.xml"; } String filename = getServletContext().getRealPath(configFile); DOMConfigurator.configure(filename); System.out.println(". . . done"); } catch (Throwable t) { System.err.println("Exception occurred: " + t); t.printStackTrace(new PrintWriter(System.err)); } //now create the log log = org.apache.commons.logging.LogFactory.getFactory().getInstance(StartupListen er.class); log.trace("trace enabled"); log.debug("debug enabled"); log.info("info enabled"); log.warn("warn enabled"); log.error("error enabled"); log.fatal("fatal enabled"); My log4j.xml file is defined as: http://jakarta.apache.org/log4j/";> As you can see, I have tried to redirect all logging for my webapp to a custom log file. If I set the log4j.debug system property to true, I can see that Log4J is successfully finding and using my configuration file. Indeed, the custom.log file is created. However, none of my log statements are directed to this file. Instead, they go straight to the console as per usual. Also, the debug level is the same as usual (ie. level is info instead of debug as specified in config file). What's really interesting is that there is some output in custom.log. However, this output belongs to JBoss client classes (my application utilises JBoss as an app server). Note that I am running Tomcat standalone - not as part of a JBoss installation. Here is a sample from custom.log: 2003-12-17 14:54:13,653 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] Extracting SpyConnectionFactory from reference 2003-12-17 14:54:13,914 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] The GenericConnectionFactory is: GenericConnectionFactory:[EMAIL PROTECTED],conne ctionProperties={UIL_ADDRESS_KEY=203.8.163.174, PingPeriod=0, UIL_PORT_KEY=8096, ClientILService=org.jboss.mq.il.uil.UILClientILService, UIL_TCPNODELAY_KEY=yes}] 2003-12-17 14:54:13,974 DEBUG [org.jboss.mq.Connection] Setting the clockDaemon's thread factory 2003-12-17 14:54:14,024 DEBUG [org.jboss.mq.GenericConnectionFactory] Handing out ClientIL: org.jboss.mq.il.uil.UILClientILService 2003-12-17 14:54:14,024 DEBUG [org.jboss.mq.il.uil.UILClientILService] UILClientILService.run() 2003-12-17 14:54:14,134 DEBUG [org.jboss.mq.referenceable.SpyDestinationObjectFactory] SpyDestinationObjectFactory->getObjectInstance() It seems Log4J is being used for JBoss client classes but not for my own. What am I doing wrong here? I have also checked to ensure that ${CATALINA_HOME}/common/lib does not contain any logging-related JARs except for commons-logging-api.jar. Similarly, I have made sure that my web app does not contain any logging-related JARs except for log4j-1.2.8.jar. Sorry for the long post and thanks for even reading this far. I'd appreciate any help anyone can offer. Thanks, Kent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with HTTPS in Tomcat 5
It depends on your needs. If your app is going to be connected to the internet, then you need Verisign/Thwate/. If it is an intranet app, then you just need to distribute your signing cert to people, and have them install it. "denis.berto" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I have some problems, when I acess my page in web server with HTTPS, the web server show me a message saying: this certificate is not trust, and asking for download the certificate. My question is how Am I made a Trust certificate without buying a verisign??? thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getPathInfo behaviour changed in tomcat 5.x?
Actually, we did completely rewrite this particular "elementary" thing in Tomcat 5 ;-). The reason is for performance, rather than "just for kicks" :). "Shapira, Yoav" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Howdy, Umm, yeah, we figured we'd completely rewrite something elementary just for kicks ;) Of course I'm just kidding. What is the behavior you're observing? Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Yiannis Mavroukakis [mailto:[EMAIL PROTECTED] >Sent: Monday, December 15, 2003 8:38 AM >To: '[EMAIL PROTECTED]' >Subject: getPathInfo behaviour changed in tomcat 5.x? > > >Hi everyone, > >I have an app running in Tomcat 4.1.x which I moved over to Tomcat 5. I >noticed >that the return results I was getting when calling getPathInfo() where >different >between the two server versions. Does anyone know whether the >implementation > >changed? > >Cheers, > >Yiannis > > >___ _ >This e-mail has been scanned for all viruses by Star Internet. The >service is powered by MessageLabs. For more information on a proactive >anti-virus service working around the clock, around the globe, visit: >http://www.star.net.uk >___ _ 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]
Reading from an xml file from servlet supporting class
Hi, A class used by my servlet in the web application is using a xml file .These 3 files are in the same folder inside webapps//WEB-INF/classes/ in tomcat - yet the servlet-supporting class cannot read the xml file .Where to place the xml file so that it can be read? Regards, Teja. - Do you Yahoo!? Free Pop-Up Blocker - Get it now
Re: ssl startup problem
4.1.24 only supports Sun's JSSE. You'll need to upgrade to be able to use IBM's Providers. "Jason Jesso" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am using AIX5.2, Tomcat 4.1.24, Java 1.4. > > When I start Tomcat using SSL I get errors in the catalina.out. > > > > The security providers in the java.security file are listed as follows: > > security.provider.1=com.ibm.jsse.IBMJSSEProvider > security.provider.2=com.ibm.crypto.provider.IBMJCE > security.provider.3=com.ibm.security.jgss.IBMJGSSProvider > security.provider.4=com.ibm.security.cert.IBMCertPath > > > > The catalina.out is: > > Dec 16, 2003 2:04:20 PM org.apache.commons.modeler.Registry loadRegistry > INFO: Loading registry information > Dec 16, 2003 2:04:20 PM org.apache.commons.modeler.Registry getRegistry > INFO: Creating new Registry instance > Dec 16, 2003 2:04:24 PM org.apache.commons.modeler.Registry getServer > INFO: Creating MBeanServer > Dec 16, 2003 2:04:27 PM org.apache.coyote.http11.Http11Protocol init > INFO: Initializing Coyote HTTP/1.1 on port 80 > Exception during startup processing > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:61 ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:40) > at java.lang.reflect.Method.invoke(Method.java:335) > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) > Caused by: java.lang.NoClassDefFoundError: > com/sun/net/ssl/internal/ssl/Provider > at > org.apache.tomcat.util.net.jsse.JSSEImplementation.getServerSocketFactory(JS SEImplementation.java:90) > at > org.apache.coyote.http11.Http11Protocol.checkSocketFactory(Http11Protocol.ja va:458) > at > org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:133) > at > org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:11 17) > at > org.apache.catalina.core.StandardService.initialize(StandardService.java:579 ) > at > org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246) > at org.apache.catalina.startup.Catalina.start(Catalina.java:511) > at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) > at org.apache.catalina.startup.Catalina.process(Catalina.java:180) > ... 5 more > > > What could be the problem? > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Reset
"Blake Crosby" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Here is our architecture. > > 5 web servers (web1 - web5) and 4 java servers (java4-java7) > > Each Webserver is using the same version of mod_jk (version 1.2.5) and > apache (1.3.27). Each java server is running the same version of tomcat > (3.3.1a). Red Hat is being used on both web servers and java servers. > > When we have mod_jk load balancing turned on (see config at url below) the > following errors (see http://titan.cbc.ca/~bcrosby/tomcat.txt) in tomcat.err > are present. > > On the webserver, the mod_jk error file shows: > > [Tue Dec 16 18:18:27 2003] [jk_ajp_common.c (1303)]: ERROR: Client > connection aborted or network problems > > Turning mod_jk load balancing off fixes this problem. > > A copy of the workers.properties file is available at > http://titan.cbc.ca/~bcrosby/workers.txt. > > Questions: > > 1. What is the definition of "client" according to mod_jk. In the error > message from mod_jk (see above) "client connection aborted" means tomcat > aborted the connection (tomcat being the client) or apache/mod_jk aborted > the connection. "Client" means the browser. The message usually means that e.g. the user hit the "stop" button. However, in this case it looks like a problem with the load-balancer. At least that's what a quick look at the code suggests. > > 2. Are there any values (like socket_keepalive) that are missing in my > workers.properties file? > KeepAlive shouldn't matter much. > > Let me know if you need any more info. > > > -- > Blake Crosby - CBC.ca Operations > Platform Administrator > voice://+1.416.205.3103 mobile://+1.416.884.5828 > [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to change default SMTP port 25 in java mail?
This is not off topic for the tomcat user list Chris. How would one do this in tomcats configuration? By adding an environmental variable to resource configuration in the server.xml file of tomcat. A proper subject for the tomcat user list indeed. See the configuration doc for tomcat if you have further questions on configuring the javamail resource in tomcat's server.xml http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html here's an example, the reference that Chris provides details all the parameters you can set for the Mail Session via this method. ... mail.smtp.host localhost mail.smtp.port 25 ... Cheers, Mark Christopher Schultz wrote: Bopanna, 1. This is not related to Tomcat. Please try a JavaMail list next time. 2. RTFM: http://java.sun.com/products/javamail/javadocs/overview-summary.html Search the page for "port". -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mark Diggory Software Developer Harvard MIT Data Center http://osprey.hmdc.harvard.edu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP session.invalidate() and application scope variables
Hello. When <% session.invalidate(); %> The value of foo is: ${foo} , Tomcat 5.0.16 throws following exception. java.lang.IllegalStateException: getAttribute: ? org.apache.catalina.session.StandardSession.getAttribute (StandardSession.java:985) org.apache.catalina.session.StandardSessionFacade. getAttribute(StandardSessionFacade.java:156) org.apache.jasper.runtime.PageContextImpl. doFindAttribute(PageContextImpl.java:514) org.apache.jasper.runtime.PageContextImpl.findAttribute (PageContextImpl.java:499) org.apache.commons.el.VariableResolverImpl. resolveVariable(VariableResolverImpl.java:157) org.apache.jasper.runtime.PageContextImpl. resolveVariable(PageContextImpl.java:875) org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124) org.apache.commons.el.BinaryOperatorExpression.evaluate (BinaryOperatorExpression.java:154) org.apache.commons.el.ExpressionEvaluatorImpl.evaluate (ExpressionEvaluatorImpl.java:263) org.apache.commons.el.ExpressionEvaluatorImpl.evaluate (ExpressionEvaluatorImpl.java:190) org.apache.jasper.runtime.PageContextImpl. proprietaryEvaluate(PageContextImpl.java:941) org.apache.jsp.register_jsp._jspx_meth_c_if_1(register_ jsp.java:372) org.apache.jsp.register_jsp._jspService(register_jsp.java:120) org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:311) org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet. java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java: 856) The stack trace shows that, org.apache.commons.el.VariableResolverImpl searches for the variable named "foo" in each of the scopes, even if the session is invalidated. To avoid this problem, <% session.invalidate(); %> The value of foo is: ${applicationScope.foo} . But I don't like this manner. Then, how can I invalidate session safely? Any suggestion or any English correction helps me. -- ASARI Takashi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Benefits of Apache Server
Its already in the FAQ. http://jakarta.apache.org/tomcat/faq/connectors.html#integrate -Tim Sleeper, Jesse wrote: Could someone point me where I might find what real added benefit (performance, security or otherwise) that I might recieve by integrating Apache with my Tomcat Server? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat4.1.29 Requested resource not available
Nadia Kunkov wrote: I did add the to the $Tomcat_Home/conf/server.xml It still could not find my test dir Should I reinstall it from RPM maybe... Should I create index.html or something of this sort in one of the directories? Have you tried load the test app by http://localhost:8080/manager/install?war=test I don't think you need to reinstall from RPM, nor need create index.html. If it works, you at least can see the content of the director of 'test'. Best Bao N.K. -Original Message- From: BAO RuiXian [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 4:32 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Tomcat4.1.29 Requested resource not available Nadia Kunkov wrote: Well, there is nothing in the log, just starting/stopping Tomcat stuff... I can run any example in the /examples dir without a problem. I'm running as root, I'm logged in as root (I know it's bad, I have my reasons for it now) so I should have permissions to my test dir. I did login to manager as tomcat, could that be a problem? How do I log out? Should I add root to tomcat_users.xml and make it a manager? Thanks Have you tried to add a ... block for 'test' application, just like 'example' has in the $TOMCAT-HOME/conf/server.conf file? You may try that taking the 'example' block as a template for modification. Best Bao -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 12:38 PM To: Tomcat Users List Subject: Re: Tomcat4.1.29 Requested resource not available A few things to check. 1.) Take a look at the Tomcat logfiles in TOMCAT_HOME/logs Always start there. 2.) Make sure Tomcat can find the javac compiler. Do you have a full j2sdk installed or just a JRE? Tomcat will run with a JRE but won't be able to compile your JSPs without access to javac. If not, go to http://java.sun.com and get a full j2sdk. Is your JAVA_HOME evironment variable set? Type: echo $JAVA_HOME at the shell to verify. It should point to the root directory of your j2sdk. Example: /usr/local/j2sdk1.4.2 Is your JAVA_HOME evironment variable PROPERLY set? Type: $JAVA_HOME/bin/javac at the shell. If you get a "Command not found" message, it's not. Another way to make sure that Tomcat can see your javac compiler is to run (not just look at, but run) the JSP examples that ship with Tomcat. 3.) Check the permissions of the directories and files that you've created and make sure that that whatever user that is running Tomcat has permission to access those files. Let us know what you find. -Ben On Thursday 11 December 2003 12:29 pm, you wrote: Did that. Same message: The requested rsource not available. Something else is wrong... Thanks. -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 11:29 AM To: Tomcat Users List Subject: Re: Tomcat4.1.29 Requested resource not available You don't need to run the install and you don't need a web.xml file. Create a directory under webapps (test) and create a WEB-INF directory in it. Put a JSP in the test directory (test.jsp). The following will do: <%="Hello World"%> Restart Tomcat. Point to http://localhost:8080/test/test.jsp with your browser. On Thursday 11 December 2003 11:26 am, you wrote: Thanks. I did http://localhost:8080/manager/install?war=test and got the error: "Access to the specified resource has been denied/forbidden". What does that mean? In $Tomcat_Home/conf/tomcat_users.xml I have this: (I'm not logged in to the machine as Tomcat but I thin it has nothing to do with it, right?) When I try to to http://localhost:8080/manager/list I get the same error... Can you give me any idea on what is going on? Thanks N.K. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Benefits of Apache Server
> Could someone point me where I might find what real added > benefit (performance, security or otherwise) that I might > recieve by integrating Apache with my Tomcat Server? Isn't there a Wiki somewhere? This would be a really good topic for it... Apache is better at CGI, and much faster serving static resources. It's one of those things where if you have to ask, you probably don't need it. :) As long as Tomcat does what you need, don't complicate your life with Apache and the connector. -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems with sending a serialized object from servlet to app let using Tomcat
Thanks to all that helped me with suggestions - I solved my problem. Darina > -Original Message- > From: Dicheva, Darina [mailto:[EMAIL PROTECTED] > Sent: Monday, December 15, 2003 11:17 AM > To: '[EMAIL PROTECTED]' > Subject: Problems with sending a serialized object from servlet to > applet using Tomcat > > > Hello, > > I have a problem sending a serialized object (instance of a > class that is > not part of the Java Core API) from a servlet to an applet. I > don't have a > problem to send a serialized String object though - > everything works fine > (even in both directions). But when I replace the String > object to be sent > by the servlet to the applet with an object of a class defined by me, > 'inputFromServlet.readObject()' is just hanging -- no > exception, no error, > nothing. The servlet itself seems to have finished its work > completely. I > have copied the class definition (of the object being > serialized) in the > applet's directory. > > I use Tomcat 4.1.29 and j2sdk1.4.2. > > Any idea will be highly appreciated. Thanks in advance. > > Darina > > -- > In the applet I have: > try { > URL servletURL = new URL(getCodeBase(), servletLocation2); > HttpURLConnection servletConnection = (HttpURLConnection) > servletURL.openConnection(); > servletConnection.setDoOutput(true); > servletConnection.setDoInput(true); > servletConnection.setUseCaches(false); > servletConnection.setDefaultUseCaches(false); > > servletConnection.setRequestProperty("Content-type","applicati > on/x-java-seri > alized-object"); > servletConnection.setRequestMethod("POST"); > //if not included > the defaul is the GET method > > log("Applet Connected"); > > // Writing to servlet > > // Write the message to the servlet > OutputStream os = > servletConnection.getOutputStream(); // returns > an output stream that writes to this connection > ObjectOutputStream outputToServlet = new > ObjectOutputStream(os); > > > // serialize the object > outputToServlet.writeObject("Message To Server"); > > outputToServlet.flush(); > outputToServlet.close(); > log("Writing Complete."); > > // Reading from servlet > > InputStream is = servletConnection.getInputStream(); > ObjectInputStream inputFromServlet = new > ObjectInputStream(is); > log("Object Input stream created"); > > Object obj = inputFromServlet.readObject(); > > // HANGS UP HERE !! > > Topic response = (Topic)obj; > log("Finish reading data"); > inputFromServlet.close(); > } > catch ... > -- > > In the servlet I have: > > public void doPost(HttpServletRequest request, HttpServletResponse > response) >throws ServletException, IOException { > > try > { > InputStream is = request.getInputStream(); //get > an input stream > that reads from from this open connection > ObjectInputStream inputFromApplet = new > ObjectInputStream(is); > show("Servlet Connected"); > > String appStr = (String) inputFromApplet.readObject(); > show("Applet String: " + appStr); > inputFromApplet.close(); > > // Ctreate a topic > Topic topic = new Topic("Number1 Systems", > "tt-NumberSystem1", > "N1", "Number1 System", "N1"); > show(topic.toString()); > > > response.setContentType("application/x-java-serialized-object"); > > OutputStream os = response.getOutputStream(); // > returns an output > stream that writes to this connection > ObjectOutputStream outputToApplet = new > ObjectOutputStream(os); > show("Servlet connected"); > > outputToApplet.writeObject(topic); > outputToApplet.flush(); > outputToApplet.close(); > show("Data transmission complete."); > > } > catch ... > > Can somebody help??? I am struggling with this problem for > more than a week > ... > >
Re: Default context for web app
Didn't work. So I can't do what you're doing. Strange. Are you dead certain you don't have an /eSM/ context? Adam Hi Adam, It's a bit hard to tell for certain since I have disabled the manager app. However, I can tell you that there is only one directory below work/Standalone/localhost and it is called "_". Tomcat used to create two directories here when it started two contexts - "_" and "eSM". Also, when I start Tomcat on the command line I can see that my webapp is only started once. I have a ServletContextListener implementation that outputs version details etc. I used to see this information output twice but now I only see it once. Regards, Kent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot Create Resource Instance
I get "Cannot Create Resource Instance" when attempting to open the database connection defined by the following entry in server.xml factoryorg.apache.commons.dbcp.BasicDataSourceFactory maxWait5000 maxActive4 maxIdle5 usernameJavaUser passwordjava driverClassName com.microsoft.jdbc.sqlserver.SQLServerDriver url jdbc:microsoft:sqlserver://localhost:1433;DatabaseName= And the following in web.xml DB Connection javax.sql.DataSource Container The java that attempts to reference this is Context context = new InitialContext(); DataSource source = (DataSource)context .lookup("java:comp/env/"); Connection con = source .getConnection(); Statement statement = con .createStatement(); Any clue what I'm doing wrong here? Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connection Reset
Here is our architecture. 5 web servers (web1 - web5) and 4 java servers (java4-java7) Each Webserver is using the same version of mod_jk (version 1.2.5) and apache (1.3.27). Each java server is running the same version of tomcat (3.3.1a). Red Hat is being used on both web servers and java servers. When we have mod_jk load balancing turned on (see config at url below) the following errors (see http://titan.cbc.ca/~bcrosby/tomcat.txt) in tomcat.err are present. On the webserver, the mod_jk error file shows: [Tue Dec 16 18:18:27 2003] [jk_ajp_common.c (1303)]: ERROR: Client connection aborted or network problems Turning mod_jk load balancing off fixes this problem. A copy of the workers.properties file is available at http://titan.cbc.ca/~bcrosby/workers.txt. Questions: 1. What is the definition of "client" according to mod_jk. In the error message from mod_jk (see above) "client connection aborted" means tomcat aborted the connection (tomcat being the client) or apache/mod_jk aborted the connection. 2. Are there any values (like socket_keepalive) that are missing in my workers.properties file? Let me know if you need any more info. -- Blake Crosby - CBC.ca Operations Platform Administrator voice://+1.416.205.3103 mobile://+1.416.884.5828 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Benefits of Apache Server
Two things come to mind: CGI-BIN support that's easy to setup (I've never gotten them working in tomcat) Faster serving of static pages Perl and PHP support (again this can be done other ways, but it's easier this way IMHO) --mikej -=-- mike jackson [EMAIL PROTECTED] > -Original Message- > From: Sleeper, Jesse [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 16, 2003 2:25 PM > To: Tomcat Users List > Subject: Benefits of Apache Server > > > Could someone point me where I might find what real added benefit > (performance, security or otherwise) that I might recieve by integrating > Apache with my Tomcat Server? > > Thanks, > > Jester > > - > 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]
Benefits of Apache Server
Could someone point me where I might find what real added benefit (performance, security or otherwise) that I might recieve by integrating Apache with my Tomcat Server? Thanks, Jester - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
admin tool - tomcat 5.0.16
Hello, I attempt to use the admin tool in tomcat 5.0.16. It was working for a while, but now every access to a "Service" node throw this exception in the right frame javax.servlet.ServletException: Define tag cannot set a null value org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800) admin.service.service_jsp._jspService(service_jsp.java:840) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) and every access to a "Host" node throw this exception java.lang.NullPointerException org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:179) org.apache.struts.taglib.logic.NotEqualTag.condition(NotEqualTag.java:90) org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTagBase.java:218) admin.host.host_jsp._jspService(host_jsp.java:437) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856 smdy can help me ? Is it recommended to use admin tool in a production environement ? thks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat uses syslog for logging?
Howdy, No, tomcat doesn't use syslog. RTFM especially the Logger configuration reference. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Sandeep [mailto:[EMAIL PROTECTED] >Sent: Tuesday, December 16, 2003 4:20 PM >To: [EMAIL PROTECTED] >Subject: tomcat uses syslog for logging? > >Hi, >Does tomcat use syslog for logging? >If yes, what is the facility that is used to log the messages. >Any information in this regard is appreciated. >Thanks, >Sandeep > > >- >Do you Yahoo!? >New Yahoo! Photos - easier uploading and sharing 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]
tomcat uses syslog for logging?
Hi, Does tomcat use syslog for logging? If yes, what is the facility that is used to log the messages. Any information in this regard is appreciated. Thanks, Sandeep - Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing
Re: Tomcat 5 Clustering
probably easier if you post it to fhanik at apache dot org Filip - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 12:27 PM Subject: RE: Tomcat 5 Clustering Okwill do...should I post them here or offline.Maybe others will be able to benefit from our conversation Russ -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 3:17 PM To: Tomcat Users List Subject: Re: Tomcat 5 Clustering hmm, on your console or in your log, are the systems finding each other, ie, do you have multicast enabled and do the nodes actually connect to each other? send the logs from a clean run, ie stop, delete logs, start, send logs Filip - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 12:08 PM Subject: RE: Tomcat 5 Clustering Hi Filip- Sorry, while being caught up in the problem statement..I forgot to mention that I'm using Microsoft Network Load Balancing services for load balancing and failover detectionagain my apologies When I do pull the plugI am redirected to the working node...and when I try getAttribute("myAttribute") on that same session (never closed the browser) the session or session attribute is no longer obtainable... Russ -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:13 PM To: Tomcat Users List Subject: Re: Tomcat 5 Clustering download a load balancer balance.sourceforge.net or a perl balancer called "pen" (google) the shut down one tomcat, after initial access, the system will fail over. pulling the network cable without any other failure has not yet been handled as a failure scenario Filip - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 10:37 AM Subject: Tomcat 5 Clustering Hello All: Please excuse my ignorance, I'm trying to achieve clustering with Tomcat 5I've read the following in the Tomcat 5 documentation: = To run session replication in your Tomcat 5 container, the following steps should be completed: -->All your session attributes must implement java.io.Serializable === Okay. I've completed all the other steps (uncomment the element along with the , and added the in web.xml)I'm trying to code a simple object that implements java.io.Serializable to store in a session and here it is. package com.shawmut.session; import java.io.Serializable; public class SerializeSession implements Serializable { public static String testString = ""; public void setString(String stringValue){ this.testString = stringValue; } public String getString(){ return this.testString; } } ok.Now I want to put this in the session. <% if(session.getAttribute("ss")== null){ SerializeSession ss = new SerializeSession(); ss.setString("Booo! And I created my session on Tomcat 1 Node"); session.setAttribute("ss", ss); } %> Whats going on here?.I unplug the patch cord ( docs says it's a bad idea) from one of the boxes and hit a jsp on the working node that does the following..and the session doesn't carry over to the working node <% if(session.getAttribute("ss")!= null){ SerializeSession ss2 = (SerializeSession)session.getAttribute("ss"); %> SESSION:<%=ss2.getString()%> <% } %> Basically what I'm looking for is an example of serializing session attributes as noted above Any Help here will be greatly appreciated.. Russ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5 Clustering
Okwill do...should I post them here or offline.Maybe others will be able to benefit from our conversation Russ -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 3:17 PM To: Tomcat Users List Subject: Re: Tomcat 5 Clustering hmm, on your console or in your log, are the systems finding each other, ie, do you have multicast enabled and do the nodes actually connect to each other? send the logs from a clean run, ie stop, delete logs, start, send logs Filip - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 12:08 PM Subject: RE: Tomcat 5 Clustering Hi Filip- Sorry, while being caught up in the problem statement..I forgot to mention that I'm using Microsoft Network Load Balancing services for load balancing and failover detectionagain my apologies When I do pull the plugI am redirected to the working node...and when I try getAttribute("myAttribute") on that same session (never closed the browser) the session or session attribute is no longer obtainable... Russ -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:13 PM To: Tomcat Users List Subject: Re: Tomcat 5 Clustering download a load balancer balance.sourceforge.net or a perl balancer called "pen" (google) the shut down one tomcat, after initial access, the system will fail over. pulling the network cable without any other failure has not yet been handled as a failure scenario Filip - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 10:37 AM Subject: Tomcat 5 Clustering Hello All: Please excuse my ignorance, I'm trying to achieve clustering with Tomcat 5I've read the following in the Tomcat 5 documentation: = To run session replication in your Tomcat 5 container, the following steps should be completed: -->All your session attributes must implement java.io.Serializable === Okay. I've completed all the other steps (uncomment the element along with the , and added the in web.xml)I'm trying to code a simple object that implements java.io.Serializable to store in a session and here it is. package com.shawmut.session; import java.io.Serializable; public class SerializeSession implements Serializable { public static String testString = ""; public void setString(String stringValue){ this.testString = stringValue; } public String getString(){ return this.testString; } } ok.Now I want to put this in the session. <% if(session.getAttribute("ss")== null){ SerializeSession ss = new SerializeSession(); ss.setString("Booo! And I created my session on Tomcat 1 Node"); session.setAttribute("ss", ss); } %> Whats going on here?.I unplug the patch cord ( docs says it's a bad idea) from one of the boxes and hit a jsp on the working node that does the following..and the session doesn't carry over to the working node <% if(session.getAttribute("ss")!= null){ SerializeSession ss2 = (SerializeSession)session.getAttribute("ss"); %> SESSION:<%=ss2.getString()%> <% } %> Basically what I'm looking for is an example of serializing session attributes as noted above Any Help here will be greatly appreciated.. Russ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do you generate a unique number for each request across muliple tomcat instances?
The hibernate project as a uuid class, you could look at how they do it... Here's the docs: http://www.hibernate.org/hib_docs/reference/html/or-mapping.html#or-mapp ing-s1-4-uuid -gabe -Original Message- From: Tom Ly [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 12:10 PM To: Tomcat Users List Subject: Re: How do you generate a unique number for each request across muliple tomcat instances? bump Tom Ly <[EMAIL PROTECTED]> wrote:That works great in a windows environment. But on Linux machines,the line will always return 127.0.0.1 Tim Funk wrote:Ideally use a string for uniqueness, not an int. For an int is too small across a cluster. To get a unique string, concatenate your IP address with java.rmi.server.UID(), for example: String guid = InetAddress.getLocalHost().getHostAddress() + (new java.rmi.server.UID()).toString()); See the javadocs on UID for more info. -Tim Tom Ly wrote: > I have an application where I need to generate a unique int for each > request that comes in. I've got about 8 Tomcat instances running > spread across four machines(two tomcat's each machine). It's pretty > simple with one Tomcat, but with mulitple Tomcats it gets tricky. I > tried using InetAddress to get the ip address of the current machine > and use that to set the range for each tomcat(since the ip address > will always be unique), but since I'm using Linux, it'll always return > 127.0.0.1 as the ip address, so I can use class InetAddress. Any > advice on what to do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ssl startup problem
I am using AIX5.2, Tomcat 4.1.24, Java 1.4. When I start Tomcat using SSL I get errors in the catalina.out. The security providers in the java.security file are listed as follows: security.provider.1=com.ibm.jsse.IBMJSSEProvider security.provider.2=com.ibm.crypto.provider.IBMJCE security.provider.3=com.ibm.security.jgss.IBMJGSSProvider security.provider.4=com.ibm.security.cert.IBMCertPath The catalina.out is: Dec 16, 2003 2:04:20 PM org.apache.commons.modeler.Registry loadRegistry INFO: Loading registry information Dec 16, 2003 2:04:20 PM org.apache.commons.modeler.Registry getRegistry INFO: Creating new Registry instance Dec 16, 2003 2:04:24 PM org.apache.commons.modeler.Registry getServer INFO: Creating MBeanServer Dec 16, 2003 2:04:27 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 80 Exception during startup processing java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:61) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:40) at java.lang.reflect.Method.invoke(Method.java:335) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Caused by: java.lang.NoClassDefFoundError: com/sun/net/ssl/internal/ssl/Provider at org.apache.tomcat.util.net.jsse.JSSEImplementation.getServerSocketFactory(JSSEImplementation.java:90) at org.apache.coyote.http11.Http11Protocol.checkSocketFactory(Http11Protocol.java:458) at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:133) at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1117) at org.apache.catalina.core.StandardService.initialize(StandardService.java:579) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246) at org.apache.catalina.startup.Catalina.start(Catalina.java:511) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) ... 5 more What could be the problem?
Re: Tomcat 5 Clustering
hmm, on your console or in your log, are the systems finding each other, ie, do you have multicast enabled and do the nodes actually connect to each other? send the logs from a clean run, ie stop, delete logs, start, send logs Filip - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 12:08 PM Subject: RE: Tomcat 5 Clustering Hi Filip- Sorry, while being caught up in the problem statement..I forgot to mention that I'm using Microsoft Network Load Balancing services for load balancing and failover detectionagain my apologies When I do pull the plugI am redirected to the working node...and when I try getAttribute("myAttribute") on that same session (never closed the browser) the session or session attribute is no longer obtainable... Russ -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:13 PM To: Tomcat Users List Subject: Re: Tomcat 5 Clustering download a load balancer balance.sourceforge.net or a perl balancer called "pen" (google) the shut down one tomcat, after initial access, the system will fail over. pulling the network cable without any other failure has not yet been handled as a failure scenario Filip - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 10:37 AM Subject: Tomcat 5 Clustering Hello All: Please excuse my ignorance, I'm trying to achieve clustering with Tomcat 5I've read the following in the Tomcat 5 documentation: = To run session replication in your Tomcat 5 container, the following steps should be completed: -->All your session attributes must implement java.io.Serializable === Okay. I've completed all the other steps (uncomment the element along with the , and added the in web.xml)I'm trying to code a simple object that implements java.io.Serializable to store in a session and here it is. package com.shawmut.session; import java.io.Serializable; public class SerializeSession implements Serializable { public static String testString = ""; public void setString(String stringValue){ this.testString = stringValue; } public String getString(){ return this.testString; } } ok.Now I want to put this in the session. <% if(session.getAttribute("ss")== null){ SerializeSession ss = new SerializeSession(); ss.setString("Booo! And I created my session on Tomcat 1 Node"); session.setAttribute("ss", ss); } %> Whats going on here?.I unplug the patch cord ( docs says it's a bad idea) from one of the boxes and hit a jsp on the working node that does the following..and the session doesn't carry over to the working node <% if(session.getAttribute("ss")!= null){ SerializeSession ss2 = (SerializeSession)session.getAttribute("ss"); %> SESSION:<%=ss2.getString()%> <% } %> Basically what I'm looking for is an example of serializing session attributes as noted above Any Help here will be greatly appreciated.. Russ - 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: How do you generate a unique number for each request across muliple tomcat instances?
bump Tom Ly <[EMAIL PROTECTED]> wrote:That works great in a windows environment. But on Linux machines,the line will always return 127.0.0.1 Tim Funk wrote:Ideally use a string for uniqueness, not an int. For an int is too small across a cluster. To get a unique string, concatenate your IP address with java.rmi.server.UID(), for example: String guid = InetAddress.getLocalHost().getHostAddress() + (new java.rmi.server.UID()).toString()); See the javadocs on UID for more info. -Tim Tom Ly wrote: > I have an application where I need to generate a unique int for each request that > comes in. I've got about 8 Tomcat instances running spread across four machines(two > tomcat's each machine). It's pretty simple with one Tomcat, but with mulitple > Tomcats it gets tricky. I tried using InetAddress to get the ip address of the > current machine and use that to set the range for each tomcat(since the ip address > will always be unique), but since I'm using Linux, it'll always return 127.0.0.1 as > the ip address, so I can use class InetAddress. Any advice on what to do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
RE: Tomcat 5 Clustering
Hi Filip- Sorry, while being caught up in the problem statement..I forgot to mention that I'm using Microsoft Network Load Balancing services for load balancing and failover detectionagain my apologies When I do pull the plugI am redirected to the working node...and when I try getAttribute("myAttribute") on that same session (never closed the browser) the session or session attribute is no longer obtainable... Russ -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:13 PM To: Tomcat Users List Subject: Re: Tomcat 5 Clustering download a load balancer balance.sourceforge.net or a perl balancer called "pen" (google) the shut down one tomcat, after initial access, the system will fail over. pulling the network cable without any other failure has not yet been handled as a failure scenario Filip - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 10:37 AM Subject: Tomcat 5 Clustering Hello All: Please excuse my ignorance, I'm trying to achieve clustering with Tomcat 5I've read the following in the Tomcat 5 documentation: = To run session replication in your Tomcat 5 container, the following steps should be completed: -->All your session attributes must implement java.io.Serializable === Okay. I've completed all the other steps (uncomment the element along with the , and added the in web.xml)I'm trying to code a simple object that implements java.io.Serializable to store in a session and here it is. package com.shawmut.session; import java.io.Serializable; public class SerializeSession implements Serializable { public static String testString = ""; public void setString(String stringValue){ this.testString = stringValue; } public String getString(){ return this.testString; } } ok.Now I want to put this in the session. <% if(session.getAttribute("ss")== null){ SerializeSession ss = new SerializeSession(); ss.setString("Booo! And I created my session on Tomcat 1 Node"); session.setAttribute("ss", ss); } %> Whats going on here?.I unplug the patch cord ( docs says it's a bad idea) from one of the boxes and hit a jsp on the working node that does the following..and the session doesn't carry over to the working node <% if(session.getAttribute("ss")!= null){ SerializeSession ss2 = (SerializeSession)session.getAttribute("ss"); %> SESSION:<%=ss2.getString()%> <% } %> Basically what I'm looking for is an example of serializing session attributes as noted above Any Help here will be greatly appreciated.. Russ - 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 to change default SMTP port 25 in java mail?
Bopanna, 1. This is not related to Tomcat. Please try a JavaMail list next time. 2. RTFM: http://java.sun.com/products/javamail/javadocs/overview-summary.html Search the page for "port". -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Keytool error - LAST STEP!!!
--- Begin Message --- keytool error: java.security.cert.CertificateException: IOException: X509.ObjectIdentifier() -- data isn't an object ID (tag = 48) This is my error. I'm running WinServer2003. Tomcat 4.0.6 It is a Verisign key I'm trying to import and I followed all the steps here: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html Everything worked awesome... until this last step: specifically * And finally import your new Certificate (It must be in X509 format): keytool -import -alias tomcat -keystore \ -trustcacerts -file Which resulted in the error above... can anyone help??? Thanks much!!! Rob <>--- End Message --- __ Disclaimer: This e-mail message is intended only for the personal use of the recipient(s) named above. If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message. This e-mail expresses views only of the sender, which are not to be attributed to Rite Aid Corporation and may not be copied or distributed without this statement. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to change SMTP port in tomcat4.1.29?
Hi All, Please tell me how to change the SMPT port from default value of 25 to some thing else on tomcat 4.1.29? Thanks Bopanna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to change default SMTP port 25 in java mail?
hi all, i am using java mail in my webapp. my client does'nt want to use default SMTP port 25. i have to use port specified by client. the project is on tomcat-4.1.29. can some one give me sample code to do this? Thanks Bopanna - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache-Tomcat connectors... why??
Thank you Howard and Jim, I will look into mod_proxy. Things seem a little more complicated because I am attempted to integrate with the JBoss tomcat bundle. Obviously the configuration is a little different here and most howto's require a little bit more thinking about as to where to find the files etc... Im not sure about using tomcat as a static content server. Apache has many features that tomcat doesnt as it is designed for this task. It might solve the problem, but the powers-that-be are quite keen on full integration. Im not sure that servlets do require anything extra at HTTP level. Perhaps I am missing something but due to the relative simplicity of HTTP and the fact its stateless I would assume that the servlet container cant require anything extra. From the browsers perspective it is requesting a static resource, by name, from a domain. The proxying route would have the added advantage of not having to reconfigure mod_jk(2) everytime a new web app is added. The browser says "Give me /index.jsp", apache says "I cant find index.jsp, but i know about THIS http server (tomcat), that might", tomcat says "yup, i can do that for you, here it is", apache says "Here you go... i found it eventually"... all over HTTP. It seems to make a lot of sense to me, but as you say, if this simple solution has not been shouted about, it will mean there is a fundemental flaw... lots of smarter guys than me working on this stuff =o) Thanks again for your help! > -Original Message- > From: Howard Jim [mailto:[EMAIL PROTECTED] > Sent: 16 December 2003 19:34 > To: Tomcat Users List > Subject: RE: Apache-Tomcat connectors... why?? > > > I believe what you are referring to is the ProxyPass Directive > > http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypass > > I have used this before, but haven't played with it as a way to > reference the app server. If it were that simple, I imagine it > would have already been done. I am just getting going with the > connectors, but things like parameters, servlets, and the like > have their own needs which may require a closer integration with > the webserver than can be provided by a simple reverse proxy > setup. If all you need is the reverse proxy setup, then perhaps > you don't even need the webserver. Just let tomcat serve it all, > then all your connector worries are moot. > > Jim > > > -Original Message- > From: Wesley Hall [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 16, 2003 1:27 PM > To: [EMAIL PROTECTED] > Subject: Apache-Tomcat connectors... why?? > > > Hello all, > > Hopefully I picked a good list to bring this topic up on. There > were several > candidates. > > I have spent some time today attempting to perform the non-trival task of > configuring communication between the apache web server and the tomcat > servlet engine. This seems to be a fairly complicated process involving > quite a lot of configuration and some degree of black magic. > > It occured to me that a simpler approch would be to simply have apache > forward requests at HTTP level to a list of slave servers in the form of > "Cant find this resource!! Can you??". Before apache returns a > 404 error it > could consult some form of list and ask other servers on the > network (tomcat > for instance ;o)) to attempt to find the resource via HTTP. I dont see a > reason why this would perform particually badly in the most > common set up of > apache + tomcat. > > Presumably there is a way to configure apache to do this already > (if anyone > could point me to the write manaual page I would be grateful), > but it doesnt > seem to be offered up a simple solution to a complex problem on the tomcat > integration pages. > > My question... why is this solution not mentioned more often given the > number of "how do i configure mod_jk2??" results on google and would their > be any serious disadvantages with such an approch? > > Thanks > > Wesley Hall > > > > - > 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: CGI not working on Tomcat 5.0.16?
The only CGI that I tested with is a log analysis package called AWStats (http://awstats.sourceforge.net/) which primarily consists of a single .pl file. It also seems to use some .pm library files. It has always worked great with Tomcat 4.1. I can't get it to work with Tomcat 5 though. I'm hoping that someone will chime in and let me know if CGI works for them on Tomcat 5. Jon - Original Message - From: "Januski, Ken" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 12:51 PM Subject: RE: CGI not working on Tomcat 5.0.16? Jon, Just slightly off topic, have you gotten cgi to do more or less what you wanted with Tomcat? I can't get it working very well in Tomcat 4.1 and am wondering if it's just me. I can get one page to work but when it calls anohter cgi page I run into problems. Ken -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 1:04 PM To: Tomcat Users List Subject: Re: CGI not working on Tomcat 5.0.16? Tomcat supports CGI natively. I'm using Tomcat in standalone mode. Jon - Original Message - From: "Edson Alves Pereira" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 6:59 AM Subject: RE: CGI not working on Tomcat 5.0.16? Just a question, CGI isn´t a Apache server matter? > -- > De: Jonathan Eric Miller[SMTP:[EMAIL PROTECTED] > Responder: Tomcat Users List > Enviada: segunda-feira, 15 de dezembro de 2003 20:52 > Para: Tomcat Users List > Assunto: Re: CGI not working on Tomcat 5.0.16? > > Do you have the same error that I do in your log? As far as I can tell > this > is a bug in Tomcat. > > Jon > > - Original Message - > From: "Lawrence, Gabriel" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Monday, December 15, 2003 4:58 PM > Subject: RE: CGI not working on Tomcat 5.0.16? > > > > I've noticed that on tomcat 5 the working directory that it execs the > > cgi script in is different then it was on tomcat 4. I haven't solved my > > problem yet, but I have isolated that to be my problem. > > > > -gabe > > > > -Original Message- > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] > > Sent: Monday, December 15, 2003 2:42 PM > > To: Tomcat User List > > Subject: CGI not working on Tomcat 5.0.16? > > > > > > I've been having problems getting CGI to work with Tomcat 5.0.16. I have > > it working with Tomcat 4.1. Has anyone else been able to get it to work? > > > > I'm receiving the following error in my localhost_log*.txt log even > > though the file listed is there. Has anyone else had this problem? > > > > 2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open > > perl script > > ""/opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl"": > > No such file or directory > > 2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on > > stderr > > > > Jon > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBC from TagSupport
Cool, thanks. -Original Message- From: Alan Czajkowski [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:44 PM To: Tomcat Users List Subject: RE: JDBC from TagSupport affirmative, but instead of looking at my proprietary example below .. goto the Tomcat Documentation under JNDI Datasource HOW-TO and there it explained nicely on how to do everything Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - "Hart, Justin" <[EMAIL PROTECTED]> 16/12/2003 02:38 PM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:RE: JDBC from TagSupport Gotcha, so the datasource gets stuck into a naming directory, and then you can grab it via JNDI and use it that way. The benefit being that a sysadmin can change the datasource via server.xml rather than having you rewrite the code. Right? Justin -Original Message- From: Alan Czajkowski [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:37 PM To: Tomcat Users List Subject: RE: JDBC from TagSupport i have it setup for sybase and mine looks like this in the server.xml: - factory org.apache.commons.dbcp.BasicDataSourceFactory maxActive 10 maxIdle 5 maxWait 1 driverClassName com.sybase.jdbc2.jdbc.SybDriver url jdbc:sybase:Tds:database_hostname:5000/your_dbname?JCONNECT_VERSION=6 username your_userid password your_password - of course i also got a .jar file (jConnect 5.5) from sybase that i guess provides the "com.sybase.jdbc2.jdbc.SybDriver" and then in the JSP u have something like this to reference the context and setup the connection: - String s = "java:comp/env"; String t = "jdbc/a_sybase_datasource"; InitialContext initCtx = null; try { initCtx = new InitialContext(); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: initCtx = new InitialContext();"); out.println(e + " : " + e.getMessage()); out.println(""); } Context envCtx = null; try { envCtx = (Context)initCtx.lookup(s); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: envCtx = (Context)initCtx.lookup(" + s + ");"); out.println(e + " : " + e.getMessage()); out.println(""); } DataSource ds = null; try { ds = (DataSource)envCtx.lookup(t); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: ds = (DataSource)envCtx.lookup(" + t + ");"); out.println(e + " : " + e.getMessage()); out.println(""); } if(ds == null) { out.println(""); out.println(""); out.println("warning: DataSource is null"); out.println(""); } Connection conn; Statement stmt; ResultSet rs; // open connection object conn = ds.getConnection(); // open statement object stmt = conn.createStatement(); - Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - "Hart, Justin" <[EMAIL PROTECTED]> 16/12/2003 02:26 PM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:RE: JDBC from TagSupport Ok, so, how does one access this datasource from tagsupport? Justin -Original Message- From: Philipp Taprogge [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:24 PM To: Tomcat Users List Subject: Re: JDBC from TagSupport Hi! Hart, Justin wrote: > Quick question. I see that one can configure a JDBC datasource in their server.xml file and their web.xml file. > What does this get you? Every example that I have read tells me that I need to open a JDBC connection just about > the same as I would from any other java application. > > What is the purpose of setting up a JDBC datasource in these files? Is it only good for userdatabaserealm? The main advantage is that you can use a connection pool like jakarta-commons-dbcp which saves you a lot of runtime. The second advantage is that you can configure the connection parameters like db URL, username, password and the like on the fly without editing java sources or redeploying your application.
Re: How do i run 2 tomcats on the same server and using jk2?
Do you have a soulotion to my problem? > Subject: How do i run 2 tomcats on the same server and using jk2? > > Hi, > > I installed 2 Tomcats on the same server and they both work on on port 8080 > and the second on 8081 > I also define one to listen for the jk2 on 8009 and the second on 8010 but > only the first one is working > > What do i need to do in the registry and in the IIS in order to make the > second work also? > > > Regards, > > Yuval - Original Message - From: "The Bean" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 9:40 PM Subject: RE: How do i run 2 tomcats on the same server and using jk2? > Not a bad link, but I have to comment on the guys suggestion about changing > the catalina.sh script. Here's a quote: > > "In my many years of consulting, I have learned not to rely on environment variables > which can be unset by ignorant or malicious people" > > In my many years of consulting, I've much more often encountered problems > with people tampering with script files that should have been left alone. Ever do > an export JAVA_HOME= to explicitly pick a JVM and be stumped by a bug still happening > . . . only to find out that someone took at upon themselves to change a script that > you know well, and to manually set JAVA_HOME withing that script? This much more > sinister than missing environment variables. > > If you're very afraid of environment variables not being there or being wrong, then > make a script file that sets a few variables and then calls the original script. Or some > variant of that. But just jumping in and altering the script is rarely the best idea. > > - T.B. > > --- "Cocalea, Eugen" <[EMAIL PROTECTED]> wrote: > > Heh, seem that people around here knock on the same problems I had few days > > ago. Best solution, found on: > > > > http://www.ubeans.com/tomcat/ > > > __ > Do you Yahoo!? > New Yahoo! Photos - easier uploading and sharing. > http://photos.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]
RE: JDBC from TagSupport
affirmative, but instead of looking at my proprietary example below .. goto the Tomcat Documentation under JNDI Datasource HOW-TO and there it explained nicely on how to do everything Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - "Hart, Justin" <[EMAIL PROTECTED]> 16/12/2003 02:38 PM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:RE: JDBC from TagSupport Gotcha, so the datasource gets stuck into a naming directory, and then you can grab it via JNDI and use it that way. The benefit being that a sysadmin can change the datasource via server.xml rather than having you rewrite the code. Right? Justin -Original Message- From: Alan Czajkowski [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:37 PM To: Tomcat Users List Subject: RE: JDBC from TagSupport i have it setup for sybase and mine looks like this in the server.xml: - factory org.apache.commons.dbcp.BasicDataSourceFactory maxActive 10 maxIdle 5 maxWait 1 driverClassName com.sybase.jdbc2.jdbc.SybDriver url jdbc:sybase:Tds:database_hostname:5000/your_dbname?JCONNECT_VERSION=6 username your_userid password your_password - of course i also got a .jar file (jConnect 5.5) from sybase that i guess provides the "com.sybase.jdbc2.jdbc.SybDriver" and then in the JSP u have something like this to reference the context and setup the connection: - String s = "java:comp/env"; String t = "jdbc/a_sybase_datasource"; InitialContext initCtx = null; try { initCtx = new InitialContext(); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: initCtx = new InitialContext();"); out.println(e + " : " + e.getMessage()); out.println(""); } Context envCtx = null; try { envCtx = (Context)initCtx.lookup(s); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: envCtx = (Context)initCtx.lookup(" + s + ");"); out.println(e + " : " + e.getMessage()); out.println(""); } DataSource ds = null; try { ds = (DataSource)envCtx.lookup(t); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: ds = (DataSource)envCtx.lookup(" + t + ");"); out.println(e + " : " + e.getMessage()); out.println(""); } if(ds == null) { out.println(""); out.println(""); out.println("warning: DataSource is null"); out.println(""); } Connection conn; Statement stmt; ResultSet rs; // open connection object conn = ds.getConnection(); // open statement object stmt = conn.createStatement(); - Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - "Hart, Justin" <[EMAIL PROTECTED]> 16/12/2003 02:26 PM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:RE: JDBC from TagSupport Ok, so, how does one access this datasource from tagsupport? Justin -Original Message- From: Philipp Taprogge [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:24 PM To: Tomcat Users List Subject: Re: JDBC from TagSupport Hi! Hart, Justin wrote: > Quick question. I see that one can configure a JDBC datasource in their server.xml file and their web.xml file. > What does this get you? Every example that I have read tells me that I need to open a JDBC connection just about > the same as I would from any other java application. > > What is the purpose of setting up a JDBC datasource in these files? Is it only good for userdatabaserealm? The main advantage is that you can use a connection pool like jakarta-commons-dbcp which saves you a lot of runtime. The second advantage is that you can configure the connection parameters like db URL, username, password and the like on the fly without editing java sources or redeploying your application. Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -
RE: How do i run 2 tomcats on the same server and using jk2?
Not a bad link, but I have to comment on the guys suggestion about changing the catalina.sh script. Here's a quote: "In my many years of consulting, I have learned not to rely on environment variables which can be unset by ignorant or malicious people" In my many years of consulting, I've much more often encountered problems with people tampering with script files that should have been left alone. Ever do an export JAVA_HOME= to explicitly pick a JVM and be stumped by a bug still happening . . . only to find out that someone took at upon themselves to change a script that you know well, and to manually set JAVA_HOME withing that script? This much more sinister than missing environment variables. If you're very afraid of environment variables not being there or being wrong, then make a script file that sets a few variables and then calls the original script. Or some variant of that. But just jumping in and altering the script is rarely the best idea. - T.B. --- "Cocalea, Eugen" <[EMAIL PROTECTED]> wrote: > Heh, seem that people around here knock on the same problems I had few days > ago. Best solution, found on: > > http://www.ubeans.com/tomcat/ __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you generate a unique number for each request across muliple tomcat instances?
One way to get around that: http://java.sun.com/j2se/1.4.2/docs/guide/idl/jidlFAQ.html#linuxior http://dast.nlanr.net/Projects/Beacon/guide_faq.html -Tim Tom Ly wrote: That works great in a windows environment. But on Linux machines,the line will always return 127.0.0.1 Tim Funk <[EMAIL PROTECTED]> wrote:Ideally use a string for uniqueness, not an int. For an int is too small across a cluster. To get a unique string, concatenate your IP address with java.rmi.server.UID(), for example: String guid = InetAddress.getLocalHost().getHostAddress() + (new java.rmi.server.UID()).toString()); See the javadocs on UID for more info. -Tim Tom Ly wrote: I have an application where I need to generate a unique int for each request that comes in. I've got about 8 Tomcat instances running spread across four machines(two tomcat's each machine). It's pretty simple with one Tomcat, but with mulitple Tomcats it gets tricky. I tried using InetAddress to get the ip address of the current machine and use that to set the range for each tomcat(since the ip address will always be unique), but since I'm using Linux, it'll always return 127.0.0.1 as the ip address, so I can use class InetAddress. Any advice on what to do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBC from TagSupport
Gotcha, so the datasource gets stuck into a naming directory, and then you can grab it via JNDI and use it that way. The benefit being that a sysadmin can change the datasource via server.xml rather than having you rewrite the code. Right? Justin -Original Message- From: Alan Czajkowski [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:37 PM To: Tomcat Users List Subject: RE: JDBC from TagSupport i have it setup for sybase and mine looks like this in the server.xml: - factory org.apache.commons.dbcp.BasicDataSourceFactory maxActive 10 maxIdle 5 maxWait 1 driverClassName com.sybase.jdbc2.jdbc.SybDriver url jdbc:sybase:Tds:database_hostname:5000/your_dbname?JCONNECT_VERSION=6 username your_userid password your_password - of course i also got a .jar file (jConnect 5.5) from sybase that i guess provides the "com.sybase.jdbc2.jdbc.SybDriver" and then in the JSP u have something like this to reference the context and setup the connection: - String s = "java:comp/env"; String t = "jdbc/a_sybase_datasource"; InitialContext initCtx = null; try { initCtx = new InitialContext(); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: initCtx = new InitialContext();"); out.println(e + " : " + e.getMessage()); out.println(""); } Context envCtx = null; try { envCtx = (Context)initCtx.lookup(s); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: envCtx = (Context)initCtx.lookup(" + s + ");"); out.println(e + " : " + e.getMessage()); out.println(""); } DataSource ds = null; try { ds = (DataSource)envCtx.lookup(t); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: ds = (DataSource)envCtx.lookup(" + t + ");"); out.println(e + " : " + e.getMessage()); out.println(""); } if(ds == null) { out.println(""); out.println(""); out.println("warning: DataSource is null"); out.println(""); } Connection conn; Statement stmt; ResultSet rs; // open connection object conn = ds.getConnection(); // open statement object stmt = conn.createStatement(); - Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - "Hart, Justin" <[EMAIL PROTECTED]> 16/12/2003 02:26 PM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:RE: JDBC from TagSupport Ok, so, how does one access this datasource from tagsupport? Justin -Original Message- From: Philipp Taprogge [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:24 PM To: Tomcat Users List Subject: Re: JDBC from TagSupport Hi! Hart, Justin wrote: > Quick question. I see that one can configure a JDBC datasource in their server.xml file and their web.xml file. > What does this get you? Every example that I have read tells me that I need to open a JDBC connection just about > the same as I would from any other java application. > > What is the purpose of setting up a JDBC datasource in these files? Is it only good for userdatabaserealm? The main advantage is that you can use a connection pool like jakarta-commons-dbcp which saves you a lot of runtime. The second advantage is that you can configure the connection parameters like db URL, username, password and the like on the fly without editing java sources or redeploying your application. Phil - 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: How do i run 2 tomcats on the same server and using jk2?
Which link?? - Original Message - From: "Cocalea, Eugen" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 9:33 PM Subject: RE: How do i run 2 tomcats on the same server and using jk2? > Well, then use the other link I've sent earlier too, the modifications you > have to do are only in workers.properties files, at least if you want to use > load balancing. > > -Original Message- > From: yuval [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 16, 2003 9:21 PM > To: Tomcat Users List > Subject: Re: How do i run 2 tomcats on the same server and using jk2? > > Thanks for your answer but I need explanation for windows with jk2 and not > apache, but thanks any way. > > > - Original Message - > From: "Cocalea, Eugen" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Tuesday, December 16, 2003 9:12 PM > Subject: RE: How do i run 2 tomcats on the same server and using jk2? > > > > Heh, seem that people around here knock on the same problems I had few > days > > ago. Best solution, found on: > > > > http://www.ubeans.com/tomcat/ > > > > > > -Original Message- > > From: yuval [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, December 16, 2003 8:57 PM > > To: Tomcat Users List > > Subject: How do i run 2 tomcats on the same server and using jk2? > > > > Hi, > > > > I installed 2 Tomcats on the same server and they both work on on port > 8080 > > and the second on 8081 > > I also define one to listen for the jk2 on 8009 and the second on 8010 but > > only the first one is working > > > > What do i need to do in the registry and in the IIS in order to make the > > second work also? > > > > > > Regards, > > > > Yuval > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBC from TagSupport
i have it setup for sybase and mine looks like this in the server.xml: - factory org.apache.commons.dbcp.BasicDataSourceFactory maxActive 10 maxIdle 5 maxWait 1 driverClassName com.sybase.jdbc2.jdbc.SybDriver url jdbc:sybase:Tds:database_hostname:5000/your_dbname?JCONNECT_VERSION=6 username your_userid password your_password - of course i also got a .jar file (jConnect 5.5) from sybase that i guess provides the "com.sybase.jdbc2.jdbc.SybDriver" and then in the JSP u have something like this to reference the context and setup the connection: - String s = "java:comp/env"; String t = "jdbc/a_sybase_datasource"; InitialContext initCtx = null; try { initCtx = new InitialContext(); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: initCtx = new InitialContext();"); out.println(e + " : " + e.getMessage()); out.println(""); } Context envCtx = null; try { envCtx = (Context)initCtx.lookup(s); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: envCtx = (Context)initCtx.lookup(" + s + ");"); out.println(e + " : " + e.getMessage()); out.println(""); } DataSource ds = null; try { ds = (DataSource)envCtx.lookup(t); } catch(Exception e) { out.println(""); out.println(""); out.println("failed: ds = (DataSource)envCtx.lookup(" + t + ");"); out.println(e + " : " + e.getMessage()); out.println(""); } if(ds == null) { out.println(""); out.println(""); out.println("warning: DataSource is null"); out.println(""); } Connection conn; Statement stmt; ResultSet rs; // open connection object conn = ds.getConnection(); // open statement object stmt = conn.createStatement(); - Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - "Hart, Justin" <[EMAIL PROTECTED]> 16/12/2003 02:26 PM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:RE: JDBC from TagSupport Ok, so, how does one access this datasource from tagsupport? Justin -Original Message- From: Philipp Taprogge [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:24 PM To: Tomcat Users List Subject: Re: JDBC from TagSupport Hi! Hart, Justin wrote: > Quick question. I see that one can configure a JDBC datasource in their server.xml file and their web.xml file. > What does this get you? Every example that I have read tells me that I need to open a JDBC connection just about > the same as I would from any other java application. > > What is the purpose of setting up a JDBC datasource in these files? Is it only good for userdatabaserealm? The main advantage is that you can use a connection pool like jakarta-commons-dbcp which saves you a lot of runtime. The second advantage is that you can configure the connection parameters like db URL, username, password and the like on the fly without editing java sources or redeploying your application. Phil - 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: Apache-Tomcat connectors... why??
I believe what you are referring to is the ProxyPass Directive http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypass I have used this before, but haven't played with it as a way to reference the app server. If it were that simple, I imagine it would have already been done. I am just getting going with the connectors, but things like parameters, servlets, and the like have their own needs which may require a closer integration with the webserver than can be provided by a simple reverse proxy setup. If all you need is the reverse proxy setup, then perhaps you don't even need the webserver. Just let tomcat serve it all, then all your connector worries are moot. Jim -Original Message- From: Wesley Hall [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 1:27 PM To: [EMAIL PROTECTED] Subject: Apache-Tomcat connectors... why?? Hello all, Hopefully I picked a good list to bring this topic up on. There were several candidates. I have spent some time today attempting to perform the non-trival task of configuring communication between the apache web server and the tomcat servlet engine. This seems to be a fairly complicated process involving quite a lot of configuration and some degree of black magic. It occured to me that a simpler approch would be to simply have apache forward requests at HTTP level to a list of slave servers in the form of "Cant find this resource!! Can you??". Before apache returns a 404 error it could consult some form of list and ask other servers on the network (tomcat for instance ;o)) to attempt to find the resource via HTTP. I dont see a reason why this would perform particually badly in the most common set up of apache + tomcat. Presumably there is a way to configure apache to do this already (if anyone could point me to the write manaual page I would be grateful), but it doesnt seem to be offered up a simple solution to a complex problem on the tomcat integration pages. My question... why is this solution not mentioned more often given the number of "how do i configure mod_jk2??" results on google and would their be any serious disadvantages with such an approch? Thanks Wesley Hall - 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: Apache-Tomcat connectors... why??
http://jakarta.apache.org/tomcat/faq/connectors.html In a nutshell, tomcat anc apache talk to each via the AJP protocol. The AJP protocol is like the HTTP protocol but more efficient for various reasons. An alternative to having apache talk to tomcat via AJP can also be mod_proxy sounds similar to your situation below. mod_jk and mod_jk2 are both modules written in C to be used by apache (or insert server here) jk2 is a rewrite of jk but for the same protocol. So the configuration of the jk vs jk2 is different. On the tomcat side, it really doesn't know that the apache instance is using mod_jk or mod_jk2. -Tim Wesley Hall wrote: Hello all, Hopefully I picked a good list to bring this topic up on. There were several candidates. I have spent some time today attempting to perform the non-trival task of configuring communication between the apache web server and the tomcat servlet engine. This seems to be a fairly complicated process involving quite a lot of configuration and some degree of black magic. It occured to me that a simpler approch would be to simply have apache forward requests at HTTP level to a list of slave servers in the form of "Cant find this resource!! Can you??". Before apache returns a 404 error it could consult some form of list and ask other servers on the network (tomcat for instance ;o)) to attempt to find the resource via HTTP. I dont see a reason why this would perform particually badly in the most common set up of apache + tomcat. Presumably there is a way to configure apache to do this already (if anyone could point me to the write manaual page I would be grateful), but it doesnt seem to be offered up a simple solution to a complex problem on the tomcat integration pages. My question... why is this solution not mentioned more often given the number of "how do i configure mod_jk2??" results on google and would their be any serious disadvantages with such an approch? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you generate a unique number for each request across muliple tomcat instances?
That works great in a windows environment. But on Linux machines,the line will always return 127.0.0.1 Tim Funk <[EMAIL PROTECTED]> wrote:Ideally use a string for uniqueness, not an int. For an int is too small across a cluster. To get a unique string, concatenate your IP address with java.rmi.server.UID(), for example: String guid = InetAddress.getLocalHost().getHostAddress() + (new java.rmi.server.UID()).toString()); See the javadocs on UID for more info. -Tim Tom Ly wrote: > I have an application where I need to generate a unique int for each request that > comes in. I've got about 8 Tomcat instances running spread across four machines(two > tomcat's each machine). It's pretty simple with one Tomcat, but with mulitple > Tomcats it gets tricky. I tried using InetAddress to get the ip address of the > current machine and use that to set the range for each tomcat(since the ip address > will always be unique), but since I'm using Linux, it'll always return 127.0.0.1 as > the ip address, so I can use class InetAddress. Any advice on what to do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
RE: How do i run 2 tomcats on the same server and using jk2?
Well, then use the other link I've sent earlier too, the modifications you have to do are only in workers.properties files, at least if you want to use load balancing. -Original Message- From: yuval [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 9:21 PM To: Tomcat Users List Subject: Re: How do i run 2 tomcats on the same server and using jk2? Thanks for your answer but I need explanation for windows with jk2 and not apache, but thanks any way. - Original Message - From: "Cocalea, Eugen" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 9:12 PM Subject: RE: How do i run 2 tomcats on the same server and using jk2? > Heh, seem that people around here knock on the same problems I had few days > ago. Best solution, found on: > > http://www.ubeans.com/tomcat/ > > > -Original Message- > From: yuval [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 16, 2003 8:57 PM > To: Tomcat Users List > Subject: How do i run 2 tomcats on the same server and using jk2? > > Hi, > > I installed 2 Tomcats on the same server and they both work on on port 8080 > and the second on 8081 > I also define one to listen for the jk2 on 8009 and the second on 8010 but > only the first one is working > > What do i need to do in the registry and in the IIS in order to make the > second work also? > > > Regards, > > Yuval > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploy failure with Tomcat 5.0.16 adding security constraints
Remy, Thanks... I can't believe how I haven't seen the error Jose Remy Maucherat wrote: jose wrote: Hi, I'm getting the following error log trying to install my webapp in tomcat 5.0.16. When I remove the security constraints section in web.xml the app install and runs ok, but when I restore de security section in web.xml I can't install the app. I have tested this issue on Tomcat 5.0.16 in windows and linux and on Tomcat 4.1.29. In my server.xml I'm using JDBCRealm auth method at Engine level. It's working fine with, for example, tomcat manager app and for others apps I'm running. The app uses jakarta struts 1.1 and some other taglibs (like request, dbtime and session) You need something like: BASIC in you login-config. The error could be a *lot* better (we should check for null, basically). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache-Tomcat connectors... why??
Hello all, Hopefully I picked a good list to bring this topic up on. There were several candidates. I have spent some time today attempting to perform the non-trival task of configuring communication between the apache web server and the tomcat servlet engine. This seems to be a fairly complicated process involving quite a lot of configuration and some degree of black magic. It occured to me that a simpler approch would be to simply have apache forward requests at HTTP level to a list of slave servers in the form of "Cant find this resource!! Can you??". Before apache returns a 404 error it could consult some form of list and ask other servers on the network (tomcat for instance ;o)) to attempt to find the resource via HTTP. I dont see a reason why this would perform particually badly in the most common set up of apache + tomcat. Presumably there is a way to configure apache to do this already (if anyone could point me to the write manaual page I would be grateful), but it doesnt seem to be offered up a simple solution to a complex problem on the tomcat integration pages. My question... why is this solution not mentioned more often given the number of "how do i configure mod_jk2??" results on google and would their be any serious disadvantages with such an approch? Thanks Wesley Hall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JDBC from TagSupport
Ok, so, how does one access this datasource from tagsupport? Justin -Original Message- From: Philipp Taprogge [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:24 PM To: Tomcat Users List Subject: Re: JDBC from TagSupport Hi! Hart, Justin wrote: > Quick question. I see that one can configure a JDBC datasource in their server.xml > file and their web.xml file. > What does this get you? Every example that I have read tells me that I need to open a JDBC connection just about > the same as I would from any other java application. > > What is the purpose of setting up a JDBC datasource in these files? Is it only good > for userdatabaserealm? The main advantage is that you can use a connection pool like jakarta-commons-dbcp which saves you a lot of runtime. The second advantage is that you can configure the connection parameters like db URL, username, password and the like on the fly without editing java sources or redeploying your application. Phil - 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: JDBC from TagSupport
Hi! Hart, Justin wrote: Quick question. I see that one can configure a JDBC datasource in their server.xml file and their web.xml file. > What does this get you? Every example that I have read tells me that I need to open a JDBC connection just about the same as I would from any other java application. What is the purpose of setting up a JDBC datasource in these files? Is it only good for userdatabaserealm? The main advantage is that you can use a connection pool like jakarta-commons-dbcp which saves you a lot of runtime. The second advantage is that you can configure the connection parameters like db URL, username, password and the like on the fly without editing java sources or redeploying your application. Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I generate a unique number for each request across muliple tomcat instances?
I have a web application where I need to generate a unique id(of type int) for each request. I've got 8 tomcats running across 4 machines, 2 tomcats each machine. It's pretty simple to generate a unique id with one tomcat, but with mulitple tomcats, it gets pretty tricky. I tried to use java class InetAddress to get the ip address of the machine and use that to set the range for the numbers, but since I'm using Linux it'll always return 127.0.0.1 as the ip address. Any advice on what to do? - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
Re: How do i run 2 tomcats on the same server and using jk2?
I did the worker configuration the problem is in the JK2 configuration - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 8:55 PM Subject: RE: How do i run 2 tomcats on the same server and using jk2? You also need to edit your worker.properties file... worker.list=tomcatWorker worker.tomcatWorker.port=8009 worker.tomcatWorker.host=172.20.94.244 worker.tomcatWorker.type=ajp13 Russ -Original Message- From: yuval [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 1:57 PM To: Tomcat Users List Subject: How do i run 2 tomcats on the same server and using jk2? Hi, I installed 2 Tomcats on the same server and they both work on on port 8080 and the second on 8081 I also define one to listen for the jk2 on 8009 and the second on 8010 but only the first one is working What do i need to do in the registry and in the IIS in order to make the second work also? Regards, Yuval - 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: How do i run 2 tomcats on the same server and using jk2?
Thanks for your answer but I need explanation for windows with jk2 and not apache, but thanks any way. - Original Message - From: "Cocalea, Eugen" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 9:12 PM Subject: RE: How do i run 2 tomcats on the same server and using jk2? > Heh, seem that people around here knock on the same problems I had few days > ago. Best solution, found on: > > http://www.ubeans.com/tomcat/ > > > -Original Message- > From: yuval [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 16, 2003 8:57 PM > To: Tomcat Users List > Subject: How do i run 2 tomcats on the same server and using jk2? > > Hi, > > I installed 2 Tomcats on the same server and they both work on on port 8080 > and the second on 8081 > I also define one to listen for the jk2 on 8009 and the second on 8010 but > only the first one is working > > What do i need to do in the registry and in the IIS in order to make the > second work also? > > > Regards, > > Yuval > > > - > 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: redirecting based on role name
Yoav, Thanks, I did not know whether there was anything I could put in the web.xml file under the security-constraint for some sort of redirect for the role. Chad On Tue, 2003-12-16 at 13:19, Shapira, Yoav wrote: > Howdy, > You can write a simple filter that uses request.isUserInRole to control > the redirect. I think I wrote a rule for the balancer webapp (tomcat 5) > that does just that. > > Yoav Shapira > Millennium ChemInformatics > > > >-Original Message- > >From: chad kellerman [mailto:[EMAIL PROTECTED] > >Sent: Tuesday, December 16, 2003 12:51 PM > >To: Tomcat Users List > >Subject: redirecting based on role name > > > >hello everyone, > > > >I have a site that uses form authentication thru JDBCRealm. I have > >my webapp root as /ROOT/ with 3 directories. I have also set up the > >web.xml file with 3 different security constraints based on the 3 > >directories in /ROOT/. > > > >My questions is, can I redirect a successful login to a specified > >directory based on the role_name I assigned the user in the mysql > >database? > > > > For example, if I have configured bob with the role_name of > >admin. Can I redirect his url to /ROOT/ADMIN by retrieving his > >role_name? > > > > Can any one point me in the right direction? Any help would be > >appreciated. > > > >Thanks, > >Chad > > > > > > > >- > >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]
Re: Tomcat performance on Windows versus Linux
I am about to setup Tomcat under a new Linux 2.6 kernel with 2 Athlon MP processors. Since scheduling, threading, and SMP have been much improved in the new kernel I wonder if it will add to performance. I don't have anything to test the new setup with, but if anyone has good ideas (and by good, I mean "easy"), as I haven't done any profiling, etc. Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Mon, 15 Dec 2003, Sean Dockery wrote: > Thanks, Tim, for the even handed response. > > I'm not looking for a business case to choose one or the other, however; it > is certain that our customers will be deploying our application on both > Linux and Windows (and even Solaris). I'm just looking to find out whether > or not OS service (TCP/IP stacks, threads, file I/O, etc...) implementation > differences between Linux and Windows have a significant impact on > performance and thus should be weighed accordingly. > > I received a response in email from Peter Lin in which he details his > experience (which was very helpful; thank you, Peter). I've read Peter's > article about performance tuning and a few other white papers as well, but I > haven't really seen anything in the past that focused on OS differences and > how those differences might affect the recommended approach to profiling and > tuning. > > My conclusions from my readings so far: Slow java code (i.e.: algorithms) > will be slow on any platform; change the implementation to make it faster. > Configurable behaviour dependent upon OS services (TCP/IP stacks, threads, > file I/O, etc...) should be tuned for the platform on which the application > will live. > > PS: I was sad to learn that the Tomcat Performance Handbook publishing date > would be postponed. I would be thrilled if either you or Peter could tell > me that the book will see a printer's press anytime soon. > > PPS: Is there a wiki for this stuff anywhere? > > "Tim Funk" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > [I hate saying this since its rather very much like flambait but...] > > > > If its worth anything, I haven't had enough load on any of our apps to > know > > whether Linux or Windows is better. Instead, look at: > > *** - Maintenance - If your a windows shop - stay windows *** > > - Debugging - I think troubleshooting is easier on *nix systems (YMMV) > > - Comfort - If your comfortable with unix concepts - linux might be easier > > than windows > > > > -Tim > > > > Sean Dockery wrote: > > > > > I am planning to profile a web application on Windows XP (my development > > > platform). I am curious as to whether or not different components in > Tomcat > > > and the JVM will behave differently (in a relative comparison) on Linux > > > (production platform) than Windows. > > > > > > For example, I have had a person tell me that threads under Linux are > more > > > performant than threads under Windows--leading to the corollary that web > > > applications under Linux are more performant than web applications under > > > Windows on the same hardware. My guess is that this claim is based upon > the > > > supposition that thread/context switches under Linux are faster than > under > > > Windows. I find the claim rather dubious because I've never seen data > to > > > support the claim, but doubt is not certainty. > > > > > > Is there any evidence that this claim and other component performance > > > differences between the Windows and Linux platform exist and are > significant > > > enough to throw my performance measurements out the "window". :-) > > > > > > My concern is that I'll profile the application under Windows and tune > it, > > > but then find that my gains aren't as significant or maybe even > worthless > > > under Linux. > > > > > - > 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 do you generate a unique number for each request across muliple tomcat instances?
Ideally use a string for uniqueness, not an int. For an int is too small across a cluster. To get a unique string, concatenate your IP address with java.rmi.server.UID(), for example: String guid = InetAddress.getLocalHost().getHostAddress() + (new java.rmi.server.UID()).toString()); See the javadocs on UID for more info. -Tim Tom Ly wrote: I have an application where I need to generate a unique int for each request that comes in. I've got about 8 Tomcat instances running spread across four machines(two tomcat's each machine). It's pretty simple with one Tomcat, but with mulitple Tomcats it gets tricky. I tried using InetAddress to get the ip address of the current machine and use that to set the range for each tomcat(since the ip address will always be unique), but since I'm using Linux, it'll always return 127.0.0.1 as the ip address, so I can use class InetAddress. Any advice on what to do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 Clustering
download a load balancer balance.sourceforge.net or a perl balancer called "pen" (google) the shut down one tomcat, after initial access, the system will fail over. pulling the network cable without any other failure has not yet been handled as a failure scenario Filip - Original Message - From: "Pitre, Russell" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 10:37 AM Subject: Tomcat 5 Clustering Hello All: Please excuse my ignorance, I'm trying to achieve clustering with Tomcat 5I've read the following in the Tomcat 5 documentation: = To run session replication in your Tomcat 5 container, the following steps should be completed: -->All your session attributes must implement java.io.Serializable === Okay. I've completed all the other steps (uncomment the element along with the , and added the in web.xml)I'm trying to code a simple object that implements java.io.Serializable to store in a session and here it is. package com.shawmut.session; import java.io.Serializable; public class SerializeSession implements Serializable { public static String testString = ""; public void setString(String stringValue){ this.testString = stringValue; } public String getString(){ return this.testString; } } ok.Now I want to put this in the session. <% if(session.getAttribute("ss")== null){ SerializeSession ss = new SerializeSession(); ss.setString("Booo! And I created my session on Tomcat 1 Node"); session.setAttribute("ss", ss); } %> Whats going on here?.I unplug the patch cord ( docs says it's a bad idea) from one of the boxes and hit a jsp on the working node that does the following..and the session doesn't carry over to the working node <% if(session.getAttribute("ss")!= null){ SerializeSession ss2 = (SerializeSession)session.getAttribute("ss"); %> SESSION:<%=ss2.getString()%> <% } %> Basically what I'm looking for is an example of serializing session attributes as noted above Any Help here will be greatly appreciated.. Russ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do i run 2 tomcats on the same server and using jk2?
Heh, seem that people around here knock on the same problems I had few days ago. Best solution, found on: http://www.ubeans.com/tomcat/ -Original Message- From: yuval [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 8:57 PM To: Tomcat Users List Subject: How do i run 2 tomcats on the same server and using jk2? Hi, I installed 2 Tomcats on the same server and they both work on on port 8080 and the second on 8081 I also define one to listen for the jk2 on 8009 and the second on 8010 but only the first one is working What do i need to do in the registry and in the IIS in order to make the second work also? Regards, Yuval - 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]
JDBC from TagSupport
Quick question. I see that one can configure a JDBC datasource in their server.xml file and their web.xml file. What does this get you? Every example that I have read tells me that I need to open a JDBC connection just about the same as I would from any other java application. What is the purpose of setting up a JDBC datasource in these files? Is it only good for userdatabaserealm? Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IIS port 80 vs Tomcat port 8080.
You might get a million versions of this answer. Here's one. JK is what you want: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html You'll get an ISAPI DLL that forwards requests, using the AJP protocol (NOT http), to a special service running on Tomcat on port 8009 (this is the default). This is a bit of a nuisance for Windows, since you have to enter registry keys. But the instructions are pretty good and it's not hard. Just make sure to read about Workers, and watch the syntax on your workers.properties. Good luck, The Bean --- charles doweary <[EMAIL PROTECTED]> wrote: > I have Tomcat running on port 8080 and I've deployed my > website successfully to my Tomcat webapps folder. I also > did an Ant List to confirm that my website is running. > > If I set up this website in MicroSoft Internet Information > Service (IIS) to use port 80, how is the request coming > in on port 80 going to find the website running in Tomcat > on port 8080? Or will the reqest coming in on my HTTP port 80 > find my website running in Tomcat on port 8080? > > Am I missing something! If I set IIS to use port 8080, I get a > "The process cannot access the file because it is being used by > another process" error message. Apparently, IIS and Tomcat > cannot both be running on port 8080. > > What is the standard for setting website port numbers in conjunction > with Tomcat running on port 8080? Is there a standard? > If not, is the website port number set up in Tomcat in one of the > XML files? Should the server.xml or mywebsite.xml file include > an entry that identifies the port number that IIS is using for each > website? > > Thanks for your assistance. > > _ > Tired of slow downloads and busy signals? Get a high-speed Internet > connection! Comparison-shop your local high-speed providers here. > https://broadband.msn.com > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: IIS port 80 vs Tomcat port 8080.
Best and fastest way: read this http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html HTH E. -Original Message- From: charles doweary [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 9:03 PM To: [EMAIL PROTECTED] Subject: IIS port 80 vs Tomcat port 8080. I have Tomcat running on port 8080 and I've deployed my website successfully to my Tomcat webapps folder. I also did an Ant List to confirm that my website is running. If I set up this website in MicroSoft Internet Information Service (IIS) to use port 80, how is the request coming in on port 80 going to find the website running in Tomcat on port 8080? Or will the reqest coming in on my HTTP port 80 find my website running in Tomcat on port 8080? Am I missing something! If I set IIS to use port 8080, I get a "The process cannot access the file because it is being used by another process" error message. Apparently, IIS and Tomcat cannot both be running on port 8080. What is the standard for setting website port numbers in conjunction with Tomcat running on port 8080? Is there a standard? If not, is the website port number set up in Tomcat in one of the XML files? Should the server.xml or mywebsite.xml file include an entry that identifies the port number that IIS is using for each website? Thanks for your assistance. _ Tired of slow downloads and busy signals? Get a high-speed Internet connection! Comparison-shop your local high-speed providers here. https://broadband.msn.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]
IIS port 80 vs Tomcat port 8080.
I have Tomcat running on port 8080 and I've deployed my website successfully to my Tomcat webapps folder. I also did an Ant List to confirm that my website is running. If I set up this website in MicroSoft Internet Information Service (IIS) to use port 80, how is the request coming in on port 80 going to find the website running in Tomcat on port 8080? Or will the reqest coming in on my HTTP port 80 find my website running in Tomcat on port 8080? Am I missing something! If I set IIS to use port 8080, I get a "The process cannot access the file because it is being used by another process" error message. Apparently, IIS and Tomcat cannot both be running on port 8080. What is the standard for setting website port numbers in conjunction with Tomcat running on port 8080? Is there a standard? If not, is the website port number set up in Tomcat in one of the XML files? Should the server.xml or mywebsite.xml file include an entry that identifies the port number that IIS is using for each website? Thanks for your assistance. _ Tired of slow downloads and busy signals? Get a high-speed Internet connection! Comparison-shop your local high-speed providers here. https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do i run 2 tomcats on the same server and using jk2?
You also need to edit your worker.properties file... worker.list=tomcatWorker worker.tomcatWorker.port=8009 worker.tomcatWorker.host=172.20.94.244 worker.tomcatWorker.type=ajp13 Russ -Original Message- From: yuval [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 1:57 PM To: Tomcat Users List Subject: How do i run 2 tomcats on the same server and using jk2? Hi, I installed 2 Tomcats on the same server and they both work on on port 8080 and the second on 8081 I also define one to listen for the jk2 on 8009 and the second on 8010 but only the first one is working What do i need to do in the registry and in the IIS in order to make the second work also? Regards, Yuval - 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]
How do i run 2 tomcats on the same server and using jk2?
Hi, I installed 2 Tomcats on the same server and they both work on on port 8080 and the second on 8081 I also define one to listen for the jk2 on 8009 and the second on 8010 but only the first one is working What do i need to do in the registry and in the IIS in order to make the second work also? Regards, Yuval - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CGI not working on Tomcat 5.0.16?
Jon, Just slightly off topic, have you gotten cgi to do more or less what you wanted with Tomcat? I can't get it working very well in Tomcat 4.1 and am wondering if it's just me. I can get one page to work but when it calls anohter cgi page I run into problems. Ken -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 1:04 PM To: Tomcat Users List Subject: Re: CGI not working on Tomcat 5.0.16? Tomcat supports CGI natively. I'm using Tomcat in standalone mode. Jon - Original Message - From: "Edson Alves Pereira" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 6:59 AM Subject: RE: CGI not working on Tomcat 5.0.16? Just a question, CGI isn´t a Apache server matter? > -- > De: Jonathan Eric Miller[SMTP:[EMAIL PROTECTED] > Responder: Tomcat Users List > Enviada: segunda-feira, 15 de dezembro de 2003 20:52 > Para: Tomcat Users List > Assunto: Re: CGI not working on Tomcat 5.0.16? > > Do you have the same error that I do in your log? As far as I can tell > this > is a bug in Tomcat. > > Jon > > - Original Message - > From: "Lawrence, Gabriel" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Monday, December 15, 2003 4:58 PM > Subject: RE: CGI not working on Tomcat 5.0.16? > > > > I've noticed that on tomcat 5 the working directory that it execs the > > cgi script in is different then it was on tomcat 4. I haven't solved my > > problem yet, but I have isolated that to be my problem. > > > > -gabe > > > > -Original Message- > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] > > Sent: Monday, December 15, 2003 2:42 PM > > To: Tomcat User List > > Subject: CGI not working on Tomcat 5.0.16? > > > > > > I've been having problems getting CGI to work with Tomcat 5.0.16. I have > > it working with Tomcat 4.1. Has anyone else been able to get it to work? > > > > I'm receiving the following error in my localhost_log*.txt log even > > though the file listed is there. Has anyone else had this problem? > > > > 2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open > > perl script > > ""/opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl"": > > No such file or directory > > 2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on > > stderr > > > > Jon > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do you generate a unique number for each request across muliple tomcat instances?
Howdy, Can you use the local host name + the current time? Or something in that vein... Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Tom Ly [mailto:[EMAIL PROTECTED] >Sent: Tuesday, December 16, 2003 1:29 PM >To: [EMAIL PROTECTED] >Subject: How do you generate a unique number for each request across >muliple tomcat instances? > >I have an application where I need to generate a unique int for each >request that comes in. I've got about 8 Tomcat instances running spread >across four machines(two tomcat's each machine). It's pretty simple with >one Tomcat, but with mulitple Tomcats it gets tricky. I tried using >InetAddress to get the ip address of the current machine and use that to >set the range for each tomcat(since the ip address will always be unique), >but since I'm using Linux, it'll always return 127.0.0.1 as the ip address, >so I can use class InetAddress. Any advice on what to do? > > >- >Do you Yahoo!? >Protect your identity with Yahoo! Mail AddressGuard 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]
Vhosting with Apache 2 & jk
Hi all, I have several domains hosted by Apache 2.0.48, and I'd like to start adding JSPs to each domain. I have Tomcat 4.0.16 running on a different host, and am using JK to connect them. Virtual hosting is working on Tomcat, if I go straight to the Tomcat host on port 8080. JK does appear to be forwarding requests over to Tomcat. The problem is, the requests always go to the default domain on Tomcat (webapps/ROOT). It's almost as though the file portion of the URL is getting forwarded to Tomcat, but not the domain. My worker properties is pretty much the sample -- I've included it below. I've also included the lines from my VirtualHost block for the offending domain. Any thoughts? - Bean ... workers.properties # Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=66.139.244.188 worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=300 ... from httpd.conf ServerName www.mydomain.local ServerAdmin [EMAIL PROTECTED] DocumentRoot "/usr/local/www/data/www.mydomain.local" ErrorLog /var/log/apache2/www.mydomain.local/error.log ErrorLog /var/log/apache2/www.mydomain.local/access.log common DirectoryIndex index.html JkMount /main/*.html worker1 JkMount /main/*.jsp worker1 (The URL I want to go to is htyp://www.mydomain.local/main, since 'main' is the name of my webapp under Tomcat) __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 Clustering
Hello All: Please excuse my ignorance, I'm trying to achieve clustering with Tomcat 5I've read the following in the Tomcat 5 documentation: = To run session replication in your Tomcat 5 container, the following steps should be completed: -->All your session attributes must implement java.io.Serializable === Okay. I've completed all the other steps (uncomment the element along with the , and added the in web.xml)I'm trying to code a simple object that implements java.io.Serializable to store in a session and here it is. package com.shawmut.session; import java.io.Serializable; public class SerializeSession implements Serializable { public static String testString = ""; public void setString(String stringValue){ this.testString = stringValue; } public String getString(){ return this.testString; } } ok.Now I want to put this in the session. <% if(session.getAttribute("ss")== null){ SerializeSession ss = new SerializeSession(); ss.setString("Booo! And I created my session on Tomcat 1 Node"); session.setAttribute("ss", ss); } %> Whats going on here?.I unplug the patch cord ( docs says it's a bad idea) from one of the boxes and hit a jsp on the working node that does the following..and the session doesn't carry over to the working node <% if(session.getAttribute("ss")!= null){ SerializeSession ss2 = (SerializeSession)session.getAttribute("ss"); %> SESSION:<%=ss2.getString()%> <% } %> Basically what I'm looking for is an example of serializing session attributes as noted above Any Help here will be greatly appreciated.. Russ
How do you generate a unique number for each request across muliple tomcat instances?
I have an application where I need to generate a unique int for each request that comes in. I've got about 8 Tomcat instances running spread across four machines(two tomcat's each machine). It's pretty simple with one Tomcat, but with mulitple Tomcats it gets tricky. I tried using InetAddress to get the ip address of the current machine and use that to set the range for each tomcat(since the ip address will always be unique), but since I'm using Linux, it'll always return 127.0.0.1 as the ip address, so I can use class InetAddress. Any advice on what to do? - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
RE: redirecting based on role name
Howdy, You can write a simple filter that uses request.isUserInRole to control the redirect. I think I wrote a rule for the balancer webapp (tomcat 5) that does just that. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: chad kellerman [mailto:[EMAIL PROTECTED] >Sent: Tuesday, December 16, 2003 12:51 PM >To: Tomcat Users List >Subject: redirecting based on role name > >hello everyone, > >I have a site that uses form authentication thru JDBCRealm. I have >my webapp root as /ROOT/ with 3 directories. I have also set up the >web.xml file with 3 different security constraints based on the 3 >directories in /ROOT/. > >My questions is, can I redirect a successful login to a specified >directory based on the role_name I assigned the user in the mysql >database? > > For example, if I have configured bob with the role_name of >admin. Can I redirect his url to /ROOT/ADMIN by retrieving his >role_name? > > Can any one point me in the right direction? Any help would be >appreciated. > >Thanks, >Chad > > > >- >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: Deploy failure with Tomcat 5.0.16 adding security constraints
jose wrote: Hi, I'm getting the following error log trying to install my webapp in tomcat 5.0.16. When I remove the security constraints section in web.xml the app install and runs ok, but when I restore de security section in web.xml I can't install the app. I have tested this issue on Tomcat 5.0.16 in windows and linux and on Tomcat 4.1.29. In my server.xml I'm using JDBCRealm auth method at Engine level. It's working fine with, for example, tomcat manager app and for others apps I'm running. The app uses jakarta struts 1.1 and some other taglibs (like request, dbtime and session) You need something like: BASIC in you login-config. The error could be a *lot* better (we should check for null, basically). -- x Rémy Maucherat Senior Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CGI not working on Tomcat 5.0.16?
Tomcat supports CGI natively. I'm using Tomcat in standalone mode. Jon - Original Message - From: "Edson Alves Pereira" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 6:59 AM Subject: RE: CGI not working on Tomcat 5.0.16? Just a question, CGI isn´t a Apache server matter? > -- > De: Jonathan Eric Miller[SMTP:[EMAIL PROTECTED] > Responder: Tomcat Users List > Enviada: segunda-feira, 15 de dezembro de 2003 20:52 > Para: Tomcat Users List > Assunto: Re: CGI not working on Tomcat 5.0.16? > > Do you have the same error that I do in your log? As far as I can tell > this > is a bug in Tomcat. > > Jon > > - Original Message - > From: "Lawrence, Gabriel" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Monday, December 15, 2003 4:58 PM > Subject: RE: CGI not working on Tomcat 5.0.16? > > > > I've noticed that on tomcat 5 the working directory that it execs the > > cgi script in is different then it was on tomcat 4. I haven't solved my > > problem yet, but I have isolated that to be my problem. > > > > -gabe > > > > -Original Message- > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] > > Sent: Monday, December 15, 2003 2:42 PM > > To: Tomcat User List > > Subject: CGI not working on Tomcat 5.0.16? > > > > > > I've been having problems getting CGI to work with Tomcat 5.0.16. I have > > it working with Tomcat 4.1. Has anyone else been able to get it to work? > > > > I'm receiving the following error in my localhost_log*.txt log even > > though the file listed is there. Has anyone else had this problem? > > > > 2003-12-12 16:46:14 StandardContext[]cgi: runCGI (stderr):Can't open > > perl script > > ""/opt/jakarta-tomcat-5.0.16/webapps/ROOT/WEB-INF/cgi/awstats.pl"": > > No such file or directory > > 2003-12-12 16:46:14 StandardContext[]cgi: runCGI: 1 lines received on > > stderr > > > > Jon > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
redirecting based on role name
hello everyone, I have a site that uses form authentication thru JDBCRealm. I have my webapp root as /ROOT/ with 3 directories. I have also set up the web.xml file with 3 different security constraints based on the 3 directories in /ROOT/. My questions is, can I redirect a successful login to a specified directory based on the role_name I assigned the user in the mysql database? For example, if I have configured bob with the role_name of admin. Can I redirect his url to /ROOT/ADMIN by retrieving his role_name? Can any one point me in the right direction? Any help would be appreciated. Thanks, Chad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exception loading sessions from persistent storage
Yes you are... Tomcat supplies the needed j2ee resources. When you declare your vPar class, just make sure that you specify that it implements Serializable: public class vPar implements java.io.Serializable{ If you have any nested classes do the same for them. On Wednesday 17 December 2003 12:22 pm, L.Karam wrote: > I'm not using j2ee plataform. There is any problem ? > - Original Message - > From: Ben Souther > To: Tomcat Users List > Sent: Tuesday, December 16, 2003 3:10 PM > Subject: Re: Exception loading sessions from persistent storage > > > If you store an object in session, make sure it implements > java.io.Serializable > > On Wednesday 17 December 2003 12:03 pm, L.Karam wrote: > > how i do this ? > > > > I'm using : javax.servlet.http.HttpSession; > > > > session.setAttribute("parametros", vPar); > > - Original Message - > > From: Shapira, Yoav > > To: Tomcat Users List > > Sent: Tuesday, December 16, 2003 2:25 PM > > Subject: RE: Exception loading sessions from persistent storage > > > > > > > > Howdy, > > Don't use non-Serializable session attributes. > > > > Yoav Shapira > > Millennium ChemInformatics > > > > >-Original Message- > > >From: L.Karam [mailto:[EMAIL PROTECTED] > > >Sent: Wednesday, December 17, 2003 11:19 AM > > >To: Tomcat Users List > > >Subject: Exception loading sessions from persistent storage > > > > > >Can anyone tell me what this error means, and what I need to > > > fix. (Tomcat 4.1.24) > > > > > > > > >Exception loading sessions from persistent storage > > >java.io.WriteAbortedException: writing aborted; > > >java.io.NotSerializableException: servlet.beanParametro > > > > > > > > >Thanks! > > > > > >Leandro Karam Quintas > > >Desenvolvedor WEB > > >EBS Sistemas > > >www.ebs.com.br > > > > > > > > > > > >- 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] > > -- > Ben Souther > F.W. Davison & Company, Inc. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison & Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using jdk... message box
Eugen - I worked on this same issue some time ago. I ended up just documenting (in the installation instructions) to click 'OK' when that dialog comes up. To my knowledge, there is no way around it. Even moving to a newer version of Tomcat will not work - because the newer 5.x versions wont even install in Silent Mode (or at least that's been my experience). They just halt with a dialog saying that they cant find the JVM (on the same setup that a 4.x version will silent install in). Eden -Original Message- From: Cocalea, Eugen [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 10:33 AM To: [EMAIL PROTECTED] Subject: Using jdk... message box Hello, I am trying to use the installer for tomcat 4.1.12 for windows from another windows program. It works well in silent mode, but the only thing is that I get that message box that says that Tomcat will use 'jdk that was found in...', which seems to be the point where the installer stalls until I click ok. This is a bit annoying, do you know any method that I can get rid of that message box? Thanks. EC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exception loading sessions from persistent storage
I'm not using j2ee plataform. There is any problem ? - Original Message - From: Ben Souther To: Tomcat Users List Sent: Tuesday, December 16, 2003 3:10 PM Subject: Re: Exception loading sessions from persistent storage If you store an object in session, make sure it implements java.io.Serializable On Wednesday 17 December 2003 12:03 pm, L.Karam wrote: > how i do this ? > > I'm using : javax.servlet.http.HttpSession; > > session.setAttribute("parametros", vPar); > - Original Message - > From: Shapira, Yoav > To: Tomcat Users List > Sent: Tuesday, December 16, 2003 2:25 PM > Subject: RE: Exception loading sessions from persistent storage > > > > Howdy, > Don't use non-Serializable session attributes. > > Yoav Shapira > Millennium ChemInformatics > > >-Original Message- > >From: L.Karam [mailto:[EMAIL PROTECTED] > >Sent: Wednesday, December 17, 2003 11:19 AM > >To: Tomcat Users List > >Subject: Exception loading sessions from persistent storage > > > >Can anyone tell me what this error means, and what I need to fix. > >(Tomcat 4.1.24) > > > > > >Exception loading sessions from persistent storage > >java.io.WriteAbortedException: writing aborted; > >java.io.NotSerializableException: servlet.beanParametro > > > > > >Thanks! > > > >Leandro Karam Quintas > >Desenvolvedor WEB > >EBS Sistemas > >www.ebs.com.br > > > > > >- > >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] -- Ben Souther F.W. Davison & Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat4.1.29 Requested resource not available
I did add the to the $Tomcat_Home/conf/server.xml It still could not find my test dir Should I reinstall it from RPM maybe... Should I create index.html or something of this sort in one of the directories? Thanks N.K. -Original Message- From: BAO RuiXian [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 4:32 PM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Tomcat4.1.29 Requested resource not available Nadia Kunkov wrote: >Well, there is nothing in the log, just starting/stopping Tomcat stuff... >I can run any example in the /examples dir without a problem. >I'm running as root, I'm logged in as root (I know it's bad, I have my reasons for it >now) so I should have permissions to my test dir. >I did login to manager as tomcat, could that be a problem? How do I log out? Should >I add root to tomcat_users.xml and make it a manager? >Thanks > > Have you tried to add a ... block for 'test' application, just like 'example' has in the $TOMCAT-HOME/conf/server.conf file? You may try that taking the 'example' block as a template for modification. Best Bao >-Original Message- >From: Ben Souther [mailto:[EMAIL PROTECTED] >Sent: Thursday, December 11, 2003 12:38 PM >To: Tomcat Users List >Subject: Re: Tomcat4.1.29 Requested resource not available > > > >A few things to check. > >1.) Take a look at the Tomcat logfiles in TOMCAT_HOME/logs >Always start there. > >2.) Make sure Tomcat can find the javac compiler. >Do you have a full j2sdk installed or just a JRE? >Tomcat will run with a JRE but won't be able to >compile your JSPs without access to javac. >If not, go to http://java.sun.com and get a full j2sdk. > >Is your JAVA_HOME evironment variable set? > Type: echo $JAVA_HOME at the shell to verify. > It should point to the root directory of your j2sdk. > Example: /usr/local/j2sdk1.4.2 > >Is your JAVA_HOME evironment variable PROPERLY set? > Type: $JAVA_HOME/bin/javac at the shell. > If you get a "Command not found" message, it's not. > >Another way to make sure that Tomcat can see your javac compiler >is to run (not just look at, but run) the JSP examples that ship with >Tomcat. > >3.) Check the permissions of the directories and files that you've created >and make sure that that whatever user that is running Tomcat has >permission to access those files. > >Let us know what you find. > >-Ben > > > > > > > > > > >On Thursday 11 December 2003 12:29 pm, you wrote: > > >>Did that. Same message: The requested rsource not available. >>Something else is wrong... >>Thanks. >> >>-Original Message- >>From: Ben Souther [mailto:[EMAIL PROTECTED] >>Sent: Thursday, December 11, 2003 11:29 AM >>To: Tomcat Users List >>Subject: Re: Tomcat4.1.29 Requested resource not available >> >> >>You don't need to run the install and you don't need a web.xml file. >> >>Create a directory under webapps (test) and create a WEB-INF directory in >>it. >> >>Put a JSP in the test directory (test.jsp). The following will do: >><%="Hello World"%> >> >>Restart Tomcat. >> >>Point to http://localhost:8080/test/test.jsp with your browser. >> >>On Thursday 11 December 2003 11:26 am, you wrote: >> >> >>>Thanks. I did http://localhost:8080/manager/install?war=test and got the >>>error: "Access to the specified resource has been denied/forbidden". >>>What does that mean? In $Tomcat_Home/conf/tomcat_users.xml I have this: >>> (I'm >>>not logged in to the machine as Tomcat but I thin it has nothing to do >>>with it, right?) When I try to to http://localhost:8080/manager/list I >>>get the same error... Can you give me any idea on what is going on? >>>Thanks >>>N.K. >>> >>>-Original Message- >>>From: BAO RuiXian [mailto:[EMAIL PROTECTED] >>>Sent: Thursday, December 11, 2003 10:50 AM >>>To: Tomcat Users List >>>Subject: Re: Tomcat4.1.29 Requested resource not available >>> >>>Nadia Kunkov wrote: >>> >>> Hi, I've just installed Tomcat4.1.29 and it's my first time configuring it from the scratch. I'm able to go to http://localhost:8080/examples or http://localhost:8080/tomcat-docs/index.html. But I have also created a new directory under $Tomcat_home/webapps called test. Under that I created WEB-INF and copied one of my old web.xml files over >> - 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: Exception loading sessions from persistent storage
If you store an object in session, make sure it implements java.io.Serializable On Wednesday 17 December 2003 12:03 pm, L.Karam wrote: > how i do this ? > > I'm using : javax.servlet.http.HttpSession; > > session.setAttribute("parametros", vPar); > - Original Message - > From: Shapira, Yoav > To: Tomcat Users List > Sent: Tuesday, December 16, 2003 2:25 PM > Subject: RE: Exception loading sessions from persistent storage > > > > Howdy, > Don't use non-Serializable session attributes. > > Yoav Shapira > Millennium ChemInformatics > > >-Original Message- > >From: L.Karam [mailto:[EMAIL PROTECTED] > >Sent: Wednesday, December 17, 2003 11:19 AM > >To: Tomcat Users List > >Subject: Exception loading sessions from persistent storage > > > >Can anyone tell me what this error means, and what I need to fix. > >(Tomcat 4.1.24) > > > > > >Exception loading sessions from persistent storage > >java.io.WriteAbortedException: writing aborted; > >java.io.NotSerializableException: servlet.beanParametro > > > > > >Thanks! > > > >Leandro Karam Quintas > >Desenvolvedor WEB > >EBS Sistemas > >www.ebs.com.br > > > > > >- > >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] -- Ben Souther F.W. Davison & Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exception loading sessions from persistent storage
how i do this ? I'm using : javax.servlet.http.HttpSession; session.setAttribute("parametros", vPar); - Original Message - From: Shapira, Yoav To: Tomcat Users List Sent: Tuesday, December 16, 2003 2:25 PM Subject: RE: Exception loading sessions from persistent storage Howdy, Don't use non-Serializable session attributes. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: L.Karam [mailto:[EMAIL PROTECTED] >Sent: Wednesday, December 17, 2003 11:19 AM >To: Tomcat Users List >Subject: Exception loading sessions from persistent storage > >Can anyone tell me what this error means, and what I need to fix. >(Tomcat 4.1.24) > > >Exception loading sessions from persistent storage >java.io.WriteAbortedException: writing aborted; >java.io.NotSerializableException: servlet.beanParametro > > >Thanks! > >Leandro Karam Quintas >Desenvolvedor WEB >EBS Sistemas >www.ebs.com.br > > >- >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]
localhost works, www does not; why?
This may have been asked many times before, but I can't find it, in part because I don't quite know what to search for and in part because it may not even be a Tomcat-specific issue. But it occurs because I'm trying to make Tomcat work, so here goes... (if I'm wrong and the question needs to be redirected, I'm sure someone will politely point it out to me :) I have Apache 1.3.27 and Tomcat 4.1.27 running under Red Hat 9.0 Linux. The two webservers are connected by mod_jk. When I go to http://localhost from the browser on the Linux box, I get Apache's index page. http://localhost:8080 gets me Tomcat's index page. And http://localhost/examples gets me the Tomcat examples directory listing with an Apache port 80 slug at the bottom. When I drill down to the examples themselves, they work. So I know the Apache->mod_jK->Tomcat connection is correctly configured. But when I try it from the live web, using my domain name, I cannot get to the Tomcat pages. http://www.katzenjammer.us gets me my website. http://www.katzenjammer.us:8080 gets me Tomcat's index page, and, again, I am able to drill down into the examples themselves and they work. But http://www.katzenjammer.us/examples and http://www.katzenjammer.us/examples/jsp/index.jsp get me 404 page not found errors. My webserver sits behind a Netgear firewall router, which has been configured to allow ports 80, 8080, and 8009 to get through to the webserver. Can somebody tell me what I"m doing wrong? Thanks. Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat performance on Windows versus Linux
"David Rees" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Not enough difference to make it a deciding factor between the two > platforms. IMO, Tim's criteria are spot on when deciding what platform to > deploy on. Personally, I prefer Unix as I find it easier to setup and > administer. Of course, the majority of my experience with Tomcat is on > Unix, and not on Windows. That's fine. I never disagreed with Tim's reasons to choose one platform over another. But, as I have already responded, I am not choosing a platform on which to deploy my application; so, arguments as to which platform is better are moot. > If you haven't looked already, have a look at the Volano benchmarks > (google for it) for some numbers on the scalability and performance of > different JVM, but note that those numbers won't necessarily reflect the > performance of YOUR application running on Tomcat. Thanks for this tidbit. It is still very early in the process, but scalability of JVMs is definitely of interest to me. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Precompile webapp
Howdy, Don't hijack other threads -- start your own. And in it, provide more information about what's failing. If you just say "it doesn't work" we can't help. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: Felipe Ramos [mailto:[EMAIL PROTECTED] >Sent: Tuesday, December 16, 2003 11:30 AM >To: Tomcat Users List >Subject: Precompile webapp > >I have webapp in a directory c:/myWeb and the tomcat in c:/tomcat .In >the conf/catalina/localhost I have a xml pointing to my web. > >Now I have to precompile my web¿what must I do? The ant task in >this link: >http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html >doesn.t work for me. > > > >Alan Czajkowski wrote: > >>i'm not too sure on the full support of IFRAMEs on both Netscape and IE >>but if they have standardized IFRAMEs by now then by all means use it, >>it's a great way to communicate with the server while not disturbing the >>user and it's an even cleaner way then creating frame tags and trying to >>hide an actual frame >> >> >>Thanks, >> >>Alan Czajkowski >>- >>Database Administrator >>BMO Financial Group >>Decision Support Services >>3300 Bloor Street West >>14th Floor, West Tower >>Toronto, Ontario, M8X 2X2 >>Tel: 416.232.8736 >>- >> >> >> >> >>Ben Souther <[EMAIL PROTECTED]> >>16/12/2003 11:17 AM >>Please respond to "Tomcat Users List" >> >> >>To: "Tomcat Users List" <[EMAIL PROTECTED]> >>cc: >>Subject:Re: Having problems with stored PrintWriter. >> >>On Tuesday 16 December 2003 11:11 am, [EMAIL PROTECTED] wrote: >> >> >>>I like the idea of this additional hidden frame. >>>Is there any pointers to where I could start to look at some code for >>>hidden frames as I have never had the pleasure to create them? >>> >>> >> >>Do Google search on IFRAME. They can be hidden easily in a div who's >>style:visibility is set to hidden and comunication with the parent page, >>is >>easy. (window.parent.methodName) >> >> >> >> >>>URL("http://localhost:8080/servlets- >examples/servlet/lbp.LBPServlet?Receive >>>dEvent=tester2"); >>> >>> >> 2 HttpURLConnection urlConnection = >> >> >>>(HttpURLConnection)myUrl.openConnection(); >>>Will this code get to the doget() method of my servlet or do i have to >>>include something additional to get into the servlet doget(). or >>> >>> >>dopost()? >> >>This will get routed to the doGet Method automatically. >> >>-Good luck >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> >> > >-- > >Felipe Ramos >Tissat SA >C/ Orense 34-9ª >28020 Madrid >Tel: (+34) 91 4175913 >Fax: (+34) 91 4172914 >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]
Precompile webapp
I have webapp in a directory c:/myWeb and the tomcat in c:/tomcat .In the conf/catalina/localhost I have a xml pointing to my web. Now I have to precompile my web¿what must I do? The ant task in this link: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html doesn.t work for me. Alan Czajkowski wrote: i'm not too sure on the full support of IFRAMEs on both Netscape and IE but if they have standardized IFRAMEs by now then by all means use it, it's a great way to communicate with the server while not disturbing the user and it's an even cleaner way then creating frame tags and trying to hide an actual frame Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - Ben Souther <[EMAIL PROTECTED]> 16/12/2003 11:17 AM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:Re: Having problems with stored PrintWriter. On Tuesday 16 December 2003 11:11 am, [EMAIL PROTECTED] wrote: I like the idea of this additional hidden frame. Is there any pointers to where I could start to look at some code for hidden frames as I have never had the pleasure to create them? Do Google search on IFRAME. They can be hidden easily in a div who's style:visibility is set to hidden and comunication with the parent page, is easy. (window.parent.methodName) URL("http://localhost:8080/servlets-examples/servlet/lbp.LBPServlet?Receive dEvent=tester2"); 2 HttpURLConnection urlConnection = (HttpURLConnection)myUrl.openConnection(); Will this code get to the doget() method of my servlet or do i have to include something additional to get into the servlet doget(). or dopost()? This will get routed to the doGet Method automatically. -Good luck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Felipe Ramos Tissat SA C/ Orense 34-9ª 28020 Madrid Tel: (+34) 91 4175913 Fax: (+34) 91 4172914 Mail: [EMAIL PROTECTED]
RE: Exception loading sessions from persistent storage
Howdy, Don't use non-Serializable session attributes. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: L.Karam [mailto:[EMAIL PROTECTED] >Sent: Wednesday, December 17, 2003 11:19 AM >To: Tomcat Users List >Subject: Exception loading sessions from persistent storage > >Can anyone tell me what this error means, and what I need to fix. >(Tomcat 4.1.24) > > >Exception loading sessions from persistent storage >java.io.WriteAbortedException: writing aborted; >java.io.NotSerializableException: servlet.beanParametro > > >Thanks! > >Leandro Karam Quintas >Desenvolvedor WEB >EBS Sistemas >www.ebs.com.br > > >- >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: Having problems with stored PrintWriter.
i'm not too sure on the full support of IFRAMEs on both Netscape and IE but if they have standardized IFRAMEs by now then by all means use it, it's a great way to communicate with the server while not disturbing the user and it's an even cleaner way then creating frame tags and trying to hide an actual frame Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - Ben Souther <[EMAIL PROTECTED]> 16/12/2003 11:17 AM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:Re: Having problems with stored PrintWriter. On Tuesday 16 December 2003 11:11 am, [EMAIL PROTECTED] wrote: > I like the idea of this additional hidden frame. > Is there any pointers to where I could start to look at some code for > hidden frames as I have never had the pleasure to create them? Do Google search on IFRAME. They can be hidden easily in a div who's style:visibility is set to hidden and comunication with the parent page, is easy. (window.parent.methodName) > URL("http://localhost:8080/servlets-examples/servlet/lbp.LBPServlet?Receive >dEvent=tester2"); 2 HttpURLConnection urlConnection = > (HttpURLConnection)myUrl.openConnection(); > Will this code get to the doget() method of my servlet or do i have to > include something additional to get into the servlet doget(). or dopost()? This will get routed to the doGet Method automatically. -Good luck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exception loading sessions from persistent storage
Can anyone tell me what this error means, and what I need to fix. (Tomcat 4.1.24) Exception loading sessions from persistent storage java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: servlet.beanParametro Thanks! Leandro Karam Quintas Desenvolvedor WEB EBS Sistemas www.ebs.com.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Having problems with stored PrintWriter.
i went to google and searched for: hidden frames and this is the first page i found, http://www.15seconds.com/issue/991230.htm , which i found pretty good for an intro into using hidden frames, read it and then go back to google if u need more info, if u want more help on the javascript in the hidden frame controlling the visible frame then dont hesitate to ask Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - <[EMAIL PROTECTED]> 16/12/2003 11:11 AM Please respond to "Tomcat Users List" To: <[EMAIL PROTECTED]> cc: Subject:RE: Having problems with stored PrintWriter. I like the idea of this additional hidden frame. Is there any pointers to where I could start to look at some code for hidden frames as I have never had the pleasure to create them? I suppose they would need to be able to communicate with each other aswell. must be able i suppose. Ok Ill go have a look at this. Cheeers for all your prompt help. Del. Since you guys dealt with this with such ease im stuck on another topic. last one honestly. On another hand im trying to call the servlet. Im using this code 1 URL myUrl = new URL("http://localhost:8080/servlets-examples/servlet/lbp.LBPServlet?ReceivedEvent=tester2";); 2 HttpURLConnection urlConnection = (HttpURLConnection)myUrl.openConnection(); Will this code get to the doget() method of my servlet or do i have to include something additional to get into the servlet doget(). or dopost()? Using this for event stimulus but doesnt seem to be working just now. -Original Message- From: Alan Czajkowski [mailto:[EMAIL PROTECTED] Sent: Tue 16/12/2003 15:50 To: Tomcat Users List Cc: Subject: RE: Having problems with stored PrintWriter. very true, if u try to make the browser hang on for too long then eventually something will timeout (either on the client side or server side) so as many here have suggested the best way is to refresh with javascript or a meta-refresh but ... an even nicer solution is to create a hidden frame that has ur javascript/meta-refresh code, in this hidden frame u can have all ur logic that checks the server and can instruct the visible frame to refresh only when it has to Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - "Shapira, Yoav" <[EMAIL PROTECTED]> 16/12/2003 10:41 AM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:RE: Having problems with stored PrintWriter. Howdy, >Im trying to create a servlet that is able to push back to the browser >rather than just operate a a pull mechanism. > > >To create this, there is a piece of javascript embedded within the html >outputted to the browser, so when additional javascript code is written in >at a later stage calling that function, that user can be notified of events >he is registered to. You can have the JavaScript reload the page from your servlet, i.e. giving the servlet a new request. This is a common solution. >Perhaps not the way servlets were made to work but anyway! That's a big "but anyway" -- probably too big. >Unless you are able to come up with a better solution? Depends what your design goal is. A web server pushing stuff onto clients? Not my cup of tea, as you observed that's now how the web works. Clients requests, servlets (as their name implies) and more generally web servers (as their name also implies) serve. >How do i stop the response from ending then? I have left the html open at >the end so no /html code and I have not closed the output to the
Re: Having problems with stored PrintWriter.
On Tuesday 16 December 2003 11:11 am, [EMAIL PROTECTED] wrote: > I like the idea of this additional hidden frame. > Is there any pointers to where I could start to look at some code for > hidden frames as I have never had the pleasure to create them? Do Google search on IFRAME. They can be hidden easily in a div who's style:visibility is set to hidden and comunication with the parent page, is easy. (window.parent.methodName) > URL("http://localhost:8080/servlets-examples/servlet/lbp.LBPServlet?Receive >dEvent=tester2"); 2 HttpURLConnection urlConnection = > (HttpURLConnection)myUrl.openConnection(); > Will this code get to the doget() method of my servlet or do i have to > include something additional to get into the servlet doget(). or dopost()? This will get routed to the doGet Method automatically. -Good luck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Having problems with stored PrintWriter.
I like the idea of this additional hidden frame. Is there any pointers to where I could start to look at some code for hidden frames as I have never had the pleasure to create them? I suppose they would need to be able to communicate with each other aswell. must be able i suppose. Ok Ill go have a look at this. Cheeers for all your prompt help. Del. Since you guys dealt with this with such ease im stuck on another topic. last one honestly. On another hand im trying to call the servlet. Im using this code 1 URL myUrl = new URL("http://localhost:8080/servlets-examples/servlet/lbp.LBPServlet?ReceivedEvent=tester2";); 2 HttpURLConnection urlConnection = (HttpURLConnection)myUrl.openConnection(); Will this code get to the doget() method of my servlet or do i have to include something additional to get into the servlet doget(). or dopost()? Using this for event stimulus but doesnt seem to be working just now. -Original Message- From: Alan Czajkowski [mailto:[EMAIL PROTECTED] Sent: Tue 16/12/2003 15:50 To: Tomcat Users List Cc: Subject: RE: Having problems with stored PrintWriter. very true, if u try to make the browser hang on for too long then eventually something will timeout (either on the client side or server side) so as many here have suggested the best way is to refresh with javascript or a meta-refresh but ... an even nicer solution is to create a hidden frame that has ur javascript/meta-refresh code, in this hidden frame u can have all ur logic that checks the server and can instruct the visible frame to refresh only when it has to Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - "Shapira, Yoav" <[EMAIL PROTECTED]> 16/12/2003 10:41 AM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:RE: Having problems with stored PrintWriter. Howdy, >Im trying to create a servlet that is able to push back to the browser >rather than just operate a a pull mechanism. > > >To create this, there is a piece of javascript embedded within the html >outputted to the browser, so when additional javascript code is written in >at a later stage calling that function, that user can be notified of events >he is registered to. You can have the JavaScript reload the page from your servlet, i.e. giving the servlet a new request. This is a common solution. >Perhaps not the way servlets were made to work but anyway! That's a big "but anyway" -- probably too big. >Unless you are able to come up with a better solution? Depends what your design goal is. A web server pushing stuff onto clients? Not my cup of tea, as you observed that's now how the web works. Clients requests, servlets (as their name implies) and more generally web servers (as their name also implies) serve. >How do i stop the response from ending then? I have left the html open at >the end so no /html code and I have not closed the output to the browser. Eventually, something will time out. The browser, the server, your firewall, many things can and will terminate the connection. Yoav Shapira 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]
RE: Having problems with stored PrintWriter.
very true, if u try to make the browser hang on for too long then eventually something will timeout (either on the client side or server side) so as many here have suggested the best way is to refresh with javascript or a meta-refresh but ... an even nicer solution is to create a hidden frame that has ur javascript/meta-refresh code, in this hidden frame u can have all ur logic that checks the server and can instruct the visible frame to refresh only when it has to Thanks, Alan Czajkowski - Database Administrator BMO Financial Group Decision Support Services 3300 Bloor Street West 14th Floor, West Tower Toronto, Ontario, M8X 2X2 Tel: 416.232.8736 - "Shapira, Yoav" <[EMAIL PROTECTED]> 16/12/2003 10:41 AM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Subject:RE: Having problems with stored PrintWriter. Howdy, >Im trying to create a servlet that is able to push back to the browser >rather than just operate a a pull mechanism. > > >To create this, there is a piece of javascript embedded within the html >outputted to the browser, so when additional javascript code is written in >at a later stage calling that function, that user can be notified of events >he is registered to. You can have the JavaScript reload the page from your servlet, i.e. giving the servlet a new request. This is a common solution. >Perhaps not the way servlets were made to work but anyway! That's a big "but anyway" -- probably too big. >Unless you are able to come up with a better solution? Depends what your design goal is. A web server pushing stuff onto clients? Not my cup of tea, as you observed that's now how the web works. Clients requests, servlets (as their name implies) and more generally web servers (as their name also implies) serve. >How do i stop the response from ending then? I have left the html open at >the end so no /html code and I have not closed the output to the browser. Eventually, something will time out. The browser, the server, your firewall, many things can and will terminate the connection. Yoav Shapira 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: Having problems with stored PrintWriter.
Howdy, >Im trying to create a servlet that is able to push back to the browser >rather than just operate a a pull mechanism. > > >To create this, there is a piece of javascript embedded within the html >outputted to the browser, so when additional javascript code is written in >at a later stage calling that function, that user can be notified of events >he is registered to. You can have the JavaScript reload the page from your servlet, i.e. giving the servlet a new request. This is a common solution. >Perhaps not the way servlets were made to work but anyway! That's a big "but anyway" -- probably too big. >Unless you are able to come up with a better solution? Depends what your design goal is. A web server pushing stuff onto clients? Not my cup of tea, as you observed that's now how the web works. Clients requests, servlets (as their name implies) and more generally web servers (as their name also implies) serve. >How do i stop the response from ending then? I have left the html open at >the end so no /html code and I have not closed the output to the browser. Eventually, something will time out. The browser, the server, your firewall, many things can and will terminate the connection. Yoav Shapira 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: Having problems with stored PrintWriter.
HTTP is a stateless environment. You have no way of hanging on to the browser connection from the server. Usually, if a user has to wait more than a few seconds for a response from the server you would forward them to a page that refreshes itself every n seconds via a META-REFRESH tag. Each time it refreshes, it checks the status on the server. On Tuesday 16 December 2003 10:32 am, [EMAIL PROTECTED] wrote: > Im trying to create a servlet that is able to push back to the browser > rather than just operate a a pull mechanism. > To create this, there is a piece of javascript embedded within the html > outputted to the browser, so when additional javascript code is written in > at a later stage calling that function, that user can be notified of events > he is registered to. > Perhaps not the way servlets were made to work but anyway! > Unless you are able to come up with a better solution? > > How do i stop the response from ending then? I have left the html open at > the end so no /html code and I have not closed the output to the browser. > -Original Message- > From: Ben Souther [mailto:[EMAIL PROTECTED] > Sent: Tue 16/12/2003 15:32 > To: Tomcat Users List > Cc: > Subject: Re: Having problems with stored PrintWriter. > > > > > > I am trying to store users PrintWriter and use them again at a later > > date > > Just out of curiosity, why? > > > > > On Tuesday 16 December 2003 10:12 am, [EMAIL PROTECTED] wrote: > > > Im having a problem with PrintWriter in a servlet. > > > > I am trying to store users PrintWriter and use them again at a later > > date to output javascript commands to the browsers at a later date. it > > store as a coyotewriter - [EMAIL PROTECTED] > > To do this they are dumped in a hashtable. But they dont seem to work > > when i try to write output with them? Is there any way around this?? > > this is the error I get but only when i include the flush() line. > > > > If anybody can help it would be most appreciated > > > > To write out to users browser - retrieves from hashtable > > > > System.out.println("Is this even working: Receivedevent!!! > > "+useroutputstream); PrintWriter usersout = > > (PrintWriter)useroutputstream.get("derrick"); usersout.println("Testing > > received event status"+receivedevent); > > usersout.print(""); > > usersout.print("receivedEvent('your dinner is ready');"); > > usersout.print(""); > > //extraline > > usersout.flush(); -> Exception: > > lbp.LBPServlet.doGet(LBPServlet.java:98) > > > > I dont know if this is also part of the problem but if i use the > > .flush(), it seems to start throwing exceptions. > > > > java.lang.NullPointerException > > org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuffe > >r.j ava:547) > > org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:735 > >) org.apache.coyote.Response.action(Response.java:223) > > org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuff > >er. java:518) org.apache.coyote.Response.doWrite(Response.java:532) > > org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java: > >392 ) > > org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439) > > org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:350) > > org.apache.coyote.tomcat5.CoyoteWriter.flush(CoyoteWriter.java:119) > > lbp.LBPServlet.doGet(LBPServlet.java:98) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:743) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet. > >jav a:466) > > org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:18 > >0) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > filters.ExampleFilter.doFilter(ExampleFilter.java:149) > > filters.ExampleFilter.doFilter(ExampleFilter.java:149) > > > -- > Ben Souther > F.W. Davison & Company, Inc. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- Ben Souther F.W. Davison & Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Having problems with stored PrintWriter.
Im trying to create a servlet that is able to push back to the browser rather than just operate a a pull mechanism. To create this, there is a piece of javascript embedded within the html outputted to the browser, so when additional javascript code is written in at a later stage calling that function, that user can be notified of events he is registered to. Perhaps not the way servlets were made to work but anyway! Unless you are able to come up with a better solution? How do i stop the response from ending then? I have left the html open at the end so no /html code and I have not closed the output to the browser. -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Tue 16/12/2003 15:32 To: Tomcat Users List Cc: Subject: Re: Having problems with stored PrintWriter. > I am trying to store users PrintWriter and use them again at a later date Just out of curiosity, why? On Tuesday 16 December 2003 10:12 am, [EMAIL PROTECTED] wrote: > Im having a problem with PrintWriter in a servlet. > > I am trying to store users PrintWriter and use them again at a later date > to output javascript commands to the browsers at a later date. it store as > a coyotewriter - [EMAIL PROTECTED] > > To do this they are dumped in a hashtable. But they dont seem to work when > i try to write output with them? Is there any way around this?? > > this is the error I get but only when i include the flush() line. > > If anybody can help it would be most appreciated > > To write out to users browser - retrieves from hashtable > > System.out.println("Is this even working: Receivedevent!!! > "+useroutputstream); PrintWriter usersout = > (PrintWriter)useroutputstream.get("derrick"); usersout.println("Testing > received event status"+receivedevent); > usersout.print(""); > usersout.print("receivedEvent('your dinner is ready');"); > usersout.print(""); > //extraline > usersout.flush(); -> Exception: > lbp.LBPServlet.doGet(LBPServlet.java:98) > > I dont know if this is also part of the problem but if i use the .flush(), > it seems to start throwing exceptions. > > java.lang.NullPointerException > org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuffer.j >ava:547) > org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:735) > org.apache.coyote.Response.action(Response.java:223) > org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer. >java:518) org.apache.coyote.Response.doWrite(Response.java:532) > org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:392 >) org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439) > org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:350) > org.apache.coyote.tomcat5.CoyoteWriter.flush(CoyoteWriter.java:119) > lbp.LBPServlet.doGet(LBPServlet.java:98) > javax.servlet.http.HttpServlet.service(HttpServlet.java:743) > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.jav >a:466) > org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180) > javax.servlet.http.HttpServlet.service(HttpServlet.java:743) > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > filters.ExampleFilter.doFilter(ExampleFilter.java:149) > filters.ExampleFilter.doFilter(ExampleFilter.java:149) -- Ben Souther F.W. Davison & Company, Inc. - 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]
Using jdk... message box
Hello, I am trying to use the installer for tomcat 4.1.12 for windows from another windows program. It works well in silent mode, but the only thing is that I get that message box that says that Tomcat will use 'jdk that was found in...', which seems to be the point where the installer stalls until I click ok. This is a bit annoying, do you know any method that I can get rid of that message box? Thanks. EC
REPOST: /devices/pseudo/mm@0:null
While using Tomcat, I have often encountered a problem (a java.net.SocketException) with "Too many open files". I understand that to combat this, I need to up the limit on file descriptors in my Solaris 8 system (ulimit command). The system went from 256 -> 1024 descriptors, but I still get the error, and in listing the open files, I will see "/devices/pseudo/[EMAIL PROTECTED]:null" as being used by my Tomcat process - over and over and over. I take it the Tomcat process is writing to "null"? Is it supposed to do that - or so much of it? Or does this indicate a problem somewhere? Thanks! -- Lynn Hollerman. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Having problems with stored PrintWriter.
> I am trying to store users PrintWriter and use them again at a later date Just out of curiosity, why? On Tuesday 16 December 2003 10:12 am, [EMAIL PROTECTED] wrote: > Im having a problem with PrintWriter in a servlet. > > I am trying to store users PrintWriter and use them again at a later date > to output javascript commands to the browsers at a later date. it store as > a coyotewriter - [EMAIL PROTECTED] > > To do this they are dumped in a hashtable. But they dont seem to work when > i try to write output with them? Is there any way around this?? > > this is the error I get but only when i include the flush() line. > > If anybody can help it would be most appreciated > > To write out to users browser - retrieves from hashtable > > System.out.println("Is this even working: Receivedevent!!! > "+useroutputstream); PrintWriter usersout = > (PrintWriter)useroutputstream.get("derrick"); usersout.println("Testing > received event status"+receivedevent); > usersout.print(""); > usersout.print("receivedEvent('your dinner is ready');"); > usersout.print(""); > //extraline > usersout.flush(); -> Exception: > lbp.LBPServlet.doGet(LBPServlet.java:98) > > I dont know if this is also part of the problem but if i use the .flush(), > it seems to start throwing exceptions. > > java.lang.NullPointerException > org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuffer.j >ava:547) > org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:735) > org.apache.coyote.Response.action(Response.java:223) > org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer. >java:518) org.apache.coyote.Response.doWrite(Response.java:532) > org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:392 >) org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439) > org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:350) > org.apache.coyote.tomcat5.CoyoteWriter.flush(CoyoteWriter.java:119) > lbp.LBPServlet.doGet(LBPServlet.java:98) > javax.servlet.http.HttpServlet.service(HttpServlet.java:743) > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.jav >a:466) > org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180) > javax.servlet.http.HttpServlet.service(HttpServlet.java:743) > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > filters.ExampleFilter.doFilter(ExampleFilter.java:149) > filters.ExampleFilter.doFilter(ExampleFilter.java:149) -- Ben Souther F.W. Davison & Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Having problems with stored PrintWriter.
Howdy, Your design is flawed. The writer (whatever it's type is -- certainly don't use a tomcat-specific type) is invalid after the response is done. Don't store it, don't try to reuse it. What happens in practice is that the server closes the underlying writer when the response is sent to the browser and that's why you're getting the NPE. What are you trying to do by saving the writer? Yoav Shapira Millennium ChemInformatics >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Tuesday, December 16, 2003 10:12 AM >To: [EMAIL PROTECTED] >Subject: Having problems with stored PrintWriter. > >Im having a problem with PrintWriter in a servlet. > >I am trying to store users PrintWriter and use them again at a later date >to output javascript commands to the browsers at a later date. it store as >a coyotewriter - [EMAIL PROTECTED] > >To do this they are dumped in a hashtable. But they dont seem to work when >i try to write output with them? Is there any way around this?? > >this is the error I get but only when i include the flush() line. > >If anybody can help it would be most appreciated > >To write out to users browser - retrieves from hashtable > >System.out.println("Is this even working: Receivedevent!!! >"+useroutputstream); >PrintWriter usersout = (PrintWriter)useroutputstream.get("derrick"); >usersout.println("Testing received event status"+receivedevent); >usersout.print(""); >usersout.print("receivedEvent('your dinner is ready');"); >usersout.print(""); >//extraline >usersout.flush(); -> Exception: >lbp.LBPServlet.doGet(LBPServlet.java:98) > >I dont know if this is also part of the problem but if i use the .flush(), >it seems to start throwing exceptions. > >java.lang.NullPointerException >org.apache.coyote.http11.InternalOutputBuffer.commit(InternalOutputBuff er.j >ava:547) >org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:73 5) >org.apache.coyote.Response.action(Response.java:223) >org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuf fer. >java:518) >org.apache.coyote.Response.doWrite(Response.java:532) >org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java :392 >) >org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439) >org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:350) >org.apache.coyote.tomcat5.CoyoteWriter.flush(CoyoteWriter.java:119) >lbp.LBPServlet.doGet(LBPServlet.java:98) >javax.servlet.http.HttpServlet.service(HttpServlet.java:743) >javax.servlet.http.HttpServlet.service(HttpServlet.java:856) >org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet .jav >a:466) >org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:1 80) >javax.servlet.http.HttpServlet.service(HttpServlet.java:743) >javax.servlet.http.HttpServlet.service(HttpServlet.java:856) >filters.ExampleFilter.doFilter(ExampleFilter.java:149) >filters.ExampleFilter.doFilter(ExampleFilter.java:149) 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]
general security question about public / private keys
Is it possible to configure tomcat to use public / private key pairs that implement the java.security API for authentication a la ssh? I assume it is but haven't found out how yet. I'm using SSL at the moment but I need to implement a higher security environment in the same shape and form as ssh essentially. Just using public & private keys. Does this require an applet for the browsers? I'm currently ploughing through what I can find on the web and haven't got that far yet. Thanks Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]