Problem with IIS 6 and jakarta-tomcat isapi_redirect.dll file.
Hi!! I have a strange behavior on my windows 2003 server between IIS 6.0 and Tomcat, i have added the isapi redirector to IIS and set up the virtual folder, the isapi filter, allowed the isapi_redirect.dll in Web Service Extensions and added .jsp as an mapping under Applications but the only thing i get is a save page popup when trying to reach the files through IIS but it works in the Jakarta built in http-server. I have tried with both the latest v4 and v5 of Jakarta, the 1.x isapi redirect file and the latest isapi redirect v2 file same result. And i have put IIS in isolation mode to as told. Below is my worker files. workers.properties: workers.tomcat_home=e:\web_progs\tomcat workers.java_home=e:\web_progs\java ps=\ worker.list=ajp13 worker.ajp13.host=localhost worker.ajp13.port=8009 worker.ajp13.type=ajp13 worker.ajp13.local_worker=1 worker.ajp13.lbfactor=1 worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(p s)jvm.dll uriworkermap.properties: /*.jsp=ajp13 What can be the trouble i have heard people getting it to work and showing me their how-to:s but they don't work for me? Thanks in advance Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need some Tomcat Configuration help badly
Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: RE: web administration tool and tomcat-users.xml
the encoding in tomcat-users.xml should be handled correctly by the xml parser, no? Once the umlauts are converted into java strings they should again be no problem. I will try to debug that... The problem with deleting users is getting worse. One of our customers says editing the xml file and rebooting tomcat is unacceptable for him. We would have to switch to another application server if there is no working GUI. The switch does not fit into our customer's IT environment, so the project is in danger to fail. So, ANY HELP with that point is highly apreciated. Thanks Eckard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache-Tomcat connectors... why??
If your application is using the HTTPSession, then you will want apache to stick you to the same instance of tomcat on the backend for all requests for that session. mod_jk and mod_jk2 both support this. Forgive me if I am wrong, but I dont think mod_proxy will do this for you. -sean -Original Message- From: Wesley Hall [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 12:54 PM To: Tomcat Users List Subject: 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:
URGENT PLEASE HELP ME........................................
I could able to run servlets in tomcat 4.1. I created a folder called webdev in webapps in that i created WEB-INF and classes. I stored web.xml in WEB-INF. as follows. webapps/webdev/WEB-INF/classes WEB-INF/web.xml I configured web.xml with servletname,servletclass between webapps tags. After restarting the server when i say http://localhost:8080/webdev/servlet/myservletfile It showing 404 Requested URI not found. I tried like the below also http://localhost:8080/webdev/myservletfile But still it is not getting. Let me tell anybody that tomcat4.1 have any bug in reading web.xml - Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing
RE: How do i run 2 tomcats on the same server and using jk2?
Well, From what you said it seems that you were able to setup IIS to work with only one Tomcat, either the other one is present or not. From the link I've sent you, you only have to look at the way workers.properties is made. You have to make two workers, let's say tomcat1 and tomcat2 and another one, the loadbalancer. Then, make IIS forward everything to the loadbalancer. For this, in you uriworkermap.properties, define something like this: /test/*=loadbalancer and in your workers.properties ps=/ worker.list=tomcat1, tomcat2, loadbalancer worker.tomcat1.port=8009 worker.tomcat1.host=localhost worker.tomcat1.type=ajp13 worker.tomcat1.lbfactor=100 worker.tomcat2.port=8010 worker.tomcat2.host=localhost worker.tomcat2.type=ajp13 worker.tomcat2.lbfactor=100 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=tomcat1, tomcat2 If in your $CATALINA_HOME\conf\server.xml you have a context with a path of /test, all requests coming to http://localhost/path/whatever will go to one of the tomcats. I can't tell you which one in which order, but they will. The only test that I did (and it worked) is the one they suggested, with the index page colored red and blue, and after starting several browsers pretty fast, I got both red and blue pages. So, it works in the way they suggest there. The link again: http://www.ubeans.com/tomcat/ E. -Original Message- From: yuval [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 9:50 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat and Log4J
Hi Kent! Our test environment it is exactly the same Tomcat 4.1.25/W2k, log4j 1.2.8 but we use the old-fashionate way to initialize log4j in a servlet'S init() and setup the web.xml to load-on-startup one. And everything is working fine ... for almost an year. Hope it's useful, Lucian. 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: ?xml version=1.0? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration debug=false xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=custom class=org.apache.log4j.DailyRollingFileAppender param name=File value=${CATALINA_HOME}/logs/custom.log/ param name=DatePattern value='.'-MM-dd/ layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%c] %m%n/ /layout /appender root level value=debug/ appender-ref ref=custom/ /root /log4j:configuration 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
Tomcat-Apache Security
Good morning. I'm new in Tomcat-Apache administration and I just created a production environment, but I need some guidelines to give securtity to my web applications. Can anyone give me some url's where I can find information about it? Thank you very much.
RE: URGENT PLEASE HELP ME........................................
Try reading the documentation. The default invoker is disabled in 4.1.x. Either re-enable it, or create servlet/servlet mapping pairs in the web.xml file. -Original Message- From: Pinguti Sridevi [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 1:22 AM To: anand; javagroup; parvez; tomcat Subject: URGENT PLEASE HELP ME I could able to run servlets in tomcat 4.1. I created a folder called webdev in webapps in that i created WEB-INF and classes. I stored web.xml in WEB-INF. as follows. webapps/webdev/WEB-INF/classes WEB-INF/web.xml I configured web.xml with servletname,servletclass between webapps tags. After restarting the server when i say http://localhost:8080/webdev/servlet/myservletfile It showing 404 Requested URI not found. I tried like the below also http://localhost:8080/webdev/myservletfile But still it is not getting. Let me tell anybody that tomcat4.1 have any bug in reading web.xml - Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
localize web.xml
Hi, In my project I use getServletContextName to get me the description of the webapp specified in web.xml. However, is there a way to maintain localized descriptions? It seems it only allows me to set on entry so if I present that to my Italian users, it won't make a lot of sense. Thanks, Jason - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: localhost works, www does not; why?
On 12/16/2003 05:55 PMnbsp;jford wrote: 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 Im doing wrong? There is another thread on this subject called url changing to localhost where the poster mentioned something about Apache's ProxyPass setting. No idea what it is myself, but it might help :) 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]
Re: localize web.xml
On 12/17/2003 11:15 AMnbsp;Jason Novotny wrote: Hi, In my project I use getServletContextName to get me the description of the webapp specified in web.xml. However, is there a way to maintain localized descriptions? It seems it only allows me to set on entry so if I present that to my Italian users, it won't make a lot of sense. Jason, you could put the resource key in the web.xml and then use it to get the localized string from the resource bundle. 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]
RE: URGENT PLEASE HELP ME........................................
Pinguti Can you post the xml code here or somewhere on the web where we can have a look at it. I have not had any problems with Tomcat and web.xml. Kind Regards Schalk Neethling Web Developer.Designer.Programmer.CEO Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.com This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: Pinguti Sridevi [mailto:[EMAIL PROTECTED] :: Sent: Wednesday, December 17, 2003 10:22 AM :: To: anand; javagroup; parvez; tomcat :: Subject: URGENT PLEASE HELP ME :: :: I could able to run servlets in tomcat 4.1. I created :: a folder called webdev in webapps in that i created WEB-INF and :: classes. I stored web.xml in WEB-INF. as follows. :: webapps/webdev/WEB-INF/classes :: WEB-INF/web.xml :: I configured web.xml with servletname,servletclass between webapps :: tags. After restarting the server when i say :: http://localhost:8080/webdev/servlet/myservletfile :: It showing :: 404 Requested URI not found. :: I tried like the below also :: http://localhost:8080/webdev/myservletfile :: But still it is not getting. :: Let me tell anybody that tomcat4.1 have any bug in reading web.xml :: :: :: :: - :: Do you Yahoo!? :: New Yahoo! Photos - easier uploading and sharing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDI Error / Servlet Error / Tomcat Admin Error !!!
Hi Guys, I am tring to use JNDI for an SQL Server database in my Struts/Tomcat 5.0.16 application. The fact is that this has been working until today where I added a few new actions that do not even use the database and yet for some reason mayhem has ensued. I am using a Servlet that has a load on startup true. In this servlet's init I am callinga method to lookup the resource try { Context ctx = new InitialContext(); dataSource = (DataSource) ctx.lookup(java:comp/env/jdbc/iqdb); if (dataSource == null) { logger.error(initDataSource: database pool was null); throw new ServletException(The database could not be loaded.); } } catch (NamingException nE) { logger.error(initDataSource: + nE.getMessage()); throw new ServletException(The database could not be loaded.); } When i boot up Tomcat it manages to find the data source and connections can be obtianed from it. However using the new actions that I created (which I have basically cut all the code out so that they merely exist and do nothing) causes my Servlet to re initialise!!! Why on earth is my init() being called again anyway? And to add insult to injury I now get 2003-12-17 11:00:00 StandardWrapperValve[iqController]: Allocate exception for servlet iqController At throws this on another method called by init() that calls dataSource.getConnection() And one last thing...I though I would check out the Tomcat Admin app to see if anything was up with my server.xml and it cannot show my resource to the data source ... it throws javax.servlet.ServletException: Exception retrieving attribute 'driverClassName' org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800) admin.resources.listDataSources_jsp._jspService(listDataSources_jsp.java:429) And even removing the whole block out of my server.xml so there is no JNDI resource still does not stop this error above from occuring I don't really know where to start with all these issues. I am sure they are all related. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maximum page size before JasperException
Hi There, Can anyone possibly tell me what the maximum page size allowed when compiling/presenting JSP page. The question arises when I try and display a 4meg file. If there is a limit is there any way to increase the maximum allowed size? Thanks Pete - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
session redirection automatic
hi, I use tomcat 4.1.29 and my server.xml have Session expire to 60. When Session expired i want redirect automaticly the user on sessionerror.jsp . how i do that ? this test is do on jsp pages or servlet ? Did you have an example ? thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maximum page size before JasperException
What are you displaying in a JSP page that takes up 4 megs ? Peter Guyatt wrote: Hi There, Can anyone possibly tell me what the maximum page size allowed when compiling/presenting JSP page. The question arises when I try and display a 4meg file. If there is a limit is there any way to increase the maximum allowed size? Thanks Pete - 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: Maximum page size before JasperException
Hi there, Its an XML file Pete -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: 17 December 2003 11:12 To: Tomcat Users List Subject: Re: Maximum page size before JasperException What are you displaying in a JSP page that takes up 4 megs ? Peter Guyatt wrote: Hi There, Can anyone possibly tell me what the maximum page size allowed when compiling/presenting JSP page. The question arises when I try and display a 4meg file. If there is a limit is there any way to increase the maximum allowed size? Thanks Pete - 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: Maximum page size before JasperException
Hmm maybe you can just write out the file to the response body in a servlet ? Or do you need to do something in the jsp ? Peter Guyatt wrote: Hi there, Its an XML file Pete -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: 17 December 2003 11:12 To: Tomcat Users List Subject: Re: Maximum page size before JasperException What are you displaying in a JSP page that takes up 4 megs ? Peter Guyatt wrote: Hi There, Can anyone possibly tell me what the maximum page size allowed when compiling/presenting JSP page. The question arises when I try and display a 4meg file. If there is a limit is there any way to increase the maximum allowed size? Thanks Pete - 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]
Connection Reset By Peer
Can someone please explain to me what does Connection reset by peer means? Does it mean the server does not recognize the connection attempt from Tomcat or are there some other explanations. Or is there some port not available...:-(. 2003-12-17 01:14:06 - ContextManager: SocketException reading request, ignored - java.net.SocketException: Connection reset by peer at java.net.PlainSocketImpl.socketAvailable(Native Method) at java.net.PlainSocketImpl.available(PlainSocketImpl.java:501) at java.net.SocketInputStream.available(SocketInputStream.java:142) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:217) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:479) Thanx. André Ferreira Note: The information in this e-mail is confidential and is intended solely for the addressee. If you have received this e-mail in error, you are hereby notified that any review, copying or distribution is strictly prohibited. Please inform the sender immediately and destroy the original. Siemens Limited and/or its subsidiaries accepts no liability of whatever nature for any loss, liability, damage or expense resulting directly or indirectly from access to this message and any files or links that are attached hereto.
RE: Maximum page size before JasperException
Hi There, The JSP page had it as a JavaScript variable (long story!!). I am more curious to find out what the maximum size is due to an academic curiosity Thanks Pete -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: 17 December 2003 11:21 To: Tomcat Users List Subject: Re: Maximum page size before JasperException Hmm maybe you can just write out the file to the response body in a servlet ? Or do you need to do something in the jsp ? Peter Guyatt wrote: Hi there, Its an XML file Pete -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: 17 December 2003 11:12 To: Tomcat Users List Subject: Re: Maximum page size before JasperException What are you displaying in a JSP page that takes up 4 megs ? Peter Guyatt wrote: Hi There, Can anyone possibly tell me what the maximum page size allowed when compiling/presenting JSP page. The question arises when I try and display a 4meg file. If there is a limit is there any way to increase the maximum allowed size? Thanks Pete - 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]
%@include and UTF-8
I have a page encoded in UTF-8. So I set [EMAIL PROTECTED] pageEncoding=UTF-8 % Now I can actually use UTF-8 in my page, and it works as it should. If however I include a piece of JSP, with [EMAIL PROTECTED] % then this included page can not be in UTF-8. It is interpreted as if it is ISO-8859-1, and on the including page therefore appear garbage. I saw this in tomcat 4.1.27 and 5.0.16. How can I indicate that the included page is in UTF-8 as well? Michiel -- Michiel Meeuwissen Mediapark C101 Hilversum +31 (0)35 6772979 nl_NL eo_XX en_US mihxil' [] () - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why not get my custom Principal using request.getUserprincipal()?
Hi, I am using JBoss 3.2.1 with embedded Tomcat 4. I am developping a secure web-application based on JAAS. The problem is that I want to use my own custom Principal. I made the necessary changes in JBoss and EJBContext.getUserprincopal delivers the right Implementation. But when I call request.getUserprincipal() in my servlet, I get don´t !! Why doesn´t tomcat use the defined custom Principal? How to set this? Please help as soon as possible !!! Best regards anis __ UNICEF bringt Kriegskinder in die Schule - helfen Sie mit! https://www.unicef.de/spe/spe_03.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: %@include and UTF-8
Michiel Meeuwissen [EMAIL PROTECTED] wrote: I saw this in tomcat 4.1.27 and 5.0.16. Correction: In tomcat 4.1.27 is works as expected after all. It is only tomcat 5 which behaves weirdly. Michiel -- Michiel Meeuwissen Mediapark C101 Hilversum +31 (0)35 6772979 nl_NL eo_XX en_US mihxil' [] () - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maximum page size before JasperException
Hi Peter, I am not sure of which are the current limitations of the JVM in method code and constants pool sizes, but with such a huge JSP you could be reaching them. Remember that your JSP will be converted into a servlet, and that most of the JSP code will be generated inside a single method (called somewhat similar to _jspService, so the larger your JSP is, the larger the generated servlet will be. You can probably find the exact numbers in the Java Virtual Machine Specification. A way of alleviating this is through configuration of the Jasper servlet, that is, the servlet that compiles JSPs. You will find its configuration in the tomcat/conf/web.xml file. One of the attributes you can configure there will tell the compiler to put all the static content of your JSP in a static plain text file, so it will not be part of the servlet class, reducing its size. Hope it helps you, Rodrigo Ruiz Peter Guyatt wrote: Hi There, The JSP page had it as a JavaScript variable (long story!!). I am more curious to find out what the maximum size is due to an academic curiosity Thanks Pete -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: 17 December 2003 11:21 To: Tomcat Users List Subject: Re: Maximum page size before JasperException Hmm maybe you can just write out the file to the response body in a servlet ? Or do you need to do something in the jsp ? Peter Guyatt wrote: Hi there, Its an XML file Pete -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: 17 December 2003 11:12 To: Tomcat Users List Subject: Re: Maximum page size before JasperException What are you displaying in a JSP page that takes up 4 megs ? Peter Guyatt wrote: Hi There, Can anyone possibly tell me what the maximum page size allowed when compiling/presenting JSP page. The question arises when I try and display a 4meg file. If there is a limit is there any way to increase the maximum allowed size? Thanks Pete - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Please help - FileNotFoundException
Hello everyone, I am parsing a xml file using FileInputStream a file from a servlet.The file is in the same directory as the servlet.Yet it is giving me a FileNotFoundException.Can anyone tell me some solution for this. Regards, Tejashri. - Do you Yahoo!? Free Pop-Up Blocker - Get it now
RE: 5.0.16 sample can't deploy, gets zip exception
Howdy, Add a valid web.xml to your war file and try again ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Ray Tayek [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 1:20 AM To: [EMAIL PROTECTED] Subject: 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: project name=My Project default=compile basedir=. property file=build.properties/ property file=${user.home}/build.properties/ property environment=env/ property name=app.name value=myapp/ property name=app.path value=/${app.name}/ property name=app.version value=0.1-dev/ property name=build.homevalue=${basedir}/build/ property name=catalina.home value=../../../../ !-- UPDATE THIS! - - property name=dist.home value=${basedir}/dist/ property name=docs.home value=${basedir}/docs/ property name=manager.url value=http://localhost:8080/manager/ property name=src.home value=${basedir}/src/ property name=web.home value=${basedir}/web/ !-- - Copy the file server/lib/catalina-ant.jar from your Tomcat 5 installation into the lib directory of your Ant installation. -- taskdef name=deploy classname=org.apache.catalina.ant.DeployTask/ taskdef name=list classname=org.apache.catalina.ant.ListTask/ taskdef name=reload classname=org.apache.catalina.ant.ReloadTask/ taskdef name=undeploy classname=org.apache.catalina.ant.UndeployTask/ property name=compile.debug value=true/ property name=compile.deprecation value=false/ property name=compile.optimizevalue=true/ !-- External Dependencies === -- !-- Dummy external dependency -- !-- property name=foo.jar value=/path/to/foo.jar/ -- !-- Compilation Classpath === -- path id=compile.classpath !-- Include all JAR files that will be included in /WEB-INF/lib -- !-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** -- !-- pathelement location=${foo.jar}/ -- !-- Include all elements that Tomcat exposes to applications -- pathelement location=${catalina.home}/common/classes/ fileset dir=${catalina.home}/common/endorsed include name=*.jar/ /fileset fileset dir=${catalina.home}/common/lib include name=*.jar/ /fileset pathelement location=${catalina.home}/shared/classes/ fileset dir=${catalina.home}/shared/lib include name=*.jar/ /fileset /path target name=all depends=clean,compile description=Clean build and dist directories, then compile/ target name=clean description=Delete old build and dist directories echo message=catalina.home=${catalina.home}/ echo message=app.version=${app.version}/ delete dir=${build.home}/ delete dir=${dist.home}/ /target target name=compile depends=prepare description=Compile Java sources mkdir
Re: ssl startup problem
Do mean upgrade Tomcat? If so, to what? Bill Barker wrote: 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: admin tool - tomcat 5.0.16
Howdy, You're not using the back button of your browser while in the admin webapp, by any chance? I was investigating a similar bug report. Otherwise, the 2nd one definitely looks internal to struts, which is strange. Yoav Shapira Millennium ChemInformatics -Original Message- From: Maxime Colas des Francs [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 4:52 PM To: Tomcat Users List Subject: 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(PageCon text Impl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte xtIm pl.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.ja va:1 069) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestP roce ssor.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:9 0) org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(Conditiona lTag Base.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.ja va:1 069) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestP roce ssor.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] 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: getPathInfo behaviour changed in tomcat 5.x?
Howdy, Did we gain much performance? ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker Sent: Tuesday, December 16, 2003 11:31 PM To: [EMAIL PROTECTED] Subject: 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] 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: Benefits of Apache Server
Howdy, Servlet and JSP pages are dynamic resources: java code is executed every time the user requests them. HTML pages, CSS pages, images, .js files are static resources: no code is run to produce them. They are created once and placed on the server, to be served the same to all requests. I would be very careful with a claim like Ms. Smoak's, Apache is... much faster serving static resources as that's highly qualitative. Please provide benchmarks or tests that prove your point, because I don't think it's much faster at serving static resources. Yoav Shapira Millennium ChemInformatics -Original Message- From: Chris Wahl [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 1:14 AM To: Tomcat Users List Subject: 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] 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: Need some Tomcat Configuration help badly
Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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: Why not get my custom Principal using request.getUserprincipal()?
Howdy, Read the Realm documentation to see how to customize your Realm such that it returns your custom Principal. Yoav Shapira Millennium ChemInformatics -Original Message- From: Anis Ben Hamidene [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 7:37 AM To: [EMAIL PROTECTED] Subject: Why not get my custom Principal using request.getUserprincipal()? Hi, I am using JBoss 3.2.1 with embedded Tomcat 4. I am developping a secure web-application based on JAAS. The problem is that I want to use my own custom Principal. I made the necessary changes in JBoss and EJBContext.getUserprincopal delivers the right Implementation. But when I call request.getUserprincipal() in my servlet, I get don´t !! Why doesn´t tomcat use the defined custom Principal? How to set this? Please help as soon as possible !!! Best regards anis ___ ___ UNICEF bringt Kriegskinder in die Schule - helfen Sie mit! https://www.unicef.de/spe/spe_03.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat-Apache Security
Howdy, Maybe google or a book like this: http://www.programming123.com/detail/apache/apache_1861008309.html In the future, you might want to think about security before setting up a production environment ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Joaquin Corchero [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 4:53 AM To: Tomcat Users List Subject: Tomcat-Apache Security Good morning. I'm new in Tomcat-Apache administration and I just created a production environment, but I need some guidelines to give securtity to my web applications. Can anyone give me some url's where I can find information about it? Thank you very much. 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: Please help - FileNotFoundException
Howdy, Yes: don't use a FileInputStream. Get the resource from the servlet context (ServletContext#getResourceAsStream). Yoav Shapira Millennium ChemInformatics -Original Message- From: Teja Jo [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 8:37 AM To: [EMAIL PROTECTED] Subject: Please help - FileNotFoundException Hello everyone, I am parsing a xml file using FileInputStream a file from a servlet.The file is in the same directory as the servlet.Yet it is giving me a FileNotFoundException.Can anyone tell me some solution for this. Regards, Tejashri. - Do you Yahoo!? Free Pop-Up Blocker - Get it now This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and Log4J
Howdy, Your problem is not log4j, it's commons-logging, which is nearly always the culprit. The issue arises if log4j is in a classloader below commons-logging, so commons-logging doesn't know log4j is there. You're configuring log4j OK, and if you used a log4j Logger rather than a commons-logging Log, you'd see expected behavior. But you're using a commons-logging Log, which uses the commons-logging configuration, which is tied to your server and outputs to the console. Yoav Shapira Millennium ChemInformatics -Original Message- From: Kent Boogaart [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 12:07 AM To: '[EMAIL PROTECTED]' Subject: 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(StartupL iste n 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: ?xml version=1.0? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration debug=false xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=custom class=org.apache.log4j.DailyRollingFileAppender param name=File value=${CATALINA_HOME}/logs/custom.log/ param name=DatePattern value='.'-MM-dd/ layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%d %-5p [%c] %m%n/ /layout /appender root level value=debug/ appender-ref ref=custom/ /root /log4j:configuration 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], conn e 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
RE: Problems with sending a serialized object from servlet to applet using Tomcat
Howdy, And what was the solution? Yoav Shapira Millennium ChemInformatics -Original Message- From: Dicheva, Darina [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 6:51 PM To: 'Tomcat Users List' Subject: RE: Problems with sending a serialized object from servlet to applet 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 ... 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: Reading from an xml file from servlet supporting class
Howdy, You should read up on ServletContext#getResource and Classloader#getResource. I mentioned this in another thread where you asked a similar question. Yoav Shapira Millennium ChemInformatics -Original Message- From: Teja Jo [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 11:18 PM To: [EMAIL PROTECTED] Subject: 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/myApp/WEB-INF/classes/myFolder 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 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]
Ajp13Connector is not in Apache 2.0.48.
I have Apache 2.0.48 and Tomcat 5 installed on my PC, and attempted to configure Tomcat and Apache With JK 1.2. following the instruction listed at this URL http://www.onjava.com/pub/a/onjava/2002/11/20/tomcat.html Assuming that the ajp13 connector that is required to complete the configuration was in Apache 2.0.48 instead of Apache 1.3.27 was wrong on my part. I did find it in the ajp13 connector in Apache 1.3.27. Unfortunately, Tomcat 5 does not work with the ajp13 connector. My questions are: What connector, if any, is used in Apache 2.0.48 to configure Tomcat, Apache, and JK? Furthermore, is there a more current document that describes how to configure the latest generations of these applications? If not, fine. I'll just have to go back and reinstall the older versions of Tomcat, and Apache. _ Its our best dial-up Internet access offer: 6 months @$9.95/month. Get it now! http://join.msn.com/?page=dept/dialup - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat + Windows 2K Services
Hello all, I have multiple applications running (same app - different instances) under Tomcat 4.x through IIS. They are configured as Windows Services. However, when the tomcat site fails - it doesn't crash the windows service. Know of a way to force the windows service to fail upon site failure? Thank you, Kjell Eriksen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: precompile jsp
Hi Hans, your problem is a version conflict. ant simply uses the wrong version of org.apache.jasper.JspC. I had a version of j2ee-1.3.jar in my classpath, which contains JspC also. I removed it and the problem was gone. regards, Reinhard Am Sonntag, 14. Dezember 2003 18:03 schrieb Hans Steinraht: hi all, just a question, I'm trying to precompile my jsp with the ant build script from the apache site ( jasper-howto). I don.t now what is going wrong but when I execute it with: ant -Dtomcat.home=/opt/jakarta-tomcat-4.1.24 -Dwebapp.path=/opt/jakarta-tomcat-4.1.24/webapps/mywebapp the message I receive is: jspc: No public no-arg constructor in class org.apache.jasper.JspC BUILD FAILED file:/jspc/build.xml:11: No public no-arg constructor in class org.apache.jasper.JspC Ant idea what I'm doing wrong? Maybe interesting, I get the same error when I try to precompile with the script from: http://cvs.apache.org/~fhanik/precompile.html Any help is apreciated Hans - 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: Connection Reset By Peer
Hi! Ferreira, André wrote: Can someone please explain to me what does Connection reset by peer means? Does it mean the server does not recognize the connection attempt from Tomcat or are there some other explanations. Or is there some port not available...:-(. Since TCP is a connection-less protocol, it uses a three-way handshake to simulate a connection. The client sends a packet with only the SYN bit set, the server replies with a SYN ACK packet and the client acknowledges this with a single ACK. After that, server and client have agreed to act as if they were actually connected to each other and they begin to actually exchange data. If now at any time one of the two sends a packet with the RST (reset) bit set, this indicates that the makeshift connection has been disrupted. This can have many reasons. So, connection reset by peer on one end (e.g. the broswer) means, that the other end (in this case the server) closed the connection for reasons unknown. In this case, the server process is running fine and the port is available as well, the server just wouldn't talk to you. Phil -- And on the seventh day, He exited from append mode. (Book of create(2), line 255) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat-Apache Security
I have this book and I like it.The java security manager is a little over my head at this point in my Tomcat experiencesI'm sure I'll pick it up soon.the chapters on the Realms are really good as well as the second or third chapter on file security...I found it pretty straight forward and to the point.One thing I would of liked to have seen more of is programmatic application security..Overall, its definitely worth having IMHO Cheers Russ -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 9:05 AM To: Tomcat Users List Subject: RE: Tomcat-Apache Security Howdy, Maybe google or a book like this: http://www.programming123.com/detail/apache/apache_1861008309.html In the future, you might want to think about security before setting up a production environment ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Joaquin Corchero [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 4:53 AM To: Tomcat Users List Subject: Tomcat-Apache Security Good morning. I'm new in Tomcat-Apache administration and I just created a production environment, but I need some guidelines to give securtity to my web applications. Can anyone give me some url's where I can find information about it? Thank you very much. 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]
Installation quesiton
---BeginMessage--- Following these 2 commands: 1. keytool -import -alias root -keystore your_keystore_filename -trustcacerts -file filename_of_the_chain_certificate 2. keytool -import -alias Tomcat -keystore your_keystore_filename -trustcacerts -file your_certificate_filename Are these the same file? The first: filename_of_the_chain_certificate = should be the cert.cer file received from the CA, no? In examples I've found, the second: your_certificate_filename = is a *.cer file as well? Don't know why they'd be referenced differently if they were the same file though... TIA - Rob attachment: winmail.dat---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]
RE: Installation quesiton
Well... as long as we've established that the question can't be held against rite-aid... am I in trouble for copying the portion necessary to reply to this email? Justin __ 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]
FW: Installation quesiton
Sorry - hoping this worked. somehow the original message is being converted to an attachment when tsent to this list??? I checked the copy of my message I received. We'll see. Hope you do get this. May explain why the other message I sent hasn't been responded to. My apologies. Following these 2 commands: 1. keytool -import -alias root -keystore your_keystore_filename -trustcacerts -file filename_of_the_chain_certificate 2. keytool -import -alias Tomcat -keystore your_keystore_filename -trustcacerts -file your_certificate_filename Are these the same file? The first: filename_of_the_chain_certificate = should be the cert.cer file received from the CA, no? In examples I've found, the second: your_certificate_filename = is a *.cer file as well? Don't know why they'd be referenced differently if they were the same file though. TIA - Rob __ 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.
Okay to create threads in ServletContextListener?
I'm getting complaints that Tomcat takes for-ev-er to start up, and the thing that's taking so long is all my ServletContextListeners (one for each webapp) going out to the database and loading a bunch of Maps into application scope. Later, those get used to populate select lists. Not that we restart Tomcat very often, but when we do, it causes problems when Tomcat doesn't completely finish starting before Apache starts. We end up restarting them twice to get all the generated config files in place. Is it going to break anything if I let life go on with the rest of the startup while some threads wait for the information from the database? (I haven't done much concurrent programming, just a few tutorials and school assignments, so stop me now if this is a really bad idea.) -- 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: Why not get my custom Principal using request.getUserprincipal()?
Hi, do you mean the JBoss realm? Tomcat Users List [EMAIL PROTECTED] schrieb am 17.12.03 15:05:24: Howdy, Read the Realm documentation to see how to customize your Realm such that it returns your custom Principal. Yoav Shapira Millennium ChemInformatics -Original Message- From: Anis Ben Hamidene [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 7:37 AM To: [EMAIL PROTECTED] Subject: Why not get my custom Principal using request.getUserprincipal()? Hi, I am using JBoss 3.2.1 with embedded Tomcat 4. I am developping a secure web-application based on JAAS. The problem is that I want to use my own custom Principal. I made the necessary changes in JBoss and EJBContext.getUserprincopal delivers the right Implementation. But when I call request.getUserprincipal() in my servlet, I get don´t !! Why doesn´t tomcat use the defined custom Principal? How to set this? Please help as soon as possible !!! Best regards anis ___ ___ UNICEF bringt Kriegskinder in die Schule - helfen Sie mit! https://www.unicef.de/spe/spe_03.php - 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] __ WEB.DE FreeMail wird 5 Jahre jung! Feiern Sie mit uns und nutzen Sie die neuen Funktionen http://f.web.de/features/?mc=021130 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem starting 2 Tomcat Services using Tomcat5 Service Manager
In attempting to configure multiple Tomcat5 instances on a Win2k server, I'm having trouble getting the services to function correctly. I've lurked on the list for a while and searched in vain for the connection between the Tomcat Service Manager's Parameters registry entries and the actual HKLM/System/CurrentControlSet/Services/Tomcat5 entry. Can anyone point me to the doc for this or shed some light on this change in the configuration from Tomcat4x to Tomcat5? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Okay to create threads in ServletContextListener?
Howdy, It won't be a technical problem if you implement your threads well, but it's a semantic issue. The conclusion of the contextInitialized event means the context is ready to receive requests. If your background threads are still running, if your webapp ready to handle requests? Your servlets need to be coded such that if requests arrive and those Maps are not ready, the servlets handle it gracefully. Alternatively, consider a filter to check on the status of the threads and deny requests until they're done. Yoav Shapira Millennium ChemInformatics -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 10:20 AM To: Tomcat Users List Subject: Okay to create threads in ServletContextListener? I'm getting complaints that Tomcat takes for-ev-er to start up, and the thing that's taking so long is all my ServletContextListeners (one for each webapp) going out to the database and loading a bunch of Maps into application scope. Later, those get used to populate select lists. Not that we restart Tomcat very often, but when we do, it causes problems when Tomcat doesn't completely finish starting before Apache starts. We end up restarting them twice to get all the generated config files in place. Is it going to break anything if I let life go on with the rest of the startup while some threads wait for the information from the database? (I haven't done much concurrent programming, just a few tutorials and school assignments, so stop me now if this is a really bad idea.) -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - 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: Why not get my custom Principal using request.getUserprincipal()?
Howdy, do you mean the JBoss realm? No, I mean Tomcat's realm., aka the org.apache.catalina.Realm class. There's a realm how-to page in the tomcat documentation and you will also want to look at one of the provided realms as you'll need to extend them. Yoav Shapira Tomcat Users List [EMAIL PROTECTED] schrieb am 17.12.03 15:05:24: Howdy, Read the Realm documentation to see how to customize your Realm such that it returns your custom Principal. Yoav Shapira Millennium ChemInformatics -Original Message- From: Anis Ben Hamidene [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 7:37 AM To: [EMAIL PROTECTED] Subject: Why not get my custom Principal using request.getUserprincipal()? Hi, I am using JBoss 3.2.1 with embedded Tomcat 4. I am developping a secure web-application based on JAAS. The problem is that I want to use my own custom Principal. I made the necessary changes in JBoss and EJBContext.getUserprincopal delivers the right Implementation. But when I call request.getUserprincipal() in my servlet, I get don´t !! Why doesn´t tomcat use the defined custom Principal? How to set this? Please help as soon as possible !!! Best regards anis __ _ ___ UNICEF bringt Kriegskinder in die Schule - helfen Sie mit! https://www.unicef.de/spe/spe_03.php - 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] ___ ___ WEB.DE FreeMail wird 5 Jahre jung! Feiern Sie mit uns und nutzen Sie die neuen Funktionen http://f.web.de/features/?mc=021130 - 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: localhost works, www does not; why?
Thanks. Problem has been solved. In httpd.conf, the Tomcat configs were enclosed in a virtual host block. When I removed the VirtualHost ... /VirtualHost tags, the problem went away and it now works correctly. BTW, I also observed the changing URL; that, too, has gone away. Jerry Adam Hardy wrote: On 12/16/2003 05:55 PMnbsp;jford wrote: 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 Im doing wrong? There is another thread on this subject called url changing to localhost where the poster mentioned something about Apache's ProxyPass setting. No idea what it is myself, but it might help :) Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URGENT PLEASE HELP ME........................................
You should change your server.xml, adding another context like Context path=/webdev docBase=webdev debug=0 reloadable=true crossContext=true /Context Try to see if it will help. I could able to run servlets in tomcat 4.1. I created a folder called webdev in webapps in that i created WEB-INF and classes. I stored web.xml in WEB-INF. as follows. webapps/webdev/WEB-INF/classes WEB-INF/web.xml I configured web.xml with servletname,servletclass between webapps tags. After restarting the server when i say http://localhost:8080/webdev/servlet/myservletfile It showing 404 Requested URI not found. I tried like the below also http://localhost:8080/webdev/myservletfile But still it is not getting. Let me tell anybody that tomcat4.1 have any bug in reading web.xml - Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URGENT PLEASE HELP ME........................................
If his app is directly under the webapps directory, he shouldn't need to alter server.xml. AutoDeploy will pick it up. You will, however need to create a mapping for your servlet in your web.xml file under WEB-INF in your app's directory. On Wednesday 17 December 2003 11:05 am, qi zhang wrote: You should change your server.xml, adding another context like Context path=/webdev docBase=webdev debug=0 reloadable=true crossContext=true /Context Try to see if it will help. I could able to run servlets in tomcat 4.1. I created a folder called webdev in webapps in that i created WEB-INF and classes. I stored web.xml in WEB-INF. as follows. webapps/webdev/WEB-INF/classes WEB-INF/web.xml I configured web.xml with servletname,servletclass between webapps tags. After restarting the server when i say http://localhost:8080/webdev/servlet/myservletfile It showing 404 Requested URI not found. I tried like the below also http://localhost:8080/webdev/myservletfile But still it is not getting. Let me tell anybody that tomcat4.1 have any bug in reading web.xml - Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing - 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]
Tomcat (embedded in JBoss) hangs during startup of SSL connector
Hi there, I've encountered a strange problem while starting jboss 3.2.1 (including tomcat 4.1.24) with the SSL-Connector enabled on port 443: Symptom: The server hangs while initializing the SSL-connector and never comes back (at least not for several hours). So the whole start-up processes is frozen. The last two lines in the log are: 2003-12-17 13:24:08,268 DEBUG [org.apache.coyote.http11.Http11Protocol] Attribute sslImplementation: null 2003-12-17 13:24:08,268 DEBUG [org.apache.tomcat.util.threads.ThreadPool] Getting new thread data This only occurs on two servers of a customer of ours. The same setup works out just fine on other servers. The configuration is: Suse Linux 7.3 (that is kernel 2.4.10) JBoss 3.2.1 with Tomcat 4.1.24 j2sdk 1.4.2_01 Tomcat listens to port 80 and 443 (just commented out the SSL-Connector in the config file) Security patch of US_export_policy.jar;local_policy.jar for strong encryption was done (and undone withaout any change) I already tried this without any success: - using another port for SSL (80, 8443, 9443) - j2sdk 1.4.2_03, j2sdk 1.4.1_05 - different keystore files - using wrong password = tomcat gives correct exception But: The server starts if operated with JDK 1.3.1_01 but that's unfortunaly no option for our application. I already thought about using the newest JBoss 3.2.3 with the Tomcat 4.1.29, because I saw some serious refactoring in the SSL support (separate classes for JDK 1.4). Due to the fact, that we have about 30 installation of our software based on JBoss 3.2.1 and the new version would have been tested intensivly, the update is not a short term solution. I also filled up the tomcat code with debug output and so I found that the line that actually hangs is: context.init(kmf.getKeyManagers(), tm, new java.security.SecureRandom()); in the initProxy() method of org.apache.tomcat.util.net.jsse.JSSESocketFactory From there it goes into SUN's JSSE-Provider (and never comes back). By the way: If I go through the JSSE code I see obvious (as it seems) infinite loop, which would explain initProxy() invokes SSLContext.init(...) in SSLContext, which just delegates to SSLContextSpi.engineInit(...), which is a abstract method only implemented by SSLContextSpiWrapper.engineInit(...), where we find return statement, but a invokation of SSLContext.init(...) at the end of the method, that makes the circle perfect. On the other hand: How does this work out on all the other installations? May I be tricked by the decompiler? Nicolai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat5 not logging
Hi, is there any known issue with Tomcat 5.0.16 and logger activity on win2k? I recently upgraded from Tmcat 4.1.29 and have the feeling that something is not working as properly as before. When installad as a service, I don't get the file produced by Tomcat loggers, while I get the log from log4j. I'm still tracking down the problem and I'm a bit confused at the moment, but just wanted to know whether there where known issues. TIA, Fabio. Ai sensi della Legge 675/96, si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse pervenuto per errore, la preghiamo di eliminarlo senza copiarlo e di non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.BRBRThis message, for the law 675/96 may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
help in tomcat 5 and MS SQL 2000
Hi, I'd like to learn JSP with Tomcat 5. Any help in how to configure Tomcat in order to connect with MS SQL 2000 server. Thanks in advance, Suchun Wu 1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to keep mod_jk from logging to stdout.log??
We're running Apache 1.3.29, Tomcat 4.1.27 with mod_jk 1.3 on Windows 2k Server and we're seeing some 'disturbing' activity that we cant get around. It appears that every html form post to a servlet that comes thru gets logged in the stdout.log file. I've set every logging/debugging setting I can find in tomcat to the lowest setting (or off) to no avail. If there is a way to just completly disable the stdout.log file (running as a service) I'll settle for that. This is a snip of the log, as you can see, highly sensitive information can be stored here with this happening, the form submitted contained 2 fields, can you guess what they were?? :) 12 34 00 24 00 22 75 73 65 72 6e 61 6d 65 3d 31 | .4.$.username=1 32 31 32 31 32 31 26 70 61 73 73 77 6f 72 64 3d | 212121password= 61 73 61 73 61 73 61 73 | asasasas This happens even if the target servlet does not run (i.e. delete it to cause a 404) so it's nothing in the servlet logging it... Has anyone seen this before? I've tried all of the various JkLogLevel settings with no luck.. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat5 not logging
Howdy, Tomcat5 uses commons-logging a lot more than tomcat4. So you have to be more careful not to mix configurations of commons-logging or log4j and not to mix jar locations of commons-logging. Yoav Shapira Millennium ChemInformatics -Original Message- From: Grassi Fabio [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 7:57 AM To: [EMAIL PROTECTED] Subject: Tomcat5 not logging Hi, is there any known issue with Tomcat 5.0.16 and logger activity on win2k? I recently upgraded from Tmcat 4.1.29 and have the feeling that something is not working as properly as before. When installad as a service, I don't get the file produced by Tomcat loggers, while I get the log from log4j. I'm still tracking down the problem and I'm a bit confused at the moment, but just wanted to know whether there where known issues. TIA, Fabio. Ai sensi della Legge 675/96, si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse pervenuto per errore, la preghiamo di eliminarlo senza copiarlo e di non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.BRBRThis message, for the law 675/96 may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. 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]
Loadbalancing with mod_jk2
Hello, what is the correct way to use JK2 for load balancing? According to the docs, jk2 should support load balancing and graceful shutdown of a worker. (Meaning that a particular worker will not get any new sessions.) This is a snippet my current configuration: [channel.socket:localhost:8009] port=8009 host=127.0.0.1 [channel.socket:localhost:8010] port=8010 host=127.0.0.1 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [ajp13:localhost:8010] channel=channel.socket:localhost:8010 [uri:/foobar/*] worker=ajp13:localhost:8009 How can I tell jk2 that foobar is served by both tomcat instances? How to tell that tomcat2 should not get new sessions for foobar? Thank You very much, Johann Uhrmann -- Johann Uhrmann xpecto AG | Lindenstrasse 81 | D-84030 Ergolding Telefon: 0700 xpecto 00 (0700 973286 00) Telefax: 0700 xpecto 10 (0700 973286 10) Internet: http://www.xpecto.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help in tomcat 5 and MS SQL 2000
u can either: a) search google for this info b) look at Tomcat Documentation in the JNDI Datasource HOW-TO, http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html c) if setting up MS SQL 2000 is anything similar to Sybase ASE (which it should since they used to be the same product), then u can check out Sybase's jConnect 5.5 (which can be downloaded from Sybase's website) and how to set it up with Tomcat, http://info.sybase.com/resolution/detail.stm?id_number=10899047 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] 17/12/2003 10:07 AM Please respond to Tomcat Users List To: [EMAIL PROTECTED] cc: Subject:help in tomcat 5 and MS SQL 2000 Hi, I'd like to learn JSP with Tomcat 5. Any help in how to configure Tomcat in order to connect with MS SQL 2000 server. Thanks in advance, Suchun Wu 1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Benefits of Apache Server
Yoav wrote: I would be very careful with a claim like Ms. Smoak's, Apache is... much faster serving static resources as that's highly qualitative. Please provide benchmarks or tests that prove your point, because I don't think it's much faster at serving static resources. Retraction! I should have said, Apache is faster at serving static resources than the Tomcat/connector/Apache combination. I've never tested Tomcat alone vs. Apache alone-- Apache was in place here before I started writing webapps. What I have done is looked at having Apache serve images directly rather than placing them underneath each webapp. I use a lot of the same images across webapps, and I prefer to let Tomcat handle the dynamic content while putting images, css files, and javascript files [what I referred to as static resources] under Apache's root. It's the same mindset as using plain-old-HTML tags in a Struts webapp. If there's no dynamic content, why bother to involve a taglib? -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connector Error
Hi there, I know there is a link/page that will tell me what this error is: [error] mod_jk child init 1 -2 [error] jk2_init() Can't find child 2529 in scoreboard I just can't find it. Could someone please point me to it. Thanks in advance, Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Security Policy
Kwok Peng Tuck wrote: Hi list , With regards to the security manager in tomcat, is it possible to ship a policy file with each webapp ? No it is not. You have to put those permission in catalina.policy. -- Jeanfrancois - 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: help in tomcat 5 and MS SQL 2000
If you have a driver already I'll post a sample configuration. Whould that help? Jester -Original Message- From: Alan Czajkowski [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 11:37 AM To: Tomcat Users List Subject: Re: help in tomcat 5 and MS SQL 2000 u can either: a) search google for this info b) look at Tomcat Documentation in the JNDI Datasource HOW-TO, http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html c) if setting up MS SQL 2000 is anything similar to Sybase ASE (which it should since they used to be the same product), then u can check out Sybase's jConnect 5.5 (which can be downloaded from Sybase's website) and how to set it up with Tomcat, http://info.sybase.com/resolution/detail.stm?id_number=10899047 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] 17/12/2003 10:07 AM Please respond to Tomcat Users List To: [EMAIL PROTECTED] cc: Subject:help in tomcat 5 and MS SQL 2000 Hi, I'd like to learn JSP with Tomcat 5. Any help in how to configure Tomcat in order to connect with MS SQL 2000 server. Thanks in advance, Suchun Wu 1 - 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]
Tomcat 5 DefaultContext allowLinking and context restarts
Howdy, I'm playing a bit with tomcat 5 and have questions about how the allowLinking attribute for the DefautlContext is supposed to work in regards to context restarts / stops/starts. Under several of my contexts, I have a symbolic link to a directory outside of the context. in server.xml I setup the DefaultContext like this: DefaultContext allowLinking=true/ This is great because it now allows the symbolic links in all my contexts to work without having to turn on allowLinking for each context explicitly. The problem I have is if I use the tomcat manager app to stop and then start a context, my symbolic links no longer work. (tomcat won't follow the symbolic link when access from a URL) So is this behavior by design? Maybe I need to do some additional config in my contexts? any ideas? Thanks! -John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat4.1.29 Requested resource not available
Yes, I did try it. Didn't work. Something isn't right in my configuration. I plan to install the next version, Tomcat 5.X now. Could you tell me how different is the configuration from the prvious version? What are the main steps? Can I find an RPM for that? I can't seem to find one... Is there documentation aside from Jakarta site? Is it a complex install? Which is a stable release in Tomcat 5? I do appreciate your help very much. Thanks N.K. -Original Message- From: BAO RuiXian [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 7:06 PM To: Tomcat Users List Subject: Re: Tomcat4.1.29 Requested resource not available Nadia Kunkov wrote: I did add the Context path=/test etc... /Context 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 Context.../Context 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: user name = Tomcat password = Tomcat roles = tomcat,manager/ (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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using mod_rewrite with mod_jk2
In what order do the various mod_* bits interact? Can I use mod_rewrite to setup the URL for passage to mod_jk2?
Re: Benefits of Apache Server
Yoav, I would be very careful with a claim like Ms. Smoak's, Apache is... much faster serving static resources as that's highly qualitative. Please provide benchmarks or tests that prove your point, because I don't think it's much faster at serving static resources. Retraction! I should have said, Apache is faster at serving static resources than the Tomcat/connector/Apache combination. I've never tested Tomcat alone vs. Apache alone-- Apache was in place here before I started writing webapps. I think we can all agree that this statement is true. Certainly adding Apache to Tomcat is slower than having Tomcat do the work all by itself. I don't have benchmarks, and I've made the statement Apache is faster for static content tthan Tomcat before, and I still believe it to be true. Here's why: When Apache httpd serves a static resource, it pretty much goes through all the processing required to find out where the file actually is, and then dumps the bytes to the response. I'm pretty sure that it does all this without allocating anything on the heap -- most of the object/data structures necesary for the lookup I'm sure already exist, and the buffer for the response is probably fixed, and probably on the stack. For Tomcat to do the same thing, it's got to create a bunch of objects which later need to be garbage-collected. I'm guessing that the Tomcat devs have streamlined the process so that not all of the ServletRequest objects and all that jazz are created every time, but you still have to create a lot of stuff on the heap (including every String used, like the URL, and maybe some headers, etc.). After that (probably after the response has been sent to the client, which is why the numbers are hard to track down), the GC has to run. I think that I can make the blanket statement that explicit memory management is faster than GC'd memory, since the GC actually to do some work to determine if memory can be freed, while the explicit scheme needs no such processing. I am willing to concede that Apache vs. Tomcat in a direct competition for serving up static content on the same hardware will probably result in timing differences so small as to be insignificant to anyone doing reasonable benchmarking. Lastly, if you have your architecture such that you have crappy machines in front of the application servers to serve static content (so that the app servers don't waste time serving static content), Apache will run must better on them since it requires fewer resources to run nicely. For example, Apache can do quite nicely on a 16MB machine as a web server. Tomcat can't really do that since the JVM is such a monster. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JAVA_OPTS to tomcat
Hello All, When I add the following line to catalina.sh: JAVA_OPTS=-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFact ory -Djava.naming.provider.url=jnp://localhost:1099 -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces I get this error: ./catalina.sh: -Djava.naming.provider.url=jnp://localhost:1099: No such file or directory Can someone tell me whats going on here? Thanks, Vijay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JAVA_OPTS to tomcat
Howdy, Yeah, what's going on is limited familiarity with unix syntax. Use single or double quotes of your JAVA_OPTS (or any other environment variable) includes spaces, e.g. JAVA_OPTS='-Da=b -Dc=d'. Yoav Shapira Millennium ChemInformatics -Original Message- From: Vijay Kandy [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 2:55 PM To: 'Tomcat Users List' Subject: JAVA_OPTS to tomcat Hello All, When I add the following line to catalina.sh: JAVA_OPTS=- Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFact ory -Djava.naming.provider.url=jnp://localhost:1099 -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces I get this error: ./catalina.sh: -Djava.naming.provider.url=jnp://localhost:1099: No such file or directory Can someone tell me whats going on here? Thanks, Vijay - 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: JAVA_OPTS to tomcat
Hello All, When I add the following line to catalina.sh: JAVA_OPTS=-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFact ory -Djava.naming.provider.url=jnp://localhost:1099 -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces I get this error: ./catalina.sh: -Djava.naming.provider.url=jnp://localhost:1099: No such file or directory Can someone tell me whats going on here? it seems you didn't put it into one line, and after: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JAVA_OPTS to tomcat
Thank you but there was no need to pick on me. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 3:02 PM To: Tomcat Users List Subject: RE: JAVA_OPTS to tomcat Howdy, Yeah, what's going on is limited familiarity with unix syntax. Use single or double quotes of your JAVA_OPTS (or any other environment variable) includes spaces, e.g. JAVA_OPTS='-Da=b -Dc=d'. Yoav Shapira Millennium ChemInformatics -Original Message- From: Vijay Kandy [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 2:55 PM To: 'Tomcat Users List' Subject: JAVA_OPTS to tomcat Hello All, When I add the following line to catalina.sh: JAVA_OPTS=- Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFact ory -Djava.naming.provider.url=jnp://localhost:1099 -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces I get this error: ./catalina.sh: -Djava.naming.provider.url=jnp://localhost:1099: No such file or directory Can someone tell me whats going on here? Thanks, Vijay - 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]
mod_jk Tomcat and Apache httpd two different machines?
I want to run tomcat on our build machine and apache with the Jk connector on another is this possible? Are there any good tutorial docs available to do this? Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
defining multiple tomcat server on one workers2.properties file
i have an apache webserver that will handle request made to tomcat and hand off the request using jk2. i have the workers2.properties to handle this with one tomcat server. however, i have another tomcat server that i need the request to be sent to. i have done this with jk by defining a separate worker and specifying the other server. how is this done with jk2? does anyone have an example i can use? Peter Choe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need some Tomcat Configuration help badly
Hi, If I understand this correctly, there are references lying around that point to objects that no longer are needed. Is this something the developer does or something tomcat does in compiling the servlets? In other words, is there something the developer or administrator can do to avoid this? Does pre-compiling the jsp files avoid this? Another thing I'm not sure I understand is this: If you don't change the JSP pages, or class files, then the memory leak that is created just happens once. In this scenario, the memory leak wouldn't keep growing until eventually tomcat does. Is that correct? Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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: Need some Tomcat Configuration help badly
Howdy, If I understand this correctly, there are references lying around that point to objects that no longer are needed. Is this something the developer does or something tomcat does in compiling the servlets? This is something the developer does. In other words, is there something the developer or administrator can do to avoid this? Does pre-compiling the jsp files avoid this? Pre-compiling JSP files helps avoid the javac memory leak previously described. The memory leak is just inside the JSPC process, not inside the tomcat running server. The developer can employ good coding practices as well as good QA practices such as the use of a profiler throughout the lifecycle of the project to detect and prevent memory leaks. If you don't change the JSP pages, or class files, then the memory leak that is created just happens once. In this scenario, the memory leak wouldn't keep growing until eventually tomcat does. Is that correct? This is true. In this scenario (one compilation of each JSP in a running tomcat server) you'd have a limited memory leak per JSP. If you have thousands of JSPs, this can still be a serious leak. Yoav Shapira Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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] 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: Need some Tomcat Configuration help badly
Thanks. I'm still not sure what kind of code would produce a memory leak. Any chance you could give a brief description or example of this? Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, If I understand this correctly, there are references lying around that point to objects that no longer are needed. Is this something the developer does or something tomcat does in compiling the servlets? This is something the developer does. In other words, is there something the developer or administrator can do to avoid this? Does pre-compiling the jsp files avoid this? Pre-compiling JSP files helps avoid the javac memory leak previously described. The memory leak is just inside the JSPC process, not inside the tomcat running server. The developer can employ good coding practices as well as good QA practices such as the use of a profiler throughout the lifecycle of the project to detect and prevent memory leaks. If you don't change the JSP pages, or class files, then the memory leak that is created just happens once. In this scenario, the memory leak wouldn't keep growing until eventually tomcat does. Is that correct? This is true. In this scenario (one compilation of each JSP in a running tomcat server) you'd have a limited memory leak per JSP. If you have thousands of JSPs, this can still be a serious leak. Yoav Shapira Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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] 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]
cannot get datasource to work with tomcat that is bundled with Sun's Solaris 9
Sun bundles Tomcat 4 with Solaris 9 and i'm having problems getting the datasource to work i am trying to connection to a Sybase ASE database and so i went to Sybase's website for help and they have jConnect 5.5 (a .jar file that i guess contains their driver) i copied the jConnect5.5 jconn2.jar file to /usr/apache/tomcat/common/lib i pasted the new context (for connecting to the database that was provided by Sybase) into the server.xml file (see this context below) in /var/apache/tomcat/conf the directory tree for the webapps looks like so: /var/apache/tomcat/webapps/sybase/jsp/sybase.jsp /var/apache/tomcat/webapps/sybase/WEB-INF/web.xml /var/apache/tomcat/webapps/sybase/WEB-INF/jsp/ i then stopped and then re-started apache my sybase.jsp file looks like this: -- %@ page import=java.sql.* % %@ page import=javax.sql.* % %@ page import=javax.naming.* % %@ page import=java.util.* % html head title Testing Sybase DataSource /title /head body bgcolor=white font size=4 h3 Start of Test /h3 % String s = java:comp/env; String t = jdbc/a_sybase_datasource; InitialContext initCtx = null; try { initCtx = new InitialContext(); out.println(pinitCtx = new InitialContext() : successful); out.println(BR); out.println( initCtx ); } catch (Exception e) { out.println(pinitCtx = new InitialContext() : failed); out.println(BR); out.println ( e ); } Context envCtx = null; try { envCtx = (Context) initCtx.lookup( s ); out.println(BRenvCtx = initCtx.lookup( + s + ) : successful); out.println(BR); out.println( envCtx ); } catch (Exception e) { out.println(BRenvCtx = initCtx.lookup( + s + ) : failed); out.println ( e ); } DataSource ds = null; ds = null; try { out.println(pTrying ds=(DataSource)envCtx.lookup( + t + )); ds = (DataSource) envCtx.lookup( t ); out.println(BRDataSource lookup apparently successful); out.println(BR + ds ); } catch (Exception e) { out.println(BRDatasource lookup failed BR); out.print( e ); } if (ds == (DataSource) null) { out.println(BRDataSource null\n); } try { Connection conn = ds.getConnection(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(select db_name()); while (rs.next()) { out.println ( BRInside fetch loop: ); out.println ( BRValue Returned from DataSource: + rs.getString(1) ); } // end_while rs.close(); stmt.close(); conn.close(); } // end_try catch (SQLException sqe) { out.println(BRInside catch(SQLException sqe)); out.println( sqe.getMessage() ); } // end catch SQLException catch (Exception e) { out.println(BRInside catch(Exception e)BR); out.println(e.getMessage()); out.print( e ); } // end catch Exception % p h3 End of Test /h3 /font /body /html -- my web.xml file looks like this: -- ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app welcome-file-list welcome-file /jsp/sybase.jsp /welcome-file /welcome-file-list !-- for using dscp -- resource-ref res-ref-name jdbc/a_sybase_datasource /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref /web-app -- context in server.xml -- !-- Sybase Example Context - dscp example -- Context path=/sybase docBase=sybase debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_Sybase.log. suffix=.txt timestamp=true/ Resource name=jdbc/a_sybase_datasource auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/a_sybase_datasource parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value5/value /parameter parameter namemaxWait/name value1/value /parameter parameter namedriverClassName/name valuecom.sybase.jdbc2.jdbc.SybDriver/value /parameter parameter nameurl/name valuejdbc:sybase:Tds:10.34.34.34:4300/mydb?JCONNECT_VERSION=6/value /parameter parameter nameusername/name valuemyuser/value /parameter parameter namepassword/name valuemypasswd/value /parameter /ResourceParams /Context !-- END Sybase Example Context - dscp example -- - when i call /var/apache/tomcat/webapps/sybase/jsp/sybase.jsp (it's a connection test file that Sybase provides) through http://hostname:port/sybase/jsp/sybase.jsp i get this error: - Start of Test initCtx = new InitialContext() : successful [EMAIL PROTECTED] envCtx = initCtx.lookup(java:comp/env) : successful [EMAIL PROTECTED] Trying ds=(DataSource)envCtx.lookup(jdbc/a_sybase_datasource) Datasource lookup failed javax.naming.NamingException: Cannot create resource instance DataSource null Inside catch(Exception e) null
RE: Need some Tomcat Configuration help badly
Howdy, Sure, here's one example: void someMethod() { // MyJob implements Runnable Thread myJobThread = new Thread(new MyJob()); boolean goAhead = evaluateSomeCondition(); if(goAhead) { myJobThread.start(); } else { System.out.println(Not running job.); } } Because creating a thread allocates some resources and adds a reference to the thread in its parent ThreadGroup, when the method is done the Thread cannot be garbage-collected even though the myJobThread reference is gone. A simple fix might be to do the thread creation inside the goAhead clause. This is only to show it's possible. Obviously this is not an example of good practice, but it's an easy enough mistake to make ;) The above is an implementation of an example mentioned on this thread: http://forum.java.sun.com/thread.jsp?forum=4thread=456545message=20839 57. There are others... Yoav Shapira Millennium ChemInformatics -Original Message- From: Oscar Carrillo [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 2:38 PM To: Tomcat Users List Subject: RE: Need some Tomcat Configuration help badly Thanks. I'm still not sure what kind of code would produce a memory leak. Any chance you could give a brief description or example of this? Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, If I understand this correctly, there are references lying around that point to objects that no longer are needed. Is this something the developer does or something tomcat does in compiling the servlets? This is something the developer does. In other words, is there something the developer or administrator can do to avoid this? Does pre-compiling the jsp files avoid this? Pre-compiling JSP files helps avoid the javac memory leak previously described. The memory leak is just inside the JSPC process, not inside the tomcat running server. The developer can employ good coding practices as well as good QA practices such as the use of a profiler throughout the lifecycle of the project to detect and prevent memory leaks. If you don't change the JSP pages, or class files, then the memory leak that is created just happens once. In this scenario, the memory leak wouldn't keep growing until eventually tomcat does. Is that correct? This is true. In this scenario (one compilation of each JSP in a running tomcat server) you'd have a limited memory leak per JSP. If you have thousands of JSPs, this can still be a serious leak. Yoav Shapira Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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
RE: Need some Tomcat Configuration help badly
Thanks for the clarification. This seems reasonable, as I thought it would be unlikely in most circumstances. Not properly closing/de-referencing external resources, including threads would cause the JVM's memory to grow. JDBC resources would probably be the most common. Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Sure, here's one example: void someMethod() { // MyJob implements Runnable Thread myJobThread = new Thread(new MyJob()); boolean goAhead = evaluateSomeCondition(); if(goAhead) { myJobThread.start(); } else { System.out.println(Not running job.); } } Because creating a thread allocates some resources and adds a reference to the thread in its parent ThreadGroup, when the method is done the Thread cannot be garbage-collected even though the myJobThread reference is gone. A simple fix might be to do the thread creation inside the goAhead clause. This is only to show it's possible. Obviously this is not an example of good practice, but it's an easy enough mistake to make ;) The above is an implementation of an example mentioned on this thread: http://forum.java.sun.com/thread.jsp?forum=4thread=456545message=20839 57. There are others... Yoav Shapira Millennium ChemInformatics -Original Message- From: Oscar Carrillo [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 2:38 PM To: Tomcat Users List Subject: RE: Need some Tomcat Configuration help badly Thanks. I'm still not sure what kind of code would produce a memory leak. Any chance you could give a brief description or example of this? Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, If I understand this correctly, there are references lying around that point to objects that no longer are needed. Is this something the developer does or something tomcat does in compiling the servlets? This is something the developer does. In other words, is there something the developer or administrator can do to avoid this? Does pre-compiling the jsp files avoid this? Pre-compiling JSP files helps avoid the javac memory leak previously described. The memory leak is just inside the JSPC process, not inside the tomcat running server. The developer can employ good coding practices as well as good QA practices such as the use of a profiler throughout the lifecycle of the project to detect and prevent memory leaks. If you don't change the JSP pages, or class files, then the memory leak that is created just happens once. In this scenario, the memory leak wouldn't keep growing until eventually tomcat does. Is that correct? This is true. In this scenario (one compilation of each JSP in a running tomcat server) you'd have a limited memory leak per JSP. If you have thousands of JSPs, this can still be a serious leak. Yoav Shapira Thanks, Oscar http://daydream.stanford.edu/tomcat/install_web_services.html On Wed, 17 Dec 2003, Shapira, Yoav wrote: Howdy, Actually, the popularity and usage of Jikes has been decreasing (at least as measured by downloads). Javac's memory-handling behavior has been improved significantly. The memory leaks described earlier in this thread are not compiler-related and simply swapping compilers would not help. They are problems of reference scope. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 1:16 AM To: Tomcat Users List Subject: Re: Need some Tomcat Configuration help badly Dick Steflik wrote: I had the same question. In all of the years I've worked with Java I've always thought it was free of memory leaks. If you use a different compiler does the problem go away. Is that how people like JRun (Macromedia) and WebSphere (IBM) avoid the problem? It could be. Someone here mentioned using Jikes for Tomcat as a workaround (solution). I know that Jikes has bugs, here and there, but it can be made to work and it comes with Tomcat. Considering that javac has an all present bug (this memory leak), Jikes is better. I guess commercial solutions use their own implementations or fork off to get rid of memory leak. Why does JavaC have that memory leak? Nix. - 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
RE: CGI not working on Tomcat 5.0.16?
Thanks John, and good luck with Tomcat 5. Ken -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 2:52 PM To: Tomcat Users List Subject: 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: Default context for web app
On 12/17/2003 12:39 AMnbsp;Kent Boogaart wrote: 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. I think it's a bug with the way tomcat deploys xml context files. You've got the context config happily in the server.xml, where this works (for you) but I'm using the context.xml files with deployXML=true and tomcat can't deal with it properly (unless I put it in ROOT). Guess I'll log it as a bug. 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]
RE: mod_jk Tomcat and Apache httpd two different machines?
Yes its possible. I installed the mod_jk2-2.0.43.dll in apache/modules. Here is what I put into the diffrent config files: httpd.conf: just one single row like this: LoadModule jk2_module modules/mod_jk2-2.0.43.dll Then I added a worker2.properties in Apache/conf/ like this: [logger] level=DEBUG file=c:/programme/apache group/apache2/logs/jk2.log [config] file=c:/programme/apache group/apache2/conf/workers2.properties debug=0 debugEnv=0 # Shared memory handling. Needs to be set. [shm] file=c:/programme/apache group/apache2/logs/shm.file size=1048576 debug=0 #disabled=0 [channel.socket:localhost:8010] port=8010 host=127.0.0.1 debug=0 # Example socket channel, explicitly set port and host. # [channel.socket:localhost:8009] # port=8009 # host=127.0.0.1 # Example UNIX domain socket # [channel.un:/usr/local/tomcat/work/jk2.socket] # tomcatId=localhost:8009 # debug=0 # define the worker [ajp13:localhost:8010] #channel=channel.un:/usr/local/pds/tomcat/work/jk2.socket # To use the TCP/IP socket instead, just comment out the above # line, and uncomment the one below channel=channel.socket:localhost:8010 # define the worker # Announce a status worker # Uri mapping [uri:/examples/*] worker=ajp13:localhost:8010 [uri:/javaroom/*] worker=ajp13:localhost:8010 [status:status] [status:] info=Status worker,displays run time informations [uri:/jkstatus/*] info=Display status information and checks the config file for changes. worker=status:status [uri:/status/*] worker=status:status # end of workers2.properties Finally, I configured this Connector in the Tomcat server.xml: --- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8010 minProcessors=5 maxProcessors=250 acceptCount=10 debug=0 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / I hope this helps you get it running. -Original Message- From: James R. Marcus [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 3:17 PM To: [EMAIL PROTECTED] Subject: mod_jk Tomcat and Apache httpd two different machines? I want to run tomcat on our build machine and apache with the Jk connector on another is this possible? Are there any good tutorial docs available to do this? Thanks, James - 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: defining multiple tomcat server on one workers2.properties file
In the workers2.properties file specify the second instance of your tomcat and the port number. For example [channel.socket:localhost:8009] info=Ajp13 forwarding over socket debug=0 tomcatId=localhost:8009 [channel.socket:localhost:8010] info=Ajp13 forwarding over socket debug=0 tomcatId=localhost:8010 In the first tomcat server.xml this will be jvmRoute=localhost:8009 in the engine directive. In the server.xml in the specify JVM attribute to jvmRoute=localhost:8010 in the Engine directive. in the connector directive and change the port number to 8010 -Original Message- From: Peter Choe [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 3:30 PM To: Tomcat Users List Subject: defining multiple tomcat server on one workers2.properties file i have an apache webserver that will handle request made to tomcat and hand off the request using jk2. i have the workers2.properties to handle this with one tomcat server. however, i have another tomcat server that i need the request to be sent to. i have done this with jk by defining a separate worker and specifying the other server. how is this done with jk2? does anyone have an example i can use? Peter Choe - 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: 5.0.16 sample can't deploy, gets zip exception
At 08:48 AM 12/17/03 -0500, Shapira, Yoav wrote: Howdy, Add a valid web.xml to your war file and try again ;) Yoav Shapira Millennium ChemInformatics i tried adding the one below, but no joy :( same unzip problem as before: install: [deploy] FAIL - Encountered exception java.util.zip.ZipException: error in opening zip file but, the myapp.war that ends up in akarta-tomcat-5.0.16\webapps/ is only 36 bytes long, so something else is afu. hmm, the deploy task has: war=file://${build.home}/ while the dist task has: jarfile=${dist.home}/${app.name}-${app.version}.war. changed this to war=file://${dist.home}/, stil no joy. changed it to: war=file://${dist.home}/${app.name}-${app.version}.war/ and ant says it deployed ok. so it looks like the war line was just bad in the sample build.xml. i still get a 404 trying the servlet link on http://localhost:8080/myapp/ which links to http://localhost:8080/myapp/hello and the jsp link which takes me to http://localhost:8080/myapp/hello.jsp says: Context Path: /myapp Path Information: null Query String: null Request Method: GET Servlet Path: /hello.jsp is there something wrong with my web.xml perhaps? who builds the the web.xml file for my app and where should it be kept? (i made in the base dir of my project and did a copy todir=${build.home}/WEB-INF file=web.xml/ in the prepare step). will i still have to mung the .xml in conf/? thanks !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameHello, World Application/display-name description This is a simple web application with a source code organization based on the recommendations of the Application Developer's Guide. /description servlet servlet-nameHelloServlet/servlet-name servlet-classmypackage.Hello/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/myapp/url-pattern /servlet-mapping /web-app -Original Message- From: Ray Tayek [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 1:20 AM To: [EMAIL PROTECTED] Subject: 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 ... ... 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? ... --- ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work vice chair orange county java users group http://www.ocjug.org/ hate spam? http://samspade.org/ssw/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk only usable from localhost
Tomcat List, I have installed Apache+Tomcat via mod_jk. I have it configured so that I can use Tomcat from Apache but it only works from the localhost. If I: http://localhost/tomcat-docs it works but if I do: http://computername/tomcat-docs http://computerip/tomcat-docs it doesn't work. Is there something special you have to do to make mod_jk work from computers other than localhost? Thanks, Jeremy Whitlock --- MCP/MCSA IT Manager for Star Precision, Inc. Phone: (970) 535-4795 Metro: (303) 926-0559 Fax: (970) 535-0780 Metro Fax: (303) 926-8557 http://www.starprecision.com
RE: mod_jk Tomcat and Apache httpd two different machines?
Thanks this helped a lot. I can now get to main.jsp. I also used this as reference: http://www.mail-archive.com/[EMAIL PROTECTED]/msg32735.html Here are my settings cvs machine (apache)- httpd.conf: # Added for the mod_jk connector # # Load mod_jk # LoadModule jk_module modules/mod_jk.so # # Configure mod_jk # JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel info JkMount /cruisecontrol/* cruise End cvs machine (apache)- cvs machine workers.properties # workers.properties # # In Unix, we use forward slashes: ps=/ # list the workers by name worker.list=cruise # # tomcat server # worker.cruise.port=8009 worker.cruise.host=cruise.domainname.com worker.cruise.type=ajp13 # # END workers.properties # End cvs machine workers.properties On the Tomcat machine I didn't make this entry but this came in the default server.xml !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 / I also have a workers.properties file under conf/jk/ I'm not sure if I need this? ---Cruise workers.properties (Tomcat)--- #BEGIN workers.properties worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=cvs.domainname.com worker.ajp13.type=ajp13 #END workers.properties ---End Cruise workers.properties (Tomcat)--- -Original Message- From: Asif Chowdhary [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 5:12 PM To: Tomcat Users List Subject: RE: mod_jk Tomcat and Apache httpd two different machines? Yes its possible. I installed the mod_jk2-2.0.43.dll in apache/modules. Here is what I put into the diffrent config files: httpd.conf: just one single row like this: LoadModule jk2_module modules/mod_jk2-2.0.43.dll Then I added a worker2.properties in Apache/conf/ like this: [logger] level=DEBUG file=c:/programme/apache group/apache2/logs/jk2.log [config] file=c:/programme/apache group/apache2/conf/workers2.properties debug=0 debugEnv=0 # Shared memory handling. Needs to be set. [shm] file=c:/programme/apache group/apache2/logs/shm.file size=1048576 debug=0 #disabled=0 [channel.socket:localhost:8010] port=8010 host=127.0.0.1 debug=0 # Example socket channel, explicitly set port and host. # [channel.socket:localhost:8009] # port=8009 # host=127.0.0.1 # Example UNIX domain socket # [channel.un:/usr/local/tomcat/work/jk2.socket] # tomcatId=localhost:8009 # debug=0 # define the worker [ajp13:localhost:8010] #channel=channel.un:/usr/local/pds/tomcat/work/jk2.socket # To use the TCP/IP socket instead, just comment out the above # line, and uncomment the one below channel=channel.socket:localhost:8010 # define the worker # Announce a status worker # Uri mapping [uri:/examples/*] worker=ajp13:localhost:8010 [uri:/javaroom/*] worker=ajp13:localhost:8010 [status:status] [status:] info=Status worker,displays run time informations [uri:/jkstatus/*] info=Display status information and checks the config file for changes. worker=status:status [uri:/status/*] worker=status:status # end of workers2.properties Finally, I configured this Connector in the Tomcat server.xml: --- Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8010 minProcessors=5 maxProcessors=250 acceptCount=10 debug=0 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / I hope this helps you get it running. -Original Message- From: James R. Marcus [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 3:17 PM To: [EMAIL PROTECTED] Subject: mod_jk Tomcat and Apache httpd two different machines? I want to run tomcat on our build machine and apache with the Jk connector on another is this possible? Are there any good tutorial docs available to do this? Thanks, James - 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: Tomcat4.1.29 Requested resource not available
Nadia Kunkov wrote: Yes, I did try it. Didn't work. Something isn't right in my configuration. What you have done? Did you first make a Context.../Contest for 'test' app based on the block for 'examples', and then run localhost:8080/manager/install?war=test What did you mean by 'Didn't work'? What is the error message? Have you tried to see what apps you have installed by running localhost:8080/manager/list I just tried and it works. What I did were: 1. Make a directory 'test' under your 'webapps' directory. 2. Make a block Context.../Context for 'test' by copying the 'examples' block and changing all the words 'examples' to 'test'. 3. Finally, run localhost:8080/manager/install?war=test That is all. Now I can access the 'test' app by localhost:8080/test, it is empty though. BTW, I have same verison of Tomcat as you are, i.e. 4.1.29. Please also login as a user which has the 'manager' role, in your case it is 'Tomcat', IIRC. Your browser will prompt you for the first time, anyway. I plan to install the next version, Tomcat 5.X now. Could you tell me how different is the configuration from the prvious version? What are the main steps? I don't know, because I have not tried Tomcat 5.x yet. But I think your Tomcat 4.1.29 basically works, since you can see the 'examples' app. Somehow you have problem with your new app 'test'. Need to quiet down and figure it out, otherwise, I will expect you will have the same deploying problem for your new app. Can I find an RPM for that? I can't seem to find one... Is there documentation aside from Jakarta site? Is it a complex install? Which is a stable release in Tomcat 5? I do appreciate your help very much. Thanks N.K. I don't know any of the above questions, as I said, I have not tried the new version, and not planned to do so:) Good luck. Bao -Original Message- From: BAO RuiXian [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 7:06 PM To: Tomcat Users List Subject: Re: Tomcat4.1.29 Requested resource not available Nadia Kunkov wrote: I did add the Context path=/test etc... /Context 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 Context.../Context 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
Re: help in tomcat 5 and MS SQL 2000
In the how-to file you mentioned, there is no example for MS SQL and Sybase. There is an example for mysql. I wonder it works with MS SQL 2000. Someone has similar experience, please share. Thanks, Suchun - Original Message - From: Alan Czajkowski [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 11:37 AM Subject: Re: help in tomcat 5 and MS SQL 2000 u can either: a) search google for this info b) look at Tomcat Documentation in the JNDI Datasource HOW-TO, http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html c) if setting up MS SQL 2000 is anything similar to Sybase ASE (which it should since they used to be the same product), then u can check out Sybase's jConnect 5.5 (which can be downloaded from Sybase's website) and how to set it up with Tomcat, http://info.sybase.com/resolution/detail.stm?id_number=10899047 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] 17/12/2003 10:07 AM Please respond to Tomcat Users List To: [EMAIL PROTECTED] cc: Subject:help in tomcat 5 and MS SQL 2000 Hi, I'd like to learn JSP with Tomcat 5. Any help in how to configure Tomcat in order to connect with MS SQL 2000 server. Thanks in advance, Suchun Wu 1 - 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: help in tomcat 5 and MS SQL 2000
Goto microsoft's site, they have a SQL 2000 JDBC driver available.. -Art -Original Message- From: Suchun Wu [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 8:26 PM To: Tomcat Users List Subject: Re: help in tomcat 5 and MS SQL 2000 In the how-to file you mentioned, there is no example for MS SQL and Sybase. There is an example for mysql. I wonder it works with MS SQL 2000. Someone has similar experience, please share. Thanks, Suchun - Original Message - From: Alan Czajkowski [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 11:37 AM Subject: Re: help in tomcat 5 and MS SQL 2000 u can either: a) search google for this info b) look at Tomcat Documentation in the JNDI Datasource HOW-TO, http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples -howto.html c) if setting up MS SQL 2000 is anything similar to Sybase ASE (which it should since they used to be the same product), then u can check out Sybase's jConnect 5.5 (which can be downloaded from Sybase's website) and how to set it up with Tomcat, http://info.sybase.com/resolution/detail.stm?id_number=10899047 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] 17/12/2003 10:07 AM Please respond to Tomcat Users List To: [EMAIL PROTECTED] cc: Subject:help in tomcat 5 and MS SQL 2000 Hi, I'd like to learn JSP with Tomcat 5. Any help in how to configure Tomcat in order to connect with MS SQL 2000 server. Thanks in advance, Suchun Wu 1 - 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]
xml escaping characters for database password
Hi, I'm using mysql via JDBC and I need to encode a password with non-alphabet characters in it like % in my server.xml. Do I use a URL encoding for this or an XML encoding? Also while I'm on the subject, do I have to encode or escape a double-quote in an xml attribute: mynode attr1=blahblah\blah\blah/ or is there some other encoding I should use? 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]
RE: Tomcat4.1.29 Requested resource not available
Thank you. You have just encouraged me to try it again. I will check everything I've done and follow all your steps and see what'll happen. I will let you know if it works. Thanks for your continuous help. N.K. -Original Message- From: BAO RuiXian [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 7:09 PM To: Tomcat Users List Subject: Re: Tomcat4.1.29 Requested resource not available Nadia Kunkov wrote: Yes, I did try it. Didn't work. Something isn't right in my configuration. What you have done? Did you first make a Context.../Contest for 'test' app based on the block for 'examples', and then run localhost:8080/manager/install?war=test What did you mean by 'Didn't work'? What is the error message? Have you tried to see what apps you have installed by running localhost:8080/manager/list I just tried and it works. What I did were: 1. Make a directory 'test' under your 'webapps' directory. 2. Make a block Context.../Context for 'test' by copying the 'examples' block and changing all the words 'examples' to 'test'. 3. Finally, run localhost:8080/manager/install?war=test That is all. Now I can access the 'test' app by localhost:8080/test, it is empty though. BTW, I have same verison of Tomcat as you are, i.e. 4.1.29. Please also login as a user which has the 'manager' role, in your case it is 'Tomcat', IIRC. Your browser will prompt you for the first time, anyway. I plan to install the next version, Tomcat 5.X now. Could you tell me how different is the configuration from the prvious version? What are the main steps? I don't know, because I have not tried Tomcat 5.x yet. But I think your Tomcat 4.1.29 basically works, since you can see the 'examples' app. Somehow you have problem with your new app 'test'. Need to quiet down and figure it out, otherwise, I will expect you will have the same deploying problem for your new app. Can I find an RPM for that? I can't seem to find one... Is there documentation aside from Jakarta site? Is it a complex install? Which is a stable release in Tomcat 5? I do appreciate your help very much. Thanks N.K. I don't know any of the above questions, as I said, I have not tried the new version, and not planned to do so:) Good luck. Bao -Original Message- From: BAO RuiXian [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 7:06 PM To: Tomcat Users List Subject: Re: Tomcat4.1.29 Requested resource not available Nadia Kunkov wrote: I did add the Context path=/test etc... /Context 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 Context.../Context 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
Re: xml escaping characters for database password
At 05:34 PM 12/17/2003, you wrote: Hi, I'm using mysql via JDBC and I need to encode a password with non-alphabet characters in it like % in my server.xml. Do I use a URL encoding for this or an XML encoding? I don't know for sure as I haven't used mysql specifically, but if the password will be read by an xml parser, then you'll want to xml encode it. If the password is part of a URI that is specified in an XML, then you'll want to URL-encode the character(s) and XML encode any problematic characters from that output. Also while I'm on the subject, do I have to encode or escape a double-quote in an xml attribute: mynode attr1=blahblah\blah\blah/ quot; in this case. This can depend on your parser (or at least it has in older parsers). Thanks Adam justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xml escaping characters for database password
On 12/18/2003 02:54 AMnbsp;Justin Ruthenbeck wrote: At 05:34 PM 12/17/2003, you wrote: Hi, I'm using mysql via JDBC and I need to encode a password with non-alphabet characters in it like % in my server.xml. Do I use a URL encoding for this or an XML encoding? I don't know for sure as I haven't used mysql specifically, but if the password will be read by an xml parser, then you'll want to xml encode it. If the password is part of a URI that is specified in an XML, then you'll want to URL-encode the character(s) and XML encode any problematic characters from that output. Also while I'm on the subject, do I have to encode or escape a double-quote in an xml attribute: mynode attr1=blahblah\blah\blah/ quot; in this case. This can depend on your parser (or at least it has in older parsers). Thanks Adam justin Thanks v. much 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]
UserDatabaseRealm 5.0.16 - immediately available for use by the Realm??
1) I configured the default authentication realm - UserDatabaseRealm, which is setup to use conf/tomcat-users.xml. However, I am confused about the following statement: This Realm uses the UserDatabase configured in the global JNDI resources under the key UserDatabase. Any edits that are performed against this UserDatabase are immediately available for use by the Realm. 2) Does this mean that I can add user to the conf/tomcat-users.xml and Tomcat will be able to authenticate without restarting the server? - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
Re: UserDatabaseRealm 5.0.16 - immediately available for use by the Realm??
I think that is refering to a RDBMS realm. Last time I checked, tomcat-users.xml was only read on startup. Ron Andersen wrote: 1) I configured the default authentication realm - UserDatabaseRealm, which is setup to use conf/tomcat-users.xml. However, I am confused about the following statement: This Realm uses the UserDatabase configured in the global JNDI resources under the key UserDatabase. Any edits that are performed against this UserDatabase are immediately available for use by the Realm. 2) Does this mean that I can add user to the conf/tomcat-users.xml and Tomcat will be able to authenticate without restarting the server? - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RequestDispatcher in servlet is not working
Hello everyone, My servlet after processing something from the HttpServletRequest received by it - is supposed to forward the request using RequestDispatcher - but it is not doing so.(Only when directly forwarded without doing any initial processing with the request - it gets forwarded).Please give a solution for this. Thanks and regards, Tejashri. - Do you Yahoo!? Free Pop-Up Blocker - Get it now
Re: RequestDispatcher in servlet is not working
Request dispatcher is working fine for me. Can you send some code and a description of your environment? On Wednesday 17 December 2003 10:57 pm, you wrote: Hello everyone, My servlet after processing something from the HttpServletRequest received by it - is supposed to forward the request using RequestDispatcher - but it is not doing so.(Only when directly forwarded without doing any initial processing with the request - it gets forwarded).Please give a solution for this. Thanks and regards, Tejashri. - Do you Yahoo!? Free Pop-Up Blocker - Get it now - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache 2.0.48 Virtualhost with Tomcat
I have two Apache 2.0.48 / Tomcat 4.1.29 where I have both servers running with JK/2 connector. The server is a W2K server (No IIS) I can bring up both local Tomcat sites respectively with the following: http://localhost/thegoodsite and http://localhost/therealgoodsite Both websites will share the same IP address. My webapp are located in the following directories D:\java\Tomcat41\webapps\thegoodsite D:\java\Tomcat41\webapps\therealgoodsite My question is how do I define the DocumentRoot reference in each VirtualHost section and do I need to reference JKMOUNT for each VirtualHost? I don't have any html's in Apache. Nothing but all jsp's in Tomcat webapps Thanks in advance for your help. Lenny Sorey NameVirtualHost 172.20.30.40 VirtualHost 172.20.30.40 DocumentRoot /www/example1 ServerName www.thegoodsite.com /VirtualHost VirtualHost 172.20.30.40 DocumentRoot /www/example2 ServerName www.therealgoodsite.com /VirtualHost - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]