Re: [ezmlm help]:Messages from the tomcat-user mailing list seem to have been bouncing
got the same issue here ... ... kazi - Original Message - From: "SongDongsheng" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 2:55 PM Subject: [ezmlm help]:Messages from the tomcat-user mailing list seem to have been bouncing > Hi, > ezmlm give me a warning: > > Messages to you from the tomcat-user mailing list seem to > have been bouncing. > > How can I about it ? > > >
Making Tomcat 3.2 works with IIS 4.0
Hi, I'm a newbie in Tomcat and JSP/Servlets but I have developped a jsp web site which is able to display charts. This one was created and tested with Tomcat 3.2, JDK 1.2 and work fine localy. But now I need to put this applications on production on a IIS 4.0 web server. As a user of your great web site i've downloaded and tried your great Tomcat IIS How to procedure, but I was surprised to not see the ISAPI filter flag set to green up arrow (instead of my usual red arrow). Therefore i was involved more in your your procedure and server, but nothing change. That's why i need to know if you have issues to this problem. Waiting a answer and a ACK Best regards FOHR Stephane (Web development Student) _ Téléchargez MSN Explorer gratuitement à l'adresse http://explorer.msn.fr/intl.asp
Problems with IIS 5.0 jakarta redirect (please)
System: OS Win 2000 5.00.2195 IIS 5.0 Tomcat 3.2.1 Tomacat starts fine. All logs show successful startup of all web applications. Browser URL: http://localhost/examples/jsp/index.html Http log excerpt: 17:28:08 127.0.0.1 GET /jakarta/isapi_redirect.dll+ 404 (and a lot of null bytes follows) isapi.log excerpt: [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 Any suggestions is *much* appreciated!! For the record: an almost identical configuration works fine on my laptop(!). -- Thomas * Copyright ERA Technology Ltd. 2001. (www.era.co.uk). All rights reserved. Confidential. No liability whatsoever is accepted for any loss or damage suffered as a result of accessing this message or any attachments.
Problem with loading servlets on start up 2
Hello, I'm a quiet newbie with Tomcat, and I have problems with running correctly the sample "HelloUser" under Tomcat v3.2.1 I have cleaned the directory "webapps" and put there only the folder "hellouser" with "web-inf" and "meta-inf" subfolders, the subfolder "web-inf" looks like this : ...WEB-INF\classes\hello\NameHandler.class I made a web.xml-file looking like this: hellouser hello.NameHandler 10 and it doesn't work - the .class file is not loading on start up, and when I read the .log file I found a message : "[EmbeddedTomcat] cannot load servlet name: HelloUser" I just don't understand - what I have to do that the file NameHandler.class to be loaded on start up. Please help me! Many thanks in advance Atanas _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Problem with loading servlets on start up 2
Hi, I got the same error with a bean that creates a connection Pool OraPool beans.OraPool I put some log messages to see if the pool is created correctly in the class-constructor and that's okay! Nevertheless the next message after successfull creating the pool is: cannot load servlet name: OraPool :beans.OraPool What does this mean? The bean is executed and the message says the opposite!? Peter Atanas Michev wrote: > > Hello, > I'm a quiet newbie with Tomcat, and I have problems with running correctly > the sample "HelloUser" under Tomcat v3.2.1 > I have cleaned the directory "webapps" and put there only the folder > "hellouser" with "web-inf" and "meta-inf" subfolders, the subfolder > "web-inf" looks like this : > ...WEB-INF\classes\hello\NameHandler.class > I made a web.xml-file looking like this: > > > > > hellouser > > hello.NameHandler > >10 > > > and it doesn't work - the .class file is not loading on start up, > and when I read the .log file I found a message : > "[EmbeddedTomcat] cannot load servlet name: HelloUser" > I just don't understand - what I have to do that the file NameHandler.class > to be loaded on start up. > Please help me! > > Many thanks in advance > Atanas > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Link error with mod_webapp
There was a thread going around a week or so ago about an error: Linking Apache 1.3 WebApp Module /home/shaun/tomcat-connectors/webapp/apr/libtool: mod_webapp.lo: command not found make[1]: *** [mod_webapp.so] Error 127 make[1]: Leaving directory `/home/shaun/tomcat-connectors/webapp/apache-1.3' make: *** [local-all] Error 2 This appears to be to do with the timestamp command in the file mod_webapp.lo. Did it ever get resolved? I am trying to build mod_webapp on RedHat Linux 7.1 and as you can see I too have the error. Thanks for any help. Shaun
RE: tomcat-SSL
Hello Thanks for the reply . Well i get some problems I have my Personal Certificate . When i click on Security of Netscape Browser & see Certificates Yours i can view my Certificates. its fine. But now i connect to my ssl tomcat enabled site it gives me message that The site has requested client authentication, but you do not have a Personal Certificate to authenticate yourself. The site may choose not to give you access without one. But i got my Personal Certificate already . I also manually import the certi in keystore by keytool. Please give the solution. Thanks. * Mehul S Dave Scientific Officer, (STCS Dept.), Tata Institute of Fundamental Research Phone - 2152971 Extn - 2372 Mumbai . webpage:- http://www.ecom.tifr.res.in/~mehul *
classpath questions
Hi all, I am wondering if someone can instruct me or point me in the direction on how to make apps I create in the same tomcat to start with different classpaths and libraries? Currently I add the jar file into the global classpath but when I have more than one apps on tomcat, I run into trouble. Tomcat is not able to call the servlets intended. For example, if I have 2 apps, App A with servlet a and App B with servlet b. When i use a browser and call App A with servlet b, say http://127.0.0.1/appA/servlet/b, it will still work. How to avoid this? Thanks, Albert _ This e-mail (and any attachment) is intended only for the addressee and may contain confidential information. If you are not the intended recipient you must not use, copy, print or distribute this e-mail. If you receive this e-mail in error, please contact the sender and destroy the original. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. _
AW: tomcat and apache jsp execution
I looked on the mod_jk.log file. Here is two lines I am getting quite a lot and I don't really know what it means. [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters Furthemore, I don't have DocumentRoot=tomcatDirectory/webapps/ROOT anywhere. The only documentRoot I found was in httpd.conf file which refer to the directory where are my webpages. I removed all the stuff I added in the httpd.conf file (except for the include command). I found out that the lines I added were already in the mod_jk.conf-local file I was using. Still, I am getting the source of my jsp. mel -Ursprüngliche Nachricht- Von: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Gesendet am: Montag, 20. August 2001 14:42 An: [EMAIL PROTECTED] Cc: Bernier, Melanie Betreff: Re: tomcat and apache jsp execution Are you getting anything in the mod_jk log when doing a request? Another thing - if you're getting source I might guess that you have DocumentRoot=tomcatDirectory/webapps/ROOT? I'm sure that probably can work, but then you've got two web servers both serving content from one directory, and it might make it harder to debug... hth cheesr dim On Mon, 20 Aug 2001, Bernier, Melanie wrote: > Hi! > > I just installed tomcat 3.2.3 and I am trying to make it work with Apache. > I followed the step described on the tomcat web site but I'm still not able > to make it work properly. When I request html or jsp from port 8080, > everything works fine. When I request html from port 80, again I have no > troubles. But when I try to access a .jsp from port 80, Apache sends me > back the code of that jsp instead of having it executed by tomcat. > > Here is what I added in my httpd.conf: > > Include tomcatDirectory/conf/mod-jk.conf-local > > LoadModulejk_module modules/mod_jk-eapi.so > AddModule mod_jk.c > JkWorkersFile tomcatDirectory/conf/workers.properties > JkLogFile apacheDirectory/logs/mod_jk.log > > JkMount /*.jsp ajp13 > JkMount /servlet/* apj13 > > The mod-jk.conf-local is the mod-jk.conf-auto generated by tomcat with the > only difference that I changed the reference line to the mod_jk module > because I had a different location than /libexec/mod_jk.so > > I added the following in the server.xml: > > > value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/> > > > > Any idea? > > Thanks a lot, > > Melanie. > >
JMX related
Hi I v installed tomcat 4.0 b7 on win nt 4.0. I wonder how the MBeans can be registered with the tomcat server. All over the net i have found documentation related to JBOSS-Tomcat, which i do not want. I need to install MBeans on a standalone Tomcat - Catalina container and manage them. Also, does it suffice that i put the jmxri.jar in the $CATALINA_HOME/lib directory before starting Tomcat so that all the JMX related stuff is loaded? Any help in this regard would greatly be appreciated. Tx, Sriram
Re: classpath questions
Hi, I think you dont need to add the application jar file to the global classpath. Whenever you create a new conext/application with a jar file, all the classes within this jar are automatically loaded by tomcat if required. So in your case, if you want to avoid the App A from calling servlet b, just remove the AppA.jar and AppB.jar from the global classpath. Now App A will only be able to call servlet a (and all others within AppA.jar) and NOT servlet b. Similaryly App B will be able to call only servlet b and NOT servlet a. Regards Nitin Goyal Webrizon eSolutions Pvt. Ltd., B-31, Sector 5, Noida-201301 (UP) INDIA Tel (O) : 91.118.4421319, 4421320. Cell : 91.9810353030 [EMAIL PROTECTED] There is no failure except in no longer trying. - Original Message - From: "Albert Yip" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 3:34 PM Subject: classpath questions Hi all, I am wondering if someone can instruct me or point me in the direction on how to make apps I create in the same tomcat to start with different classpaths and libraries? Currently I add the jar file into the global classpath but when I have more than one apps on tomcat, I run into trouble. Tomcat is not able to call the servlets intended. For example, if I have 2 apps, App A with servlet a and App B with servlet b. When i use a browser and call App A with servlet b, say http://127.0.0.1/appA/servlet/b, it will still work. How to avoid this? Thanks, Albert _ This e-mail (and any attachment) is intended only for the addressee and may contain confidential information. If you are not the intended recipient you must not use, copy, print or distribute this e-mail. If you receive this e-mail in error, please contact the sender and destroy the original. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. _
Security issues with Tomcat 3.2.x
Hi. I'm using Jakarta Tomcat 3.2.2 with Apache 1.3.20 / mod_jk (Linux) and I have some security-related questions: 1) I've read 3.2.3 is the latest available version for 3.2.x branch and that it covers a security issue. What's about this security issue and where could I read more about this issue? Could it be the "2001-07-02: Apache Tomcat Cross-Site Scripting Vulnerability" (http://www.securityfocus.com/vdb/bottom.html?vid=2982)? 2) Is there any patch or is it planned a future release to cover the "2001-08-16: Jakarta Tomcat 3.2.1 Error Message Information Disclosure Vulnerability" issue? (http://www.securityfocus.com/vdb/bottom.html?vid=3199) 3) The following is a security issue I'm experiencing. It may be a configuration error made by myself or perhaps some bug? I need some help. Let's suppose you have a working .jsp page: http://www.foo.com/bar/home.jsp. Then if you use the following url the .jsp source is showed instead of beeing executed by Tomcat: http://www.foo.com/\bar/home.jsp. This is the way I'm using to mount the context (excerpt from mod_jk.conf file): Alias /bar /usr/local/tomcat/webapps/bar JkMount /bar/*.jsp ajp13 JkMount /bar/*.xml ajp13 JkMount /bar/servlet/* ajp13 AllowOverride None deny from all AllowOverride None deny from all Am I missing something or the \ trick is a bug? Any workaround? Thanks in advance! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ** RoMaN SoFt / LLFB ** [EMAIL PROTECTED] ~~~
RE: Problems debugging JSPs
Probabaly better off on the JBuilder forums/newsgroup. Not that you might not get an answer back there, but @ there message boards, you're guaranteed everyone's running JB =) - r > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 11:22 AM > To: [EMAIL PROTECTED] > Subject: Problems debugging JSPs > > > Hi, > > I'm experiencing some problems when trying to debug JSPs in JBuilder 5. By > the way, I'm using Tomcat 3.2.3 under Windows NT. I've added the Java file > generated by Jasper to my project and set a breakpoint in the > _jspService() > method. Then when I reload the page in my browser JBuilder 5 opens a new > window and displays a stub source file generated from the class file by > JBuilder's decompiler, but not the original Java file that I added to the > project. I assume that's because JBuilder can't find the source > file because > it's not placed in the correct directory. The Java file generated > by Jasper > starts with a package declaration and even though Tomcat creates a > corresponding subdirectory in the works directory, it places both > source and > class file at the top of the works directory. Does anybody know of any > workaround or am I simply missing something? > > Many thanks in advance! > > Thomas >
Re: AW: tomcat and apache jsp execution
Mel, ok - so its getting to mod_jk ok... (not 100% sure what those lines mean specifically, but I get them too). I suppose the next thing to look at is the tomcat logs. open up server.xml and crank up all the debug levels and see what happens in the logs when the request comes in btw - the reason I was asking about DocumentRoot is that I wondered if somehow apache was serving the jsp source directly... doesn't sound like it. cheesr dim On Tue, 21 Aug 2001, Bernier, Melanie wrote: > I looked on the mod_jk.log file. Here is two lines I am getting quite a lot > and I don't really know what it means. > > [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL > parameter > [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, > NULL parameters > > Furthemore, I don't have DocumentRoot=tomcatDirectory/webapps/ROOT anywhere. > The only documentRoot I found was in httpd.conf file which refer to the > directory where are my webpages. > > I removed all the stuff I added in the httpd.conf file (except for the > include command). I found out that the lines I added were already in the > mod_jk.conf-local file I was using. Still, I am getting the source of my > jsp. > > mel > > -Ursprüngliche Nachricht- > Von: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] > Gesendet am: Montag, 20. August 2001 14:42 > An: [EMAIL PROTECTED] > Cc: Bernier, Melanie > Betreff: Re: tomcat and apache jsp execution > > Are you getting anything in the mod_jk log when doing a request? Another > thing - if you're getting source I might guess that you have > DocumentRoot=tomcatDirectory/webapps/ROOT? I'm sure that probably can > work, but then you've got two web servers both serving content from one > directory, and it might make it harder to debug... > > hth > cheesr > dim > > On Mon, 20 Aug 2001, Bernier, Melanie wrote: > > > Hi! > > > > I just installed tomcat 3.2.3 and I am trying to make it work with Apache. > > I followed the step described on the tomcat web site but I'm still not > able > > to make it work properly. When I request html or jsp from port 8080, > > everything works fine. When I request html from port 80, again I have no > > troubles. But when I try to access a .jsp from port 80, Apache sends me > > back the code of that jsp instead of having it executed by tomcat. > > > > Here is what I added in my httpd.conf: > > > > Include tomcatDirectory/conf/mod-jk.conf-local > > > > LoadModule jk_module modules/mod_jk-eapi.so > > AddModule mod_jk.c > > JkWorkersFile tomcatDirectory/conf/workers.properties > > JkLogFile apacheDirectory/logs/mod_jk.log > > > > JkMount /*.jsp ajp13 > > JkMount /servlet/* apj13 > > > > The mod-jk.conf-local is the mod-jk.conf-auto generated by tomcat with the > > only difference that I changed the reference line to the mod_jk module > > because I had a different location than /libexec/mod_jk.so > > > > I added the following in the server.xml: > > > > > > > value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/> > > > > > > > > Any idea? > > > > Thanks a lot, > > > > Melanie. > > > > >
probing tomcat
Hi, does anybody know whether there exists a way to probe from a remote computer whether tomcat is still alive ? Steven
Re: probing tomcat
1) Try hitting it on its default port, e.g. 8080 2) Try to telnet to it on its ajp port, e.g. 8007 On Tuesday 21 August 2001 08:32 am, you wrote: > Hi, > does anybody know whether there exists a way to probe from a remote > computer whether tomcat is still alive ? > > Steven
about CLASSPATH: system or tomcat trick ?
I added the path /usr/java/xerces-1_4_2/xerces.jar in CLASSPATH of tomcat.sh but it crashes tomcat I removed xerces.jar from CLASSPATH in tomcat.sh and putted it in the my user profile file : ~/.bashrc and ~/.profile but now tomcat works well got a clue ? any help will be appreciated. [fate@brazil fate]$ uname -a Linux brazil 2.4.3-20mdk #1 Sun Apr 15 23:03:10 CEST 2001 i686 unknown -- Cordialement, Fabrice Terrasson, exploitation & production. [EMAIL PROTECTED](01 58 88 76 29)
Configuration
I use a Debian box. I installed Apache and Tomcat 4 b6 (Apache as web server and Tomcat as application server for jsp/servet) Tomcat home is: /usr/tomcat4b6 I want several Virtual host (www.mysite.com, www.mysite2.com ) I want to place (for example) the file for my sites in: /var/www/mysite.com for www.mysite.com /var/www/mysite2.com for www.mysite2.com ecc.. and now Apache gets the right path if I call a specific site. In file httpd.conf I added (for the connection to Tomcat): LoadModule webapp_module /usr/lib/apache/1.3/mod_webapp.so AddModule mod_webapp.c : : DocumentRoot /var/www/mysite.com ServerName www.mysite.com WebAppConnection conn warp localhost:8008 WebAppDeploy mysite.com conn /var/www/mysite.com : In file /usr/tomcat4b6/conf/server.xml I wrote: : : In dir /var/www/mysite.com i placed index.html test.jsp If I call www.mysite.com I see the index.html but if I call www.mysite.com/test.jsp I see the code of the file. What is wrong??? Thanks! Roberto
AW: AW: tomcat and apache jsp execution
Hi Dmitri, I can't find anything useful in the logs:-( As I was reading the documentation from my colleague, I remembered something about RequestInterceptor. I read somewhere on the documentation for ajp13 connection to add in the server.xml : When I tried it, I was getting FATAL: configuration error java.lang.ClassNotFoundException: org.apache.tomcat.modules.server.Ajp13Interceptor ...(and blablabla). Could that be related to my problem? mel
Re: tomcat 4 mod_webapp config
[EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > All, > > I'm having a little problem with mod_webapp (or maybe I'm not > understanding this properly). > > I have an application deployed in catalina (v. 4b7) called "laserweb" > (accessible via tomcat's http server port under /laserweb). I'd like to > deploy this as the root of a virtual host in apache. I've configured the > connector like this within the virutal host: > > WebAppConnection myconn warp localhost:8008 > WebAppDeploy laserweb myconn / > > This doesn't seem to have any affect, as .jsp's, etc. are not being > processed. If I pick an URI other than "/", it will work. (i.e., > > WebAppDeploy laserweb myconn /testuri > > works as expected -- the webapp is available via > http:///testuri Philippe Richter just sent me a patch about this one... And AFAICS it's a good one (I didn't try it yet!) but it'll be in the next version of the module. --- wa_config.c Tue Aug 21 13:53:02 2001 +++ webapp-module-1.0-tc40b7.new/lib/wa_config.cTue Aug 21 13:44:13 2001 @@ -81,10 +81,10 @@ strncpy(buf,p,1024); l=strlen(buf)-1; if (buf[l]=='/') buf[l]='\0'; -if (buf[0]=='/') { -appl->rpth=apr_pstrcat(wa_pool,buf,"/",NULL); +if (buf[0]=='/' || l==0) { + appl->rpth=apr_pstrcat(wa_pool,buf,"/",NULL); } else { -appl->rpth=apr_pstrcat(wa_pool,"/",buf,"/",NULL); + appl->rpth=apr_pstrcat(wa_pool,"/",buf,"/",NULL); } /* Zero all other parameters */ > Also, does the module have some way of resolving symbolic links? laserweb > is symlinked into the $CATALINA_HOME/webapps directory, yet the > /webapp-info/ page from my virtual host displays the "actual" directory > location (the target of the link)---I found this a little odd. How does > the module know? I don't know... It's all done in APR... I simply check if that directory exists or not... Note, the webapp-info should be _really_ disabled on any propduction server... > My understanding is that using mod_webapp, tomcat virtual hosts don't > matter. Is this incorrect? Can anyone shed some light on this? Nope, they don't... You can even remove the whole full first part of the server.xml (you can keep only the Tomcat-Apache engine). If you need virtualhost support, just configure them in your Apache httpd.conf, and put your WebAppDeploy lines inside your tags. It's all done automatically (no mod_rewrite, no auto-creation of configuration files, no nothing) Pier
starting tomcat from tcl
Hi all, I'm trying to start tomcat (3.2.3) from a tcl script using jacl. It starts up, but if try to browse a jsp file I get the following error: Internal Servlet Error: java.lang.NoSuchMethodError at org.apache.tomcat.context.ExceptionHandler.doService(DefaultCMSetter.java:28 9) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.handleError(ContextManager.java:1183) at org.apache.tomcat.core.Handler.service(Handler.java:312) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) Does anybody have an idea what the problem could be??? Thanks! Martin
Re: Link error with mod_webapp
Shaun Campbell at [EMAIL PROTECTED] wrote: > There was a thread going around a week or so ago about an error: > > Linking Apache 1.3 WebApp Module > /home/shaun/tomcat-connectors/webapp/apr/libtool: mod_webapp.lo: command not > found > make[1]: *** [mod_webapp.so] Error 127 > make[1]: Leaving directory `/home/shaun/tomcat-connectors/webapp/apache-1.3' > make: *** [local-all] Error 2 > > This appears to be to do with the timestamp command in the file > mod_webapp.lo. Did it ever get resolved? > > I am trying to build mod_webapp on RedHat Linux 7.1 and as you can see I too > have the error. > > Thanks for any help. Easy... What does "apxs -q LD_SHLIB" tells you? I believe it's not reporting your DLL linker... Pier
Re: Configuration
Roberto B. at [EMAIL PROTECTED] wrote: > > DocumentRoot /var/www/mysite.com > ServerName www.mysite.com > WebAppConnection conn warp localhost:8008 > WebAppDeploy mysite.com conn /var/www/mysite.com > Your WebAppDeploy is wrong As written in the install.txt file it should be WebAppDeploy /var/www/mysite.com conn / Pier
RE: tomcat 4 datasource casting
Craig, This bring up an interesting question: In installation guide for soap 2.2, it requires that mail.jar, activation.jar etc be in CLASSPATH for Tomcat 3.2. But for Tomcat 4.0 do we put them in $CATALINA_HOME/common/lib or include these jar files in the CLASSPATH. I don't see documentation on this topic. Zhongwu > -Original Message- > From: Craig R. McClanahan [SMTP:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 5:16 PM > To: [EMAIL PROTECTED] > Subject: Re: tomcat 4 datasource casting > > Where do you have the jdbc2_0-stdext.jar file? I'm betting that it needs > to be in $CATALINA_HOME/common/lib only for this to work -- because JAR > files here are on the class loading path for both Catalina internal > classes and web application classes. > > Craig > > > On Mon, 20 Aug 2001 [EMAIL PROTECTED] wrote: > > > Hello all, > > > > I read the great message Craig McClanahan posted in the archives (from > > Aug 4) about how to setup and use a tomcat 4 datasource. All has seemed > > > to go pretty well, but I'm having a funny problem, which I'm not sure is > a > > Tyrex problem, a Tomcat 4 problem or a Java education problem on my part > > > :). (I'm using Tomcat 4 beta 7) > > > > When I try to get a DataSource from JNDI, I can retrieve a reference > just > > fine. The problem is that I am having trouble casting it to a > > javax.sql.DataSource. It returns an instance of > > tyrex.jdbc.xa.EnabledDataSource. If I try to cast to > > javax.sql.DataSource, I get a ClassCastException from the server. I > > looked up this class in the Tyrex API docs, and it does in fact > implement > > javax.sql.DataSource -- I think I should be able to cast to it because > of > > that. If I work with the tyrex implementation directly, all is ok > (i.e., > > calling tyrex.jdbc.xa.EnabledDataSource.getConnection()), but I > obviously > > won't want to care about the particular implementation in this case. > > > > If it helps, here is the code I'm trying to use: > > > > -- > > ctx = new InitialContext(); > > ds = (DataSource)ctx.lookup("java:comp/env/jdbc/lis_ds"); > > -- > > > > That failed, so I added this for debugging: > > > > -- > > Object o = ctx.lookup("java:comp/env/jdbc/lis_ds"); > > if (o == null) { > >System.out.println("looked up a null object"); > > } else { > >System.out.println("o is of type: " + o.getClass().getName()); //<-- > > prints "tyrex.jdbc.xa.EnabledDataSource" > > } > > -- > > > > The exceptions I get are like this: > > > > -- > > java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource > > at report.ReportPrefs.setDateDefaults(ReportPrefs.java:52) > > at report.ReportPrefs.(ReportPrefs.java:16) > > at java.lang.Class.newInstance0(Native Method) > > at java.lang.Class.newInstance(Class.java:237) > > at java.beans.Beans.instantiate(Beans.java:207) > > at java.beans.Beans.instantiate(Beans.java:51) > > > > -- > > > > Any ideas? > > > > Thanks, > > Jason Vasquez > >
Re: tomcat 4 mod_webapp config
Pier-- Thanks for the patch. I'll give this a shot today or tomorrow and see if that does the trick. -jason "Pier P. Fumagalli" <[EMAIL PROTECTED]> 08/21/2001 08:34 AM Please respond to tomcat-user To: [EMAIL PROTECTED] cc: Subject:Re: tomcat 4 mod_webapp config [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > All, > > I'm having a little problem with mod_webapp (or maybe I'm not > understanding this properly). > > I have an application deployed in catalina (v. 4b7) called "laserweb" > (accessible via tomcat's http server port under /laserweb). I'd like to > deploy this as the root of a virtual host in apache. I've configured the > connector like this within the virutal host: > > WebAppConnection myconn warp localhost:8008 > WebAppDeploy laserweb myconn / > > This doesn't seem to have any affect, as .jsp's, etc. are not being > processed. If I pick an URI other than "/", it will work. (i.e., > > WebAppDeploy laserweb myconn /testuri > > works as expected -- the webapp is available via > http:///testuri Philippe Richter just sent me a patch about this one... And AFAICS it's a good one (I didn't try it yet!) but it'll be in the next version of the module. --- wa_config.c Tue Aug 21 13:53:02 2001 +++ webapp-module-1.0-tc40b7.new/lib/wa_config.cTue Aug 21 13:44:13 2001 @@ -81,10 +81,10 @@ strncpy(buf,p,1024); l=strlen(buf)-1; if (buf[l]=='/') buf[l]='\0'; -if (buf[0]=='/') { -appl->rpth=apr_pstrcat(wa_pool,buf,"/",NULL); +if (buf[0]=='/' || l==0) { + appl->rpth=apr_pstrcat(wa_pool,buf,"/",NULL); } else { -appl->rpth=apr_pstrcat(wa_pool,"/",buf,"/",NULL); + appl->rpth=apr_pstrcat(wa_pool,"/",buf,"/",NULL); } /* Zero all other parameters */ > Also, does the module have some way of resolving symbolic links? laserweb > is symlinked into the $CATALINA_HOME/webapps directory, yet the > /webapp-info/ page from my virtual host displays the "actual" directory > location (the target of the link)---I found this a little odd. How does > the module know? I don't know... It's all done in APR... I simply check if that directory exists or not... Note, the webapp-info should be _really_ disabled on any propduction server... > My understanding is that using mod_webapp, tomcat virtual hosts don't > matter. Is this incorrect? Can anyone shed some light on this? Nope, they don't... You can even remove the whole full first part of the server.xml (you can keep only the Tomcat-Apache engine). If you need virtualhost support, just configure them in your Apache httpd.conf, and put your WebAppDeploy lines inside your tags. It's all done automatically (no mod_rewrite, no auto-creation of configuration files, no nothing) Pier
Multiple Url Patterns
I have a number of servlets deployed in a web application under tomcat, one of these servlets is specifically accessed as follows: http://localhost/servlets/exampleServlet My problem is that I need to access exactly the same servlet but using a different url pattern, i.e. this one http://localhost/exampleServlet Is it possible to deploy a servlet under two pattern. i.e. as follows in the web.xml file under the servlet mapping.. exampleServlet /servlets/exampleServlet/* /exampleServlet/* I've tried it like this but have been unable to get it to work and I need to do this for backwards compatibility onyl. Is it possible to do this any other way if not possible in this way? Jonathan Holloway.
RE: Link error with mod_webapp
Pier That's correct. What do I need to do now? Excuse my ignorance but compilation and linking etc is not my strong point!! Regards Shaun -Original Message- From: Pier P. Fumagalli [mailto:[EMAIL PROTECTED]] Sent: 21 August 2001 14:37 To: [EMAIL PROTECTED] Subject: Re: Link error with mod_webapp Shaun Campbell at [EMAIL PROTECTED] wrote: > There was a thread going around a week or so ago about an error: > > Linking Apache 1.3 WebApp Module > /home/shaun/tomcat-connectors/webapp/apr/libtool: mod_webapp.lo: command not > found > make[1]: *** [mod_webapp.so] Error 127 > make[1]: Leaving directory `/home/shaun/tomcat-connectors/webapp/apache-1.3' > make: *** [local-all] Error 2 > > This appears to be to do with the timestamp command in the file > mod_webapp.lo. Did it ever get resolved? > > I am trying to build mod_webapp on RedHat Linux 7.1 and as you can see I too > have the error. > > Thanks for any help. Easy... What does "apxs -q LD_SHLIB" tells you? I believe it's not reporting your DLL linker... Pier
Re: AW: AW: tomcat and apache jsp execution
Mel, hmmm... yep - think you might be onto it there (o: ok... just been re-reading the docs, and to be honest I'm not sure what the block is about, because I cant find that class either - I would have expected it to be in webserver.jar... anyway, what I think you should do is take that out.. .and put this in: pop that under the similar entry to Ajp12. Note thats a Connector not a RequestInterceptor. I'm not a tc developer, so wont be able to go into detail, just making sure we get it right. Anyway, that should (fingers crossed) sort things out (o: On the other hand, you could also try changing your JkMounts from to use the ajp12 worker instead of ajp13. but try putting the above in server.xml first and see how you go. cheers dim On Tue, 21 Aug 2001, Bernier, Melanie wrote: > Hi Dmitri, > > I can't find anything useful in the logs:-( > > As I was reading the documentation from my colleague, I remembered something > about RequestInterceptor. I read somewhere on the documentation for ajp13 > connection to add in the server.xml : > > className="org.apache.tomcat.modules.server.Ajp13Interceptor" >port="8009"/> > > When I tried it, I was getting > > FATAL: configuration error > java.lang.ClassNotFoundException: > org.apache.tomcat.modules.server.Ajp13Interceptor ...(and > blablabla). > > Could that be related to my problem? > > mel >
does tomcat3.2.1 and apache1.3.14 are slow
Hi, Can anybody tell me that why tomcat is slow handling the request coming form Apache1.3.14. I am using Window2000 prof. Pls help Rajesh
Re: tomcat 4 datasource casting
Lin, Zhongwu at [EMAIL PROTECTED] wrote: > Craig, > > This bring up an interesting question: > > In installation guide for soap 2.2, it requires that mail.jar, > activation.jar etc be in CLASSPATH for Tomcat 3.2. But for Tomcat 4.0 do we > put them in > > $CATALINA_HOME/common/lib > or include these jar files in the CLASSPATH. > I don't see documentation on this topic. Those (mail and activation) could either be put in your WEB-INF/lib (if only required by 1 application), or in your CATALINA_HOME/lib directory (if all of them need those jars)... I don't think they require any weird class casting/class loading Blablabla... Sometimes JDBC is a little bit "overreactive" :) :) :) Pier
Re: tomcat 4 mod_webapp config
[EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > Pier-- > > Thanks for the patch. I'll give this a shot today or tomorrow and see if > that does the trick. AFAICS, it should... (I'm going to put it down in CVS later today) Pier
Re: Q: How to use mod_rewrite with mod_jk?
It does appear that you have everything set up properly. I'm unable to duplicate the behavior you're seeing, but the environment I have to test it is Solaris, Apache 1.3.19, Tomcat 3.2.1. I wonder if it's a bug just with directory listing? Can you get to servlets or JSP pages via the rewrite rule? What happens when you do the rewritten url with a trailing slash (e.g. http://localhost/rewrite/examples/)? There's been some discussion in the mailing list about handling of trailing slashes, and I seem to recall there's some issues with that. Apologies that I couldn't be more help... dwh amduser amduser wrote: >[...] > >The rewrite log says > >][rid#8650b0/initial] (3) applying pattern '^/rewrite/examples(.*)' to >uri '/rewrite/examples' >127.0.0.1 - - [21/Aug/2001:00:05:25 -0400] >[foo.lan/sid#7a60f0][rid#8650b0/initial] (2) rewrite /rewrite/examples >-> /webapps/examples >127.0.0.1 - - [21/Aug/2001:00:05:25 -0400] >[foo.lan/sid#7a60f0][rid#8650b0/initial] (2) forcing >'/webapps/examples' to get passed through to next API URI-to-filename >handler > >* Response to http://localhost/webapps/examples: > > ... correct directory listing ... > >* Response to http://localhost/rewrite/examples: > > Not Found (404) > Original request: /rewrite/examples > Not found request: /rewrite/examples > >[...etc...] >
Re: Link error with mod_webapp
Shaun Campbell at [EMAIL PROTECTED] wrote: > Pier > > That's correct. What do I need to do now? Excuse my ignorance but > compilation and linking etc is not my strong point!! Did you install Apache from an RPM, or you built it yourself? Can you send the output of "httpd -l" ? Pier
how to automatically load the servlet
Hi, How to load the servlet when tomcat3.2.1 starts can anyone help me Rajesh
Re: how to automatically load the servlet
1) Read the FAQ: http://jakarta.apache.org/site/faqs.html 2) Where you will discover: http://jakarta.apache.org:8080/jyve-faq/Turbine/screen/DisplayQuestionAnswer/action/SetAll/project_id/2/faq_id/12/topic_id/43/question_id/230 dwh Rajesh wrote: >Hi, >How to load the servlet when tomcat3.2.1 starts > >can anyone help me >Rajesh > >
RE: how to automatically load the servlet
See the servlet parameter. -- Thomas | -Original Message- | From: Rajesh [mailto:[EMAIL PROTECTED]] | Sent: 21 August 2001 15:25 | To: [EMAIL PROTECTED] | Subject: how to automatically load the servlet | | | Hi, | How to load the servlet when tomcat3.2.1 starts | | can anyone help me | Rajesh | | * Copyright ERA Technology Ltd. 2001. (www.era.co.uk). All rights reserved. Confidential. No liability whatsoever is accepted for any loss or damage suffered as a result of accessing this message or any attachments.
where is build-solaris.sh
Hi, I just downloaded the tomcat 3.2.3 src tarball. I cant find the build-solaris.sh or README.solaris or any Makefile for building the solaris mod_jk.so Thanks Shahed
RE: Link error with mod_webapp
Pier I think I built it myself as opposed to an rpm. I think my config command was: ./configure --prefix=/usr/local/apache \ --enable-module=so Anyway here is the output from httpd -l: Compiled-in modules: http_core.c mod_env.c mod_log_config.c mod_mime.c mod_negotiation.c mod_status.c mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_access.c mod_auth.c mod_so.c mod_setenvif.c suexec: disabled; invalid wrapper /usr/local/apache/bin/suexec Regards Shaun -Original Message- From: Pier P. Fumagalli [mailto:[EMAIL PROTECTED]] Sent: 21 August 2001 15:05 To: [EMAIL PROTECTED] Subject: Re: Link error with mod_webapp Shaun Campbell at [EMAIL PROTECTED] wrote: > Pier > > That's correct. What do I need to do now? Excuse my ignorance but > compilation and linking etc is not my strong point!! Did you install Apache from an RPM, or you built it yourself? Can you send the output of "httpd -l" ? Pier
Re: Configuration
It doesn't work !!! I wrote WebAppDeploy /var/www/mysite.com conn / in httpd.conf but the jsp pages don't work. How can I setup the server.xml? I have to create a tag .. Tomcat home is in /usr/tomcatb6 My sites (html and jsp file) are in /var/www/... Roberto. - Original Message - From: "Pier P. Fumagalli" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 3:42 PM Subject: Re: Configuration > Roberto B. at [EMAIL PROTECTED] wrote: > > > > > DocumentRoot /var/www/mysite.com > > ServerName www.mysite.com > > WebAppConnection conn warp localhost:8008 > > WebAppDeploy mysite.com conn /var/www/mysite.com > > > > Your WebAppDeploy is wrong As written in the install.txt file it should > be > > WebAppDeploy /var/www/mysite.com conn / > > Pier >
RE: probing tomcat
Port 8007 shouldn't be available for that purpose.. It should only accept connections from the webserver you are running. If you telnet in, you will get a lot of bad packets and if you use an older version of tomcat, then tomcat/apache connection will be down when you telnet in.. If you run standalone check to see if there is a reply on port 8080, if you don't run standalone check to see if if a servlet gives a response. Mvgr, Martin > -Original Message- > From: Richard Draucker [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 2:50 PM > To: [EMAIL PROTECTED] > Subject: Re: probing tomcat > > > 1) Try hitting it on its default port, e.g. 8080 > 2) Try to telnet to it on its ajp port, e.g. 8007 > > On Tuesday 21 August 2001 08:32 am, you wrote: > > Hi, > > does anybody know whether there exists a way to probe from a remote > > computer whether tomcat is still alive ? > > > > Steven > >
Re: Multiple Url Patterns
On Tue, 21 Aug 2001, Jonathan Holloway wrote: > My problem is that I need to access exactly the same servlet but using > a different url pattern. ... > Is it possible to deploy a servlet under two pattern. i.e. as follows Does it matter if you get two instances of the same servlet? If two instances is ok then you can include two sections using the same servlet-class but different servlet-name and map these two two different URLs. The Deployment Descriptor DTD seems to allow only one url-pattern in servlet-mapping (reading the servlet 2.2 spec). -- Johannes Lehtinen <[EMAIL PROTECTED]>, http://www.iki.fi/jle/
How to make a connection pool when Tomcat start?
¡¡How can I make a connection pool when Tomcat start?
Re: Configuration
Roberto B. at [EMAIL PROTECTED] wrote: > It doesn't work !!! It doesn't help that you're not looking at the logfiles :) > I wrote WebAppDeploy /var/www/mysite.com conn / in httpd.conf but the jsp > pages don't work. Did you read that there was a patch for deployinhe rooot directory of the server? D you apply it? What happens if you do something like WebAppDeploy /var/www/myste.com conn /test And then hit the site with a particular /test/test.jsp page? > How can I setup the server.xml? I have to create a tag .. Yo your server.xml EMPTY... You don¹t need to write configurations twice. > Tomcat home is in /usr/tomcatb6 > My sites (html and jsp file) are in /var/www/... Roberto, start looking at the log files, tooo Pier
RE: Tomcat: Getting Server Process information
Depending on which database your are using, you can use commands to find out how many connections have been made total and how many are currently open. For example, to see the amount of current connections in mySQL, you can type "show processlist;" Brandon -Original Message- From: A.L. [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 5:02 PM To: [EMAIL PROTECTED] Subject: Tomcat: Getting Server Process information Is it possible to see how many sessions are existing at a certain time for a web application. Also is it possible to find out exactly how many database connections are made for a web application. i have attempted to create session specific database connections, but I want to see that everything is working properly. Thanks in advance, -Amos __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
How to make a connection pool when Tomcat start?
This is just one possible way, but go to http://www.Javaexchange.com there is a good example there. __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: how to automatically load the servlet
Hi, Thanx for everyone's response. Can anyone tell me why tomcat takes time to forwards the request. I am using tomcat3.2.1 and apache1.3.14 with mod_jk.dll Rajesh Thomas Tuft Muller wrote: > See the servlet parameter. > > -- > > Thomas > > | -Original Message- > | From: Rajesh [mailto:[EMAIL PROTECTED]] > | Sent: 21 August 2001 15:25 > | To: [EMAIL PROTECTED] > | Subject: how to automatically load the servlet > | > | > | Hi, > | How to load the servlet when tomcat3.2.1 starts > | > | can anyone help me > | Rajesh > | > | > > * > Copyright ERA Technology Ltd. 2001. (www.era.co.uk). All rights reserved. > Confidential. No liability whatsoever is accepted for any loss or damage > suffered as a result of accessing this message or any attachments.
Re: tomcat 4 mod_webapp config
Pier -- The patch works fine for me -- the deploy directive works as expected when using a URI of "/" I am now seeing some other weirdness. In $CATALINA_HOME/conf/server.xml, this context has a jdbc resource defined with it. I'm testing access to it with a simple jsp which picks up the Context, looks up the resource, and casts to a javax.sql.DataSource. When this context is accessed via Tomcat's HTTP server port, it works fine. When I try to access it via the mod_webapp connector via apache, Context.lookup() returns a null reference. What's odd is that I tried iterating through what was bound in that context, and it does show a reference to the specified resource via tomcat http and apache. It's just that I can't successfully do the lookup() via apache. I've tried both of the syntaxes (sp?) for specifying a resource-ref in the webapp's web.xml suggested by Craig here recently. Here's what I have now: laser datasource jdbc/laser_ds javax.sql.DataSource I don't know how the naming context would be different between the two setups, unless the Warp connector interferes somehow (I'm not familiar with its internals at all) I'm stumped. Any ideas? -jason "Pier P. Fumagalli" <[EMAIL PROTECTED]> 08/21/2001 09:00 AM Please respond to tomcat-user To: [EMAIL PROTECTED] cc: Subject:Re: tomcat 4 mod_webapp config [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > Pier-- > > Thanks for the patch. I'll give this a shot today or tomorrow and see if > that does the trick. AFAICS, it should... (I'm going to put it down in CVS later today) Pier
Re: How to make a connection pool when Tomcat start?
Hi, create a connection pool in the init-method of a servlet. In web.xml setup this servlet to . Though the init()-method of the servlet will be executed during tomcat-startup. Hth Peter hongx wrote: > > ¡¡How can I make a connection pool when Tomcat start?
Re: Configuration
I setup the httpd.conf like you do. I setup the server.xml as at first installation. I deleted the log file ( of apache and tomcat) then I rebooted the system. I have seen the log after reboot and catalina.out: Starting service Tomcat-Standalone Apache Tomcat/4.0-b6 Starting service Tomcat-Apache Apache Tomcat/4.0-b6 apache error log: [Tue Aug 21 18:52:10 2001] [notice] caught SIGTERM, shutting down [Tue Aug 21 18:54:04 2001] [error] Connection "conn" cannot connect [Tue Aug 21 18:54:04 2001] [error] Cannot open connection "conn" [Tue Aug 21 18:54:04 2001] [error] Connection "conn" cannot connect [Tue Aug 21 18:54:04 2001] [error] Cannot open connection "conn" [Tue Aug 21 18:54:04 2001] [error] Connection "conn" cannot connect [Tue Aug 21 18:54:04 2001] [error] Cannot open connection "conn" [Tue Aug 21 18:54:04 2001] [error] Connection "conn" cannot connect [Tue Aug 21 18:54:04 2001] [error] Cannot open connection "conn" [Tue Aug 21 18:54:04 2001] [error] Connection "conn" cannot connect [Tue Aug 21 18:54:04 2001] [error] Cannot open connection "conn" [Tue Aug 21 18:54:04 2001] [notice] Apache/1.3.9 (Unix) Debian/GNU configured -- resuming normal operations [Tue Aug 21 18:54:04 2001] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache/suexec) maybe the problem is the warp connector?? Roberto. - Original Message - From: "Pier P. Fumagalli" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 4:44 PM Subject: Re: Configuration Roberto B. at [EMAIL PROTECTED] wrote: > It doesn't work !!! It doesn't help that you're not looking at the logfiles :) > I wrote WebAppDeploy /var/www/mysite.com conn / in httpd.conf but the jsp > pages don't work. Did you read that there was a patch for deployinhe rooot directory of the server? D you apply it? What happens if you do something like WebAppDeploy /var/www/myste.com conn /test And then hit the site with a particular /test/test.jsp page? > How can I setup the server.xml? I have to create a tag .. Yo your server.xml EMPTY... You don¹t need to write configurations twice. > Tomcat home is in /usr/tomcatb6 > My sites (html and jsp file) are in /var/www/... Roberto, start looking at the log files, tooo Pier
Re: tomcat 4 mod_webapp config
[EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: > Pier -- > > The patch works fine for me -- the deploy directive works as expected when > using a URI of "/" > > I am now seeing some other weirdness. In $CATALINA_HOME/conf/server.xml, > this context has a jdbc resource defined with it. I'm testing access to > it with a simple jsp which picks up the Context, looks up the resource, > and casts to a javax.sql.DataSource. When this context is accessed via > Tomcat's HTTP server port, it works fine. When I try to access it via the > mod_webapp connector via apache, Context.lookup() returns a null > reference. > > What's odd is that I tried iterating through what was bound in that > context, and it does show a reference to the specified resource via tomcat > http and apache. It's just that I can't successfully do the lookup() via > apache. > > I've tried both of the syntaxes (sp?) for specifying a resource-ref in the > webapp's web.xml suggested by Craig here recently. Here's what I have > now: > > > laser datasource > jdbc/laser_ds > javax.sql.DataSource > > > I don't know how the naming context would be different between the two > setups, unless the Warp connector interferes somehow (I'm not familiar > with its internals at all) > > I'm stumped. Any ideas? Well, it's definitely weird, as WARP uses the same classes of HTTP for contexts. There shouldn't be any functional difference between the two. The only thing I can possibly think of is that the two web-application instances (the one accessed thru HTTP, and the one accessed thru Apache and WARP) are different, they are _NOT_ the same instance... And this might create some problems (but I don't think so)... Craig, any hint? Pier
Re: Configuration
Roberto B. at [EMAIL PROTECTED] wrote: > > I setup the httpd.conf like you do. I setup the server.xml as at first > installation. > I deleted the log file ( of apache and tomcat) then I rebooted the system. > I have seen the log after reboot and Rebooted the system? WHY? Can't you just stop-and-restart? I thought you were using Linux (Pier has an uptime of 628 days on one old Linux box in Italy!) > catalina.out: > > Starting service Tomcat-Standalone > Apache Tomcat/4.0-b6 > Starting service Tomcat-Apache > Apache Tomcat/4.0-b6 That's right... > apache error log: > > [Tue Aug 21 18:52:10 2001] [notice] caught SIGTERM, shutting down > [Tue Aug 21 18:54:04 2001] [error] Connection "conn" cannot connect > [Tue Aug 21 18:54:04 2001] [error] Cannot open connection "conn" > [Tue Aug 21 18:54:04 2001] [error] Connection "conn" cannot connect > [Tue Aug 21 18:54:04 2001] [error] Cannot open connection "conn" > [Tue Aug 21 18:54:04 2001] [error] Connection "conn" cannot connect > [Tue Aug 21 18:54:04 2001] [error] Cannot open connection "conn" > [Tue Aug 21 18:54:04 2001] [error] Connection "conn" cannot connect > [Tue Aug 21 18:54:04 2001] [error] Cannot open connection "conn" > [Tue Aug 21 18:54:04 2001] [error] Connection "conn" cannot connect > [Tue Aug 21 18:54:04 2001] [error] Cannot open connection "conn" > [Tue Aug 21 18:54:04 2001] [notice] Apache/1.3.9 (Unix) Debian/GNU > configured -- resuming normal operations > [Tue Aug 21 18:54:04 2001] [notice] suEXEC mechanism enabled (wrapper: > /usr/lib/apache/suexec) > > maybe the problem is the warp connector?? Ever tried doing a kill -HUP [your httpd PID goes here] That should reset the connection which (I believe) is not opened in your server since you start everything from your RC scripts (without checking if everything RUNS before running other stuff)... FWICS, the WARP connector is working perfectly... Pier
RE: tomcat 4 datasource casting
On Tue, 21 Aug 2001, Lin, Zhongwu wrote: > Craig, > > This bring up an interesting question: > > In installation guide for soap 2.2, it requires that mail.jar, > activation.jar etc be in CLASSPATH for Tomcat 3.2. But for Tomcat 4.0 do we > put them in > > $CATALINA_HOME/common/lib > or include these jar files in the CLASSPATH. > I don't see documentation on this topic. > The docs are coming soon. Short answer of where to put JARs depends on where you need them visible: * $CATALINA_HOME/common/lib - Visible to *both* Catalina internal classes and to web applications. The JDBC optional package JAR needed to go here. * $CATALINA_HOME/server/lib - Visible to Catalina internal classes (your own custom realms, the JDBC driver used by JDBCRealm, and so on). * $CATALINA_HOME/lib - Visible to web apps only In the particular case of the SOAP 2.2 stuff (or JAXM, or lots of other applicaiton only things), Catalina internal classes don't get involved, so you can put mail.jar and activation.jar into $CATALINA_HOME/lib. > > Zhongwu > Craig > > > -Original Message- > > From: Craig R. McClanahan [SMTP:[EMAIL PROTECTED]] > > Sent: Monday, August 20, 2001 5:16 PM > > To: [EMAIL PROTECTED] > > Subject:Re: tomcat 4 datasource casting > > > > Where do you have the jdbc2_0-stdext.jar file? I'm betting that it needs > > to be in $CATALINA_HOME/common/lib only for this to work -- because JAR > > files here are on the class loading path for both Catalina internal > > classes and web application classes. > > > > Craig > > > > > > On Mon, 20 Aug 2001 [EMAIL PROTECTED] wrote: > > > > > Hello all, > > > > > > I read the great message Craig McClanahan posted in the archives (from > > > Aug 4) about how to setup and use a tomcat 4 datasource. All has seemed > > > > > to go pretty well, but I'm having a funny problem, which I'm not sure is > > a > > > Tyrex problem, a Tomcat 4 problem or a Java education problem on my part > > > > > :). (I'm using Tomcat 4 beta 7) > > > > > > When I try to get a DataSource from JNDI, I can retrieve a reference > > just > > > fine. The problem is that I am having trouble casting it to a > > > javax.sql.DataSource. It returns an instance of > > > tyrex.jdbc.xa.EnabledDataSource. If I try to cast to > > > javax.sql.DataSource, I get a ClassCastException from the server. I > > > looked up this class in the Tyrex API docs, and it does in fact > > implement > > > javax.sql.DataSource -- I think I should be able to cast to it because > > of > > > that. If I work with the tyrex implementation directly, all is ok > > (i.e., > > > calling tyrex.jdbc.xa.EnabledDataSource.getConnection()), but I > > obviously > > > won't want to care about the particular implementation in this case. > > > > > > If it helps, here is the code I'm trying to use: > > > > > > -- > > > ctx = new InitialContext(); > > > ds = (DataSource)ctx.lookup("java:comp/env/jdbc/lis_ds"); > > > -- > > > > > > That failed, so I added this for debugging: > > > > > > -- > > > Object o = ctx.lookup("java:comp/env/jdbc/lis_ds"); > > > if (o == null) { > > >System.out.println("looked up a null object"); > > > } else { > > >System.out.println("o is of type: " + o.getClass().getName()); //<-- > > > prints "tyrex.jdbc.xa.EnabledDataSource" > > > } > > > -- > > > > > > The exceptions I get are like this: > > > > > > -- > > > java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource > > > at report.ReportPrefs.setDateDefaults(ReportPrefs.java:52) > > > at report.ReportPrefs.(ReportPrefs.java:16) > > > at java.lang.Class.newInstance0(Native Method) > > > at java.lang.Class.newInstance(Class.java:237) > > > at java.beans.Beans.instantiate(Beans.java:207) > > > at java.beans.Beans.instantiate(Beans.java:51) > > > > > > -- > > > > > > Any ideas? > > > > > > Thanks, > > > Jason Vasquez > > > >
Re: tomcat 4 datasource casting
On Tue, 21 Aug 2001, Pier P. Fumagalli wrote: > Sometimes JDBC is a little bit "overreactive" :) :) :) > Actually, the difference is caused by the fact that Catalina needs to do the same casts as the web app does, so it needs to use exactly the same javax.sql.DataSource class definition. It's not JDBC that is doing this, it's the way class loading works in Java. For most application requirments, Catalina internal classes don't "need to know" about them, so $CATALINA_HOME/lib works great. > Pier > > Craig
Re: JMX related
On Tue, 21 Aug 2001, Sriram Rajamanuri wrote: > Hi > > I v installed tomcat 4.0 b7 on win nt 4.0. I wonder how the MBeans can be > registered with the tomcat server. > > All over the net i have found documentation related to JBOSS-Tomcat, which i > do not want. I need to install MBeans on a standalone Tomcat - Catalina > container and manage them. > > Also, does it suffice that i put the jmxri.jar in the $CATALINA_HOME/lib > directory before starting Tomcat so that all the JMX related stuff is > loaded? > > Any help in this regard would greatly be appreciated. > > Tx, > Sriram > Tomcat is *not* a JMX server, so it doesn't have any knowledge of MBeans. However, you can run web applications that use JMX just like any other API -- simply include the appropriate JARs in /WEB-INF/lib of your web application. Craig
log4j in custom tags
I want to use log4j from within a custom tag. Now, since the custom tag will be instanciated from the jasper JVM, the logj4 properties file of the webapp will of course not be used to setup log4j. How can I configure log4j in a custom tag to use the same log-writer than my web app - or how can I configure it at all to redirect output to a certain file? It does not seem to go into the jasper.log (which I have configured in sever.xml to be the log target for jasper) Many thanks in advance, Andreas
Re: Multiple Url Patterns
On Tue, 21 Aug 2001, Jonathan Holloway wrote: > I have a number of servlets deployed in a web application under tomcat, > one of these servlets is specifically accessed as follows: > > http://localhost/servlets/exampleServlet > > My problem is that I need to access exactly the same servlet but using a > different > url pattern, i.e. this one > > http://localhost/exampleServlet > > Is it possible to deploy a servlet under two pattern. i.e. as follows in > the web.xml > file under the servlet mapping.. > > > exampleServlet > /servlets/exampleServlet/* > /exampleServlet/* > > You cannot do this in one mapping, but you can do it in two: exampleServlet /servlets/exampleServlet/* exampleServlet /exampleServlet/* There's no limit on the number of different mappings you can point at the same definition. > I've tried it like this but have been unable to get it to work and I need > to do this for > backwards compatibility onyl. Is it possible to do this any other way if > not possible > in this way? > > Jonathan Holloway. > > Craig
Re: Configuration
- Original Message - From: "Pier P. Fumagalli" To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 5:28 PM Subject: Re: Configuration > Rebooted the system? WHY? Can't you just stop-and-restart? I thought you > were using Linux (Pier has an uptime of 628 days on one old Linux box in > Italy!) I'm more secure that nothing remains in memory.. you know.. I'm new to linux.. I was (I'm) a windows user!!! So.. I newly rebooted the system.. before I deleted the log file. Then I have done: kill -HUP [my httpd PID] apache error log: [Tue Aug 21 19:34:59 2001] [notice] caught SIGTERM, shutting down [Tue Aug 21 19:36:16 2001] [notice] Apache/1.3.9 (Unix) Debian/GNU configured -- resuming normal operations [Tue Aug 21 19:36:16 2001] [error] Connection "conn" cannot connect [Tue Aug 21 19:36:16 2001] [error] Cannot open connection "conn" [Tue Aug 21 19:36:16 2001] [error] Connection "conn" cannot connect [Tue Aug 21 19:36:16 2001] [error] Cannot open connection "conn" [Tue Aug 21 19:36:16 2001] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache/suexec) [Tue Aug 21 19:36:16 2001] [error] Connection "conn" cannot connect [Tue Aug 21 19:36:16 2001] [error] Cannot open connection "conn" [Tue Aug 21 19:36:16 2001] [error] Connection "conn" cannot connect [Tue Aug 21 19:36:16 2001] [error] Cannot open connection "conn" [Tue Aug 21 19:36:16 2001] [error] Connection "conn" cannot connect [Tue Aug 21 19:36:16 2001] [error] Cannot open connection "conn" [Tue Aug 21 19:37:37 2001] [notice] SIGHUP received. Attempting to restart [Tue Aug 21 19:37:38 2001] [notice] Apache/1.3.9 (Unix) Debian/GNU configured -- resuming normal operations [Tue Aug 21 19:37:38 2001] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache/suexec) [Tue Aug 21 19:37:39 2001] [error] Invalid WARP protocol version 0.9 [Tue Aug 21 19:37:39 2001] [error] Cannot read packet (pr_warp_config.c:139) [Tue Aug 21 19:37:39 2001] [error] Cannot configure connection "conn" [Tue Aug 21 19:37:39 2001] [error] Invalid WARP protocol version 0.9 [Tue Aug 21 19:37:39 2001] [error] Cannot read packet (pr_warp_config.c:139) [Tue Aug 21 19:37:39 2001] [error] Cannot configure connection "conn" [Tue Aug 21 19:37:39 2001] [error] Invalid WARP protocol version 0.9 [Tue Aug 21 19:37:39 2001] [error] Cannot read packet (pr_warp_config.c:139) [Tue Aug 21 19:37:39 2001] [error] Cannot configure connection "conn" [Tue Aug 21 19:37:39 2001] [error] Invalid WARP protocol version 0.9 [Tue Aug 21 19:37:39 2001] [error] Cannot read packet (pr_warp_config.c:139) [Tue Aug 21 19:37:39 2001] [error] Cannot configure connection "conn" [Tue Aug 21 19:37:39 2001] [error] Invalid WARP protocol version 0.9 [Tue Aug 21 19:37:39 2001] [error] Cannot read packet (pr_warp_config.c:139) [Tue Aug 21 19:37:39 2001] [error] Cannot configure connection "conn" In /usr/tomcat4b6/logs there is the file apache_log.2001-08-21.txt : 2001-08-21 19:37:38 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1031 to /127.0.0.1:8008 2001-08-21 19:37:39 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1032 to /127.0.0.1:8008 2001-08-21 19:37:39 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1033 to /127.0.0.1:8008 2001-08-21 19:37:39 [org.apache.catalina.connector.warp.WarpConnection] Exception on socket java.io.IOException: Premature packet header end at org.apache.catalina.connector.warp.WarpConnection.recv(WarpConnection.java:2 36) at org.apache.catalina.connector.warp.WarpConfigurationHandler.handle(WarpConfi gurationHandler.java:94) at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:18 9) at java.lang.Thread.run(Thread.java:579) 2001-08-21 19:37:39 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1034 to /127.0.0.1:8008 2001-08-21 19:37:39 [org.apache.catalina.connector.warp.WarpConnection] Exception on socket java.io.IOException: Premature packet header end at org.apache.catalina.connector.warp.WarpConnection.recv(WarpConnection.java:2 36) at org.apache.catalina.connector.warp.WarpConfigurationHandler.handle(WarpConfi gurationHandler.java:94) at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:18 9) at java.lang.Thread.run(Thread.java:579) 2001-08-21 19:37:39 [org.apache.catalina.connector.warp.WarpConnector] Connection from /127.0.0.1:1035 to /127.0.0.1:8008 2001-08-21 19:37:39 [org.apache.catalina.connector.warp.WarpConnection] Exception on socket java.io.IOException: Premature packet header end at org.apache.catalina.connector.warp.WarpConnection.recv(WarpConnection.java:2 36) at org.apache.catalina.connector.warp.WarpConfigurationHandler.handle(WarpConfi gurationHandler.java:94) at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:18 9) at java.lang.Thread.run(Thread.java:579) 2001-08-21 19:37:39 [org.apache.catalina.connector.warp.WarpConnection] Exception on socket java.i
Re: Bug in ServletResponse.flushBuffer() in Tomcat 4.0b7?
Jonathan Eric Miller at [EMAIL PROTECTED] wrote: > I'm having problems using ServletResponse.flushBuffer() and Tomcat 4.0b7. > The following servlet demonstrates. > > What I want it to do is print out the title and the "Test 1" line. Then, > pause for 10 seconds and print out the "Test 2" line. It doesn't work the > first time through. However, if I then hit Refresh in my browser after going > through it once, you can see clearly that it prints out the first line > pauses and prints out the last line as I would expect it to. Is this a bug? > Can someone else reproduce this? > > The reason I want to get this to work is that I have a servlet where I have > a page with a Submit button on it, then on the next page, there is sometimes > a few second lag while performing an update on a directory/database. I've > had problems in the past where users click the Submit multiple times because > they think it's stuck. Actually, it's not, it's just slow. So, what I want > to do is print out at least the top part of the page so that the Submit > button/previous page is no longer available for them to click on. If someone > could fix this for the final version of Tomcat 4, I would greatly appreciate > it. Either that or, if anyone else knows of a work around, that would be > appreciated too. > > Thanks, Jon I just tested your servlet, and it works as expected... I get the first part, then the second part after 10 seconds... To verify that it did that correctly, I placed the compiled class in $CATALINA_HOME/webapps/ROOT/WEB-INF/classes/SimpleServlet.class and then I did # telnet localhost 8080 Trying 127.0.0.1... Connected to localhost.betaversion.org. Escape character is '^]'. GET /servlet/TestFlush HTTP/1.0 HTTP/1.1 200 OK Content-Type: text/html Date: Tue, 21 Aug 2001 16:03:42 GMT Server: Apache Tomcat/4.0-b8-dev (HTTP/1.1 Connector) Connection: close SimpleServlet Test 1 Test 2 Connection closed by foreign host. # "Test 1" came out as soon as I hit return twice after HTTP/1.0, and "Test 2" after 10 seconds... It's the browser... Pier
Re: Configuration
Roberto B. at [EMAIL PROTECTED] wrote: > >> Rebooted the system? WHY? Can't you just stop-and-restart? I thought you >> were using Linux (Pier has an uptime of 628 days on one old Linux box in >> Italy!) > > I'm more secure that nothing remains in memory.. you know.. I'm new to > linux.. I was (I'm) a windows user!!! Well, UNIX != Windows... You don't need to reboot... > So.. I newly rebooted the system.. before I deleted the log file. > Then I have done: > kill -HUP [my httpd PID] Kewl... > apache error log: Quoting only the relevant parts... > [Tue Aug 21 19:37:37 2001] [notice] SIGHUP received. Attempting to restart > [Tue Aug 21 19:37:38 2001] [notice] Apache/1.3.9 (Unix) Debian/GNU > configured -- resuming normal operations That's cool... It's restarting > [Tue Aug 21 19:37:39 2001] [error] Invalid WARP protocol version 0.9 Whops.. That's your problem... You're using a 4.0b7 module with a 4.0b6 Tomcat... Easy if you know what to read... > I have no more hopes to succeed to configure Tomcat... :(( You just need to have the right stuff... And consider you're working with PRE-ALPHA code (the webapp module has not yet officially been released, not even in Beta) > p.s. Nobody can come to at my office!?!?!? You would loose all the fun... :) Pier
Re: Configuration
So.. I try to install Tomcat 4b7??? Do I have to build mod_webapp again??? (I have an old kernel version) Thanks...Roberto. - Original Message - From: "Pier P. Fumagalli" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 6:16 PM Subject: Re: Configuration > Roberto B. at [EMAIL PROTECTED] wrote: > > > >> Rebooted the system? WHY? Can't you just stop-and-restart? I thought you > >> were using Linux (Pier has an uptime of 628 days on one old Linux box in > >> Italy!) > > > > I'm more secure that nothing remains in memory.. you know.. I'm new to > > linux.. I was (I'm) a windows user!!! > > Well, UNIX != Windows... You don't need to reboot... > > > So.. I newly rebooted the system.. before I deleted the log file. > > Then I have done: > > kill -HUP [my httpd PID] > > Kewl... > > > apache error log: > > Quoting only the relevant parts... > > > [Tue Aug 21 19:37:37 2001] [notice] SIGHUP received. Attempting to restart > > [Tue Aug 21 19:37:38 2001] [notice] Apache/1.3.9 (Unix) Debian/GNU > > configured -- resuming normal operations > > That's cool... It's restarting > > > [Tue Aug 21 19:37:39 2001] [error] Invalid WARP protocol version 0.9 > > Whops.. That's your problem... You're using a 4.0b7 module with a 4.0b6 > Tomcat... Easy if you know what to read... > > > I have no more hopes to succeed to configure Tomcat... :(( > > You just need to have the right stuff... And consider you're working with > PRE-ALPHA code (the webapp module has not yet officially been released, not > even in Beta) > > > p.s. Nobody can come to at my office!?!?!? > > You would loose all the fun... :) > > Pier >
RE: SSL-How-2 for Tomcat 4
No errors in the log file...BUT I did discover something unusual. I downloaded and installed Tomcat4b7 (been using Tomcat4b6) and - even though I have JAVA_HOME set to c:\java\jdk1.3.1 it saw the older version c:\java\jdk1.3 - SO... Why does it appear that Tomcat is hard coded to the older jdk? Weirdness... I'm staying with the examples (for the moment) and am having some limited success modifying the "server.xml" with the "new" version of tomcat... That is to say...I am getting Error Messages (which is an improvement!) so I can at least find out what got hosed by development (in-house). More later... Yes - I meant to send the java.security file - Mea Culpa...too much work...too little sleep... OO Caffeine :) -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 12:13 AM To: [EMAIL PROTECTED] Subject: Re: SSL-How-2 for Tomcat 4 I noticed that you have the keystore file set to the following. Just a guess, but, I'm not sure \ is a valid character for that. I think for some files, you use / even if you are on Windows. You might want to try just using the default keystore location which is in your home directory and see if that makes any difference. KeystoreFile="z:\.keystore" Try checking the log files. Any errors? Also, what JVM are you using? Also, why did you include java.policy. I'm guessing you meant to include java.security instead? Jon - Original Message - From: "Curtis Dougherty" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 20, 2001 5:23 PM Subject: RE: SSL-How-2 for Tomcat 4 > Take a chance kids... I'm tired... my URL is at the bottom of this thread (I > want to make EXAMPLES work before I get in any deeper) attached are my > server.xml files and java.policy > > drifting off now...z > > cd > > -Original Message- > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 5:18 PM > To: [EMAIL PROTECTED] > Subject: Re: SSL-How-2 for Tomcat 4 > > > What URL did you use to access the page? > > Jon > > - Original Message - > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, August 20, 2001 4:15 PM > Subject: RE: SSL-How-2 for Tomcat 4 > > > > No error message - per se... just no page to display > > > > -Original Message- > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > > Sent: Monday, August 20, 2001 2:23 PM > > To: [EMAIL PROTECTED] > > Subject: Re: SSL-How-2 for Tomcat 4 > > > > > > Are you receiving a specific error message? > > > > Jon > > > > - Original Message - > > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Monday, August 20, 2001 1:03 PM > > Subject: RE: SSL-How-2 for Tomcat 4 > > > > > > > I did... Still won't work... :( > > > > > > -Original Message- > > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, August 20, 2001 1:01 PM > > > To: [EMAIL PROTECTED] > > > Subject: Re: SSL-How-2 for Tomcat 4 > > > > > > > > > Try reading server.xml, I haven't had any problems here. All you have to > > do > > > is uncomment a few lines of code and run the keytool command that's > listed > > > there. Also, you need to make sure you have JSSE is installed. > > > > > > Jon > > > > > > - Original Message - > > > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Monday, August 20, 2001 10:19 AM > > > Subject: RE: SSL-How-2 for Tomcat 4 > > > > > > > > > > I wonder if anyone else has seen the eratic differences in behavior > > > between > > > > Win2k Pro and Win2K Server... BIG Difference in IIS5 but... > > > > > > > > Chris - > > > > If you see this thread... Why won't the "/examples" site won't > encrypt > > > > properly (https://localhost:8443/examples/servlets/index.html > > > > > > > > Thnx! > > > > cd > > > > > > > > -Original Message- > > > > From: Rob S. [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, August 20, 2001 10:05 AM > > > > To: [EMAIL PROTECTED] > > > > Subject: Re: SSL-How-2 for Tomcat 4 > > > > > > > > > > > > Interesting... well Chris is a regular so I'm sure he'll have > something > > > to > > > > add =) > > > > > > > > - r > > > > > > > > On Mon, 20 Aug 2001 09:54:15 -0500 [EMAIL PROTECTED] > wrote: > > > > > I would LOVE to think that BUT... alas...that has NOT been my > > > > experience... > > > > > > > > > > I did it to two different machines... step-by-step (good instruction > / > > > > > lousy program) is my guess... > > > > > > > > > > I using Win2K / IIS 5 / Tomcat4 b6...my app aside... I could NOT get > > > > > /examples to come over with SSL... I'm seeing a LOT of > inconsistency > > > > > (between win2k and win2k server et al) > > > > > > > > > > cd > > > > > -Original Message- > > > > > From: Rob S. [mailto:[EMAIL PROTECTED]] > > > > > Sent: Monday, August 20, 2001 9:48 AM > > > > > To: [EMAIL PROTECTED] > > > > > Subject: Re:
behaviour of getRequestDispatcher for bogus URLs
What should the behaviour be if I call forward() on a RequestDispatcher that (I know) doesn't exist? (Ya, ya, I get the same behaviour as if I didn't know it doesn't exist :-) For example: getServletContext(). getRequestDispatcher("/I_know_this_page_doesnt_exist.html"). forward(request, response); I would expect a NullPointerException but that is not what I get. Instead, I see the following output in my browser window (Mozilla 0.92): Or "The document contains no data" from Netscape 4.7. And, if I use lwp-request I get a 404 error which is reasonable. What "should" I get? The javadoc for ServletContext says: "This method returns null if the ServletContext cannot return a RequestDispatcher for any reason." But I'm not sure what that reason might be given that a bogus URL doesn't seem to do it. Also, the spec doesn't say anything about bad URLs. Thanks, Kevin. Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
Re: log4j in custom tags
On Tue, 21 Aug 2001, Andreas Leitner wrote: > > I want to use log4j from within a custom tag. Now, since the custom tag > will be instanciated from the jasper JVM, the logj4 properties file of > the webapp will of course not be used to setup log4j. > The tag might be instantiated by Jasper runtime (not JVM), but it will be loaded by the webapp classloader -- as long as the tag itself is in /WEB_INF/lib or /WEB-INF/classes. > How can I configure log4j in a custom tag to use the same log-writer > than my web app - or how can I configure it at all to redirect output to > a certain file? It does not seem to go into the jasper.log (which I have > configured in sever.xml to be the log target for jasper) > Remember that Log4J is *totally* independent of Tomcat (and Tomcat knows nothing about your use of it). Therefore, you won't be able to use Log4J to log to Tomcat's log files (unless you do some pretty intricate work to modify Tomcat to use Log4J itself, which is out of scope for this discussion). If you just want to log to Tomcat's log files, the easiest thing to do is call ServletContext.log() in your webapp. > > Many thanks in advance, > Andreas > > Craig
RE: SSL-How-2 for Tomcat 4
On Tue, 21 Aug 2001, Curtis Dougherty wrote: > No errors in the log file...BUT I did discover something unusual. I > downloaded and installed Tomcat4b7 (been using Tomcat4b6) and - even though > I have JAVA_HOME set to c:\java\jdk1.3.1 it saw the older version > c:\java\jdk1.3 - SO... > > Why does it appear that Tomcat is hard coded to the older jdk? Weirdness... > I'm staying with the examples (for the moment) and am having some limited > success modifying the "server.xml" with the "new" version of tomcat... That > is to say...I am getting Error Messages (which is an improvement!) so I can > at least find out what got hosed by development (in-house). > Check where your PATH variable points. I'll bet you've got "OLD_JAVA/bin" there. > More later... > > Yes - I meant to send the java.security file - Mea Culpa...too much > work...too little sleep... OO Caffeine :) > Craig > > > -Original Message- > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 12:13 AM > To: [EMAIL PROTECTED] > Subject: Re: SSL-How-2 for Tomcat 4 > > > I noticed that you have the keystore file set to the following. Just a > guess, but, I'm not sure \ is a valid character for that. I think for some > files, you use / even if you are on Windows. You might want to try just > using the default keystore location which is in your home directory and see > if that makes any difference. > > KeystoreFile="z:\.keystore" > > Try checking the log files. Any errors? > > Also, what JVM are you using? > > Also, why did you include java.policy. I'm guessing you meant to include > java.security instead? > > Jon > > - Original Message - > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, August 20, 2001 5:23 PM > Subject: RE: SSL-How-2 for Tomcat 4 > > > > Take a chance kids... I'm tired... my URL is at the bottom of this thread > (I > > want to make EXAMPLES work before I get in any deeper) attached are my > > server.xml files and java.policy > > > > drifting off now...z > > > > cd > > > > -Original Message- > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > > Sent: Monday, August 20, 2001 5:18 PM > > To: [EMAIL PROTECTED] > > Subject: Re: SSL-How-2 for Tomcat 4 > > > > > > What URL did you use to access the page? > > > > Jon > > > > - Original Message - > > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Monday, August 20, 2001 4:15 PM > > Subject: RE: SSL-How-2 for Tomcat 4 > > > > > > > No error message - per se... just no page to display > > > > > > -Original Message- > > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, August 20, 2001 2:23 PM > > > To: [EMAIL PROTECTED] > > > Subject: Re: SSL-How-2 for Tomcat 4 > > > > > > > > > Are you receiving a specific error message? > > > > > > Jon > > > > > > - Original Message - > > > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Monday, August 20, 2001 1:03 PM > > > Subject: RE: SSL-How-2 for Tomcat 4 > > > > > > > > > > I did... Still won't work... :( > > > > > > > > -Original Message- > > > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, August 20, 2001 1:01 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: Re: SSL-How-2 for Tomcat 4 > > > > > > > > > > > > Try reading server.xml, I haven't had any problems here. All you have > to > > > do > > > > is uncomment a few lines of code and run the keytool command that's > > listed > > > > there. Also, you need to make sure you have JSSE is installed. > > > > > > > > Jon > > > > > > > > - Original Message - > > > > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > > > > To: <[EMAIL PROTECTED]> > > > > Sent: Monday, August 20, 2001 10:19 AM > > > > Subject: RE: SSL-How-2 for Tomcat 4 > > > > > > > > > > > > > I wonder if anyone else has seen the eratic differences in behavior > > > > between > > > > > Win2k Pro and Win2K Server... BIG Difference in IIS5 but... > > > > > > > > > > Chris - > > > > > If you see this thread... Why won't the "/examples" site won't > > encrypt > > > > > properly (https://localhost:8443/examples/servlets/index.html > > > > > > > > > > Thnx! > > > > > cd > > > > > > > > > > -Original Message- > > > > > From: Rob S. [mailto:[EMAIL PROTECTED]] > > > > > Sent: Monday, August 20, 2001 10:05 AM > > > > > To: [EMAIL PROTECTED] > > > > > Subject: Re: SSL-How-2 for Tomcat 4 > > > > > > > > > > > > > > > Interesting... well Chris is a regular so I'm sure he'll have > > something > > > > to > > > > > add =) > > > > > > > > > > - r > > > > > > > > > > On Mon, 20 Aug 2001 09:54:15 -0500 [EMAIL PROTECTED] > > wrote: > > > > > > I would LOVE to think that BUT... alas...that has NOT been my > > > > > experience... > > > > > > > > > > > > I did it to two different machines... step-by-step (good > instruction > > / > > > > > > lousy pro
Re: Configuration
Roberto B. at [EMAIL PROTECTED] wrote: > So.. I try to install Tomcat 4b7??? > Do I have to build mod_webapp again??? (I have an old kernel version) Nope... Just replace only Tomcat with B7... You don't have to build anything, just download the B7 of 4.0, and keep the module you have (since that's the problem). You built it off the B7 sources (I remember that), so it should be all good... BTW, I got your binary, but what's your LIBC version (ls -la /lib/libc*) Pier
Runing Tomcat as a NT Service with JDK1.3.1 - problem solved
Hi, I´ve been working on the problem of using jk_nt_service with jdk1.3, the problem described on the documentation for Tomcat 3.2.3 and also for th 3.3, and after a day of trying several ways to run Tomcat as a service I´ve just discovered at Sun that the problem was solved with a command line parameter for the java.exe that preventes the LOGOFF Event of the NT from hanging he JVM. It´s just putting -Xrs at the command line at the end of wrapper.properties. Please, include this information on the documentation, it will save much time from people. Thank You []'s André Rosenzweig [EMAIL PROTECTED]
Re: Configuration
Ok I will replace the B6 with B7...but tomorrow.. now I need a long pause !!! output for ls -la /lib/libc* : -rwxr-xr-x1 root root 887712 Mar 26 00:35 /lib/libc-2.1.3.so lrwxrwxrwx1 root root 13 Jul 16 18:57 /lib/libc.so.6 -> libc-2.1.3.so lrwxrwxrwx1 root root 17 Jul 16 18:17 /lib/libcfont.so.0 -> libcfont.so.0.0.0 -rw-r--r--1 root root12332 Jul 16 18:17 /lib/libcfont.so.0.0.0 lrwxrwxrwx1 root root 17 Jul 16 18:17 /lib/libcom_err.so.2 -> libcom_err.so.2.0 -rw-r--r--1 root root 5244 Jul 16 18:17 /lib/libcom_err.so.2.0 lrwxrwxrwx1 root root 19 Jul 16 18:17 /lib/libconsole.so.0 -> libconsole.so.0.0.0 -rw-r--r--1 root root61224 Jul 16 18:17 /lib/libconsole.so.0.0.0 -rw-r--r--1 root root20436 Mar 26 00:35 /lib/libcrypt-2.1.3.so lrwxrwxrwx1 root root 17 Jul 16 18:57 /lib/libcrypt.so.1 -> libcrypt-2.1.3.so lrwxrwxrwx1 root root 19 Jul 16 18:17 /lib/libctutils.so.0 -> libctutils.so.0.0.0 -rw-r--r--1 root root18252 Jul 16 18:17 /lib/libctutils.so.0.0.0 Is't ok? Thanks still Pier! Roberto. - Original Message - From: "Pier P. Fumagalli" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 6:35 PM Subject: Re: Configuration > Roberto B. at [EMAIL PROTECTED] wrote: > > > So.. I try to install Tomcat 4b7??? > > Do I have to build mod_webapp again??? (I have an old kernel version) > > Nope... Just replace only Tomcat with B7... You don't have to build > anything, just download the B7 of 4.0, and keep the module you have (since > that's the problem). You built it off the B7 sources (I remember that), so > it should be all good... > > BTW, I got your binary, but what's your LIBC version (ls -la /lib/libc*) > > Pier >
Re: behaviour of getRequestDispatcher for bogus URLs
On Tue, 21 Aug 2001, Kevin HaleBoyes wrote: > What should the behaviour be if I call forward() on > a RequestDispatcher that (I know) doesn't exist? > (Ya, ya, I get the same behaviour as if I didn't know >it doesn't exist :-) > > For example: > >getServletContext(). > getRequestDispatcher("/I_know_this_page_doesnt_exist.html"). > forward(request, response); > > I would expect a NullPointerException but that is not what I get. > Instead, I see the following output in my browser window (Mozilla 0.92): > > Or "The document contains no data" from Netscape 4.7. > And, if I use lwp-request I get a 404 error which is reasonable. > > What "should" I get? > > The javadoc for ServletContext says: >"This method returns null if the ServletContext cannot > return a RequestDispatcher for any reason." > But I'm not sure what that reason might be given that a bogus URL > doesn't seem to do it. Also, the spec doesn't say anything about > bad URLs. > I *like* the interesting questions :-). The answer depends on a precise understanding of what the spec says. It says that you get a RequestDispatcher for the servlet that will handle the request URI you specify. In Tomcat, there is an implicit mapping like this: default / which says, in effect, "the 'default' servlet handles *all* requests that are not mapped to anything else". Thus, there will never be a URL for which you cannot return a RequestDispatcher. When you actually try to RequestDispatcher.forward() to this, you will get a 404 error, just as if you'd asked for it directly. > Thanks, > Kevin. > Craig
RE: SSL-How-2 for Tomcat 4
SSL Works in Tomcat4b7 - Wa Hoo!!! I have no clue why b6 wouldn't work...read on Couple of things worth noting.. in IE 5.5 (latest w/ all patches) you Must turn on TLS1.0 under [Internet Options] - not necessary with Netscape 6x (it prompts you for all the goodies) I did NOT have (on this box) an OLD_JAVA variable so I unless it's looking in the registry (which is possible andsomething I can fix) I still don't know why it found and tried to use jdk1.3? - Weirdness. Here's all I had to do... I manually changed the stat_tomcat link to use c:\java\jdk1.3\java.exe to c:\java\jdk1.3.1\... I changed ONLY the server.xml file (removed the REM'arks for the HTTPS stuff) Started up tomcat (just the default examples pages) No Error messages! SSL works - https://localhost:8443 SO..I have to convince our developers to stay with Tomcat - upgrade to b7 instead of b6 and run through some tests. Ya'll are the Greatest! Thank you for your patience and genius. cd -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 11:28 AM To: '[EMAIL PROTECTED]' Subject: RE: SSL-How-2 for Tomcat 4 On Tue, 21 Aug 2001, Curtis Dougherty wrote: > No errors in the log file...BUT I did discover something unusual. I > downloaded and installed Tomcat4b7 (been using Tomcat4b6) and - even though > I have JAVA_HOME set to c:\java\jdk1.3.1 it saw the older version > c:\java\jdk1.3 - SO... > > Why does it appear that Tomcat is hard coded to the older jdk? Weirdness... > I'm staying with the examples (for the moment) and am having some limited > success modifying the "server.xml" with the "new" version of tomcat... That > is to say...I am getting Error Messages (which is an improvement!) so I can > at least find out what got hosed by development (in-house). > Check where your PATH variable points. I'll bet you've got "OLD_JAVA/bin" there. > More later... > > Yes - I meant to send the java.security file - Mea Culpa...too much > work...too little sleep... OO Caffeine :) > Craig > > > -Original Message- > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 12:13 AM > To: [EMAIL PROTECTED] > Subject: Re: SSL-How-2 for Tomcat 4 > > > I noticed that you have the keystore file set to the following. Just a > guess, but, I'm not sure \ is a valid character for that. I think for some > files, you use / even if you are on Windows. You might want to try just > using the default keystore location which is in your home directory and see > if that makes any difference. > > KeystoreFile="z:\.keystore" > > Try checking the log files. Any errors? > > Also, what JVM are you using? > > Also, why did you include java.policy. I'm guessing you meant to include > java.security instead? > > Jon > > - Original Message - > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, August 20, 2001 5:23 PM > Subject: RE: SSL-How-2 for Tomcat 4 > > > > Take a chance kids... I'm tired... my URL is at the bottom of this thread > (I > > want to make EXAMPLES work before I get in any deeper) attached are my > > server.xml files and java.policy > > > > drifting off now...z > > > > cd > > > > -Original Message- > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > > Sent: Monday, August 20, 2001 5:18 PM > > To: [EMAIL PROTECTED] > > Subject: Re: SSL-How-2 for Tomcat 4 > > > > > > What URL did you use to access the page? > > > > Jon > > > > - Original Message - > > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Monday, August 20, 2001 4:15 PM > > Subject: RE: SSL-How-2 for Tomcat 4 > > > > > > > No error message - per se... just no page to display > > > > > > -Original Message- > > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, August 20, 2001 2:23 PM > > > To: [EMAIL PROTECTED] > > > Subject: Re: SSL-How-2 for Tomcat 4 > > > > > > > > > Are you receiving a specific error message? > > > > > > Jon > > > > > > - Original Message - > > > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Monday, August 20, 2001 1:03 PM > > > Subject: RE: SSL-How-2 for Tomcat 4 > > > > > > > > > > I did... Still won't work... :( > > > > > > > > -Original Message- > > > > From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]] > > > > Sent: Monday, August 20, 2001 1:01 PM > > > > To: [EMAIL PROTECTED] > > > > Subject: Re: SSL-How-2 for Tomcat 4 > > > > > > > > > > > > Try reading server.xml, I haven't had any problems here. All you have > to > > > do > > > > is uncomment a few lines of code and run the keytool command that's > > listed > > > > there. Also, you need to make sure you have JSSE is installed. > > > > > > > > Jon > > > > > > > > - Original Message - > > > > From: "Curtis Dougherty" <[EMAIL PROTECTED]> > > > > To: <[EMAIL PROTECTED]> > > > > Sent: Monday, August 20,
Problem with isapi_redirect.dll - Server Application Error
We are running IIS 5.0 (port 80) - there are multiple websites running) and tomcat (port 8080). We have no problem in getting the isapi_redirect.dll to load (green arrow). http://localhost:8080/examples/ works fine, but http://localhost/examples/ gives a Server Application Error. The entries in the isapi.log files are : [jk_isapi_plugin.c (408)]: HttpFilterProc started [jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of /examples/ [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::map_uri_to_worker [jk_uri_worker_map.c (407)]: jk_uri_worker_map_t::map_uri_to_worker, Found a match ajp12 [jk_isapi_plugin.c (439)]: HttpFilterProc [/examples/] is a servlet url - should redirect to ajp12 [jk_isapi_plugin.c (461)]: HttpFilterProc check if [/examples/] is points to the web-inf directory It's as though it is running fine as a filter but stops before it can execute HttpExtensionProc. Please advise how we correct this. Thanks Rory
Re: Configuration
Roberto B. at [EMAIL PROTECTED] wrote: > Ok I will replace the B6 with B7...but tomorrow.. now I need a long pause > !!! :) > output for ls -la /lib/libc* : > > -rwxr-xr-x1 root root 887712 Mar 26 00:35 /lib/libc-2.1.3.so > lrwxrwxrwx1 root root 13 Jul 16 18:57 /lib/libc.so.6 -> > libc-2.1.3.so > lrwxrwxrwx1 root root 17 Jul 16 18:17 > /lib/libcfont.so.0 -> libcfont.so.0.0.0 > -rw-r--r--1 root root12332 Jul 16 18:17 > /lib/libcfont.so.0.0.0 > lrwxrwxrwx1 root root 17 Jul 16 18:17 > /lib/libcom_err.so.2 -> libcom_err.so.2.0 > -rw-r--r--1 root root 5244 Jul 16 18:17 > /lib/libcom_err.so.2.0 > lrwxrwxrwx1 root root 19 Jul 16 18:17 > /lib/libconsole.so.0 -> libconsole.so.0.0.0 > -rw-r--r--1 root root61224 Jul 16 18:17 > /lib/libconsole.so.0.0.0 > -rw-r--r--1 root root20436 Mar 26 00:35 > /lib/libcrypt-2.1.3.so > lrwxrwxrwx1 root root 17 Jul 16 18:57 > /lib/libcrypt.so.1 -> libcrypt-2.1.3.so > lrwxrwxrwx1 root root 19 Jul 16 18:17 > /lib/libctutils.so.0 -> libctutils.so.0.0.0 > -rw-r--r--1 root root18252 Jul 16 18:17 > /lib/libctutils.so.0.0.0 > > Is't ok? Yep... So I can post your binary up on the website :) > Thanks still Pier! Welcome :) Pier
Re: probing tomcat
One simple thing that you could do is create a "ping" servlet which you can request from a remote machine (just a minimal servlet that prints a message). On the remote machine you would probably have a script or monitoring software attempt to grab the URL of the servlet. Although this tells you if Tomcat is running it doesn't tell you about other parts of your application (which you could probably arrange in the ping servlet). -- Mark Castillo [EMAIL PROTECTED] http://www.webFreak.com - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 5:32 AM Subject: probing tomcat > > > Hi, > does anybody know whether there exists a way to probe from a remote computer whether tomcat is still alive ? > > Steven >
Help on my first Servlet & JSP
Hi all, I have two requests. 1)The Tomcat documentation explains how to configure Tomcat using CVS. Could someone please direct me to a simpler, without-using-CVS way of deploying a servlet? 2) When I create a jsp file using Notepad, and try to save it as say index.jsp, my pc stores it as index.jsp.txt ! I guess it doesn't know what jsp is, and I have to set the MIME entry, right? How do I do that? I am using windows 95. Thanks a lot, Sheila _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
How do I display Images from servlet
Hi Guys, I am facing a problem with displaying images from my servlet. I have a context created and my log file says something like this 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /examples ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /admin ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /application-doc ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /application-examples ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /datetime-doc ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /datetime-examples ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /mycontext ) // this is my context 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /page-doc ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /page-examples ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /regexp-doc ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /regexp-examples ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /request-doc ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /request-examples ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /response-doc ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /response-examples ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /session-doc ) 2001-08-05 01:13:17 - ContextManager: Adding context Ctx( /session-examples ) This is directory structures /webapps/mycontext/images/code.gif /webapps/mycontext/WEB-INF/classes/ ->> this dir has my servlets Now How do I refer this gif image from my servlet. just a path say "/images/code.gif" should do right, but this doesn't work. Please help me. Thanks alot, Mary __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Help on my first Servlet & JSP
Ok! I got my servlet to work. I set the tag in the servlet.xml under confg, and restarted the server. It did the setting, and then it worked. Now I understand why it wasn't working before. I still have to get my pc to learn what jsp is. Please help. Sheila >From: "Sheila Ratnam" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Help on my first Servlet & JSP >Date: Tue, 21 Aug 2001 17:20:44 + > >Hi all, > >I have two requests. > >1)The Tomcat documentation explains how to configure Tomcat using CVS. >Could >someone please direct me to a simpler, without-using-CVS way of deploying a >servlet? > >2) When I create a jsp file using Notepad, and try to save it as say >index.jsp, my pc stores it as index.jsp.txt ! I guess it doesn't know what >jsp is, and I have to set the MIME entry, right? How do I do that? I am >using windows 95. > >Thanks a lot, >Sheila > > >_ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Help on my first Servlet & JSP
On Tuesday 21 August 2001 01:20 pm, you wrote: > Hi all, > > I have two requests. > > 1)The Tomcat documentation explains how to configure Tomcat using CVS. > Could someone please direct me to a simpler, without-using-CVS way of > deploying a servlet? > > 2) When I create a jsp file using Notepad, and try to save it as say > index.jsp, my pc stores it as index.jsp.txt ! I guess it doesn't know what > jsp is, and I have to set the MIME entry, right? How do I do that? I am > using windows 95. No you don't. Several Windows apps are brain dead in dealing with filename extensions and just blindly tack on .txt regardless of what you want. Just rename it to remove the .txt extension after disabling 'Hide file extensions for known file types' in My Computer folder view options. > > Thanks a lot, > Sheila > > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp --David Smith
Re: Bug in ServletResponse.flushBuffer() in Tomcat 4.0b7?
Jonathan, this was already discussed in this list some times ago.. Regards, mauro -- > Scott, > > I've finally got it. > The problem with Internet Explorer is that, no matter > how many flavors of no-cache, cache-no, no-cache-thanks, etc.. > you put in your header, it'll not output anything until it > has read at least 256 characters: > > public void doPost(HttpServletRequest request, HttpServletResponse response) > throws ServletException, IOException { > > response.setContentType("text/html"); > response.setIntHeader("Expires", -1); > response.addHeader("Cache-Control", "no-cache"); > response.addHeader("pragma", "no-cache"); > PrintWriter out = response.getWriter(); > out.println(""); // 7 > out.println("Title"); // 34 > out.println(""); // 48 > >out.println(" phase 1"); // 255, doesn't >display till end of page > out.println("--> phase 1"); // 256, start >display immediately > > response.flushBuffer(); > > try { > Thread.sleep(5000); > } catch (Exception e) { > }; > out.println("phase 2"); > out.println(""); > out.println(""); > out.close(); > } > > Regards, > > Mauro Bertapelle > JMatica Srl > [EMAIL PROTECTED] > --
Windows NT UNC File Referencing
I am in the process of setting up a new web farm environment. All of the web servers will be running the same code. To simplify management of that code, I would like to place the code in a common location and then use Windows UNC file referencing to point the servlet engine at the code. Allaire's servlet engine does not have the capability of handling this, however they plan to add it in then next major release. Has anyone tested this kind of configuration in Tomcat? Was it successful? Was testing done on how Tomcat reacted if the networked server holding the content was unavailable and they became available again? Any and all information on this subject is appreciated. - Ben
Problems with German ä, ö, ü, ß
Hi folks, I'm experiencing problems when using the German letters ä ö ü ß in URL's. first box: Solaris 2.6, JDK 1.3.0, tomcat 3.2.1 tomcat was installed as binary distribution by a developer from another company. When using correctly URL-encoded ä ö ü ß there is no problem. The servlets work fine. second box: Solaris 7, JDK 1.3.1, tomcat 3.2.1 I compiled and installed tomcat by myself. When using correctly URL-encoded ä ö ü ß they doesn't seem to get correctly to the servlets and the servlets fail. The resulting URL contains a ? instead of the original encoded letter. I assume this has something to do with localization. The locales on both boxes are identical. My question is how to configure tomcat to work correctly. Thanks, Frank
Re: Help on my first Servlet & JSP
Thanks David. You gave me the right clue. In Windows Explorer->File->Options File Types->New Opens a dialogueBox to create the new MIME type. Now the pc isn't as brain dead! Thanks, Sheila >From: David Smith <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Re: Help on my first Servlet & JSP >Date: Tue, 21 Aug 2001 13:56:38 -0400 > >On Tuesday 21 August 2001 01:20 pm, you wrote: > > Hi all, > > > > I have two requests. > > > > 1)The Tomcat documentation explains how to configure Tomcat using CVS. > > Could someone please direct me to a simpler, without-using-CVS way of > > deploying a servlet? > > > > 2) When I create a jsp file using Notepad, and try to save it as say > > index.jsp, my pc stores it as index.jsp.txt ! I guess it doesn't know >what > > jsp is, and I have to set the MIME entry, right? How do I do that? I am > > using windows 95. > >No you don't. Several Windows apps are brain dead in dealing with filename >extensions and just blindly tack on .txt regardless of what you want. Just >rename it to remove the .txt extension after disabling 'Hide file >extensions >for known file types' in My Computer folder view options. > > > > > Thanks a lot, > > Sheila > > > > > > _ > > Get your FREE download of MSN Explorer at >http://explorer.msn.com/intl.asp > >--David Smith _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Socket write error under Windows with tomcat-3.2.3
Hi, as the subject says, under Windows (but not under Linux) with tomcat-3.2.3 I get very often this socket write error and I don't have this problem with tomcat-3.2.2. Do you know what the reason is? I use jre-1.3.1 from Sun. Zsolt -- Zsolt Koppany Intland GmbH www.intland.com Schulze-Delitzsch-Str. 16 70565 Stuttgart ___ 1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de [EMAIL PROTECTED], 8MB Speicher, Verschluesselung - http://freemail.web.de
Re: How do I display Images from servlet
> just a path say "/images/code.gif" should do right, Quick suggestion: Try dropping the first '/'. Then again, I'm not sure what you mean by your servlet not being able to show images, so that could be completely wrong =) - r > but this doesn't work. Please help me. > Thanks alot, > Mary > > __ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/
welcome file in web.xml with pre-compiled jsp's?
Hi everyone, I am pre-compiling my jsp's in my struts web app, and everything works fine, except specifying the welcome file in the web.xml. If I do not pre-compile everything, having index.jsp as the first page works great. However, when I pre-compile index.jsp it doesn't work. Putting an uncompiled index.jsp back in the root directory makes it work again. I guess it is because jsp is not in root directory, but figure I should still be able to do this... Does anyone know if there is something special I have to do, or if there is anywhere else I can specify the first page as a servlet? btw, please copy me into any reply! Thanks, Dave Web.xml: http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> index.jsp action beans.AppController application ApplicationResources config /WEB-INF/struts-config.xml debug 2 detail 2 2 java.lang.Exception /error.jsp changeLogFileName JspServ.changeLogFileName chooseDevice JspServ.chooseDevice dataDir JspServ.dataDir dataDirFrame JspServ.dataDirFrame error JspServ.error index JspServ.index indexBar JspServ.indexBar log JspServ.log logFilter JspServ.logFilter logFrame JspServ.logFrame logging JspServ.logging loggingFrame JspServ.loggingFrame loggingSaveCancel JspServ.loggingSaveCancel login JspServ.login messages JspServ.messages parameters JspServ.parameters parametersFrame JspServ.parametersFrame parametersSaveCancel JspServ.parametersSaveCancel serialNosFrame JspServ.serialNosFrame serialNos JspServ.serialNos snapshot JspServ.snapshot snapshotFilter JspServ.snapshotFilter snapshotFrame JspServ.snapshotFrame telnet JspServ.telnet telnetFrame JspServ.telnetFrame telnetInstr JspServ.telnetInstr trace JspServ.trace traceFrame JspServ.traceFrame traceSaveCancel JspServ.traceSaveCancel action *.do changeLogFileName /changeLogFileName.jsp chooseDevice /chooseDevice.jsp dataDir /dataDir.jsp dataDirFrame /dataDirFrame.jsp error /error.jsp index /index.jsp indexBar /indexBar.jsp log /log.jsp logFilter /logFilter.jsp logFrame /logFrame.jsp logging /logging.jsp loggingFrame /loggingFrame.jsp loggingSaveCancel /loggingSaveCancel.jsp login /login.jsp messages /messages.jsp parameters /parameters.jsp parametersFrame /parametersFrame.jsp parametersSaveCancel /parametersSaveCancel.jsp serialNosFrame /serialNosFrame.jsp serialNos /serialNos.jsp snapshot /snapshot.jsp snapshotFilter /snapshotFilter.jsp snapshotFrame /snapshotFrame.jsp telnet /telnet.jsp telnetFrame
Problem with JSP... Tomcat 4.0.7
I probally done something wrong here... but the error is at the end [error]... here is the [JSP]... I have 2 classes in a jar file in the lib lib/connectionpool.jar ConnectionPool.class PooledConnection.class [JSP] <%@ page errorPage="errorpage.jsp" %> <%@ page import="java.util.*" %> <%@ page import="java.sql.*" %> <%-- --%> <% Connection con = null; try { // The pool is not initialized if ( pool.getDriver() == null ) { // initialize the pool // FileInputStream inStream = new FileInputStream(ForceBrowserJDB.properties); // properties.load(inStream); pool.setDriver=oracle.jdbc.driver.OracleDriver pool.setURL=jdbc:oracle:thin:@216.174.11.54:1521:warf pool.setSize=10 pool.Username=warfighter pool.setPassword=srcv3000 pool.initializePool(); } [.] [error] 2001-08-21 15:27:20 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:543) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1000) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093 ) at java.lang.Thread.run(Thread.java:484) - Root Cause - java.lang.NumberFormatException: oracle at java.lang.Integer.parseInt(Integer.java:414) at java.lang.Integer.parseInt(Integer.java:463) at org.apache.jasper.compiler.Compiler.getJspLineErrors(Compiler.java:321) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:528) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardConte
Re: Problem with JSP... Tomcat 4.0.7
Did you scroll down and look at the root cause? Trying to convert "oracle" to a number? > - Root Cause - > java.lang.NumberFormatException: oracle > at java.lang.Integer.parseInt(Integer.java:414) - r
RE: ignored - java.lang.NumberFormatException: 3379
I am getting the same error, this is on my windows development machine. I have not noticed it on Linux. Did anyone ever see any reply to this, or know why it is happening? It doesn't seem to be causing any problems. I am using standalone tomcat 3.2.1 on Win2K Brandon -Original Message- From: Dave Solecki [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 9:23 AM To: List, Tomcat Subject: ignored - java.lang.NumberFormatException: 3379 Does anyone know what this message means? Why I keep getting even though no-one is accessing the system? Well maybe it's being accessed but not by any of my users. I get this message constantly on my server at home, and there is a counter on my website which is not increasing everythime this message rolls onto my screen. 2001-08-14 09:46:37 - ContextManager: Error reading request, ignored - java.lang .NumberFormatException: 3379 at java.lang.Integer.parseInt(Integer.java:414) at java.lang.Integer.parseInt(Integer.java:454) at org.apache.tomcat.core.RequestImpl.getContentLength(RequestImpl.java: 284) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio n(HttpConnectionHandler.java:197) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java :498) at java.lang.Thread.run(Thread.java:484) ___ Send a cool gift with your E-Card http://www.bluemountain.com/giftcenter/
Can't view Jsp examples
I'm sure this question has been asked a billion times, but I'm desperate here. I installed Tomcat v. 3.3 on my e drive. The path is e:\myTomcat\tomcat. My OS is Win2K. I've got my jdk installed at c:\jdk1.3.1. Here are my environment variables: CLASSPATH: C:\jdk1.3.1\lib\tools.jar;.; JAVA_HOME: c:\jdk1.3.1 TOMCAT_HOME: e:\mytomcat\tomcat PATH: C:\jdk1.3.1\bin I can start Tomcat by running the startup.bat. When I open e:\mytomcat\tomcat\webapps\examples\jsp\index.html and try to execute some of the examples, some spit out the contents of the file in text format without processing the code, just as you would see it if you opened it up in Notepad. Other examples, like errorpage, just don't do what they are supposed to do. For errorpage, no matter what car I select, it says Yes!!! Acura is my favorite car. Anybody know of something I could do here? Thanks in advance. Amanda Bennett Web Developer E-mail: [EMAIL PROTECTED]
Servlet Reads from file. how to specify path
I have a servlet which needs to read from a file to get the database connection information. I've tried everything and can't seem to get the servlet to properly read the file. My question is how must paths be specified. I am running on windoes 200. The directory of my servlet is : C:\work\jt\tomcat\webapps\jd\WEB-INF\classes the file I am trying to read from is C:\work\jt\tomcat\webapps\jd\WEB-INF\classes\db.dat My code for reading the file reads: Properties p = new Properties(); p.load(new FileInputStream(Path Goes here)); Whenever i enter the path, I either get a null pointer exemption, or if I simply enter a file name, p doesn't load any information although the file contains text. Thanks, -Amos __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
RE: Can't view Jsp examples
have you tried hitting it through http://127.0.0.1:8080/examples/jsp/? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 2:58 PM To: [EMAIL PROTECTED] Subject: Can't view Jsp examples I'm sure this question has been asked a billion times, but I'm desperate here. I installed Tomcat v. 3.3 on my e drive. The path is e:\myTomcat\tomcat. My OS is Win2K. I've got my jdk installed at c:\jdk1.3.1. Here are my environment variables: CLASSPATH: C:\jdk1.3.1\lib\tools.jar;.; JAVA_HOME: c:\jdk1.3.1 TOMCAT_HOME: e:\mytomcat\tomcat PATH: C:\jdk1.3.1\bin I can start Tomcat by running the startup.bat. When I open e:\mytomcat\tomcat\webapps\examples\jsp\index.html and try to execute some of the examples, some spit out the contents of the file in text format without processing the code, just as you would see it if you opened it up in Notepad. Other examples, like errorpage, just don't do what they are supposed to do. For errorpage, no matter what car I select, it says Yes!!! Acura is my favorite car. Anybody know of something I could do here? Thanks in advance. Amanda Bennett Web Developer E-mail: [EMAIL PROTECTED]
RE: Can't view Jsp examples
Yes. I have a personal web server set up so that I can use an http path, but no luck getting the jsp to work:( -Original Message- From: Mills, Theo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 3:58 PM To: '[EMAIL PROTECTED]' Subject: RE: Can't view Jsp examples have you tried hitting it through http://127.0.0.1:8080/examples/jsp/? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 2:58 PM To: [EMAIL PROTECTED] Subject: Can't view Jsp examples I'm sure this question has been asked a billion times, but I'm desperate here. I installed Tomcat v. 3.3 on my e drive. The path is e:\myTomcat\tomcat. My OS is Win2K. I've got my jdk installed at c:\jdk1.3.1. Here are my environment variables: CLASSPATH: C:\jdk1.3.1\lib\tools.jar;.; JAVA_HOME: c:\jdk1.3.1 TOMCAT_HOME: e:\mytomcat\tomcat PATH: C:\jdk1.3.1\bin I can start Tomcat by running the startup.bat. When I open e:\mytomcat\tomcat\webapps\examples\jsp\index.html and try to execute some of the examples, some spit out the contents of the file in text format without processing the code, just as you would see it if you opened it up in Notepad. Other examples, like errorpage, just don't do what they are supposed to do. For errorpage, no matter what car I select, it says Yes!!! Acura is my favorite car. Anybody know of something I could do here? Thanks in advance. Amanda Bennett Web Developer E-mail: [EMAIL PROTECTED]
Re: Can't view Jsp examples
You have PWS and Tomcat setup? I'm confused... - r On Tue, 21 Aug 2001 16:07:31 -0400 [EMAIL PROTECTED] wrote: > Yes. I have a personal web server set up so that I can use an http > path, but no luck getting the jsp to work:( > > -Original Message- > From: Mills, Theo [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 3:58 PM > To: '[EMAIL PROTECTED]' > Subject: RE: Can't view Jsp examples > > > have you tried hitting it through http://127.0.0.1:8080/examples/jsp/? > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 2:58 PM > To: [EMAIL PROTECTED] > Subject: Can't view Jsp examples > > > I'm sure this question has been asked a billion times, but I'm > desperate here. I installed Tomcat v. 3.3 on my e drive. The path is > e:\myTomcat\tomcat. My OS is Win2K. I've got my jdk installed at > c:\jdk1.3.1. Here are my environment variables: > CLASSPATH: > C:\jdk1.3.1\lib\tools.jar;.; > > JAVA_HOME: > c:\jdk1.3.1 > > TOMCAT_HOME: > e:\mytomcat\tomcat > > PATH: > C:\jdk1.3.1\bin > > I can start Tomcat by running the startup.bat. When I open > e:\mytomcat\tomcat\webapps\examples\jsp\index.html and try to execute > some of the examples, some spit out the contents of the file in text > format without processing the code, just as you would see it if you > opened it up in Notepad. Other examples, like errorpage, just don't do > what they are supposed to do. For errorpage, no matter what car I > select, it says Yes!!! Acura is my favorite car. Anybody know of > something I could do here? Thanks in advance. > > > Amanda Bennett > Web Developer > E-mail: [EMAIL PROTECTED]
JSP/Servlet Printing
This is a question I posted in Sun's Java Forums and got no replies. I really need a solution and was hoping someone in this group could help out. I have an Apache/Tomcat webserver on a standalone touchscreen kiosk. The customer would like a print button on every jsp and, when touched by the user, would like the page printed. How do I do this? 1. I've tried the javascript print() method but I DON'T want the print dialog to appear. I want to print directly to the default printer. Is there a way to bypass the print dialog? 2. Also, in the servlet, I've tried to populate a JEditorPane with the html and print it using the awt.print stuff. But that doesn't work. Is there a trick to getting that working within a servlet? Does anybody know how I can accomplish this by using the two approaches I've listed or any other way? Thanks, JEB
RE: Can't view Jsp examples
Yes. Me too. Do my PWS and Tomcat serve the same purpose? Did I not need to install Tomcat to view jsp pages? -Original Message- From: Rob S. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 4:11 PM To: [EMAIL PROTECTED] Subject: Re: Can't view Jsp examples You have PWS and Tomcat setup? I'm confused... - r On Tue, 21 Aug 2001 16:07:31 -0400 [EMAIL PROTECTED] wrote: > Yes. I have a personal web server set up so that I can use an http > path, but no luck getting the jsp to work:( > > -Original Message- > From: Mills, Theo [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 3:58 PM > To: '[EMAIL PROTECTED]' > Subject: RE: Can't view Jsp examples > > > have you tried hitting it through http://127.0.0.1:8080/examples/jsp/? > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 2:58 PM > To: [EMAIL PROTECTED] > Subject: Can't view Jsp examples > > > I'm sure this question has been asked a billion times, but I'm > desperate here. I installed Tomcat v. 3.3 on my e drive. The path is > e:\myTomcat\tomcat. My OS is Win2K. I've got my jdk installed at > c:\jdk1.3.1. Here are my environment variables: > CLASSPATH: > C:\jdk1.3.1\lib\tools.jar;.; > > JAVA_HOME: > c:\jdk1.3.1 > > TOMCAT_HOME: > e:\mytomcat\tomcat > > PATH: > C:\jdk1.3.1\bin > > I can start Tomcat by running the startup.bat. When I open > e:\mytomcat\tomcat\webapps\examples\jsp\index.html and try to execute > some of the examples, some spit out the contents of the file in text > format without processing the code, just as you would see it if you > opened it up in Notepad. Other examples, like errorpage, just don't do > what they are supposed to do. For errorpage, no matter what car I > select, it says Yes!!! Acura is my favorite car. Anybody know of > something I could do here? Thanks in advance. > > > Amanda Bennett > Web Developer > E-mail: [EMAIL PROTECTED]
Weird exception.
Hi all. I'm running tomcat on a solaris machine and trying to access it from a Windows2000 machine. I have an servlet that returns a page with an applet that makes lot of use of swing objects. I have installed on the windows machine the Java plugin 1.3.1 for internet explorer and, when I try to access a servlet, I get the following exception in the console log. It's important to note that it DOES find the main servlet I called but any other servlet that this main servlet calls it's not found. The weird thing is that if I call directly the url that was not found, it all works! java.io.FileNotFoundException: http://172.20.138.160:8080/llh/llh;jsessionid=hn0itvu8k1?bo=CtpMarketViewDat aProviderWBO at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source) at sun.plugin.protocol.jdk12.http.HttpURLConnection.checkCookieHeader(Unknown Source) at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source) at cetip.llh.web.Utils.postToURL(Utils.java:74) at cetip.llh.web.CtpAuctionAndBookClientModel.postServer(CtpAuctionAndBookClien tModel.java:191) Any help would be VERY appreciated! Thanks, Daniel Novy.
bean creation race conditions?
As I mentioned yesterday, I have an application that stalls on Solaris 2.7 (properly patched) along with Apache 1.3.20, Tomcat 3.2.3, mod_jk, and JDK 1.3.1. It runs fine on Linux with Tomcat. The application starts with an index.jsp file that requests a bean with . The index.jsp then loads two frames, both of which use the same bean. I assumed that the index.jsp would create the bean before it loaded the other pages and this seems to be the case on Linux. But could this be creating a race condition on Solaris that causes it to stall from time to time? Do I need to relook these pages to see if there is a way around this? - Thad Humphries "...no religious test shall ever be required Web Development Manager as a qualification to any office or public Phone: 540/675-3015, x225 trust under the United States." -Article VI
how to get the target frame
Hi, Is it possible to determine the target frame from within a Servlet (or better Custom Tag, but I assume once, I know how to do it from a Servlet, I can do it from a Custom Tag as well). This information must be somewhere, or am I mistaken? Many thanks in advance, Andreas
Mozilla and Tomcat
Hello. Ever since the Mozilla builds between 0.9.2 and 0.9.3 (and I mean all builds, including 0.9.3), I have experienced some problems with redering Tomcat generated pages. If I change a jsp (I have reloadable on for development) then I will often see just this when the page reloads: If I keep pressing refresh. after four or five attempts the page will reload properly. Now I assume this is something odd tomcat is doing, and Mozilla is then getting confused, because this doesn't happen with any other website I've visited. Any other Mozilla users seen this? Or have a solution? Cheers John Baler -- John Baker, BSc CS. Java Developer, TEAM Slb. (http://www.teamenergy.com) The views expressed in this mail are my own.
Re: Can't view Jsp examples
Tomcat has a web service port at 8080, so if you are having trouble with getting jsp web pages through PWS or IIS, try specifying the port as 8080 to access Tomcat directly. That's why the URL in Theo Mills reply specified that port. Just don't try to make both PWS and Tomcat look at the same port. --David Smith On Tuesday 21 August 2001 04:16 pm, you wrote: > Yes. Me too. Do my PWS and Tomcat serve the same purpose? Did I not > need to install Tomcat to view jsp pages? > > -Original Message- > From: Rob S. [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 4:11 PM > To: [EMAIL PROTECTED] > Subject: Re: Can't view Jsp examples > > > You have PWS and Tomcat setup? I'm confused... > > - r > > On Tue, 21 Aug 2001 16:07:31 -0400 [EMAIL PROTECTED] > > wrote: > > Yes. I have a personal web server set up so that I can use an http > > path, but no luck getting the jsp to work:( > > > > -Original Message- > > From: Mills, Theo [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, August 21, 2001 3:58 PM > > To: '[EMAIL PROTECTED]' > > Subject: RE: Can't view Jsp examples > > > > > > have you tried hitting it through > > http://127.0.0.1:8080/examples/jsp/? > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, August 21, 2001 2:58 PM > > To: [EMAIL PROTECTED] > > Subject: Can't view Jsp examples > > > > > > I'm sure this question has been asked a billion times, but I'm > > desperate here. I installed Tomcat v. 3.3 on my e drive. The path is > > e:\myTomcat\tomcat. My OS is Win2K. I've got my jdk installed at > > c:\jdk1.3.1. Here are my environment variables: > > CLASSPATH: > > C:\jdk1.3.1\lib\tools.jar;.; > > > > JAVA_HOME: > > c:\jdk1.3.1 > > > > TOMCAT_HOME: > > e:\mytomcat\tomcat > > > > PATH: > > C:\jdk1.3.1\bin > > > > I can start Tomcat by running the startup.bat. When I open > > e:\mytomcat\tomcat\webapps\examples\jsp\index.html and try to > > execute > > > some of the examples, some spit out the contents of the file in text > > format without processing the code, just as you would see it if you > > opened it up in Notepad. Other examples, like errorpage, just don't > > do > > > what they are supposed to do. For errorpage, no matter what car I > > select, it says Yes!!! Acura is my favorite car. Anybody know of > > something I could do here? Thanks in advance. > > > > > > Amanda Bennett > > Web Developer > > E-mail: [EMAIL PROTECTED]
RE: Can't view Jsp examples
When you say "I open e:\mytomcat\tomcat\webapps\examples\jsp\index.html" do you mean you're clicking on the icon in Windows Explorer? I tried that and got the behavior you described. That's not the way to get at things with Tomcat. What that does is asks Internet Explorer to open it as a local file. When you do this, IE doesn't know what to do with .jsp files, so it simply displays them as though they were text. When you submit the form, it simply displays the HTML of that page. Tomcat is a web server. You need to have IE do a request on Tomcat, rather than loading the files locally. In Tomcat's default installation, it places an HTTP server listening on port 8080. HTTP is normally served through port 80; this is where your PWS is listening. Here's what you should try: 1- Go into your Tomcat\bin directory and double-click on startup.bat. You should see a window open up to run Tomcat. Leave this window open. 2- Open up IE. Type 'http://localhost:8080' into the location bar. You should get the Tomcat server homepage. 3- Click on the link for either the servlet examples or JSP examples. All should be running as expected. 4- Before you attempt to do much development, read the Servlet and JSP specs on Sun's website so you have a good understanding of web apps, etc. Cheers, 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 3:58 PM > To: [EMAIL PROTECTED] > Subject: Can't view Jsp examples > > > I'm sure this question has been asked a billion times, but I'm > desperate here. I installed Tomcat v. 3.3 on my e drive. The path is > e:\myTomcat\tomcat. My OS is Win2K. I've got my jdk installed at > c:\jdk1.3.1. Here are my environment variables: > CLASSPATH: > C:\jdk1.3.1\lib\tools.jar;.; > > JAVA_HOME: > c:\jdk1.3.1 > > TOMCAT_HOME: > e:\mytomcat\tomcat > > PATH: > C:\jdk1.3.1\bin > > I can start Tomcat by running the startup.bat. When I open > e:\mytomcat\tomcat\webapps\examples\jsp\index.html and try to execute > some of the examples, some spit out the contents of the file in text > format without processing the code, just as you would see it if you > opened it up in Notepad. Other examples, like errorpage, just don't do > what they are supposed to do. For errorpage, no matter what car I > select, it says Yes!!! Acura is my favorite car. Anybody know of > something I could do here? Thanks in advance. > > > Amanda Bennett > Web Developer > E-mail: [EMAIL PROTECTED] >
Re: Bug in ServletResponse.flushBuffer() in Tomcat 4.0b7?
Cool, thanks, I appreciate it. I'll give it a try. If this works, that's good investigative work. Jon - Original Message - From: "Mauro Bertapelle" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 21, 2001 12:56 PM Subject: Re: Bug in ServletResponse.flushBuffer() in Tomcat 4.0b7? > Jonathan, > > this was already discussed in this list some times ago.. > > Regards, > > mauro > -- > > > Scott, > > > > I've finally got it. > > The problem with Internet Explorer is that, no matter > > how many flavors of no-cache, cache-no, no-cache-thanks, etc.. > > you put in your header, it'll not output anything until it > > has read at least 256 characters: > > > > public void doPost(HttpServletRequest request, HttpServletResponse response) > > throws ServletException, IOException { > > > > response.setContentType("text/html"); > > response.setIntHeader("Expires", -1); > > response.addHeader("Cache-Control", "no-cache"); > > response.addHeader("pragma", "no-cache"); > > PrintWriter out = response.getWriter(); > > out.println(""); // 7 > > out.println("Title"); // 34 > > out.println(""); // 48 > > out.println(" phase 1"); // 255, doesn't display till end of page > > out.println("--> phase 1"); // 256, start display immediately > > > > response.flushBuffer(); > > > > try { > > Thread.sleep(5000); > > } catch (Exception e) { > > }; > > out.println("phase 2"); > > out.println(""); > > out.println(""); > > out.close(); > > } > > > > Regards, > > > > Mauro Bertapelle > > JMatica Srl > > [EMAIL PROTECTED] > > -- >