Re: book for servlet programming
3/ Download a copy of the servlet spec (java.sun.com) and give it a good skim. It's dry -- it's a spec, after all -- but it contains what every servlet developer should know. Sticking to spec-compliant code will make your apps container-agnostic, such that you can use Tomcat, WebLogic, etc with little difficulty. I second that whole heartedly. It is essential to understand that everything is driven by the specifications - make them your bibles. The O'Reilly Java Servlet and JSP Cookbook book is also a good secondary source. Harry Mantheakis London, UK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to create object when context app inits and make it accesible to context by JNDI
Hi all, i like to create an object when context app inits and make it accesible to all context JSPs, classes, etc. by JNDI, i've used Resource and ResourceParams in $CATALINA_HOME/conf/server.xml and resource-env-ref in $CATALINA_HOME/context-app/WEB-INF/web.xml but it creates one new instance everytime i run: Context ic=null; try { ic=new InitialContext(); paramsWeb= (WebAppParams) ic.lookup(java:comp/env/chua/WebAppParams); . . . } Any ideas? Thanks in advance Mariano - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Releasing memory on undeploy
Hi, I'm one of the committers on commons-logging and am currently looking into memory-leak issues with j2ee/servlet-engine stuff when undeploying apps that use commons-logging. I see the following page in the tomcat FAQ states that classloaders cannot be garbage-collected in tomcat: http://jakarta.apache.org/tomcat/faq/deployment.html Can someone confirm this is in fact true, and if so explain why? Thanks, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: changing my web app and then deploying takes a lot of time!!!
Hi again, In my case, the application's WEB-INF/web.xml change does not trigger a reload although I have WatchedResourceWEB-INF/web.xml/WatchedResource in context.xml. No idea why this does not work. But a change of the application's context descriptor triggers a reload, e.g.: touch yourCatalinaHome/conf/Catalina/yourDotcom/ROOT.xml No idea why this works. Have you tried it? Regards, Bernard On Fri, 18 Mar 2005 02:33:46 +, you wrote: Hi again! I am currently developoing a web application and whenever I change my project (jsp file or java classes) I have to deploy and undeploy the application again. Which take a lot of time and it drives me crazy!!! Do you know how can I foce tomcat to deploy my build directory and whenever I change something in the build directory it can automatically detect it and refresh the deployed web application? Thank you in advance, Kostas - 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]
Windows NT
Hi, Shouldn't TC install under (not manufacturer supported any more) Windows NT 4? I´m using a product called DeskNow and it uses Tomcat 5.x. Unfortunately (or not), ver 2.6 of the product started using ver 5.x of Tomcat. I use a retired WinNT box as the DeskNow Server, but, when upgrading to version 2.6, service registration failed with the following message on Dr. Watson: Title: desknow.exe Exception: access violation (0x0005), Address 0x77f92a66 In event viewer, the corresponding message is: The application, , generated an application error The error occurred on 2/22/2005 @ 11:10:20.763 The exception generated was c005 at address 77f92a66 (wcslen) Since WinNT is not supported anymore by MS, I was instructed by DeskNow Support to contact Tomcat support, in the hope that you can give somehelp. I'll not justify my choice of (unsupported) WinNT as my server for this application, but I'll say that it's what we have available now. Thanks for your attention and time, Best regards Serginho
Re: Windows NT
On Fri, 2005-03-18 at 08:13 -0300, Inove Infoshop Ltda wrote: Hi, Shouldn't TC install under (not manufacturer supported any more) Windows NT 4? I´m using a product called DeskNow and it uses Tomcat 5.x. Unfortunately (or not), ver 2.6 of the product started using ver 5.x of Tomcat. I use a retired WinNT box as the DeskNow Server, but, when upgrading to version 2.6, service registration failed with the following message on Dr. Watson: Title: desknow.exe Exception: access violation (0x0005), Address 0x77f92a66 Well, tomcat itself is a pure-java application. As such, as long as you have a working java virtual machine you can run tomcat, regardless of what the operating system is. I'm 99.99% sure that it will still work on NT as a stand-alone program, so there's always that option as long as you don't absolutely *have* to run it as a windows service. [1] But java doesn't support the concept of a windows service natively. Tomcat does that via the commons-daemon library that provides some native code to do that on various platforms; see http://jakarta.apache.org/commons/daemon. I would suggest investigating what version of commons-daemon your Tomcat instance uses, then have a look at what platforms that version of commons-daemon supports. If the latest release has dropped support for NT then you might be able to install an old release of commons-daemon over what DeskNow bundles. There's also the possibility that the crash is not anything to do with Tomcat, but instead in some custom code provided by DeskNow. You said that service registration failed but I'm not sure exactly what that means. Are you sure the crash is occurring within some part of tomcat or commons-daemon? [1] Of course if DeskNow is just a java application, then you could also run it on Linux :-) Cheers, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: changing my web app and then deploying takes a lot of time!!!
I am currently developoing a web application and whenever I change my project (jsp file or java classes) I have to deploy and undeploy the application again. Which take a lot of time and it drives me crazy!!! Do you know how can I foce tomcat to deploy my build directory and whenever I change something in the build directory it can automatically detect it and refresh the deployed web application? See the documentation for the 'reloadable' Context attribute: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html HTH Harry Mantheakis London, UK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk under Win32 (Tomcat 5.0.28, apache 1.13.33)
I installed apache 1.13.33 and tomcat 5.0.28. Both servers are running. I can test tomcat fine on port 8080. Now I want to integrate apache with tomcat and downloaded the mod_jk 1.2 binary .so file from http://jakarta.apache.org/site/downloads/downloads_tomcat-connectors.cgi I installed it as mod_jk.so in Apache\modules but when starting apache I get an error G:\Programme\Apache_Group\Apacheapache Syntax error on line 992 of g:/programme/apache_group/apache/conf/httpd.conf: Cannot load g:/programme/apache_group/apache/modules/mod_jk.so into server: (127 ) Die angegebene Prozedur wurde nicht gefunden: Portions of my httpd.conf: ClearModuleList #AddModule mod_vhost_alias.c AddModule mod_env.c AddModule mod_log_config.c #AddModule mod_mime_magic.c AddModule mod_mime.c AddModule mod_negotiation.c #AddModule mod_status.c #AddModule mod_info.c AddModule mod_include.c AddModule mod_autoindex.c AddModule mod_dir.c # and at the end: LoadModule jk_module modules/mod_jk.so JkWorkersFile g:\Programme\Apache_Group\Tomcat 5.0\conf\workers.properties JkLogFile g:\Programme\Apache_Group\Apache\logs\mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkMount /*.jsp ajp13 --- AddModule mod_isapi.c AddModule mod_cgi.c AddModule mod_asis.c AddModule mod_imap.c AddModule mod_actions.c #AddModule mod_speling.c AddModule mod_userdir.c AddModule mod_alias.c #AddModule mod_rewrite.c AddModule mod_access.c AddModule mod_auth.c #AddModule mod_auth_anon.c Any clues? -- Chris Christoph P. U. Kukulies kuku_at_kukulies.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[tomcat-user] Postgres + JDBC
First of all, hello to the groupe. I'm a newbi as far as tomcat is concerned, so if this is really stupid, sorry for wasting your time. I'm trying to get a JDBC Data pool connection up using Tomcat and postgres SQL. My JNDI source is configured, and when I : Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/postgres); I get a Datasource with all the details I entered. The problem is that when I try to connect, I get the following error: Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgres://10.201.1.10/QCM' postgres-8.0.309.jdbc3.jar is in common/lib, yet removing it, or movining it to shared/lib or $WEBAPP/WEB-INF/lib doesn't change the error. I'm running postgresql 8.0 and tomcat 5.0.28. TIA for your time, all suggestions greatly appreciated. David ADSL JUSQU'A 8 MEGA + 3 MOIS DE TELEPHONE GRATUIT L'ultra haut débit à 15EUR/mois seulement ! Et vous téléphonez gratuitement en France vers les postes fixes, hors numéros spéciaux pendant 3 mois. Pour profiter de cette offre exceptionnelle, cliquez ici : http://register.tiscali.fr/adsl/ (voir conditions sur le site) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [tomcat-user] Postgres + JDBC
Try changing the url to postgresql instead of postgres. On Fri, 18 Mar 2005 13:44:08 +0100, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: First of all, hello to the groupe. I'm a newbi as far as tomcat is concerned, so if this is really stupid, sorry for wasting your time. I'm trying to get a JDBC Data pool connection up using Tomcat and postgres SQL. My JNDI source is configured, and when I : Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/postgres); I get a Datasource with all the details I entered. The problem is that when I try to connect, I get the following error: Cannot create JDBC driver of class 'org.postgresql.Driver' for connect URL 'jdbc:postgres://10.201.1.10/QCM' postgres-8.0.309.jdbc3.jar is in common/lib, yet removing it, or movining it to shared/lib or $WEBAPP/WEB-INF/lib doesn't change the error. I'm running postgresql 8.0 and tomcat 5.0.28. TIA for your time, all suggestions greatly appreciated. David ADSL JUSQU'A 8 MEGA + 3 MOIS DE TELEPHONE GRATUIT L'ultra haut débit à 15EUR/mois seulement ! Et vous téléphonez gratuitement en France vers les postes fixes, hors numéros spéciaux pendant 3 mois. Pour profiter de cette offre exceptionnelle, cliquez ici : http://register.tiscali.fr/adsl/ (voir conditions sur le site) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- rgds Antony Paul http://www.geocities.com/antonypaul24/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 on VPS service stops
Caldarale, Charles R wrote: From: Stanczak Group [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat 5 on VPS service stops Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. I thought when Tomcat ran out of ram it left a log entry? Tomcat never got started - the JVM didn't initialize far enough to even start loading Tomcat. Hum, well, you think increasing ram will help? No, just change the -Xmx parameter to something reasonable, say at least 256m. Ok, I've upped the -Xmx256m. Hope that works. I took out all the other params. I had -Xms48m -Xmx128m -Xss1m -server -Xincgc -Xrs but now I just have -Xmx256m -server. Does that look ok or do you see any params I should add or added back? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 on VPS service stops
Caldarale, Charles R wrote: From: Stanczak Group [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat 5 on VPS service stops Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. I thought when Tomcat ran out of ram it left a log entry? Tomcat never got started - the JVM didn't initialize far enough to even start loading Tomcat. How could it not be started. I could access one of my servlets on it. Or does that just mean that had loaded and the rest was still loading? Hum, well, you think increasing ram will help? No, just change the -Xmx parameter to something reasonable, say at least 256m. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Production Deployment Problem
Return Receipt Your Production Deployment Problem document: wasIlya Nabedrik/PHIL/FRS received by: at:03/18/2005 08:26:42 AM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Default password
What is the default login for tomcat 5.0.30 tomcat admin and tomcat manager I tried admin as username and admin as password it's not working Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default password
Hi, there is no default login/passwd. You have to edit $CATALINA_HOME/conf/tomcat-users.xml and add: role rolename=manager/ role rolename=admin/ user username=myuser password=mypass roles=manager, admin/ - Trond samsher khan wrote: What is the default login for tomcat 5.0.30 tomcat admin and tomcat manager I tried admin as username and admin as password it's not working Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony - 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]
Thanks Trond
Thanks Trond Actually in office I am using Tomcat 5.0.25 and there admin, admin was working but at home I downloaded 5.0.30 I tried the same password but it was not working. Thanks It would be great if u can help me with one more problem. at office I am using tomcat 5.0.25. In that server my jsp's are running but when I try to run servlet in IE the browser tell me download the war file instead of executing it. Thanks once again samsher khan --- Trond G. Ziarkowski [EMAIL PROTECTED] wrote: Hi, there is no default login/passwd. You have to edit $CATALINA_HOME/conf/tomcat-users.xml and add: role rolename=manager/ role rolename=admin/ user username=myuser password=mypass roles=manager, admin/ - Trond samsher khan wrote: What is the default login for tomcat 5.0.30 tomcat admin and tomcat manager I tried admin as username and admin as password it's not working Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony - 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] Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logging in Tomcat 5.5
I'm *guessing* you're facing some of the issues I have been. I believe you'll essentially need to set up a separate LoggerRepository (based on classloader, not thread or contextual class loader) and provide separate config files for each. I've got log4j.jar in my WEB-INF/lib, I'm using my own static/classloader-based LoggerRepository, and this keeps Tomcat's logs using their own LoggerRepository and a separate logging configuration. I'm still not to where I want to be with this, but it's a far cry from the out-of-the-box mess that occurs with log4j and commons-logging. -- Jess Holle Joy Kenneth Harry wrote: Hi, I have a webapp in tomcat. I am using a separate Log4j.xml for it, in its WEB-INF classes folder. I've also put a Log4j.xml in TOMCAT_HOME/ common/classes and set it to false so that I do not get the general Tomcat logs. But even then my project logs are getting mixed with the TOMCAT logs. Is there any way to disable TOMCAT logs. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5 on VPS service stops
I was just trying to start the second tomcat server and then access the servlet a few minutes after it started and got this error: -bash: fork: Cannot allocate memory Any thoughts on this? Caldarale, Charles R wrote: From: Stanczak Group [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat 5 on VPS service stops Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. I thought when Tomcat ran out of ram it left a log entry? Tomcat never got started - the JVM didn't initialize far enough to even start loading Tomcat. Hum, well, you think increasing ram will help? No, just change the -Xmx parameter to something reasonable, say at least 256m. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Struts = Problems with my first page
Hi There, I've created MyFirstStrutsPage.jsp: %@ page language=java % %@ taglib uri=/struts-bean.tld prefix=bean % %@ taglib uri=/struts-html.tld prefix=html % %@ taglib uri=/struts-logic.tld prefix=logic % html:html locale=true head titleTest Struts Page/title html:base/ /head bodybean:message key=index.text1 //body /html:html and my web.xml is as followed: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=_http://java.sun.com/xml/ns/j2ee_ (http://java.sun.com/xml/ns/j2ee) xmlns:xsi=_http://www.w3.org/2001/XMLSchema-instance_ (http://www.w3.org/2001/XMLSchema-instance) xsi:schemaLocation=_http://java.sun.com/xml/ns/j2ee_ (http://java.sun.com/xml/ns/j2ee) _http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd_ (http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd) version=2.4 display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description !-- JSPC servlet mappings start -- servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping !-- Define Struts -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping taglib taglib-uri/struts-tiles.tld/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib taglib taglib-uri/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib /web-app and i've created ApplicationResources.properties with the following entries: index.title = My first Struts application! index.text1 = This is my first Dynamic Struts application. However, when i request MyFirstStrutsPage.jsp is get the following error ( what have i done wrong, any ideas on how to fix it?): org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NullPointerException org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1219) org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) org.apache.jsp.registeruser_jsp._jspx_meth_bean_message_0(org.apache.jsp.registeruser_jsp:157) org.apache.jsp.registeruser_jsp._jspx_meth_html_html_0(org.apache.jsp.registeruser_jsp:118) org.apache.jsp.registeruser_jsp._jspService(org.apache.jsp.registeruser_jsp:73) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.service JspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
JNDI Realm with eDirectory
Hi, I am looking into configuring a jndi realm to eDirectory for authentication and authorization. I have not used to eDirectory before, I am more familiar to open ldap and Sun one ldap. There is no uid attribute or password attribute for user in eDirectory. Has anyone configured a jndi realm to eDirectory server, if so can you please guide me to resources. I appreciate any help in this regard Thank you Taxiboy __ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Struts = Problems with my first page
This has to do with the applicationresources.properties files that you have configured in your struts-config.xml. It's not able to find the properties file that you have specified under the message-resources XML element, in the struts xml config file. This properties file can be placed under any WEB-INF directory, provided message-resources element points to it. Just check out one of the sample struts application. Vinod -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, March 18, 2005 9:57 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat Struts = Problems with my first page Hi There, I've created MyFirstStrutsPage.jsp: %@ page language=java % %@ taglib uri=/struts-bean.tld prefix=bean % %@ taglib uri=/struts-html.tld prefix=html % %@ taglib uri=/struts-logic.tld prefix=logic % html:html locale=true head titleTest Struts Page/title html:base/ /head bodybean:message key=index.text1 //body /html:html and my web.xml is as followed: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=_http://java.sun.com/xml/ns/j2ee_ (http://java.sun.com/xml/ns/j2ee) xmlns:xsi=_http://www.w3.org/2001/XMLSchema-instance_ (http://www.w3.org/2001/XMLSchema-instance) xsi:schemaLocation=_http://java.sun.com/xml/ns/j2ee_ (http://java.sun.com/xml/ns/j2ee) _http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd_ (http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd) version=2.4 display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description !-- JSPC servlet mappings start -- servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping !-- Define Struts -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping taglib taglib-uri/struts-tiles.tld/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib taglib taglib-uri/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib /web-app and i've created ApplicationResources.properties with the following entries: index.title = My first Struts application! index.text1 = This is my first Dynamic Struts application. However, when i request MyFirstStrutsPage.jsp is get the following error ( what have i done wrong, any ideas on how to fix it?): org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:373) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NullPointerException org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java :1219) org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) org.apache.jsp.registeruser_jsp._jspx_meth_bean_message_0(org.apache.jsp .registeruser_jsp:157) org.apache.jsp.registeruser_jsp._jspx_meth_html_html_0(org.apache.jsp.re gisteruser_jsp:118) org.apache.jsp.registeruser_jsp._jspService(org.apache.jsp.registeruser_ jsp:73) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:325) org.apache.jasper.servlet.JspServlet.service JspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Re: Tomcat Struts = Problems with my first page
ARe you requesting by typing in the browser http://localhost:8080/MyFirstStrutsPage.jsp? --- [EMAIL PROTECTED] wrote: Hi There, I've created MyFirstStrutsPage.jsp: %@ page language=java % %@ taglib uri=/struts-bean.tld prefix=bean % %@ taglib uri=/struts-html.tld prefix=html % %@ taglib uri=/struts-logic.tld prefix=logic % html:html locale=true head titleTest Struts Page/title html:base/ /head bodybean:message key=index.text1 //body /html:html and my web.xml is as followed: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=_http://java.sun.com/xml/ns/j2ee_ (http://java.sun.com/xml/ns/j2ee) xmlns:xsi=_http://www.w3.org/2001/XMLSchema-instance_ (http://www.w3.org/2001/XMLSchema-instance) xsi:schemaLocation=_http://java.sun.com/xml/ns/j2ee_ (http://java.sun.com/xml/ns/j2ee) _http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd_ (http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd) version=2.4 display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description !-- JSPC servlet mappings start -- servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping !-- Define Struts -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping taglib taglib-uri/struts-tiles.tld/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib taglib taglib-uri/struts-html.tld/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/struts-logic.tld/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib /web-app and i've created ApplicationResources.properties with the following entries: index.title = My first Struts application! index.text1 = This is my first Dynamic Struts application. However, when i request MyFirstStrutsPage.jsp is get the following error ( what have i done wrong, any ideas on how to fix it?): org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NullPointerException org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1219) org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) org.apache.jsp.registeruser_jsp._jspx_meth_bean_message_0(org.apache.jsp.registeruser_jsp:157) org.apache.jsp.registeruser_jsp._jspx_meth_html_html_0(org.apache.jsp.registeruser_jsp:118) org.apache.jsp.registeruser_jsp._jspService(org.apache.jsp.registeruser_jsp:73) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.service JspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Struts = Problems with my first page
Yes, this is correct..
Re: Tomcat Struts = Problems with my first page
You cannot access the jsp like http://localhost:8080/MyFirstPage.jsp You should use Sturts-config to map your action to that JSP page. Then you should access the page which looks similar to http://localhost:8080/FirstAction.do --- [EMAIL PROTECTED] wrote: Yes, this is correct.. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache/Tomcat 4.1.18 - Displaying empty Strings as null
Hello, I recently installed Apache/Tomcat v 4.1.18 on my new server, and I have a JSP page that extracts values from an Oracle database, if the value in the database is an empty String (), it returns as a null value in my JSP page. I have another server with Tomcat v. 4.1.31, and I am not having this issue. The new server has JDK v. 1.4.2 and my old server has v. 1.4.1. Any ideas will help. Thanks Confidentiality Note: The preceding e-mail message (including any attachments) contains information that may be confidential, protected by applicable legal privileges, or constitute non-public information. It is intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this message, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution or reproduction of this message by unintended recipients is not authorized and may be unlawful. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache/Tomcat 4.1.18 - Displaying empty Strings as null
Return Receipt Your Apache/Tomcat 4.1.18 - Displaying empty Strings as null document: wasIlya Nabedrik/PHIL/FRS received by: at:03/18/2005 11:15:58 AM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default password
Trond G. Ziarkowski said: there is no default login/passwd. You have to edit $CATALINA_HOME/conf/tomcat-users.xml and add: role rolename=manager/ role rolename=admin/ user username=myuser password=mypass roles=manager, admin/ As I had the same problem with Tomcat 4: Is this little item somewhere to be found in the downloaded material with Tomcat 5? With TC4, it seemed well hidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default password
http://jakarta.apache.org/tomcat/faq/security.html#login -Tim Mieke Banderas wrote: Trond G. Ziarkowski said: there is no default login/passwd. You have to edit $CATALINA_HOME/conf/tomcat-users.xml and add: role rolename=manager/ role rolename=admin/ user username=myuser password=mypass roles=manager, admin/ As I had the same problem with Tomcat 4: Is this little item somewhere to be found in the downloaded material with Tomcat 5? With TC4, it seemed well hidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Default password
From: Mieke Banderas [mailto:[EMAIL PROTECTED] Subject: Re: Default password As I had the same problem with Tomcat 4: Is this little item somewhere to be found in the downloaded material with Tomcat 5? With TC4, it seemed well hidden. Seems to be fairly prominently discussed at: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/manager-howto.html#Configuring%20Manager%20Application%20Access - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache/Tomcat 4.1.18 - Displaying empty Strings as null
install tomcat 4.1.31 on your new server Mendez, Eric wrote: Hello, I recently installed Apache/Tomcat v 4.1.18 on my new server, and I have a JSP page that extracts values from an Oracle database, if the value in the database is an empty String (), it returns as a null value in my JSP page. I have another server with Tomcat v. 4.1.31, and I am not having this issue. The new server has JDK v. 1.4.2 and my old server has v. 1.4.1. Any ideas will help. Thanks Confidentiality Note: The preceding e-mail message (including any attachments) contains information that may be confidential, protected by applicable legal privileges, or constitute non-public information. It is intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this message, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution or reproduction of this message by unintended recipients is not authorized and may be unlawful. - 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]
Issue displaying empty Strings as null
I recently installed Apache/Tomcat v 4.1.31 on my server, and I have several JSP sites that extract values from an Oracle database, if the value in the database is an empty String (), it returns as a null value in my JSP page. The server has JDK v. 1.4.2. Any ideas will help. Thanks Confidentiality Note: The preceding e-mail message (including any attachments) contains information that may be confidential, protected by applicable legal privileges, or constitute non-public information. It is intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this message, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution or reproduction of this message by unintended recipients is not authorized and may be unlawful. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat behind IIS
Hi all, I installed a tomcat 5.0 behind an IIS server. Everything works fine with the connector. Now, I would like that Tomcat only accepts connections from this IIS server and not from others computers (still accessible from http://myhost:8080/myApplication http://myhost:8080/myApplication ). Is there a simple way to do this in server.xml (or other tomcat config files) or do I have to install a firewall ? Thanks in advance. Fred. Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.Tout message electronique est susceptible d'alteration. Le CREDIT DU NORD et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. This message and any attachments ( the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited.E-mails are susceptible to alteration. Neither CREDIT DU NORD nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.
RE: Tomcat behind IIS
sure, just go into your server.xml and remove the web connector Connector port=8080 / I'm using the minimal server.xml (slightly modified) so there may be more parameters in yours. This element is contained with in the Service tag which is in the Server tag. Daniel -Original Message- From: VAN DER MARLIERE FREDERIC [mailto:[EMAIL PROTECTED] Sent: Friday, March 18, 2005 10:58 AM To: tomcat-user@jakarta.apache.org Cc: MAES NICOLAS Subject: Tomcat behind IIS Hi all, I installed a tomcat 5.0 behind an IIS server. Everything works fine with the connector. Now, I would like that Tomcat only accepts connections from this IIS server and not from others computers (still accessible from http://myhost:8080/myApplication http://myhost:8080/myApplication ). Is there a simple way to do this in server.xml (or other tomcat config files) or do I have to install a firewall ? Thanks in advance. Fred. Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.Tout message electronique est susceptible d'alteration. Le CREDIT DU NORD et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. This message and any attachments ( the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited.E-mails are susceptible to alteration. Neither CREDIT DU NORD nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Issue displaying empty Strings as null
Return Receipt Your Issue displaying empty Strings as null document: wasIlya Nabedrik/PHIL/FRS received by: at:03/18/2005 12:25:15 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Thanks Trond
Hi, at office I am using tomcat 5.0.25. In that server my jsp's are running but when I try to run servlet in IE the browser tell me download the war file instead of executing it. How do you deploy your war file? I'm guessing that you have not used the manager since you could not login? The only way I can make sense of this, is if you have copied the war file into $CATALINA_HOME/webapps/ROOT/ and try to access it from your browser by entering http://localhost:8080/myapp.war. If this is the case then you should copy the file into $CATALINA_HOME/webapps instead and tomcat will automatically expand your war file into a directory named after your war file, and you should be able to access your jsp files by entering http://localhost:8080/myapp/myfile.jsp If you have deployed your war file correctly I don't know what is causing this behaviour. - Trond - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
deleteOnExit doesn't seem to be working for session temporary files..
In our setup, we have JSP's that create a temporary file with the deleteOnExit flag set. The session timeout (getMaxInactiveInterval) appears to be the default of 1800 seconds (30 minutes). We are blasting our servlet container (tomcat and jetty) with JSP fetches (that don't handle cookies - http_load if you are curious as to what we are using) and noting that these files stick around till the servlet container itself quits (the java process goes away). At that point ALL the files are deleted, and it can take HOURS in some cases to do so. Is this expected behavior? We think that these files should be deleted when the session expires. That seems like the right thing to do. Jetty appears to perform similarly except that it actually CRASHES with outOfMem errors after enough files are opened this way. Tomcat seems more stable. Jetty 4.2.17, Tomcat 5.0.16. Thanks for all help. - Joseph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Interframework Authentication.
Howdy all, I am writing an web application for a client in which customers can browse an order database. This application would be linked to from a .net application in which the said user has already been authenticated. Can anyone suggest or know of an authentication scheme which could be shared by both so the customers don't have to log in twice? Cheers, Elam Daly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
memory usage
Hi everyone, I'm not quite sure where to post this problem - the tomcat, tapestry or cayenne mailing list - but here goes... I have an app built on the mentioned technologies. I click arround and monitor the memory usage (using the Win task manager - good enough for rough measurements). The memory usage seems to grow up to a 100 MB (Cayenne accesses a single table of about fifty attributes and a 1000 rows - don't ask) and sometimes - I can't reproduce the problem now - the app brakes when trying to open a new page. The exception says something about not having enough memory. Ring any bells, anyone? Thanks for your effort, Tomislav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Interframework Authentication.
You might look into: http://tp.its.yale.edu/tiki/tiki-index.php?page=CentralAuthenticationService Elam Daly wrote: Howdy all, I am writing an web application for a client in which customers can browse an order database. This application would be linked to from a .net application in which the said user has already been authenticated. Can anyone suggest or know of an authentication scheme which could be shared by both so the customers don't have to log in twice? Cheers, Elam Daly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Robert r. Sanders Chief Technologist iPOV (334) 821-5412 www.ipov.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cluster Deployment Question
I am ready to set Tomcat up in a clustered environment. So to test I have installed two instances of Tomcat 5.5.7 on the same XP machine. One listens on 8080 and the other on 8081. I configured the server.xml as follows... Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=true notifyListenersOnReplication=true Membership className=org.apache.catalina.cluster.mcast.McastService mcastAddr=228.0.0.4 mcastPort=45564 mcastFrequency=500 mcastDropTime=3000 / Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=auto tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=10 / Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled ackTimeout=15000 / Valve className=org.apache.catalina.cluster.tcp.ReplicationValve filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt; / Deployer className=org.apache.catalina.cluster.deploy.FarmWarDeployer tempDir=/tmp/war-temp/ deployDir=/tmp/war-deploy/ watchDir=/tmp/war-listen/ watchEnabled=false / /Cluster ...with tcpListenPort as 4001 in one instance and 4002 in the other. With watchEnabled false on one but true on the other. The Tomcat instances start fine and both indicate... INFO: Replication member added ...when started. This tells me that they see each other. When I try to deploy a web-app by dropping it in the war-listen directory I get... SEVERE: Unable to install WAR file java.io.FileNotFoundException: C:\tmp\war-deploy\clustertest.war (The system cannot find the path specified) ...okay, so that doesn't work. So I try to deploy through the manager on 8080 using Select WAR file to upload... The 8080 server says: WARNING: Manager[/clustertest], requesting session state from org.apache.catalina.cluster.mcast.McastMember[tcp://123.321.21.25:4002,1 41.254.21.25,4002, alive=227500]. This operation will timeout if no session state has been received within... The 8081 server then says: Mar 18, 2005 3:03:35 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster messageDataReceived WARNING: Context manager doesn't exist:/clustertest ...then the 8080 server waits, then times out and says... SEVERE: Manager[/clustertest], No session state received, timing out. ...any ideas? Seems like the Tomcats are talking and trying, but can't send the WAR from one to the other. Bernard Durfee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to setup demo app?
I'm trying to setup a demo site for my web app. I want customers to be able to try out this app and do what they like. Then once a day or so I want to shutdown that web app and refresh it back to original. How can I do this without having to shutdown Tomcat? I don't know how to undeploy an app from a cron script. -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to setup demo app? Nevermind.
Sorry my mistake. It's right there in the docs. RTFM. Sorry. Stanczak Group wrote: I'm trying to setup a demo site for my web app. I want customers to be able to try out this app and do what they like. Then once a day or so I want to shutdown that web app and refresh it back to original. How can I do this without having to shutdown Tomcat? I don't know how to undeploy an app from a cron script. -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to setup demo app?
Hey Justin, I think this might help: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html You could use wget from cron to send url commands to an isolated port. thx. jc On Fri, 18 Mar 2005 15:21:15 +, Stanczak Group [EMAIL PROTECTED] wrote: I'm trying to setup a demo site for my web app. I want customers to be able to try out this app and do what they like. Then once a day or so I want to shutdown that web app and refresh it back to original. How can I do this without having to shutdown Tomcat? I don't know how to undeploy an app from a cron script. -- Justin Stanczak Stanczak Group 812-735-3600 All that is necessary for the triumph of evil is that good men do nothing. Edmund Burke .....__. ./ _/....._/..|_..... /...\../.__.\./\...__\/.._.\./._..\ \\_\..\..___/|...|..\..|.(.._.|._..) .\__../\___.._\__|../__|..\/.\/.. \/.\/.\/.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- | Jon Cline Chief Product Evangelist Enthusiast, Inc www.enthusiastinc.com [EMAIL PROTECTED] 626.256.3505 | *Need help? Email [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
auto deploy host + context
Hello there. I am new to this list but glad to have discovered Tomcat. :D I am using Tomcat 5.0.28. I have read the docs on auto deployment here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html and cannot find information regarding deploying both a unique host entry as well as a context. I am trying to find a way to place a new WAR in webapps with a unique host and context to the server without rebooting the entire tomcat instance. Up to this point, we have manually added this snipped to server.xml, placed the WAR with no META-INF directory in the /webapps dir and retarted tomcat to load a new site: Host name=www.enthusiastinc.com debug=1 appBase=webapps/www_enthusiastinc_com unpackWARs=true autoDeploy=true Context path= docBase= debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=www.enthusiastinc.com_access_log. suffix=.log pattern=common resolveHosts=false/ /Host jc -- | Jon Cline Chief Product Evangelist Enthusiast, Inc www.enthusiastinc.com [EMAIL PROTECTED] 626.256.3505 | *Need help? Email [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deleteOnExit doesn't seem to be working for session temporary files..
On Fri, 2005-03-18 at 10:27 -0800, Joseph Silverman wrote: In our setup, we have JSP's that create a temporary file with the deleteOnExit flag set. The session timeout (getMaxInactiveInterval) appears to be the default of 1800 seconds (30 minutes). We are blasting our servlet container (tomcat and jetty) with JSP fetches (that don't handle cookies - http_load if you are curious as to what we are using) and noting that these files stick around till the servlet container itself quits (the java process goes away). At that point ALL the files are deleted, and it can take HOURS in some cases to do so. Is this expected behavior? We think that these files should be deleted when the session expires. That seems like the right thing to do. What you are seeing is what I would expect. The javadoc for File.deleteOnExit very clearly states that the file is deleted *when the virtual machine terminates*. A session is *not* a virtual machine. I suggest you use a SessionListener object instead; this should be invoked when the session expires, and you can delete the files then. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Overriding the browser language setting?
Hi there all! I'm trying to override the default struts/tomcat code that chooses an ApplicationResources.properties file based on the user's browser language setting. I'd like to manage which language to serve up on my own (or based on an item in the user's session). Does anyone have any pointers on how to do this? Normally I would bash my head against an issue like this for weeks and weeks before finally posting, but in this case, its an emergency and time is short. Thank you for any and all help any of you incredibly talented and intelligent people could provide. /kurt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: memory usage
On Fri, Mar 18, 2005 at 07:43:41PM +0100, t.n.a. wrote: : rough measurements). The memory usage seems to grow up to a 100 MB : (Cayenne accesses a single table of about fifty attributes and a 1000 : rows - don't ask) and sometimes - I can't reproduce the problem now - : the app brakes when trying to open a new page. The exception says : something about not having enough memory. : Ring any bells, anyone? Yes -- if a Java app is out of memory, 1/ invest in a profiler to see whether there's a resource leak 2/ increase the heap such that the JVM has more space in which to create objects btw, please post a *new* message when writing to the list. Replying to an old (unrelated) message confuses thread-aware mailers, which makes your question harder to find (and thus answer). -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Issue displaying empty Strings as null
In Oracle the Empty String is equal to null value On Fri, 18 Mar 2005 09:16:50 -0800, Mendez, Eric [EMAIL PROTECTED] wrote: I recently installed Apache/Tomcat v 4.1.31 on my server, and I have several JSP sites that extract values from an Oracle database, if the value in the database is an empty String (), it returns as a null value in my JSP page. The server has JDK v. 1.4.2. Any ideas will help. Thanks Confidentiality Note: The preceding e-mail message (including any attachments) contains information that may be confidential, protected by applicable legal privileges, or constitute non-public information. It is intended to be conveyed only to the designated recipient(s). If you are not an intended recipient of this message, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution or reproduction of this message by unintended recipients is not authorized and may be unlawful. - 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: Releasing memory on undeploy
currently looking into memory-leak issues with j2ee/servlet-engine We have about a dozen apps on 2 tomcats that have 800MB each in linux (5.0.25), and they are not huge apps, but after a few manager reloads the tomcat is out of memory. Is this related? You said undeploy, but maybe reloading is also a problem. Also, if we let the server run for a while, we cannot add new apps either. I suspect we need to profile and look for memory leaks, but I thought it would mention it. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Releasing memory on undeploy
On Fri, 2005-03-18 at 18:48 -0800, Chris Hyzer wrote: currently looking into memory-leak issues with j2ee/servlet-engine We have about a dozen apps on 2 tomcats that have 800MB each in linux (5.0.25), and they are not huge apps, but after a few manager reloads the tomcat is out of memory. Is this related? You said undeploy, but maybe reloading is also a problem. Also, if we let the server run for a while, we cannot add new apps either. I suspect we need to profile and look for memory leaks, but I thought it would mention it. Chris It might be the same problem. By undeploy I mean throw away the classloader associated with the deployed component, which reload will also do. The problem is that both commons-logging and commons-beanutils use the Singleton pattern. And the Singleton pattern is *extremely* hard (possibly impossible) to implement correctly in a j2ee-style environment when a class might be loaded via a shared classloader. Tomcat includes a workaround for commons-logging which appears *to me* to be a complete fix for commons-logging leaks (though maybe not a very elegant one): it calls org.apache.commons.logging.LogFactory.release(this) from class WebappClassLoader. However there have been reports of leaks when using commons-logging despite this; I need to try to set up some testcases to determine what's going on, but testcases involving garbage-collection and complex classloading setups will be tricky to create. If you do find anything from profiling your app, please post the info to this group (and/or me). Note that I'm going to be away for the next three weeks, but will try to pick this topic up when I return. Cheers, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Slightly OT] MVC approach when JSP are not allowed
I am working on a project that uses servlets exclusively. I would like to take advantage of a Model-View-Controller system in order to develop my servlets. For the last servlet project I worked on, I was in charge of the back-end data processing and did not have to mess with HTML. This time I do have to roll up my sleeves and play with HTML. So I ask the question. Since the requirement that I have is to use servlets only, can I use something like Struts or Java Server Faces? I am reading some information and it looks like they both rely on JSP to ge the job done. Thank you for your time... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Yahoo! Auto Response
This email address is no longer valid. Original Message: X-YahooFilteredBulk: 202.141.245.2 Authentication-Results: mta132.mail.sc5.yahoo.com from=jakarta.apache.org; domainkeys=neutral (no sig) X-Originating-IP: [202.141.245.2] Return-Path: tomcat-user@jakarta.apache.org Received: from 202.141.245.2 (EHLO yahoo.com) (202.141.245.2) by mta132.mail.sc5.yahoo.com with SMTP; Fri, 18 Mar 2005 20:34:54 -0800 From: tomcat-user@jakarta.apache.org To: [EMAIL PROTECTED] Subject: Mail Delivery (failure [EMAIL PROTECTED]) Date: Sat, 19 Mar 2005 09:34:48 +0500 MIME-Version: 1.0 Content-Type: multipart/related; type=multipart/alternative; boundary==_NextPart_000_001B_01C0CA80.6B015D10 X-Priority: 3 X-MSMail-Priority: Normal This is a multi-part message in MIME format. --=_NextPart_000_001B_01C0CA80.6B015D10 Content-Type: multipart/alternative; boundary==_NextPart_001_001C_01C0CA80.6B015D10 --=_NextPart_001_001C_01C0CA80.6B015D10 Conten _ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Delegate flag for classloading (ATTN: Remy Maucherat)
Hi, I see here that there is an option for the webapp-specific classloader to use parent-first classloading instead of the (default) child-first classloading. Can someone suggest why this might be useful? Clearly someone thought so, but I can't see any point in it. It is in catalina since version 1.1 (committer: Remy Maucherat). See delegate option in this page: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/loader.html Using this option makes life exceedingly complicated for some libs like commons-beanutils and commons-logging, so I would like to know under what conditions someone might enable this feature. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Authentication for streaming file (OT)
Slightly off-topic -- Tomcat related I have a servlet that is invoked by clicking a hyperlink that is rendered by a JSP running in Tomcat. The servlet receives a file path parameter in the HTTP request, and then streams that file to the requesting client. I have a security-constraint/ defined in Tomcat for the JSP, requiring basic password authentication. However, if I define the security-constraint/ so that it applies to the servlet also, then the following error occurs when the servlet attempts to stream the file to the client. The browser presents the file info and prompts to save or open the file, but then when the actual streaming is attempted, the browser reports that the site is unreachable. This is apparently caused by the lack of any authentication during the file streaming operation, because when I define the security-constraint/ so that it applies to the JSP but not the servlet, the problem does not occur. I don't really understand why it behaves this way, since the servlet was invoked with proper authorization, and the problem occurs only when the servlet starts streaming a file to the client. But it does seem to be an authorization problem, since it goes away when I don't constrain the servlet for authentication. I can operate this way, but then my JSP is protected and the servlet is not. Is there a way to specify authentication parameters during the file streaming operation? Does anyone have an explanation for what I'm experiencing? Here's my servlet code: public class FileSender extends HttpServlet{ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ String filename = request.getParameter(file); File file = new File(filename); MimetypesFileTypeMap mimeTypes = new MimetypesFileTypeMap (C:\\Program Files\\Java\\jdk1.5.0_01\\lib\\mime.types); String mime = mimeTypes.getContentType(file); response.setContentType(mime); response.setHeader(Content-Disposition, attachment; + filename= + file.getName()); FileInputStream in = new FileInputStream(file); OutputStream out = response.getOutputStream(); byte[] buf = new byte[1024]; int i = 0; while((i=in.read(buf))!=-1) { out.write(buf, 0, i); } in.close(); out.close(); } } And here's my web.xml. With this configuration, the file downolad fails as described above. To make it work, I remove the second url-pattern/ element as indicated. !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app display-name File Port /display-name description Makes files available through the web container /description servlet servlet-nameFilePort/servlet-name description Retrieves specified file and sends it to requester /description servlet-classFileSnatcher.FileSender/servlet-class /servlet servlet-mapping servlet-nameFilePort/servlet-name url-pattern/FilePort/url-pattern /servlet-mapping !-- Define a Security Constraint on this Application -- security-constraint web-resource-collection web-resource-nameFileSnatcher/web-resource-name url-pattern*.jsp/url-pattern url-pattern/FilePort/url-pattern !-- remove this to make it work -- /web-resource-collection auth-constraint role-namemanager/role-name /auth-constraint /security-constraint !-- Define the Login Configuration for this Application -- login-config auth-methodBASIC/auth-method realm-nameJDBCRealm/realm-name /login-config !-- Security roles referenced by this web application -- security-role description The role that is required to log in to the Manager Application /description role-namemanager/role-name /security-role /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Slightly OT] MVC approach when JSP are not allowed
On Fri, 2005-03-18 at 23:33 -0500, Elihu Smails wrote: I am working on a project that uses servlets exclusively. I would like to take advantage of a Model-View-Controller system in order to develop my servlets. For the last servlet project I worked on, I was in charge of the back-end data processing and did not have to mess with HTML. This time I do have to roll up my sleeves and play with HTML. So I ask the question. Since the requirement that I have is to use servlets only, can I use something like Struts or Java Server Faces? I am reading some information and it looks like they both rely on JSP to ge the job done. What is the reason for the ban on using JSPs? A JSP page gets converted into a servlet; in a sense JSP is just a different syntax for writing servlets in. If the reason is simply that the architects don't want run-time compilation of files, or don't want a java compiler available on the machine then JSPs can simply be precompiled. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using RealmBase.Digest(...)
I'm writing an app to create user id/pw's in a db for use by realms. I've read the realm HOW-TO page. But I have two implementation questions: 1) the page says: To use either of the above techniques, the $CATALINA_HOME/server/lib/catalina.jar file will need to be on your class path to make the RealmBase class available. I'm doing this in a servlet. The way I typically make jar files avail to servlets is to put them in the WEB-INF/lib dir or in the Tomcat common lib. I don't think I should be making a copy of this jar or moving it around. How do I force a jar into a webapp's classpath? Is there a tag I can put in web.xml to set classpath or add jars? 2) There are three parameters on the Digest() method. The third parm is 'encoding'. What encoding should I be using? I assume it needs to match whatever encoding the realm code is going to use when it compares the digested password. What string do I use for this parm? Thanks. Jerry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]