Re: Sense of realm element in login-config
Hi, I do understand that it is shown the browser, but that is about all. But my problem is that from within the servlet container I cannot do anything with it. For example, I cannot retrieve it and pass it on to the authentication module, for example JDBCRealm. Yes, you can but then you have to manipulate the web.xml file yourself? Is this really the case? Regards, -- Dirk ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: can't add a new context...
To follow on from this... I have a RH Linux machine with Tomcat 3 and I need to set up a Context mapping to a Share on a WinNT4 Server. I can set up Contexts pointing to a local directory on the Linux machine, but how do I connect to the remote one? I have tried using a standard Context and It doesn't error on startup but returns a 404 error if you use it. I have tried a Virtual Host with the same result... Can anyone help??? Dominic -Original Message- From: Sriram Narayanan [mailto:[EMAIL PROTECTED]] Sent: 26 February 2002 15:23 To: Tomcat Users List Subject: Re: can't add a new context... 2/26/02 8:00:23 PM, Eduardo Godoy [EMAIL PROTECTED] wrote: Hi, I´m using tomcat 4.0.2 and I want to add a new context, without a war file ... so I used http://localhost:8090/manager/install?path=/ucrmwar=file:/D:\\Unveil\\web\ \ and tomcat return OK - Installed application at context path /ucrm but ... If I reboot the server ... I lost the context ... (I don´t have this problem with others context, where I use a war file to deploy) Any Idea? That's because this context has been added after Tomcat has been started. The information about this newly added Context is not stored anywhere. If you wish to do this, then include a section in %CATALINA_BASE%/conf/server.xml It could be something like the following: Context path=/ucm docBase=d:/Unveil/web debug=0/ Place it below the line that reads: Context path= docBase=ROOT debug=0/ Eduardo. Sriram _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Testing servlets
By installing Tomcat on the local machine exactly as you would on the remote machine! -Original Message- From: Kevin Chen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 9:40 AM To: [EMAIL PROTECTED] Subject: Testing servlets If it's possible, how can I use Tomcat to test (run) a servlet on a local machine? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Sense of realm element in login-config
It's not clear what you want to know. Perhaps you should take another look at the documentation. You can authenticate people against a database, the XML file is just a simple example. From a servlet you can find out what username they logged in as and which realms they have access too. What exactly do you need to change from a servlet? Hamish -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 9:24 AM To: Tomcat Users List Subject: Re: Sense of realm element in login-config Hi, I do understand that it is shown the browser, but that is about all. But my problem is that from within the servlet container I cannot do anything with it. For example, I cannot retrieve it and pass it on to the authentication module, for example JDBCRealm. Yes, you can but then you have to manipulate the web.xml file yourself? Is this really the case? Regards, -- Dirk ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Testing servlets
Put the servlet class files into approperate directory(it depends on your TOMCAT's configuration file), start TOMCAT service. and you can test your servlet on your local machine. - Original Message - From: Kevin Chen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 4:40 PM Subject: Testing servlets If it's possible, how can I use Tomcat to test (run) a servlet on a local machine? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
HELP - Must get Apache talkign to Tomcat
HI everyone I need to get apache+mod_ssl talking to tomcat. And i'm havinga night mare of problems that I can't seem to sort. Mod_webapp will let apache+mod_ssl connect to servlets in tomcat, but keeps dogin stupid things to the SSL connection (suddently making the browser change from an HTTPS request to an HTTP request). Nor does it appear to support sending envirnment variables to tomcat. Not that I can be certain on this, if anyone knows of any actual documentation for mod_webapp please let me know. mod_jk connecting though a AJP13 connector sounds like it does everything I need. I managed to get mod_jk loaded into apache. But if tomcat 4.0 complains about Catalina.start: java.lang.ClassNotFoundException: org.apache.ajp.tomcat4.Ajp13Connector If I try downloading Tomcat 4.0.2 then it just plain doesn't work I run startup.sh and get Using CATALINA_BASE: /homes/laurie/iceni/jakarta-tomcat-4.0.2 Using CATALINA_HOME: /homes/laurie/iceni/jakarta-tomcat-4.0.2 Using CATALINA_TMPDIR: /homes/laurie/iceni/jakarta-tomcat-4.0.2/temp Using JAVA_HOME: /homes/laurie/bin/jdk1.3.1_01 But the server itself never starts, and nothing gets written to any of the logs! I realy need to get this working - please help. Laurie -- == Laurie Robert Young [EMAIL PROTECTED] | [EMAIL PROTECTED] www.wildfalcon.com | www.doc.ic.ac.uk/~laurie ICQ UIN #20194782 == -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
IMPORTANT - error while using LDAP/JDNI authentication with tomcat 4.0
Hello, Please help me. I'm a french student and I need to implement LDAP authentication with tomcat 4 for my project. The user authentication is correct but the authorization failed because of the role search. Tomcat is unable to get the corresponding role in my ldap directory. Here's my LDAP directory definition (I use openldap): include/usr/local/etc/openldap/schema/core.schema pidfile/usr/local/var/slapd.pid argsfile/usr/local/var/slapd.args database ldbm suffix dc=mycompany,dc=com rootdn cn=Manager,dc=mycompany,dc=com directory /usr/local/var/openldap-ldbm rootpw secret indexobjectClasseq Here's my LDAP directory (LDIF file): dn : dc=mycompany,dc=com objectclass: dcObject objectclass: organization o: Example Company # Define a user named 'tomcat' dn: cn=tomcat,dc=mycompany,dc=com cn: tomcat userPassword: tomcat sn: Tomcat User objectClass: person # Define a user named 'role1' dn: cn=role1,dc=mycompany,dc=com cn: role1 userPassword: tomcat sn: Role1 User objectClass: person # Define a user named 'both' dn: cn=both,dc=mycompany,dc=com cn: both userPassword: tomcat sn: Both User objectClass: person # Define an entry to base role searches on dn: dc=roles,dc=mycompany,dc=com cn: roles objectClass: person sn: Roles Entry # Define all members of the 'tomcat' role dn: cn=tomcat,dc=roles,dc=mycompany,dc=com cn: tomcat objectClass: groupOfUniqueNames uniqueMember: cn=tomcat,dc=mycompany,dc=com uniqueMember: cn=both,dc=mycompany,dc=com # Define all members of the 'role1' role dn: cn=role1,dc=roles,dc=mycompany,dc=com cn: role1 objectClass: groupOfUniqueNames uniqueMember: cn=role1,dc=mycompany,dc=com uniqueMember: cn=both,dc=mycompany,dc=com Here's my Tomcat 4 REALM declaration : Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionName=cn=Manager,dc=mycompany,dc=com connectionPassword=secret connectionURL=ldap://localhost; roleBase=dc=roles roleName=cn roleSearch=(uniqueMember={0}) roleSubtree=false userPassword=userPassword userPattern=cn={0},dc=mycompany,dc=com / Here's my catalina_log.2002-02-27.txt file : 2002-02-27 10:15:46 HttpConnector Opening server socket on all host IP addresses 2002-02-27 10:15:46 JNDIRealm[Standalone]: Connecting to URL ldap://localhost 2002-02-27 10:15:59 HttpConnector[8080] Starting background thread 2002-02-27 10:15:59 HttpProcessor[8080][1] Starting background thread 2002-02-27 10:15:59 HttpProcessor[8080][0] Starting background thread 2002-02-27 10:15:59 HttpProcessor[8080][2] Starting background thread 2002-02-27 10:15:59 HttpProcessor[8080][3] Starting background thread 2002-02-27 10:15:59 HttpProcessor[8080][4] Starting background thread 2002-02-27 10:16:19 JNDIRealm[Standalone]: getUserDN(tomcat) 2002-02-27 10:16:19 JNDIRealm[Standalone]: dn=cn=tomcat,dc=mycompany,dc=com 2002-02-27 10:16:19 JNDIRealm[Standalone]: retrieving attribute userPassword 2002-02-27 10:16:19 JNDIRealm[Standalone]: retrieving value 2002-02-27 10:16:19 JNDIRealm[Standalone]: validating credentials 2002-02-27 10:16:19 JNDIRealm[Standalone]: Username tomcat successfully authenticated 2002-02-27 10:16:19 JNDIRealm[Standalone]: getRoles(cn=tomcat,dc=mycompany,dc=com) 2002-02-27 10:16:19 JNDIRealm[Standalone]: Searching role base 'dc=roles' for attribute 'cn' 2002-02-27 10:16:19 JNDIRealm[Standalone]: With filter expression '(uniqueMember=cn=tomcat,dc=mycompany,dc=com)' 2002-02-27 10:16:19 JNDIRealm[Standalone]: Exception performing authentication javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'dc=roles' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:2761) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2682) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2488) at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1660) at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1583) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:371) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:331) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:316) at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:241) at org.apache.catalina.realm.JNDIRealm.getRoles(Unknown Source) at org.apache.catalina.realm.JNDIRealm.authenticate(Unknown Source) at
Unix + Tomcat
Hello, I try to install tomcat on Unix solaris 8 wich have this id 108528-03. I use the jdk 1.3.1. And at a moment the jvm freeze. Do you have an idea, or the minimal configuration to use tomcat on solaris with jdk 1.3.1(like patch ...) Thx in advance. Cedric -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Unix + Tomcat
[EMAIL PROTECTED] a écrit : Hello, I try to install tomcat on Unix solaris 8 wich have this id 108528-03. I use the jdk 1.3.1. And at a moment the jvm freeze. Do you have an idea, or the minimal configuration to use tomcat on solaris with jdk 1.3.1(like patch ...) Thx in advance. Cedric -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Well, first of all, could yu please be more specific about yur pb... I actually use java 1.3.1_01 and _02 without any kind of pb on SOLARIS 8 Apache is 1.3.22 Tomcat 4.0.2/Warp 1.0.2 Servlets and jsp and running ok. If yu have a pb with patches level on SOLARIS, try a much more specific group or go directly to the sun site and get the last recommended bundle. My servers are - 5.8 Generic_108528-10 sun4u sparc SUNW,Ultra-60 and - 5.8 Generic_108528-12 sun4u sparc SUNW,Ultra-5_10 Hope this help. Jean-Luc B :O) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Tomcat4 standalone keystore - existing private
Looks like we will be going through apache then. Or use a utility written in java available with source from http://www.comu.de. It doesn't really import but generates a new keystore containing the cert with priv key. Since you only need one entry for a ssl server cert (alias tomcat) it is sufficient. I used it with success. Gruss, Wolfgang -Ursprüngliche Nachricht- Von: Chris Campbell [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 27. Februar 2002 07:53 An: 'Tomcat Users List' Betreff: RE: Tomcat4 standalone keystore - existing private key problem To answer my own question and perhaps help someone searching archives on similar problems, the page at http://www.cs.indiana.edu/~chiuk/security/ssl/jsse/certificate s/ tells me Though sufficient for some tasks, a major deficiency of the keytool utility is its inability to import a private key. Great. Looks like we will be going through apache then. ChrisC -Original Message- From: Chris Campbell Sent: Monday, February 25, 2002 12:38 PM To: '[EMAIL PROTECTED]' Subject: Tomcat4 standalone keystore - existing private key problem Hi I am trying to setup Tomcat 4.0.1 standalone to serve ssl pages certified by Verisign. I can use (self signed) certificates generated by keytool with no problem, but I can't set up the keystore to work with Verisign's. To explain a little more, the private key I have was generated by openssl (openssl genrsa -rand rand.dat -des 1024 key.pem) and is of the type: -BEGIN RSA PRIVATE KEY- Proc-Type: 4,ENCRYPTED DEK-Info: DES-CBC,91B2224E3C5D1BA5 If I try to import this into my keystore like keytool -import -file /root/key.pem I get the error 'Input not an X.509 certificate'. Importing the certificate reply from Verisign in the same way works no problem, but I know from setting up Apache that the private key is also necessary right? And for tomcat, it seems that it must be in the keystore (no other configuration options as far as I know). I think everything would work if I could just get that private key into a form that keytool understands, then into the keystore... is this possible? Thanks, ChrisC -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problems Generating PDF from Servlet
Hello, I am trying to develop a servlet that sends a PDF document to a web browser. I get the following error when i try to display the PDF document: 2002-02-27 01:11:55 StandardContext[/docusoft]: Servlet /docusoft threw load() exception javax.servlet.ServletException: Error instantiating servlet class com.docutech.viewer.web.ImageServlet at org.apache.catalina.core.StandardWrapper.load(Unknown Source) at org.apache.catalina.core.StandardContext.loadOnStartup(Unknown Source) at org.apache.catalina.core.StandardContext.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardHost.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardEngine.start(Unknown Source) at org.apache.catalina.core.StandardService.start(Unknown Source) at org.apache.catalina.core.StandardServer.start(Unknown Source) at org.apache.catalina.startup.Catalina.start(Unknown Source) at org.apache.catalina.startup.Catalina.execute(Unknown Source) at org.apache.catalina.startup.Catalina.process(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Unknown Source) - Root Cause - java.lang.VerifyError: (class: com/docutech/viewer/web/ImageServlet, method: doPost signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Incompatible object argument for function call at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.apache.catalina.core.StandardWrapper.load(Unknown Source) at org.apache.catalina.core.StandardContext.loadOnStartup(Unknown Source) at org.apache.catalina.core.StandardContext.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardHost.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardEngine.start(Unknown Source) at org.apache.catalina.core.StandardService.start(Unknown Source) at org.apache.catalina.core.StandardServer.start(Unknown Source) at org.apache.catalina.startup.Catalina.start(Unknown Source) at org.apache.catalina.startup.Catalina.execute(Unknown Source) at org.apache.catalina.startup.Catalina.process(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Unknown Source) My code looks like this ServletOutputStream out = response.getOutputStream (); //--- // Set the output data's mime type //--- response.setContentType(application/pdf); // MIME type for pdf doc //--- // create an input stream from fileURL //--- String fileURL = http://localhost/docusoft/jsp/forte-doc.pdf;; // // Content-disposition header - don't open in browser and // set the Save As... filename. // *There is reportedly a bug in IE4.0 which ignores this... // response.setHeader(Content-disposition, attachment; filename= += forte-doc.pdf ); //- BufferedInputStream bis = null; BufferedOutputStream bos = null; try { //URL url = new URL( http, PROXY_HOST, Integer.parseInt(PROXY_PORT), fileURL); URL url = new URL(fileURL); // Use Buffered Stream for reading/writing. bis = new BufferedInputStream(url.openStream()); bos = new BufferedOutputStream(out); byte[] buff = new byte[1]; int bytesRead; // Simple read/write loop. while(-1 != (bytesRead = bis.read(buff, 0, buff.length))) { bos.write(buff, 0, bytesRead); } } catch(final MalformedURLException e) { System.out.println ( MalformedURLException. ); throw e; } catch(final IOException e) { System.out.println ( IOException. ); throw e; } finally { if (bis != null) bis.close(); if (bos != null) bos.close(); } } Any help would be most appreciated. Kind Regards, Rudi
RE: 2 instance of tomcat within 1 machine
Hi Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 27 February 2002 03:25 To: Tomcat Users List Subject: RE: 2 instance of tomcat within 1 machine John, Could you please post the contents of you server.xml? Will do - I had promised I'd do it today, but I still don't have copies of the files. FWIW, Sriram Narayanan's post filled in most of the gaps from my post. I appreciate it's often better to see a complete file, though, so I'll get a copy to the list. I'm trying to do exactly what you've done with only 2 tomcat instances and am having difficulty. Also, I'm confused at which tomcat subdirectories needed to be present in each CATALINA_BASE directory. The running.txt file mentions the conf, logs, webapps, and work directories but you mention having to edit the catalina.bat file (in the bin sub-directory) for each instance. So the bin directory is needed to be copied as well? I'd consider the bin directory optional - I added it as a convenience, because there's no way on earth I'm ever going to remember individual port numbers! Having easy access to a statup script makes life a lot easier. Apart from the bin directory, the only other directories I've got are those detailed on running.txt: conf, logs, webapps, and work. Thanks, Jason Brawner Apologies for not being better organised today... ;( ... And good luck! Cheers John -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: 2 instance of tomcat within 1 machine
Hi Keith Received and understood...! It's likely to be tomorrow/this evening before I manage it -- I've stupidly forgotten to bring copies into work...sorry about that. Cheers John -Original Message- From: Keith Ng [mailto:[EMAIL PROTECTED]] Sent: 3 March 2002 07:50 To: Tomcat Users List Subject: RE: 2 instance of tomcat within 1 machine John would u pls send me yr copy of the bat file? Thank... -Original Message- From: John Niven [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 9:49 PM To: 'Tomcat Users List' Subject: RE: 2 instance of tomcat within 1 machine Hi Keith (response inline) This is supplementary info to Remy's: I think we've both got different set-ups. -Original Message- From: Keith Ng [mailto:[EMAIL PROTECTED]] Sent: 2 March 2002 11:40 To: Tomcat Users List Subject: RE: 2 instance of tomcat within 1 machine Which version of tomcat are u using? im using 4.0.2 I've recently got 5 instances running on one 'lil-ole workstation, used for personal development work. My goal was to have multiple instances that I could mess around with, without destroying the live (documentation, examples, etc) server. how did u configure? Must i have more then 1 copy of tomcat? No. I've installed tomcat (4.0.2) on my D: drive (should have said: Windows 2000 Pro, 2 hard-drives with multiple partitions - D: is apps, I: is development) and the various instances on my I: drive: CATALINA_HOME: D:\tomcat\ CATALINA_BASEs: i:\tomcat-servers\server01\ i:\tomcat-servers\server02\ i:\tomcat-servers\server03\ etc Follow the instructions in running.txt for which directories to copy - I'm at work just now (JRun ;-( ) but off-hand I think it's bin, conf, lib webapps. Within /conf, you need to edit server.xml so the various ports don't conflict. Eg. if the CATALINA_HOME/conf/server.xml uses port 8080, /server01/conf/server.xml could be 8081 for example. There are three locations in the server.xml which I edited - I don't have the file to hand at the moment, but if you'd like a copy I can post it tonight/tomorrow. Once you've created the directory heirarchy, and edited the server.xml files, you should be able to start your new instances from the command line/shell. I'm lazy, so I just edited the catalina.bat files in /server0x/bin/ to set CATALINA_BASE and CATALINA_HOME - again, if you'd like a copy I'll post it tomorrow. I really dunno... pls help Basically, most of the info is in running.txt from your Tomcat install. I found the only real gotcha was that I needed to renumber the ports. Once I'd got that sorted out the rest was plain sailing ;) Best of luck, and if you're still stuck let me know and I'll post files. Cheers John -- John Niven Reply via mailing-list. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Testing servlets
We use Visual Cafe 4.5 and we run Tomcat under this. You can debug servlets/filters/tomcat under this configuration and it works great for us. Saves a pile of time to be able to run Tomcat like this during development. It's easy to setup. I posted instructions for doing this a while back and it should be in the archives. Donie -Original Message- From: Kevin Chen [mailto:[EMAIL PROTECTED]] Sent: February 27, 2002 08:40 To: [EMAIL PROTECTED] Subject: Testing servlets If it's possible, how can I use Tomcat to test (run) a servlet on a local machine? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat 3.3a
I installed Tomcat 3.3 several times successfully on RedHat 7.2 systems. Tomcat 3.3a against it got the following error messages : /etc/init.d/tomcat3: /etc/tomcat3/conf/tomcat3.conf: line 27: unexpected EOF while looking for matching `' /etc/init.d/tomcat3: /etc/tomcat3/conf/tomcat3.conf: line 37: syntax error: unexpected end of file I've never seen such error before. What can I do to get rid of that problem. I can't find an error on line 27 or 37 :-( -- Mark Wollner P.S.: Are there no Tomcat archives available ? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Apache does not load images!!
hi guys, My system setup is like this. tomcat has been integrated with apache with mod_jk. When I send a request directly to tomcat(post 8080), all the images are loaded appropriately, but when i am sending a requet to apache(port 80), few images are not being loaded. What should be done to avoid such a problem? hope to get a speedy response... thanks in advance. Regards, Eswar -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Apache does not load images!!
It's hard to diagnose your problem without more details. Which pictures aren't loading when you go via port 80? Which ones are? My first suggestion would be to check your uriworkermap.properties file. -Original Message- From: Eswar.K [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 11:40 AM To: Tomcat Users List Subject: Apache does not load images!! Importance: High hi guys, My system setup is like this. tomcat has been integrated with apache with mod_jk. When I send a request directly to tomcat(post 8080), all the images are loaded appropriately, but when i am sending a requet to apache(port 80), few images are not being loaded. What should be done to avoid such a problem? hope to get a speedy response... thanks in advance. Regards, Eswar -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Apache does not load images!!
Sorry, my mistake. I misread your message thought you were using IIS Hamish -Original Message- From: Eswar.K [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 11:40 AM To: Tomcat Users List Subject: Apache does not load images!! Importance: High hi guys, My system setup is like this. tomcat has been integrated with apache with mod_jk. When I send a request directly to tomcat(post 8080), all the images are loaded appropriately, but when i am sending a requet to apache(port 80), few images are not being loaded. What should be done to avoid such a problem? hope to get a speedy response... thanks in advance. Regards, Eswar -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: That old tomcat 4.0.2 - xerces.jar file problem one more time...please
additional question: relies tomcat itself on the libs in CATALINA_HOME/common/lib ? if not, it could be a good idea to just remove all xml-related libraries from there and (redundantly) including them in WEB-INF/lib of the projects to gain some sort of control. - just a thought and i didn't have a closer look at the class-loading mechanism. are there any best practices for that one might follow? Markus Drew Cox wrote: Our webapp includes xerces.jar in the web.inf/lib directory. This works fine on Tomcat 3.1 (our prod version) and 3.3a (our new prod version if I can't get this sorted). On 4.0.2 I get the following error in the tomcat logs, apparently when trying to compile a JSP: - Root Cause - java.lang.NoClassDefFoundError: org/w3c/dom/range/Range at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.xerces.parsers.DOMParser.setDocumentClassName(DOMParser.java:489) at org.apache.xerces.parsers.DOMParser.init(DOMParser.java:221) at org.apache.xerces.jaxp.DocumentBuilderImpl.init(DocumentBuilderImpl.java:9 8) at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Documen tBuilderFactoryImpl.java:87) at org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:197) at org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCa che.java:165) at org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:1 38) at org.apache.jasper.EmbededServletOptions.init(EmbededServletOptions.java:34 5) at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 6) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653) From reading the previous posts and tomcat docs, it appears there are some classloader/version conflicts with the xerces.jar in the CATALINA_HOME/common/lib directory. I have tried moving the catalina xerces.jar around into all of the other libs in tomcat to no avail. If I remove our webapp's xerces.jar, things work fine. This is a reasonable workaround, but what if I really needed different versions of the library available to different apps? I'm sure there is a simple way to make this work, please help the terminally bewildered to get this working. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
sessions in tomcat
hi, i am having problems creating a session id of my own. i have tried the setId(), but comes up with a error message when it comes it compiling it can someone please help me! thanks _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Apache does not load images!!
On Wednesday 27 February 2002 10:39, Eswar.K wrote: Hi, tomcat has been integrated with apache with mod_jk. When I send a request directly to tomcat(post 8080), all the images are loaded appropriately, but when i am sending a requet to apache(port 80), few images are not being loaded. What should be done to avoid such a problem? I had the same problem. What is was, was that the URI I was using for the imgaes was /images/myimage.gif Which when used via Apache/mod_jk were being request from Apache's doument root. Changing the URI to... images/myimage.gif (no initial slash) Fixed the problem Phil -- Linux 2.4.4-4GB 9:55am up 2:27, 1 user, load average: 0.20, 0.47, 0.41 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
(Newbie) Please help ....
Hi people: Only a simple question ... Where I deploy into TomCat structure the files JSP 1.2 and Servlet 2.3 ??? Thank you dark.Wizzard __ Quer ter seu próprio endereço na Internet? Garanta já o seu e ainda ganhe cinco e-mails personalizados. DomíniosBOL - http://dominios.bol.com.br -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Sense of realm element in login-config
This is what I want to do: 1) I want to setup a database which includes multiple realms 2) user are linked to realms 3) I want to use protect a servlet with basic authentication, and I want to be able refer to the correct realm when performing the authentication (this means sending the correct realm/user to the database. And I don't want to do this by hacking the tomcat configuration files. Regards, -- Dirk ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: ClassNotFoundException
I don't' believe what you are trying to do is possible. Class loaders are created in a hierarchical manner with the children knowing about their parents, but not the parents knowing about the children. This makes it impossible for the current class loader (using Class.forName) to find the class file loaded by a child class loader (which the WEB-INF is). I see that you have three options: 1. Engineer another solution to your problem 2. Move MyServletClass into common 3. Move MyBaseServletClass into all the WEB-INFs. Personally the order of approach I would take is 3, 2, and then 1. Randy -Original Message- From: Ken Ramirez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 12:11 AM To: [EMAIL PROTECTED] Subject: ClassNotFoundException Hope someone can help: I have a TOMCAT app containing a servlet as follows: TOMCAT_HOME/webapps/MyApp/WEB-INF/classes/com/mycomp/MyServl etClass.cl ass This class extends a base class that provides common functionality for all of my apps, and is stored in: TOMCAT_HOME/common/classes/com/mycomp/MyBaseServletClass.cla ss (which extends HttpServlet) Through some context information, the MyBaseServletClass receives the classname of a class stored in my app's classes directory, which it is responsible for creating an instance of, using Class.forName(). This is the path of the class to be created: TOMCAT_HOME/webapps/MyApp/WEB-INF/classes/com/mycomp/MyOther Class.clas s When the MyServletClass calls Class.forName, it fails with a ClassNotFoundException, but if I move the MyServletClass to the MyApp/WEB-INF/classes path, everything works fine. What gives? I thought that Tomcat reads adds the classes directory for all of the apps deployed in the server.xml (with Context info), which I defined as follows: Context path=/MyApp docBase=MyApp debug=0 reloadable=true / Thanks, Ken Ramirez - Principal/CTO [EMAIL PROTECTED] Master-Mind Consulting Services http://www.mastermind.com http://www.mastermind.com/ Ph - 570-688-9600 Fx - 208-275-2301 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: That old tomcat 4.0.2 - xerces.jar file problem one more time...please
See Bugzilla Bug 6374: http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=6374 Cheers, Larry -Original Message- From: Drew Cox [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 7:08 PM To: Tomcat Users List Subject: That old tomcat 4.0.2 - xerces.jar file problem one more time...please I'm sorry guys. I've searched the archives, really. I have seen a bunch of seemingly relevant posts and tried some of their recommendations. But I can't get this to work. Here's the deal. Our webapp includes xerces.jar in the web.inf/lib directory. This works fine on Tomcat 3.1 (our prod version) and 3.3a (our new prod version if I can't get this sorted). On 4.0.2 I get the following error in the tomcat logs, apparently when trying to compile a JSP: - Root Cause - java.lang.NoClassDefFoundError: org/w3c/dom/range/Range at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.xerces.parsers.DOMParser.setDocumentClassName(DOMParser.java:489) at org.apache.xerces.parsers.DOMParser.init(DOMParser.java:221) at org.apache.xerces.jaxp.DocumentBuilderImpl.init(DocumentBuilderImpl.java:9 8) at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Documen tBuilderFactoryImpl.java:87) at org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:197) at org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCa che.java:165) at org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:1 38) at org.apache.jasper.EmbededServletOptions.init(EmbededServletOptions.java:34 5) at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 6) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:653) From reading the previous posts and tomcat docs, it appears there are some classloader/version conflicts with the xerces.jar in the CATALINA_HOME/common/lib directory. I have tried moving the catalina xerces.jar around into all of the other libs in tomcat to no avail. If I remove our webapp's xerces.jar, things work fine. This is a reasonable workaround, but what if I really needed different versions of the library available to different apps? I'm sure there is a simple way to make this work, please help the terminally bewildered to get this working. Thanks Drew -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: ClassNotFoundException
To deal with a situation like this, I have seen #1 below implemented by providing an object that is loaded in the webapp classloader to the base class. A good candidate would be this from MyServletClass. MyBaseServletClass can obtain the classloader of this object to gain access to the webapp classloader. Cheers, Larry -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 6:51 AM To: 'Tomcat Users List' Subject: RE: ClassNotFoundException I don't' believe what you are trying to do is possible. Class loaders are created in a hierarchical manner with the children knowing about their parents, but not the parents knowing about the children. This makes it impossible for the current class loader (using Class.forName) to find the class file loaded by a child class loader (which the WEB-INF is). I see that you have three options: 1. Engineer another solution to your problem 2. Move MyServletClass into common 3. Move MyBaseServletClass into all the WEB-INFs. Personally the order of approach I would take is 3, 2, and then 1. Randy -Original Message- From: Ken Ramirez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 12:11 AM To: [EMAIL PROTECTED] Subject: ClassNotFoundException Hope someone can help: I have a TOMCAT app containing a servlet as follows: TOMCAT_HOME/webapps/MyApp/WEB-INF/classes/com/mycomp/MyServl etClass.cl ass This class extends a base class that provides common functionality for all of my apps, and is stored in: TOMCAT_HOME/common/classes/com/mycomp/MyBaseServletClass.cla ss (which extends HttpServlet) Through some context information, the MyBaseServletClass receives the classname of a class stored in my app's classes directory, which it is responsible for creating an instance of, using Class.forName(). This is the path of the class to be created: TOMCAT_HOME/webapps/MyApp/WEB-INF/classes/com/mycomp/MyOther Class.clas s When the MyServletClass calls Class.forName, it fails with a ClassNotFoundException, but if I move the MyServletClass to the MyApp/WEB-INF/classes path, everything works fine. What gives? I thought that Tomcat reads adds the classes directory for all of the apps deployed in the server.xml (with Context info), which I defined as follows: Context path=/MyApp docBase=MyApp debug=0 reloadable=true / Thanks, Ken Ramirez - Principal/CTO [EMAIL PROTECTED] Master-Mind Consulting Services http://www.mastermind.com http://www.mastermind.com/ Ph - 570-688-9600 Fx - 208-275-2301 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
mulitple ports in server.xml
Good morning, It is my understanding that if I set multiple virtual hosts up in Apache 1.3.22/webapp module, for tomcat 4.0.1, the WebAppConnection directive for the virtual host section needs to contain a different port for the app to deploy. This port corresponding to the port set in server.xml. Question, If I want multiple virtual hosts, how do I set up the server.xml to listen to multiple ports? Can I have multiple connectors under one serverice name? For example: Server port=8005 shutdownSHUTDOWN debug=0 Service name=Tomcat-Apache !-- for virtual host 1 -- Connector=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=50 enableLookups=false acceptCount=10 debug=0/ !-- for Virtual host 2 -- Connector=org.apache.catalina.connector.warp.WarpConnector port=8009 minProcessors=5 maxProcessors=50 enableLookups=false acceptCount=10 debug=0/ then the rest of the config...bla bla bla I have not been able to get this to work?? I have seen Named Based Virtual hosts work, but I want just Virtual Hosts. Each domain will have their own ip address. I am stuck, can anyone offer any ideas that I might have over looked??? Thanks again, -chad -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
file size limit
Hi, Is there any file size limit for jsp files in Tomcat, I am using JRE 1.3.01 and Tomcat 4.0.2 , and Tomcat does not produce jsp files more then 35 kb, I checked and i saw that it produce .java files true but somehow it does not send all html codes to client. sincerely, Ugur
RE: 2 instance of tomcat within 1 machine
Hi Jason, Keith Attached are 2 copies of my server.xml. One's from D:\Program Files\Apache Group\jakarta-tomcat-4.0.2\conf, which is down from my CATALINA_HOME. The other is from I:\tomcat-servers\server01\conf. In this 2nd server.sml you'll notice that I:\tomcat-servers\server01 is set up to be CATALINA_BASE for that server. The important parts are highlighted in the 2nd server.xml file: !-- ** -- Server port=8010 shutdown=SHUTDOWN debug=0 !-- ** -- ... !-- ** -- !--server00: 8080 / 8443 server01: 8081 / 8444 server02: 8082 / 8445 server03: 8083 / 8446 server04: 8084 / 8447 -- !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8081 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8444 acceptCount=10 debug=0 connectionTimeout=6/ !-- Note : To disable connection timeouts, set connectionTimeout value to -1 -- !-- ** -- ... !-- ** -- Connector className=org.apache.catalina.connector.warp.WarpConnector port=8011 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0/ !-- ** -- I incremented the http connector port and redirect port by 1 for each new server (as you can see from the server01: / list in the comment). The other ports were all incremented by 5. I settled on this by trial-and-error; it works for me but isn't necessarily the best way to do it. Sriram Narayanan posted earlier in this thread, and it seemed to me that he had a better set-up than me, and had managed to cut out bits that I didn't need (but had left in anyway). Naturally, I'd welcome suggestions as to anything I can strip out of my own server.xml files - I'm running Tomcat standalone. One last thing, I've added /bin into my server instances hierarchy. This is purely for convenience: I've copied in the startup, shutdown and catalina scripts, and then edited the catalina script. (I'm on Windows, *nix users will need to adapt accordingly). I've added this to the top of my catalina script: rem *** start additions *** echo tomcat server01 @echo off set CATALINA_BASE=I:\tomcat-servers\server01 set CATALINA_HOME=D:\Program Files\Apache Group\jakarta-tomcat-4.0.2 rem *** end additions *** Obviously, you'll need to alter CATALINA_BASE for each server instance. Hope this helps, John -- John Niven (Please reply through mailing list) server.xml Description: Binary data server.xml Description: Binary data -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: mulitple ports in server.xml
chad kellerman a écrit : Good morning, It is my understanding that if I set multiple virtual hosts up in Apache 1.3.22/webapp module, for tomcat 4.0.1, the WebAppConnection directive for the virtual host section needs to contain a different port for the app to deploy. This port corresponding to the port set in server.xml. Question, If I want multiple virtual hosts, how do I set up the server.xml to listen to multiple ports? Can I have multiple connectors under one serverice name? For example: Server port=8005 shutdownSHUTDOWN debug=0 Service name=Tomcat-Apache !-- for virtual host 1 -- Connector=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=50 enableLookups=false acceptCount=10 debug=0/ !-- for Virtual host 2 -- Connector=org.apache.catalina.connector.warp.WarpConnector port=8009 minProcessors=5 maxProcessors=50 enableLookups=false acceptCount=10 debug=0/ then the rest of the config...bla bla bla I have not been able to get this to work?? I have seen Named Based Virtual hosts work, but I want just Virtual Hosts. Each domain will have their own ip address. I am stuck, can anyone offer any ideas that I might have over looked??? Thanks again, -chad -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Well yu can do some instances of Tomcat. It works well. All yu have to do it's to define different CATALINA_BASE directories and to build them as the master. i.e: assume the first one by /web/Tomcat1 copy $CATALINA_HOME/conf in /web/Tomcat1/conf create /web/Tomcat1 ./logs ./work ./webapps configure the /web/Tomcat1/Conf/server.xml Server port=8015 shutdown=SHUTDOWN debug=0# yu set a port than other ../.. !-- Define an Apache-Connector Service -- Service name=Tomcat-Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8018 minProcessors=5 maxProcessors=75 # yu set a connection port than other enableLookups=true appBase=webapps acceptCount=10 debug=0/ !-- Replace localhost with what your Apache ServerName is set to -- Engine className=org.apache.catalina.connector.warp.WarpEngine ../.. Yu have now a brand new instanciation of the main Tomcat - realize then yu have no obligation to run it.. Now yu can start it with something like that $CATALINA_HOME/bin/Tomcat1_startup.sh Tomcat1_startup.sh: #!/bin/sh -x # - # Start script for the CATALINA Server # # $Id: shutdown.sh,v 1.1.4.1 2002/01/30 18:10:40 patrickl Exp $ # # V1.0 021902 Adapted for Cecile DELPONT by JLB on 02/19/2002 # - JAVA_HOME=My_Java_Dir CATALINA_HOME=My_Tomcat_Dir CATALINA_BASE=/web/Tomcat1 export JAVA_HOME CATALINA_HOME CATALINA_BASE BASEDIR=`dirname $0` $CATALINA_HOME/bin/catalina.sh start $@ Same modification for the stop with Tomcat1_shutdown.sh If yu got Apache with Warp Connector, just declare as many connectors than Tomcat instances. Virtual host 1 WebAppConnection WarpConnector warp localhost:8008 Virtual Host 2 WebAppConnection Cecile_Warpwarplocalhost:8018 And that's it, boy. Hope this will help. Jean-Luc B :0)
RE: Apache does not load images!!
sometimes some images gets loaded and sometimes some others... and sometimes all of them are shown. The path of the image is not a problem, bcos if it was, i should be consistently get the problem for the same image, which is not happening. Eswar -Original Message- From: Phil Shrimpton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:27 PM To: Tomcat Users List; Eswar.K Subject: Re: Apache does not load images!! On Wednesday 27 February 2002 10:39, Eswar.K wrote: Hi, tomcat has been integrated with apache with mod_jk. When I send a request directly to tomcat(post 8080), all the images are loaded appropriately, but when i am sending a requet to apache(port 80), few images are not being loaded. What should be done to avoid such a problem? I had the same problem. What is was, was that the URI I was using for the imgaes was /images/myimage.gif Which when used via Apache/mod_jk were being request from Apache's doument root. Changing the URI to... images/myimage.gif (no initial slash) Fixed the problem Phil -- Linux 2.4.4-4GB 9:55am up 2:27, 1 user, load average: 0.20, 0.47, 0.41 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Trouble with IMG tag, servlets, and JSPs
Hi Ken: Are you accessing your servlets through the servlet invoker (i.e. http://host/MyApp/servlet/myserv ?) If so, then remember that from the browser's point of view, the 'current directory' of the page is 'http://host/MyApp/servlet'. When the browser sees a relative path, like 'images/myimage.jsp', it tries to load that relative to the servlet's path, so it comes up with 'http://host/MyApp/servlet/images/myimage.jsp', which doesn't exist. That's your 404 error in the logs. Same thing holds for style sheets and other resources. Solutions: 1- If you want to keep using the path '/servlet' (i.e. you don't want to define servlet mappings, or you need the path prefix to make sure Apache sends the request to Tomcat) then change your image links to '../images/myimage.jsp' 2- Use the getContextPath() call. 3- Define servlet mappings in your web.xml so that you reference the servlet with something like 'http://host/MyApp/myserv.srv', which puts the current path at your application root. 4- Put a hook into the top of the jsp page to forward the request to the servlet if the request came directly from the browser. Then the browser will simply load the url by 'http://host/MyApp/page.jsp' and the jsp forwards to the servlet by doing a jsp:forward ... directive. This is actually the way I do it, since it gets around some difficulties I have in my Apache configuration which make it hard to map servlets generically (nothing wrong with Apache or Tomcat; I just have a wierd virtual host configuration for other reasons), but easy to get JSP's called. I simply have the servlet drop an attribute called 'fromServlet' into the request object. If the jsp doesn't see this attribute, it forwards to the servlet, which then does its thing, drops in the 'fromServlet' attribute and forwards back to the same jsp. Then the jsp sees the attribute and handles the request itself. Good luck, Greg Trasuk, President StratusCom Manufacturing Systems Inc. - We use information technology to solve business problems on your plant floor. http://stratuscom.ca -Original Message- From: Ken Ramirez [mailto:[EMAIL PROTECTED]] Sent: February 27, 2002 00:13 To: [EMAIL PROTECTED] Subject: Trouble with IMG tag, servlets, and JSPs Hope someone can help: I'm having a problem loading images from a JSP page when the page is called from a servlet. I'm performing a forward from the servlet to the JSP, which then loads the images from a subdirectory in the app's directory as follows: TOMCAT_HOME/webapps/MyApp/*.jsp TOMCAT_HOME/webapps/MyApp/images/*.img The images are loaded from the JSP using the img tag as follows: img src=images/myimage.jpg I've also tried src=/images/myimage.jpg and this doesn't work. However, if I call the jpg directly, everything shows up fine. Of course in the real world, I need to get the forward to work so that I can pass data from the servlet to the JSP. I found some information in the mailing list's archive regarding this problem and someone suggested the following: IMG SRC=%=request.getContextPath()%/images/myimage.jpg This does work, but it just seems odd that you would have to do this, especially given the fact that there is a context entry for the app in the server.xml. Isn't the purpose of the Context entry to: 1. Create and associate a Context object with the App and 2. Establish the base path for the app. Seems kind of redundent that you would have to again retrieve the ContextPath yourself, when it seems that Tomcat should do this for us or the Browser should receive the problem path so that it knows where to get the images and CSS files from. Instead, what is actually sent back to the browser is the following path for the image: images/myimage.jpg Now what's interesting is that I looked in one of Tomcat's log files and found the following exception for the images: StandardWrapper[/MasterMind:org.apache.catalina.INVOKER.theme ]: Marking servlet org.apache.catalina.INVOKER.theme as unavailable 2002-02-26 20:53:17 invoker: Cannot allocate servlet instance for path /MasterMind/servlet/theme/Master.css javax.servlet.ServletException: Wrapper cannot find servlet class theme or a class it depends on ... And in one of the other log files, I found the following error: 127.0.0.1 - - [26/Feb/2002:20:53:17 -0500] GET /MyApp/servlet/images/myimage.jpg HTTP/1.1 404 696 I'd like to get this to work without the hack I mentioned above. Does anyone have any suggestions? Thanks, Ken Ken Ramirez - Principal/CTO [EMAIL PROTECTED] Master-Mind Consulting Services http://www.mastermind.com http://www.mastermind.com/ Ph - 570-688-9600 Fx - 208-275-2301 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
No module named com
Hi I have a problem with apache and tomcat 3.3. Sometimes I get the next error: No module named com, I press the button refresh in browser and the error don't appear. Best regards and thanks in advance, Hernando -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: ClassNotFoundException
Just a question, Would Thread.currentThread().getContextClassLoader().loadClass(myclassname) help ? I don't have TC 3.3, but this works for me in TC 4.0.1 Sriram 2/27/02 6:45:11 PM, Larry Isaacs [EMAIL PROTECTED] wrote: To deal with a situation like this, I have seen #1 below implemented by providing an object that is loaded in the webapp classloader to the base class. A good candidate would be this from MyServletClass. MyBaseServletClass can obtain the classloader of this object to gain access to the webapp classloader. Cheers, Larry _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Multiple class reloads causes Tomcat 4.0.1 to throw an OutOfMemory exception
I could not find any mention of this in the archives, does anyone know why this would happen? All the class chanegs are of the non-servlet variety. Thanks, Scott
Re: webapps directory required for Warp?
One option I believe should work is to put the full path of the app in the WebAppDeploy directive. ex.: WebAppDeploy /var/www/webapp/myapp conn /myapp --David On Tuesday 26 February 2002 03:34 pm, you wrote: Warp. I have mod_webapp.so and libapr.dll in my Apache modules directory. I have the following in my httpd.conf. LoadModule webapp_module modules/mod_webapp.so AddModule mod_webapp.c WebAppConnection conn warp localhost:8008 WebAppDeploy examples conn /examples/ If my docBase is not under webapps, I don't know what to use for the 2nd parameter of WebAppDeploy line... j-y ciccoli wrote: What have you installed as Tomcat-Apache plug-in? - Original Message - From: Dave Ferguson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 8:29 PM Subject: webapps directory required for Warp? Using the Warp connector, is it possible to have the docBase of a web app somewhere else besides the webapps directory? I am using Tomcat 4.0.2 and Apache 1.3.20 on Win2K. Thanks for any help! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Problem with importing reply certificate from CA
Hello Jason! Thank you for that piece of information, it solved my problem. I just needed 2 carriage returns! I don't know why and how, but it works just fine! Thanks a lot! Marin - Original Message - From: Jason Barr [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 4:39 PM Subject: Re: Problem with importing reply certificate from CA HI Marin, Have a look at our FAQ's (even though it is Verisign, the reason should be the same:) http://www.thawte.com/support/developer/javasoft.html Cheers, Marin Odrljin wrote: Hello everybody! I have problem with importing cert reply from VeriSign. I'm using jdk1.3 and I made my keys with keytool. Than I sent CSR to VerySign and they gave me signed certificate in Internet RFC 1421 Certificate Encoding Standard (Base 64 encoding) which begins like: -BEGIN CERTIFICATE- and ends like: -END CERTIFICATE- I have problem when I try to import it with same alias (tomcat) or even different. I know that keystore format (default) is jks and reply is in pkcs7 format. When I try to import certificate (with same alias I used for -genkey) I got a message: keytool error: java.security.cert.CertificateException: Unsupported encoding, and when I try import it with different alias I got message: keytool error: java.lang.Exception: Input not a X.509 certificate In keytool documentation is written that keytool -import command can actually import binary encoding format or printable format (Internet RFC 1421 Certificate Encoding Standard) but I can't import that printable! Why I didn't got .cer file and how I can import that printable? Thank you very much!!! Marin -- Jason Barr Vendor Manager Thawte Tech Support www.thawte.com/cgi/support/contents.exe -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Does anyone know how to setup JNDI REALM?
Hello everyone, I need to authenticate and get set of roles from a LDAP directory server once user gets authenticated by the Tomcat based on the Digital Certificate. Question is once tomcat does client authentication how can I use JNDI REALM to get user Roles? I really need to get this working. Your help is appreciated. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: file size limit
I have never seen JSPC cut off a jsp file but if all the html in your jsp is not getting to the browser that sounds like you need to check your buffer size. just a thought :) -Original Message- From: Mehmet Ugur Kuzu (LinkPlus) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 6:32 AM To: 'Tomcat Users List' Subject: file size limit Hi, Is there any file size limit for jsp files in Tomcat, I am using JRE 1.3.01 and Tomcat 4.0.2 , and Tomcat does not produce jsp files more then 35 kb, I checked and i saw that it produce .java files true but somehow it does not send all html codes to client. sincerely, Ugur -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: High startup and shutdown time of tomcat 4
Hi all I use a simple server.xml for debugging and startup times are within 10 seconds under Visual Cafe. It's a 700Mhz pc running NT4 Server port=8005 shutdown=SHUTDOWN debug=0 Service name=Tomcat-Standalone Connector className=org.apache.catalina.connector.http.HttpConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=false redirectPort=443 acceptCount=10 debug=0 connectionTimeout=6/ Engine name=Standalone defaultHost=localhost debug=0 Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Host name=localhost debug=0 appBase=webapps unpackWARs=false Context path=/mms docBase=c:\mmsdev\dev\mms\webapps\mms /Context /Host /Engine /Service /Server Hope this helps Donie -Original Message- From: Jürgen Weber [mailto:[EMAIL PROTECTED]] Sent: February 27, 2002 14:41 To: [EMAIL PROTECTED] Subject: High startup and shutdown time of tomcat 4 Hello, The Manager webapp does not always help. Quite often I debug servlets in an IDE. This means starting and stopping tomcat (the debugger does not know about re-deploying, does it?). As java runs slower in the debugger, slow startup times hurt especially. Thanks, Juergen _ Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
managerapp with virtual domain
Hi all, anyone know how to configure the manager app to work on virtual domains??? []´s Daniel A. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: ClassNotFoundException
I haven't actually tried it, but I believe it would work in Tomcat 3.3 as well. Thanks. Cheers, Larry -Original Message- From: Sriram Narayanan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 10:08 AM To: Tomcat Users List Subject: RE: ClassNotFoundException Just a question, Would Thread.currentThread().getContextClassLoader().loadClass(mycl assname) help ? I don't have TC 3.3, but this works for me in TC 4.0.1 Sriram 2/27/02 6:45:11 PM, Larry Isaacs [EMAIL PROTECTED] wrote: To deal with a situation like this, I have seen #1 below implemented by providing an object that is loaded in the webapp classloader to the base class. A good candidate would be this from MyServletClass. MyBaseServletClass can obtain the classloader of this object to gain access to the webapp classloader. Cheers, Larry _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat x Apache
Hi, I have linux (kernel 2.4.5), apache 1.3.19 and Tomacat 4.0.2 Tomcat are working well with the url: http://Myserv:tomcat_port/examples/jsp/index.html But when I try to access this application from Apache with the URL: http://Myserv/examples/jsp/index.html I receive the message in my browser: Forbidden You don't have permission to access /examples/jsp/index.html on this server. The corresponding entries in the Apache logs are: httpd/logs/access.log: GET /examples/jsp/index.html HTTP/1.0 403 301 httpd/logs/error.log: [error] [client xxx.xxx.xxx.x] (2)No such file or directory: cannot read directory for multi: /examples/jsp/ There is no entry in the Tomcat logs which looks like that Apache is not even trying to connect to Tomcat. My configuration files are: httpd.com . ServerName myServer ServerType standalone ServerRoot /etc/httpd .. LoadModule LoadModule webapp_module libexec/mod_webapp-1.0-eapi.so .. AddModule AddModule mod_webapp.c .. DocumentRoot /home/myDocs .. WebAppConnection Tomcat_Apache warp localhost:8008 WebAppDeploy examples Tomcat_Apache /examples/ server.xml . Service name=Tomcat_Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0/ !-- Replace localhost with what your Apache ServerName is set to -- Engine className=org.apache.catalina.connector.warp.WarpEngine name=localhost debug=0 appBase=webapps . /Engine /Service Anyone has any idea what could be the problem? Thanks. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Unable to compile class for JSP
Hi, I am trying to use a bean in my jsp. jsp:useBean id='lineB' scope='page' class='fwLine' type=fwLine / when it is run I get the following. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:61: Class org.apache.jsp.fwLine not found. fwLine lineB = null; ^ An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:64: Class org.apache.jsp.fwLine not found. lineB= (fwLine) ^ An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:69: Class org.apache.jsp.fwLine not found. lineB = (fwLine) java.beans.Beans.instantiate(this.getClass().getClassLoader(), fwLine); it seems to expect my bean to be in org.apache.jsp. have I missed something on the setup, like in web.xml Thank you for any help. Andrew
Problem starting Tomcat4 (starts then stops)
Hello, Does anyone know why upon running ./startup.sh my RH7.1 box briefly shows some java activity, but then quits. Here is the output of ps ax. These processes live for a few seconds then... nothing. 2836 pts/1R 0:01 /usr/java/jdk1.3.1_01/bin/i386/native_threads/java -Xbootclasspath/p:/roo 2863 pts/1S 0:00 /usr/java/jdk1.3.1_01/bin/i386/native_threads/java -Xbootclasspath/p:/roo 2864 pts/1S 0:00 /usr/java/jdk1.3.1_01/bin/i386/native_threads/java -Xbootclasspath/p:/roo 2865 pts/1S 0:00 /usr/java/jdk1.3.1_01/bin/i386/native_threads/java -Xbootclasspath/p:/roo 2866 pts/1S 0:00 /usr/java/jdk1.3.1_01/bin/i386/native_threads/java -Xbootclasspath/p:/roo 2867 pts/1S 0:00 /usr/java/jdk1.3.1_01/bin/i386/native_threads/java -Xbootclasspath/p:/roo 2868 pts/1S 0:00 /usr/java/jdk1.3.1_01/bin/i386/native_threads/java -Xbootclasspath/p:/roo 2869 pts/1S 0:00 /usr/java/jdk1.3.1_01/bin/i386/native_threads/java -Xbootclasspath/p:/roo 2870 pts/1S 0:00 /usr/java/jdk1.3.1_01/bin/i386/native_threads/java -Xbootclasspath/p:/roo I've seen something similar where the problem was because of a different jdk running, but in my case there is nothing. i do a killall -9 java before running startup.sh and still get the same problem. Nothing ever gets put into catalina.log. TIA -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: ClassNotFoundException
Totally awesome. This worked like a charm. Thanks, Ken Ramirez - Principal/CTO [EMAIL PROTECTED] Master-Mind Consulting Services http://www.mastermind.com Ph - 570-688-9600 Fx - 208-275-2301 -Original Message- From: Sriram Narayanan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 10:08 AM To: Tomcat Users List Subject: RE: ClassNotFoundException Just a question, Would Thread.currentThread().getContextClassLoader().loadClass(myclassname) help ? I don't have TC 3.3, but this works for me in TC 4.0.1 Sriram 2/27/02 6:45:11 PM, Larry Isaacs [EMAIL PROTECTED] wrote: To deal with a situation like this, I have seen #1 below implemented by providing an object that is loaded in the webapp classloader to the base class. A good candidate would be this from MyServletClass. MyBaseServletClass can obtain the classloader of this object to gain access to the webapp classloader. Cheers, Larry _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Unable to compile class for JSP
-Original Message- From: Andrew Rodwell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 11:31 AM To: Tomcat Users List Subject: Unable to compile class for JSP Hi, jsp:useBean id='lineB' scope='page' class='fwLine' type=fwLine / when it is run I get the following. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:61: Class org.apache.jsp.fwLine not found. fwLine lineB = null; ^ An error occurred at line: 9 in the jsp file: /fwView.jsp have I missed something on the setup, like in web.xml In JSP % @ page import=fwView % or % @ page import=package.fwView % depending on the package name of fwView. Randy -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Unable to compile class for JSP
your JSP page does not find the class in the classpath. you must import it in the beginning of the page. do something like this : %@ page import=fwLine % I think that should work ... hope it helps [EMAIL PROTECTED] -Original Message- From: Andrew Rodwell [mailto:[EMAIL PROTECTED]] Sent: 27. febrúar 2002 16:31 To: Tomcat Users List Subject: Unable to compile class for JSP Hi, I am trying to use a bean in my jsp. jsp:useBean id='lineB' scope='page' class='fwLine' type=fwLine / when it is run I get the following. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:61: Class org.apache.jsp.fwLine not found. fwLine lineB = null; ^ An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:64: Class org.apache.jsp.fwLine not found. lineB= (fwLine) ^ An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:69: Class org.apache.jsp.fwLine not found. lineB = (fwLine) java.beans.Beans.instantiate(this.getClass().getClassLoader(), fwLine); it seems to expect my bean to be in org.apache.jsp. have I missed something on the setup, like in web.xml Thank you for any help. Andrew -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Unable to compile class for JSP
see intermixed Andrew Rodwell [EMAIL PROTECTED] on 02/27/2002 10:30:37 AM Please respond to Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] cc: Subject: Unable to compile class for JSP Hi, I am trying to use a bean in my jsp. jsp:useBean id='lineB' scope='page' class='fwLine' type=fwLine / when it is run I get the following. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:61: Class org.apache.jsp.fwLine not found. fwLine lineB = null; ^ An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:64: Class org.apache.jsp.fwLine not found. lineB= (fwLine) ^ An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:69: Class org.apache.jsp.fwLine not found. lineB = (fwLine) java.beans.Beans.instantiate(this.getClass().getClassLoader(), fwLine); it seems to expect my bean to be in org.apache.jsp. You got that right. It's looking in org.apache.jsp package. You need to import the class in your jsp. have I missed something on the setup, like in web.xml Thank you for any help. Andrew -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: ClassNotFoundException
Thanks to all who answerd. That was my problem. Cheers, Andrew -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Unable to compile class for JSP not ClassNotFoundException
Sorry wrong subject -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat v4.0.2 : doesn't find JAR files in the WEB-INF/lib
Hi, Is somebody already aware of the following behavior : Tomcat is unable to find my JAR files, if I place them into the MY_CONTEXT/Web-inf/lib directory (classNotFoundException). This is only working when using %CATALINA_HOME%/lib or %CATALINA_HOME/common/lib. Is there a workaround for that ? Thanks Lassie PS : I checked the CLASSPATH with the org.apache.catalina.jsp_classpath class, and It looks like it's OK. weird... -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Sense of realm element in login-config
On Wed, 27 Feb 2002 [EMAIL PROTECTED] wrote: Date: Wed, 27 Feb 2002 09:24:03 +0100 From: [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Sense of realm element in login-config Hi, I do understand that it is shown the browser, but that is about all. Yes, that *is* all it is used for. The servlet container doesn't use it for anything else. But my problem is that from within the servlet container I cannot do anything with it. For example, I cannot retrieve it and pass it on to the authentication module, for example JDBCRealm. That is correct. The assumption is that your application's security will be based on the roles associated with the authenticated users. If you tied it to the realm element from the login-config, you'd be requiring the use of BASIC or DIGEST authentication, because that is the only place the pop-up window is displayed on the browser. Yes, you can but then you have to manipulate the web.xml file yourself? Is this really the case? Sure, you have to edit web.xml (either manually or using an IDE) for this purpose, or for lots of other things. Regards, -- Dirk Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Tomcat x Apache
Does your apache user (nobody by default) have access to the physical directory? Perhaps that directory belongs to the user you start Tomcat with (maybe root?) and nobody has no read access to it. Hope it helps, Ion -Mensaje original- De: Cleber Hostalacio de Melo [mailto:[EMAIL PROTECTED]] Enviado el: miercoles, 27 de febrero de 2002 17:25 Para: [EMAIL PROTECTED] Asunto: Tomcat x Apache Hi, I have linux (kernel 2.4.5), apache 1.3.19 and Tomacat 4.0.2 Tomcat are working well with the url: http://Myserv:tomcat_port/examples/jsp/index.html But when I try to access this application from Apache with the URL: http://Myserv/examples/jsp/index.html I receive the message in my browser: Forbidden You don't have permission to access /examples/jsp/index.html on this server. The corresponding entries in the Apache logs are: httpd/logs/access.log: GET /examples/jsp/index.html HTTP/1.0 403 301 httpd/logs/error.log: [error] [client xxx.xxx.xxx.x] (2)No such file or directory: cannot read directory for multi: /examples/jsp/ There is no entry in the Tomcat logs which looks like that Apache is not even trying to connect to Tomcat. My configuration files are: httpd.com . ServerName myServer ServerType standalone ServerRoot /etc/httpd .. LoadModule LoadModule webapp_module libexec/mod_webapp-1.0-eapi.so .. AddModule AddModule mod_webapp.c .. DocumentRoot /home/myDocs .. WebAppConnection Tomcat_Apache warp localhost:8008 WebAppDeploy examples Tomcat_Apache /examples/ server.xml . Service name=Tomcat_Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0/ !-- Replace localhost with what your Apache ServerName is set to -- Engine className=org.apache.catalina.connector.warp.WarpEngine name=localhost debug=0 appBase=webapps . /Engine /Service Anyone has any idea what could be the problem? Thanks. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Sense of realm element in login-config
On Wed, 27 Feb 2002 [EMAIL PROTECTED] wrote: Date: Wed, 27 Feb 2002 13:15:11 +0100 From: [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: Sense of realm element in login-config This is what I want to do: 1) I want to setup a database which includes multiple realms 2) user are linked to realms 3) I want to use protect a servlet with basic authentication, and I want to be able refer to the correct realm when performing the authentication (this means sending the correct realm/user to the database. And I don't want to do this by hacking the tomcat configuration files. For Tomcat 4, you should create a Context element (in server.xml) for each webapp, and put a different Realm element inside it for each app that has different sets of users. For example, you could set things up with different user tables (or set up views in your database that expose the subset of users for that particular webapp). Regards, -- Dirk Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: That old tomcat 4.0.2 - xerces.jar file problem one moretime...please
On Wed, 27 Feb 2002, Markus Spath wrote: Date: Wed, 27 Feb 2002 11:41:25 +0100 From: Markus Spath [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: That old tomcat 4.0.2 - xerces.jar file problem one more time...please additional question: relies tomcat itself on the libs in CATALINA_HOME/common/lib ? if not, it could be a good idea to just remove all xml-related libraries from there and (redundantly) including them in WEB-INF/lib of the projects to gain some sort of control. - just a thought and i didn't have a closer look at the class-loading mechanism. Tomcat relies on a JAXP/1.1 or later XML parser in four places: * Parsing server.xml * Parsing web.xml * Parsing tag library descriptor files (TLD) * Parsing JSP pages that are in the XML syntax So, there must be an XML parser visible to the internal classes. This can be put in either common/lib (if web applications also need it), or in server/lib. The release notes document (in the top level directory of the distribution) talks more about your options for using different XML parsers. are there any best practices for that one might follow? Markus Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: file size limit
On Wed, 27 Feb 2002, Mehmet Ugur Kuzu (LinkPlus) wrote: Date: Wed, 27 Feb 2002 15:32:04 +0200 From: Mehmet Ugur Kuzu (LinkPlus) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: file size limit Hi, Is there any file size limit for jsp files in Tomcat, I am using JRE 1.3.01 and Tomcat 4.0.2 , and Tomcat does not produce jsp files more then 35 kb, I checked and i saw that it produce .java files true but somehow it does not send all html codes to client. sincerely, Ugur There is no size limit on the generated source code imposed by Tomcat (although there might be some upper limit that javac can handle). The size limit that matters is the generated code, which all has to fit into a single class. I would suggest looking at the log files produced by Tomcat to see if your page might have thrown an exception part way through its execution. Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat v4.0.2 : doesn't find JAR files in the WEB-INF/lib
On Wed, 27 Feb 2002, Lassie wrote: Date: Wed, 27 Feb 2002 18:03:13 +0100 From: Lassie [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Tomcat v4.0.2 : doesn't find JAR files in the WEB-INF/lib Hi, Is somebody already aware of the following behavior : Tomcat is unable to find my JAR files, if I place them into the MY_CONTEXT/Web-inf/lib directory (classNotFoundException). This is only working when using %CATALINA_HOME%/lib or %CATALINA_HOME/common/lib. The WEB-INF directory name *must* be in all capital letters. Servlet and JSP pages are case sensitive, even on Windows. Is there a workaround for that ? Thanks Lassie PS : I checked the CLASSPATH with the org.apache.catalina.jsp_classpath class, and It looks like it's OK. weird... Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Trouble with IMG tag, servlets, and JSPs
I chose to use your first suggestion; a Servlet-Mapping, and it worked great and looks much more elegant. All I did was to include the following mapping in my web.xml: servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/MyServlet/url-pattern /servlet-mapping Now, I simply call the servlet from the browser without the servlet keyword and everything works as expected. Thanks again for the suggestion. Ken Ramirez - Principal/CTO [EMAIL PROTECTED] Master-Mind Consulting Services http://www.mastermind.com Ph - 570-688-9600 Fx - 208-275-2301 -Original Message- From: Greg Trasuk [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 9:01 AM To: 'Tomcat Users List' Subject: RE: Trouble with IMG tag, servlets, and JSPs Hi Ken: Are you accessing your servlets through the servlet invoker (i.e. http://host/MyApp/servlet/myserv ?) If so, then remember that from the browser's point of view, the 'current directory' of the page is 'http://host/MyApp/servlet'. When the browser sees a relative path, like 'images/myimage.jsp', it tries to load that relative to the servlet's path, so it comes up with 'http://host/MyApp/servlet/images/myimage.jsp', which doesn't exist. That's your 404 error in the logs. Same thing holds for style sheets and other resources. Solutions: 1- If you want to keep using the path '/servlet' (i.e. you don't want to define servlet mappings, or you need the path prefix to make sure Apache sends the request to Tomcat) then change your image links to '../images/myimage.jsp' 2- Use the getContextPath() call. 3- Define servlet mappings in your web.xml so that you reference the servlet with something like 'http://host/MyApp/myserv.srv', which puts the current path at your application root. 4- Put a hook into the top of the jsp page to forward the request to the servlet if the request came directly from the browser. Then the browser will simply load the url by 'http://host/MyApp/page.jsp' and the jsp forwards to the servlet by doing a jsp:forward ... directive. This is actually the way I do it, since it gets around some difficulties I have in my Apache configuration which make it hard to map servlets generically (nothing wrong with Apache or Tomcat; I just have a wierd virtual host configuration for other reasons), but easy to get JSP's called. I simply have the servlet drop an attribute called 'fromServlet' into the request object. If the jsp doesn't see this attribute, it forwards to the servlet, which then does its thing, drops in the 'fromServlet' attribute and forwards back to the same jsp. Then the jsp sees the attribute and handles the request itself. Good luck, Greg Trasuk, President StratusCom Manufacturing Systems Inc. - We use information technology to solve business problems on your plant floor. http://stratuscom.ca -Original Message- From: Ken Ramirez [mailto:[EMAIL PROTECTED]] Sent: February 27, 2002 00:13 To: [EMAIL PROTECTED] Subject: Trouble with IMG tag, servlets, and JSPs Hope someone can help: I'm having a problem loading images from a JSP page when the page is called from a servlet. I'm performing a forward from the servlet to the JSP, which then loads the images from a subdirectory in the app's directory as follows: TOMCAT_HOME/webapps/MyApp/*.jsp TOMCAT_HOME/webapps/MyApp/images/*.img The images are loaded from the JSP using the img tag as follows: img src=images/myimage.jpg I've also tried src=/images/myimage.jpg and this doesn't work. However, if I call the jpg directly, everything shows up fine. Of course in the real world, I need to get the forward to work so that I can pass data from the servlet to the JSP. I found some information in the mailing list's archive regarding this problem and someone suggested the following: IMG SRC=%=request.getContextPath()%/images/myimage.jpg This does work, but it just seems odd that you would have to do this, especially given the fact that there is a context entry for the app in the server.xml. Isn't the purpose of the Context entry to: 1. Create and associate a Context object with the App and 2. Establish the base path for the app. Seems kind of redundent that you would have to again retrieve the ContextPath yourself, when it seems that Tomcat should do this for us or the Browser should receive the problem path so that it knows where to get the images and CSS files from. Instead, what is actually sent back to the browser is the following path for the image: images/myimage.jpg Now what's interesting is that I looked in one of Tomcat's log files and found the following exception for the images: StandardWrapper[/MasterMind:org.apache.catalina.INVOKER.theme ]: Marking servlet org.apache.catalina.INVOKER.theme as unavailable 2002-02-26
REPOST: Please HELP!: URL Mapping Problems in servlet
OK -- I'm having a related problem: I can hit my servlet with the following httpd.conf and web.xml file setup with these two URLs: http://hostname:8080/s2/sb/ And http://hostname/SiteBlocks/sb/ From within the servlet, I am trying to reconstruct the URL. I am using the following code: ... private String buildURL( HttpServletRequest req ) { // Build a new absolute URL StringBuffer url = new StringBuffer(); url.append( req.getScheme() ); // http url.append( :// );// http:// url.append( req.getServerName() ); // http://hostname url.append( : ); // http://hostname: url.append( req.getServerPort() ); // http://hostname:80 url.append( req.getServletPath() ); // http://hostname:80/SiteBlocks/sb return url.toString(); } ... Unfortunately, the URL this produces is either: http://hostname:8080/sb or http://hostname/sb, and not http://hostname:8080/s2/sb or http://hostname/SiteBlocks/sb as expected. Am I doing something wrong? If so, how can I get the desired result? Thanks for any assistance! Here's an excerpt from my httpd.conf file: ... IfModule od_webapp.c WebAppConnection warpconnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/ WebAppDeploy SiteBlocks warpConnection /SiteBlocks/ /IfModule ... Here's my entire web.xml file: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-name SiteBlocks /servlet-name servlet-class S2Server /servlet-class init-param param-nameresource/param-name param-value/usr/local/jakarta-tomcat-4.0.2/webapps/SiteBlocks/WEB-INF/Site BlocksServer.properties/param-value /init-param /servlet servlet-mapping servlet-name SiteBlocks /servlet-name url-pattern /sb /url-pattern /servlet-mapping /web-app - Mark == Mark Indictor -- V.P. Engineering [EMAIL PROTECTED] http://www.site2.com Phone:(310)451-3472 FAX:(240)220-6341 http://keyserver.pgp.com/pks/lookup?op=getsearch=0x8959F966 == -Original Message- From: Dave Ferguson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 12:11 PM To: Tomcat Users List Subject: Re: servlet-mapping problem This is basic stuff. It should work. What URL are you using to invoke the servlet? With no mapping the URL would be http://server/servlet/warservlet. If your mapping is url-pattern/blah/url-pattern then the URL would be http://server/blah. Restart Tomcat to be sure your changes take effect. - df
Re: file size limit
Hi, Can you please give more info on the components you are using? We had a similar problem with struts and struts validator. The problem was due to an error in the configuration file of struts validator. There was no clue in any log file. Amine - Original Message - From: Craig R. McClanahan [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 5:13 PM Subject: Re: file size limit On Wed, 27 Feb 2002, Mehmet Ugur Kuzu (LinkPlus) wrote: Date: Wed, 27 Feb 2002 15:32:04 +0200 From: Mehmet Ugur Kuzu (LinkPlus) [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: file size limit Hi, Is there any file size limit for jsp files in Tomcat, I am using JRE 1.3.01 and Tomcat 4.0.2 , and Tomcat does not produce jsp files more then 35 kb, I checked and i saw that it produce .java files true but somehow it does not send all html codes to client. sincerely, Ugur There is no size limit on the generated source code imposed by Tomcat (although there might be some upper limit that javac can handle). The size limit that matters is the generated code, which all has to fit into a single class. I would suggest looking at the log files produced by Tomcat to see if your page might have thrown an exception part way through its execution. Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat 4 interaction with apache 2.0
HI all, I ma trying to make work tomcat 4.0.2 with apache 2.0, I added the following line at the end of the httpd.conf file : Include /etc/tomcat4/conf/tomcat4.conf which content is : # tomcat /etc/rc.d script example configuration file # Use with version 1.07 of the scripts or later # Where your java installation lives # JAVA_HOME=/usr/java/jdk JAVA_HOME=/opt/IBMJava2-13 # You can pass some parameters to java # here if you wish to #JAVACMD=$JAVA_HOME/bin/java -Xminf0.1 -Xmaxf0.3 # Where your tomcat installation lives # That change from previous RPM where TOMCAT_HOME # used to be /var/tomcat. # Now /var/tomcat will be the base for webapps only CATALINA_HOME=/var/tomcat4 JASPER_HOME=/var/tomcat4 CATALINA_TMPDIR=/var/tomcat4/temp # What user should run tomcat TOMCAT_USER=tomcat4 # You can change your tomcat locale here #LANG=en_US # If you wish to further customize your tomcat environment, # put your own definitions here # (i.e. LD_LIBRARY_PATH for some jdbc drivers) # Just do not forget to export them :) LoadModule webapp_module modules/mod_webapp.so -- I also have the mod_jk.so available I don't know which to use or why. When I launch apache here is what I get : ./apachectl start Syntax error on line 31 of /etc/tomcat4/conf/tomcat4.conf: Cannot load /usr/local/apache2/modules/mod_webapp.so into server: /usr/local/apache2/modules/mod_webapp.so: undefined symbol: ap_table_get ./apachectl start: httpd could not be started Anyone has evre encountered this problem ? if so, please tell me what I did wrong. Thanks in advance -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat x Apache
My webapps directory and all its directories are read and execute free for all users. So I don´t think this is the problem. Any way, I think Apache should pass all the /examples requests to Tomcat and not trying to read the directly from the file system. It looks more that Apache is not allowed to connect to Tomcat. I´ve already check all the possibilities but could not find any parameter(s) in httpd.conf or server.xml that could prevent the connection. Any other clue? Thank you. Ion Larranaga wrote: Does your apache user (nobody by default) have access to the physical directory? Perhaps that directory belongs to the user you start Tomcat with (maybe root?) and nobody has no read access to it. Hope it helps, Ion -Mensaje original- De: Cleber Hostalacio de Melo [mailto:[EMAIL PROTECTED]] Enviado el: miercoles, 27 de febrero de 2002 17:25 Para: [EMAIL PROTECTED] Asunto: Tomcat x Apache Hi, I have linux (kernel 2.4.5), apache 1.3.19 and Tomacat 4.0.2 Tomcat are working well with the url: http://Myserv:tomcat_port/examples/jsp/index.html But when I try to access this application from Apache with the URL: http://Myserv/examples/jsp/index.html I receive the message in my browser: Forbidden You don't have permission to access /examples/jsp/index.html on this server. The corresponding entries in the Apache logs are: httpd/logs/access.log: GET /examples/jsp/index.html HTTP/1.0 403 301 httpd/logs/error.log: [error] [client xxx.xxx.xxx.x] (2)No such file or directory: cannot read directory for multi: /examples/jsp/ There is no entry in the Tomcat logs which looks like that Apache is not even trying to connect to Tomcat. My configuration files are: httpd.com . ServerName myServer ServerType standalone ServerRoot /etc/httpd .. LoadModule LoadModule webapp_module libexec/mod_webapp-1.0-eapi.so .. AddModule AddModule mod_webapp.c .. DocumentRoot /home/myDocs .. WebAppConnection Tomcat_Apache warp localhost:8008 WebAppDeploy examples Tomcat_Apache /examples/ server.xml . Service name=Tomcat_Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0/ !-- Replace localhost with what your Apache ServerName is set to -- Engine className=org.apache.catalina.connector.warp.WarpEngine name=localhost debug=0 appBase=webapps . /Engine /Service Anyone has any idea what could be the problem? Thanks. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Newbie resources
What resources would you recommend for a web and coding savvy user to get up to speed on using and configuring Tomcat. I'm strong in HTML and JSP coding, but weak in Unix. Using Mac OS X. I do try to use the supplied Tomcat docs, but they seem to me a bit more reference-like (which is great and useful, just not quite enough for this untrainable monkey). Also, why no FAQ for this list? The short time I've been here I've seen many of the same types of questions come up. Ken Martin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat 4 interaction with apache 2.0
I think the line: LoadModule webapp_module modules/mod_webapp.so should be put in httpd.conf under Apache home directory/conf. Look at http://dcb.sun.com/practices/howtos/tomcat_apache.jsp I hope it helps. Regis Muller wrote: HI all, I ma trying to make work tomcat 4.0.2 with apache 2.0, I added the following line at the end of the httpd.conf file : Include /etc/tomcat4/conf/tomcat4.conf which content is : # tomcat /etc/rc.d script example configuration file # Use with version 1.07 of the scripts or later # Where your java installation lives # JAVA_HOME=/usr/java/jdk JAVA_HOME=/opt/IBMJava2-13 # You can pass some parameters to java # here if you wish to #JAVACMD=$JAVA_HOME/bin/java -Xminf0.1 -Xmaxf0.3 # Where your tomcat installation lives # That change from previous RPM where TOMCAT_HOME # used to be /var/tomcat. # Now /var/tomcat will be the base for webapps only CATALINA_HOME=/var/tomcat4 JASPER_HOME=/var/tomcat4 CATALINA_TMPDIR=/var/tomcat4/temp # What user should run tomcat TOMCAT_USER=tomcat4 # You can change your tomcat locale here #LANG=en_US # If you wish to further customize your tomcat environment, # put your own definitions here # (i.e. LD_LIBRARY_PATH for some jdbc drivers) # Just do not forget to export them :) LoadModule webapp_module modules/mod_webapp.so -- I also have the mod_jk.so available I don't know which to use or why. When I launch apache here is what I get : ./apachectl start Syntax error on line 31 of /etc/tomcat4/conf/tomcat4.conf: Cannot load /usr/local/apache2/modules/mod_webapp.so into server: /usr/local/apache2/modules/mod_webapp.so: undefined symbol: ap_table_get ./apachectl start: httpd could not be started Anyone has evre encountered this problem ? if so, please tell me what I did wrong. Thanks in advance -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: REPOST: Please HELP!: URL Mapping Problems in servlet
try req.getPathInfo() in place of getServletPath() you can use getRequestURL() which will provide the requested URL that you are trying to rebuild. Charlie -Original Message- From: Mark B. Indictor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 12:24 PM To: 'Tomcat Users List' Subject: REPOST: Please HELP!: URL Mapping Problems in servlet OK -- I'm having a related problem: I can hit my servlet with the following httpd.conf and web.xml file setup with these two URLs: http://hostname:8080/s2/sb/ And http://hostname/SiteBlocks/sb/ From within the servlet, I am trying to reconstruct the URL. I am using the following code: ... private String buildURL( HttpServletRequest req ) { // Build a new absolute URL StringBuffer url = new StringBuffer(); url.append( req.getScheme() ); // http url.append( :// );// http:// url.append( req.getServerName() ); // http://hostname url.append( : ); // http://hostname: url.append( req.getServerPort() ); // http://hostname:80 url.append( req.getServletPath() ); // http://hostname:80/SiteBlocks/sb return url.toString(); } ... Unfortunately, the URL this produces is either: http://hostname:8080/sb or http://hostname/sb, and not http://hostname:8080/s2/sb or http://hostname/SiteBlocks/sb as expected. Am I doing something wrong? If so, how can I get the desired result? Thanks for any assistance! Here's an excerpt from my httpd.conf file: ... IfModule od_webapp.c WebAppConnection warpconnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/ WebAppDeploy SiteBlocks warpConnection /SiteBlocks/ /IfModule ... Here's my entire web.xml file: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-name SiteBlocks /servlet-name servlet-class S2Server /servlet-class init-param param-nameresource/param-name param-value/usr/local/jakarta-tomcat-4.0.2/webapps/SiteBlock s/WEB-INF/Site BlocksServer.properties/param-value /init-param /servlet servlet-mapping servlet-name SiteBlocks /servlet-name url-pattern /sb /url-pattern /servlet-mapping /web-app - Mark == Mark Indictor -- V.P. Engineering [EMAIL PROTECTED] http://www.site2.com Phone:(310)451-3472 FAX:(240)220-6341 http://keyserver.pgp.com/pks/lookup?op=getsearch=0x8959F966 == -Original Message- From: Dave Ferguson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 12:11 PM To: Tomcat Users List Subject: Re: servlet-mapping problem This is basic stuff. It should work. What URL are you using to invoke the servlet? With no mapping the URL would be http://server/servlet/warservlet. If your mapping is url-pattern/blah/url-pattern then the URL would be http://server/blah. Restart Tomcat to be sure your changes take effect. - df -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Debugging JSPs and Servlets
Hello, I am trying to create an environment that will assist in debugging jsps, i think one of the basic ways to do debugging is through logging, I want to log various request coming in along with the request parameters, i checked the access loggs but they only logg GET request also it doesnt logg the parameters, is there anyway i can logg POST request too along with the request parameters, i can possibly use a filter to do it, will that be a right approach also can i configure a filter to run for all the servlets? Also is it possible to logg something like forwards to another page and including other pages, also if you have any other suggestions to add features that will assist in debugging that i can implement i will greatly appreciate it. Thanks, Nitin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Tomcat x Apache
Your interpretation of the problem seems accurate. catalina.out and apache's error log should tell you more. Does engine in Service name=Tomcat_Apache in server.xml have a host nested within it and the examples context defined within the host? John -Original Message- From: Cleber Hostalácio de Melo [mailto:[EMAIL PROTECTED]] Sent: 27 February 2002 16:25 To: [EMAIL PROTECTED] Subject: Tomcat x Apache Hi, I have linux (kernel 2.4.5), apache 1.3.19 and Tomacat 4.0.2 Tomcat are working well with the url: http://Myserv:tomcat_port/examples/jsp/index.html But when I try to access this application from Apache with the URL: http://Myserv/examples/jsp/index.html I receive the message in my browser: Forbidden You don't have permission to access /examples/jsp/index.html on this server. The corresponding entries in the Apache logs are: httpd/logs/access.log: GET /examples/jsp/index.html HTTP/1.0 403 301 httpd/logs/error.log: [error] [client xxx.xxx.xxx.x] (2)No such file or directory: cannot read directory for multi: /examples/jsp/ There is no entry in the Tomcat logs which looks like that Apache is not even trying to connect to Tomcat. My configuration files are: httpd.com . ServerName myServer ServerType standalone ServerRoot /etc/httpd .. LoadModule LoadModule webapp_module libexec/mod_webapp-1.0-eapi.so .. AddModule AddModule mod_webapp.c .. DocumentRoot /home/myDocs .. WebAppConnection Tomcat_Apache warp localhost:8008 WebAppDeploy examples Tomcat_Apache /examples/ server.xml . Service name=Tomcat_Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0/ !-- Replace localhost with what your Apache ServerName is set to -- Engine className=org.apache.catalina.connector.warp.WarpEngine name=localhost debug=0 appBase=webapps . /Engine /Service Anyone has any idea what could be the problem? Thanks. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Debugging JSPs and Servlets
Take a look at Log4j http://jakarta.apache.org/log4j/docs/index.html It has been the greatest debugging tool I have found. -Original Message- From: Nitin Vira [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 12:47 PM To: Tomcat Users List Subject: Debugging JSPs and Servlets Hello, I am trying to create an environment that will assist in debugging jsps, i think one of the basic ways to do debugging is through logging, I want to log various request coming in along with the request parameters, i checked the access loggs but they only logg GET request also it doesnt logg the parameters, is there anyway i can logg POST request too along with the request parameters, i can possibly use a filter to do it, will that be a right approach also can i configure a filter to run for all the servlets? Also is it possible to logg something like forwards to another page and including other pages, also if you have any other suggestions to add features that will assist in debugging that i can implement i will greatly appreciate it. Thanks, Nitin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Unable to compile class for JSP
2/27/02 10:00:37 PM, Andrew Rodwell [EMAIL PROTECTED] wrote: Hi, I am trying to use a bean in my jsp. jsp:useBean id='lineB' scope='page' class='fwLine' type=fwLine / when it is run I get the following. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:61: Class org.apache.jsp.fwLine not found. fwLine lineB = null; ^ An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:64: Class org.apache.jsp.fwLine not found. lineB= (fwLine) ^ An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:69: Class org.apache.jsp.fwLine not found. lineB = (fwLine) java.beans.Beans.instantiate(this.getClass().getClassLoader(), fwLine); it seems to expect my bean to be in org.apache.jsp. have I missed something on the setup, like in web.xml I've not tried this ever, but place your class in a package, and use that package instead. You should then have: jsp:useBean id='lineB' scope='page' class='foo.bar.fwLine' type=fwLine / Also, make sure that you keep this package and the class in your app's WEB-INF/classes folder Thank you for any help. Andrew Sriram _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat v4.0.2 : doesn't find JAR files in the WEB-INF/lib
Craig R. McClanahan wrote: On Wed, 27 Feb 2002, Lassie wrote: Hi, Is somebody already aware of the following behavior : Tomcat is unable to find my JAR files, if I place them into the MY_CONTEXT/Web-inf/lib directory (classNotFoundException). This is only working when using %CATALINA_HOME%/lib or %CATALINA_HOME/common/lib. The WEB-INF directory name *must* be in all capital letters. Servlet and JSP pages are case sensitive, even on Windows. Hi Craig, The web-inf directory is already in capital letter on the windows file system. Is there another place, or another conf file I should check for this capital letter thing ? Lassie -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat v4.0.2 : doesn't find JAR files in the WEB-INF/lib
2/27/02 11:23:51 PM, Lassie [EMAIL PROTECTED] wrote: Craig R. McClanahan wrote: On Wed, 27 Feb 2002, Lassie wrote: Hi, Is somebody already aware of the following behavior : Tomcat is unable to find my JAR files, if I place them into the MY_CONTEXT/Web-inf/lib directory (classNotFoundException). This is only working when using %CATALINA_HOME%/lib or %CATALINA_HOME/common/lib. The WEB-INF directory name *must* be in all capital letters. Servlet and JSP pages are case sensitive, even on Windows. Hi Craig, The web-inf directory is already in capital letter on the windows file system. Is there another place, or another conf file I should check for this capital letter thing ? It really must be an issue of capital case. Here's how you could check. 1. From the Windows Explorer, go to View-Options and select the check box Display the full path in the title bar. 2. Apply these changes. 3. Navigate to the WEB-INF folder, and select the web.xml file. Now check the title bar, if the folder name is not WEB-INF, then you just need to rename this. Remember, all the characters must be in capital case. Lassie Sriram _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: REPOST: Please HELP!: URL Mapping Problems in servlet
If the URL is: http://hostname/context/servlet/xxx Then: req.getPathInfo() returns: /xxx req.getRequestURI() returns:/context/servlet/xxx req.getServletPath() returns: /servlet How do I get just: /context/servlet OR How do I get Apache or Tomcat to respond to: http://hostname/servlet/xxx? Thanks - mbi == Mark Indictor -- Site2 Corporation [EMAIL PROTECTED] http://www.site2.com Phone:(310)451-3472 FAX:(240)220-6341 http://keyserver.pgp.com/pks/lookup?op=getsearch=0x8959F966 == -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 9:46 AM To: 'Tomcat Users List' Subject: RE: REPOST: Please HELP!: URL Mapping Problems in servlet try req.getPathInfo() in place of getServletPath() you can use getRequestURL() which will provide the requested URL that you are trying to rebuild. Charlie -Original Message- From: Mark B. Indictor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 12:24 PM To: 'Tomcat Users List' Subject: REPOST: Please HELP!: URL Mapping Problems in servlet OK -- I'm having a related problem: I can hit my servlet with the following httpd.conf and web.xml file setup with these two URLs: http://hostname:8080/s2/sb/ And http://hostname/SiteBlocks/sb/ From within the servlet, I am trying to reconstruct the URL. I am using the following code: ... private String buildURL( HttpServletRequest req ) { // Build a new absolute URL StringBuffer url = new StringBuffer(); url.append( req.getScheme() ); // http url.append( :// );// http:// url.append( req.getServerName() ); // http://hostname url.append( : ); // http://hostname: url.append( req.getServerPort() ); // http://hostname:80 url.append( req.getServletPath() ); // http://hostname:80/SiteBlocks/sb return url.toString(); } ... Unfortunately, the URL this produces is either: http://hostname:8080/sb or http://hostname/sb, and not http://hostname:8080/s2/sb or http://hostname/SiteBlocks/sb as expected. Am I doing something wrong? If so, how can I get the desired result? Thanks for any assistance! Here's an excerpt from my httpd.conf file: ... IfModule od_webapp.c WebAppConnection warpconnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/ WebAppDeploy SiteBlocks warpConnection /SiteBlocks/ /IfModule ... Here's my entire web.xml file: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-name SiteBlocks /servlet-name servlet-class S2Server /servlet-class init-param param-nameresource/param-name param-value/usr/local/jakarta-tomcat-4.0.2/webapps/SiteBlock s/WEB-INF/Site BlocksServer.properties/param-value /init-param /servlet servlet-mapping servlet-name SiteBlocks /servlet-name url-pattern /sb /url-pattern /servlet-mapping /web-app - Mark == Mark Indictor -- V.P. Engineering [EMAIL PROTECTED] http://www.site2.com Phone:(310)451-3472 FAX:(240)220-6341 http://keyserver.pgp.com/pks/lookup?op=getsearch=0x8959F966 == -Original Message- From: Dave Ferguson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 12:11 PM To: Tomcat Users List Subject: Re: servlet-mapping problem This is basic stuff. It should work. What URL are you using to invoke the servlet? With no mapping the URL would be http://server/servlet/warservlet. If your mapping is url-pattern/blah/url-pattern then the URL would be http://server/blah. Restart Tomcat to be sure your changes take effect. - df -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Debugging JSPs and Servlets
2/27/02 11:17:26 PM, Nitin Vira [EMAIL PROTECTED] wrote: Hello, I am trying to create an environment that will assist in debugging jsps, i think one of the basic ways to do debugging is through logging, I want to log various request coming in along with the request parameters, i checked the access loggs but they only logg GET request also it doesnt logg the parameters, is there anyway i can logg POST request too along with the request parameters, i can possibly use a filter to do it, will that be a right approach also can i configure a filter to run for all the servlets? Also is it possible to logg something like forwards to another page and including other pages, also if you have any other suggestions to add features that will assist in debugging that i can implement i will greatly appreciate it. Use Log4J. (http://jakarta.apache.org/log4j) Log4J has something called Logging Levels, e.g. DEBUG, ERROR, INFO etc... Let's say you have some 15 packages with some 10 classes in each. In each class, instantiate a Logger with the statement static Logger logger = Logger.getInstance(MyClass.class.getName()); Now within the class, write both DEBUG level statements and INFO level statements: e.g. public void someTask(String first, String second){ logger.debug(just entered the someTask method, args are + first + : + second); logger.info(about to calculate something); int x = calculate(); logger.debug(the calculation result was + x); } Now, DEBUG levels happen to be lower in importance than INFO levels. Log4J can be instructed on which level to log via a properties file. So, you can change log levels, or even disable loggin altogether via an external properties file. No changes to the code are required at all. Also, you can specify that the log outputs from a particular class should be redirected to one file, while all other logs could go to another file, or even a JDBC target. Thanks, Nitin Sriram _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Debugging JSPs and Servlets
On Wed, 27 Feb 2002, Nitin Vira wrote: Date: Wed, 27 Feb 2002 09:47:26 -0800 From: Nitin Vira [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Debugging JSPs and Servlets Hello, I am trying to create an environment that will assist in debugging jsps, i think one of the basic ways to do debugging is through logging, I want to log various request coming in along with the request parameters, i checked the access loggs but they only logg GET request also it doesnt logg the parameters, is there anyway i can logg POST request too along with the request parameters, i can possibly use a filter to do it, will that be a right approach also can i configure a filter to run for all the servlets? Also is it possible to logg something like forwards to another page and including other pages, also if you have any other suggestions to add features that will assist in debugging that i can implement i will greatly appreciate it. Thanks, Nitin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] Logging stuff for yourself is a nice use case for a Filter. In fact, there's an example filter that does this kind of thing in the examples webapp included with Tomcat 4. Source code is in file /WEB-INF/classes/filters/RequestDumperFilter.java. You can see how it's configured by looking at the web.xml file for this app. Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Unable to compile class for JSP
In fwLine.java (assuming you wrote the class), there needs to be a package line for the class at the top of the file something like: package com.mycompany.myproject.fwLine ; And this has to be reflected in the path under WEB-INF/classes to your fwLine.class file as in: WEB-INF/classes/com/mycompany/myproject/fwLine.class Then compile the class and place the compiled .class file as above. After that, as long as you restart your app and make sure your jsp page imports the class, it should work like a charm. --David PS: It doesn't have to be packaged up in a jar file as long as the directory structure under WEB-INF/classes follows the same standards as a .jar. On Wednesday 27 February 2002 11:30 am, you wrote: Hi, I am trying to use a bean in my jsp. jsp:useBean id='lineB' scope='page' class='fwLine' type=fwLine / when it is run I get the following. org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:61: Class org.apache.jsp.fwLine not found. fwLine lineB = null; ^ An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:64: Class org.apache.jsp.fwLine not found. lineB= (fwLine) ^ An error occurred at line: 9 in the jsp file: /fwView.jsp Generated servlet error: C:\tomcat\work\localhost\_\fwView$jsp.java:69: Class org.apache.jsp.fwLine not found. lineB = (fwLine) java.beans.Beans.instantiate(this.getClass().getClassLoader(), fwLine); it seems to expect my bean to be in org.apache.jsp. have I missed something on the setup, like in web.xml Thank you for any help. Andrew -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
-DEAPI compile on Linux, HELP!
Hi, I can't compile mod_webapp. If somebody success compile it, please help me to compile, or send me the binary .so files. Thx, Andras My system: -- Linux 7.0 Tomcat 4.0.2 jacarta-tomcat-commectors-4.0.2-01-src.tar.gz apr dovnloaded via cvs /bin/sh - bash error report: - [root@www webapp]# sh support/buildconf.sh : command not foundh: : command not foundh: 'upport/buildconf.sh: line 75: syntax error near unexpected token `) 'upport/buildconf.sh: line 75: `) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: REPOST: Please HELP!: URL Mapping Problems in servlet
-Original Message- From: Mark B. Indictor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 1:17 PM To: 'Tomcat Users List' Subject: RE: REPOST: Please HELP!: URL Mapping Problems in servlet If the URL is: http://hostname/context/servlet/xxx Then: req.getPathInfo() returns:/xxx req.getRequestURI() returns: /context/servlet/xxx req.getServletPath() returns: /servlet How do I get just: /context/servlet I don't think there is a function to get the full request path without the final page/servlet name. This should get what you need: req.getRequestURI().substring(0,req.getRequestURI().lastIndexOf(/)) OR How do I get Apache or Tomcat to respond to: http://hostname/servlet/xxx? tomcat will already take a servlet named 'xxx' in this format unless you disabled the default servlet invoker in conf\web.xml. You will have to map /servlet/* to tomcat from apache. Charlie Thanks - mbi == Mark Indictor -- Site2 Corporation [EMAIL PROTECTED] http://www.site2.com Phone:(310)451-3472 FAX:(240)220-6341 http://keyserver.pgp.com/pks/lookup?op=getsearch=0x8959F966 == -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Newbie resources
2/27/02 11:03:19 PM, Ken Martin [EMAIL PROTECTED] wrote: What resources would you recommend for a web and coding savvy user to get up to speed on using and configuring Tomcat. I'm strong in HTML and JSP coding, but weak in Unix. Using Mac OS X. 1. Read the documentation. There's really a whole lot of information given. Start off with the the download page, where there's information on what to use to extract the contents of the archives. 2. Next, get the Servlet API and the JSP API specs from Sun's site. 3. Download the sources, and check out the developer documentation there. I do try to use the supplied Tomcat docs, but they seem to me a bit more reference-like (which is great and useful, just not quite enough for this untrainable monkey). The documentation currently contains information on configuring Tomcat for JNDI, Database connection pools, Also, why no FAQ for this list? The short time I've been here I've seen many of the same types of questions come up. 4. Search the archives first. You're right, most of the questions have indeed been answered first. Ken Martin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: REPOST: Please HELP!: URL Mapping Problems in servlet
I appreciate the help, but this still does not solve my problem. You see, I need to handle URLs of the following forms: http://hostname/context/servlet/xxx as well as: http://hostname/context/servlet With your suggestion, I would be truncating these to: http://hostname/context/servlet and http://hostname/context Respectively. The first behavior is desirable, the second is not! What I do not understand is why Apache and Tomcat conspire hide the 'context' element of the URL. I either need to find a way to isolate and retrieve the full path to the servlet (/context/servlet) or I need to find a way to set up Apache and Tomcat to recognize a URL that does not contain a context component (/servlet). Why does getServletPath() not return the whole path to the servlet, including its context, if this information is, in fact, required to access the servlet with a URL!? Any suggestions? Thanks! - mbi == Mark Indictor -- Site2 Corporation [EMAIL PROTECTED] http://www.site2.com Phone:(310)451-3472 FAX:(240)220-6341 http://keyserver.pgp.com/pks/lookup?op=getsearch=0x8959F966 == -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 10:44 AM To: 'Tomcat Users List' Subject: RE: REPOST: Please HELP!: URL Mapping Problems in servlet I don't think there is a function to get the full request path without the final page/servlet name. This should get what you need: req.getRequestURI().substring(0,req.getRequestURI().lastIndexOf(/))
Re: (Newbie) Please help ....
2/27/02 5:24:45 PM, dark.wizzard [EMAIL PROTECTED] wrote: Hi people: Only a simple question ... Where I deploy into TomCat structure the files JSP 1.2 and Servlet 2.3 ??? Download Tomcat 4.0.1 from jakarta.apache.org/tomcat/ Start Tomcat, and go to the URL http://localhost:8080/tomcat-docs/appdev/index.html This is a document that sort of walks you through developing and running a web application on Tomcat. Thank you dark.Wizzard __ Quer ter seu próprio endereço na Internet? Garanta já o seu e ainda ganhe cinco e-mails personalizados. DomíniosBOL - http://dominios.bol.com.br -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat x Apache
When I start the Tomcat (first) and Apache, the logs entries became: myServ_examples_log.2002-02-27.txt (Tomcat) 2002-02-27 15:49:14 WebappLoader[/examples]: Deploying class repositories to work directory /var/tomcat4/work/myServer/examples 2002-02-27 15:49:14 WebappLoader[/examples]: Reloading checks are enabled for this Context 2002-02-27 15:49:14 StandardManager[/examples]: Seeding random number generator class java.security.SecureRandom 2002-02-27 15:49:14 StandardManager[/examples]: Seeding of random number generator has been completed 2002-02-27 15:49:19 ContextConfig[/examples]: Configured an authenticator for method FORM 2002-02-27 15:49:20 ContextListener: contextInitialized() 2002-02-27 15:49:20 SessionListener: contextInitialized() 2002-02-27 15:49:20 ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@765a16') 2002-02-27 15:49:20 StandardWrapper[/examples:default]: Loading container servlet default 2002-02-27 15:49:21 default: init 2002-02-27 15:49:21 StandardWrapper[/examples:invoker]: Loading container servlet invoker 2002-02-27 15:49:21 invoker: init 2002-02-27 15:49:21 jsp: init error_log (Apache) Wed Feb 27 16:01:38 2002] [info] created shared memory segment #16768 [Wed Feb 27 16:01:38 2002] [notice] Apache/1.3.22 (Unix) (Conectiva/Linux) PHP/4.1.1 configured -- resuming normal operations [Wed Feb 27 16:01:38 2002] [info] Server built: Oct 18 2001 13:34:44 [Wed Feb 27 16:01:38 2002] [notice] Accept mutex: sysvsem (Default: sysvsem) The entries that you mentioned in server.xml are: Service name="Tomcat-Apache"> Connector className="org.apache.catalina.connector.warp.WarpConnector" port="8008" minProcessors="5" maxProcessors="75" enableLookups="true" appBase="webapps" acceptCount="10" debug="0"/> !-- Replace "localhost" with what your Apache "ServerName" is set to --> Engine className="org.apache.catalina.connector.warp.WarpEngine" name="myServ" debug="0" appBase="webapps"> !-- Global logger unless overridden at lower levels --> Logger className="org.apache.catalina.logger.FileLogger" prefix="apache_log." suffix=".txt" timestamp="true"/> !-- Because this Realm is here, an instance will be shared globally --> Realm className="org.apache.catalina.realm.MemoryRealm" /> /Engine> /Service> Thank you for your comments. Cleber John Wadkin wrote: Your interpretation of the problem seems accurate. catalina.out and apache's error log should tell you more. Does engine> in Service name="Tomcat_Apache"> in server.xml have a host> nested within it and the examples context defined within the host>? John -Original Message- From: Cleber Hostalcio de Melo [mailto:[EMAIL PROTECTED]] Sent: 27 February 2002 16:25 To: [EMAIL PROTECTED] Subject: Tomcat x Apache Hi, I have linux (kernel 2.4.5), apache 1.3.19 and Tomacat 4.0.2 Tomcat are working well with the url: http://Myserv:tomcat_port/examples/jsp/index.html But when I try to access this application from Apache with the URL: http://Myserv/examples/jsp/index.html I receive the message in my browser: Forbidden You don't have permission to access /examples/jsp/index.html on this server. The corresponding entries in the Apache logs are: httpd/logs/access.log: "GET /examples/jsp/index.html HTTP/1.0" 403 301 httpd/logs/error.log: [error] [client xxx.xxx.xxx.x] (2)No such file or directory: cannot read directory for multi: /examples/jsp/ There is no entry in the Tomcat logs which looks like that Apache is not even trying to connect to Tomcat. My configuration files are: httpd.com . ServerName myServer ServerType standalone ServerRoot /etc/httpd .. LoadModule LoadModule webapp_module libexec/mod_webapp-1.0-eapi.so .. AddModule AddModule mod_webapp.c .. DocumentRoot "/home/myDocs" .. WebAppConnection Tomcat_Apache warp localhost:8008 WebAppDeploy examples Tomcat_Apache /examples/ server.xml . Service name="Tomcat_Apache"> Connector className="org.apache.catalina.connector.warp.WarpConnector" port="8008" minProcessors="5" maxProcessors="75" enableLookups="true" acceptCount="10" debug="0"/> !-- Replace "localhost" with what your Apache "ServerName" is set to --> Engine className="org.apache.catalina.connector.warp.WarpEngine" name="localhost" debug="0" appBase="webapps"> . /Engine> /Service> Anyone has any idea what could be the problem? Thanks. -- To unsubscribe: mailto:[EMAIL PROTECTED]> For additional commands: mailto:[EMAIL PROTECTED]> Troubles with the list: mailto:[EMAIL PROTECTED]> -- To unsubscribe: mailto:[EMAIL PROTECTED]> For additional commands: mailto:[EMAIL PROTECTED]> Troubles with the list: mailto:[EMAIL PROTECTED]> -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: REPOST: Please HELP!: URL Mapping Problems in servlet
I think that this approach is very close to what you want. Instead of lastIndexOf(/) you could do lastIndexOf (or indexOf) getServletName. Another alternative would be to use lastIndexOf(getPathInfo()) on the request URI. As to why the methods return what they do, its because the spec says so. Randy -Original Message- From: Mark B. Indictor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:03 PM To: 'Tomcat Users List' Subject: RE: REPOST: Please HELP!: URL Mapping Problems in servlet I appreciate the help, but this still does not solve my problem. You see, I need to handle URLs of the following forms: http://hostname/context/servlet/xxx as well as: http://hostname/context/servlet With your suggestion, I would be truncating these to: http://hostname/context/servlet and http://hostname/context Respectively. The first behavior is desirable, the second is not! What I do not understand is why Apache and Tomcat conspire hide the 'context' element of the URL. I either need to find a way to isolate and retrieve the full path to the servlet (/context/servlet) or I need to find a way to set up Apache and Tomcat to recognize a URL that does not contain a context component (/servlet). Why does getServletPath() not return the whole path to the servlet, including its context, if this information is, in fact, required to access the servlet with a URL!? Any suggestions? Thanks! - mbi == Mark Indictor -- Site2 Corporation [EMAIL PROTECTED] http://www.site2.com Phone:(310)451-3472 FAX:(240)220-6341 http://keyserver.pgp.com/pks/lookup?op=getsearch=0x8959F966 == -Original Message- From: Cox, Charlie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 10:44 AM To: 'Tomcat Users List' Subject: RE: REPOST: Please HELP!: URL Mapping Problems in servlet I don't think there is a function to get the full request path without the final page/servlet name. This should get what you need: req.getRequestURI().substring(0,req.getRequestURI().lastIndexOf(/)) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: managerapp with virtual domain
You have to deploy the manager context separately for each virtual host. Add this in server.xml, for each Host/Host block: !-- Tomcat Manager Context -- Context path=/manager docBase=/usr/local/tomcat/webapps/manager debug=0 privileged=true / -August --- Jean-Luc BEAUDET [EMAIL PROTECTED] wrote: Daniel A. Melo a écrit : Hi all, anyone know how to configure the manager app to work on virtual domains??? []´s Daniel A. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]Coul Could yu please be more explicit ? What do yu intend to do ? Jean-Luc B -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: REPOST: Please HELP!: URL Mapping Problems in servlet
Thanks, Randy. I think this will work. I thought of doing this, but thought that there must be an existing method for extracting this information. This solution, though workable, seems like a kludge. Is Apache's concept of 'contexts' spec'd? If so, doesn't it seem logical that there should be a way of determining what the 'context' is separate from the 'servlet', and visa versa, without resorting to custom string parsing? Anyway, back to work. Again, thank you for your help. - mbi == Mark Indictor -- Site2 Corporation [EMAIL PROTECTED] http://www.site2.com Phone:(310)451-3472 FAX:(240)220-6341 http://keyserver.pgp.com/pks/lookup?op=getsearch=0x8959F966 == -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 10:33 AM To: 'Tomcat Users List' Subject: RE: REPOST: Please HELP!: URL Mapping Problems in servlet I think that this approach is very close to what you want. Instead of lastIndexOf(/) you could do lastIndexOf (or indexOf) getServletName. Another alternative would be to use lastIndexOf(getPathInfo()) on the request URI. As to why the methods return what they do, its because the spec says so. Randy
RE: What does manager do anyway?
I now think that session data was wiped on a reload only if I made changes to one of the beans. It makes sense: If they get serialized at TC shutdown, but startup detects a different class signature, they can't be re-serialized... --- August Detlefsen [EMAIL PROTECTED] wrote: Yes. On login, a bean is put in the user's session with name, whether the user is authenticated, and some other tracking data and it is indeed Serializable. --- Cox, Charlie [EMAIL PROTECTED] wrote: -Original Message- From: August Detlefsen [mailto:[EMAIL PROTECTED]] Sent: Monday, February 25, 2002 7:24 PM To: Tomcat Users List Subject: Re: What does manager do anyway? Thanks Craig, Glad to know I can add a servlet without having to restart the entire server! I'll try a redeploy for the next servlet I add. As for the sessions, prior to installing this servlet, they were in fact getting dropped each time I reloaded with the manager. I was forced to login again with every start-stop. Could this be because the webapp was strictly JSP, with no servlet component? that's odd because I don't have this problem. I put a String into the session during login and it stays after stop/start provided that my session didn't timeout. I use servlets, but it shouldn't matter because jsp's are also servlets. are your objects Serializable as Craig mentioned? Charlie --- Craig R. McClanahan [EMAIL PROTECTED] wrote: On Mon, 25 Feb 2002, August Detlefsen wrote: Date: Mon, 25 Feb 2002 15:24:31 -0800 (PST) From: August Detlefsen [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED], [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: What does manager do anyway? Can I use manager to pick up changes in my webapp's web.xml? I added a new servlet and tried stop-start via the manager and it was not picked up. Likewise with manager/reload. Do I have to do a full remove-install for it to pick up the changes? Yes. That's a current restriction of the way that an application reload is implemented (in org.apache.catalina.core.StandardContext), not of the manager webapp servlet itself. Also, isn't stopping and starting a context supposed to remove any active sessions in the context? No (and this works across shutting down and restarting Tomcat as well). As a matter of fact, if your session attributes are Serializable, they will get saved and restored as well. This is a tremendously helpful feature when you're debugging a webapp that takes multiple interactions to get to the page you're testing, you make a change, and don't want to take the time to navigate from the top of your application's tree again. Note, however, that this is a *Tomcat* feature, not anything required by the specs, so you cannot count on it on any other server. -August Craig -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Debugging JSPs and Servlets
For the quick and dirty approach, you can put System.out.println() statements in your code and find the output in: TOMCAT_HOME/logs/catalina.out --- Sriram Narayanan [EMAIL PROTECTED] wrote: 2/27/02 11:17:26 PM, Nitin Vira [EMAIL PROTECTED] wrote: Hello, I am trying to create an environment that will assist in debugging jsps, i think one of the basic ways to do debugging is through logging, I want to log various request coming in along with the request parameters, i checked the access loggs but they only logg GET request also it doesnt logg the parameters, is there anyway i can logg POST request too along with the request parameters, i can possibly use a filter to do it, will that be a right approach also can i configure a filter to run for all the servlets? Also is it possible to logg something like forwards to another page and including other pages, also if you have any other suggestions to add features that will assist in debugging that i can implement i will greatly appreciate it. Use Log4J. (http://jakarta.apache.org/log4j) Log4J has something called Logging Levels, e.g. DEBUG, ERROR, INFO etc... Let's say you have some 15 packages with some 10 classes in each. In each class, instantiate a Logger with the statement static Logger logger = Logger.getInstance(MyClass.class.getName()); Now within the class, write both DEBUG level statements and INFO level statements: e.g. public void someTask(String first, String second){ logger.debug(just entered the someTask method, args are + first + : + second); logger.info(about to calculate something); int x = calculate(); logger.debug(the calculation result was + x); } Now, DEBUG levels happen to be lower in importance than INFO levels. Log4J can be instructed on which level to log via a properties file. So, you can change log levels, or even disable loggin altogether via an external properties file. No changes to the code are required at all. Also, you can specify that the log outputs from a particular class should be redirected to one file, while all other logs could go to another file, or even a JDBC target. Thanks, Nitin Sriram _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Newbie resources
On Wednesday, February 27, 2002, at 12:57 PM, Sriram Narayanan wrote: 1. Read the documentation. There's really a whole lot of information given... I do read the docs, but (not meaning to step on toes here) their not always clear to those who may not know the terminology. For example... I'm just messing with taglibs right now... the Tag Documentation section of the docs for the UtilityTags Tag Library have a very brief description of the tag and attributes, but not one example. Yes, each little table has the raw data necessary, but simply showing... prefix:if predicate=%= theTest % do this if true /prefix:if ...would communicate much more... and more effectively. Another example, from the taglibs tutorial... under the Hello World Tag Handler, the word package is refered to in the text and code sample, but I can see no description of what package is and what I should put there when creating my own taglib. Or using the http://jakarta.apache... url as an example in places where it should point to the user's files; confusing because in some cases it must be the jakarta url (like in the DOCTYPE) and in some cases not. A better example url for cases when it's a client file would be something like http://location/of/your/file or something. I'm really not trying to complain, I just want to show maybe a different perspective on the supplied docs, and why I was looking for a newbie slant on the information. Just like it's hard for me to remember what it's like not to know HTML structure inside and out, it may be hard for those making the docs to realize what someone coming in with a Tomcat tabla rasa. With best intentions and a desire to learn more, Ken Martin -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
trouble in untar tomcat binary file.
Hi, there, I am having trouble in untar tomcat binary file. I downloaded both jakarta-tomcat-4.0.2-LE-jdk14.tar.gz and jakarta-tomcat-4.0.2.tar.gz. However, when I tried to untar them, I got following error message: tar: directory checksum error What is the problem? BTW, I am using an ultra-sparc I box running solaris 2.7. Thanks for help. Cheng Yan -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: trouble in untar tomcat binary file.
You need GNU tar, not the TAR that comes from Sun. Randy -Original Message- From: Cheng Yan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 4:23 PM To: [EMAIL PROTECTED] Subject: trouble in untar tomcat binary file. Hi, there, I am having trouble in untar tomcat binary file. I downloaded both jakarta-tomcat-4.0.2-LE-jdk14.tar.gz and jakarta-tomcat-4.0.2.tar.gz. However, when I tried to untar them, I got following error message: tar: directory checksum error What is the problem? BTW, I am using an ultra-sparc I box running solaris 2.7. Thanks for help. Cheng Yan -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: TC trouble in untar tomcat binary file.
Use gnu-tar.. (often 'gtar'on many systems) sun's tar can't handle the filenames.. On Wed, Feb 27, 2002 at 04:23:22PM -0500, Cheng Yan wrote: Hi, there, I am having trouble in untar tomcat binary file. I downloaded both jakarta-tomcat-4.0.2-LE-jdk14.tar.gz and jakarta-tomcat-4.0.2.tar.gz. However, when I tried to untar them, I got following error message: tar: directory checksum error What is the problem? BTW, I am using an ultra-sparc I box running solaris 2.7. Thanks for help. Cheng Yan -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Kirby Vandivort Theoretical Biophysics Group Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: trouble in untar tomcat binary file.
Hi , There is a diff between Solaris tar GNU tar. So if it is downloaded completly through binary mode, u can download GNU tar and untar it using that.Hope it helps. Karthik -Original Message- From: Cheng Yan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:23 PM To: [EMAIL PROTECTED] Subject: trouble in untar tomcat binary file. Hi, there, I am having trouble in untar tomcat binary file. I downloaded both jakarta-tomcat-4.0.2-LE-jdk14.tar.gz and jakarta-tomcat-4.0.2.tar.gz. However, when I tried to untar them, I got following error message: tar: directory checksum error What is the problem? BTW, I am using an ultra-sparc I box running solaris 2.7. Thanks for help. Cheng Yan -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Custom 404 Page
How do I set an ErrorDocument-like directive in Tomcat? I have a custom 404 page setup in my Apache httpd.conf file, but when users enter a URL for a file not on my website they get the standard Apache-Tomcat 404 page. For example, instead of going to /index.html (which is a valid file), I type /ind (which is not a valid file). I don't think this is the same as the welcome file since I think that only refers to no filename being supplied. In my case an invalid filename is supplied. I'm running Apache 1.3.20 and Tomcat 4.0.2. Thanks, Brian -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: mySQL/JDBC/Tomcat4 documentation
Right at line 2 in your code is were we are having trouble. Apparenlty our code is written the same way, but it still doesn't seem like the JDBC driver has loaded: java.sql.SQLException: org.gjt.mm.mysql.Driver The driver is in the WEB-INF/lib/ directory. Is there a config file that needs to allow permissions for this? -Original Message- From: DingHui [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 6:34 PM To: Tomcat Users List Subject: Re: mySQL/JDBC/Tomcat4 documentation The following code demonstrate how to initilize MYSQL JDBC driver. try { Class.forName(org.gjt.mm.mysql.Driver); } catch (ClassNotFoundException e) { System.out.println(e); } try { Connection con = DriverManager.getConnection(jdbc:mysql://localhost/mydata, username, password); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(SELECT NAME FROM TEST); // Display the SQL Results while(rs.next()) { System.out.println(rs.getString(NAME)); } // Make sure our database resources are released rs.close(); stmt.close(); con.close(); }catch (SQLException se) { // Inform user of any SQL errors System.out.println(SQL Exception: + se.getMessage()); se.printStackTrace(System.out); } - Original Message - From: Steve Madonna [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 8:38 AM Subject: mySQL/JDBC/Tomcat4 documentation Anyone know were I can get some documentation on installing mm.mysql-2.0.4-bin.jar file? I keep getting that not sutible driver error everyone keeps talking about. Thx in advance. -Steve
tomcat 4.0 and soap 2.2
Hello, Will Tomcat 4.0 work with soap 2.2? And also, will tomcat 4.0 work with jdk 1.4? thanks in advance!
RE: tomcat 4.0 and soap 2.2
sure hmm no well tomcat 4.02 I think works with jdk 1.4. both work with soap 2.2. hope it helps [EMAIL PROTECTED] -Original Message- From: Joo Park [mailto:[EMAIL PROTECTED]] Sent: 27. febrúar 2002 22:02 To: [EMAIL PROTECTED] Subject: tomcat 4.0 and soap 2.2 Hello, Will Tomcat 4.0 work with soap 2.2? And also, will tomcat 4.0 work with jdk 1.4? thanks in advance! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: mySQL/JDBC/Tomcat4 documentation
Sometimes with certain JDBC Drivers you must do a Class.forName(driver).newInstance() for it to load properly. Brian -Original Message- From: Steve Madonna [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:04 PM To: 'Tomcat Users List' Subject: RE: mySQL/JDBC/Tomcat4 documentation Right at line 2 in your code is were we are having trouble. Apparenlty our code is written the same way, but it still doesn't seem like the JDBC driver has loaded: java.sql.SQLException: org.gjt.mm.mysql.Driver The driver is in the WEB-INF/lib/ directory. Is there a config file that needs to allow permissions for this? -Original Message- From: DingHui [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 6:34 PM To: Tomcat Users List Subject: Re: mySQL/JDBC/Tomcat4 documentation The following code demonstrate how to initilize MYSQL JDBC driver. try { Class.forName(org.gjt.mm.mysql.Driver); } catch (ClassNotFoundException e) { System.out.println(e); } try { Connection con = DriverManager.getConnection(jdbc:mysql://localhost/mydata, username, password); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(SELECT NAME FROM TEST); // Display the SQL Results while(rs.next()) { System.out.println(rs.getString(NAME)); } // Make sure our database resources are released rs.close(); stmt.close(); con.close(); }catch (SQLException se) { // Inform user of any SQL errors System.out.println(SQL Exception: + se.getMessage()); se.printStackTrace(System.out); } - Original Message - From: Steve Madonna [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 8:38 AM Subject: mySQL/JDBC/Tomcat4 documentation Anyone know were I can get some documentation on installing mm.mysql-2.0.4-bin.jar file? I keep getting that not sutible driver error everyone keeps talking about. Thx in advance. -Steve -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: mySQL/JDBC/Tomcat4 documentation
try { Class.forName(org.gjt.mm.mysql.Driver); } catch (ClassNotFoundException e) { System.out.println(e); } is not a good way of doing it, if you driver is in the WEB-INF/lib directory you want to do Driver d = Thread.currentThread().getContextClassLoader().loadClass(org.gjt.mm.mysql.D river).newInstance(); d.getConnection(bla bla bla) or you can do Driver d = this.getClass().getClassLoader().loadClass(org.gjt.mm.mysql.Driver).newIns tance(); d.getConnection(bla bla bla) or Thread.currentThread().getContextClassLoader().loadClass(org.gjt.mm.mysql.D river); DriverManager.getConnection(bla bla bla) Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net -Original Message- From: Steve Madonna [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 2:04 PM To: 'Tomcat Users List' Subject: RE: mySQL/JDBC/Tomcat4 documentation Right at line 2 in your code is were we are having trouble. Apparenlty our code is written the same way, but it still doesn't seem like the JDBC driver has loaded: java.sql.SQLException: org.gjt.mm.mysql.Driver The driver is in the WEB-INF/lib/ directory. Is there a config file that needs to allow permissions for this? -Original Message- From: DingHui [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 6:34 PM To: Tomcat Users List Subject: Re: mySQL/JDBC/Tomcat4 documentation The following code demonstrate how to initilize MYSQL JDBC driver. try { Class.forName(org.gjt.mm.mysql.Driver); } catch (ClassNotFoundException e) { System.out.println(e); } try { Connection con = DriverManager.getConnection(jdbc:mysql://localhost/mydata, username, password); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(SELECT NAME FROM TEST); // Display the SQL Results while(rs.next()) { System.out.println(rs.getString(NAME)); } // Make sure our database resources are released rs.close(); stmt.close(); con.close(); }catch (SQLException se) { // Inform user of any SQL errors System.out.println(SQL Exception: + se.getMessage()); se.printStackTrace(System.out); } - Original Message - From: Steve Madonna [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 8:38 AM Subject: mySQL/JDBC/Tomcat4 documentation Anyone know were I can get some documentation on installing mm.mysql-2.0.4-bin.jar file? I keep getting that not sutible driver error everyone keeps talking about. Thx in advance. -Steve -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: trouble in untar tomcat binary file.
Thanks for the advices. However, I can not find gnu tar utility. I went to http://www.gnu.org/directory/index.html and did a search for gtar, gnu-tar and gnu tar. But I can not find anything similar. Could some one tell me where to get this utility? Sorry for asking such a dumb question. Thanks. Cheng Yan - Original Message - From: Karthikeyan.K.V [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Cheng Yan [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 4:26 PM Subject: RE: trouble in untar tomcat binary file. Hi , There is a diff between Solaris tar GNU tar. So if it is downloaded completly through binary mode, u can download GNU tar and untar it using that.Hope it helps. Karthik -Original Message- From: Cheng Yan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 3:23 PM To: [EMAIL PROTECTED] Subject: trouble in untar tomcat binary file. Hi, there, I am having trouble in untar tomcat binary file. I downloaded both jakarta-tomcat-4.0.2-LE-jdk14.tar.gz and jakarta-tomcat-4.0.2.tar.gz. However, when I tried to untar them, I got following error message: tar: directory checksum error What is the problem? BTW, I am using an ultra-sparc I box running solaris 2.7. Thanks for help. Cheng Yan -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Newbee Question...
I have recently installed Tomcat on Windows 2000. I get the success page at :8080/index.html, and all of the servlet examples work. However, the JSP examples do not work. They all generate an internal error 500 Is there a separate .config (or something) that I need to modify so that the complete installation (including JSP examples) will work? Can anyone point me to where I've gone wrong? Thanks in advance. William W. Hurley II NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. To contact our email administrator directly, send to [EMAIL PROTECTED] Thank you.