Re: problem with mysql Java
cand ai nevoie de conexiuni multiple la baza de date, de obicei se folosesc ejb(entity beans ). Verifica daca dupa ce folosesti o conexiune o si inchizi inainte de a deschide alta. gabi - Original Message - From: Florin Iorganda To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 11:54 AM Subject: Fw: problem with mysql Java - Original Message - From: Florin Iorganda To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 12:21 AM Subject: problem with mysql Java Dear sirs, I'm writing you regarding several problems I encounter on a RedHat Linux 6.0 7.0 Platform, JDK1.2.2 and JDK 1.3. The problem is the connexion with databases. I use driver mm.mysql_2.0.4_bin.jar. The records are displaied using a jsp file interpreted by Tomcat 3.2 with mode_jk and Apache 1.3.12.The jsp file contains several connections with different tables from a database. When the jsp page is accesed in the same time by two computers after 2-3 simultaneos refresh actions I get the error response: NullPointerException generated by statement. Can you help me understand where is the problem and how can I resolve it? Best regards, Florin Iorganda
RE: Tomcat 3.2.2.b2 ?
Referring to bug 1006 in Bugzilla: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1006 Marc Saegesser states that "Fixed in 3.2.2b2. I'm leaving this open so that it can be also be fixed in 3.3 and later." I'll commit TC 3.3 patch today. Now try as I might I can't find tomcat 3.2.2b2 anywhere on http://jakarta.apache.org/site/binindex.html Where can I find Beta 2. I'm anxious to see if the b2 fix eliminates some of the reliability problems I'm having with 3.2.1 with Apache. I'm finding our current set-up is requiring a reboot at least once a day. 3.2.2b2 will be released soon but could you verify via netstat how many open connection you have.
Re: Tomcat 3.2.2.b2 ?
of the reliability problems I'm having with 3.2.1 with Apache. I'm finding our current set-up is requiring a reboot at least once a day. 3.2.2b2 will be released soon but could you verify via netstat how many open connection you have. Yes I will, next time the server "goes down" with a fault I'll do a netstat -na and see if there is anything hanging. Can I do a stack trace on Tomcat if it is running as a service under Win2000 ? Andy
Re: Tomcat-Startup in windows
- Original Message - From: "venkatesan" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 8:53 AM Subject: Re: Tomcat-Startup in windows Hi shlomi sarfati, I tried but server is not starting while i started the system. I have the same problem to a extent. When my server NT2000 server is restarted I must stop apache, Stop Tomcat, start tomcat, start apache. Apache and tomcat are running as services. I think the clue (and I'm still working on an implementation) is that the apache service needs to be told that it is dependent on the tomcat service. Under NT 2000 this is "Dependencies" tag under the service properties. I'm still trying to work out how to control these dependencies though as there does not appear to be an "Add" button on the dialog box ! Andy C Editor R2 project http://www.r2-dvd.org
RE: Tomcat-Startup in windows
look there are couple of options 1. make the tomcat as nt service (NT-Service-howto , i am attaching this document) in this way the tomcat will run as nt service , it will be loaded every time after the the computer starts before the login process 2. put your bat files in your startup directory (i am usint win 2000 : C:\Documents and Settings\shlomi\Start Menu\Programs\Startup) you can right click on your start menu button then choose open \ programs \ startup . in this way the server will start after the user log in . hope i can help -Original Message- From: venkatesan [mailto:[EMAIL PROTECTED]] Sent: Thu, March 22, 2001 10:54 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Tomcat-Startup in windows Hi shlomi sarfati, I tried but server is not starting while i started the system. Can you give the directory hierarchy so that i will past my *.bat files... Regards venkatesh... shlomi sarfati wrote: put tomcat as nt service -Original Message- From: venkatesan [mailto:[EMAIL PROTECTED]] Sent: Thu, March 22, 2001 10:36 AM To: tomcat Subject: Tomcat-Startup in windows Hi All, I have a tomcat server working fine with Apache in Windows-NT. I have a script which starts tomcat before Apache. Can anybody tell that where i have to put these script so that tomcat would be started automatically while my system restarts Thanks in advance Regards Venkatesh Title: Working with the Jakarta NT Service
Re: Constructor in JavaBean
Not right. Constructors works( for example you can get reference on the db cash) - Original Message - From: "Huiyuan Ma" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 21, 2001 7:03 PM Subject: Constructor in JavaBean Hi Users, The constructor in the JavaBean class is supposed to be empty,right?But I see examples in Tomcat with non-empty constructors,why? Thanks. _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
Re: Problem accessing a bean from a jsp page...
Hi Jason ! Problem may be in jsp not in bean. Try call jsp without use bean. - Original Message - From: "Jason Sardano" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 21, 2001 7:47 PM Subject: Problem accessing a bean from a jsp page... I created a jsp page that uses a custom bean. When I try to access the jsp page, I get the error listed below. I don't understand what is going on; my java file compiled correctly, I put the package in my jsp page's WEB-INF\classes directory, yet I receive this error. Does anyone have any suggestions? Thank you, Jason Sardano Error: 500 Location: /lobster/index.jsp Internal Servlet Error: javax.servlet.ServletException: JasonTest/DataBean at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code) at java.lang.Thread.run(Thread.java:479) Root cause: java.lang.NoClassDefFoundError: JasonTest/DataBean at _0002findex_0002ejspindex_jsp_0._jspService(_0002findex_0002ejspindex_jsp_0. java:66) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code) at java.lang.Thread.run(Thread.java:479) Northern Geomantics 146 Second Street Hallowell, Maine 04347 Ph:(207)623-9226 Fax:(207)623-9229 http://www.northgeo.com
RE: moving webapps
Hi. I have setup a few virtual host in the server like : Host name="202.157.131.51" Context path="/servlets" docBase="/usr/home/amos/amos.webvis.net/htdocs/servlets" debug="0" reloadable="true" /Context /Host But the servlets or the class files are placed under /usr/home/amos/amos.webvis.net/htdocs/servlets/WEB-INF/classess then it works. It seems like it is following the default tomcat setting. May I find out how can I change it to other directory instead of WEB-INF/classes? Thanks and I am using tomcat alone... --Original Message-- From: "Filip Hanik" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: March 22, 2001 2:04:18 AM GMT Subject: RE: moving webapps set up a context in the server.xml file Context path="/mywebapp" docBase="/usr/htdocs" crossContext="false" debug="0" reloadable="true" /Context Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net -Original Message- From: Oleg Timofeyev [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 21, 2001 4:51 PM To: [EMAIL PROTECTED] Subject: moving webapps How can I move my webapps direcory from tomcat to /htdocs , I am running TOMCAT as standalone. -- -- Oleg Timofeyev ReadySetNet [EMAIL PROTECTED] http://www.readysetnet.com Phone : 323 469 2000 Fax : 323 469 2155 --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com
AW: Tomcat-Startup in windows
either install Tomcat as a NT service, or put a link to the .bat file in your autostart folder. Regards Christian Wenz I have a tomcat server working fine with Apache in Windows- NT. I have a script which starts tomcat before Apache. Can anybody tell that where i have to put these script so that tomcat would be started automatically while my system restarts
Hint: Tomcat service dependencies on NT
If like me you are having trouble starting tomcat and apache as a service on NT because apache may start before tomcat take a look at: http://support.microsoft.com/support/kb/articles/Q193/8/88.ASP?LN=EN-USSD=g nFR=0qry=dependenciesrnk=9src=DHCS_MSPSS_gn_SRCHSPR=WIN2000 This describes how to make one service starting dependant on another using regedt32 thus: "The Registry subkeys for services are located in the following path and can control how services are loaded. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Service name WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT or Windows 2000, you should also update your Emergency Repair Disk (ERD). To create a new dependency, select the subkey representing the service you want to delay, click Edit, and then click Add Value. Create a new value name "DependOnService" (without the quotation marks) with a data type of REG_MULTI_SZ, and then click OK. When the Data dialog box appears, type the name or names of the services that you prefer to start before this service with one entry for each line, and then click OK." Andy C Editor The R2 Project http://www.r2-dvd.org
servlet init problem.
Hi all, I am using tomcat 3.2.1 with IIS web server on a win2k box. I am able to execute the sample servlet and JSP. I have context under webapp called at. I am able to see my JSP pages for this context. However I am not able to execute my servlet. Its not even getting initialized (I see no printing on the server console). On my browser I get the error 405, "Resource not allowed" when I try to call my servlet. Your help here is highly appreciated. Thanks, pradeep
Re: servlet init problem.
Hi, Have you created a mapping for your servlet? In your context there should be a web.xml file. There should be something like this: servlet servlet-nameAServlet/servlet-name servlet-classthe.name.of.the.Servlet/servlet-class init-param param-nameAParameter/param-name param-valueAValue/param-value /init-param /servlet servlet-mapping servlet-nameAServlet/servlet-name url-pattern/AServlet/url-pattern /servlet-mapping hope this helps, Kenneth Westelinck From: "Pradeep Kumar" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: servlet init problem. Date: Thu, 22 Mar 2001 16:38:31 +0530 Hi all, I am using tomcat 3.2.1 with IIS web server on a win2k box. I am able to execute the sample servlet and JSP. I have context under webapp called at. I am able to see my JSP pages for this context. However I am not able to execute my servlet. Its not even getting initialized (I see no printing on the server console). On my browser I get the error 405, "Resource not allowed" when I try to call my servlet. Your help here is highly appreciated. Thanks, pradeep _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Re: Tomcat Root dir
you might want to peek in server.xml (in conf dir) - you will see a context mapping for /examples pointing to webapps/examples. I'm guessing this is why you are thinking webapps is the root. It does not have to be. Anuj. Sankaranarayanan Ganapathy wrote: Is this in any way different from other webapps? -Original Message- From: Sankaranarayanan Ganapathy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 21, 2001 7:03 PM To: '[EMAIL PROTECTED]' Subject: Tomcat Root dir There is a directory called root under webapps. Does this map to the path=""? Is this the default web app?
stable version of catalina ?
Hi all, we are going productive with a project using the Tomcat Servlet Engine this year in July. At the moment we are working with Apache in combination with Tomcat 4.0. Does anybody knows, when a stable version of Tomcat 4 will be ready ? Thanks in advance, -- Ernst Leonhard mailto:[EMAIL PROTECTED] ___ SecureNet GmbH Intranet und Internet Solutions Tel: +49 89/32133-654 Frankfurter Ring 193a Fax: +49 89/32133-699 80807 Mnchen, Germany http://www.secure-net.de
ESQL change but not refresh!
Hi gurus! I'm using Tomcat-Apache-mod_jk in a Solaris 2.7 and Apache 1.3.19 and I've changed the content of the esql.xml file of the example that comes with Cocoon, but when I restart both tomcat and apache, and point to the file, I keep getting the same content of the example, it doesn't refresh at all! I've also cleaned the cache of my browsers! any idea? thanks! Lic. Martin O. Mauri Profesion + Auge A.F.J.P Parana 666 - Cap. Federal [EMAIL PROTECTED] www.profesi.com.ar
Re: logrotate question
Milt Epstein wrote: On Thu, 22 Mar 2001, unplug wrote: Hi all, I edit the logrotate config file for tomcat as follow. /var/log/tomcat/*.log { compress daily rotate 7 notifempty missingok postrotate /etc/init.d/tomcat restart endscript } What logging/rotating facility is this? Something built into tomcat? log4j? Something else? Thanks. It's a Unix (/linux) configuration script for 'logrotate' program -- Arnaud Vandyck http://www.ressource-toi.org/
Running JSP and servlets from a user's home directory
Is there a way to configure Tomcat to allow all the users in a particular domain to run JSP and servlets out of their home directories? i.e.: http://www.domain.com/~user/junk.jsp or http://www.domain.com/~user/servlet/junkServlet Thanks, -Jon August --- Voice: (973) 560-9095 | Internection - Electronic Commerce, Internet eFax : (208) 246-2874 | Consulting and Grade A Web Hosting Since 1995. Cell : (973) 223-3064 | Pager: [EMAIL PROTECTED]
mod_jserv or mod_jk
What is the best ? TOMCAT ou JSERV ? mod_jk.so ou mod_jserv ?
mod_jserv or mod_jk
What is the best ? TOMCAT ou JSERV ? mod_jk.so ou mod_jserv ?
Re: mod_jserv or mod_jk
Both of them are servlet containers. The difference is in the version of the servlet specifications. JSERV is a Servlet 2.0 compliant servlet container while Tomcat is a Servlet 2.2 servlet container. Tomcat is more advanced and efficient than JSERV. Furthermore, mod_jserv was thought to be a connetor between JSERV and Apache, when Tomcat first came, a version of mod_jserv was adapted to work with Tomcat. But it had lot of bugs and wasn't so robust. A brand new module was built for Tomcat-Apache connectivity and was called mod_jk. I'd suggest using Apache-Tomcat-mod_jk. HTH, Martin PD: Any mistake in my explanation, please correct! What is the best ? TOMCAT ou JSERV ? mod_jk.so ou mod_jserv ?
Help: charset in jsp - compilation error
Hi ! I don't find messages where contained information about problem using charset in jsp. I'm using Tomcat 3.2.1 + Apache + mod_jk for Windows 2000 My default charset windows-1251 But if I set charset=utf-8 in my jsp I get compilation error ! Who had same problem ? How I can use multilanguage charset ? Best regards, Valera M. mailto:[EMAIL PROTECTED]
Re: mod_jserv or mod_jk
None! Juste different. Tomcat is the Jserv reference now. mod_jserv will not evolve anymore. [EMAIL PROTECTED] wrote: What is the best ? TOMCAT ou JSERV ? mod_jk.so ou mod_jserv ? -- mailto:[EMAIL PROTECTED] http://www.idbsoft.ch
EJB
Hi, I would like to know whether tomcat supports EJB. Thanks Regards E. Vinayak KaNini Consultants Pvt Ltd 7/1, Norton Second Street Mandaveli, Chennai - 600 028. Tel: 91-44-4956862 TeleFax: 91-44-4952664
servlet near TOMCAT_HOME/webapps
Put my jsp and servlet near TOMCAT_HOME/webapps it is very important ?
servlet near TOMCAT_HOME/webapps
Put my jsp and servlet near TOMCAT_HOME/webapps it is very important ?
Re: JDBC Prob
mm.mysql-2.0.4-bin.jar Download and put the above file in your system class path. This is type 4 driver. I worked for me. ramesh [EMAIL PROTECTED] _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
RE: Tomcat-Startup in windows
Does this mean that if I have started tomcat using the bat file and I have started the service, then I have tomcat running twice? -Original Message- From: shlomi sarfati [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 22, 2000 4:11 AM To: [EMAIL PROTECTED] Subject: RE: Tomcat-Startup in windows look there are couple of options 1. make the tomcat as nt service (NT-Service-howto , i am attaching this document) in this way the tomcat will run as nt service , it will be loaded every time after the the computer starts before the login process 2. put your bat files in your startup directory (i am usint win 2000 : C:\Documents and Settings\shlomi\Start Menu\Programs\Startup) you can right click on your start menu button then choose open \ programs \ startup . in this way the server will start after the user log in . hope i can help -Original Message- From: venkatesan [mailto:[EMAIL PROTECTED]] Sent: Thu, March 22, 2001 10:54 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Tomcat-Startup in windows Hi shlomi sarfati, I tried but server is not starting while i started the system. Can you give the directory hierarchy so that i will past my *.bat files... Regards venkatesh... shlomi sarfati wrote: put tomcat as nt service -Original Message- From: venkatesan [mailto:[EMAIL PROTECTED]] Sent: Thu, March 22, 2001 10:36 AM To: tomcat Subject: Tomcat-Startup in windows Hi All, I have a tomcat server working fine with Apache in Windows-NT. I have a script which starts tomcat before Apache. Can anybody tell that where i have to put these script so that tomcat would be started automatically while my system restarts Thanks in advance Regards Venkatesh
RE: Tomcat-Startup in windows
If you use the same config files, the tomcat would not start twice. It would complain about ports being in use instead ;-) On Thu, 22 Mar 2001, Elizabeth Riley wrote: Does this mean that if I have started tomcat using the bat file and I have started the service, then I have tomcat running twice? -Original Message- From: shlomi sarfati [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 22, 2000 4:11 AM To: [EMAIL PROTECTED] Subject: RE: Tomcat-Startup in windows look there are couple of options 1. make the tomcat as nt service (NT-Service-howto , i am attaching this document) in this way the tomcat will run as nt service , it will be loaded every time after the the computer starts before the login process 2. put your bat files in your startup directory (i am usint win 2000 : C:\Documents and Settings\shlomi\Start Menu\Programs\Startup) you can right click on your start menu button then choose open \ programs \ startup . in this way the server will start after the user log in . hope i can help -Original Message- From: venkatesan [mailto:[EMAIL PROTECTED]] Sent: Thu, March 22, 2001 10:54 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Tomcat-Startup in windows Hi shlomi sarfati, I tried but server is not starting while i started the system. Can you give the directory hierarchy so that i will past my *.bat files... Regards venkatesh... shlomi sarfati wrote: put tomcat as nt service -Original Message- From: venkatesan [mailto:[EMAIL PROTECTED]] Sent: Thu, March 22, 2001 10:36 AM To: tomcat Subject: Tomcat-Startup in windows Hi All, I have a tomcat server working fine with Apache in Windows-NT. I have a script which starts tomcat before Apache. Can anybody tell that where i have to put these script so that tomcat would be started automatically while my system restarts Thanks in advance Regards Venkatesh
Client Authentication via Tomcat
There have been various posts regarding Tomcat's inability to successfully complete client authentication, particularly with Microsoft's IE. We've discovered the answer to Tomcat's problem. It turns out that as part of the client-cert request in the standard SSL protocol, the server side sends a _stringified_ version of each trusted certificate. The string version is a standard representation of the distinguished name of the signer of a trusted certificate, such as CN=Templar Corporation, OU=Software Development and so on. Now, it appears that IE does a simple string comparison of its trusted certs against this list to figure out what certificates are trusted. IE doesn't look at the certificates themselves (which are also included in the SSL handshake) during this initial screen - it looks simply at the stringified version of the signer. This means that if there's any difference between the way that the server stringifies the signer and the way IE stringifies the signer, IE's match fails, and IE will never recognize the trusted certificate. With this background, the problem turns out to be the following: (1) The Microsoft certificate authority allows an email address in the root certificate's distinguished name. This isn't exactly standard (my reading of the DN standard is that only an X501 item can appear in the DN and there isn't a clear item for email address) but it is very common. (2) When Microsoft stringifies a certificate's signer, it uses "E=" as the marker for the email address. (3) When Tomcat stringifies a certificate's signer, it uses "EmailAddress=" as the marker for the email address. (4) Since IE and Tomcat don't agree on the stringified version of the email address, IE's string match fails to recognize a root certificate that includes an email address. The fix: we re-installed the Microsoft cert authority and specified a distinguished name for the authority that did not include an email address. After re-installing the certs in both Tomcat and IE, the two were able to exchange a client cert without a problem. I speculate that Netscape looks for trusted roots in the SSL handshake differently, which is why we were able to get client authentication working with Netscape, even with the email address in the root.
error 404 tomcat/IIS
I use tomcat 3.2.1 and IIS 4.0 to execute my jsp pages and i receive the error 404 when trying to connect to the IIS. The strange thing is that a restart of the computer where the site is hosted results in that i receive the first jsp page and then it's error 404. And if i reload the first page again it's also error 404. The IIS log- GET /jakarta/isapi_redirect.dll 200 GET /examples/images/return.gif 404 The isapi log- [jk_uri_worker_map.c (334)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter [jk_uri_worker_map.c (184)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters Regards Lars _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Re: EJB
Hell No. fumi
how to use bean in jdk1.3
I have a java bean which runs fine in Tomcat with JDK 1.1.8. When I switch to JDK 1.3 then it doesn't work anymore. I simply put the bean class file in web-inf/classes directory. Do I need to register it somewhere? Thanks, Jack Li
multiple www addresses on tomcat
Is it possible to use multiple www addresses to one context in tomcat 3.2.1? Regards Lars _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Login Handler Question
Hi all Does anyone know where I could find code that when after a user has given a correct username and password on the login.jsp page, a loginHandler bean will redirect the user to a new page, and if the user gives a username and an incorrect password, the login page will appear again. I have the bean checking the DB and validating the username and password with the following code: public void loginHandler() throws Exception { Statement statement = connection.createStatement(); try{ ResultSet rs = statement.executeQuery("SELECT * FROM Registration WHERE (Username ='" + theUsername + "' AND Password = '" + thePassword + "');"); boolean found = rs.next(); System.out.println(found); if(found == true) { System.out.println("THAT IS THE CORRECT USERNAME AN PASSWORD!!"); } else { System.out.println("YOU ARE NOT IN OUR DB :-("); } } catch (Exception e) { } } } Any help would be much appreciated, Thanks in advance, Mick _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Re: configuring Tomcat on Windows 2000 and IIS
Hi Carlos, if you want to add another context to your webapps, you need to follow the instructions given into the tomcat-iis-howto.html document (search for the "Adding additional contexts" paragraph), i.e. : 1)add your context to the ISAPI redirector editing the uriworkermap.properties file as described in the document 2)restart IIS as described in the step 5 of my previous mail and it will (or at least it should :-) serve the new context Clearly you must already have added the context to Tomcat (for the /admin context you don't nedd to do that, thus simply add the context to the ISAPI redirector). Sal. - Original Message - From: Carlos Diaz To: [EMAIL PROTECTED] Sent: Wednesday, March 21, 2001 10:44 AM Subject: RE: configuring Tomcat on Windows 2000 and IIS Hi, This configuration works only with the examples app, but ¿how it could work with other apps? e.g.: /admin It is impossible run if the context is diferent to examples. Thanks -Mensaje original-De: Salvatore Borrelli [mailto:[EMAIL PROTECTED]]Enviado el: miércoles, 21 de marzo de 2001 10:16Para: [EMAIL PROTECTED]Asunto: Re: configuring Tomcat on Windows 2000 and IIS Hi, these are the steps you should follow: 1.run the InternetServices Manager MMC (i.e. ...\winnt\system32\iis.msc) 2. open yourIIS server icon, right click the Web Server to which you whish to add the ISAPI(e.g. Default Web Site), then choose Properties 3. from the Web Site Properties dialog window, choose the "ISAPI Filters" property page andthen click the Add button to open the Filter Properties dialog box 4.insert a name for the ISAPI Redirector filter (I inserted the name "jakarta", suggested in the Tomcat documentation), and the full path of the filter (which under my system is$TOMCAT_HOME\bin\win32\i386\isapi_redirect.dll), then press OK to add the redirector to IIS ISAPI filters 5. restart IIS (right click on the Web Server icon and choose Restart IIS from the popup-menu) 6. reopen the ISAPI Filters tab to check that the redirector status containsan up green arrow icon. If it does, you've done ... Hope this helps, Sal. - Original Message - From: Hwa-Su Kim To: [EMAIL PROTECTED] Sent: Wednesday, March 21, 2001 3:19 AM Subject: configuring Tomcat on Windows 2000 and IIS Hi, I've been trying to configure the ISAPI Redirector on Windows 2000 server. I followed the instruction that comes with Tomcat, tomcat_install\doc\tomcat-iis-howto.html. My question is how do I add isapi_redirect.dll as a filter using the IIS management console (configuring the ISAPI Redirector - step 8). I've tried to add Filter DLLs using regedit, but I don't think it worked. How would I set this up in Windows 2000. Where can I see the green up-pointing arrow? Thanks for your help. Hwa-Su Kim
tomcat no longer runs??
Hi, all of a sudden I am getting the below error when I try to run tomcat. Any ideas? Thanks Alex Context log path="" :jsp: init Context log path="" :default: init Starting endpoint port="80" handler="org.apache.tomcat.service.http.HttpConnectionHandler" Starting endpoint port="81" handler="org.apache.tomcat.service.connector.Ajp12ConnectionHandler" Context log: path="" Error in default service() : javax.servlet.http.NoBodyResponse java.lang.ClassCastException: javax.servlet.http.NoBodyResponseat org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.j ava:126)at org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:187)at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:313) at javax.servlet.http.HttpServlet.service(HttpServlet.java:757)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338 ) at java.lang.Thread.run(Thread.java:484) Context log: path="" bInternal Servlet Error:/bbr pre java.lang.ClassCastException: javax.servlet.http.NoBodyResponse at org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.j ava:126)at org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:187)at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:313) at javax.servlet.http.HttpServlet.service(HttpServlet.java:757)at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338 ) at java.lang.Thread.run(Thread.java:484) /pre Context log: path="" Socket Exception/
Delay (40 seconds) on first jsp access
Delay (40 seconds) on first jsp access Hi, On Windows 98, Tomcat 3.2.1 3.3M2 (they both show the delay) Stand-alone... I have some Servlets, that I include into some pages like so: ... h2Favorite Public Virtual Slides/h2 jsp:include page="servlet/GroupFavorites" flush="true" / ... Q: Is there any better way to include the output from a servlet in an otherwise static page? The very first time I start Tomcat, and access this page, there is a very very long delay. Everything is running on localhost, so I don't think there is any kind of name lookup that is timing out... If I turn on LogEvents in 3.3M2, I get the following: ... 2001-03-22 10:33:47 - LogEvents: preServletInit DEFAULT:/mbfvs ServletH TOMCAT/J SP/intro.jsp(SW (/intro.jsp CN=intro_1)) 2001-03-22 10:33:47 - LogEvents: postServletInit DEFAULT:/mbfvs ServletH TOMCAT/ JSP/intro.jsp(SW (/intro.jsp CN=intro_1)) 2001-03-22 10:33:47 - LogEvents: preService R( /mbfvs + /intro.jsp + null) Long delay 2001-03-22 10:34:21 - LogEvents: postService R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: postService R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: beforeCommit R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: afterBody R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: postRequest R( /mbfvs + /intro.jsp + null) The delay is _much_ longer than it would take to compile the jsp page, and there is no hard drive activity during the time. Does anyone have any idea what would be stalling at this point??? Thanks!!! -James Carroll MicroBrightField Inc.
AW: Delay (40 seconds) on first jsp access
What initialisation is your servlet doing?? Delay (40 seconds) on first jsp access Hi, On Windows 98, Tomcat 3.2.1 3.3M2 (they both show the delay) Stand-alone... I have some Servlets, that I include into some pages like so: ... h2Favorite Public Virtual Slides/h2 jsp:include page="servlet/GroupFavorites" flush="true" / ... Q: Is there any better way to include the output from a servlet in an otherwise static page? The very first time I start Tomcat, and access this page, there is a very very long delay. Everything is running on localhost, so I don't think there is any kind of name lookup that is timing out... If I turn on LogEvents in 3.3M2, I get the following: ... 2001-03-22 10:33:47 - LogEvents: preServletInit DEFAULT:/mbfvs ServletH TOMCAT/J SP/intro.jsp(SW (/intro.jsp CN=intro_1)) 2001-03-22 10:33:47 - LogEvents: postServletInit DEFAULT:/mbfvs ServletH TOMCAT/ JSP/intro.jsp(SW (/intro.jsp CN=intro_1)) 2001-03-22 10:33:47 - LogEvents: preService R( /mbfvs + /intro.jsp + null) Long delay 2001-03-22 10:34:21 - LogEvents: postService R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: postService R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: beforeCommit R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: afterBody R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: postRequest R( /mbfvs + /intro.jsp + null) The delay is _much_ longer than it would take to compile the jsp page, and there is no hard drive activity during the time. Does anyone have any idea what would be stalling at this point??? Thanks!!! -James Carroll MicroBrightField Inc.
Re: Login Handler Question
I believe that the bean can be handled the same way as the Servlet which mean that you can use: // Set the attribute and Forward to hello.jsp request.setAttribute ("servletName", "servletToJsp"); getServletConfig().getServletContext().getRequestDispatcher("/jsp/jsptoserv/hell o.jsp").forward(request, response); - Original Message - From: "Mick Sullivan" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 4:07 PM Subject: Login Handler Question Hi all Does anyone know where I could find code that when after a user has given a correct username and password on the login.jsp page, a loginHandler bean will redirect the user to a new page, and if the user gives a username and an incorrect password, the login page will appear again. I have the bean checking the DB and validating the username and password with the following code: public void loginHandler() throws Exception { Statement statement = connection.createStatement(); try{ ResultSet rs = statement.executeQuery("SELECT * FROM Registration WHERE (Username ='" + theUsername + "' AND Password = '" + thePassword + "');"); boolean found = rs.next(); System.out.println(found); if(found == true) { System.out.println("THAT IS THE CORRECT USERNAME AN PASSWORD!!"); } else { System.out.println("YOU ARE NOT IN OUR DB :-("); } } catch (Exception e) { } } } Any help would be much appreciated, Thanks in advance, Mick _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Does JDK1.3 works with Tomcat?
Hello, Does JDK1.3 works with tomcat. My beans do not work with JDK1.3. Error message says can't find the class. But all these beans works fine with JDK1.1.8. Any ideas? Thanks, Jack Li
Re: Does JDK1.3 works with Tomcat?
Jack Li wrote: Hello, Does JDK1.3 works with tomcat. My beans do not work with JDK1.3. Error message says can't find the class. But all these beans works fine with JDK1.1.8. Any ideas? Thanks, Jack Li It runs with JDK1.3, even with Sun JDK 1.3.1 beta on Linux. If you are working on linux/solaris don't use /usr/lib/java..., use /usr/java/jdk1.3/bin Holger.
Re: Does JDK1.3 works with Tomcat?
JDK 1.3 does work with tomcat. Your bean must be using some specific jdk 1.1.* methods that is not supported in jdk 1.3 (and most likely also jdk 1.2). - Original Message - From: "Jack Li" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 4:52 PM Subject: Does JDK1.3 works with Tomcat? Hello, Does JDK1.3 works with tomcat. My beans do not work with JDK1.3. Error message says can't find the class. But all these beans works fine with JDK1.1.8. Any ideas? Thanks, Jack Li
Re: Does JDK1.3 works with Tomcat?
Hi, Tomcat runs fine on JDK1.3 . I've also tried it on JDK1.1.8 and JDK1.2.2 . Always runs nice. regards, Kenneth Westelinck From: "Jack Li" Reply-To: [EMAIL PROTECTED] To: Subject: Does JDK1.3 works with Tomcat? Date: Thu, 22 Mar 2001 10:52:01 -0500 Hello, Does JDK1.3 works with tomcat. My beans do not work with JDK1.3. Error message says can't find the class. But all these beans works fine with JDK1.1.8. Any ideas? Thanks, Jack Li _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Help: Tomcat JDBC
Hi there.I am new in servlets, jsp, tomcat and java.I am trying to build a simple application that consults a very small database in ms access.So, I Have a few questions:What a need to write in server.xml configuration file?Where i put my database?Do I need to download any driver, i already have jdbc?see you
RE: Tomcat 3.2 CPU utilization
D, Did you find a resolution to this? I am experiencing the same issue. Load keeps rising over a period of time until the machine can no-longer take requests. ENV: Sparc Sol 2.6 Tomcat 3.2.1 Java j2re1_3_0_02 Apache 1.3.17 Using mod_jk Anyone know where to look? Jason Maderios -Original Message- From: D I Macdonald [mailto:[EMAIL PROTECTED]] Sent: Monday, March 12, 2001 5:27 AM To: [EMAIL PROTECTED] Subject: Tomcat 3.2 CPU utilisation Hi there. I notice a few people have claimed to see high cpu utilisations when using tomcat on NT. I have been using tomcat 3.2 on Solaris 7 (Ultra 5). The configuration is pretty much out of the box, except for turning on https support and changing default http port to 80. The load on the machine is very light, and when the server is started CPU utilisation by the tomcat process is very low. However, inevitably over the next few days, CPU utilisation climbs to close to 100% and does not diminish until the server is restarted. Does anyone have any clues as to the probable cause of this? Regards D I Macdonald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Use of JNI with Apache
"Bhutani, Manasi" wrote: I have a module in apache(running on linux) that makes JNI calls (JDK1.3). In the event of an error in the JNI calls, it never returns. In case someone has seen such a problem before and fixed it, please help me out. When I launch my code from a test app, it works correctly. Thanks, Manasi Apache module in Java? Do you mean a servlet/jsp in Tomcat? I know that a segmentation fault in JNI kills the JVM dead so Tomcat will just disappear. You should get messages in the shell Tomcat ran in though and a javacore.
Re: Jni Programming Questions
RTFM Leroy Williams wrote: Dear java expert, how are you doing? The main reason why I'm writing is; because I'm a student trying to master jni programming. I have a question. That I think you'll might be able to answer. Please if you could explain the answer in easy to understand terminology. It would be good to also use examples. Question #1- Will the code like this at the bottom; which starts with the word jclass, create a class in jni called cls? jclass cls = (*env)-GetObjectClass(env, obj); Please clarify your answer for question #1. Explain why the code would create a jni class called cls; or why it would not. Please email me back your answer at [EMAIL PROTECTED] Thanks for your time and energy! __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
RE: Does JDK1.3 works with Tomcat?
I didn't use special methods. the java codes are very simple and listed below: import java.io.Serializable; public class Counter implements Serializable{ int count = 0; public Counter(){} public int getCount(){ count++; return this.count; } public void setCount(int count){ this.count = count; } } --- Here is the directory structure: web -- homepages -- jack -- counter.jsp web -- web-inf -- classes -- counter.class The error message is: Class homepages.jack.Counter not found in type declaration. Please help Thanks, Jack Li -Original Message- From: Ying Ho [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 11:03 AM To: [EMAIL PROTECTED] Subject: Re: Does JDK1.3 works with Tomcat? JDK 1.3 does work with tomcat. Your bean must be using some specific jdk 1.1.* methods that is not supported in jdk 1.3 (and most likely also jdk 1.2). - Original Message - From: "Jack Li" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 4:52 PM Subject: Does JDK1.3 works with Tomcat? Hello, Does JDK1.3 works with tomcat. My beans do not work with JDK1.3. Error message says can't find the class. But all these beans works fine with JDK1.1.8. Any ideas? Thanks, Jack Li
RE: Tomcat 3.2 CPU utilization
Read the 3.2.1 release notes doc (http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/readme) and see if the 6.11 issue in there applies to your configuration. Donnie [EMAIL PROTECTED] 03/22/01 11:06AM D, Did you find a resolution to this? I am experiencing the same issue. Load keeps rising over a period of time until the machine can no-longer take requests. ENV: Sparc Sol 2.6 Tomcat 3.2.1 Java j2re1_3_0_02 Apache 1.3.17 Using mod_jk Anyone know where to look? Jason Maderios -Original Message- From: D I Macdonald [mailto:[EMAIL PROTECTED]] Sent: Monday, March 12, 2001 5:27 AM To: [EMAIL PROTECTED] Subject: Tomcat 3.2 CPU utilisation Hi there. I notice a few people have claimed to see high cpu utilisations when using tomcat on NT. I have been using tomcat 3.2 on Solaris 7 (Ultra 5). The configuration is pretty much out of the box, except for turning on https support and changing default http port to 80. The load on the machine is very light, and when the server is started CPU utilisation by the tomcat process is very low. However, inevitably over the next few days, CPU utilisation climbs to close to 100% and does not diminish until the server is restarted. Does anyone have any clues as to the probable cause of this? Regards D I Macdonald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Refresh
Is there a configuration to check if the jsp file had been change. If it changed, recompile it else work with the compile file. The problem is when I change a jsp file, tomcat doesn't look if there is a change in the file. How can I resolve this problem Jeff
RE: Does JDK1.3 works with Tomcat?
By the way, I am using windows 2000. Jack -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Holger Eichelberger Sent: Thursday, March 22, 2001 11:02 AM To: [EMAIL PROTECTED] Subject: Re: Does JDK1.3 works with Tomcat? Jack Li wrote: Hello, Does JDK1.3 works with tomcat. My beans do not work with JDK1.3. Error message says can't find the class. But all these beans works fine with JDK1.1.8. Any ideas? Thanks, Jack Li It runs with JDK1.3, even with Sun JDK 1.3.1 beta on Linux. If you are working on linux/solaris don't use /usr/lib/java..., use /usr/java/jdk1.3/bin Holger.
JSP file: 404 file not found(caused by user ID?)
Hi guys, I run the tomcat using startup.sh using the user "root". It runs fine. If I run it using the same startup.sh but using the user "nobody" instead, then I will get ".jsp file: file not found" when running few sample programs. E.g. the "INCLUDE" sample program. However, not all sample programs (.jsp file) give me the same kind of response. I am not absolutely sure it is related to the problem I mention above. I just know I get this problem whenever I run the script using the user "nobody" . Strange Any idea? Thank you for your help Jason
Help with Tomcat - IIS 500 Error
I am having a problem with Tomcat and IIS on Windows 2000. I have installed Tomcat, the SDK, and the dll for IIS. In addition, I have followed the configuration instructions in the Tomcat-iis-Howto.html doc. When I hit the examples page, I get an HTTP 500 Error in the browser, and the tomcat log says: [jk_isapi_plugin.c (408)]: HttpFilterProc started [jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of /examples/servlet [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/servlet] is a servlet url - should redirect to ajp12 [jk_isapi_plugin.c (461)]: HttpFilterProc check if [/examples/servlet] is points to the web-inf directory
Different Apaches using same Tomcat ?
Hallo, I read a lot of documents but didn't found a solution. Is there a way to let different apaches use the same tomcat-instance ? We have to manage different apaches on the same machine (let's say: germany, france, .. - one IP for each of them) All of them must be able to serve JSP's and Servlets (using mod_jk) - all the files are located at this single machine (linux) (sourcedir: web, including subdirs: de, fr, ... - containing the files of the various apaches). The idea is to start a single tomcat instance running a loadbalancer which will be used by each apache. I've used the apache's mod_rewrite to difference between the different JSP-dirs (let's say: //germany/JSP will become a //germany/de_JSP, ... For these I defined contexts e.g: /de_JSP, /fr_JSP, ... [ e.g. the germany will generate a //germany/de_JSP/hello.jsp (called as: //germany/JSP/hello.jsp) and the france will generate: //france/fr_JSP/hello.jsp (called as: //france/JSP/hello.jsp) ] The tomcat runs a loadbalancer which will spread the incoming requests all over the contexts. Is this a "good" idea (resources), is this possible OR should I (have to) create different tomcats (one for each apache) ? Thanks, Bernd.
Java Question on Inheritance
I don't really know what to call what I'm having trouble with but here is what I am trying to do. I have asuperclass called SuperOne, it has a method to convert a string to a URL formatcalled toURL(). I havean Image class that is a subclass of SuperOne. It holds astringstoringthe local path of the image onmyharddrive. This subclass contains a method to get the corresponding thumbnail of the image on my harddrive. The method is called getThumb(). Ina thirdclass I want to instantiate an Image object something like: Image myImage = new Image("/home/pic.gif"); Ultimately, I want to get the thumb of this Image and convert it to a URL. I want to be able to do this efficiently and use something like the following syntax. myImage.getThumb().toURL() Is this possible? thanx -ryan
RE: Refresh
If the file that has changed is actually an included file in the requested page, the container will not know to recompile the jsp page. You will need to open the file in NT and resave the requested jsp page to prompt the container to recompile. In Unix you use the touch command. Don't know if that is your problem but thought I would put my two cents in. Hope this helps. -Original Message- From: Jean-Francois Pelletier [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 10:19 AM To: [EMAIL PROTECTED] Subject: Refresh Is there a configuration to check if the jsp file had been change. If it changed, recompile it else work with the compile file. The problem is when I change a jsp file, tomcat doesn't look if there is a change in the file. How can I resolve this problem Jeff
RE: Does JDK1.3 works with Tomcat?
Did u put dot "." in your CLASSPATH ? -Original Message- From: Jack Li [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 6:09 PM To: [EMAIL PROTECTED] Subject: RE: Does JDK1.3 works with Tomcat? I didn't use special methods. the java codes are very simple and listed below: import java.io.Serializable; public class Counter implements Serializable{ int count = 0; public Counter(){} public int getCount(){ count++; return this.count; } public void setCount(int count){ this.count = count; } } --- Here is the directory structure: web -- homepages -- jack -- counter.jsp web -- web-inf -- classes -- counter.class The error message is: Class homepages.jack.Counter not found in type declaration. Please help Thanks, Jack Li -Original Message- From: Ying Ho [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 11:03 AM To: [EMAIL PROTECTED] Subject: Re: Does JDK1.3 works with Tomcat? JDK 1.3 does work with tomcat. Your bean must be using some specific jdk 1.1.* methods that is not supported in jdk 1.3 (and most likely also jdk 1.2). - Original Message - From: "Jack Li" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 4:52 PM Subject: Does JDK1.3 works with Tomcat? Hello, Does JDK1.3 works with tomcat. My beans do not work with JDK1.3. Error message says can't find the class. But all these beans works fine with JDK1.1.8. Any ideas? Thanks, Jack Li
Re: Refresh
What I have to do most of the time is 'touch' the jsp file manually. Then the page gets updated. -ryan - Original Message - From: "Jean-Francois Pelletier" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 8:18 AM Subject: Refresh Is there a configuration to check if the jsp file had been change. If it changed, recompile it else work with the compile file. The problem is when I change a jsp file, tomcat doesn't look if there is a change in the file. How can I resolve this problem Jeff
Re: JSP file: 404 file not found(caused by user ID?)
On Fri, 23 Mar 2001, Jason wrote: I run the tomcat using startup.sh using the user "root". It runs fine. If I run it using the same startup.sh but using the user "nobody" instead, then I will get ".jsp file: file not found" when running few sample programs. E.g. the "INCLUDE" sample program. However, not all sample programs (.jsp file) give me the same kind of response. I am not absolutely sure it is related to the problem I mention above. I just know I get this problem whenever I run the script using the user "nobody" . Strange Have you tried chown -R nobody.nobody * from your tomcat directory? Perhaps there are permission problems.
AW: Tomcat 3.2 CPU utilization
Donnie, thank you for your hint. I have experienced similar problems with solaris 8 and tomcat 3.2.1. However I regret that I do not understand the mentioned problem: 6.11 Misconfiguration Can Cause CPU-Bound Loop If you misconfigure Tomcat 3.2 in a way that there is no valid context to handle a request (such as removing the root context and then attempting a request that should be handled by that context), Tomcat will enter a CPU-bound loop instead of responding with a 404 error. Workaround: kill the offending Tomcat process and correct your server.xml file such that there is a properly configured root context. Could anyone perhaps give an illustrative example ? TIA *stefan
RE: Does JDK1.3 works with Tomcat?
yes, there is a "." in CLASSPATH. It looks like "CLASSPATH=.;". But I run tomcat's examples successfully. I also I copied my program and class into tomcat's example directories. Then the program worked fine. I guess some where I didn't setup tomcat correctly. Jack -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 11:32 AM To: [EMAIL PROTECTED] Subject: RE: Does JDK1.3 works with Tomcat? Did u put dot "." in your CLASSPATH ? -Original Message- From: Jack Li [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 6:09 PM To: [EMAIL PROTECTED] Subject: RE: Does JDK1.3 works with Tomcat? I didn't use special methods. the java codes are very simple and listed below: import java.io.Serializable; public class Counter implements Serializable{ int count = 0; public Counter(){} public int getCount(){ count++; return this.count; } public void setCount(int count){ this.count = count; } } --- Here is the directory structure: web -- homepages -- jack -- counter.jsp web -- web-inf -- classes -- counter.class The error message is: Class homepages.jack.Counter not found in type declaration. Please help Thanks, Jack Li -Original Message- From: Ying Ho [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 11:03 AM To: [EMAIL PROTECTED] Subject: Re: Does JDK1.3 works with Tomcat? JDK 1.3 does work with tomcat. Your bean must be using some specific jdk 1.1.* methods that is not supported in jdk 1.3 (and most likely also jdk 1.2). - Original Message - From: "Jack Li" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 4:52 PM Subject: Does JDK1.3 works with Tomcat? Hello, Does JDK1.3 works with tomcat. My beans do not work with JDK1.3. Error message says can't find the class. But all these beans works fine with JDK1.1.8. Any ideas? Thanks, Jack Li
RE: Java Question on Inheritance
Ultimately, I want to get the thumb of this Image and convert it to a URL. I want to be able to do this efficiently and use something like the following syntax. myImage.getThumb().toURL() Is this possible? Yes, but getThumb() must return a subclass of SuperOne. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com mailto:[EMAIL PROTECTED] - Punisher of those who cannot spell dumb!
RE: JSP file: 404 file not found(caused by user ID?)
Title: RE: JSP file: 404 file not found(caused by user ID?) Thanx Kelvin. Your idea is correct. Not quite sure why Tomcat will give me a file not found error message if it is the user permission problem. I have one more question to ask: Is it OK to change the user/group permission of all files under the tomcat directory to nobody:nobody as suggested by Kelvin/you, though I don't think so? = Thx Jason -Original Message- From: Kevin Sangeelee To: [EMAIL PROTECTED] Sent: 3/23/01 12:35 AM Subject: Re: JSP file: 404 file not found(caused by user ID?) On Fri, 23 Mar 2001, Jason wrote: I run the tomcat using startup.sh using the user root. It runs fine. If I run it using the same startup.sh but using the user nobody instead, then I will get .jsp file: file not found when running few sample programs. E.g. the INCLUDE sample program. However, not all sample programs (.jsp file) give me the same kind of response. I am not absolutely sure it is related to the problem I mention above. I just know I get this problem whenever I run the script using the user nobody . Strange Have you tried chown -R nobody.nobody * from your tomcat directory? Perhaps there are permission problems.
ENC: Changing compiler arguments
Hi everybody. I am new to this list and I hope you can help me. How can I change the compiler command line arguments used in my JSP? I wanna add some args (like -encoding). Thanks Sergio. [EMAIL PROTECTED]
Re: Refresh
this is in your server.xml: Context path="... reloadable="true" /Context --- Jean-Francois Pelletier [EMAIL PROTECTED] wrote: Is there a configuration to check if the jsp file had been change. If it changed, recompile it else work with the compile file. The problem is when I change a jsp file, tomcat doesn't look if there is a change in the file. How can I resolve this problem Jeff __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Deploying a JSP among servlets
Tomcat 3.2.1 1) Is it possible to put (and access directly) a JSP among servlets located beneath WEB-INF/classes ? 2) Is it possible to package (and access directly) a JSP along with other classes located beneath WEB-INF/classes ? or 3) Is JSP access generally restricted to directories above WEB-INF ? All my servlets inherit from a superclass that provides pooled connections, sophisticated logging and collects some statistical data (time of first servlet instantiation, concurrent requests, duration of request handling etc.) The superclass is contained in a package along with a connection manager, a logger class etc. I want to build an admin web interface for that superclass (or the deriving servlets respectivly), providing output of formatted statistics and dynamic adjustment of some values (pool size, log level etc.). I would like to implement that web interface using JSP technology in a quick and dirty manner - which is sufficient for admin purposes :-) I struggled with web.xml for hours without success, but I am a JSP newbie. Thanks in advance, Wolfgang Stein
Re: JSP file: 404 file not found(caused by user ID?)
have you tried to insert your 'nobody' in the tomcat-user.xml file? gp --- Jason [EMAIL PROTECTED] wrote: Hi guys, I run the tomcat using startup.sh using the user "root". It runs fine. If I run it using the same startup.sh but using the user "nobody" instead, then I will get ".jsp file: file not found" when running few sample programs. E.g. the "INCLUDE" sample program. However, not all sample programs (.jsp file) give me the same kind of response. I am not absolutely sure it is related to the problem I mention above. I just know I get this problem whenever I run the script using the user "nobody" . Strange Any idea? Thank you for your help Jason __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Fw: Tomcat JDNC
- Original Message - From: João Folha To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 2:40 PM Subject: Tomcat JDNC Hi there.I am new in servlets, jsp, tomcat and java.I am trying to build a simple application that consults a very small database in ms access.So, I Have a few questions:What a need to write in server.xml configuration file?Where i put my database?Do I need to download any driver, i already have jdbc?see you
getting a context to run in SSL mode only
Is there a way to make a context run in SSL mode only? I can get the context to work in both. The context is also an apache SSL based virtual host. Should that matter? -- Mark Webb Dolphin Technology 1300B Floyd Ave Rome, NY 13440 Phone: (315) 334-4892 x222 Fax: (315) 339-4846 Email: [EMAIL PROTECTED]
RE: Java Question on Inheritance
No. The way you are doing means you are calling .toURL() method on what ever is returned by the method getThumb(). Unless getThumb returns a type of Object of type SuperOne or it's sub-class you cannot call this method and you should see a compile time error. What you can do is URL url = toURL( myImage.getThumb() ); in your SuperOne or its sub-class. === Gary Grewal -Original Message-From: Ryan [mailto:[EMAIL PROTECTED]]Sent: Thursday, March 22, 2001 10:38 AMTo: [EMAIL PROTECTED]Subject: Java Question on Inheritance I don't really know what to call what I'm having trouble with but here is what I am trying to do. I have asuperclass called SuperOne, it has a method to convert a string to a URL formatcalled toURL(). I havean Image class that is a subclass of SuperOne. It holds astringstoringthe local path of the image onmyharddrive. This subclass contains a method to get the corresponding thumbnail of the image on my harddrive. The method is called getThumb(). Ina thirdclass I want to instantiate an Image object something like: Image myImage = new Image("/home/pic.gif"); Ultimately, I want to get the thumb of this Image and convert it to a URL. I want to be able to do this efficiently and use something like the following syntax. myImage.getThumb().toURL() Is this possible? thanx -ryan
RE: Refresh
Title: RE: Refresh In servlets you can override the getLastModified method and have it return the date-time it was last modified. Also you can set the header Refresh to what ever time you want to refresh your browser. Try with JSP and let me know if it worked. === Gary Grewal -Original Message- From: Ryan [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 10:41 AM To: [EMAIL PROTECTED] Subject: Re: Refresh What I have to do most of the time is 'touch' the jsp file manually. Then the page gets updated. -ryan - Original Message - From: Jean-Francois Pelletier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 8:18 AM Subject: Refresh Is there a configuration to check if the jsp file had been change. If it changed, recompile it else work with the compile file. The problem is when I change a jsp file, tomcat doesn't look if there is a change in the file. How can I resolve this problem Jeff
SSL Certificate request creation withn Tomcat
Hi, I am trying to create a key certificate request using openssl. This code snippet creates the cert request key fine as a Java application but from within the Tomcat the sub-process spawned by Runtime.getRuntime().exec(...) launches but most of the times the process blocks/hangs/deadlock/never completes. Any ideas of what I can try?? Note; twice in my many tries was I able to create the key successfully. The behavior has been erratic. ... public boolean createCert(String cmd, String[] env) throws InterruptedException, IOException, Exception { boolean cert_created = false; try{ Runtime.getRuntime().exec(cmd, env); cert_created = true; } catch(Exception e) { cert_created = false; throw(e); } return cert_created; } public static void main(String args[]) { ServerConfigBean scb = new ServerConfigBean(); try{ String cmd = "d:\\cm\\openssl req -config d:\\cm\\myconf.cnf -newkey rsa:512 -keyout d:\\cm\\privkey.pem -out d:\\cm\\cert.pem"; String[] envInfo = new String[1]; envInfo[0] = "PATH d:\\cm"; scb.createCert(cmd,envInfo); } catch(Exception e){ e.printStackTrace(); } } ... Thanks, Naveen = Naveen 650 766 8252 (Cell) 408 274 3039 (Home) __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Help: Tomcat JDBC
you need Apache as your server through which Tomcat deploys the Jsp (HTML) implementation. You need to develop EJBs in Java that will be contacted by the Jsp interface and produce the output to your web. The database can be anything as long the EJB can access it. You might have to look up if you need the server.xml for accessing Access database, it might not be necessary, java supports jdbc to access (located anywhere on you drive). gp --- João_Folha [EMAIL PROTECTED] wrote: Hi there. I am new in servlets, jsp, tomcat and java. I am trying to build a simple application that consults a very small database in ms access. So, I Have a few questions: What a need to write in server.xml configuration file? Where i put my database? Do I need to download any driver, i already have jdbc? see you __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
System.out.println() and mystery error message
Title: System.out.println() and mystery error message I just started using Tomcat 3.2.1 and have 2 questions. First of all, what do I set to view servlet and class output so I can debug my code? The same information is going to the tomcat.log file that is showing in the Tomcat cmd window (I'm using Win2000). I have my Logger name entries in the server.xml file set as follows: Logger name=tc_log verbosityLevel = DEBUG / Logger name=servlet_log path=logs/servlet.log verbosityLevel = DEBUG / Logger name=JASPER_LOG path=logs/jasper.log verbosityLevel = DEBUG / Surely there must be a way to see the output of various files, otherwise how can you tell whats going on (sending it to html output is NOT an acceptable alternative) Secondl, when I OPEN a mere html page in the browser that submits to a jsp, I get following error message: Ctx /bill: IOException in :R /bill + /register.html + null Connection aborted by peer: socket write error. Thanks, Bill Blackmon Sr. Software Engineer, GetMusic (http://www.getmusic.com) 11 W. 19th Street, 3rd Floor New York, NY 10011 917-464-0683
Re: Java Question on Inheritance
Then this is my next problem. I currently have getThumb() returning an Image object. The part where I am stuck at is what to do in the toURL() method. my mock getThumb() method currently looks something like public Image getThumb(){ this.iValue = "/home/thumbs"; return this; } -ryan - Original Message - From: "Michael Wentzel" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 8:32 AM Subject: RE: Java Question on Inheritance Ultimately, I want to get the thumb of this Image and convert it to a URL. I want to be able to do this efficiently and use something like the following syntax. myImage.getThumb().toURL() Is this possible? Yes, but getThumb() must return a subclass of SuperOne. --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com mailto:[EMAIL PROTECTED] - Punisher of those who cannot spell dumb!
Tomcat dies on OS X
I'm running tomcat 3.2.1. on Mac OS X Public Beta and after starting tomcat up, it will suddenly die not respond...When I shut it down it throws me some errors pertaining to the HttpConnectionHandler class. When I try to startup again, it throws the same error. If I change the port number in server.xml and restart the whole problematic cycle starts again. I've narrowed down some specific behaviors like: - when I start tomcat, I can access the main page at http://localhost:port - context manager recognizes and sets the appropriate paths for my servlets and jsps - when I try to access my servlets/jsps, tomcat suddenly does not respond and thats where the trouble starts... if anyone has any insights or information about this behavior, pls let me know... // s a n d e e p // [EMAIL PROTECTED]
Re: Refresh
Even so.. I've still had to 'touch' half the time. Though I access my JSP code through windows via samba. Dunno if that has anything to do with it. -ryan - Original Message - From: "Tom Horn" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 9:13 AM Subject: Re: Refresh this is in your server.xml: Context path="... reloadable="true" /Context --- Jean-Francois Pelletier [EMAIL PROTECTED] wrote: Is there a configuration to check if the jsp file had been change. If it changed, recompile it else work with the compile file. The problem is when I change a jsp file, tomcat doesn't look if there is a change in the file. How can I resolve this problem Jeff __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
AW: Does JDK1.3 works with Tomcat?
I'm missing the package definition in Counter.java. To use a bean in JSP, thebean must belon to a package: The statement useBean id="myBean" class="Counter"/ ... will look for a class named counter in the package of the current class (which is the generated servlet). To whick package the generated servlet belongs is completely up to the jsp engine. -Ursprngliche Nachricht- Von: Jack Li [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 22. Mrz 2001 17:09 An: [EMAIL PROTECTED] Betreff: RE: Does JDK1.3 works with Tomcat? I didn't use special methods. the java codes are very simple and listed below: import java.io.Serializable; public class Counter implements Serializable{ int count = 0; public Counter(){} public int getCount(){ count++; return this.count; } public void setCount(int count){ this.count = count; } } --- Here is the directory structure: web -- homepages -- jack -- counter.jsp web -- web-inf -- classes -- counter.class The error message is: Class homepages.jack.Counter not found in type declaration. Please help Thanks, Jack Li -Original Message- From: Ying Ho [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 11:03 AM To: [EMAIL PROTECTED] Subject: Re: Does JDK1.3 works with Tomcat? JDK 1.3 does work with tomcat. Your bean must be using some specific jdk 1.1.* methods that is not supported in jdk 1.3 (and most likely also jdk 1.2). - Original Message - From: "Jack Li" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 4:52 PM Subject: Does JDK1.3 works with Tomcat? Hello, Does JDK1.3 works with tomcat. My beans do not work with JDK1.3. Error message says can't find the class. But all these beans works fine with JDK1.1.8. Any ideas? Thanks, Jack Li
mod_jk --- tomcat communication errors
Hi, I have a Live Website running tomcat 3.2.1 on Solaris 8 / JDK 1.3 / mod_jk and ajp13 and Apache 1.3.14 I have come across the following problems 1. Occasionaly, I get a 500 server error from apache and mod_jk.log has socket timeout errors. 2. Today, the site just hung. When I made requests, mod_jk logged them, but the requests were not reaching tomcat. i.e tail -f mod_jk.log showed a request being sent, but tail -f jasper.log did not have the corrosponding jsp page show up. Any idea what can be causing this problem ? Every time this happens, I need to restart apache/tomcat. Thanks Shahed.
RE: Delay (40 seconds) on first jsp access
The Psuedo-Random Number Generator (PRNG) used to create session ids took several seconds to initalize on some platforms. This caused a very noticable delay for the first request that created a session. This has been changed in Tomcat 3.2.2. The PRNG initialization is now *much* faster and is also done when Tomcat starts instead of when the first session is created. Has this change happened in 3.3M2 'cause my delay happens there too. Best Regards, -James Carroll MicroBrightField Inc. -Original Message- From: Marc Saegesser [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 10:50 AM To: [EMAIL PROTECTED] Subject: RE: Delay (40 seconds) on first jsp access Tomcat 3.2.2b1 is available now. Tomcat 3.2.2 beta 2 should be available sometime tomorrow. -Original Message- From: James Carroll [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:38 AM To: [EMAIL PROTECTED] Subject: Delay (40 seconds) on first jsp access Delay (40 seconds) on first jsp access Hi, On Windows 98, Tomcat 3.2.1 3.3M2 (they both show the delay) Stand-alone... I have some Servlets, that I include into some pages like so: ... h2Favorite Public Virtual Slides/h2 jsp:include page="servlet/GroupFavorites" flush="true" / ... Q: Is there any better way to include the output from a servlet in an otherwise static page? The very first time I start Tomcat, and access this page, there is a very very long delay. Everything is running on localhost, so I don't think there is any kind of name lookup that is timing out... If I turn on LogEvents in 3.3M2, I get the following: ... 2001-03-22 10:33:47 - LogEvents: preServletInit DEFAULT:/mbfvs ServletH TOMCAT/J SP/intro.jsp(SW (/intro.jsp CN=intro_1)) 2001-03-22 10:33:47 - LogEvents: postServletInit DEFAULT:/mbfvs ServletH TOMCAT/ JSP/intro.jsp(SW (/intro.jsp CN=intro_1)) 2001-03-22 10:33:47 - LogEvents: preService R( /mbfvs + /intro.jsp + null) Long delay 2001-03-22 10:34:21 - LogEvents: postService R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: postService R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: beforeCommit R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: afterBody R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: postRequest R( /mbfvs + /intro.jsp + null) The delay is _much_ longer than it would take to compile the jsp page, and there is no hard drive activity during the time. Does anyone have any idea what would be stalling at this point??? Thanks!!! -James Carroll MicroBrightField Inc.
Deploying servlet without an application
I want to make a simple applet run on tomcat. I don't want to put that in an enterprise application just want to have it in the classpath and make an entry in the web.xml like this servlet servlet-name ServRequests /servlet-name servlet-class com.mandar.servlet.RequestsServlet /servlet-class context-param init-param param-name acceptrequests /param-name param-value quoteRequests /param-value /init-param /context-param /servlet secondly can I pass in the init param as shown above ? Thanks in advance Mandar
RE: Delay (40 seconds) on first jsp access
Hi Alan, What initialisation is your servlet doing?? The servlet itself is attaching to MySQL, and doing a quick query. If I access the servlet directly, (no jsp) there is _no_ delay whatsoever. The MySQL connection, query, formatting all take less than a tenth of a second even on the very first access after Tomcat has started. I'm not creating any sessions yet, so the randomizing of the session ID isn't the cause of the problem... This is the last problem I have before I start doing some deployment! Now that I've spent the time to get to know Tomcat, I'm loving it. During Initialization: - the Servlet checks the context for an existing Database Engine and then (when it doesn't find one) instantiating one and adding it to the servlet context: // make sure that the VSDBEngine is running ServletContext context = getServletContext(); if (null == (itsEngine = (VSDBEngine)context.getAttribute("vsdbEngine"))) { itsEngine = new VSDBEngine(context); context.setAttribute("vsdbEngine", itsEngine); } - It initializes a database Connection Pool, and a JDBC Table-oriented helper class. public VSDBEngine(ServletContext sc) { // necessary for logging itsServletContext = sc; log("-- ( r e ) l o a d "); // load a database driver that the driver manager try { // The newInstance() call is a work around for some // broken Java implementations Class.forName("org.gjt.mm.mysql.Driver").newInstance(); } catch (Exception e) { log("Unable to load driver."); e.printStackTrace(); } // should work with Tomcat... databaseURL is defined in the web.xml file. String dbURL = config.getServletContext().getInitParameter("databaseURL"); // initialize the Connection Pool String dbURL = (String)sc.getInitParameter("databaseURL"); itsConnectionPool = new VSDBPool(dbURL); itsConnectionPool.sc = sc; itsTableJDBC = new TableBasicJDBC(); itsTableJDBC.setContext(sc); itsTableJDBC.setPool(itsConnectionPool); } - It does a query // set content type and other response header fields first statement = c.createStatement(); sql = "SELECT slideID FROM slide"; sql += " WHERE"; sql += " favorite='yes' "; statement.execute(sql); result = statement.getResultSet(); while (result.next()) { ids.addElement(new Long(result.getLong("slideID"))); } - then prints results. -James Carroll MicroBrightField Inc. -Original Message- From: Alan Stenhouse [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 10:43 AM To: [EMAIL PROTECTED] Subject: AW: Delay (40 seconds) on first jsp access Delay (40 seconds) on first jsp access Hi, On Windows 98, Tomcat 3.2.1 3.3M2 (they both show the delay) Stand-alone... I have some Servlets, that I include into some pages like so: ... h2Favorite Public Virtual Slides/h2 jsp:include page="servlet/GroupFavorites" flush="true" / ... Q: Is there any better way to include the output from a servlet in an otherwise static page? The very first time I start Tomcat, and access this page, there is a very very long delay. Everything is running on localhost, so I don't think there is any kind of name lookup that is timing out... If I turn on LogEvents in 3.3M2, I get the following: ... 2001-03-22 10:33:47 - LogEvents: preServletInit DEFAULT:/mbfvs ServletH TOMCAT/J SP/intro.jsp(SW (/intro.jsp CN=intro_1)) 2001-03-22 10:33:47 - LogEvents: postServletInit DEFAULT:/mbfvs ServletH TOMCAT/ JSP/intro.jsp(SW (/intro.jsp CN=intro_1)) 2001-03-22 10:33:47 - LogEvents: preService R( /mbfvs + /intro.jsp + null) Long delay 2001-03-22 10:34:21 - LogEvents: postService R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: postService R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: beforeCommit R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: afterBody R( /mbfvs + /intro.jsp + null) 2001-03-22 10:34:21 - LogEvents: postRequest R( /mbfvs + /intro.jsp + null) The delay is _much_ longer than it would take to compile the jsp page, and there is no hard drive activity during the time. Does anyone have any idea what would be stalling at this point??? Thanks!!! -James Carroll MicroBrightField Inc.
Re: Tomcat dies on OS X
Have you tried using 127.0.0.1:8080 instead of localhost:8080? I'm just throwing out ideas here. BTW, are you using the default port 8080 or did you change it to use another port? How is Tomcat finding your JVM? did you create a CLASSPATH var in your /etc/csh.cshrc file? I had weird sluggish behavior with 3.2.1 running on OSX beta where Tomcat would seem to finish its work fairly quickly from what I was seeing at the prompt output, But my browser would just sit there waiting for the results. I was also getting HotspotJVM fatal errors. I'm now using Tomcat 4.0b1 and these problems have disappeared. Hopefully OS X final will have a more stable JVM - miles I'm running tomcat 3.2.1. on Mac OS X Public Beta and after starting tomcat up, it will suddenly die not respond...When I shut it down it throws me some errors pertaining to the HttpConnectionHandler class. When I try to startup again, it throws the same error. If I change the port number in server.xml and restart the whole problematic cycle starts again. I've narrowed down some specific behaviors like: - when I start tomcat, I can access the main page at http://localhost:port - context manager recognizes and sets the appropriate paths for my servlets and jsps - when I try to access my servlets/jsps, tomcat suddenly does not respond and thats where the trouble starts... if anyone has any insights or information about this behavior, pls let me know... // s a n d e e p // [EMAIL PROTECTED]
Simple servlet without an application
Hi All, I want to make a simple servlet run on tomcat. I don't want to put that in an enterprise application just want to have it in the classpath and make an entry in the web.xml like this servlet servlet-name ServRequests /servlet-name servlet-class com.mandar.servlet.RequestsServlet /servlet-class context-param init-param param-name acceptrequests /param-name param-value quoteRequests /param-value /init-param /context-param /servlet For some reason this is not working. Secondly can I pass in the init param as shown above ? Thanks in advance Mandar
Re: AW: Tomcat 3.2 CPU utilization
Stefan, Tomcat expects there to be some configuration for the "root" context - that is, any resource directly under "/". An example would be "/index.html". This is as opposed to an application context such as "/myapp/index.html". The default install has a "ROOT.war" file. It seems that anything in that directory ("ROOT" - all caps), if it exists under the webapps directory, will be used for anything requested in the root context. If that directory doesn't exist, ***and*** if no other directory has been explicity specified for the root context in server.xml, then you'll see this CPU spinup. As an example, in our server.xml, we have specified the root context as: Context path="/" docBase="web/nosuchdir" debug="0" reloadable="false" /Context Since there is no relative directory named "web/nosuchdir", anything requested under "/" will return a "Not Found" error. Hope that helps, Donnie [EMAIL PROTECTED] 03/22/01 11:54AM Donnie, thank you for your hint. I have experienced similar problems with solaris 8 and tomcat 3.2.1. However I regret that I do not understand the mentioned problem: 6.11 Misconfiguration Can Cause CPU-Bound Loop If you misconfigure Tomcat 3.2 in a way that there is no valid context to handle a request (such as removing the root context and then attempting a request that should be handled by that context), Tomcat will enter a CPU-bound loop instead of responding with a 404 error. Workaround: kill the offending Tomcat process and correct your server.xml file such that there is a properly configured root context. Could anyone perhaps give an illustrative example ? TIA *stefan
RE: Tomcat 3.2 CPU utilization
I spent a full day and a half trying to track this down. Once I had figured out the problem, I then had enough info to find it in the release notes. In our situation, I can peg a single CPU on a multi-CPU box just by requesting "/anyfile.html" from a browser. Your browser will just sit there for almost ever, and you'll see the CPU % jump way up. I'm just mentioning this so that you can prove quickly that your problem is solved. Donnie [EMAIL PROTECTED] 03/22/01 11:54AM Donnie, Looks like this is the culprit. We will not know for sure for a day or 2 but it defiantly has our name on it. TY! Jason Maderios -Original Message- From: DONNIE HALE [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 11:17 AM To: [EMAIL PROTECTED] Subject: RE: Tomcat 3.2 CPU utilization Read the 3.2.1 release notes doc (http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/readme) and see if the 6.11 issue in there applies to your configuration. Donnie [EMAIL PROTECTED] 03/22/01 11:06AM D, Did you find a resolution to this? I am experiencing the same issue. Load keeps rising over a period of time until the machine can no-longer take requests. ENV: Sparc Sol 2.6 Tomcat 3.2.1 Java j2re1_3_0_02 Apache 1.3.17 Using mod_jk Anyone know where to look? Jason Maderios -Original Message- From: D I Macdonald [mailto:[EMAIL PROTECTED]] Sent: Monday, March 12, 2001 5:27 AM To: [EMAIL PROTECTED] Subject: Tomcat 3.2 CPU utilisation Hi there. I notice a few people have claimed to see high cpu utilisations when using tomcat on NT. I have been using tomcat 3.2 on Solaris 7 (Ultra 5). The configuration is pretty much out of the box, except for turning on https support and changing default http port to 80. The load on the machine is very light, and when the server is started CPU utilisation by the tomcat process is very low. However, inevitably over the next few days, CPU utilisation climbs to close to 100% and does not diminish until the server is restarted. Does anyone have any clues as to the probable cause of this? Regards D I Macdonald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
help: Tomcat JDBC
Hi there.I am new in servlets, jsp, tomcat and java.I am trying to build a simple application that consults a very small database in ms access.So, I Have a few questions:What a need to write in server.xml configuration file?Where i put my database?Do I need to download any driver, i already have jdbc? What i need to write in web.xml file?see you
RE: single login form for single sign on
On Thu, 22 Mar 2001 [EMAIL PROTECTED] wrote: So in essense the question is: Is there a way to specify a "global" login and error page that will be used by all webapps? No. Each web application is still a stand-alone entity. What single sign on support does for you is remember that you've signed on already. You are still using whatever login mechanism is defined for each individual web app. They don't even have to all use the same approach (some could be BASIC, some could be FORM, for example). What's the thinking behind this? Single sign on would imply having, at least the option of having a single login page, even if an individual web application could override the default and provide its own (for instance I guess webdav can't use FORM, so would have to override a FORM default to use BASIC/DIGEST). The primary thinking behind this is to obey the servlet specification's requirements :-). The typical use case is a "portal" site (say, like Yahoo) where there are a variety of applications that require you to log on before use, mixed in with a ton of stuff that is available to everyone. Each of the applications has it's own individual look-and-feel (within the broad UI of the entire site), and doesn't necessarily *want* to have to share a page. Now, I can go browse around Yahoo to my heart's content. As soon as I access an app that needs a login, I'm asked to do so (within the context of that app). To avoid making me unhappy, the site remembers who I am so that when I switch to a different application that needs login, I go straight to what I asked for without having to identify myself again. Having to define login for each we application: 1. provides a maintenance problem if you do want a common login page across all webapps Seems like a simple problem to solve in your build scripts. Copying commonly used components from a single source repository is quite straightforward. 2. begins to enter into "using my password for something I haven't approved it to be used for" teritory. i.e. the login page says you are logging into webapp1, but in fact your login will be used for webapp2. A single login page would tell you you are logging into both. So, all you have to do is say so on the login page, and this confusion cannot happen, right? If you follow the suggestion above and copy the common login page to each app you will have certainly done this. Hence my initial question - is this just the way it has been done, or does the Spec say it must be done that way etc.? http://java.sun.com/products/servlet/download.html See the "Security" chapter in the Servlet 2.2 spec. You will also want to review the requirements on servlet contexts (i.e. web applications) and sessions (scoped to a single web app) that affect application design for environments like the one discussed above. Many thanks Tim Craig McClanahan
Fw: Tomcat JDBC
- Original Message - From: João Folha To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 6:37 PM Subject: help: Tomcat JDBC Hi there.I am new in servlets, jsp, tomcat and java.I am trying to build a simple application that consults a very small database in ms access.So, I Have a few questions:What a need to write in server.xml configuration file?Where i put my database?Do I need to download any driver, i already have jdbc? What i need to write in web.xml file?see you
Fw: Tomcat JDBC
- Original Message - From: João Folha To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 6:38 PM Subject: Fw: Tomcat JDBC - Original Message - From: João Folha To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 6:37 PM Subject: help: Tomcat JDBC Hi there.I am new in servlets, jsp, tomcat and java.I am trying to build a simple application that consults a very small database in ms access.So, I Have a few questions:What a need to write in server.xml configuration file?Where i put my database?Do I need to download any driver, i already have jdbc? What i need to write in web.xml file?see you
Refresh Problem
Hi gurus! I'm using Cocoon 1.8.2 over Solaris 2.7 with Apache1.3.19 - Tomcat - Mod_jk When I run Cocoon in the standalone way over Windows ME, every modification I do on the files is inmediately refreshed, but I can't do the same when I run it in the way I said on the top or even in standalone! I cannot get the changes refreshed! Any suggestions? thanks! Lic. Martin O. Mauri Profesion + Auge A.F.J.P Parana 666 - Cap. Federal TE: (011) 4373-7786/7 int: 422 [EMAIL PROTECTED] www.profesi.com.ar
Re: Refresh
On Thu, 22 Mar 2001, Ryan wrote: Even so.. I've still had to 'touch' half the time. Though I access my JSP code through windows via samba. Dunno if that has anything to do with it. Yes, it absolutely does. Network file systems often cache directory information about the files you access, in order to avoid lots of network traffic. Thus, a file can be changed on the Samba server (with an updated timestamp), and the Samba client (i.e. the machine Tomcat is running on) does not know that. IMHO, running your webapps via a network file system (Windows shared disks, Samba, Unix NFS, etc.) is not a good idea. You'd be much better off (and have much better performance) if you moved Tomcat to where the files are located, rather than the other way around. -ryan Craig McClanahan
RE: Does JDK1.3 works with Tomcat?
You are correct. The problem I had was I didn't compile class into a package. Now it works. Thanks, Jack Li -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 12:34 PM To: '[EMAIL PROTECTED]' Subject: AW: Does JDK1.3 works with Tomcat? I'm missing the package definition in Counter.java. To use a bean in JSP, thebean must belon to a package: The statement useBean id="myBean" class="Counter"/ ... will look for a class named counter in the package of the current class (which is the generated servlet). To whick package the generated servlet belongs is completely up to the jsp engine. -Ursprngliche Nachricht- Von: Jack Li [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 22. Mrz 2001 17:09 An: [EMAIL PROTECTED] Betreff: RE: Does JDK1.3 works with Tomcat? I didn't use special methods. the java codes are very simple and listed below: import java.io.Serializable; public class Counter implements Serializable{ int count = 0; public Counter(){} public int getCount(){ count++; return this.count; } public void setCount(int count){ this.count = count; } } --- Here is the directory structure: web -- homepages -- jack -- counter.jsp web -- web-inf -- classes -- counter.class The error message is: Class homepages.jack.Counter not found in type declaration. Please help Thanks, Jack Li -Original Message- From: Ying Ho [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 11:03 AM To: [EMAIL PROTECTED] Subject: Re: Does JDK1.3 works with Tomcat? JDK 1.3 does work with tomcat. Your bean must be using some specific jdk 1.1.* methods that is not supported in jdk 1.3 (and most likely also jdk 1.2). - Original Message - From: "Jack Li" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 22, 2001 4:52 PM Subject: Does JDK1.3 works with Tomcat? Hello, Does JDK1.3 works with tomcat. My beans do not work with JDK1.3. Error message says can't find the class. But all these beans works fine with JDK1.1.8. Any ideas? Thanks, Jack Li
How to get Tomcat's session working with IIS
The seesion doesn't work with IIS 5.0 on windows 2000. session works on the same jsp page but can't pass to next page. the session scope of bean doesn't work either. Thanks, Jack Li
Re: single login form for single sign on
Craig R. McClanahan wrote: On Thu, 22 Mar 2001 [EMAIL PROTECTED] wrote: So in essense the question is: Is there a way to specify a "global" login and error page that will be used by all webapps? No. Each web application is still a stand-alone entity. What single sign on support does for you is remember that you've signed on already. You are still using whatever login mechanism is defined for each individual web app. They don't even have to all use the same approach (some could be BASIC, some could be FORM, for example). What's the thinking behind this? Single sign on would imply having, at least the option of having a single login page, even if an individual web application could override the default and provide its own (for instance I guess webdav can't use FORM, so would have to override a FORM default to use BASIC/DIGEST). The primary thinking behind this is to obey the servlet specification's requirements :-). The typical use case is a "portal" site (say, like Yahoo) where there are a variety of applications that require you to log on before use, mixed in with a ton of stuff that is available to everyone. Each of the applications has it's own individual look-and-feel (within the broad UI of the entire site), and doesn't necessarily *want* to have to share a page. Now, I can go browse around Yahoo to my heart's content. As soon as I access an app that needs a login, I'm asked to do so (within the context of that app). To avoid making me unhappy, the site remembers who I am so that when I switch to a different application that needs login, I go straight to what I asked for without having to identify myself again. Having to define login for each we application: 1. provides a maintenance problem if you do want a common login page across all webapps Seems like a simple problem to solve in your build scripts. Copying commonly used components from a single source repository is quite straightforward. 2. begins to enter into "using my password for something I haven't approved it to be used for" teritory. i.e. the login page says you are logging into webapp1, but in fact your login will be used for webapp2. A single login page would tell you you are logging into both. So, all you have to do is say so on the login page, and this confusion cannot happen, right? If you follow the suggestion above and copy the common login page to each app you will have certainly done this. Hence my initial question - is this just the way it has been done, or does the Spec say it must be done that way etc.? http://java.sun.com/products/servlet/download.html See the "Security" chapter in the Servlet 2.2 spec. You will also want to review the requirements on servlet contexts (i.e. web applications) and sessions (scoped to a single web app) that affect application design for environments like the one discussed above. Many thanks Tim Craig McClanahan Also can someone explain me when my authentication is successful using JDBCRealm , how do I get the role information, cause only two attributes are set for the session (username and password). Do I have to go back in the roles table to get the role info or they are stored in someway in the session. TIA -- Manish Poddar Paycom.net 310-827-5880 x 327 818-415-7447 (m)
catalina and jboss
Anyone have trouble getting the InitialContext for Jboss 2.1 when running Tomcat-4.0-b1? We are getting: Cannot instantiate class: org.jnp.interfaces.NamingContextFactoryorg.jnp.interfaces.NamingContextFacto ry We have verified that all our settings, etc., are correct, as we can do this successfully using tomcat3.2. I have seen various references to similar problems in the archives, but none that seemed to be relevant to the catalina build. In the meanwhile, we are reverting to 3.2 thanks, dan
Please Remove me from list
-Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 10:35 AM To: [EMAIL PROTECTED] Subject: RE: single login form for single sign on On Thu, 22 Mar 2001 [EMAIL PROTECTED] wrote: So in essense the question is: Is there a way to specify a "global" login and error page that will be used by all webapps? No. Each web application is still a stand-alone entity. What single sign on support does for you is remember that you've signed on already. You are still using whatever login mechanism is defined for each individual web app. They don't even have to all use the same approach (some could be BASIC, some could be FORM, for example). What's the thinking behind this? Single sign on would imply having, at least the option of having a single login page, even if an individual web application could override the default and provide its own (for instance I guess webdav can't use FORM, so would have to override a FORM default to use BASIC/DIGEST). The primary thinking behind this is to obey the servlet specification's requirements :-). The typical use case is a "portal" site (say, like Yahoo) where there are a variety of applications that require you to log on before use, mixed in with a ton of stuff that is available to everyone. Each of the applications has it's own individual look-and-feel (within the broad UI of the entire site), and doesn't necessarily *want* to have to share a page. Now, I can go browse around Yahoo to my heart's content. As soon as I access an app that needs a login, I'm asked to do so (within the context of that app). To avoid making me unhappy, the site remembers who I am so that when I switch to a different application that needs login, I go straight to what I asked for without having to identify myself again. Having to define login for each we application: 1. provides a maintenance problem if you do want a common login page across all webapps Seems like a simple problem to solve in your build scripts. Copying commonly used components from a single source repository is quite straightforward. 2. begins to enter into "using my password for something I haven't approved it to be used for" teritory. i.e. the login page says you are logging into webapp1, but in fact your login will be used for webapp2. A single login page would tell you you are logging into both. So, all you have to do is say so on the login page, and this confusion cannot happen, right? If you follow the suggestion above and copy the common login page to each app you will have certainly done this. Hence my initial question - is this just the way it has been done, or does the Spec say it must be done that way etc.? http://java.sun.com/products/servlet/download.html See the "Security" chapter in the Servlet 2.2 spec. You will also want to review the requirements on servlet contexts (i.e. web applications) and sessions (scoped to a single web app) that affect application design for environments like the one discussed above. Many thanks Tim Craig McClanahan
Re: catalina and jboss
On Thu, 22 Mar 2001, Daniel Toms wrote: Anyone have trouble getting the InitialContext for Jboss 2.1 when running Tomcat-4.0-b1? We are getting: Cannot instantiate class: org.jnp.interfaces.NamingContextFactoryorg.jnp.interfaces.NamingContextFacto ry We have verified that all our settings, etc., are correct, as we can do this successfully using tomcat3.2. I have seen various references to similar problems in the archives, but none that seemed to be relevant to the catalina build. In the meanwhile, we are reverting to 3.2 One potential issue is that Tomcat 4.0 also provides a JNDI InitialContext by default, populated from the settings in the web.xml file. You can disable this by adding "-nonaming" on the startup command line. NOTE: There have been patches against this functionality since 4.0-b1 -- I would recommend a recent nightly build. thanks, dan Craig
RE: Java Question on Inheritance
Then this is my next problem. I currently have getThumb() returning an Image object. The part where I am stuck at is what to do in the toURL() method. my mock getThumb() method currently looks something like public Image getThumb(){ this.iValue = "/home/thumbs"; return this; } Well, I would imagine your toURL() method would call a method that has a default implementation in SuperOne and was overridden in any subclasses that needed a different implementation. i.e. code public java.net.URL toURL() { java.net.URL url = null; if (getFilename() != null) { url = new java.net.URL(getFilename()); } return url; } /code It depends on what manner(servlet, applet, etc...) you are going to be using these objects where you can get additional relative file name info for the getFilename() method to include with the value in {SuperOne}.iValue. In addition, you might consider changing your class name. I caught myself several times referring to java.awt.Image when you were referring to Image class. It's always best to create unique class names whenever possible. Maybe SuperImage or something to create a mental correlation between this class and the class it extends. Just a thought... --- Michael Wentzel Software Developer Software As We Think - http://www.aswethink.com mailto:[EMAIL PROTECTED] - Punisher of those who cannot spell dumb!
RE: How to get Tomcat's session working with IIS
I would beg to differ - I am using IIS 5 on Win2K with sessions (at times holding up to 30 or 40 objects for each user). Questions to help diagnose the problem: 1. Does it work in Tomcat directly (using port 8080)? 2. Are you doing anything that would be strange? If the above doesn't help, try posting the JSPs for the two pages. Randy -Original Message- From: Jack Li [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 1:54 PM To: [EMAIL PROTECTED] Subject: How to get Tomcat's session working with IIS The seesion doesn't work with IIS 5.0 on windows 2000. session works on the same jsp page but can't pass to next page. the session scope of bean doesn't work either. Thanks, Jack Li