PL help this problem
Problem : I have developped a application with JNDI and i placed the application under the webapps folder and i made the corresponding changes in the server.xml file. I have a seperate folder for images which is under the application foler and i am refering the images with image src="images/req image" Tomcat on startup ...giving a error called : XmlMapper : can't find resource for entity : - Sun Microsystems, Inc // DTD web application 1.2 // EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd null Thought when i gice the URL/MyApplication/HomePage .the home page is comming without any image what may be the problem. Thanks in advance Regards Narayanan.
Solution for garbled mod_jk.so or mod_jserv.so
Hi everyone, I've had the same problem as many of you, namely the fact that I got some weird message about the jk/jserv module which was garbled. In fact, in my case, this problem was caused by the fact that the command "apxs" that I used to compile this module, was NOT the same as the one which was delivered with the Apache distribution - it was some older version. If you use the included Makefile.linux file to compile this module, you should make sure that you set the APXS environment variable to the right one (the one in your apache/bin directory), and you should UNCOMMENT the ifndef APXS things in the Makefile.linux as well. I hope this solves the problem for most of you (at least it did help in my case). -- Tom
Complete Installation steps ..
Hi Guys, Can u ppl help me out can anyone send me a complete installation script for tomcat 4 on Red Hat Linux 6.2 I have apache 1.3.14 apache Jserv 1.1.2 cheers Sunil - Original Message - From: "Craig R. McClanahan" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 13, 2000 10:29 AM Subject: Re: Thread.currentThread().setContextClassLoader() [was: ServletContext.getResourceAsStream() in 3.2?] "Roytman, Alex" wrote: Tomcat developers, please correct me if I am wrong but as far as I know Tomcat 3.2 does not set ContextClassLoader for its threads. The context class loader is a Java2 thing. Since Tomcat 3.2 runs under JDK 1.1 as well, it cannot do this by default. However, you can enable it by adding the following in your server.xml file: RequestInterceptor className="org.apache.tomcat.request.Jdk12Interceptor / Note -- any web application that depends on this (setting the context class loader) is ***not*** guaranteed to be portable, because it is ***not*** required by the servlet specification. So you are using main class loader which knows nothing about your WEB-INF/lib This is not true. You are using a class loader that is aware of JAR files in WEB-INF/lib, and unpacked classes in WEB-INF/classes, even on a JDK 1.1 system. It just doesn't call the Thread.setContextClassLoader() method by default. I had a different problem - when code loaded by main classloader need to load classes from WEB-INF/lib. I solved it by writing request and context interceptors for tomcat to call Thread.currentThread().setContextClassLoader() for each thread before it touches a servlet (doing init/destroy or serving request) See above. Craig McClanahan PS: Note that Tomcat 4.0, because it is guaranteed a Java2 platform as a prerequisite, calls Thread.setContextClassLoader() on every request by default.
How to configure apache to run .jsp
I have configured apache and tomcat so they communicate: apache - http://testlinux.softgroup.net.pl:8080/examples/jsp - apache communicating with tomcat tomcat - http://testlinux.softgroup.net.pl:8085/examples/jsp/index.html - tomcat own port - both are working - but if you will try to run any .jsp example through apache it won't run - tomcat runs .jsp ok Do someone know what to do so that apache support jsp? TIA Wojtek
RE: Tomcat Unix autostart
Hi, I spotted the problem. When tomcat is being started, it is connected to a tty (console at startup) At the end of the bootsequence every service connected to the console is being killed. When I add an entry to the inittab file, tomcat stays running, but this is not really the way I want to solve this. Only when no other option is left. Does anyone know a way to start Tomcat with no connection to a tty? Redirection of I/O doesn't do the trick. I tested with: tomcat.sh start /dev/null /dev/null 21 Jan -Original Message- From: David Bussenschutt [mailto:[EMAIL PROTECTED]] Sent: dinsdag 12 december 2000 0:50 To: [EMAIL PROTECTED] Subject: RE: Tomcat Unix autostart I tried starting tomcat before apache. I see the startupscript being executed, but tomcat doesn't start. Has anybody working Unix startupscripts for Tomcat? Tomcat should start after Apache during reboot. Also remember to set your classpath in the startup script. I'm trying to start Tomcat whith rebooting a Unix machine. Tomcat seems to start for a moment and then dissappears. I have a startup script in /sbin/rc3.d My Install on solaris: (with tomcat installed into /opt/tomcat) /etc/init.d/tomcat: -8-cut-here---8--- #!/bin/sh CLASSPATH=/enter/your/classpath/here export CLASSPATH /opt/tomcat/bin/tomcat.sh $@# run as root # su nobody -c "/opt/tomcat/bin/tomcat.sh $@" # or run as nobody -8-cut-here---8--- and: cd /etc/rc2.d/ ln -s ../init.d/tomcat S95tomcat cd /etc/rc1.d/ ln -s ../init.d/tomcat K25tomcat Note that if you use the auto-include mod_jk or mod_jserv files in the apache httpd.conf file, then you should start tomcat BEFORE apache, otherwise you'll always be reading the old version of the gererated configuration file, if you don't use the auto-generated one, it doesn't really matter which order you start them in. In my case, APACHE is started/stopped with the symbolic links of S99apache and K25apache, so that (9599) tomcat always starts first, and (25=25) always gets stopped at the same time. Another just as acceptable method would be to just add the tomcat startup command to the apache start-up script edit the /etc/init.d/apache (or equivalent - maybe apache.server or apachectl) and right after the line: start) add: /opt/tomcat/bin/startup.sh and right after the line: stop) add: /opt/tomcat/bin/shutdown.sh In both these cases, the script that eventually gets called is always /opt/tomcat/bin/tomcat.sh , and you need to make sure that when you run that script manually (with option of 'start') it doesn't actually gererate any errors.To be on the safe side, I added two lines to that script (at the top before any real code) that defined the TOMCAT_HOME and JAVA_HOME environment variables: TOMCAT_HOME=/opt/tomcat ; export TOMCAT_HOME JAVA_HOME=/usr/java ; export JAVA_HOME Note that in many cases this isn't really necessary as the tomcat.sh script is fairly good at figuring them out, but I like to play it safe. Hope this helps someone. David. At 10:08 AM 12/11/00 +0100, you wrote: Hi, Regards, Jan Stevens Software Developer CMG Maastricht B.V. -Telecom Products * Adelbert van Scharnlaan 170A* 043 - 6018185 6224 JX Maastricht * 043 - 6018169 * mailto:[EMAIL PROTECTED] David Bussenschutt Email: [EMAIL PROTECTED] Senior Computing Support Officer Systems Administrator/Programmer Location: Griffith University. Information Technology Services Brisbane Qld. Aust. (TEN bldg. rm 1.33) Ph: (07)38757079
Re: UserDir and Tomcat.
Kenichi Mori a écrit : Hi! I'm trying to make Tomcat work with Apache. Platform is Kondara/MNU Linux 1.2-new(Based on RHL 6.x). I want to make .jsp enable for each user accounts. Currently, I can access JSPs by accessing URL: http://mytesthost/examples/jsp/ I checked appache's UserDir settings. And I put an test .jsp in my public_html folder, then I try to access it by using this URL: http://mytesthost/~kenichi/hello.jsp Tomcat replies "404 Not Found" error. Instead of saying: "You re Running JSP" I think I have to do something more. But I could not find any hints on this issue. Is there any way to solve this problem? *** Kenichi Mori Engineer Business Solution Div. Open Interface Inc. URL:http://www.oii.co.jp *** Well i've had quite the same Pb with my Apache Tomcat configuration. I wanted several users, each gettin' is own Home Dir, acces and run there jsp and servlet App. So, /home/user/www Example /home/cdelpont/www /home/oseignol/www /home/jlbeaudet/www The stuff is like this: For Apache: UserDir is www DirectoryIndex is index.html Hello.jsp For Tomcat - that is to say server.xml - i had to add those Context Context path="/~cdelpont" docBase="/home/cdelpont/www" crossContext="false" debug="1" reloadable="true" /Context Context path="/~oseignol" docBase="/home/oseignol/www" crossContext="false" debug="1" reloadable="true" /Context Context path="/~jlbeaudet" docBase="/home/jlbeaudet/www" crossContext="false" debug="1" reloadable="true" /Context When i try it by http://localhost:8087/~jlbeaudet I have my Helloworld.jsp runnin' OK The same test with http://localhost:85/~jlbeaudet runs OK too ! Be sure not to forget the well known: JkMount /~jlbeaudet/servlet/* ajp12 JkMount /~jlbeaudet/*.jsp ajp12 in yur Apache conf! Hope this will help you! Please keep me connected Friendly yurs Jean-Luc B ;O)
Re: How to configure apache to run .jsp
Wojciech Wasowicz a écrit : I have configured apache and tomcat so they communicate: apache - http://testlinux.softgroup.net.pl:8080/examples/jsp - apache communicating with tomcat tomcat - http://testlinux.softgroup.net.pl:8085/examples/jsp/index.html - tomcat own port - both are working - but if you will try to run any .jsp example through apache it won't run - tomcat runs .jsp ok Do someone know what to do so that apache support jsp? TIA Wojtek Hi Wojtek By the way we miss some informations first ! Are yu runnin' Apache with mod_jk ? What kind of errors did yu encountered ? Try to be more explicit, it'll help every body answerin' yu! Jean-Luc B ;O)
Re: debug in tomcat
alex typed the following on 17:17 13/12/2000 +0900 hi all!! i got a problem with my code. and the most of all. i cannot find where i made mistake. i was stuck for several days. who can help me? I have a similar problem. Root cause: java.lang.NullPointerException at org.apache.jasper.compiler.TagBeginGenerator.generateSetters(TagBeginGenerat or.java:196) at org.apache.jasper.compiler.TagBeginGenerator.generateServiceMethodStatements (TagBeginGenerator.java:291) at org.apache.jasper.compiler.TagBeginGenerator.generate(TagBeginGenerator.java :360) I've found it only happens when I use certain attributes in a custom tag. I'd be interesting in seeing the relevant parts of your configuration and code. Here's my taglib definition: tag nameFormField/name tagclasscom.bitbull.webutil.forms.FormFieldTag/tagclass bodycontentempty/bodycontent attribute namename/name requiredtrue/required rtexprvaluetrue/rtexprvalue /attribute attribute namerequired/name rtexprvaluetrue/rtexprvalue /attribute /tag And in my JSP page: %@ taglib uri="/WEB-INF/jsp/webutil-forms.tld" prefix="FORM"% This doesn't have any problems: FORM:FormField name="language"/ This does: FORM:FormField name="username" required="true"/ My tag class has the setter method: public void setRequired (String required) { this.required = "true".equals(required); } I can't see any problems with this - any insight would be more than welcome! Until then it's into the source. Kief --- bitBull makes the Internet bite: http://www.bitBull.com/demos/
welcome-file-list
Hello! I am trying to have all my http request foward to a mainServlet first and after few verification send it to the appropriate page. For example, if you type http://mylocalhost/ if should go directly to myapp/servlet/mainServlet which reside in Tomcat. However if you type http://mylocalhost/hello.html, it should go to my Apache web server. I am using Apache+Tomcat combination. Someone told me once that I could use welcome-file-list but I haven't been able to find any doc Ideas? Thanks in advance! Cheers, Francis
Fw: jdbc2.0 in postgres
Hi everybody, i have a problem with jdbc;i need to use Resulset's methods such as getFetchSize(), afterLast() and getRow(), the problem is a message "This method is not yet implemented.", I am using a Postgres and i would be very thanked if anybody could tell me how to reach a JDBC 2.0 for Postgres,if it exits,and where to download it. Best regards
Directory Listing (Tomcat 3.1)
Delurk I've had a look through the archives and at the documentation under http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/ But I'm still having problems with directory listing with Apache/Tomcat. It's definately tomcat doing the listing, I've tried placing the Directory directives below the ApJServMount inc ase it's something odd - but that didn't work either. As far as I can work out Apache should be handling the request as I'm using AddHandler jserv-servlet .jsp ApJServMount /servlet Followed by the DocumentRoot and Directory stuff. I've looked through my web.xml for the webapp in question and through server.xml, but can't see anything obvious. One of the archive posts mentioned a Indexes option in web.xml but I don't have one there. Anyone got a solution for this? Paul
using form-bnased authentication with links
hello, have anybody got form-based authentification to work with links? it works in netscape, explorer, mozilla, etc, but not links. does anybody know anything about this??? -- Joakim Verona [EMAIL PROTECTED] http://www.verona.se/
Re: welcome-file-list
I want to execute a servlet as a welcome-file. how do i do this? i thought i'd put this in web.xml: servlet-mapping servlet-nametest/servlet-name url-pattern*.do/url-pattern /servlet-mapping welcome-file-list welcome-file index.do /welcome-file /welcome-file-list but that doesn't. i can't find the file index.do so it just skips the welcome file (including those defined in the general web.xml because welcome-file-list is overwritten i guess) and simply display the dir listing. greetz, Sam. - Original Message - From: "Tran, Francis" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 13, 2000 11:14 AM Subject: welcome-file-list Hello! I am trying to have all my http request foward to a mainServlet first and after few verification send it to the appropriate page. For example, if you type http://mylocalhost/ if should go directly to myapp/servlet/mainServlet which reside in Tomcat. However if you type http://mylocalhost/hello.html, it should go to my Apache web server. I am using Apache+Tomcat combination. Someone told me once that I could use welcome-file-list but I haven't been able to find any doc Ideas? Thanks in advance! Cheers, Francis
stdout logging
Is it possible to force tomcat to redirect all stdout to a specified logfile for any servlets/beans that are running under tomcat? Thanks Alan Wright
Re: stdout logging
Same question but with more background (found text of unanswered query sent to another newsgroup) I am new to Java servlets and JSP so forgive me if the answer to these questions seems obvious: 1) How should I go about redirecting System.out.println("") output to a file for the Tomcat engine. I have read about setting the System.out property but am not clear about how or where to do this. Should it be in each class file that makes up the servlet/JSP application or should i be looking at some Tomcat configuration option? 2)I have been using getServletContext.log("") to log within servlets but am not able to do this in the javabean classes used by the servlets (at least I don't know how to). Is it possible to access the servlet context logs within a "used" javabean? (This is why I ask question 1). TIA Alan Wright
Re: FW: java platform
John de la Garza wrote: Does anyone here have experience running java under Solaris on a sparc and Linux on a x86? I am looking to set up a server to run servlets and was wondering which os runs java better. I would assume running Solaris on a sparc would be the best, but I just wanted some feedback. To my experience IBM JDK runs faster than SUN JDK on Linux and there is no IBM JDK for Solaris. See http://www.volano.com/report.html for detailed comparison. Also I have the feeling that my simple PC with Pentium III 500 runs a java application server faster than SUN E250, both with SUN JDK, but I did not any detailed tests to prove it. Martin
RES: stdout logging
I used this code. To start loggin, I have to call at least one time the init method. I`ve created some facilities to me (at my JSP and Servlets I`m not using System.err.println( "mensagem" ), but Log.log( "mensagem" (that`s short). (note that messages are in Brazilian Portuguese). -- package br.mycompany.common; import java.io.IOException; import java.io.FileOutputStream; import java.io.PrintWriter; import java.io.PrintStream; import java.util.Date; /** * A Log class. * P * @author Edson Carlos Ericksson Richter */ public class Log extends Object { public static PrintStream pw = null; public static final boolean trace = true; /** * Constructor */ public static void init( ) { try { if( trace ) { // I`ll write logApp.txt in root directory where Tomcat was installed. pw = new PrintStream( new FileOutputStream( "/logApp.txt", true ), true ); System.setErr( pw ); // This will redirect System.err System.setOut( pw ); // This will redirect System.out } } catch( Exception e ) { System.err.println( "Erro durante a abertura do arquivo de Log d:/log.txt" ); } } public static void log( String mensagem ) { if( trace ) { if( pw == null ) init( ); Date d = new Date( ); System.err.println( d.toString( ) + " " + mensagem ); } } public static void log( String sistema, String mensagem ) { if( trace ) { if( pw == null ) init( ); Date d = new Date( ); System.err.println( d.toString( ) + " " + sistema + "-" + mensagem ); } } public static void log( Exception e ) { if( trace ) { if( pw == null ) init( ); Date d = new Date( ); System.err.println( d.toString( ) + ":" + e.getLocalizedMessage( ) ); e.printStackTrace( ); } } } - Mensagem original - De: Alan Wright [SMTP:[EMAIL PROTECTED]] Enviada em: quarta-feira, 13 de dezembro de 2000 8:29 Para: [EMAIL PROTECTED] Assunto: stdout logging Is it possible to force tomcat to redirect all stdout to a specified logfile for any servlets/beans that are running under tomcat? Thanks Alan Wright
Debugging Web Server
Has anybody ever used the EchoServer.java for debugging purposes? I would appreciate any suggestions on how to make it work. Thanks, Vittorio
Re: debug in tomcat
Kief Morris typed the following on 10:07 13/12/2000 + Root cause: java.lang.NullPointerException at org.apache.jasper.compiler.TagBeginGenerator.generateSetters(TagBeginGenerat or.java:196) OK, I've tracked this down. In my own code, this is caused by having a setter with a different parameter type than the property the setter is changing. Namely, I had a boolean property named "required" in my tag class, and my setter method takes a String parameter, which I was checking and using to set the boolean property. private boolean required = false; public void setRequired (String required) { this.required = "true".equals(required); } Jasper uses introspection to get the setter name for the "required" property, and introspection looks for a setRequired method which takes a boolean property. It turns out that if I implement setRequired() with a boolean parameter, Jasper does the right thing: using myTag required+"true" generates Java code in the JSP servlet which passes a boolean parameter to my setter. I had assumed that tag parameters all had to be handled as Strings. As a side note, I've submitted a patch to fix a minor bug in Jasper so this error is reported in a somewhat more intelligible manner. Hopefully it will get rolled into 3.2.2. alex, I haven't looked at your code, but you should double check it to make sure your tag attribute setter methods all match the types of the properties they set. Also make sure the methods are public, and are named following the JavaBeans convention, i.e. property my_property has a setter named setMyProperty(). I can mail you the patched source file or jar file if you want. --- bitBull makes the Internet bite: http://www.bitBull.com/demos/
Re: One virtualhost per webapp
Tomcat 3.2 has a HOST directive. Use that. I am doing just what you are trying to do and running only 1 instance of Tomcat. Regards Shahed. -Original Message- From: Angel Aray [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, December 12, 2000 11:15 PM Subject: One virtualhost per webapp Hi everyone, I've got a couple of applications running on tomcat and I would like each of them to run on a separate apache VirtualHost so than when I point the browser to http://appA.domain.com/index.jsp it is mapped to context /appA and http://appB.domain.com/index.jsp it is mapped to context /appB on the same tomcat instance. It seemed simple at first but I've had a tough time trying to get it to work. I've read the mod_jk howto several times but nothing there seems to help. The mod_jserv info on the apache user guide has something close but it says that you need to run each context on its own JVM and I would prefer not to do that. Any ideas of how to do this? Regards, Angel Aray.
Servlet Mappings and what am I doing wrong.
I have some legacy code that uses its own non-jsp tag system. The following is my web.xml file put in webapps/myapp/WEB-INF dir The attempt is to map files with the extension *.msp to the RouterServlet. Unfortunately this is not happening, if I goto the directory and do an msp file it lists it as text. I then tried to do the same with the entire directory (hence the second mapping). What else do I need? What am I doing wrong? (This used to use JServ ApJServAction but I'm attempting to move to Tomcat3.2 and the new connector) and migrate toward a standard system. Please note I've genericised all filenames/ips in this. If there is a site called myorg.com, I'm not affilliated with it. I was trying to be generic. Thanks, -Andy ?xml version="1.0" encoding="ISO-8859-1"? !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 servlet servlet-name RouterServlet /servlet-name servlet-class com.myorg.servlet.RouterServlet /servlet-class init-param param-namehandlers_classpath/param-name param-valuecom.myorg.servlet/param-value /init-param init-param param-namehandlers/param-name param-value Article,Index,Default,Previous,Image,SendFriend,Poll/param-value /init-param init-param param-namepools/param-name param-valuepools/param-value /init-param init-param param-namepool_url/param-name param-valuejdbc:oracle:thin:@192.168.1.2:1521:MYDB/param-value /init-param init-param param-namepool_max_conn/param-name param-value20/param-value /init-param init-param param-namepool_max_checkout/param-name param-value10/param-value /init-param init-param param-namerealfiledir/param-name param-value/usr/local/apache/virtual/myorg.com/htdocs/param-value /init-param init-param param-namethread/param-name param-valuetrue/param-value /init-param init-param param-namethread_interval/param-name param-value300/param-value /init-param init-param param-namedebug/param-name param-valuefalse/param-value /init-param /servlet servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/* /url-pattern /servlet-mapping servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/*.msp /url-pattern /servlet-mapping taglib taglib-uri http://java.apache.org/tomcat/examples-taglib /taglib-uri taglib-location /WEB-INF/jsp/example-taglib.tld /taglib-location taglib security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/jsp/security/protected/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint !-- Default login configuration uses BASIC authentication -- login-config auth-methodBASIC/auth-method realm-nameExample Basic Authentication Area/realm-name /login-config !-- If you want to experiment with form-based logins, comment out the login-config element above and replace it with this one. Note that we are currently using a nonstandard authentication method, because the code to support form based login is incomplete and only lightly tested. -- !-- login-config auth-methodEXPERIMENTAL_FORM/auth-method realm-nameExample Form-Based Authentication Area/realm-name form-login-config form-login-page/jsp/security/login/login.jsp/form-login-page form-error-page/jsp/security/login/error.jsp/form-error-page /form-login-config /login-config -- /web-app __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products.
Re: Servlet Mappings and what am I doing wrong.
How are you using tomcat? Standalone or with Apache + mod_jk? There is a little difference. - Original Message - From: Andrew Oliver To: [EMAIL PROTECTED] Sent: Wednesday, December 13, 2000 3:42 PM Subject: Servlet Mappings and what am I doing wrong. I have some legacy code that uses its own non-jsp tagsystem. The following is my web.xml file put in webapps/myapp/WEB-INF dirThe attempt is to map files with the extension *.mspto the RouterServlet. Unfortunately this is nothappening, if I goto the directory and do an msp fileit lists it as text. I then tried to do the same withthe entire directory (hence the second mapping).What else do I need? What am I doing wrong? (Thisused to use JServ ApJServAction but I'm attempting tomove to Tomcat3.2 and the new connector) and migratetoward a standard system. Please note I've genericised all filenames/ips inthis. If there is a site called myorg.com, I'm notaffilliated with it. I was trying to be generic.Thanks,-Andy?xml version="1.0" encoding="ISO-8859-1"?!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD WebApplication 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd"web-app servlet servlet-name RouterServlet /servlet-name servlet-class com.myorg.servlet.RouterServlet /servlet-class init-param param-namehandlers_classpath/param-name param-valuecom.myorg.servlet/param-value /init-param init-param param-namehandlers/param-name param-valueArticle,Index,Default,Previous,Image,SendFriend,Poll/param-value /init-param init-param param-namepools/param-name param-valuepools/param-value /init-param init-param param-namepool_url/param-name param-valuejdbc:oracle:thin:@192.168.1.2:1521:MYDB/param-value /init-param init-param param-namepool_max_conn/param-name param-value20/param-value /init-param init-param param-namepool_max_checkout/param-name param-value10/param-value /init-param init-param param-namerealfiledir/param-name param-value/usr/local/apache/virtual/myorg.com/htdocs/param-value /init-param init-param param-namethread/param-name param-valuetrue/param-value /init-param init-param param-namethread_interval/param-name param-value300/param-value /init-param init-param param-namedebug/param-name param-valuefalse/param-value /init-param /servlet servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/* /url-pattern /servlet-mapping servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/*.msp /url-pattern /servlet-mapping taglib taglib-uri http://java.apache.org/tomcat/examples-taglib /taglib-uri taglib-location /WEB-INF/jsp/example-taglib.tld /taglib-location taglib security-constraint web-resource-collection web-resource-nameProtectedArea/web-resource-name !-- Define the context-relative URL(s) to beprotected -- url-pattern/jsp/security/protected/*/url-pattern !-- If you list http methods, only thosemethods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles mayaccess this area -- role-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint !-- Default login configuration uses BASICauthentication -- login-config auth-methodBASIC/auth-method realm-nameExample Basic AuthenticationArea/realm-name /login-config !-- If you want to experiment with form-basedlogins, comment out the login-config element above andreplace it with this one. Note that we are currently using anonstandard authentication method, because the code tosupport form based login is incomplete and only lightlytested. -- !-- login-config auth-methodEXPERIMENTAL_FORM/auth-method realm-nameExample Form-Based AuthenticationArea/realm-name form-login-config form-login-page/jsp/security/login/login.jsp/form-login-page form-error-page/jsp/security/login/error.jsp/form-error-page /form-login-config /login-config --/web-app__Do You Yahoo!?Yahoo! Shopping - Thousands of Stores. Millions of Products.http://shopping.yahoo.com/
Re: Servlet Mappings and what am I doing wrong.
Apache + mod_jk. I'm actually trying it both standalone and normal (by trying on 8080 and trying on 80, but neither work). -Andy --- Pier Paolo Bortone [EMAIL PROTECTED] wrote: How are you using tomcat? Standalone or with Apache + mod_jk? There is a little difference. - Original Message - From: Andrew Oliver To: [EMAIL PROTECTED] Sent: Wednesday, December 13, 2000 3:42 PM Subject: Servlet Mappings and what am I doing wrong. I have some legacy code that uses its own non-jsp tag system. The following is my web.xml file put in webapps/myapp/WEB-INF dir The attempt is to map files with the extension *.msp to the RouterServlet. Unfortunately this is not happening, if I goto the directory and do an msp file it lists it as text. I then tried to do the same with the entire directory (hence the second mapping). What else do I need? What am I doing wrong? (This used to use JServ ApJServAction but I'm attempting to move to Tomcat3.2 and the new connector) and migrate toward a standard system. Please note I've genericised all filenames/ips in this. If there is a site called myorg.com, I'm not affilliated with it. I was trying to be generic. Thanks, -Andy ?xml version="1.0" encoding="ISO-8859-1"? !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 servlet servlet-name RouterServlet /servlet-name servlet-class com.myorg.servlet.RouterServlet /servlet-class init-param param-namehandlers_classpath/param-name param-valuecom.myorg.servlet/param-value /init-param init-param param-namehandlers/param-name param-value Article,Index,Default,Previous,Image,SendFriend,Poll/param-value /init-param init-param param-namepools/param-name param-valuepools/param-value /init-param init-param param-namepool_url/param-name param-valuejdbc:oracle:thin:@192.168.1.2:1521:MYDB/param-value /init-param init-param param-namepool_max_conn/param-name param-value20/param-value /init-param init-param param-namepool_max_checkout/param-name param-value10/param-value /init-param init-param param-namerealfiledir/param-name param-value/usr/local/apache/virtual/myorg.com/htdocs/param-value /init-param init-param param-namethread/param-name param-valuetrue/param-value /init-param init-param param-namethread_interval/param-name param-value300/param-value /init-param init-param param-namedebug/param-name param-valuefalse/param-value /init-param /servlet servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/* /url-pattern /servlet-mapping servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/*.msp /url-pattern /servlet-mapping taglib taglib-uri http://java.apache.org/tomcat/examples-taglib /taglib-uri taglib-location /WEB-INF/jsp/example-taglib.tld /taglib-location taglib security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/jsp/security/protected/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint !-- Default login configuration uses BASIC authentication -- login-config auth-methodBASIC/auth-method
RE: Servlet Mappings and what am I doing wrong.
Hi Andy, I think your problem comes because you are putting directory information into the url-mapping value in web.xml : you wrote : /myorg.com/*.msp you should write : *.msp Your path to your application (context) should appear into the server.xml under the conf folder : Context path="/myorg.com" docBase="..." ... /Context Hope this helps, Etienne -Original Message- From: Andrew Oliver [mailto:[EMAIL PROTECTED]] Sent: mercredi 13 decembre 2000 15:42 To: [EMAIL PROTECTED] Subject: Servlet Mappings and what am I doing wrong. I have some legacy code that uses its own non-jsp tag system. The following is my web.xml file put in webapps/myapp/WEB-INF dir The attempt is to map files with the extension *.msp to the RouterServlet. Unfortunately this is not happening, if I goto the directory and do an msp file it lists it as text. I then tried to do the same with the entire directory (hence the second mapping). What else do I need? What am I doing wrong? (This used to use JServ ApJServAction but I'm attempting to move to Tomcat3.2 and the new connector) and migrate toward a standard system. Please note I've genericised all filenames/ips in this. If there is a site called myorg.com, I'm not affilliated with it. I was trying to be generic. Thanks, -Andy ?xml version="1.0" encoding="ISO-8859-1"? !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 servlet servlet-name RouterServlet /servlet-name servlet-class com.myorg.servlet.RouterServlet /servlet-class init-param param-namehandlers_classpath/param-name param-valuecom.myorg.servlet/param-value /init-param init-param param-namehandlers/param-name param-value Article,Index,Default,Previous,Image,SendFriend,Poll/param-value /init-param init-param param-namepools/param-name param-valuepools/param-value /init-param init-param param-namepool_url/param-name param-valuejdbc:oracle:thin:@192.168.1.2:1521:MYDB/param-value /init-param init-param param-namepool_max_conn/param-name param-value20/param-value /init-param init-param param-namepool_max_checkout/param-name param-value10/param-value /init-param init-param param-namerealfiledir/param-name param-value/usr/local/apache/virtual/myorg.com/htdocs/param-value /init-param init-param param-namethread/param-name param-valuetrue/param-value /init-param init-param param-namethread_interval/param-name param-value300/param-value /init-param init-param param-namedebug/param-name param-valuefalse/param-value /init-param /servlet servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/* /url-pattern /servlet-mapping servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/*.msp /url-pattern /servlet-mapping taglib taglib-uri http://java.apache.org/tomcat/examples-taglib /taglib-uri taglib-location /WEB-INF/jsp/example-taglib.tld /taglib-location taglib security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/jsp/security/protected/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint !-- Default login configuration uses BASIC authentication -- login-config auth-methodBASIC/auth-method realm-nameExample Basic Authentication Area/realm-name /login-config !-- If you want to experiment with form-based logins, comment out the login-config element above and replace it with this one. Note that we are currently using a nonstandard authentication method, because the code to support form based
Re: Servlet Mappings and what am I doing wrong.
Andrew, What you are doing won't work correctly on Tomcat. Apparently the * isn't a valid wildcard according to the servlet specification. instead, map your servlet to a specific filename like dosomething.do and then add information to the end of the URL to tell the servlet what page to forward to for display. That works great for me. (By the way, the *.do mappings do work in JRUN3.0) Matt Andrew Oliver wrote: I have some legacy code that uses its own non-jsp tag system. The following is my web.xml file put in webapps/myapp/WEB-INF dir The attempt is to map files with the extension *.msp to the RouterServlet. Unfortunately this is not happening, if I goto the directory and do an msp file it lists it as text. I then tried to do the same with the entire directory (hence the second mapping). What else do I need? What am I doing wrong? (This used to use JServ ApJServAction but I'm attempting to move to Tomcat3.2 and the new connector) and migrate toward a standard system. Please note I've genericised all filenames/ips in this. If there is a site called myorg.com, I'm not affilliated with it. I was trying to be generic. Thanks, -Andy ?xml version="1.0" encoding="ISO-8859-1"? !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 servlet servlet-name RouterServlet /servlet-name servlet-class com.myorg.servlet.RouterServlet /servlet-class init-param param-namehandlers_classpath/param-name param-valuecom.myorg.servlet/param-value /init-param init-param param-namehandlers/param-name param-value Article,Index,Default,Previous,Image,SendFriend,Poll/param-value /init-param init-param param-namepools/param-name param-valuepools/param-value /init-param init-param param-namepool_url/param-name param-valuejdbc:oracle:thin:@192.168.1.2:1521:MYDB/param-value /init-param init-param param-namepool_max_conn/param-name param-value20/param-value /init-param init-param param-namepool_max_checkout/param-name param-value10/param-value /init-param init-param param-namerealfiledir/param-name param-value/usr/local/apache/virtual/myorg.com/htdocs/param-value /init-param init-param param-namethread/param-name param-valuetrue/param-value /init-param init-param param-namethread_interval/param-name param-value300/param-value /init-param init-param param-namedebug/param-name param-valuefalse/param-value /init-param /servlet servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/* /url-pattern /servlet-mapping servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/*.msp /url-pattern /servlet-mapping taglib taglib-uri http://java.apache.org/tomcat/examples-taglib /taglib-uri taglib-location /WEB-INF/jsp/example-taglib.tld /taglib-location taglib security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/jsp/security/protected/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint !-- Default login configuration uses BASIC authentication -- login-config auth-methodBASIC/auth-method realm-nameExample Basic Authentication Area/realm-name /login-config !-- If you want to experiment with form-based logins, comment out the login-config element above and replace it with this one. Note that we are currently using a nonstandard authentication method, because the code to support form based login is incomplete and only lightly tested. -- !-- login-config
Re: Servlet Mappings and what am I doing wrong.
Ok. Andy, I send you my web.xml that could be help you, where all dwf file are handled by NetSite servlet. Bye. - Original Message - From: "Etienne Baert (SPS Office)" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 13, 2000 4:14 PM Subject: RE: Servlet Mappings and what am I doing wrong. Hi Andy, I think your problem comes because you are putting directory information into the url-mapping value in web.xml : you wrote : /myorg.com/*.msp you should write : *.msp Your path to your application (context) should appear into the server.xml under the conf folder : Context path="/myorg.com" docBase="..." ... /Context Hope this helps, Etienne -Original Message- From: Andrew Oliver [mailto:[EMAIL PROTECTED]] Sent: mercredi 13 decembre 2000 15:42 To: [EMAIL PROTECTED] Subject: Servlet Mappings and what am I doing wrong. I have some legacy code that uses its own non-jsp tag system. The following is my web.xml file put in webapps/myapp/WEB-INF dir The attempt is to map files with the extension *.msp to the RouterServlet. Unfortunately this is not happening, if I goto the directory and do an msp file it lists it as text. I then tried to do the same with the entire directory (hence the second mapping). What else do I need? What am I doing wrong? (This used to use JServ ApJServAction but I'm attempting to move to Tomcat3.2 and the new connector) and migrate toward a standard system. Please note I've genericised all filenames/ips in this. If there is a site called myorg.com, I'm not affilliated with it. I was trying to be generic. Thanks, -Andy ?xml version="1.0" encoding="ISO-8859-1"? !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 servlet servlet-name RouterServlet /servlet-name servlet-class com.myorg.servlet.RouterServlet /servlet-class init-param param-namehandlers_classpath/param-name param-valuecom.myorg.servlet/param-value /init-param init-param param-namehandlers/param-name param-value Article,Index,Default,Previous,Image,SendFriend,Poll/param-value /init-param init-param param-namepools/param-name param-valuepools/param-value /init-param init-param param-namepool_url/param-name param-valuejdbc:oracle:thin:@192.168.1.2:1521:MYDB/param-value /init-param init-param param-namepool_max_conn/param-name param-value20/param-value /init-param init-param param-namepool_max_checkout/param-name param-value10/param-value /init-param init-param param-namerealfiledir/param-name param-value/usr/local/apache/virtual/myorg.com/htdocs/param-value /init-param init-param param-namethread/param-name param-valuetrue/param-value /init-param init-param param-namethread_interval/param-name param-value300/param-value /init-param init-param param-namedebug/param-name param-valuefalse/param-value /init-param /servlet servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/* /url-pattern /servlet-mapping servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/*.msp /url-pattern /servlet-mapping taglib taglib-uri http://java.apache.org/tomcat/examples-taglib /taglib-uri taglib-location /WEB-INF/jsp/example-taglib.tld /taglib-location taglib security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/jsp/security/protected/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nametomcat/role-name role-namerole1/role-name /auth-constraint /security-constraint !-- Default login configuration uses BASIC authentication -- login-config auth-methodBASIC/auth-method
Re: jdbc2.0 in postgres
Guillermo, This is not a tomcat issue and does not belong on this list. In answer to your query, the current postgres driver does not implement certain methods. To find out which ones, simply examine the sourcecode for the driver (available with the distribution). Dave - Original Message - From: Guillermo de Miguel To: [EMAIL PROTECTED] Sent: Wednesday, December 13, 2000 5:39 AM Subject: Fw: jdbc2.0 in postgres Hi everybody, i have a problem with jdbc;i need to use Resulset's methods such as getFetchSize(), afterLast() and getRow(), the problem is a message "This method is not yet implemented.", I am using a Postgres and i would be very thanked if anybody could tell me how to reach a JDBC 2.0 for Postgres,if it exits,and where to download it. Best regards
Details about my IIS 5.0 + Tomcat 3.1 Installation problem
I forget to say that I use W2000 Professional and the Sun JDK 1.2.2 (I try with the 1.3 on another machine and it doesn't work better) Thank you in advance, Gael Laurans
searchable site with all this mail???
Is there some really handy place where we can search through the entire tomcat mailing list for answers to questions? Im going to assume if there is a majordomo behind this list or something, then a copy of every message still exit on some central server, so writing a JSP or two to search through this stuff would not be too complicated also what about the ability to receive this mail in digest format? Luis
Re: searchable site with all this mail???
Try this: http://archives2.real-time.com/rte-tomcat/ Luis Andrei Cobo wrote: Is there some really handy place where we can search through the entire tomcat mailing list for answers to questions? Im going to assume if there is a majordomo behind this list or something, then a copy of every message still exit on some central server, so writing a JSP or two to search through this stuff would not be too complicated also what about the ability to receive this mail in digest format? Luis
Re: ROOT-Servlets not found
I found the following message in the mail archive, but with no reply. As I have exactly the same problem, I would very much like to know what the answer is. Thanks Laura Foster Hello, this is the problem I have: I'm using Tomcat with Apache. All my static-files I put into the path TOMCAT_HOME\webapps\ROOT. The Servlets into this web-inf\classes. The static files should be served by apache. Into the httpd.conf I wrote: ... DocumentRoot "C:/programme/apachgroup/jakarta-tomcat/weapps/ROOT" ... Include ...\mytomcat-apache.conf the mytomcat-apache.conf: ... Location /WEB-INF/ AllowOverride None deny from all /Location LocationMatch /*.jsp SetHandler jserv-servlet /LocationMatch ApJServMount /servlets /ROOT the servlet.xml: ... Context path="" docBase="webapps/ROOT" debug="0" reloadable="true" /Context ... When I'm trying to invoke Servlets in the example-webapp everything works fine. Also the serving of the static-files are working properly, but the servlets I want to open by eg. http://localhost/servlets/IsItWorking a 404-error is coming up. What am I doing wrong? Thanks for every help Maik The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Capital Markets Company. http://www.capco.com ***
RES: can jsp handle multipart/form-data ?
Thanks a lot, Philippe! But, my doubt is how to persist the uploaded file, since i should store it into my database, as an image field. Oreilly component just returns me a file object of its method. This is another problem! What should i do? Any hint? Best Regards, José Euclides Júnior __ E-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] http://euclides.8m.com -Mensagem original- De: Philippe de M. Sevestre [SMTP:[EMAIL PROTECTED]] Enviada em: Terça-feira, 12 de Dezembro de 2000 19:55 Para: [EMAIL PROTECTED] Assunto: Re: RES: can jsp handle multipart/form-data ? We've used the JspSmartUpload component with Tomcat. Check the following link for more info: http://industry.java.sun.com/solutions/products/by_product/0,2348,all-2631 -2 6,00.html At 15:05 12/12/00 -0300, you wrote: Hi everybody and Joe! I am trying to use the oreilly's package for multipart/form-data streams. But I didnt find any method to deal with input text field which comes ( mixed ) with the uploaded file from my form. Any hint? Best Regards, José Euclides Júnior
Tomcat started with jk_nt_service Terminates on console exit
Title: Tomcat started with jk_nt_service Terminates on console exit I apologize if this is a silly question. However, when I start Tomcat 3.2 using the jk_nt_service, then logoff the server console, the main Tomcat thread is terminated. I understand that logging off the console is a common action. Thus, I assume my problem must be configuration related. I have tested this behavior both on Win2K Ent Server and WinNT 4.0 Ent Server. Does any one have a possible fix? Reproduce : * Login to console * start Tomcat with jk_nt_service * Log off console * test and find Tomcat no longer running Best Regards, Joel Kozlow
role-based security how to?
I'm a bit at a loss as to how I'm supposed to configure the role-based security in my webapp's web.xml file. Consider the following scenario for my webapp: arearoles /pages/customers/* sales,admin /pages/orders/* sales,clerks,admin /pages/products/* clerks,admin It's easy to configure multiple web-resource-collections for this, e.g. web-resource-collection web-resource-namecustomers/web-resource-name url-pattern/pages/customers/*/url-pattern /web-resource-collection web-resource-collection web-resource-nameorders/web-resource-name url-pattern/pages/orders/*/url-pattern /web-resource-collection web-resource-collection web-resource-nameproducts/web-resource-name url-pattern/pages/products/*/url-pattern /web-resource-collection The following: auth-constraint role-nameadmin/role-name /auth-constraint seems to allow anyone with the role of admin to access all of the specified web-resource-collections (which is fine in this example); But how do I configure the other roles (sales clerks) to only have access to a specified web-resource-collection?? Any help would be greatly appreciated! TIA, Mike
AW: Tomcat started with jk_nt_service Terminates on console exit
See this mail thread just 5 days ago: Sun files this bug currently under 'recently closed' in a 'non public release': http://developer.java.sun.com/developer/bugParade/bugs/4323062.html They also give a reference to a tool that should solve the problem: http://www.kcmultimedia.com/javaserv -Ursprüngliche Nachricht- Von: Lacerda, Wellington (AFIS) [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 7. Dezember 2000 13:57 An: '[EMAIL PROTECTED]' Betreff: RE: NT-Service-howto feedback Are you using JDK1.3 ? This is a know bug of JDK1.3. Change to 1.2.2. Check the archives for details. Wellington -Original Message- From: David Legg [mailto:[EMAIL PROTECTED]] Sent: 07 December 2000 13:22 To: '[EMAIL PROTECTED]' Subject:NT-Service-howto feedback Hi, I've just installed Tomcat 3.2 on a new NT4 (sp6a) server with JDK 1.3. I followed the instructions very carefully and had success all the way... except when I log off the machine. I'm using the jk_nt_service.exe wrapper to run Tomcat as a service. If I logon (as administrator) and start Tomcat as a service (using the NT services applet) all is well. I can see and use all the examples from a remote browser accessing IIS over the network. However if I then log off; the Tomcat service stops for some reason and consequently remote browsing of the example pages stops as well. My first reaction was that maybe I need to alter the default settings for the service (e.g. run it with administrator privileges) but that had no effect. I shall continue to investigate but if this is a common problem perhaps it should be mentioned in the NT-Service-howto.html file. Finally, let me say that I'm genuinely very excited by the opportunities Tomcat makes possible. Keep up the good work! David Legg Webmaster - www.3Dlabs.com Phone: +44 1784 476 616 -Ursprüngliche Nachricht- Von: jokozlow [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 13. Dezember 2000 18:19 An: '[EMAIL PROTECTED]' Betreff: Tomcat started with jk_nt_service Terminates on console exit I apologize if this is a silly question. However, when I start Tomcat 3.2 using the jk_nt_service, then logoff the server console, the main Tomcat thread is terminated. I understand that logging off the console is a common action. Thus, I assume my problem must be configuration related. I have tested this behavior both on Win2K Ent Server and WinNT 4.0 Ent Server. Does any one have a possible fix? Reproduce : * Login to console * start Tomcat with jk_nt_service * Log off console * test and find Tomcat no longer running Best Regards, Joel Kozlow
AW: How do I determine the Relese Ver No
3.2 final is, what it says it is: 3.2 final. Otherwise it would be 3.2b1 .. 3.2b8. -Ursprüngliche Nachricht- Von: Shahed Ali [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 13. Dezember 2000 18:14 An: [EMAIL PROTECTED] Betreff: How do I determine the Relese Ver No Hi, I downloaded Tomcat 3.2 Final release a few days ago. How do I know if its b1 or b2 or what ? Thanks Shahed
Re: Tomcat started with jk_nt_service Terminates on console exit
I'm guessing you are using jdk 1.3; since is a well-known bug with that jdk version. There may be a fix/patch available now, otherwise you will have to back down to jdk1.2.2. mhl At 12/13/2000 09:19 AM -0800, you wrote: I apologize if this is a silly question. However, when I start Tomcat 3.2 using the jk_nt_service, then logoff the server console, the main Tomcat thread is terminated. I understand that logging off the console is a common action. Thus, I assume my problem must be configuration related. I have tested this behavior both on Win2K Ent Server and WinNT 4.0 Ent Server. Does any one have a possible fix? Reproduce : * Login to console * start Tomcat with jk_nt_service * Log off console * test and find Tomcat no longer running Best Regards, Joel Kozlow
Re: running init() twice?
I have had problems with the servlet being used in two different web-applications. This would cause two initializations of two different instances... There should be something in the Context/whatever is passed to the init method that you could check for this. Or print out this and see if the memory addresses of the two instances are the same or different. (Or, it could possibly be a bug in tomcat where someone didn't protect the concurrent initialization, where if a second request for the servlet comes before the first call to the init method returns it starts a different call to init in a different thread...) Good luck, Jason B. -Original Message-From: Irina Rubenchik [EMAIL PROTECTED]To: Parayali, Jayesh 1065 [EMAIL PROTECTED]Cc: tomcat-user [EMAIL PROTECTED]Date: Friday, December 08, 2000 11:48 AMSubject: Re: running init() twice?I'm running on winNT, and I do have print statements in my init(). This is how I see that it is being called for both frames. Parayali, Jayesh 1065 wrote: are you running on winNT? try displaying something inside init() like System.out.println(now starting init); -Original Message- From: Irina Rubenchik [SMTP:[EMAIL PROTECTED]] Sent: Thursday, December 07, 2000 9:36 AM To: Parayali, Jayesh 1065 Subject: Re: running init() twice? Then how come it is called twice? Parayali, Jayesh 1065 wrote: init will be called only once.. you don't need to set anything. -Original Message- From: Irina Rubenchik [SMTP:[EMAIL PROTECTED]] Sent: Thursday, December 07, 2000 6:37 AM To: tomcat-user Subject: running init() twice? Hello, I have a web page with 2 frames. Both frames invoke one servlet with different parameters. When I run this servlet, it seems like it is executing the init method twice, once for each frame. Is there an option that I can set in tomcat, which would make sure that the init method of my servlet only invoked once? Thanks irina File: Card for Irina Rubenchik File: Card for Irina Rubenchik
Re: Servlet Mappings and what am I doing wrong.
thanks that did it! along with moving out of the webapps context and getting my own context in server.xml vs defaults thanks to everyone else who helped! --- Pier Paolo Bortone [EMAIL PROTECTED] wrote: Ok. Andy, I send you my web.xml that could be help you, where all dwf file are handled by NetSite servlet. Bye. - Original Message - From: "Etienne Baert (SPS Office)" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 13, 2000 4:14 PM Subject: RE: Servlet Mappings and what am I doing wrong. Hi Andy, I think your problem comes because you are putting directory information into the url-mapping value in web.xml : you wrote : /myorg.com/*.msp you should write : *.msp Your path to your application (context) should appear into the server.xml under the conf folder : Context path="/myorg.com" docBase="..." ... /Context Hope this helps, Etienne -Original Message- From: Andrew Oliver [mailto:[EMAIL PROTECTED]] Sent: mercredi 13 decembre 2000 15:42 To: [EMAIL PROTECTED] Subject: Servlet Mappings and what am I doing wrong. I have some legacy code that uses its own non-jsp tag system. The following is my web.xml file put in webapps/myapp/WEB-INF dir The attempt is to map files with the extension *.msp to the RouterServlet. Unfortunately this is not happening, if I goto the directory and do an msp file it lists it as text. I then tried to do the same with the entire directory (hence the second mapping). What else do I need? What am I doing wrong? (This used to use JServ ApJServAction but I'm attempting to move to Tomcat3.2 and the new connector) and migrate toward a standard system. Please note I've genericised all filenames/ips in this. If there is a site called myorg.com, I'm not affilliated with it. I was trying to be generic. Thanks, -Andy ?xml version="1.0" encoding="ISO-8859-1"? !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 servlet servlet-name RouterServlet /servlet-name servlet-class com.myorg.servlet.RouterServlet /servlet-class init-param param-namehandlers_classpath/param-name param-valuecom.myorg.servlet/param-value /init-param init-param param-namehandlers/param-name param-value Article,Index,Default,Previous,Image,SendFriend,Poll/param-value /init-param init-param param-namepools/param-name param-valuepools/param-value /init-param init-param param-namepool_url/param-name param-valuejdbc:oracle:thin:@192.168.1.2:1521:MYDB/param-value /init-param init-param param-namepool_max_conn/param-name param-value20/param-value /init-param init-param param-namepool_max_checkout/param-name param-value10/param-value /init-param init-param param-namerealfiledir/param-name param-value/usr/local/apache/virtual/myorg.com/htdocs/param-value /init-param init-param param-namethread/param-name param-valuetrue/param-value /init-param init-param param-namethread_interval/param-name param-value300/param-value /init-param init-param param-namedebug/param-name param-valuefalse/param-value /init-param /servlet servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/* /url-pattern /servlet-mapping servlet-mapping servlet-name RouterServlet /servlet-name url-pattern /myorg.com/*.msp /url-pattern /servlet-mapping taglib taglib-uri http://java.apache.org/tomcat/examples-taglib /taglib-uri taglib-location /WEB-INF/jsp/example-taglib.tld /taglib-location taglib security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/jsp/security/protected/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method
Re: How to configure Tomcat-Apache connection
Please read the mod_jk-howto.html file in your tomcat/doc directory. NOTES: 1) You should be using Tomcat 3.2 (or, perhaps 4.0) 2) You should use mod_jk (and not the older mod_jserv) 3) Make sure you included the autogenerated mod_jk.conf-auto file into Apache's httpd.conf file. 4) Are you really using port 8080 on your Apache server?? good luck, post again if you're unable to get it working (and be more specific about your environment, OS vendor/version, tomcat version, jdk vendor/version, etc) Mike At 12/13/2000 07:10 PM +0100, you wrote: I have configured apache and tomcat so they communicate: apache - http://testlinux.softgroup.net.pl:8080/examples/jsp - apache communicating with tomcat tomcat - http://testlinux.softgroup.net.pl:8085/examples/jsp/index.html - tomcat own port - both are working - but if you will try to run any .jsp example through apache it won't run - tomcat runs .jsp ok Do someone know what to do so that apache support jsp? TIA Wojtek /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ Michael H. La Buddeemail: [EMAIL PROTECTED] Prosoft, Inc. phone: 414-860-6509 [EMAIL PROTECTED] fax:414-860-7014 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
RE: 404 with isapi_redirect.dll, tomcat3.2
20:19:00 127.0.0.1 GET /jakarta/isapi_redirect.dll+ 404 this is strange, this plus sign after dll filename? a 404 ? it should be a 200 to signal that the dll has been found in the jakarta virtual dir... it seems you have done a mistake in the register changes please review that.. Saludos , Ignacio J. Ortega
Where to put the JSP files in Windows95
Hi, I have downloaded and installed Tomcat3.2 in Windows95. I have set the JAVA_HOME and TOMCAT_HOME variables. But I do not know, in which directory to put the JSP files. I have saved them in webapps directory. But when I view it in the browser using http://localhost:8080/Helloworld.jsp, I am getting Error 404 File not found. I would like to knoe hte directory in which to put the JSP files. Expecting your reply soon. Thanks. Pratheba. _ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
Re: How to configure Tomcat-Apache connection
Mike La Budde wrote: Please read the mod_jk-howto.html file in your tomcat/doc directory. NOTES: 1) You should be using Tomcat 3.2 (or, perhaps 4.0) I use 3.2 2) You should use mod_jk (and not the older mod_jserv) I use it - I compiletd it from sources and 3) Make sure you included the autogenerated mod_jk.conf-auto file into Apache's httpd.conf file. I've included it (exactly that file) 4) Are you really using port 8080 on your Apache server?? Yes - because we have many instances of Apache, and this one I've set to port 8080. good luck, post again if you're unable to get it working (and be more specific about your environment, OS vendor/version, tomcat version, jdk vendor/version, etc) RedHat Linux jdk 1.2.2 If you will look at links I.ve included - it runs: http://testlinux.softgroup.net.pl:8085/examples/ - here is directory content with apache footing I just can't accomplish jsp programs through apache. Mike At 12/13/2000 07:10 PM +0100, you wrote: I have configured apache and tomcat so they communicate: apache - http://testlinux.softgroup.net.pl:8080/examples/jsp - apache communicating with tomcat tomcat - http://testlinux.softgroup.net.pl:8085/examples/jsp/index.html - tomcat own port - both are working - but if you will try to run any .jsp example through apache it won't run - tomcat runs .jsp ok Do someone know what to do so that apache support jsp? TIA Wojtek Wojtek
RE: How to configure Tomcat-Apache connection
I just can't accomplish jsp programs through apache. But what _happens_ when you try? Dave
RE: Where to put the JSP files in Windows95
You can put them in any directory you want, provided you update the conf/server.xml file appropriately. Say you want them in a directory named "foo." You would add this to server.xml: Context path="/foo" docBase="c:\jdk1.3\tomcat\foo" crossContext="false" debug="0" reloadable="true" /Context Don't forget to add a WEB-INF directory under "foo," and include a web.xml file in it. Cheers, Andrew -Original Message- From: Pratheba Periasamy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 1:59 PM To: [EMAIL PROTECTED] Subject: Where to put the JSP files in Windows95 Hi, I have downloaded and installed Tomcat3.2 in Windows95. I have set the JAVA_HOME and TOMCAT_HOME variables. But I do not know, in which directory to put the JSP files. I have saved them in webapps directory. But when I view it in the browser using http://localhost:8080/Helloworld.jsp, I am getting Error 404 File not found. I would like to knoe hte directory in which to put the JSP files. Expecting your reply soon. Thanks. Pratheba. __ ___ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
RE: webapp directory
Title: RE: webapp directory I don't know how to remap the Tomcat document root. But to remap a single context, do this: Context path=/domino docBase=c:/Apache/htdocs/domino crossContext=false debug=0 reloadable=true /Context -Original Message- From: Ralph Jensen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 5:28 AM To: [EMAIL PROTECTED] Subject: webapp directory I try to configure Tomcat so that it uses a webapp directory other than TOMCAT_HOME/webapps (in addition to that one), but can't figure out how. The sample application webapps/examples works. I then copied the entire webapps directory somewhere else and now would like to access it by clicking on a link just like the sample. I tried a lot of things using Alias and ApJServMount and also modified server.xml, but didn't get anywhere. What do I have to do in order to use /my/other/directory/webapps in the same way as TOMCAT_HOME/webapps?
Re: How to configure Tomcat-Apache connection
Dave Newton wrote: I just can't accomplish jsp programs through apache. But what _happens_ when you try? Dave If I open .jsp file through tomcat - it runs If I open .jsp file through apache - tomcat communication - it displays text of file You can see it in links I've sent earlier regards Wojtek
RE: Sessions and absolute URLs
Title: RE: Sessions and absolute URLs A bean is just java code with some conventions. You can definitely access a bean from a servlet. A JSP gets compiled into a servlet. -Original Message- From: Sen, Puny [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 12, 2000 1:02 PM To: '[EMAIL PROTECTED]' Subject: RE: Sessions and absolute URLs OK - I'll try that. Excuse the lack of knowledge, but is it possible to access a bean from a servlet (not a jsp)? -Original Message- From: Michael Quinn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 12, 2000 9:40 AM To: [EMAIL PROTECTED] Subject: RE: Sessions and absolute URLs One way you can maintain the session is to create a java bean, and make it's scope the session. Then depending on your hardware, you should be able to maintain a 1.1 connection and retain session information. -Original Message- From: Sen, Puny [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 12, 2000 9:20 AM To: [EMAIL PROTECTED] Subject: Sessions and absolute URLs Hi, I've just recently joined the list so forgive me if this topic has been discussed before. I've been having the following experiences with sessions: Links with absolute URLs do not retain the same session (even if they refer to the same webapp). Relative URLs are fine. So if I have a link to a secure page from a non-secure page, then I lose the session, beause I have to specify https: in the link. But this only happens on certain browsers. For example, Internet Explorer 5 on Windows NT 4 works fine, but Netscape 4.7 on Windows NT 4 does not. Can this problem be solved through URL rewriting (by wrapping the link in encodeURL()? Thanks, Puna
Re: role-based security how to?
Mike La Budde wrote: I'm a bit at a loss as to how I'm supposed to configure the role-based security in my webapp's web.xml file. Consider the following scenario for my webapp: arearoles /pages/customers/* sales,admin /pages/orders/* sales,clerks,admin /pages/products/* clerks,admin One thing to remember is that you can list more than one role-name inside an auth-constraint. Therefore, I would suggst making a separate security constraint for each different set of roles. For example, the entry for "/pages/products/*" would look like this: security-constraint web-resource-collection web-resource-nameProduct Info/web-resource-name url-pattern/pages/products/*/url-pattern /web-resource-collection auth-constraint role-nameclerks/role-name role-nameadmin/role-name /auth-constraint /security-constraint You would have a similar constraint for the other two protected areas. (Note - the web-resource-name element is required by the DTD. Tomcat 3.x does not check for this, but you will get bit if you move to a different servlet container later.) Craig McClanahan
Re: webapp directory
Title: RE: webapp directory Does doing this mean that static html files are served through tomcat, so it will be a slow way to serve those files? I don't know how to remap the Tomcat document root. But to remap a single context, do this: Context path="/domino" docBase="c:/Apache/htdocs/domino" crossContext="false" debug="0" reloadable="true" /Context -Original Message- From: Ralph Jensen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 5:28 AM To: [EMAIL PROTECTED] Subject: webapp directory I try to configure Tomcat so that it uses a webapp directory other than TOMCAT_HOME/webapps (in addition to that one), but can't figure out how. The sample application webapps/examples works. I then copied the entire webapps directory somewhere else and now would like to access it by clicking on a link just like the sample. I tried a lot of things using Alias and ApJServMount and also modified server.xml, but didn't get anywhere. What do I have to do in order to use /my/other/directory/webapps in the same way as TOMCAT_HOME/webapps?
RE: How to configure Tomcat-Apache connection
I just can't accomplish jsp programs through apache. But what _happens_ when you try? Dave If I open .jsp file through tomcat - it runs If I open .jsp file through apache - tomcat communication - it displays text of file I think w/o seeing actual files it'll be tough to help. If you're including the conf-auto file and have all your ports etc. set up correctly there's nothing in what you've said that would lead me to think there's a problem. Dave
Filters in Tomcat 4 m4
All, I've looked around but can't find any discussion about the filter examples in the current release of Tomcat 4 m4. I'd like to test some filters, but when trying to use one, get the following in the name_examples_log_2000_12_13.txt: 2000-12-13 13:34:13 StandardContext[/examples]: Exception starting filter Request Dumper Filter java.lang.ClassNotFoundException: filters.RequestDumperFilter at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1022) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:906) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:245) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:305) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:117) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:2545) at org.apache.catalina.core.StandardContext.start(StandardContext.java:2741) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1160) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1160) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:217) at org.apache.catalina.core.StandardService.start(StandardService.java:323) at org.apache.catalina.core.StandardServer.start(StandardServer.java:454) at org.apache.catalina.startup.Catalina.start(Catalina.java:639) at org.apache.catalina.startup.Catalina.execute(Catalina.java:596) at org.apache.catalina.startup.Catalina.process(Catalina.java:169) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:133) Apparently, the server doesn't have it in the classpath... So, I manually stuck it in there in the startup file and it still couldn't find it. Is there a problem using filters at this point that I should know about, or is this just a stupid user error? Thanks, Dan PS: If you could copy me directly on responses, I'd appreciate it. thnx. -dm -- Dan Malks Sun Java Center Enterprise Java Architect703.208.5794
RE: webapp directory
Title: RE: webapp directory Yes. I put up a question last week asking how to get Apache to serve static stuff while just forwarding jsp and servlet requests to Tomcat. This is well-documented for for mod-jserv, but not at all for mod_jk. Unfortunately, I received no responses. If you are using mod-jserv, see the Tomcat HOWTO for instructions on getting Apache to handle static content and Tomcat the JSPs and servlets. -Original Message-From: Frank Morton [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 13, 2000 2:43 PMTo: [EMAIL PROTECTED]Subject: Re: webapp directory Does doing this mean that static html files are served through tomcat, so it will be a slow way to serve those files? I don't know how to remap the Tomcat document root. But to remap a single context, do this: Context path="/domino" docBase="c:/Apache/htdocs/domino" crossContext="false" debug="0" reloadable="true" /Context -Original Message- From: Ralph Jensen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 5:28 AM To: [EMAIL PROTECTED] Subject: webapp directory I try to configure Tomcat so that it uses a webapp directory other than TOMCAT_HOME/webapps (in addition to that one), but can't figure out how. The sample application webapps/examples works. I then copied the entire webapps directory somewhere else and now would like to access it by clicking on a link just like the sample. I tried a lot of things using Alias and ApJServMount and also modified server.xml, but didn't get anywhere. What do I have to do in order to use /my/other/directory/webapps in the same way as TOMCAT_HOME/webapps?
RE: Tomcat started with jk_nt_service Terminates on console exit
Title: RE: Tomcat started with jk_nt_service Terminates on console exit Thank you for your responses. Yes, your are correct, I am running JDK 1.3. I have since rolled back to 1.2.2. Best Regards, Joel Kozlow -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 9:21 AM To: '[EMAIL PROTECTED]' Subject: AW: Tomcat started with jk_nt_service Terminates on console exit See this mail thread just 5 days ago: Sun files this bug currently under 'recently closed' in a 'non public release': http://developer.java.sun.com/developer/bugParade/bugs/4323062.html They also give a reference to a tool that should solve the problem: http://www.kcmultimedia.com/javaserv -Ursprüngliche Nachricht- Von: Lacerda, Wellington (AFIS) [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 7. Dezember 2000 13:57 An: '[EMAIL PROTECTED]' Betreff: RE: NT-Service-howto feedback Are you using JDK1.3 ? This is a know bug of JDK1.3. Change to 1.2.2. Check the archives for details. Wellington -Original Message- From: David Legg [mailto:[EMAIL PROTECTED]] Sent: 07 December 2000 13:22 To: '[EMAIL PROTECTED]' Subject: NT-Service-howto feedback Hi, I've just installed Tomcat 3.2 on a new NT4 (sp6a) server with JDK 1.3. I followed the instructions very carefully and had success all the way... except when I log off the machine. I'm using the jk_nt_service.exe wrapper to run Tomcat as a service. If I logon (as administrator) and start Tomcat as a service (using the NT services applet) all is well. I can see and use all the examples from a remote browser accessing IIS over the network. However if I then log off; the Tomcat service stops for some reason and consequently remote browsing of the example pages stops as well. My first reaction was that maybe I need to alter the default settings for the service (e.g. run it with administrator privileges) but that had no effect. I shall continue to investigate but if this is a common problem perhaps it should be mentioned in the NT-Service-howto.html file. Finally, let me say that I'm genuinely very excited by the opportunities Tomcat makes possible. Keep up the good work! David Legg Webmaster - www.3Dlabs.com Phone: +44 1784 476 616 -Ursprüngliche Nachricht- Von: jokozlow [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 13. Dezember 2000 18:19 An: '[EMAIL PROTECTED]' Betreff: Tomcat started with jk_nt_service Terminates on console exit I apologize if this is a silly question. However, when I start Tomcat 3.2 using the jk_nt_service, then logoff the server console, the main Tomcat thread is terminated. I understand that logging off the console is a common action. Thus, I assume my problem must be configuration related. I have tested this behavior both on Win2K Ent Server and WinNT 4.0 Ent Server. Does any one have a possible fix? Reproduce : * Login to console * start Tomcat with jk_nt_service * Log off console * test and find Tomcat no longer running Best Regards, Joel Kozlow
RE: webapp directory
This is well-documented for for mod-jserv, but not at all for mod_jk. Again, I'd shoot for the "Working with mod_jk" document (http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html) where I would find the section called "Configuring Apache to use mod_jk" (http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html#s 6) whereupon I should receive enlightenment. (Note that the mod_jk.conf-auto file makes things much easier.) Dave
Re: Filters in Tomcat 4 m4
Dan Malks wrote: All, I've looked around but can't find any discussion about the filter examples in the current release of Tomcat 4 m4. I'd like to test some filters, but when trying to use one, get the following in the name_examples_log_2000_12_13.txt: Are you just uncommenting the filter-mapping entry in the "$CATALINA_HOME/webapps/examples/WEB-INF/web.xml" file? When I do this, it works fine. The only reason this wouldn't work is if the filter class (filters.RequestDumperFilter) was not visible to the web app's class loader -- in a standard release, this class is located at: $CATALINA_HOME/webapps/examples/WEB-INF/classes/filters/RequestDumperFilter.class If you want to use this filter in a different webapp, you will of course have to move this class into the WEB-INF directory of the web application you want to use it in. Note that a standard distribution or build of Tomcat 4.0 installs two other filters on the examples web application. Both of them log output to the same log file you are checking. Are they running correctly? Dan Malks Sun Java Center Enterprise Java Architect703.208.5794 Craig McClanahan
Advices for IIS-Tomcat integration Service configuration
Hola a Todos: This messages is intended to help a little everybody that are trying to get to work the IIS-Tomcat , with no luck. * check case of file names and directories is a big source of trouble * dont use long filenames in directories when possible try to install tomcat inside a path without long names name "c:\tomcat" is a good choice * same for jdk "c:\jdk" is a good choice ( change drives as needed but keep short names ) * IIS-Tomcat integration uses ajp12 *only*, is you dont need ajp13 dont use it.. Hope this help somebody.. Saludos , Ignacio J. Ortega
RE: webapp directory
Title: RE: webapp directory But The same doesn't work for tomcat root directory . Even I am struggling to make this work for the tomcat root directory. I don't want to use a seperate web.xml from the another directory.. I need my directory to be the root doc_base for timcat by default. Any one had done this successfully ?? Thanks Sudheesh -Original Message-From: Frank Morton [mailto:[EMAIL PROTECTED]]Sent: Wednesday, December 13, 2000 11:43 AMTo: [EMAIL PROTECTED]Subject: Re: webapp directory Does doing this mean that static html files are served through tomcat, so it will be a slow way to serve those files? I don't know how to remap the Tomcat document root. But to remap a single context, do this: Context path="/domino" docBase="c:/Apache/htdocs/domino" crossContext="false" debug="0" reloadable="true" /Context -Original Message- From: Ralph Jensen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 5:28 AM To: [EMAIL PROTECTED] Subject: webapp directory I try to configure Tomcat so that it uses a webapp directory other than TOMCAT_HOME/webapps (in addition to that one), but can't figure out how. The sample application webapps/examples works. I then copied the entire webapps directory somewhere else and now would like to access it by clicking on a link just like the sample. I tried a lot of things using Alias and ApJServMount and also modified server.xml, but didn't get anywhere. What do I have to do in order to use /my/other/directory/webapps in the same way as TOMCAT_HOME/webapps?
Re: role-based security how to?
Thanks Craig! I had tried defining several security-constraints like this: security-constraint web-resource-collection web-resource-namecustomers/web-resource-name url-pattern/pages/customers/*/url-pattern /web-resource-collection auth-constraint role-namesales/role-name role-nameadmin/role-name /auth-constraint /security-constraint security-constraint web-resource-collection web-resource-nameorders/web-resource-name url-pattern/pages/orders/*/url-pattern /web-resource-collection auth-constraint role-namesales/role-name role-nameclerks/role-name role-nameadmin/role-name /auth-constraint /security-constraint security-constraint web-resource-collection web-resource-nameproducts/web-resource-name url-pattern/pages/products/*/url-pattern /web-resource-collection auth-constraint role-nameclerks/role-name role-nameadmin/role-name /auth-constraint /security-constraint However, it blew up Tomcat and closed my console window! (I'm running under Win NT 4.0). So I just figured that I was specifying these wrong. Turns out the above is correct and I had introduced a different problem, which caused it to blow up Mike At 12/13/2000 11:37 AM -0800, you wrote: Mike La Budde wrote: I'm a bit at a loss as to how I'm supposed to configure the role-based security in my webapp's web.xml file. Consider the following scenario for my webapp: arearoles /pages/customers/* sales,admin /pages/orders/* sales,clerks,admin /pages/products/* clerks,admin One thing to remember is that you can list more than one role-name inside an auth-constraint. Therefore, I would suggst making a separate security constraint for each different set of roles. For example, the entry for "/pages/products/*" would look like this: security-constraint web-resource-collection web-resource-nameProduct Info/web-resource-name url-pattern/pages/products/*/url-pattern /web-resource-collection auth-constraint role-nameclerks/role-name role-nameadmin/role-name /auth-constraint /security-constraint You would have a similar constraint for the other two protected areas. (Note - the web-resource-name element is required by the DTD. Tomcat 3.x does not check for this, but you will get bit if you move to a different servlet container later.) Craig McClanahan
RE: Advices for IIS-Tomcat integration Service configuration
One thing to add... You can use long names for directories as long as you do it like the following: C:\Progra~1\Apache~1\Jakarta\Tomcat would be equivalent to C:\Program Files\Apache Group\Jakarta\Tomcat I have use this in my integration with both Apache Server and IIS and it works fine. Jake -Original Message- From: Nacho [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 2:50 PM To: 'tomcat-user' Subject: Advices for IIS-Tomcat integration Service configuration Hola a Todos: This messages is intended to help a little everybody that are trying to get to work the IIS-Tomcat , with no luck. * check case of file names and directories is a big source of trouble * dont use long filenames in directories when possible try to install tomcat inside a path without long names name "c:\tomcat" is a good choice * same for jdk "c:\jdk" is a good choice ( change drives as needed but keep short names ) * IIS-Tomcat integration uses ajp12 *only*, is you dont need ajp13 dont use it.. Hope this help somebody.. Saludos , Ignacio J. Ortega
Installtion problem
Hi I have just downloaded Tomcat 3.2.1 onto Windows 98 machine. When I invoke tomcat run I get the following messages. 2000-12-13 03:42:38 - ContextManager: Adding context Ctx( /admin )2000-12-13 03:42:38 - ContextManager: Adding context Ctx( )2000-12-13 03:42:38 - ContextManager: Adding context Ctx( /test )FATAL:java.net.BindException: Address in use: JVM_Bindjava.net.BindException: Address in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:397) at java.net.ServerSocket.init(ServerSocket.java:170) at java.net.ServerSocket.init(ServerSocket.java:121) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) But no ports are being used.: D:\tomcat\jakarta-tomcat-3.2.1netstat Active Connections Proto Local Address Foreign Address State D:\tomcat\jakarta-tomcat-3.2.1 Also I tried several different ports with the exact same message Also I am unsure that the installation finished properly: tomcat start returned the following. : 2000-12-13-ContextManager: Adding context Ctx( /examples) Starting tomcat... ContexManager: Adding context Ctx(/ admin) ... 2000-12-13 PoolTcpConnector: Starting HttpConnectionHandler on 88 2000-12-13 -PoolTcpConnector: Starting ajp2ConnectionHandler on 8007 Has anyone seen this? Thanks in advance Andrew Sosnowski
Current the context from a servlet - to open a file?
When running a servlet (located in webapps/myapp/WEB-INF/classes) I'd like to open a ascii file (located in webapps/myapp). What's the best way of obtaining the current Context -- so as not to hardcode it in? Is there an appropriate class/method to call? Thanks in advance! Jeff
RE: Installtion problem
I get the exact same error! No ports are in use. Let me know if you get this figured out, please! By the way, if you didn't realize, after the server starts and outputs this error, it will still work. Are you using JDBC realm security? That is when I started seeing the problem. -Original Message- From: Andy Sosnowski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 1:39 PM To: [EMAIL PROTECTED] Subject: Installtion problem Hi I have just downloaded Tomcat 3.2.1 onto Windows 98 machine. When I invoke tomcat run I get the following messages. 2000-12-13 03:42:38 - ContextManager: Adding context Ctx( /admin ) 2000-12-13 03:42:38 - ContextManager: Adding context Ctx( ) 2000-12-13 03:42:38 - ContextManager: Adding context Ctx( /test ) FATAL:java.net.BindException: Address in use: JVM_Bind java.net.BindException: Address in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:397) at java.net.ServerSocket.init(ServerSocket.java:170) at java.net.ServerSocket.init(ServerSocket.java:121) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(Default ServerSocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoi nt.java:239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.jav a:188) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) But no ports are being used.: D:\tomcat\jakarta-tomcat-3.2.1netstat Active Connections Proto Local Address Foreign AddressState D:\tomcat\jakarta-tomcat-3.2.1 Also I tried several different ports with the exact same message Also I am unsure that the installation finished properly: tomcat start returned the following. : 2000-12-13-ContextManager: Adding context Ctx( /examples) Starting tomcat... ContexManager: Adding context Ctx(/ admin) ... 2000-12-13 PoolTcpConnector: Starting HttpConnectionHandler on 88 2000-12-13 -PoolTcpConnector: Starting ajp2ConnectionHandler on 8007 Has anyone seen this? Thanks in advance Andrew Sosnowski
RE: Installtion problem
Hola, I have just downloaded Tomcat 3.2.1 onto Windows 98 machine. You poor thing ;) tomcat run I don't know what that is, when I was running Tomcat under Windows I just did 'tomcat start' and 'tomcat stop' as per the documentation. tomcat start 2000-12-13-ContextManager: Adding context Ctx( /examples) Starting tomcat... ContexManager: Adding context Ctx(/ admin) ... 2000-12-13 PoolTcpConnector: Starting HttpConnectionHandler on 88 2000-12-13 -PoolTcpConnector: Starting ajp2ConnectionHandler on 8007 Has anyone seen this? Yeah, that's what happens when Tomcat starts running. Dave
Re: role-based security how to?
..But use of security-role> /is/ broken in tomcat 3.2 e.g. consider the following web.xml fragments: !-- list of web app level roles --> security-role> role-name>fred/role-name> /security-role> and in the servlet definition we have !-- list of aliases for roles that the servlet will use -> security-role-ref> role-name>alias_for_fred/role-name> role-link>fred/role-link> /security-role-ref> the following servlet code will fail: ... if ( req.isUserInRole("alias_for_fred") ) { out.println("user validated for role") ; } else { out.println("user not validated for role"); } isUserInRole() only works if the role passed is identical to that defined in the tomcat.users file. This breaks the Servlet 2.2 specification on role aliasing - if there's a role-ref set up, then isUserInRole should respect this additional mapping. -Thom Mike La Budde wrote: Thanks Craig! I had tried defining several security-constraints like this: security-constraint> web-resource-collection> web-resource-name>customers/web-resource-name> url-pattern>/pages/customers/*/url-pattern> /web-resource-collection> auth-constraint> role-name>sales/role-name> role-name>admin/role-name> /auth-constraint> /security-constraint> security-constraint> web-resource-collection> web-resource-name>orders/web-resource-name> url-pattern>/pages/orders/*/url-pattern> /web-resource-collection> auth-constraint> role-name>sales/role-name> role-name>clerks/role-name> role-name>admin/role-name> /auth-constraint> /security-constraint> security-constraint> web-resource-collection> web-resource-name>products/web-resource-name> url-pattern>/pages/products/*/url-pattern> /web-resource-collection> auth-constraint> role-name>clerks/role-name> role-name>admin/role-name> /auth-constraint> /security-constraint> However, it blew up Tomcat and closed my console window! (I'm running under Win NT 4.0). So I just figured that I was specifying these wrong. Turns out the above is correct and I had introduced a different problem, which caused it to blow up Mike At 12/13/2000 11:37 AM -0800, you wrote: >Mike La Budde wrote: > > > I'm a bit at a loss as to how I'm supposed to configure the role-based > > security in my webapp's web.xml file. > > > > Consider the following scenario for my webapp: > > > > area roles > > /pages/customers/* sales,admin > > /pages/orders/* sales,clerks,admin > > /pages/products/* clerks,admin > > > >One thing to remember is that you can list more than one role-name> inside an >auth-constraint>. Therefore, I would suggst making a separate security >constraint for each different set of roles. For example, the entry for >"/pages/products/*" would look like this: > > security-constraint> > web-resource-collection> > web-resource-name>Product Info/web-resource-name> > url-pattern>/pages/products/*/url-pattern> > /web-resource-collection> > auth-constraint> > role-name>clerks/role-name> > role-name>admin/role-name> > /auth-constraint> > /security-constraint> > >You would have a similar constraint for the other two protected areas. > >(Note - the web-resource-name> element is required by the DTD. Tomcat 3.x >does >not check for this, but you will get bit if you move to a different servlet >container later.) > >Craig McClanahan
Re: Filters in Tomcat 4 m4
Craig, "Craig R. McClanahan" wrote: Dan Malks wrote: All, I've looked around but can't find any discussion about the filter examples in the current release of Tomcat 4 m4. I'd like to test some filters, but when trying to use one, get the following in the name_examples_log_2000_12_13.txt: Are you just uncommenting the filter-mapping entry in the "$CATALINA_HOME/webapps/examples/WEB-INF/web.xml" file? Yes. When I do this, it works fine. The only reason this wouldn't work is if the filter class (filters.RequestDumperFilter) was not visible to the web app's class loader -- in a standard release, this class is located at: $CATALINA_HOME/webapps/examples/WEB-INF/classes/filters/RequestDumperFilter.class Understood. The first thing I did was verify that the class file was there, and it is. If you want to use this filter in a different webapp, you will of course have to move this class into the WEB-INF directory of the web application you want to use it in. Actually, just noticed that the vm can't seem to load other classes either...here's the exceptions when I try and execute the numguess example: A Servlet Exception Has Occurred Exception Report: javax.servlet.ServletException: num/NumberGuessBean at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:404) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:180) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:165) at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:443) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:1876) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:343) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:785) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:902) at java.lang.Thread.run(Thread.java:484) Root Cause: java.lang.NoClassDefFoundError: num/NumberGuessBean at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.load(JspServlet.java:120) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:158) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:168) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:317) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:396) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:180) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:165) at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:443) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:1876) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:343) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:785) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:902) at
RE: Tomcat 4.0 milestone 4 and jsp:expression tag
Pierre, Thanks for taking the time to email me. I downloaded the nightly build as of 12/10/2000, got it built and running and tried changing the request-time attribute expressions as specified and it didn't seem to have the desired effect. It seems that they aren't recognized/evaluated. I will take a look at the code as an exercise to see if I can understand it well enough to make a somewhat useful suggestion. JSP example: jsp:useBean id="TestBean" class="com.sandbox.beansjsps.TestBean" scope="session" / html head title TestJsp /title /head body This is the string: jsp:expressionTestBean.getTestString()/jsp:expression br This is what happens when we quote it: "jsp:expressionTestBean.getTestString()/jsp:expression" br And if we have it as the parameter of an input (without quotes): br input value=%=TestBean.getTestString()% width=35 height=1/ br And when it's quoted: br input value="%=TestBean.getTestString()%" width=35 height=1/ br /body /html Thanks again, patrick -Original Message- From: Pierre Delisle [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 12, 2000 10:31 PM To: [EMAIL PROTECTED] Cc: Patrick McFarlane; Yassal Habbas Subject: Re: Tomcat 4.0 milestone 4 and jsp:expression tag Also, you should use the nightly build of tomcat-4.0. I don't think that request-time expressions were properly supported in m4. -- Pierre Pierre Delisle wrote: In XML syntax, a request-time attribute is specified via the following syntax: %= ... % Here are some snippets of interest from the JSP1.2 PFD spec: 5.1.8 Request-Time Attributes An action element that can accept a request time attribute (Section 2.13.1) can accept an argument for that attribute of the form "%= text %" (white space around text is not needed, and note the missing '' and ''). The text, after any applicable quoting as in any other XML document, is an expression to be evaluated as in Section 2.13.1. ... 5.2.8 Request-Time Attribute Expressions Request-time attribute expressions are of the form "%= expression %". Although this syntax is consistent with the syntax used elsewhere in a JSP page, it is not a legal XML syntax. The XML mapping for these expressions is into values of the form "%= expression' %", where the JSP specification quoting convention has been converted to the XML quoting convention. -- Pierre Patrick McFarlane wrote: Hello, I'm trying to use Tomcat 4.0 milestone 4 to take advantage of it's support for XML compliant JSP tags. I understand from the New Spec document that this functionality is not complete (medium rare if I recall). To that effect, I've noticed some strange behavior when evaluating jsp:expression tags. It seems that if the jsp:expression tag is embedded in an attribute, (i.e. input value="jsp:expressionTestBean.getTestString()/jsp:expression" width=35 height=1/ ) then the jsp:expression tag is not recognized. I'm not sure if this is a known issue/bug or some sort of user error. I've attached some samples of the behavior I'm describing. There is attached a bean called TestBean, a jsp page called TestJsp.jsp which uses the non XML convention (% %) and works properly and a jsp page called TextXMLJsp.jsp which uses the XML compliant jsp:expression syntax and does not behave properly. Thanks in advance for looking at this... patrick patrick mcfarlane sr. java engineer lendx [EMAIL PROTECTED]
Re: Current the context from a servlet - to open a file?
Jeff Taylor wrote: When running a servlet (located in webapps/myapp/WEB-INF/classes) I'd like to open a ascii file (located in webapps/myapp). What's the best way of obtaining the current Context -- so as not to hardcode it in? Is there an appropriate class/method to call? Thanks in advance! To read file "foo.txt" from the document root, try this: InputStream is = getServletContext().getResourceAsStream("/foo.txt"); If you want to read it as characters, you can wrap an InputStreamReader around it: InputStreamReader isr = new InputStreamReader(is); This works no matter what directory your webapp runs in. As an added bonus, it will also work in servlet containers that don't store your webapp as a directory at all (for example, if it runs the app directly out of a WAR file). Jeff Craig McClanahan
Re: Installtion problem
John de la Garza wrote: I get the exact same error! No ports are in use. Let me know if you get this figured out, please! Using "netstat" by itself does not list ports on which a server application is listening. You have to use "netstat -a" to see those. Craig McClanahan
RE: Installtion problem
Title: RE: Installtion problem Crazy! lets drink a few more cups of coffe. /===\ | Micky Mimo | | Systems Specialist | | (781) 457 - 1317 | | [EMAIL PROTECTED] | \===/ -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 4:54 PM To: [EMAIL PROTECTED] Subject: RE: Installtion problem Hola, I have just downloaded Tomcat 3.2.1 onto Windows 98 machine. You poor thing ;) tomcat run I don't know what that is, when I was running Tomcat under Windows I just did 'tomcat start' and 'tomcat stop' as per the documentation. tomcat start 2000-12-13-ContextManager: Adding context Ctx( /examples) Starting tomcat... ContexManager: Adding context Ctx(/ admin) ... 2000-12-13 PoolTcpConnector: Starting HttpConnectionHandler on 88 2000-12-13 -PoolTcpConnector: Starting ajp2ConnectionHandler on 8007 Has anyone seen this? Yeah, that's what happens when Tomcat starts running. Dave
building URL's?
What is the best way to build URL's without hardcoding them? Right now, I have tried this: SERVLET_HOME = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getRequestURI(); DOCUMENTS_HOME = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/"; This seems to work with a servlet that does posting, but I'm confused by what is said of getRequestURI() in the servlet API: *begin excerpt** Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. For example: First line of HTTP request Returned Value POST /some/path.html HTTP/1.1 /some/path.html GET http://foo.bar/a.html HTTP/1.0 http://foo.bar/a.html HEAD /xyz?a=b HTTP/1.1 /xyz To reconstruct an URL with a scheme and host, use HttpUtils.getRequestURL(javax.servlet.http.HttpServletRequest). Returns: a String containing the part of the URL from the protocol name up to the query string *end excerpt*** It seems to say that it should return the whole path, whereas I am already specifying that from the scheme all the way up to the server port. I need to get the the context + path info (such as /servlet/) and the actual servlet. Another problem with what I'm doing is that getContextPath() does not exist in the servlet 2.1 API. So, what is the best generic (and most proper) way to get what I'm trying to achieve? thanks, Jake
Re: [ANNOUNCEMENT] Security Related Updates - Tomcat 3.1.1 and Tomcat 3.2.1
het Craig - sorry to be dense - but what are the "appropriate contents" that should be replaced by 3.2.1? Is this just the various jar's in /lib? -- Wishing you an "OOBA OOBA" Y2K Horace...once known as "Kicker" :-) Horace Vallas hav.Software http://www.hav.com/ P.O. Box 354 [EMAIL PROTECTED] Richmond, Tx. 77406-0354 voice: 281-341-5035 USAfax: 281-341-5087 Thawte Web Of Trust Notary in SW Houston, Tx. http://www.hav.com/?content=/thawteWOTnotary.htm ...drop by and chat if I'm online http://www.hav.com/chat/ === === === === === === === === === === What is a Vet? ... He is the barroom loudmouth, dumber than five wooden planks, whose overgrown frat-boy behavior is outweighed a hundred times in the cosmic scales by four hours of exquisite bravery near the 38th parallel. ... - Unknown http://www.hav.com/vet.htm TOMCAT 3.2 USERS * There are two identified vulnerabilities that are documented in the Release Notes for Tomcat 3.2.1 (file "doc/readme" in the distribution). These vulnerabilities have been fixed in Tomcat 3.2.1. * You can download this security maintenance release at: http://jakarta.apache.org/builds/tomcat/release/v3.2.1/bin/ * You are ***strongly*** encouraged to download and install this update as quickly as possible. * This release fixes ***only*** the identified security vulnerabilities. It does not address any of the other bugs, or feature requests, related to Tomcat 3.2 final. These issues will be dealt with in future maintenance releases of Tomcat 3.2 as appropriate. * The corrective action is to download the binary distribution, and replace the appropriate contents in the $TOMCAT_HOME directory. There is no need to modify any of the binary components (such as the mod_jserv component used to connect Tomcat to Apache). S/MIME Cryptographic Signature
Tomcat reports incorrect HTTP port from HttpUtils.getRequestURL(request)
** Please respond to [EMAIL PROTECTED] ** Tomcat 3.2 final If I call this https://www.affiliate.com/test.jsp and test.jsp contains this %= HttpUtils.getRequestURL(request).toString() % I get this https://www.affiliate.com:80/test.jsp Notice the incorrect port. Is this a known bug with the Servlet libs, or Tomcat? __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/
RE: webapp directory
Dave, thanks for the pointers. However, (1) I would be more confused than ever gr. My workers.properties file is totally erroneous. It has workers.tomcat_home=c:\jakarta-tomcat workers.java_home=c:\jdk1.2.2 both of which are wrong. But Tomcat is successfully serving both JSPs and servlets. How can this be? (2) The howto would not address the original question: how to change the Tomcat document root. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 3:12 PM To: [EMAIL PROTECTED] Subject: RE: webapp directory This is well-documented for for mod-jserv, but not at all for mod_jk. Again, I'd shoot for the "Working with mod_jk" document (http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html) where I would find the section called "Configuring Apache to use mod_jk" (http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html#s 6) whereupon I should receive enlightenment. (Note that the mod_jk.conf-auto file makes things much easier.) Dave
RE: Advices for IIS-Tomcat integration Service configuration
Hola Ignacio, Thanks for all the tips. I got isapi_redirect.dll working fine with IIS5 and Tomcat 3.2.1 at home without any problems. I did not need to remove ajp13. I'll probably remove it anyway. I did use a shorter directory name for Tomcat than the default. Now I just need to figure out why it's not working at work. I did notice the ISAPI filter at home said it had a High Priority, while the one at work said Priority "unknown." Cheers, Michael Kintzer -Original Message- From: Nacho To: 'tomcat-user' Sent: 12/13/00 12:50 PM Subject: Advices for IIS-Tomcat integration Service configuration Hola a Todos: This messages is intended to help a little everybody that are trying to get to work the IIS-Tomcat , with no luck. * check case of file names and directories is a big source of trouble * dont use long filenames in directories when possible try to install tomcat inside a path without long names name "c:\tomcat" is a good choice * same for jdk "c:\jdk" is a good choice ( change drives as needed but keep short names ) * IIS-Tomcat integration uses ajp12 *only*, is you dont need ajp13 dont use it.. Hope this help somebody.. Saludos , Ignacio J. Ortega
RE: can jsp handle multipart/form-data ?
Title: RE: can jsp handle multipart/form-data ? Try this: * Using the Orielly lib, create your multi object, but use a temporary file storage location in the constructor. * Once the file is saved to your temporary location, get the File instance. * Save the file to your DB, or a permanent storage location (good practice would be to store the file location in the db, but the binary in a directory) * Clean up the temp file. Hope that helps, Joel Kozlow === Joel Kozlow ESG Consultant at Hewlett Packard Supplier Solutions Group Mayfield Site, U.S. [EMAIL PROTECTED] === -Original Message- From: Jose Euclides da Silva Junior - DIGR.O [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 9:53 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RES: can jsp handle multipart/form-data ? Thanks a lot, Philippe! But, my doubt is how to persist the uploaded file, since i should store it into my database, as an image field. Oreilly component just returns me a file object of its method. This is another problem! What should i do? Any hint? Best Regards, José Euclides Júnior __ E-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] http://euclides.8m.com -Mensagem original- De: Philippe de M. Sevestre [SMTP:[EMAIL PROTECTED]] Enviada em: Terça-feira, 12 de Dezembro de 2000 19:55 Para: [EMAIL PROTECTED] Assunto: Re: RES: can jsp handle multipart/form-data ? We've used the JspSmartUpload component with Tomcat. Check the following link for more info: http://industry.java.sun.com/solutions/products/by_product/0,2348,all-2631 -2 6,00.html At 15:05 12/12/00 -0300, you wrote: Hi everybody and Joe! I am trying to use the oreilly's package for multipart/form-data streams. But I didnt find any method to deal with input text field which comes ( mixed ) with the uploaded file from my form. Any hint? Best Regards, José Euclides Júnior
precompile jsp
Hi all, I've been trying to use jspc to precompile the jsp pages into java classes. Below is the steps I've taken: 1. run jspc and generate the java code and web.xml 2. insert the web.xml generated in step1 into my web.xml. 3. compile the java files into class files. Now I have problem with where to put the class files. Should they be under the web-inf\classes or the work\ directory? I put them under web-inf\classes. And I have the classes preserve the package/directory structure. 4. restart Tomcat. Result: the jsp pages under the first level directory are not re-compiled by Tomcat, but those under the 2nd level directory are re-compiled. For example, suppose I have the following directory structure: webapps + registration + enroll + web-inf + classes The jsps under registration/ are not recompiled, but those under registration/enroll are re-compiled by Tomcat, as I can see the java/class files in the work/ directory. How can I make it work? Do I have to put the classes files under work/ and name them the same way Tomcat names them? Thanks for any help. Joan
welcome file
Hello! I am trying to have all my http request foward to a mainServlet first and after few verification send it to the appropriate page. For example, if you type http://mylocalhost/ if should go directly to myapp/servlet/mainServlet which reside in Tomcat. However if you type http://mylocalhost/hello.html, it should go to my Apache web server. I am using Apache+Tomcat combination. Someone told me once that I could use welcome-file-list but I haven't been able to find any doc Ideas? Thanks in advance! Cheers, Francis
Re: How do I determine the Relese Ver No
Hi Guys, Can u ppl help me out can anyone send me a complete installation script for tomcat3.2 on Red Hat Linux 6.2 I have apache 1.3.14 apache Jserv 1.1.2cheersSunil - Original Message - From: Craig R. McClanahan To: [EMAIL PROTECTED] Sent: Thursday, December 14, 2000 1:02 AM Subject: Re: How do I determine the Relese Ver No Shahed Ali wrote: Hi,I downloaded Tomcat 3.2 Final release a few days ago.How do I know if its b1 or b2 or what ?ThanksShahed On the "welcome" page you get when you first start Tomcat, you'll see in the title something like "Tomcat 3.2" -- which means you have the final version. One of the betas would have identified itself as "Tomcat 3.2-b8" or something like that. You can also detect this inside an application by calling ServletContext.getServerInfo() -- the Tomcat version information will be included in the string that is returned. Craig McClanahan
error 401 : IIS redirector
HI trying to set up tomcat to work with IIS4.0. but i am unable to redirect requests from IIS to tomcat . the IIS logs show the following : 07:03:19 127.0.0.1 GET /samples/images/powered.gif 304 07:03:19 127.0.0.1 GET /jakarta/isapi_redirect.dll 401 and the isapi.log file has the following messages: [jk_uri_worker_map.c (334)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (184)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters i am trying to access http://localhost/examples/jsp/index.html to be sure, i have checked the registry entries, conf files and the status of "jakarta" filter on my server machine is a green arrow pointing up. in short have tried to follow everything given in the trouble shooting section. if any body has any clue, pls let me know . i would appreciate your help very much. -- There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. Rajeev Jha Email: [EMAIL PROTECTED] Indegene Lifesystems (P) Ltd. 130, 1st cross , 5th Block ,Kormangla bang !ore 560095 voice - +91(80) 5524314 5524324
Tomcat and JSSI
Hello: Has anybody successfully intertwined the JSSI with the Tomcat engine so that it will parse the jhtml files allowing the server side includes? I am running the new tomcat version 3.2 Jaosn
RE: webapps are useless toys?!
I think the idea is that Webapps are distinct self-contained applications and therefore should not depend on _anything_ outside of the webapp. If you have components which need to share session info, they _should_ be in the same webapp. You would then build your webapp as you would any application that has multiple components and possibly multiple developers (very carefully ;) Regards, Paul -Original Message- From: Andy Nuss [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 13, 2000 09:19 PM To: '[EMAIL PROTECTED]' Subject: webapps are useless toys?! Hi, Does anyone with a need for one session for all areas of the site (single sign-on for users) find the current JSP specification for Web-apps useful? It seems like each webapp is a separate servlet context, which means that there is no way to share session info among different components of the site, if they are segmented as Webapps. Thanks, Andy
IIS with different contexts
hi, I am using Tomcat version 3.2 beta 6. I have currently six contexts in server.xml. I have perfectly configured the IIS. the ISAP_redirectdll shows green. When i was previously using version 3.1, all these contexts were prefectly working when routed through IIS. But now that i have installed tomcat version 3.2 beta 6. i get a 404 error for all these context on port 80. On port 8080 that is tomcat alone, the contexts are working fine. i checked the uriworkermap.properties and isapi_redirect.dll , everything seems to be proper. Has anyone else also faced this type of problem. ? Please let me know the solution for this problem. Thanks in advance vishnu
Binding to IP? (Tomcat 3.2)
Dear all, Is there any way to get Tomcat to bind to a particular socket, rather than just a port? We're running Tomcat as stand-alone web server (load testing of our application showed it ran faster under stand-alone Tomcat than with Apache+mod_jserv), with the HTTP connector bound to port 80. Additionally, load testing shows that after about 45 users, response time starts going up more steeply. However vmstat shows the box isn't CPU or memory starved, so I suspect the bottleneck is in the application or in Tomcat. I'd like to run multiple instances of stand-alone Tomcat on this one server, for example, one bound to 10.0.0.1:80, another to 10.0.0.2:80, and so on, to get the most out of our hardware. Can Tomcat 3.2.1 do this? I'm running it on Solaris 2.6 with Sun JDK 1.2.2. Yours truly, Aleksey Tsalolikhin UNIX System Administrator
Loading beans
Hi All Can anyone help me to resolve this When i created more contexts in server.xml and added them to uriworkers.properties, but when i use beans, i'm not able to access to be clear: i have created a contex by name tests path d:/tests subfolders d:/tests/web-inf/classes i place my bean classes in web-inf/classes and refer them in my tests/*.jsp files, but tomcat is not reading them if i place the beans in %tomcat_home%/webapps/examples/WEB-INF/classes , it works how do i tell tomcat to look at my /tests/web-inf/classes/*.class files - I tried physically setting classpath to the bean classes - but does not work Thank you in advance Venkat
Re: How to configure Tomcat-Apache connection (long)
Dave Newton wrote: If I open .jsp file through tomcat - it runs If I open .jsp file through apache - tomcat communication - it displays text of file I think w/o seeing actual files it'll be tough to help. If you're including the conf-auto file and have all your ports etc. set up correctly there's nothing in what you've said that would lead me to think there's a problem. Dave Ok - here is my conf-auto file. Wojtek ### # Auto generated configuration. Dated: Wed Dec 13 09:54:55 CET 2000 ### #changes to apache conf so it run jsp pages # # The following line instructs Apache to load the jk module # LoadModule jk_module libexec/mod_jk.so JkWorkersFile /home/ww/tomcat/conf/workers.properties JkLogFile /home/ww/tomcat/logs/mod_jk.log # # Log level to be used by mod_jk # JkLogLevel error ### # SSL configuration # # # By default mod_jk is configured to collect SSL information from # the apache environment and send it to the Tomcat workers. The # problem is that there are many SSL solutions for Apache and as # a result the environment variable names may change. # # The following (commented out) JK related SSL configureation # can be used to customize mod_jk's SSL behaviour. # # Should mod_jk send SSL information to Tomact (default is On) # JkExtractSSL Off # # What is the indicator for SSL (default is HTTPS) # JkHTTPSIndicator HTTPS # # What is the indicator for SSL session (default is SSL_SESSION_ID) # JkSESSIONIndicator SSL_SESSION_ID # # What is the indicator for client SSL cipher suit (default is SSL_CIPHER) # JkCIPHERIndicator SSL_CIPHER # # What is the indicator for the client SSL certificated (default is SSL_CLIENT_CERT) # JkCERTSIndicator SSL_CLIENT_CERT # # # ### # # Root context mounts for Tomcat # JkMount /*.jsp ajp12 JkMount /servlet/* ajp12 # # Auto configuration for the /examples context starts. # # # The following line makes apache aware of the location of the /examples context # Alias /examples "/home/ww/tomcat/webapps/examples" Directory "/home/ww/tomcat/webapps/examples" Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /examples/servlet/* ajp12 JkMount /examples/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location "/examples/WEB-INF/" AllowOverride None deny from all /Location # # The following line prohibits users from directly accessing META-INF # Location "/examples/META-INF/" AllowOverride None deny from all /Location ### # Auto configuration for the /examples context ends. ### # # Auto configuration for the /admin context starts. # # # The following line makes apache aware of the location of the /admin context # Alias /admin "/home/ww/tomcat/webapps/admin" Directory "/home/ww/tomcat/webapps/admin" Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /admin/servlet/* ajp12 JkMount /admin/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location "/admin/WEB-INF/" AllowOverride None deny from all /Location # # The following line prohibits users from directly accessing META-INF # Location "/admin/META-INF/" AllowOverride None deny from all /Location ### # Auto configuration for the /admin context ends. ### # # Auto configuration for the /test context starts. # # # The following line makes apache aware of the location of the /test context # Alias /test "/home/ww/tomcat/webapps/test" Directory "/home/ww/tomcat/webapps/test" Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /test/servlet/* ajp12 JkMount /test/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location "/test/WEB-INF/" AllowOverride None deny from all /Location # # The following line prohibits users from directly accessing META-INF # Location "/test/META-INF/" AllowOverride None deny from all /Location
declaring a class in JSP
Yo dudes, I have this JSP: % private class Something{} % this get's rejected by Jasper. Is there any reason why? Sloot.