Re: 403 forbidden in tomcat-apache
Parvez, I start apache and tomcat as root,and include jara's path and tomcat's classpath ,you know, into .bash_profile. By the way,my mod_jk.so does not work.I use apache_1.3.12 and tomcat3.2beta8. How do you configure Apache for DSO? .configure --enable-module=so? I had an error with ./apachectl configtest: API module structure 'jk_module' in file /usr/local/apache_1.3.12/libexec/mod_jk.so is garbled- perhaps this is not an Apache module DSO? Thanks in advance Hiroshi Kasamatsu Parvez wrote: thanks, i got the mod_jk.so working now on my machine. but somehow i cannot get it working on the other machine. on my machine i have ... 1. apache user parvez:parvez 2. permisions to htdocs - parvez:parvez 3. permissions to jsp/servlets - parvez:parvez and it works but on the other machine 1. apache user nobody:nobody 2. permisions to htdocs - admin:admin 3. permissions to jsp/servlets - admin:admin and apache gives and error ..."403 Forbidden" where am i going wrong... also do i have to start tomcat as root. parvez And Then NSB)Hiroshi Kasamatsu wrote . There seems to be no mod_jk.so for Tomcat3.2.1. If you do'nt mind,better to use Tomcat3.2 beta version. You cannot access directly. You try like this. 1.access to http://jakarta.apache.org/ 2.click Binaries on Download area 3.click Tomcat3.x on Nightly Builds 4.click Parent Directory 5.click arcihves/ 6.click link you want 7.click bin/ 8.click linux for linux or win32 for windows 9.click i386 10.click mod_jk.so Parvez wrote: i cannot find /src/native/apache to compile mod_jk.so i have looked into tomcat 3.2.1 distribution, everywhere. where can i find it. parvez And Then NSB)Hiroshi Kasamatsu wrote . For tomcat 3.2 or up,mod_jk.so is needed.You should download, copy it into your apache directory/libexec and include "your apache directory/conf/mod_jk.conf-auto" into the last line of httpd.conf.The latter is automatically created when Tomcat is exclusively initiated on port 8080. To check,http://localhost/examples is pointed to browser.In Tomcat and apache,port 8080 is't used. Parvez wrote: hi, i have installed tomcat 3.2.1, with apache 1.3.12 on a linux machine. it works perfectly fine on port 8080, but when i include it with apache conf (i.e. tomcat-apache.conf) and try to access the same jsp/servlet file, it gives 403 forbidden error. my http user in apache is "nobody:nobody" and my htdocs is conrolled by "admin". can someone tell me, where the problem is? thanks in advance. parvez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
ERROR SSL
The Tomcart Services is started and in http(port8081) respond When you call https(port443) return ERROR ContextManager: IOException reading request, ignored - javax.net.ssl.SSLException: Unrecognized SSL handshake - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Apache + jni
Hi all! I´ve been testing Apache+tomcat out-process (mod-jk: ajp12, ajp13) with no problems but now I´m trying to use JNI in-process and I cannot get it serving servlets. I think that the problem is with the jni connector. I´ve read in the documentation that it needs the jni_connect.dll. That´s Ok if you are running windows because it´s already compiled. But there is not even a makefile for linux. I´ve made one and got the jni_connect.so compiled but it doesn´t work either. This is part of my jni_server.xml !-- JNI connector -- Connector className="org.apache.tomcat.service.JNIEndpointConnector" Parameter name="native_lib" value="/usr/local/src/jakarta-tomcat/src/native/jni_connect/jni_connect.so"/ /Connector I´m using RedHat 6.2 IBMJava2-13 jvm apache 1.3.14 + modssl + php4 with DSO support and shared core tomcat 3.2.1 (I´ve tried 3.3 as well) Any idea? I haven´t got any problems to get ajp12 or ajp13 running! Thanks in advance! Get free email and a permanent address at http://www.netaddress.com/?N=1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Pl clear this
The answer is all good news :-) Tomcat is licenced under the Apache Software Licence. You can find a copy of this licence in the tomcat version you just downloaded - it is in a file called "LICENCE". Basically, though, the licence says that tomcat is totally free for any use at all. Tomcat is not a "commercial" product, in that no-one is trying to make money out of it by selling it. That doesn't mean it isn't "commercial-quality". In fact (my opinion), apache products tend to be as good as or better than their commercial rivals. Employees of companies like Sun, IBM, and others have contributed to Apache products. There is no "Enterprise" version - the version you downloaded is the complete product. There is no limit on the number of users, or anything like that. And if you want to download the source code for tomcat, that's available too. You can modify the source code, build tomcat into your commercial product, whatever you want, at no cost. The only requirement is that if you use part or all of tomcat (or any other apache product) in your system, you include the following statement somewhere: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Note that all the above is *my interpretation* of the licence agreement. See the real licence agreement (bundled with the tomcat download) for the actual details of the licence. -Original Message- From: Narayanan [SMTP:[EMAIL PROTECTED]] Sent: Friday, December 29, 2000 7:45 AM To: [EMAIL PROTECTED] Subject: Pl clear this Hi All I have downloaded the latest version of tomcat and using tha t. 1. Is this the licensed Version .? 2. is there any Enterprise Vesion that has to be purchased . ? 3. How many Users this will support ?. Pl if i get the answers for this it will be very useful. Thanks in advanvce..New Year Wishes to all. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
No Subject
Good Morning I'm Pastore Lorenzo I need a Help for use Tomcat SSL Direct. I have configured my Tomcap for use SSL and I certificate it ( using internet manual page http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-ssl-howto.html ). And for here ALL OK But if I open tomcat by Netscape in HTTP on port 8081 the server respond while if I open HTTPS on port 8443 the browser respond "you have request a secure document " and when I confirm the message the browser crashing ( it is bloking ). ON SERVER RETURN THIS ERROR ContextManager: IOException reading request, ignored - javax.net.ssl.SSLException: Unrecognized SSL handshake. CAN YOU HELP ME PLEASE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Reload classes
Hi all, I have set our database connection at application scope. All is OK now. However, if one of the servlet class is changed and then auto-reloaded, the class will no longer get the connection--- when I get the connection (in object type) and try to cast it back to connection object, the classcastexception will happen I have checked the object is not null, but I just cannot cast it back to connection... Thanks in Advanced!!! Penny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: always a download dialogbox opened.
Are you trying to serve the .isa file with Tomcat? If so, you need to set the MIME type for that extension in the web.xml file for that context - Tomcat doesn't know what its supposed to be (and neither do I, but you should be able to check the IIS config). If you are trying to serve .isa files with IIS, then this questions doesn't below on this list - contact Microsoft for Technical Support. Randy -Original Message- From: Zhao NaiQi [mailto:[EMAIL PROTECTED]] Sent: Friday, December 29, 2000 2:20 AM To: [EMAIL PROTECTED] Subject: always a download dialogbox opened. Hello, i have allready installed Tomcat 3.2 with IIS5.0 on my machine using Windows 2000 professional. also i have set the ISAPI filters in IIS (using isapi_redirect.dll from jakarta.apache.org). It's working very well (.html, .asp and .jsp files). but the .isa (IIS ISAPI file, we created it using VC++6.0 ISAPI Extension Wizard) file is not working. always a download dialogbox opened. does the ISAPI file conflict with Tomcat 3.2? does anyone know how to solve this problem? I need help! Zhao Nai Qi DAIICHI Media Pte Ltd 21 Kim Keat Road, #04-01 Singapore 328805 Fax: (65) 256-5922 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.daiichimedia.com http://www.daiichimedia.com http://www.moreatonce.com http://www.moreatonce.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Need help with isapi_redirect.dll and PWS
I am running the PWS on my desktop machine. I tried accessing the example pages using both localhost format as in http://localhost/examples/jsp/num/numguess.jsp and the IP address format as in http://135.17.204.72/examples/jsp/num/numguess.jsp This was tried in both Netscape and IE browsers. Thanks, Keith -Original Message- From: Mohammed Nasr Shalaby [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 28, 2000 5:52 PM To: Subject: Re: Need help with isapi_redirect.dll and PWS Please tell me what do you write in your browser when you try to test it "Hawkins, Keith (Keith)" wrote: Hello, I have been struggling with getting the isapi_redirect.dll to work with IIS/PWS. I have checked and rechecked the steps specified in the Tomcat IIS HowTo document by Gal Shachor. I keep getting 404-Not Found errors even though the redirector is recognizing the URL as one that matches the set of URLs it should handle. The entries in the PWS log file look as follows: 14:54:50 127.0.0.1 GET +/jakarta/isapi_redirect.dll 404 14:55:14 192.11.221.102 GET +/jakarta/isapi_redirect.dll 404 14:58:20 192.11.221.101 GET +/jakarta/isapi_redirect.dll 404 15:20:06 192.11.221.101 GET +/jakarta/isapi_redirect.dll 404 The entries from the isapi.log file look as follows: [jk_isapi_plugin.c (408)]: HttpFilterProc started [jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of /examples/jsp/index.html [jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a match ajp12 [jk_isapi_plugin.c (439)]: HttpFilterProc [/examples/jsp/index.html] is a servlet url - should redirect to ajp12 [jk_isapi_plugin.c (461)]: HttpFilterProc check if [/examples/jsp/index.html] is points to the web-inf directory So it looks like the filter recognizes the URL as one that it should process, but the ajp12 worker never seems to get contacted. The 404 error is returned right away. The Tomcat process seems to be running fine since I can successfully access the sample jsp pages using localhost:8080 The breakdown seems to be in getting the redirection to the ajp12 worker on port 8007 and back to the PWS server when PWS is used as the web server. Any help would be greatly appreciated. Thanks, Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Tomcat and IIS
TomcCat does run under IIS, Please refer to the list archive and search for messages with subject "Installing tomcat on IIS" "Tomcat IIS"...Other subject will apply too. Nasr [EMAIL PROTECTED] wrote: Hi Mr. Tomcat, I am just installing tomcat into my Win2000 machine. and follow the installation guide as provided. However, I can't get it up and running. My question is does Tomcat run under IIS 5.0/Win2000 platform? thanks and best regards,spl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Upload problem: bug at Multipartrequest when deals with mixed parameters types
-BEGIN PGP SIGNED MESSAGE- Hi everybody, i dont know if somebody can help me! I didnt get sucess to solve this problem. i have a doubt about an error message which came from TomCat, as listed below.There is a servlet, named StarServletnew and showed at end of this email, which instances a Bean, named FormBean, which uses some parameters that comes from a multipart/form-data form. This servlet receives parameters, like text fields, and a file stream.I am using Oreilly's package(Multipartrequest class) to get all parameters and file contents, as you can see below. However, i always get succeed with the file uploading process, but i always get a failure when i try to get the parameters contents! I am using TOMCAT 3.1 and NT4.0. T O M C A T M E S S A G E E R R O R Error: 500 Location: /examples/servlet/StarServletnew Internal Servlet Error: java.lang.NoSuchMethodError: FormBean: method (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lja va/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/l ang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/ Stri at StarServletnew.doPost(StarServletnew.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597) at org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java, Compiled Code) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java, Compiled Code) at java.lang.Thread.run(Unknown Source) M A I N S E R V L E T import java.io.*; import java.util.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; import com.oreilly.servlet.*; /** Problemas - - - sempre o cookie e diferente - rever o que aparece como valor do cookie - - nao consegue receber getAttribute **/ public class StarServletnew extends HttpServlet { private boolean bcookie=false; private boolean bsessao=false; private FormBean Fb; private ErrorBean Eb; private String cookName = "cookstar"; public static final int segundosanual = 60*60*24*365; private String nome; private String nomeart; private String sexo; private String profissao; private String registro; private String dia; private String mes; private String ano; private String email; private String end; private String compl; private String bairro; private String cidade; private String estado; private String cursomoda; private String cursoteatro; private String cursomusica; private String cursomodelo; private String escolaridade; private String linguas; private String esportes; private String calcado; private String danca; private String alturamts; private String alturacms; private String peso; private String foto; private String olhos; //Método Final public void destroy(){ System.out.println("Final do StarServlet"); } // Controle do SERVLET public void doPost ( HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { // Cria nomes para match com nome dos parametros String p01 = "nome"; String p02 = "nomeart"; String p03 = "sexo"; String p04 = "dia"; String p05 = "mes"; String p06 = "ano"; String p07 = "profissao"; String p08 = "registro"; String p09 = "end"; String p10 = "compl"; String p11 = "bairro"; String p12 = "cidade"; String p13 = "estado"; String p14 = "email"; String p15 = "cursomoda"; String p16 = "cursoteatro"; String p17 = "cursomusica"; String p18 = "cursomodelo"; String p19 = "esportes"; String p20 = "danca"; String p21 = "escolaridade";
Re: Upload problem: bug at Multipartrequest when deals with mixed parameters types
Thank you for your feedback. Your feedback will be read by an engineer in the JavaServer Team, and entered into our system as a bug or feature request, if appropriate. We do not perform sales or technical support from this address. This is worth repeating: you will not receive any additional mail from this address, unless we have questions on how to reproduce your bug, or implement your feature. Please contact one of our other support channels (below) if you require support. For information on running servlets in any webserver, check here: http://jserv.javasoft.com/products/java-server/servlets/environments.html For answers to commonly asked questions, check here: http://jserv.javasoft.com/products/java-server/faq/webserver.html To place your bug report directly into our database, you may enter your bug here: http://java.sun.com/cgi-bin/bugreport.cgi For licensing, sales and schedule information, please contact 1-888-THEJAVA. If outside the US, please dial 1-(512)434-1591 You may directly purchase the JavaWebServer from Javasoft's main website http://www.javasoft.com/ If you have purchased a JavaServer product and require technical support, please contact 407-531-4475. For more discussion of the JavaWebServer, and other JavaServer products, please consider joining the Jserv-Interest mailling list. You may subscribe to the mailing list by sending an email to: [EMAIL PROTECTED] with the _body_ of the message containing the line SUBSCRIBE JSERV-INTEREST Full-Name-Here where Full-Name-Here is your name. There is an additional mailing list solely for Apache JSDK issues - further information on this list can be found at http://java.apache.org/ If being on a mailing list is not something you wish to do, you may also discuss the JavaWebServer on the Usenet newsgroup comp.infosystems.www.servers.misc. Discussions of programming Java Servlets, and server side programming in general, are carried out on the Usenet newsgroup comp.lang.java.programmer. Thank you for your time and input. Jim Driscoll JavaSoft - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: 403 forbidden in tomcat-apache
Hi, Parvez. I had this problem recently too. The problem was that, since Apache was run as nobody, permissions had to be granted to "others" for the _entire_ path of the application's directory. So, if your application is set to run out of /home/parvez/mywebapp/htdocs for example, you have to set each of those directories to be readable (I think that's all you need - possibly executable as well though) by others. In my case, I just set permissions on the directory at the end of the path, but I had to go through and also set permissions on my user directory which I had overlooked. I hope that this does it for you. Good luck... -Jeff [EMAIL PROTECTED] on 12/29/2000 01:13:37 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Re: 403 forbidden in tomcat-apache thanks, i got the mod_jk.so working now on my machine. but somehow i cannot get it working on the other machine. on my machine i have ... 1. apache user parvez:parvez 2. permisions to htdocs - parvez:parvez 3. permissions to jsp/servlets - parvez:parvez and it works but on the other machine 1. apache user nobody:nobody 2. permisions to htdocs - admin:admin 3. permissions to jsp/servlets - admin:admin and apache gives and error ..."403 Forbidden" where am i going wrong... also do i have to start tomcat as root. parvez And Then NSB)Hiroshi Kasamatsu wrote . There seems to be no mod_jk.so for Tomcat3.2.1. If you do'nt mind,better to use Tomcat3.2 beta version. You cannot access directly. You try like this. 1.access to http://jakarta.apache.org/ 2.click Binaries on Download area 3.click Tomcat3.x on Nightly Builds 4.click Parent Directory 5.click arcihves/ 6.click link you want 7.click bin/ 8.click linux for linux or win32 for windows 9.click i386 10.click mod_jk.so Parvez wrote: i cannot find /src/native/apache to compile mod_jk.so i have looked into tomcat 3.2.1 distribution, everywhere. where can i find it. parvez And Then NSB)Hiroshi Kasamatsu wrote . For tomcat 3.2 or up,mod_jk.so is needed.You should download, copy it into your apache directory/libexec and include "your apache directory/conf/mod_jk.conf-auto" into the last line of httpd.conf.The latter is automatically created when Tomcat is exclusively initiated on port 8080. To check,http://localhost/examples is pointed to browser.In Tomcat and apache,port 8080 is't used. Parvez wrote: hi, i have installed tomcat 3.2.1, with apache 1.3.12 on a linux machine. it works perfectly fine on port 8080, but when i include it with apache conf (i.e. tomcat-apache.conf) and try to access the same jsp/servlet file, it gives 403 forbidden error. my http user in apache is "nobody:nobody" and my htdocs is conrolled by "admin". can someone tell me, where the problem is? thanks in advance. parvez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
TOMCAT AND SSL HELP ME PLEASE
Hello I am trying to secure my webapp with SSL After generating a certificate with keytool , I don't understand this message starting tomcat 3.2 (on linux operating system) ./startup.sh Guessing TOMCAT_HOME from tomcat.sh to ./.. Setting TOMCAT_HOME to ./.. Using classpath: ./../lib/ant.jar:./../lib/jasper.jar:./../lib/jaxp.jar:./../lib/jcert.jar:./ ../lib/jnet.jar:./../lib/jsse.jar:./../lib/parser.jar:./../lib/servlet.jar:. /../lib/test:./../lib/webserver.jar:/usr/local/jdk1.2.2/bin/../lib/tools.jar - ContextManager: Adding context Ctx( /examples ) 2000-12-29 11:09:38 - ContextManager: Adding context Ctx( /directPanel ) Starting tomcat. Check logs/tomcat.log for error messages 2000-12-29 11:09:38 - ContextManager: Adding context Ctx( /admin ) 2000-12-29 11:09:38 - ContextManager: Adding context Ctx( ) 2000-12-29 11:09:38 - ContextManager: Adding context Ctx( /test ) FATAL:java.io.IOException: Keystore was tampered with, or password was incorrect java.io.IOException: Keystore was tampered with, or password was incorrect at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:742) at java.security.KeyStore.load(KeyStore.java:608) at org.apache.tomcat.net.SSLSocketFactory.initKeyStore(SSLSocketFactory.java:22 1) at org.apache.tomcat.net.SSLSocketFactory.initProxy(SSLSocketFactory.java:160) at org.apache.tomcat.net.SSLSocketFactory.createSocket(SSLSocketFactory.java:11 8) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java :239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: TOMCAT AND SSL HELP ME PLEASE
Khaled, The keystore has a password on it. Tomcat expects an entry called "tomcat" with a password of "changeit". This is explained in the server.xml comment. If you used a different password, do this: Connector className="org.apache.tomcat.service.PoolTcpConnector" Parameter name="handler" value="org.apache.tomcat.service.http.HttpConnectionHandler"/ Parameter name="port" value="8443"/ Parameter name="socketFactory" value="org.apache.tomcat.net.SSLSocketFactory" / Parameter name="keypass" value="my-password-here"/ /Connector The keystore also needs to be generated with the same version of jdk as the one on your deployment system. Regards, Dave - Original Message - From: "Khaled Ben Mohamed" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 29, 2000 8:46 AM Subject: TOMCAT AND SSL HELP ME PLEASE Hello I am trying to secure my webapp with SSL After generating a certificate with keytool , I don't understand this message starting tomcat 3.2 (on linux operating system) ./startup.sh Guessing TOMCAT_HOME from tomcat.sh to ./.. Setting TOMCAT_HOME to ./.. Using classpath: ./../lib/ant.jar:./../lib/jasper.jar:./../lib/jaxp.jar:./../lib/jcert.jar:./ ../lib/jnet.jar:./../lib/jsse.jar:./../lib/parser.jar:./../lib/servlet.jar:. /../lib/test:./../lib/webserver.jar:/usr/local/jdk1.2.2/bin/../lib/tools.jar - ContextManager: Adding context Ctx( /examples ) 2000-12-29 11:09:38 - ContextManager: Adding context Ctx( /directPanel ) Starting tomcat. Check logs/tomcat.log for error messages 2000-12-29 11:09:38 - ContextManager: Adding context Ctx( /admin ) 2000-12-29 11:09:38 - ContextManager: Adding context Ctx( ) 2000-12-29 11:09:38 - ContextManager: Adding context Ctx( /test ) FATAL:java.io.IOException: Keystore was tampered with, or password was incorrect java.io.IOException: Keystore was tampered with, or password was incorrect at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:742) at java.security.KeyStore.load(KeyStore.java:608) at org.apache.tomcat.net.SSLSocketFactory.initKeyStore(SSLSocketFactory.java:22 1) at org.apache.tomcat.net.SSLSocketFactory.initProxy(SSLSocketFactory.java:160) at org.apache.tomcat.net.SSLSocketFactory.createSocket(SSLSocketFactory.java:11 8) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java :239) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:527) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Tell me how to config Apache with DSO?
I don't think that Apache is the problem. It's mod_jk.so. Try compiling mod_jk.so from the sources. It's a pain, but it will probably clear up your problem. -Original Message- From: NSB)Hiroshi Kasamatsu [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 28, 2000 7:51 PM To: [EMAIL PROTECTED] Subject: Tell me how to config Apache with DSO? I had an error in command of./apachectl configtest: API module structure 'jk_module' in file /usr/local/apache_1.3.12/libexec/mod_jk.so is garbled- perhaps this is not an Apache module DSO? I want to cooperate Tomcat3.2 beta 8 with apache 1,3.12. I copied mod_jk.so into apache_1.3.12/libexec and append "Include /usr/local/jakarta-tomcat/conf/mod_jk.conf-auto" into httpd.conf. Apache is compiled with ./configure --enable-rule=SHARED_CORE --enable-module=so. Does not this work? Thanks in advance. Hiroshi Kasamatsu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
SIMPLE SIMPLE QUESTION ON RUNNING TOMCAT
Hi I need help to run tomcat I have create a simple HTML website with Javascript for validation. I have downloaded tomcat and tried running the "startup.bat" file. In the Dos window a message as follows appears. Out of Environment space Out of Environment space Out of Environment space Out of Environment space Using classpath: ..\classes;..\lib\xml.jar Then a seperate window pops up with 3 folders, (1)Classes (2)Packages and (3)Trustlib. Is Tomcat now running? Where do I place my HTML files? Ive tried placing them in \webapps folder and then typing in the laocation of the index.html file to the address bar of the browser, but it says "The page cannot be displayed" Someone please please help coz my head is wrecked. A big thanks in Advance. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: apache and WebApps and jsp's
--_=_NextPart_001_01C07013.E592DA30 Content-Type: text/plain; charset="ISO-8859-1" Randy, With your configuration of the consultants web application try the following: 1. keep the jsps in webapps/consultants/jsp/ 2. keep the servlet classes in webapps/consultants/WEB-INF/classes 3. invoke the servlets as http://localhost:port/consultants/servlet/servlet-name-from-web.xml 4. forward to the jsp in the servlet using code similar to dispatcher= request.getRequestDispatcher("/jsp/your-jsp.jsp"); //important not to have /consultants in the above line dispatcher.forward(request, response); This kind of setup works for me with Tomcat 3.1 standalone. Hope this helps, RK -Original Message- From: Randy Paries [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 26, 2000 10:43 PM To: tomcat-user Subject: apache and WebApps and jsp's I am close, but seem to be missing something. I am running apache with mod_jk i am using JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 I will try to be short in my description. I have a servlet that loads up a class and then redirects it to a JSP. This works fine, but I have to have the servlet in $TOMCAT_HOME/webapps/ROOT/WEB-INF/classes directory and the jsp in the $TOMCAT_HOME/webapps/examples/jsp/unitnet directory I would like to get them under the same directory structure. You would think this should be trivial. I tried to create a directory $TOMCAT_HOME/webapps/ROOT/WEB-INF/jsp it can't find the JSP. so I thought I need to create a new web-application. I followed the doc, and added to the server.xml file Context path="/consultants" docBase="webapps/consultants" defaultSessionTimeOut="30" isWARExpanded="true" isWARValidated="false" isInvokerEnabled="true" isWorkDirPersistent="false" reloadable="true" /Context I also modified the tomcat.policy. I get no errors , but apache does not seem to know how to find. I would really like to get a web-application to work with apache. Can anyone help me. Thier doesn't seem to be any doc on webapps and apache. Or if I can't do that how bout being able to put jsp's in the ROOT/WEB-INF/jsp and have it recognized. PS. is anyone else having problems search the archives? It tries to call http://mikal.org:/vestris/search.html but fails. thanks for any help --_=_NextPart_001_01C07013.E592DA30 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" HTML HEAD META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3DISO-8859-1" META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2652.35" TITLERE: apache and WebApps and jsp's/TITLE /HEAD BODY PFONT SIZE=3D2Randy,/FONT BRFONT SIZE=3D2With your configuration of the consultants web = application/FONT BRFONT SIZE=3D2try the following:/FONT BRFONT SIZE=3D21. keep the jsps in webapps/consultants/jsp//FONT BRFONT SIZE=3D22. keep the servlet classes in = webapps/consultants/WEB-INF/classes/FONT BRFONT SIZE=3D23. invoke the servlets as/FONT BRFONT = SIZE=3D2nbsp;http://localhost:lt;portgt;/consultants/servlet/lt;ser= vlet-name-from-web.xmlgt;/FONT BRFONT SIZE=3D24. forward to the jsp in the servlet using code = similar to/FONT BRFONT SIZE=3D2nbsp;dispatcher=3D = request.getRequestDispatcher(quot;/jsp/lt;your-jsp.jspgt;quot;);/FO= NT BRFONT SIZE=3D2//important not to have /consultants in the above = line/FONT BRFONT SIZE=3D2nbsp;dispatcher.forward(request, response);/FONT /P PFONT SIZE=3D2This kind of setup works for me with Tomcat 3.1 = standalone./FONT BRFONT SIZE=3D2Hope this helps,/FONT /P PFONT SIZE=3D2RK/FONT /P PFONT SIZE=3D2-Original Message-/FONT BRFONT SIZE=3D2From: Randy Paries [A = HREF=3D"mailto:[EMAIL PROTECTED]"mailto:[EMAIL PROTECTED]= /A]/FONT BRFONT SIZE=3D2Sent: Tuesday, December 26, 2000 10:43 PM/FONT BRFONT SIZE=3D2To: tomcat-user/FONT BRFONT SIZE=3D2Subject: apache and WebApps and jsp's/FONT /P BR BR PFONT SIZE=3D2I am close, but seem to be missing something./FONT BRFONT SIZE=3D2I am running apache with mod_jk/FONT BRFONT SIZE=3D2i am using/FONT BRFONT SIZE=3D2nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; = JkMountnbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /*.jsp ajp13/FONT BRFONT SIZE=3D2nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; = JkMountnbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /servlet/* ajp13/FONT BRFONT SIZE=3D2I will try to be short in my description./FONT /P PFONT SIZE=3D2I have a servlet that loads up a class and then = redirects it to a JSP./FONT BRFONT SIZE=3D2This works fine, but I have to have the servlet = in/FONT BRFONT SIZE=3D2$TOMCAT_HOME/webapps/ROOT/WEB-INF/classes = directory/FONT BRFONT SIZE=3D2and the jsp in the/FONT BRFONT SIZE=3D2$TOMCAT_HOME/webapps/examples/jsp/unitnet = directory/FONT /P PFONT SIZE=3D2I would like to get them under the same directory = structure. You would think/FONT BRFONT SIZE=3D2this
encodeRedirectURL in TC 3.1
Hi, I am using Tomcat 3.1 standalone on Intel Solaris 8 and JDK 1.3. When I send a response.encodeRredirectURL("page.jsp?Msg=This is a Message"), it does not convert the spaces in Msg=. I tested with Netscape 6 on Linux. I searched BugRat, but could not find a match. Is this a known Bug ? Thanks Shahed.
How to turn off auto-configuration files?
Howdy, I'm using tomcat 3.2.1 on linux, standalone (no apache), and I'd like to turn off the parts that are generating the auto-configuration files. When I start tomcat I get errors about the following: Error generating automatic apache configuration java.io.FileNotFoundException: /home/webmaster/conf/tomcat-apache.conf (No such file or directory) snip Error generating automatic IIS configuration java.io.FileNotFoundException: /home/webmaster/conf/iis_redirect.reg-auto (No such file or directory) snip Error generating automatic Netscape configuration java.io.FileNotFoundException: /home/webmaster/conf/obj.conf-auto (No such file or directory) These directories do not exist, and I do not want them to exist. I don't want it to generate any of these files, because I will not be using them, and don't want them lying around looking important. Anyway, my config files are stored in /etc/tomcat, not in the web-site root at /home/webmaster. Thanks DK -- 99 little bugs in the code, 99 bugs in the code, fix one bug, compile it again, 101 little bugs in the code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Concatenation problem in taglibs tag in JSPs
Title: Concatenation problem in taglibs tag in JSPs Hey there! We're currently in the process of upgrading to Tomcat 3.2.1 from 3.1.1 and have run into an interesting problem. We're using the Struts tag library in our JSP files. These are the lines we're using to call the .tld files from the jsp: %@ taglib uri=/homedir/WEB-INF/struts.tld prefix=struts % %@ taglib uri=/homedir/WEB-INF/struts-logic.tld prefix=logic % %@ taglib uri=/homedir/WEB-INF/struts-bean.tld prefix=bean % When we try to load these pages, however, we receive this error in the browser: Error: 500 Location: /store/categories/business/marketing/index.jsp Internal Servlet Error: org.apache.jasper.compiler.CompileException: /export/home/user/jakarta/tomcat/webapps/homedir/store/categories/business/marketing/index.jsp(4,0) Unable to open taglibrary /homedir/WEB-INF/struts.tld : /export/home/user/jakarta/tomcat/webapps/homedir/homedir/WEB-INF/struts.tld (No such file or directory) If you look at the location where it's trying to get the struts.tld file, you'll see that it's actually trying to get into homedir twice (/export/home/user/jakarta/tomcat/webapps/homedir/homedir/WEB-INF/struts.tld) though that's not the structure of the directory. The directory structure and this code worked just fine in 3.1.1. It's clear to me that this part of the path -- /homedir/WEB-INF/struts.tld -- is being called from the taglib tag in the JSP file. What about that first part of the path? Where does that get set? Is it just the docpath variable? How do I fix this duplication problem? Thanks! Rob Z.
Re: Pl clear this
Ramkumar Manoharan wrote: Yeah it is a licensed version.It is a freeware developed under open source GNU/GPL. Tomcat is licensed software, but it is *not* released under the GNU GPL license. Rather, it is released under the Apache Software License -- see the file "LICENSE" in the top level directory of your Tomcat distribution (or in the text at the top of every source file), or read the online copy at http://www.apache.org/LICENSE.txt. Craig McClanahan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Init() being called 3 times
Marc Saegesser wrote: In Tomcat 3.2.x, specifying more than one name for a servlet in web.xml causes a separate instance to be created for each name and each instances init() method will et invoked. Essentially creating a new servlet for each name as opposed to multiple names for a single instance of the servlet. The Servlet 2.2 spec (at least by my reading) doesn't provide clear guidance on the real behaviour of the servlet-name tag and the behaviour may vary from one servlet container to another. I seem to recall that JRun, for example, didn't create multiple instances. The spec is actually pretty clear ... for a servlet that does not implement SingleThreadModel, there will be one servlet instance created per servlet *definition* -- in other words, for each servlet element in your web.xml file, even if they refer to the same servlet class. In addition, if you use the invoker facility (/servlet/{servlet-class-name}) to reference the same servlet class, that creates a new definition on the fly, independent of any other definitions in web.xml. Craig McClanahan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Concatenation problem in taglibs tag in JSPs
And if you want, you can also set up the web.xml file to specify the tld's location for you, so your taglib directives don't have to. Do this by just adding this to your web.xml file (I think the placement of the tag might matter, so check the dtd to see what order to use)... taglib taglib-uristruts/taglib-uri taglib-location/WEB-INF/struts.tld/taglib-location /taglib {can use multiple taglib tags to define your other ones too} Then, you would just use the plain struts uri in the taglib directive. %@ taglib uri="struts" prefix="struts" % Doesn't make anything work better, but it's less to deal with in the jsp pages, and if you ever want to move your tld's around, you just have to worry about updating the web.xml instead of ?? jsp pages. [EMAIL PROTECTED] on 12/29/2000 02:06:29 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Re: Concatenation problem in taglibs tag in JSPs Tomcat 3.2 is automatically registering homedir as a Web application, so from from the JSP's viewpoint, /homedir/ is the root. Usually, the TLDs for a Struts application would read %@ taglib uri="/WEB-INF/struts.tld" prefix="struts" % %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" % %@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" % regardless of which application they are in. *** REPLY SEPARATOR *** On 12/29/2000 at 11:37 AM Robert Zazueta wrote: Hey there! We're currently in the process of upgrading to Tomcat 3.2.1 from 3.1.1 and have run into an interesting problem. We're using the Struts tag library in our JSP files. These are the lines we're using to call the .tld files from the jsp: %@ taglib uri="/homedir/WEB-INF/struts.tld" prefix="struts" % %@ taglib uri="/homedir/WEB-INF/struts-logic.tld" prefix="logic" % %@ taglib uri="/homedir/WEB-INF/struts-bean.tld" prefix="bean" % When we try to load these pages, however, we receive this error in the browser: Error: 500 Location: /store/categories/business/marketing/index.jsp Internal Servlet Error: org.apache.jasper.compiler.CompileException: /export/home/user/jakarta/tomcat/webapps/homedir/store/categories/busine ss/marketing/index.jsp(4,0) Unable to open taglibrary /homedir/WEB-INF/struts.tld : /export/home/user/jakarta/tomcat/webapps/homedir/homedir/WEB-INF/struts. tld (No such file or directory) If you look at the location where it's trying to get the struts.tld file, you'll see that it's actually trying to get into homedir twice (/export/home/user/jakarta/tomcat/webapps/homedir/homedir/WEB-INF/struts .tld) though that's not the structure of the directory. The directory structure and this code worked just fine in 3.1.1. It's clear to me that this part of the path -- /homedir/WEB-INF/struts.tld -- is being called from the taglib tag in the JSP file. What about that first part of the path? Where does that get set? Is it just the docpath variable? How do I fix this duplication problem? Thanks! Rob Z. -- -- FILE0001.HTM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
How to enable ISAPI filters in IIS management console
I have installed the isapi_redirect.dll and have added the filter to the ISAPI filters tab of the Default Web Site properties page. The filter status has a red down arrow and the enable button is always greyed out. I tried restarting IIS, but the filter status never changed to active (Green up arrow.) What steps do I need to take to get IIS to activate this filter? This is pretty basic stuff I am asking. I hope someone can point me in the right direction. Thanks, Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
where to find the translated java class from JSP.
it is said that JSP files are translated into servlet class before implementation, then, where can I find those servlet code and read them? thank you __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: where to find the translated java class from JSP.
Tomcat puts the .java (and .class files) in the work directory for your context. For my default its in jakarta-tomcat/work/localhost_8080. Each file is a munged version name of the jsp file and directory path. Randy -Original Message- From: xdyang xd [mailto:[EMAIL PROTECTED]] Sent: Friday, December 29, 2000 3:42 PM To: [EMAIL PROTECTED] Subject: where to find the translated java class from JSP. it is said that JSP files are translated into servlet class before implementation, then, where can I find those servlet code and read them? thank you __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: where to find the translated java class from JSP.
Look in the $TOMCAT_HOME/work. You will find subdirectories for each webapp. For example, if you are running Tomcat on port 8080 as per the default, you will find a subdirectory for the delivered examples, called "localhost_8080%2Fexamples". You will find the Java source and class files from the JSP's in the subdirectory. -Original Message- From: xdyang xd [mailto:[EMAIL PROTECTED]] Sent: Friday, December 29, 2000 2:42 PM To: [EMAIL PROTECTED] Subject: where to find the translated java class from JSP. it is said that JSP files are translated into servlet class before implementation, then, where can I find those servlet code and read them? thank you __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Tomcat 3.2.1 default ROOT directory?
Howdy, I am setting up a standalone tomcat 3.2.1 with virtual hosts. I have set the 'home' attribute in ContextManager to /home/webmaster, and moved the webapps directory there. The default index.html is now coming from /home/webmaster/webapps/ROOT but I don't know why its looking there. I want the directory structures set up something like this: /home/webmaster | |-/www.domainx.com | | | |-/www document root | |-/webapps webapps for domainx.com | |-/webapps common webapps |-/work tomcat work directory So that each domain gets its own directory, and common stuff like the work directory go in the webmaster directory. Is there a better way to set up directories for virtual hosts? Should I just put all webapps into the common webapps directory? What is the correct way to point the main, non-virtual server somewhere other than webapps/ROOT? Just use a context? Will that break anything? Thanks DK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Anyone got security-context working in Tomcat?
The examples application that comes with Tomcat has a working security constraint -- start up Tomcat and try to access http://localhost:8080/examples/jsp/security/protected Just out of curiousity, is "/videosearch" the context path of your web app? If so, you need to change your URL pattern to url-pattern/servlet/AdminServlet/url-pattern because all paths within a web.xml file are supposed to be context relative. Also, you should review the DTD for a web.xml file in the servlet spec, because it is very picky about the order of elements. In particular, the required order is security-constraint, then login-config, then security-role. Also, auth-method goes before realm-name in the login-config element. Tomcat 3.x doesn't care about any of this (until you try to use a JSP page with custom tags, but that's a long story :-), but Tomcat 4.0 and many other servlet containers use a validating parser, and will reject the web.xml file you've got below. Craig Neil Aggarwal wrote: Craig: Is there a working example of this? Here is what I did: 1. I added my user to the conf/tomcat-users.xml: tomcat-users user name="tomcat" password="tomcat" roles="tomcat" / user name="role1" password="tomcat" roles="role1" / user name="both" password="tomcat" roles="tomcat,role1" / user name="admin" password="test" roles="admin" / /tomcat-users 2. In my application's web.xml file, I added the following lines within the web-app tag: login-config realm-nameVideosearch Admin/realm-name auth-methodBASIC/auth-method /login-config security-role role-nameadmin/role-name /security-role security-constraint web-resource-collection web-resource-nameAdminServlet/web-resource-name url-pattern/videosearch/servlet/AdminServlet/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint 3. I then restarted Tomcat. I still dont get a login box when I visit the URL. The logs dont have any information. Am I missing something else? Thanks, Neil. Do you also have a login-config element in your web.xml file? If you do not, Tomcat has no way to know how to authenticate users, so it does not even try. You could probably make a case that Tomcat should reject access by default in this scenario, but this is how it currently works. Regarding setting up usernames and passwords -- the default configuration uses a text file "conf/tomcat-users.xml" to define the valid users and their roles. See comments in "conf/server.xml" for how to change to a different implementation. -- Neil Aggarwal JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com Custom Internet Development -- Java, JSP, servlets, databases - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Followup (Session references)
Billy Turchin typed the following on 12:59 PM 12/28/2000 -0500 I am using Tomcat 3.2.1. The session is certainly valid, because though I get a null pointer exception when I try to invalidate it, I can still perform actions with that user...ie data is still in the session. I am storing the session in a Map. I don't have a code snippet (its a large/complex system, but here's exactly what I'm doing: Try printing out the reference when you add it to your static class, then again when you retrieve it from the request but can't find it in the static class: see if the reference address changes. If so, you may need to grep through Tomcat's source to figure out what it's doing. Perhaps I should try to create a small test case to show this? That's a good idea - I often figure out the problem in the process of boiling it down to the simplest case. Kief - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: file upload servlet
Yes I think your right I had a parameter additional to the file and got an exception. when I put it as part of the query string the problem disappeared. -Original Message- From: Jose Euclides da Silva Junior - DIGR.O [mailto:[EMAIL PROTECTED]] Sent: Friday, December 29, 2000 7:26 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RES: file upload servlet -BEGIN PGP SIGNED MESSAGE- I think that you can not mix parameters and file when you use MultipartRequest ( from Jason') to handle multipart/form-data. Regards, José Euclides Júnior __ E-mail: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] http://euclides.8m.com - -Mensagem original- De: Tim Cronin [SMTP:[EMAIL PROTECTED]] Enviada em: Quarta-feira, 27 de Dezembro de 2000 22:50 Para: '[EMAIL PROTECTED]' Assunto:RE: file upload servlet I'm using it on nt4 sun JDK 1.3, tomcat 3.1, apache 1.3.12 and on RH linux 6.2 sun JDK 1.3, tomcat 3.1, apache 1.3.12 I'm waiting till all the bleeding edgers debug 3.2 Initially I had some funky behavior when I ccped from the upload examples, but I rewrote it from scratch and it seems to work ok. - -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 27, 2000 6:40 PM To: [EMAIL PROTECTED] Subject: RE: file upload servlet I am very surprised. I tried the same version. Here is the code I am using. As you can see, (or somebody can see), this is from upload.war (the sample came with the multirequest class) with some modifications. If everything works ok, I should be able to see all the parameters and files listed. However, it only worked for text files. For binary files, results vary from server error to exception in the MultiPartRequest constrcutor. The only difference I could find between your code and mine is mine is in a servlet's doPost() function? Now I am really confused. Help! Is it related to tomcat somehow. I am using tomcat 3.2.1 with apache 1.3.14 on WinNT4.0. Yanbin try { MultipartRequest multi = new MultipartRequest(req, "D:/upload"); writer.println("PParams:/P"); Enumeration params = multi.getParameterNames(); while (params.hasMoreElements()) { String name = (String)params.nextElement(); String value = multi.getParameter(name); writer.println("p" + name + " = " + value + "/P"); } writer.println(); writer.println("pFiles:/p"); Enumeration files = multi.getFileNames(); while (files.hasMoreElements()) { String name = (String)files.nextElement(); String filename = multi.getFilesystemName(name); String type = multi.getContentType(name); File f = multi.getFile(name); writer.println("p" + "name: " + name + "/p"); writer.println("p" + "filename: " + filename + "/p"); writer.println("p" + "type: " + type + "/p"); if (f != null) { writer.println("p" + "f.toString(): " + f.toString() + "/p"); writer.println("p" + "f.getName(): " + f.getName() + "/p"); writer.println("p" + "f.exists(): " + f.exists() + "/p"); writer.println("p" + "f.length(): " + f.length() + "/p"); writer.println("p/p"); } } } catch (IOException lEx) { this.getServletContext().log("error reading or saving file" + lEx, lEx); } catch (Exception e) { this.getServletContext().log("caught un-known exception" + e, e); } |+ || Tim Cronin| || [EMAIL PROTECTED]| || eClub.com| ||| || 12/27/00 06:47 PM | || Please respond to | || tomcat-user | ||| |+ --- | | | | To: "'[EMAIL PROTECTED]'" | | [EMAIL PROTECTED] | | cc: (bcc: Yanbin Ma/SYS/NYTIMES) | | Subject: RE: file upload servlet | --- | I was able to upload text, image, exe files, and other binaries with oreily package. I am using the nov 20 2000 version here's the code from my jsp file private String processRequest ( HttpServletRequest request ) { String cType = request.getContentType(); if (cType != null cType.toLowerCase().startsWith("multipart/form-data")) { try { String appPath =
Re: Q: PDF mime type not working
Hi, Are you using Internet Explorer to view the page? In our experience, the newer versions (I'm not sure if it's all the 5.x series or only 5.5) no longer are willing to honor the complete MIME protocol -- although amazingly enough, they do recognize MS Word and Excel files. Try using Netscape and see if that helps. If this is the source of your problem, there is no workaround to the best of my knowledge. -- Eric Johnson -- [EMAIL PROTECTED] Perfectionism is the enemy of creation... -- John Updike On Fri, 29 Dec 2000, Michael Wentzel wrote: I have written a Servlet that generates a pdf on the fly and outputs the result to the browser but all that ends up happening is the raw text get displayed instead of starting the adobe helper app and loading the generated doc. I have added the following to web.xml for my webapp: mime-mapping !-- PDF mime -- extension pdf /extension mime-type application/pdf /mime-type /mime-mapping I also set the Response content type to application/pdf before anything gets written to the OutputStream. Any ideas on what I might be doing wrong? Thanks. --- Michael Wentzel 4939 Lower Roswell Road Software DeveloperSuite 201B Software As We Think Marietta, GA 30068 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Init() being called 3 times
Sorry about that. I was still thinking Servlet 2.1 API spec. The Servlet 2.2 spec is much tighter. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, December 29, 2000 2:35 PM To: [EMAIL PROTECTED] Subject: Re: Init() being called 3 times Marc Saegesser wrote: In Tomcat 3.2.x, specifying more than one name for a servlet in web.xml causes a separate instance to be created for each name and each instances init() method will et invoked. Essentially creating a new servlet for each name as opposed to multiple names for a single instance of the servlet. The Servlet 2.2 spec (at least by my reading) doesn't provide clear guidance on the real behaviour of the servlet-name tag and the behaviour may vary from one servlet container to another. I seem to recall that JRun, for example, didn't create multiple instances. The spec is actually pretty clear ... for a servlet that does not implement SingleThreadModel, there will be one servlet instance created per servlet *definition* -- in other words, for each servlet element in your web.xml file, even if they refer to the same servlet class. In addition, if you use the invoker facility (/servlet/{servlet-class-name}) to reference the same servlet class, that creates a new definition on the fly, independent of any other definitions in web.xml. Craig McClanahan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
What does the following message mean in mod_jk.log?
in mod_jk.log: [jk_ajp12_worker.c (596)]: ajpv12_handle_response, error writing back to server This log file has tons of these lines in it. The application thats running using these servlet seems to run fine though. Anyone else getting this message? Thanks Tony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: file upload servlet
I think that you can not mix parameters and file when you use MultipartRequest ( from Jason') to handle multipart/form-data. Regards, I have no problem mixing them. Be sure you have encoding="multipart/form-data" in your FORM tag. Joe Laffey St. Louis, MO - With no walls or fences on the Internet, who needs Windows or Gates? - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: tomcat
Hi All! I have a problem installing Apache JServ. I am running Solaris 2.7 on Intel platform, using Apache 1.3.12 and JDK 1.3 . When running "make", I get the following errors: Compiling JServConnection.java ... JServConnection.java:85: org.apache.jserv.JServConnection should be declared abstract; it does not define flushBuffer() in org.apache.jserv.JServConnection public class JServConnection ^ /apache/tomcat/ApacheJServ-1.1.2/src/java/org/apache/jserv/JServContext.java :90: org.apache.jserv.JServContext should be declared abstract; it does not define getAttributeNames() in org.apache.jserv.JServContext class JServContext implements ServletConfig, ServletContext, JServSendError, JServLogChannels { ^ /apache/tomcat/ApacheJServ-1.1.2/src/java/org/apache/jserv/JServSession.java :74: org.apache.jserv.JServSession should be declared abstract; it does not define getAttribute(java.lang.String) in org.apache.jserv.JServSession public class JServSession implements HttpSession, JServLogChannels, Serializable { ^ Note: Some input files use or override a deprecated API. Note: Recompile with -deprecation for details. 3 errors Does anyone know how to resolve this problem? I would appreciate any help. Thanks. Ken -Original Message- From: Shahed Ali [mailto:[EMAIL PROTECTED]] Sent: Friday, December 29, 2000 10:13 AM To: [EMAIL PROTECTED] Subject: encodeRedirectURL in TC 3.1 Hi, I am using Tomcat 3.1 standalone on Intel Solaris 8 and JDK 1.3. When I send a response.encodeRredirectURL("page.jsp?Msg=This is a Message"), it does not convert the spaces in Msg=. I tested with Netscape 6 on Linux. I searched BugRat, but could not find a match. Is this a known Bug ? Thanks Shahed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: How to enable ISAPI filters in IIS management console
Search this list's archives. This comes fairly often. The isapi redirector is rather senstive to the configuration and doesn't always provide really useful error messages. Start by seeing of the iis_redirect.log file has been created and if it has any usefull error messages it in. Depending on when the failure is happening the log file may or may not have been created. Double (or triple) check the values for the registy entries. Specifically make sure that the files for worker_file and worker_mount_file exist. If your using the NT Workstation and using the Web Server from the Internet Option Pack then make sure you don't create the "Filter DLLs" registry entry. I hope this helps. When you get it working, please post the information about what happened so that others can benefit. -Original Message- From: Hawkins, Keith (Keith) [mailto:[EMAIL PROTECTED]] Sent: Friday, December 29, 2000 2:41 PM To: [EMAIL PROTECTED] Subject: How to enable ISAPI filters in IIS management console I have installed the isapi_redirect.dll and have added the filter to the ISAPI filters tab of the Default Web Site properties page. The filter status has a red down arrow and the enable button is always greyed out. I tried restarting IIS, but the filter status never changed to active (Green up arrow.) What steps do I need to take to get IIS to activate this filter? This is pretty basic stuff I am asking. I hope someone can point me in the right direction. Thanks, Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Q: PDF mime type not working
Are you using Internet Explorer to view the page? In our experience, the newer versions (I'm not sure if it's all the 5.x series or only 5.5) no longer are willing to honor the complete MIME protocol -- although amazingly enough, they do recognize MS Word and Excel files. Thanks, actually it was just a stupid mistake by me. I setContentType before I got the OutputStream instead of after and so it actually though it was just a raw OutputStream. We are using IE ver 5.0 and it still seems to support the mime protocol(What a MS-ish thing to do...). That's a good thing to know about the higher versions of IE though. Thanks again. --- Michael Wentzel 4939 Lower Roswell Road Software Developer Suite 201B Software As We ThinkMarietta, GA 30068 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Anyone got security-context working in Tomcat?
Craig: Yes, that was it! Thanks! To summarize for those that are still having trouble: To make Tomcat require authentication for a give URL, add these lines in the web-app tag in the web.xml file for a tomcat application (NOTE: The URL pattern should not include the application's context). Here is an example: security-constraint web-resource-collection web-resource-nameAdminServlet/web-resource-name url-pattern/servlet/AdminServlet/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameadmin/role-name /auth-constraint /security-constraint login-config auth-methodBASIC/auth-method realm-nameAdmin/realm-name /login-config security-role role-nameadmin/role-name /security-role The passwords need to be placed in the /usr/local/jakarta-tomcat-3.2.1/conf/tomcat-users.xml file: user name="admin" password="[password]" roles="admin" / Thanks, Neil. -- Neil Aggarwal JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com Custom Internet Development -- Java, JSP, servlets, databases - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: How to enable ISAPI filters in IIS management console
If you are using winnt/win2k use your event viewer check for w3svc errors and recontact for information Nasr "Hawkins, Keith (Keith)" wrote: I have installed the isapi_redirect.dll and have added the filter to the ISAPI filters tab of the Default Web Site properties page. The filter status has a red down arrow and the enable button is always greyed out. I tried restarting IIS, but the filter status never changed to active (Green up arrow.) What steps do I need to take to get IIS to activate this filter? This is pretty basic stuff I am asking. I hope someone can point me in the right direction. Thanks, Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
integrating apache with tomcat
Hi everybody I made the connection between apache and tomcat using mod_jserv.so. But I really don't why I really do it. On the documentation it says that by doing this connection we put less workload to tomcat, or apache is more robust as a http server etc.. What I don't understand is how this happens. let's say when I have a code like in html code such as form action="http://127.0.0.1:8881/examples/servlet/HelloWorldExample" method="get" input type="submit" value="submit" name="submit" I tell my http server to send the message to tomcat. I don't need a connection or anything. I think what I want to learn is some examples of some ideas on how this connection we make in "Tomcat - A Minimalistic User's Guide" is used thanks very much for any help iz'an - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
PROBLEM in Win98 startup-NoClassDefFoundError
PLEASE HELP... I have been trying to get tomcat started up for last two days... I have checked the faq site and gone through the complete mailing list and I have not found any answer to my problem so far... Need help urgently. I am using a Pentium Celeron 266 machine with 64 MB RAM, running on Win98.My tomcat is installed in d:\tomcat(No question of non 8.3 format directory name here)My jdk is installed in d:\jdk1.3 (Java2 SDK 1.3) My classpath is correctly set up to include d:\tomcat\classes and all the jar files in tomcat\lib directory ie; ant.jar, jasper.jar,jaxp.jar,parser.jar,servlet.jar and webserver.jar The classpath is also set up to take d:\jdk1.3\lib\tools.jar (tools.jar does exist in this directory) I have set TOMCAT_HOME=d:\tomcatI have set JAVA_HOME =d:\jdk1.3 When running I have noticed that the JAVA_HOME TOMCAT_HOME environment variables are correctly set to d:\jdk1.3 and d:\tomcat respectively. The dos prompt displays some lines of count=0 total=xxx and thenterminates with an Exception in thread "main" java.lang.NoClassDefFoundError : org/apache/tomcat/startup/Tomcat (This corresponds to the commandjava -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9 of tomcat.bat file) Can anyone tell me what all that %2 %3 etc means. Are they the command line parameters?? I have noticed that there is no directory structure corresponding to org.apache.tomcat.startup.Tomcat class (package.class name) in the tomcat root. (This directory structure is available in the src directory with a Tomcat class. I guess this class file should be in one of the jar files in lib directory) I also noticed that there is no file in my tomcat directory (or any on which the java command is being called. P.S : I have removed all other classlibraries in my autoexec.bat classpath set up except jdk\lib. I am not able to figure out the problem inspite of being at it for two days. PLEASE HELP!! I have become obsessed in solving this problem Thank you Joseph S Wish you all a very happy New Year