RE: servlet mapping and url
If you create a file in the root of the context (any file, could be an empty file, it just needs to show up in a directory listing) then map your servlet to the same URL you would use to reference the file, then add the file to the welcome-file-list and it will work. Tomcat will not forward to a welcome file unless it shows up in the directory. But once you map the servlet to the same URL, the servlet will intercept the request. -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Saturday, July 02, 2005 9:25 AM To: Tomcat Users List Subject: Re: servlet mapping and url Hi, I don't think there is any restriction to mapping a servlet to a welcome page: servlet servlet-nameMyServlet/servlet-name servlet-classcom.company.app.MyServlet/servlet-class /servlet servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/myServlet/url-pattern /servlet-mapping welcome-file-list welcome-file/myServlet/welcome-file /welcome-file-list Also, I'm not as sure, put I think just mapping the servlet to / will do the trick as well. Both are easy enough to test though, give it a shot and post back your results for the archives. Frank s s wrote: i want to invoke a servlet using url like http://localhost:8080 only i have done it using http://localhost:8080/index.html where index.html is a servlet. Is it possible to load this servlet as a default just like a default web page. The point is i want a servlet to recieve a request when url http://localhost:8080 is referenced i.e without the servlet name. is it possible? - Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Load all JSP pages on startup
You could write a servlet that hit all your jsp's when initialized, and set it to load-on-startup. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Wednesday, June 29, 2005 5:46 AM To: tomcat-user@jakarta.apache.org Subject: Load all JSP pages on startup In Tomcat 5.5 (or Jboss 4.0 using Tomcat 5.5), can I load all JSP pages on deployment? I don't want to precompile in my build script, but I do want the server to compile all jsp pages as soon as they are deployed. I can load one jsp page on startup like this: servlet servlet-nameHomeJsp/servlet-name jsp-file/home.jsp/jsp-file load-on-startup1/load-on-startup /servlet But I want to do something like jsp-property-group display-nameallJsp/display-name url-pattern*.jsp/url-pattern load-on-startup1/load-on-startup /jsp-property-group (this isn't allowed in the web.xml) Thanks for any and all help, Geoffrey - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to cache the user's input in a jsp page?
The problem is that you are loading a new page through javascript without sending the other data fields from the current page in the request. This is entirely a javascript processing problem. To actually make this work without a lot of re-engineering, make OnChange for the select box call a javascript function that either collects the rest of the data from the form and adds it in the form of a get request to the URL that comes from the value of the select option; or change the action target for the form to the value of the select option and submit the form. The real trick is to get the rest of the data included into the request so that the next page has the data to work with. -Original Message- From: engp0510 [mailto:[EMAIL PROTECTED] Sent: Thursday, September 04, 2003 4:43 AM To: Tomcat Users List Subject: Re: How to cache the user's input in a jsp page? Thanks But it is nothing with form and request. Maybe I should make me more clear: For the first time this JSP loaded, it is not sure how many rows of a table needed by user. Then user choos a select_box to set the rows number and then JSP was reloaded with table contain the number of rows user selected. select size=1 name=item_num ONCHANGE=location=this.options[this.selectedIndex].value; %for(int i=1;i=5;i++){% option value=\AddQuotation.jsp?actionfrom=%=request_from%row_num=%=i%%if(ro w_num==i){out.print(SELECTED);}% -%=i%-/option %}% /select But user may set other fields before setting the number of rows, so when the JSP was reloaded, all filled fields ahould be cached, is it possible? - Original Message - From: Kwok Peng Tuck [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, September 04, 2003 4:31 PM Subject: Re: How to cache the user's input in a jsp page? In the servlet or jsp you could do : String text = request.getParameter(subject) ; Then do whatever you want with it. engp0510 wrote: Thanks I know maybe I should use session, but when I choose select box, the jsp page will be reloaded. How do I save the value of INPUT tabIndex=1 maxLength=100 size=40 name=subject into session, that after reloaded the value should be the same as user input previously? - Original Message - From: Duncan Strang [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, September 04, 2003 4:15 PM Subject: RE: How to cache the user's input in a jsp page? Check out JSP's implicit object collection For example, if you are using user sessions you can put any Object onto the session, this will then be available whenever the user accesses the page. To use the session object simply use session.setAttribute(identifier, Object); So to save an Integer (Objects only, not primitives) for example Integer foo = new integer(10); session.setAttribute(fooint foo); To retrieve it next request use Integer foo2 = (Integer)session.getAttribute(fooint); There are other implicit Objects including application (the jsp view of the Servlet context) but this is globally visible so shouldn't be use to store session type variables (IMHO) Or you could write your own cache :) Cheers Duncan -Original Message- From: engp0510 [mailto:[EMAIL PROTECTED] Sent: 04 September 2003 09:00 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: How to cache the user's input in a jsp page? Hi How to cache the user's input in a jsp page? The following is some code of my JSP: % int item_num = 5; int row_num = 1; if(request.getParameter(row_num)!=null){ String rowstr = (request.getParameter(row_num)); try{ row_num = Integer.parseInt(rowstr); } catch(NumberFormatException ne){} } % ... ... TR class=LGREY TD class=L align=right width=25% Subjectnbsp; : /TD TD class=L width=75% nbsp; INPUT tabIndex=1 maxLength=100 size=40 name=subject /TD /TR .. select size=1 name=item_num ONCHANGE=location=this.options[this.selectedIndex].value; %for(int i=1;i=5;i++){% option value=\AddQuotation.jsp?actionfrom=%=request_from%row_num=%=i%%i f(row_num==i){out.print(SELECTED);}% -%=i%-/option %}% /select ... %for(int ii=0;iirow_num;ii++){% tr td width=25% align=center %=ii+1%/td td width=25% align=center nbsp;INPUT tabIndex=2 maxLength=100 size=25 name=project_detail_%=ii+1%/td td width=25% align=center nbsp;INPUT tabIndex=2 maxLength=20 size=10 name=quantity_%=ii+1%/td td width=25% align=center nbsp;INPUT tabIndex=2 maxLength=20 size=10
RE: Stop, Start Applications - Using TOMCAT Manager , Multiple Services
There are two answers to your question. The long answer can be found be searching the archives of this group, this comes up about every couple of months. The short answer is to place this bat file in your TOMCAT_HOME/bin dir, edit the values and run it. Good luck -Original Message- From: Thana Letchumi [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 3:23 AM To: 'Tomcat Users List' Subject: Stop, Start Applications - Using TOMCAT Manager , Multiple Services Hi, May I know how do I configure the tomcat to run multiple services ?. I have installed tomcat in one UNIX server but there are more than one developer with applications to run on production. I need to ensure that the testing and reload of the particular application will not affect the others . I tried using the TOMCAT manager to reload applications but it did not work. How do I reload a particular application after recompile without restarting the tomcat server ?. Please advice !. Thanks Regards, Thana - 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: DTD for server.xml??
It might be useful to have a reference DTD for server.xml included in the documentation for tomcat as delivered by apache. But not actually reference it in the DOCTYPE declaration in server.xml This would give users a single place to reference for constructing a valid server.xml file while not constraining an admin from extending the system. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 11:37 AM To: Tomcat Users List Subject: Re: DTD for server.xml?? It would be almost impossible to write a DTD for server.xml since an admin may inject custom classes (Listeners/Loggers). To have a dtd, we would need to know every property which can be set for every class (which may be made known in server.xml) since tomcat uses reflection from Diegester. -Tim Turner, John wrote: Hello - I notice that the top of web.xml has: ?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; yet the top of server.xml has nothing. I'm very new to XML, so forgive me if this is a lame or FA question, but is there a DTD for server.xml? If so, why isn't it specified in server.xml, and what is the URL? Is server.xml real, official XML or just convenience XML? - John John Turner [EMAIL PROTECTED] | 248-488-3466 Advertising Audit Service http://www.aas.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: DTD for server.xml??
We are using tomcat 4.1.12 and 4.1.18 with jdk 1.4.1 and we place the axis.jar in the {context_home}/WEB-INF/lib directory and we place xerces.jar and the xml-apis.jar in the CATALINA_HOME/common/lib directory (like the error message says) -Original Message- From: Ghershony, Arie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 12:22 PM To: 'Tomcat Users List' Subject: RE: DTD for server.xml?? any one uses Tomcat and AXIS. I run the happyaxis.jsp and receive this warning: The core axis libraries are present. 1 optional axis library is missing Note: On Tomcat 4.x and Java1.4, you may need to put libraries that contain java.* or javax.* packages into CATALINA_HOME/common/lib jaxrpc.jar and saaj.jar are two such libraries. I tried that but it still gave me that warning. Thanks, Eric -Original Message- From: Jeanfrancois Arcand [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 11:54 AM To: Tomcat Users List Subject: Re: DTD for server.xml?? Oups (remove the quote) !DOCTYPE web-app[ !ENTITY vhost1 SYSTEM /path/to/tomcat/conf/vhost1.xml ] -- Jeanfrancois Jeanfrancois Arcand wrote: I thin it should be defined like this: !DOCTYPE web-app[ !ENTITY vhost1 SYSTEM /path/to/tomcat/conf/vhost1.xml ] I did not try it but that the way ENTITY works usually. -- Jeanfrancois Turner, John wrote: Sorry, that should be !ENTITY vhost1 SYSTEM /path/to/tomcat/conf/vhost1.xml Typo in vhost. John -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 11:42 AM To: 'Tomcat Users List' Subject: RE: DTD for server.xml?? That makes sense. OK, next question, in a thread started yesterday, it was mentioned (correctly, I assume) that you could use XML entities to include external XML files into server.xml. So, this link came up on Google: http://tech.irt.org/articles/js212/#example_2 Which leads a person to believe that something like !ENTITY vhost SYSTEM /path/to/tomcat/conf/vhost1.xml Then towards the bottom: vhost1 would work in server.xml, but it doesn't. Error: Catalina.start: org.xml.sax.SAXParseException: The content beginning ! is not legal markup. Is this a futile path, or is it possible to include external XML into server.xml when server.xml is parsed? If so, how? Thanks! John -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 11:37 AM To: Tomcat Users List Subject: Re: DTD for server.xml?? It would be almost impossible to write a DTD for server.xml since an admin may inject custom classes (Listeners/Loggers). To have a dtd, we would need to know every property which can be set for every class (which may be made known in server.xml) since tomcat uses reflection from Diegester. -Tim Turner, John wrote: Hello - I notice that the top of web.xml has: ?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; yet the top of server.xml has nothing. I'm very new to XML, so forgive me if this is a lame or FA question, but is there a DTD for server.xml? If so, why isn't it specified in server.xml, and what is the URL? Is server.xml real, official XML or just convenience XML? - John John Turner [EMAIL PROTECTED] | 248-488-3466 Advertising Audit Service http://www.aas.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [Windows2k] Start tomcat as Service
I am also having a problem getting tomcat 4.1.12 running as a service with jdk 1.4.1 It runs fine with the older jdk. Where should I find the documentation on the third party tool that Remy mentioned? -Original Message- From: Juan Fco. Herrera Utande [mailto:juan.herrera;bluemat.biz] Sent: Wednesday, November 06, 2002 9:03 AM To: 'Tomcat Users List' Subject: RE: [Windows2k] Start tomcat as Service You must have one under tomcat\bin. If not try to install again and make sure during installation you choose Intall Tomcat as a Service. I also have Tomcat 4.1.12 under W2K running as a service with no problems. Regards, Juan -Mensaje original- De: François Vallet [mailto:fvallet;infovista.com] Enviado el: miércoles, 06 de noviembre de 2002 11:12 Para: 'Tomcat Users List' Asunto: RE: [Windows2k] Start tomcat as Service I don't have any tomcat.exe ... it is not apache :( -Original Message- From: Zaragoza, Carles [mailto:Carles.Zaragoza;es.compuware.com] Sent: mercredi 6 novembre 2002 10:52 To: 'Tomcat Users List' Subject: RE: [Windows2k] Start tomcat as Service I have install two tomacat 4.1 as a service on a w2000 prof with no problems. run tomcat.exe -help and follow the syntax. Regards,Carles. -Original Message- From: François Vallet [mailto:fvallet;infovista.com] Sent: martes, 05 de noviembre de 2002 18:42 To: 'Tomcat Users List' Subject: [Windows2k] Start tomcat as Service Who have ever start Tomcat 4.1 as service on Windows 2k ? Thanks in advance. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: Tomcat Admin tool Setup
The original tomcat-users.xml should look like the text below: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=tomcat/ role rolename=role1/ role rolename=manager description=Role to run the 'Application Manager Tool'/ role rolename=admin description=Role to run the 'Administration Tool'/ user username=tomcat password=tomcat roles=tomcat/ user username=role1 password=tomcat roles=role1/ user username=both password=tomcat roles=tomcat,role1/ /tomcat-users Change it to look like this: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=tomcat/ role rolename=role1/ role rolename=manager description=Role to run the 'Application Manager Tool'/ role rolename=admin description=Role to run the 'Administration Tool'/ user username=tomcat password=tomcat roles=tomcat/ user username=role1 password=tomcat roles=role1/ user username=both password=tomcat roles=tomcat,role1/ user username=foo password=bar fullName=id for the adm and mgr tools roles=admin,manager/ /tomcat-users Save the file and restart tomcat. You should be able to sign in to both applications. Please use a better username and password than my example of foo and bar. -Original Message- From: Raj Saini [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 11:23 AM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Tomcat Admin tool Setup Hi, Tomcat should run for you outof box. You dont need to make any changes to run the examples. There is no tomcat4.conf in the conf directory. And which java pages you are including in that direcotry? Raj Saini - Original Message - From: Medha Parthasarathy Iyengar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 26, 2002 4:18 PM Subject: Tomcat Admin tool Setup Hi, I am learner java and tomcat. I have installed tomcat 4.1.10 and java jdk1.4.1. I have changed the tomcat4.conf in /var/tomcat4/conf/tomcat4.conf to include the correct page of java. On my brower, the system comes and stop here http://localhost:8080/index.jsp When i try to click on Tomcat Administration or Tomcat Manager, It is asking for userid and password. As suggest and i have made changes in the tomcat-users.xml and the same look as under : === ?xml version='1.0' encoding='utf-8'? === STill the password has not got set ot the above in the tomcat-user.xml. Assist me in getting the web administration and manager tool to work. Regards Medha -- To unsubscribe, e-mail: For additional commands, e-mail: tsdok -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]