NoClassDefFoundError
Hi, I am a newbie that just installed tomcat on unix. My path commands were: TOMCAT_HOME=foo/jakarta-tomcat-3.2.1 JAVA_HOME=/opt/jdk-1.2.2 When I run startup.sh, I get the following error: Using classpath: foo/jakarta-tomcat-3.2.1/lib/*:/opt/jdk-1.2.2/lib/tools.jar vvenkata@vader% Exception in thread main java.lang.NoClassDefFoundError: org/apache/tomcat/startup/Tomcat Does anyone know how I can correct this? Thanks. Vasanth
java.lang.NullPointerException....Helllloo PLZ HELP me
HI i mailed again caz i need reply today, my Boss getting angry. Yesterday I was also mailed my problem but there was persons who guide me but i need more guidence to sort out that problem... so i m mailing again. I am webdevloper developing one website and using tools JSP, Servlet, and working on Jakarta-Tomcat version 3.1. I am the old user of jakarta-tomcat, so i know how to configure it properly. I m using tomcat for my website but from last 5 days, I am getting the problems what i undersatnd it is related to the buffer or context stuff but i m unbale to sort it out, so there is full description of my problem: 1Some time it start working properly and then suddenly start give following Exception from Browser Error: 500 Location: /examples/jsp/New/dyeing.jsp Internal Servlet Error: java.lang.NullPointerException at jsp.New._0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0._jspService(_0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0.java:123) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) 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(HttpConnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338) at java.lang.Thread.run(Unknown Source) then i Checked the 123 line of _0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0.java there was the following code: } catch (Exception ex) { if (out.getBufferSize() != 0) out.clearBuffer(); pageContext.handlePageException(ex); } finally { out.flush(); _jspxFactory.releasePageContext(pageContext); } OR Error: 500 Location: /examples Internal Servlet Error: java.lang.NullPointerException at org.apache.tomcat.servlets.DefaultServlet.serveFile(DefaultServlet.java:301) at org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:218) at javax.servlet.http.HttpServlet.service(HttpServlet.java:499) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) 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(HttpConnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338) at java.lang.Thread.run(Unknown Source) then i Checked the 301 line of DefaultServlet.java there was the following code: if(absPath.indexOf(..) != -1) { // We have .. in the path... response.sendError(response.SC_NOT_FOUND); return; } 2 or very rarely it gives the following message or error Error: 404 Location: / File Not Found / 3 even it gives like most common message of Browser by the giving the URL http://localhost:8080 on InternetExplorer and then suddenly start working and then again same message which is as follow The page cannot be found bla bla bla HTTP 404 - File not found Internet Explorer The following r the configurations of My system I am using Compaq 800 MHZ of PIII, 20 GB Hard Disk, 128 MB RAM. Operating System WinNT 4 +Service Pack 5 Data Base Oracle 8 Tools JDK1.3.0_01, JSP1.1, Servlet, Jakarta-ant, JavaScript, HTML and etc Autoexec.bat Path = set PATH=%PATH%;c:\jdk13\bin;c:\java\jakarta-tomcat\bin set JAVA_HOME=c:\jdk13 set CLASSPATH=.;c:\jdk13\jre\lib\rt.jar; c:\jdk13\lib\tools.jar; c:\jdk13\lib\jsdk.jar; c:\java\jakarta-tomcat\lib\servlet.jar set ANT_HOME=c:\java\jakarta-ant set Temp=C:\Temp I will be very thanks full if you guide me that whats going on, is there some thing wrong with product or there is some problem in my configuration. Where as I using tomcat on port 8080 and I changed it many times but nothing happen else dam exceptions or messages. I installed JDK1.3 Tomcat 10 times in these 4 days with different settings but I am still not able to sort out the problem. So again I am very hope
RE: java.lang.NullPointerException....Helllloo PLZ HELP me
can you trouble shoot the null pointers.. i mean is pagecontext initialized.. do a system.out.println on it what the the exact lines of code the npe comes from.. are you using jikes to compile jsp or default javac?? man my boss is gonna kill me 2.. -Original Message- From: Naeem Malik [mailto:[EMAIL PROTECTED]] Sent: Friday, 18 May 2001 5:34 PM To: [EMAIL PROTECTED] Subject: java.lang.NullPointerExceptionHeoo PLZ HELP me HI i mailed again caz i need reply today, my Boss getting angry. Yesterday I was also mailed my problem but there was persons who guide me but i need more guidence to sort out that problem... so i m mailing again. I am webdevloper developing one website and using tools JSP, Servlet, and working on Jakarta-Tomcat version 3.1. I am the old user of jakarta-tomcat, so i know how to configure it properly. I m using tomcat for my website but from last 5 days, I am getting the problems what i undersatnd it is related to the buffer or context stuff but i m unbale to sort it out, so there is full description of my problem: 1Some time it start working properly and then suddenly start give following Exception from Browser Error: 500 Location: /examples/jsp/New/dyeing.jsp Internal Servlet Error: java.lang.NullPointerException at jsp.New._0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0._jspService(_000 2fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0.java:123) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja va:174) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) 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(Unknown Source) then i Checked the 123 line of _0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0.java there was the following code: } catch (Exception ex) { if (out.getBufferSize() != 0) out.clearBuffer(); pageContext.handlePageException(ex); } finally { out.flush(); _jspxFactory.releasePageContext(pageContext); } OR Error: 500 Location: /examples Internal Servlet Error: java.lang.NullPointerException at org.apache.tomcat.servlets.DefaultServlet.serveFile(DefaultServlet.java:301) at org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:218) at javax.servlet.http.HttpServlet.service(HttpServlet.java:499) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) 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(Unknown Source) then i Checked the 301 line of DefaultServlet.java there was the following code: if(absPath.indexOf(..) != -1) { // We have .. in the path... response.sendError(response.SC_NOT_FOUND); return; } 2 or very rarely it gives the following message or error Error: 404 Location: / File Not Found / 3 even it gives like most common message of Browser by the giving the URL http://localhost:8080 on InternetExplorer and then suddenly start working and then again same message which is as follow The page cannot be found bla bla bla HTTP 404 - File not found Internet Explorer The following r the configurations of My system I am using Compaq 800 MHZ of PIII, 20 GB Hard Disk, 128 MB RAM. Operating System WinNT 4 +Service Pack 5 Data Base Oracle 8 Tools JDK1.3.0_01, JSP1.1, Servlet, Jakarta-ant, JavaScript, HTML and etc Autoexec.bat Path = set PATH=%PATH%;c:\jdk13\bin;c:\java\jakarta-tomcat\bin set JAVA_HOME=c:\jdk13 set CLASSPATH=.;c:\jdk13\jre\lib\rt.jar; c:\jdk13\lib\tools.jar; c:\jdk13\lib\jsdk.jar; c:\java\jakarta-tomcat\lib\servlet.jar set ANT_HOME=c:\java\jakarta-ant
Re: Has anybody resolved no-refresh of servlets?
On Thu, 17 May 2001 14:20:03 CDT Mark Mynsted wrote: Good idea, but they are not. The really frustrating thing is that the same s ervlets will reload some times, and will not other times. Could this be rela ted to me running Tomcat in process with IIS? No, I don't think it's related to IIS. We encounter the same problem on several installations of Apache+Tomcat. I assume that maybe there is an influence of used JDK -- on installations with Sun's JDK1.3 this failure is rather rare; using IBM's JDK1.3 it's more or less common sense. Anybody out there with similar observations? Br, Martin Exler
Re: Apache 1.3.19/Tomcat 4.0B5 conf
Hey, why do all your messages require chinese simplified char set? Can you disable this? - Original Message - From: egcs12md To: [EMAIL PROTECTED] Sent: Friday, May 18, 2001 3:34 AM Subject: Apache 1.3.19/Tomcat 4.0B5 conf Has someone successfully use Apache 1.3.19 with Tomcat 4.0b5 in WinNT/Win2K,and how can I use Tomcat-Apache Engine in %APACHE_HOME%\htdocs and all it's subdirectories ?
RE: servlet chaining, session null
ok, but it's between the second and the third servlet that the problem appears !!! -Message d'origine- De: Bo Xu [SMTP:[EMAIL PROTECTED]] Date: jeudi 17 mai 2001 20:52 À:[EMAIL PROTECTED] Objet:Re: servlet chaining, session null [EMAIL PROTECTED] wrote: Well, all my servlets are on the same webapps. I don't use the url rewriting, but the HttpSession. for example in the first servlet: HttpSession session = request.getSession(false); if (session == null) session = request.getSession(true); session.setAttribute(path1,request.getServletPath()); RequestDispatcher dispatch = this.getServletContext().getRequestDispatcher(/servlet/chaining.Servlet2 ); dispatch.forward(request,response); in Servlet2 HttpSession session = request.getSession(false); session.setAttribute(path2,request.getServletPath()); RequestDispatcher dispatch = this.getServletContext().getRequestDispatcher(/servlet/chaining.Servlet3 ); dispatch.forward(request,response); I do the same in the third servlet, but when i test my session, it's null. That's funny, but it only happen the first time i send the request, the second time, everything works fine !!! [...] Hi :-) I am not sure, is the following possibe? in the first time, because you use getRequestDispatcher, so the new cookie which includes JSESSIONID made by MyServlet1 hasn't got the time Yet to goto :-) MyServlet2/3. in the second time, that cookie(made by MyServlet1) has already been received by the browser of your client, and re-sent to MyServlet1/2/3, so now in MyServlet2/3, session is not null. Bo May.17, 2001
Cartes Offertes
Imprimerie - Objets Promotionnels - Vtements Publicitaires OFFRE SPECIALE DE LANCEMENT Réalisez vous même vôtre maquette sur le site Internet et recevez : 250 CARTES DE VISITE GRATUITES* ! Cartes 8,5x5,4 Recto quadrichromie (toutes couleurs) sur carton 350g. CM. (*) Participation aux frais de port 30 F. Offre réservée aux professionnels valable jusqu'au 31/05/2001, pour toute maquette réalisée sur Internet. 1 lot de 250 cartes gratuites par société. DECOUVREZ sur www.omnipub.net Notre catalogue de supports publicitaires Le calcul de devis instantanement sur le site La réalisation et sauvegarde de vos MAQUETTES en ligne. Imprimerie - Objets Promotionnels - Vtements Publicitaires 280, bis rue Roland Garros - Espace Fréjorgues Ouest - 34135 Mauguio Tél. 04 99 13 63 33 - Fax. 04 67 65 03 06 - Mail : [EMAIL PROTECTED]
RE: AW: mailing list or news group??
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 For what it's worth, I agree strongly with the suggestion of list into : this mailing list) should split into several more specific ones: e.g. tomcat + IIS tomcat + apache (win) tomcat + apache (linux) tomcat + security and so on. but I think splitting it into: tomcat-user@ . . . and tomcat-newbie@ . . . would be unhelpful as very few would use the newbie group - the majority would look for power users on the tomcat-user@ group. Just my 2p. Tom Tom Raftery Zenith Solutions Ltd Unit 6, 4 Dean Street, Cork, Ireland. phone: +353-21-4318300 mobile: +353-87-2506527 web: www.zenith.ie http://www.zenith.ie WAP: www.zenith.ie/wap http://www.zenith.ie/wap email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - -Original Message- From: Paul Friedman [mailto:[EMAIL PROTECTED]] Sent: 17 May 2001 21:35 To: [EMAIL PROTECTED] Subject: Re: AW: mailing list or news group?? Hello All, snip/ this mailing list) should split into several more specific ones: e.g. tomcat + IIS tomcat + apache (win) tomcat + apache (linux) tomcat + security and so on. This isn't a bad idea. I am seconding this motion. I remember a thread a while back that mentioned splitting this mailing-list into tomcat-user@ . . . and tomcat-newbie@ . . . And I remember that this idea had some support. Even a split as simple as this would help the frequent filling of my tomcat inbox. I wonder how much traffic this list gets compared to all the other apache/jakarta lists, if it's unique for its high volume. This is definitely the most active mailing list to which I subscribe. (the Struts project comes close from time to time but not nearly as constant). Perhaps the tomcat-user list could be split into smaller, more specialized lists and a news group web site could aggregate the threads ? pax et bonunm. p. -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBOwTi+Gy/uj7eqtwJEQLYFACg0PwUuxW23+WfP/T8TKPvxJoU3lYAnR6X stItxSpxH7sHqkrus6JSut6Z =EUmg -END PGP SIGNATURE- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify [EMAIL PROTECTED]
java.lang.NullPointerException
HI Thanx for Replay but why it work some time. Yesterday I was also mailed my problem but there was persons who guide me but i need more guidence to sort out that problem... so i m mailing again. I am webdevloper developing one website and using tools JSP, Servlet, and working on Jakarta-Tomcat version 3.1. I am the old user of jakarta-tomcat, so i know how to configure it properly. I m using tomcat for my website but from last 5 days, I am getting the problems what i undersatnd it is related to the buffer or context stuff but i m unbale to sort it out, so there is full description of my problem: 1Some time it start working properly and then suddenly start give following Exception from Browser Error: 500 Location: /examples/jsp/New/dyeing.jsp Internal Servlet Error: java.lang.NullPointerException at jsp.New._0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0._jspService(_0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0.java:123) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) 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(HttpConnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338) at java.lang.Thread.run(Unknown Source) then i Checked the 123 line of _0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0.java there was the following code: } catch (Exception ex) { if (out.getBufferSize() != 0) out.clearBuffer(); pageContext.handlePageException(ex); } finally { out.flush(); _jspxFactory.releasePageContext(pageContext); } OR Error: 500 Location: /examples Internal Servlet Error: java.lang.NullPointerException at org.apache.tomcat.servlets.DefaultServlet.serveFile(DefaultServlet.java:301) at org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:218) at javax.servlet.http.HttpServlet.service(HttpServlet.java:499) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) 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(HttpConnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338) at java.lang.Thread.run(Unknown Source) then i Checked the 301 line of DefaultServlet.java there was the following code: if(absPath.indexOf(..) != -1) { // We have .. in the path... response.sendError(response.SC_NOT_FOUND); return; } 2 or very rarely it gives the following message or error Error: 404 Location: / File Not Found / 3 even it gives like most common message of Browser by the giving the URL http://localhost:8080 on InternetExplorer and then suddenly start working and then again same message which is as follow The page cannot be found bla bla bla HTTP 404 - File not found Internet Explorer The following r the configurations of My system I am using Compaq 800 MHZ of PIII, 20 GB Hard Disk, 128 MB RAM. Operating System WinNT 4 +Service Pack 5 Data Base Oracle 8 Tools JDK1.3.0_01, JSP1.1, Servlet, Jakarta-ant, JavaScript, HTML and etc Autoexec.bat Path = set PATH=%PATH%;c:\jdk13\bin;c:\java\jakarta-tomcat\bin set JAVA_HOME=c:\jdk13 set CLASSPATH=.;c:\jdk13\jre\lib\rt.jar; c:\jdk13\lib\tools.jar; c:\jdk13\lib\jsdk.jar; c:\java\jakarta-tomcat\lib\servlet.jar set ANT_HOME=c:\java\jakarta-ant set Temp=C:\Temp I will be very thanks full if you guide me that whats going on, is there some thing wrong with product or there is some problem in my configuration. Where as I using tomcat on port 8080 and I changed it many times but nothing happen else dam exceptions or messages. I installed JDK1.3 Tomcat 10 times in these 4 days with different settings but I am still not able to sort out the problem. So again I am very hope full for positive
mod_jk and new HTTP methods
Hi, as it seems, mod_jk has a set of predefined HTTP methods it can exchange between Apache and tomcat. This is rather unfortunate since I am implementing a WebDAV server and WebDAV introduces a range of new HTTP methods. Whom would I best talk to regarding extending mod_jk to be able to handle unknown methods as well? Stefan
Re: Apache 1.3.19/Tomcat 4.0B5 conf
Ok, but after I deleted GB2312 declaration, It frozen yet, NO processor times used ! Can someone give me a server.xml httpd.conf example ?
Apache 1.3.19/Tomcat 4.0B5 conf
Ok, but after I deleted GB2312 declaration, It frozen yet, NO processor times used ! Can someone give me a server.xml httpd.conf example ? By the way, I compilemod_webapp.dll libapr.dll use VC6 in Win2K pro.
Apache 1.3.19/Tomcat 4.0B5 conf
Ok, but after I deleted GB2312 declaration, It frozen yet, NO processor times used ! Can someone give me a server.xml httpd.conf example ? By the way, I compilemod_webapp.dll libapr.dll use VC6 in Win2K pro.
Apache 1.3.19/Tomcat 4.0B5 conf
Ok, but after I deleted GB2312 declaration, It frozen yet, NO processor times used ! Can someone give me a server.xml httpd.conf example ? By the way, I compilemod_webapp.dll libapr.dll use VC6 in Win2K pro.
Re: Tomcat in production
I have 2 Intel dual CPU NEC 5800 machines on production since last 3 months with Tomcat 3.2 on win2k with iis 5.0 and MSSQL 7.0, so far no complaints, no crashes, better performance compared to Coldfusion 4.5 I have an unscientific success story, in that Tomcat has treated me well in my small business environment. I can not give you actual stats. But for one project I have, I have about 20-25 servlets and jsp's that take about 45,000 hits over the course of a month. I've never had any complaints about speed or anything (of course, there are many variables in the speed equation, but Tomcat has not presented me with a weak link in my setup). That's about as un-scientific as you can get, but it's what I have to offer. BTW, my config is apache/tomcat/mysql on a dual PIII-600 over a 384K line. I have not used any other container, so I can not compare any other engine directly. Hope that helps a bit, Rob Mazur Aravind Naidu wrote: Hi All, We have been using Tomcat for development and are quite happy with it. I would like to know any success/failure(?) stories of Tomcat as a production servlet/JSP engine. -- Aravind _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
RE: Cartes Offertes
UNSUBSCRIBE dont send me any more mail -Original Message-From: Nicolas Dulion [mailto:[EMAIL PROTECTED]]Sent: Friday, May 18, 2001 8:46 AMTo: [EMAIL PROTECTED]Subject: Cartes Offertes Imprimerie - Objets Promotionnels - Vêtements Publicitaires OFFRE SPECIALE DE LANCEMENT Réalisez vous même vôtre maquette sur le site Internet et recevez : 250 CARTES DE VISITE GRATUITES* ! Cartes 8,5x5,4 Recto quadrichromie (toutes couleurs) sur carton 350g. CM. (*) Participation aux frais de port 30 F. Offre réservée aux professionnels valable jusqu'au 31/05/2001, pour toute maquette réalisée sur Internet.1 lot de 250 cartes gratuites par société. DECOUVREZ sur www.omnipub.net Notre catalogue de supports publicitaires Le calcul de devis instantanement sur le site La réalisation et sauvegarde de vos MAQUETTES en ligne. Imprimerie - Objets Promotionnels - Vêtements Publicitaires 280, bis rue Roland Garros - Espace Fréjorgues Ouest - 34135 MauguioTél. 04 99 13 63 33 - Fax. 04 67 65 03 06 - Mail : [EMAIL PROTECTED]
Re: starting tomcat in debug VM
doh! I should try reading the docs -Xnoagent did the trick Nathan Coast wrote: Hi, I'm trying to start tomcat in debug mode using these options: TOMCAT_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n as I understand it, the address to which the debuger should connect should be displayed on stdout. However, all that is being displayed is the agent password. Any ideas what (if any) other parameters need to be passed to java in order to obtain the port that the vm is waiting for? I've tried specifying the port using address=localhost:1234 but this makes no difference. Thanks in advance Nathan
RE: Cartes Offertes
how can people be stupid enough to try to unsubscribe in this way after all that discussion and BIG subjects. maybe the human race should give up this planet. Sascha Danny Angus [EMAIL PROTECTED] on 05/18/2001 05:41:17 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: sascha kolski/Dcsimtech) Subject: RE: Cartes Offertes UNSUBSCRIBE dont send me any more mail -Original Message- From: Nicolas Dulion [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 8:46 AM To: [EMAIL PROTECTED] Subject: Cartes Offertes Imprimerie - Objets Promotionnels - Vêtements Publicitaires OFFRE SPECIALE DE LANCEMENT Réalisez vous même vôtre maquette sur le site Internet et recevez : 250 CARTES DE VISITE GRATUITES* ! Cartes 8,5x5,4 Recto quadrichromie (toutes couleurs) sur carton 350g. CM. (*) Participation aux frais de port 30 F. Offre réservée aux professionnels valable jusqu'au 31/05/2001, pour toute maquette réalisée sur Internet. 1 lot de 250 cartes gratuites par société. DECOUVREZ sur www.omnipub.net a.. Notre catalogue de supports publicitaires b.. Le calcul de devis instantanement sur le site c.. La réalisation et sauvegarde de vos MAQUETTES en ligne. Imprimerie - Objets Promotionnels - Vêtements Publicitaires 280, bis rue Roland Garros - Espace Fréjorgues Ouest - 34135 Mauguio Tél. 04 99 13 63 33 - Fax. 04 67 65 03 06 - Mail : [EMAIL PROTECTED] UNSUBSCRIBE dont send me any more mail -Original Message-From: Nicolas Dulion [mailto:[EMAIL PROTECTED]]Sent: Friday, May 18, 2001 8:46 AMTo: [EMAIL PROTECTED]Subject: Cartes Offertes Imprimerie - Objets Promotionnels - Vêtements Publicitaires OFFRE SPECIALE DE LANCEMENT Réalisez vous même vôtre maquette sur le site Internet et recevez : 250 CARTES DE VISITE GRATUITES* ! Cartes 8,5x5,4 Recto quadrichromie (toutes couleurs) sur carton 350g. CM. (*) Participation aux frais de port 30 F. Offre réservée aux professionnels valable jusqu'au 31/05/2001, pour toute maquette réalisée sur Internet.1 lot de 250 cartes gratuites par société. DECOUVREZ sur www.omnipub.net Notre catalogue de supports publicitaires Le calcul de devis instantanement sur le site La réalisation et sauvegarde de vos MAQUETTES en ligne. Imprimerie - Objets Promotionnels - Vêtements Publicitaires 280, bis rue Roland Garros - Espace Fréjorgues Ouest - 34135 MauguioTél. 04 99 13 63 33 - Fax. 04 67 65 03 06 - Mail : [EMAIL PROTECTED]
Re: Cartes Offertes
Danny I have seen you participating actively in james-user mailing list, how come you are not able to unscribe properly -;) venkat - Original Message - From: Danny Angus To: [EMAIL PROTECTED] Sent: Friday, May 18, 2001 5:41 PM Subject: RE: Cartes Offertes UNSUBSCRIBE dont send me any more mail -Original Message-From: Nicolas Dulion [mailto:[EMAIL PROTECTED]]Sent: Friday, May 18, 2001 8:46 AMTo: [EMAIL PROTECTED]Subject: Cartes Offertes Imprimerie - Objets Promotionnels - Vêtements Publicitaires OFFRE SPECIALE DE LANCEMENT Réalisez vous même vôtre maquette sur le site Internet et recevez : 250 CARTES DE VISITE GRATUITES* ! Cartes 8,5x5,4 Recto quadrichromie (toutes couleurs) sur carton 350g. CM. (*) Participation aux frais de port 30 F. Offre réservée aux professionnels valable jusqu'au 31/05/2001, pour toute maquette réalisée sur Internet.1 lot de 250 cartes gratuites par société. DECOUVREZ sur www.omnipub.net Notre catalogue de supports publicitaires Le calcul de devis instantanement sur le site La réalisation et sauvegarde de vos MAQUETTES en ligne. Imprimerie - Objets Promotionnels - Vêtements Publicitaires 280, bis rue Roland Garros - Espace Fréjorgues Ouest - 34135 MauguioTél. 04 99 13 63 33 - Fax. 04 67 65 03 06 - Mail : [EMAIL PROTECTED]
How do I do an SSL handshake from a Java Servlet ?
I've got to write a java servlet to Login to a website which uses SSL. When you look at the web page that does the log on, the form uses a post. I create the url url = (URL) new URL(https://www.nxtrains.co.uk/NASApp/Neg/RoutingControl;); then set up a connection HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setRequestMethod(POST); conn.setDoOutput(true); conn.setDoInput(true); conn.setRequestProperty(Content-Length, +postData.length()); Then do the connect conn.connect(); OutputStreamWriter os = new OutputStreamWriter(conn.getOutputStream()); os.write(postData, 0, postData.length()); os.flush(); os.close(); But it isn't returning the screen which confirms the log on. Do I need to do an SSL handshake first, and if so what does it look like ? Thanks David
tomcat IIS error
got this error under the isapi.log jk_uri_worker_map_t::uri_worker_map_free, NULL parameters also under the w3svc/ex"date" GET /jakarta/examples/jsp/snp/snoop.jsp 200
Tomcat Performance on a Dual Processor Win2K Machine.
Hi All, I have a java application running under this setup: Tomcat-3.2, IIS-5.0,SQL Server-7.0 with Windows 2000 Professional on a Dual Processor Machine. The problem am encountering is High CPU utilization and non-release of CPU by the application. Any pointers to the cause of this problem. Btw running the same application on a Single processor doesn't cause the problem. Rgds, Karthik _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Multiple VMs on NT
Hello, Does anyone know how to force tomcat 3.2* to run each webapp in a separate VM on NT? Rgds Antony
RE: Tomcat Performance on a Dual Processor Win2K Machine.
Could be something on your app or in the JVM you use. My dev setup is exactly as yours ( Dual processor ) , but i use Tomcat 3.3, i did not found that that problem with the apps i normally run on tomcat, btw JetSpeed, CoCoon2 and my own apps ( JDBC intensive which every DB in market ). Saludos , Ignacio J. Ortega -Mensaje original- De: karthik g [mailto:[EMAIL PROTECTED]] Enviado el: viernes 18 de mayo de 2001 12:15 Para: [EMAIL PROTECTED] Asunto: Tomcat Performance on a Dual Processor Win2K Machine. Hi All, I have a java application running under this setup: Tomcat-3.2, IIS-5.0,SQL Server-7.0 with Windows 2000 Professional on a Dual Processor Machine. The problem am encountering is High CPU utilization and non-release of CPU by the application. Any pointers to the cause of this problem. Btw running the same application on a Single processor doesn't cause the problem. Rgds, Karthik __ ___ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
java.lang.LinkageError: Class javax/servlet/http/HttpSession violates loader constraints
I have downloaded from http://jakarta.apache.org/builds/jakarta-servletapi-4/nightly/ jakarta-servletapi-4-20010517.zip and added classes in the appropriate folder. Thanks a lot Bip... But now i have an other error that i have never seen before : Remenber that i am under W2000 TC4B4, JDK last release. java.lang.LinkageError: Class javax/servlet/http/HttpSession violates loader constraints at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at egc.net.EGCHttpUtils.newSessionThenRedirect(EGCHttpUtils.java:25) at org.apache.jsp.valider_0005fenter_jsp._jspService(valider_0005fenter_jsp.jav a:76) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:200) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:254) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:194) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:255) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:225) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:472) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 875) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952) at java.lang.Thread.run(Thread.java:484) -Message d'origine- De : Bip Thelin [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 17 mai 2001 18:56 À : '[EMAIL PROTECTED]' Objet : RE: Tomcat 4/Apache combination On Thu, 17 May 2001, Bruno Crapart wrote: The same for me ! I am confident with Jakarta But i encounter one problem below : A Servlet Exception Has Occurred org.apache.jasper.JasperException: Unable to compile class for JSPC:\tomcat\bin\..\work\localhost\egc\carriersite\code_jsp.java:62: Incompatible type for method. Explicit cast needed to convert java.lang.Throwable to java.lang.Exception. if (pageContext != null)
AW: Tomcat Performance on a Dual Processor Win2K Machine.
On machines with more than one processor, the possibilty that an implementation error with synchronized will have impact, drastically grows. So this might be the reason for this behaviour. There are tools out there that can detect such problems: (At least they promise to do so) http://www.numega.com/devcenter/jc.shtml (Commerzial) http://www.ispras.ru/~knizhnik/jlint/ReadMe.htm (Free) -Ursprüngliche Nachricht- Von: karthik g [mailto:[EMAIL PROTECTED]] Gesendet: Freitag, 18. Mai 2001 12:15 An: [EMAIL PROTECTED] Betreff: Tomcat Performance on a Dual Processor Win2K Machine. snip/ I have a java application running under this setup: Tomcat-3.2, IIS-5.0,SQL Server-7.0 with Windows 2000 Professional on a Dual Processor Machine. The problem am encountering is High CPU utilization and non-release of CPU by the application. Any pointers to the cause of this problem. snip/
RE: Bean Choices (code question)
Title: RE: Bean Choices (code question) there is no gc on static objects. static objects(methods,fields, or classes) are created once on startup and there is only one instance of the method or field ever created that all requestors to your class will use. But with Tomcat I do believe that if you have the same class in 2 different contexts, that it will load two separate instances of your bean due to the different class loaders. This also means that if you are writing to the static fields on the first(or any) call, make sure to synchronize the write, in case 2 calls occur at the same time. Charlie -Original Message- From: Jeff Kilbride [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 17, 2001 8:56 PM To: [EMAIL PROTECTED] Subject: Re: Bean Choices (code question) Yeah, I know, but it's tempting to write all the methods as public static. Then I don't have to create the object at all, but I don't know the affects on garbage collection. --jeff - Original Message - From: Ross Dyson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 17, 2001 5:24 PM Subject: RE: Bean Choices (code question) If you make the bean class have a private constructor and a static reference to an instance of its own class, then there will always be a strong reference from the class itself to the instance of the class. (The first call to bean.getInstance() instantiates the private static member variable which is your singleton instance of your bean, the contructor does the db work etc.) Therefore, it won't get gc'd. That's the way I do my classes that do that kind of stuff, anyway. -Original Message- From: Jeff Kilbride [mailto:[EMAIL PROTECTED]] Sent: Friday, 18 May 2001 9:35 AM To: [EMAIL PROTECTED] Subject: Bean Choices (code question) I'm sorry if this is a little off-topic, since it is more about java code, but I thought Tomcat users would be interested/knowledgeable about the way beans work. I have a lot of informational beans that hold static reference data (think ISO codes, State abbreviations, etc...) With these types of beans, I have the choice of instantiating a singleton object reference to the bean and accessing the methods through the object, or making all the methods public static so I can access them via BeanName.method(). For the former, the bean does all of it's initialization and database access in it's constructor and my JSP's have something like the following at the top: %! private static BeanName bean = BeanName.getInstance(); % For the latter, the bean does all of it's initialization and database access in a static block: static { // bean initialization and DB access } and my JSPs reference the static methods: %= BeanName.method() % My question concerns the way beans with all public static methods are instantiated and garbage collected. Because these beans hold unchanging reference info, I only want the data loaded from the database once the first time the bean is referenced. For beans with all public static methods, since there are no object references to them, when are they garbage collected? Is it possible that the bean will be unloaded and the code in my static block will be re-run when the bean is next referenced? Or do these all static objects somehow stick around forever? For the singleton, I know the object will last as long as the JSP is loaded, because there is a definite object reference to the singleton. I'm a little unclear as to what happens with a bean that has all public static methods, though. Can anyone shed some light on this? Thanks, --jeff
Re: tomcat IIS error
youmore explicit us help - Original Message - From: Alex Almero To: [EMAIL PROTECTED] Sent: Friday, May 18, 2001 10:06 AM Subject: tomcat IIS error got this error under the isapi.log jk_uri_worker_map_t::uri_worker_map_free, NULL parameters also under the w3svc/ex"date" GET /jakarta/examples/jsp/snp/snoop.jsp 200
Tomcat: NT Service doesn't automatically load context classes and Jars
As I understand the Tomcat NT wrapper, all configuration for the NT Service version of Tomcat is obtained from the wrapper.properties files. Does this also mean that I must add to the wrapper.classpath any classes and jar files that are needed? When I run the Tomcat server in normal mode, it scans the WEB-INF/classes and WEB-INF/lib directories under a context and automatically makes available any jar and class files that it finds in those directories. The only way I can get the NT service version to work correctly with my context is to add each of my class and jar files into its wrapper.properties file. Is this normal? thanks, ron
Tomcat host name
Hi all, I need to set the host name for tomcat standalone SSL support, I read the server.xml carefully, can't find how to specify the host name except the Vhost(I think it's another story), please give me a hand. Regards, Kevin
where would I put a properties file?
Hello all.. I have an application that calls a javabean from a JSP. The bean gets data from a properties file and returns it to the JSP client. Trouble being that I don't know exactly where to place the properties file or make it so that the bean can find the properties file. I have tried placing it in the WEB-INF directory, but no luck there... Thanks for any help! Kendal L. Montgomery Qwest - eFlow Development Team 614-215-4937
Images don't show using default directory
I am running Jakarta Tomcat 3.2.1 on Windows 2000. I have created a directory that contains some JPGs. Some of them have spaces in the name, some of them do not. I point my browser at the directory: http://192.1.1.1/testdirectory/ and let Tomcat build the directory page. I see the list of files. However, if I click on one of the images with a space in the name, it does not show up. I see Tomcat successfully replace the space with a %20 in the URL, but the image does not show up. If I click on one of the images with no spaces in the name, it does successfully load. I know all of the images are valid graphics and can see them outside of the website. Is there any settings I am missing? Has anyone else seen this? Is this a 2000 thing? Thanks, Eric Lubin [EMAIL PROTECTED]
Tomcat: NT Service doesn't automatically load context classes and Jars
As I understand the Tomcat NT wrapper, all configuration for the NT Service version of Tomcat is obtained from the wrapper.properties files. Does this also mean that I must add to the wrapper.classpath any classes and jar files that are needed? When I run the Tomcat server in normal mode, it scans the WEB-INF/classes and WEB-INF/lib directories under a context and automatically makes available any jar and class files that it finds in those directories. The only way I can get the NT service version to work correctly with my context is to add each of my class and jar files into its wrapper.properties file. Is this normal? thanks, ron
Log bytes sent in each response
Hi, How to log number of bytes sent in each response? --Thanks, --Liong Hung
Re: where would I put a properties file?
You can put the properties file anywhere in your classpath. Eric Lubin T/L 443-6954 External: 561-443-6954 Notes ID: elubin@ibmusm20External: [EMAIL PROTECTED]
RE: Tomcat Performance on a Dual Processor Win2K Machine.
Are you sure your configuration is exactly the same? In the readme file, item 6.11 (I believe) mentions how a mis-configuraiton can cause infinite loops. If you changed your server.xml file, I would look at this. Randy -Original Message- From: karthik g [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 6:15 AM To: [EMAIL PROTECTED] Subject: Tomcat Performance on a Dual Processor Win2K Machine. Hi All, I have a java application running under this setup: Tomcat-3.2, IIS-5.0,SQL Server-7.0 with Windows 2000 Professional on a Dual Processor Machine. The problem am encountering is High CPU utilization and non-release of CPU by the application. Any pointers to the cause of this problem. Btw running the same application on a Single processor doesn't cause the problem. Rgds, Karthik __ ___ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Re: [ClassPath] JSP, JDBC, and mm.MySql
Place your jar file in the WEB-INF/lib folder. Matt Jon Shoberg wrote: Its getting late but I'm not having too much luck at getting a sucessful JSP / mysql connection. Given the error message below can someone explain where I should be setting my class path and the actual mm.mysql files or the entire jar file? I am using jdk1.3 with the latest apache on win2K pro. My JSP page looks like and the error is below: html head titleLogin/title /head %@ page import=java.sql.*, java.io.* % % // Step 1: registering the MySQL JDBC driver try { // The newInstance() call is a work around for some // broken Java implementations Class.forName(org.gjt.mm.mysql.Driver).newInstance(); } catch (Exception E) { out.println(brbrsome crapbrbrUnable to load driver.brbrbrbr); E.printStackTrace(new PrintWriter(out)); } % /html error: java.lang.ClassNotFoundException: Unable to load class org.gjt.mm.mysql.Driver at org.apache.jasper.servlet.JasperLoader.findClass(JasperLoader.java:223) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:147) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at _0002fsql_0002ejspsql_jsp_7._jspService(_0002fsql_0002ejspsql_jsp_7.java:70) 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:391) 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.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) begin:vcard n:Goss;Matt tel;fax:919-657-1501 tel;work:919-657-1432 x-mozilla-html:FALSE adr:;; version:2.1 email;internet:[EMAIL PROTECTED] fn:Matt end:vcard
RequestDispatcher.forward()
hi! my problem is, that i have a 'virtual' url that is a servlet, and a mapping from that virtual url to a 'real' url outside of the servletcontext. i want the user never to use or bookmark the 'real' url but allways the 'virtual'. the .forward()-method would be a cool solution to manage this, but unfortunately the 'real' urls are not in the context, and forward() doesn`t work with absolute urls. if i use sendRedirect() instead, the user sees the 'real' url, and thats bad for my application. is there a possibility to approach the desired behavior (allways 'virtual' urls)? i would be delighted to get some suggestions, tricks ... many thanks in advance! basti
support classes in jar
If I have support classes in a .jar file. I have put it in WEB-INF/classes. For some reason, it doesn't find them. Is this the right location, or does it set the .jar files in the classpath here? Kendal L. Montgomery Qwest - eFlow Development Team 614-215-4937
RE: support classes in jar
They go in WEB-INF/lib -Original Message- From: Montgomery, Kendal L [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 9:27 AM To: Tomcat-User (E-mail) Subject: support classes in jar If I have support classes in a .jar file. I have put it in WEB-INF/classes. For some reason, it doesn't find them. Is this the right location, or does it set the .jar files in the classpath here? Kendal L. Montgomery Qwest - eFlow Development Team 614-215-4937
port 8080 to port 80?
Hello, I am using the Tomcat learning Servlets and JSP. All is well. I would like to change the port from 8080 to 80. I have Martys Halls book and it says to edit the port number in the /install_dir/webserver.xml file and replace 8080 with 80. But I do not see the line as he shows on page 16 of his book. I believe this would be simple. Has anyone done this on tomcat 3.22b2? Thanks you Scott Purcell
RE: RequestDispatcher.forward()
are you shobhit sati from india? sorry if I am wrong Raj -Original Message- From: Sebastian Schulz [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 2:24 PM To: [EMAIL PROTECTED] Subject: RequestDispatcher.forward() hi! my problem is, that i have a 'virtual' url that is a servlet, and a mapping from that virtual url to a 'real' url outside of the servletcontext. i want the user never to use or bookmark the 'real' url but allways the 'virtual'. the .forward()-method would be a cool solution to manage this, but unfortunately the 'real' urls are not in the context, and forward() doesn`t work with absolute urls. if i use sendRedirect() instead, the user sees the 'real' url, and thats bad for my application. is there a possibility to approach the desired behavior (allways 'virtual' urls)? i would be delighted to get some suggestions, tricks ... many thanks in advance! basti
mod_jk.so: Undefined symbol map_put
Hello, I've built a mod_jk DSO module (libexec/mod_jk.so) and configured apache 1.3.12 to load it. Os is FreeBSD 4.2, jakarta-tomcat is 3.1 Since I didn't find any mod_jk sources inside tomcat 3.1, I extracted and apxs'd it from a tomcat 3.1.2 source subtree. apxs ran succesfully, but nevertheless I got a relocation error when starting the httpd process. # /usr/local/apache/bin/apachectl start Syntax error on line 207 of /usr/nuovo/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/mod_jk.so into server: /usr/local/apache/libexec/mod_jk.so: Undefined symbol map_put /usr/local/apache/bin/apachectl start: httpd could not be started Thanks for any hint! In httpd.conf, lines 270 and subsequent show the following: LoadModule jk_module libexec/mod_jk.so AddModule mod_jk.c JkWorkersFile /root/jakarta-tomcat-3.2.1-src/src/etc/workers.properties JkLogFile /usr/local/apache/logs/mod_jk.log JkLogLevel warn JkMount /*.jsp ajp12 JkMount /servlet/* ajp12 JkMount /examples/* ajp12
Re:Problems replacing SessionInterceptor
Hello, When I place all of my class files into a jar file and then move the jar file to the tomcat lib directory Tomcat can load my SessionInterceptor class. BUT, when i do this it appears that the jar files in my WEB-INF/lib directory are NOT loaded. Do I have to put everything (all classes and supporting jar files) into the Tomcat lib directory? thanks At 07:34 PM 5/17/2001, Twylite wrote: Hi, I've written my own version of the SessionInterceptor and placed this with my application class files (com.myapp.uril.SessionInterceptor). I updated the server.xml file to point to my version of the class instead of Tomcats by updating the following: RequestInterceptor className=com.myapp.util.SessionInterceptor noCookies=false / Unless I'm mistaken you're going to need your class files in tomcat's lib directory, or in your Java class path before you start tomcat. Anything in server.xml is server-wide, and must be available to Tomcat when you start the server. Anything in web.xml is context-wide, and must be available to the context when you first access it. Twylite
Servlet Placement
Hello, I am following Martys book and I am missing something slight. I created a HelloWorld servlet and placed it in the D:\tomcat\jakarta-tomcat-3.2.2b2\webapps\ROOT\WEB-INF\classes and also set my ENV on NT for the servlet.jar and jasper and I CAN YES compile and all is well. In my browser if I call http://localhost:8080/servlet/HelloWorld all is good. So now I created a directory under classes called coreservlets and moved that HelloWorld.java file into there, added the package coreservlets; at the top of the file, recompiled the file (that went well) but I can't get it to show up in the browser. I tried http://localhost:8080/servlet/HelloWorld that does not work. http://localhost:8080/servlet/coreservlet and that does not work.? Do I need to set some other ENV for that coreservlet directory? which is where I am going to put all my testing files? Thanks, Scott Purcell
Re: RequestDispatcher.forward()
??? are you shobhit sati from india? sorry if I am wrong no ;-) basti
RE: support classes in jar
Thank you! That did what I needed. Kendal L. Montgomery Qwest - eFlow Development Team 614-215-4937 -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 9:10 AM To: [EMAIL PROTECTED] Subject:RE: support classes in jar They go in WEB-INF/lib -Original Message- From: Montgomery, Kendal L [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 9:27 AM To: Tomcat-User (E-mail) Subject: support classes in jar If I have support classes in a .jar file. I have put it in WEB-INF/classes. For some reason, it doesn't find them. Is this the right location, or does it set the .jar files in the classpath here? Kendal L. Montgomery Qwest - eFlow Development Team 614-215-4937
Re: port 8080 to port 80?
Yes, it's SERVER.XML not WEBSERVER.XML and it's in the /conf/ directory. Eric Lubin T/L 443-6954 External: 561-443-6954 Notes ID: elubin@ibmusm20External: [EMAIL PROTECTED] Purcell, Scott [EMAIL PROTECTED] on 05/18/2001 09:46:34 AM Please respond to [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject: port 8080 to port 80? Hello, I am using the Tomcat learning Servlets and JSP. All is well. I would like to change the port from 8080 to 80. I have Martys Halls book and it says to edit the port number in the /install_dir/webserver.xml file and replace 8080 with 80. But I do not see the line as he shows on page 16 of his book. I believe this would be simple. Has anyone done this on tomcat 3.22b2? Thanks you Scott Purcell
Re: port 8080 to port 80?
On Fri, May 18, 2001 at 08:46:34AM -0500, Purcell, Scott wrote: Hello, I am using the Tomcat learning Servlets and JSP. All is well. I would like to change the port from 8080 to 80. I have Martys Halls book and it says to edit the port number in the /install_dir/webserver.xml file and replace 8080 with 80. But I do not see I did that here (maybe I'm not using the same version than you) but it's the line in /usr/local/build/tomcat/conf/server.xml: Parameter name=handler value=org.apache.tomcat.service.http.Http ConnectionHandler/ Parameter name=port value=8080/ which you have to change to 80 or vice versa. -- Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
RE: Servlet Placement
wrapper.properties need to add to the classpath something liker wrapper.class_path=$(wrapper.tomcat_home)\lib\coreservlets Ross -Original Message- From: Purcell, Scott [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 8:07 AM To: '[EMAIL PROTECTED]' Subject: Servlet Placement Hello, I am following Martys book and I am missing something slight. I created a HelloWorld servlet and placed it in the D:\tomcat\jakarta-tomcat-3.2.2b2\webapps\ROOT\WEB-INF\classes and also set my ENV on NT for the servlet.jar and jasper and I CAN YES compile and all is well. In my browser if I call http://localhost:8080/servlet/HelloWorld all is good. So now I created a directory under classes called coreservlets and moved that HelloWorld.java file into there, added the package coreservlets; at the top of the file, recompiled the file (that went well) but I can't get it to show up in the browser. I tried http://localhost:8080/servlet/HelloWorld that does not work. http://localhost:8080/servlet/coreservlet and that does not work.? Do I need to set some other ENV for that coreservlet directory? which is where I am going to put all my testing files? Thanks, Scott Purcell
RE: port 8080 to port 80?
If you don't find it search the string 8080 in all files of Tomcat. And replace it by 80 Bruno -Message d'origine- De : Purcell, Scott [mailto:[EMAIL PROTECTED]] Envoyé : vendredi 18 mai 2001 15:47 À : '[EMAIL PROTECTED]' Objet : port 8080 to port 80? Hello, I am using the Tomcat learning Servlets and JSP. All is well. I would like to change the port from 8080 to 80. I have Martys Halls book and it says to edit the port number in the /install_dir/webserver.xml file and replace 8080 with 80. But I do not see the line as he shows on page 16 of his book. I believe this would be simple. Has anyone done this on tomcat 3.22b2? Thanks you Scott Purcell
Log file
How can I create a log file having information about request method, URI, and status in tomcat, such as the following:- 06:52:22 192.168.7.193 GET /spacenut20/main.asp 200 06:52:22 192.168.7.193 GET /spacenut20/black.htm 304 06:52:22 192.168.7.193 GET /spacenut20/top.asp 200 06:52:22 192.168.7.193 GET /spacenut20/contentmain.asp 200 06:52:22 192.168.7.193 GET /pic/top_bg1.jpg 404 --Wong
Re: Servlet Placement
modify your web.xml file so the classname is coreservlets.HelloWorld Eric Lubin T/L 443-6954 External: 561-443-6954 Notes ID: elubin@ibmusm20External: [EMAIL PROTECTED] Purcell, Scott [EMAIL PROTECTED] on 05/18/2001 10:06:57 AM Please respond to [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject: Servlet Placement Hello, I am following Martys book and I am missing something slight. I created a HelloWorld servlet and placed it in the D:\tomcat\jakarta-tomcat-3.2.2b2\webapps\ROOT\WEB-INF\classes and also set my ENV on NT for the servlet.jar and jasper and I CAN YES compile and all is well. In my browser if I call http://localhost:8080/servlet/HelloWorld all is good. So now I created a directory under classes called coreservlets and moved that HelloWorld.java file into there, added the package coreservlets; at the top of the file, recompiled the file (that went well) but I can't get it to show up in the browser. I tried http://localhost:8080/servlet/HelloWorld that does not work. http://localhost:8080/servlet/coreservlet and that does not work.? Do I need to set some other ENV for that coreservlet directory? which is where I am going to put all my testing files? Thanks, Scott Purcell
mapping servlets
I just upgraded from jserv to Tomcat. I used to have my servlets under /bin instead of /servlet with: ApJServMount /bin /root I still want to use these servlets under Tomcat. But I am struggling a bit to configure it. One method I tried was creating a context called bin under webapps. Then in the web.xml file I put in: web-app servlet-mapping servlet-name invoker /servlet-name url-pattern * /url-pattern /servlet-mapping /web-app but this didn't work. I tried also putting in : ApJServMount /bin /root in the .conf file and then modifying the default web.xml file to use invoker for /bin/* I know this is trivial! Anyhelp would be appreciated. Tim Arnold
Jikes for JSP's
Avid Tomcat-ers, Is Jikes 1.14 compatible with j2re1.3.0_02? Also, aside from rebuilding jakarta-tomcat-3.2.1, is there a simpler way to deploy JSP's without requiring a JDK? One posting to the archives referred to a tc3.JasperOptions interceptor, but I cannot locate such a class. How does one pre-compile JSP's for deployment? Can they be packaged in a .war file? Thanks
Contexts, Classes, Variables
1) In Tomcat 3.2.1 do separate contexts see static variables of a class the same? Or do they have separate ones? 2) different versions of the same class in two contexts on the same tomcat? (placed in the /WEB-INF/classes directory of that context) Zach Hollandsworth
Re: Problem of setting up apache with tomcat using mod_jk in Linux
if u still have problems with installing tomcat, the mistake i saw in ur config was ur including the mod_jk.conf-auto file and then ur again including the directives in there, either one of them should be done and the other thing is that check whether the path is set properly for every directive have fun _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
To use URLRewriting with Tomcat 3.2.1
Hi all, I am using Tomcat 3.2.1 with Apache 1.3 and I have the following problem:Perhaps that has been asked before, but I am not sure I want to rewrite a path from a form like 'http://host:port/file.html' to something like 'http://host:port/ContextServlet/MyServletName?parameter=file.html'). (Note that the program works when i use the second URL form in the browser). So that, as it seems that Tomcat doesn't want to use .htaccess file, I decided to write the following instructions: LoadModule rewrite_module module/mod_rewrite.dll IfModule mod_rewrite.c RewriteEngine On RewriteBase /ContextServlet/ RewriteRule ^file.html /ContextServlet/MyServletName?parameter=file.html. /IfModule in tomcat.conf or server.xml but with no result. Any help will be greatly appreciate. Enjoy the rest of the day.
RequestDispatcher.forward()
hi, has somebody a work-around to produce the same behavior as if RequestDispatcher.forward() would work with absolute URL's? tanks in advance! basti
Threads
I'm doing performance testing of an application for Tomcat 3.2.1. Basically a client application accesses a service running in Tomcat/Jboss using SOAP. I have a test client that generates X number of threads to access the URL/Tomcat port(8080). The problem is that when X is greater than 15, I get connection refused. After more testing, I found that there seems to be a maximum of 15 connections per second limit. I don't think this is true, but the behavior seems to support this theory. I used the same test client to access the apache port and it supports hundreds of simultaneous connections. Is there some configuration I need to change? Is this a know limit? Any help would be appreciated. Han
RE: where would I put a properties file?
I think that WEB-INF is the right place. I put my .properties files in WEB-INF/config/ and refer to that path thusly: ../webapps/of/WEB-INF/config where of is the name of my context. What problems are you having? - Robert Petersen http://www.orangefood.com -Original Message- From: Montgomery, Kendal L [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 5:47 AM To: Tomcat-User (E-mail) Subject: where would I put a properties file? Hello all.. I have an application that calls a javabean from a JSP. The bean gets data from a properties file and returns it to the JSP client. Trouble being that I don't know exactly where to place the properties file or make it so that the bean can find the properties file. I have tried placing it in the WEB-INF directory, but no luck there... Thanks for any help! Kendal L. Montgomery Qwest - eFlow Development Team 614-215-4937
RE: Log bytes sent in each response
If you are using Servlets 2.3 API then try a filter. - Robert Petersen http://www.orangefood.com -Original Message- From: Wong Liong Hung [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 6:06 AM To: [EMAIL PROTECTED] Subject: Log bytes sent in each response Hi, How to log number of bytes sent in each response? --Thanks, --Liong Hung
javax.xml.parsers.* not found
Hello, I am trying to write a testing xml program. I downloaded jaxp.jar, crimson.jar and xalan.jar files from sun and put them in c:\jdk1.3\jre\lib. and in classpath. In my testing program, I import javax.xml.parsers.*. When I compiled the program, I got error message Package javax.xml.parsers not found in import. Any idea for what am i wrong? Thanks, Jack Li
RE: java.lang.LinkageError: Class javax/servlet/http/HttpSession viol ates loader constraints
I have downloaded from http://jakarta.apache.org/builds/jakarta-servletapi-4/nightly/ jakarta-servletapi-4-20010517.zip and added classes in the appropriate folder. Thanks a lot Bip... But now i have an other error that i have never seen before : Remenber that i am under W2000 TC4B4, JDK last release. java.lang.LinkageError: Class javax/servlet/http/HttpSession violates loader constraints at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at egc.net.EGCHttpUtils.newSessionThenRedirect(EGCHttpUtils.java:25) at org.apache.jsp.valider_0005fenter_jsp._jspService(valider_0005fenter_jsp.jav a:76) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:200) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:254) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:194) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:255) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:225) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:472) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 875) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952) at java.lang.Thread.run(Thread.java:484) -Message d'origine- De : Bip Thelin [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 17 mai 2001 18:56 À : '[EMAIL PROTECTED]' Objet : RE: Tomcat 4/Apache combination On Thu, 17 May 2001, Bruno Crapart wrote: The same for me ! I am confident with Jakarta But i encounter one problem below : A Servlet Exception Has Occurred org.apache.jasper.JasperException: Unable to compile class for JSPC:\tomcat\bin\..\work\localhost\egc\carriersite\code_jsp.java:62: Incompatible type for method. Explicit cast needed to convert java.lang.Throwable to java.lang.Exception. if (pageContext != null)
RE: RequestDispatcher.forward()
Title: RE: RequestDispatcher.forward() ServletContext.getRequestDispatcher(java.lang.String path) takes absolute path beginign with / though the path must be relative to the current context. You will have to use getContext(java.lang.String uripath) to get a foreign Context and then use this to get the Request Dispatcher for other context 's Thanks and Regards, === Gary Grewal -Original Message- From: Sebastian Schulz [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 9:59 AM To: [EMAIL PROTECTED] Subject: RequestDispatcher.forward() hi, has somebody a work-around to produce the same behavior as if RequestDispatcher.forward() would work with absolute URL's? tanks in advance! basti
Re: RequestDispatcher.forward()
package com.ibm.servconn; import java.net.*; import java.io.*; import java.util.*; import com.ibm.aurora.*; public class URLForward { private String theURL; private String method; public URLForward( String theURL ) { this(theURL,POST); } public URLForward( String theURL, String method ) { this.theURL = theURL; this.method = method; } public String[] execute() throws BehaviorException { Vector v = new Vector(); try { URL theServlet = new URL(theURL); // establish a connection with the server, but do not connect to the servlet yet HttpURLConnection theConnection = (HttpURLConnection)theServlet.openConnection(); theConnection.setRequestMethod(method); // now we can connect to the page theConnection.connect(); // read the results from the servlet as a String BufferedReader in = new BufferedReader(new InputStreamReader(theConnection.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) { v.addElement(inputLine); } in.close(); String da[] = new String[v.size()]; v.copyInto(da); return da; } // have to handle these somehow catch( MalformedURLException mue ) { throw new BehaviorException(Malformed URL address,ServConnBhvrErrors.MALFORMED_URL,mue); } catch( IOException ioe ) { throw new BehaviorException(IOException - the translator might be down,ServConnBhvrErrors.CANT_CONNECT_TO_SERVER,ioe); } } } Eric Lubin T/L 443-6954 External: 561-443-6954 Notes ID: elubin@ibmusm20External: [EMAIL PROTECTED] Sebastian Schulz [EMAIL PROTECTED] on 05/18/2001 10:58:33 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RequestDispatcher.forward() hi, has somebody a work-around to produce the same behavior as if RequestDispatcher.forward() would work with absolute URL's? tanks in advance! basti
Re: port 8080 to port 80?
You'll find what you're looking for in the server.xml file in the conf directory.
Re: javax.xml.parsers.* not found
Hi, Perhaps it's a typo but the directory should be: c:\jdk1.3\jre\lib\ext (you forgot the last subdirectory) Brendan : Hello, : : I am trying to write a testing xml program. I downloaded jaxp.jar, : crimson.jar and xalan.jar files from sun and put them in c:\jdk1.3\jre\lib. : and in classpath. In my testing program, I import javax.xml.parsers.*. When : I compiled the program, I got error message Package javax.xml.parsers not : found in import. Any idea for what am i wrong? : : Thanks, : Jack Li : : -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
RE: javax.xml.parsers.* not found
Title: RE: javax.xml.parsers.* not found Hello, You can put the .jar files anywhere you want in your hard disk as long as you have your classpath pointing to the appropiate directory and/or files. I have found that even pointing to the directory containing my .jar files sometimes do not work and instead I have to explicitly add the .jar file to the classpath( eg.. c:\classpath;. doesn't work but c:\classpath\archive.jar will work). I would try appending the xalan.jar, crimson.jar, etc.. to your classpath. One other important thing is to make sure you add these paths to the front of your classpath and not the end, you could very well have another (possibly outdated)copy of xalan.jar for instance in another directory that is searched first in your classpath and don't forget to add . current directory if your working directory contains the .jar files you want to use. Don -Original Message- From: Brendan McKenna [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 9:23 AM To: [EMAIL PROTECTED] Subject: Re: javax.xml.parsers.* not found Hi, Perhaps it's a typo but the directory should be: c:\jdk1.3\jre\lib\ext (you forgot the last subdirectory) Brendan : Hello, : : I am trying to write a testing xml program. I downloaded jaxp.jar, : crimson.jar and xalan.jar files from sun and put them in c:\jdk1.3\jre\lib. : and in classpath. In my testing program, I import javax.xml.parsers.*. When : I compiled the program, I got error message Package javax.xml.parsers not : found in import. Any idea for what am i wrong? : : Thanks, : Jack Li : : -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd.Fax: +353-61-338065
Startup problems with java
I installed in my machine Linux mandrake, Tomcat through the ApacheToolbox-1.5.20, which installs the JDK version Blackdown-1.3.0. I installed Jboss 2.2.1, which did not function with the version of JDK of Blackdown, for which I installed the JDK of SUN to make my tests, but now not I can initiate to TomCat. This following error sends me: [jakarta]$ ./start.sh Using classpath: /opt/jakarta/dist/tomcat/lib/ant.jar:/opt/jakarta/dist/tomcat/l lib/test:/opt/jakarta/dist/tomcat/lib/webserver.jar:/usr/java/jdk1.3.0_02/bi n/../lib/tools.jar [jakarta]$ Exception in thread main java.lang.NoClassDefFoundEr : org/xml/sax/HandlerBase at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java1) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:178) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) CLASSPATH has the same value with the two versions of the JDK, with the difference that each version uses its own lib. Some idea
RE: Startup problems with java
Using classpath: /opt/jakarta/dist/tomcat/lib/ant.jar:/opt/jakarta/dist/tomcat/l lib/test:/opt/jakarta/dist/tomcat/lib/webserver.jar:/usr/java/jdk1 .3.0_02/bi n/../lib/tools.jar somehow your tomcat startup script does not pick up opt/jakarta/dist/tomcat/lib/jaxp.jar and opt/jakarta/dist/tomcat/lib/parser.jar these need to be in the classpath too check your startup script Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net -Original Message- From: Alejandro Martínez [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 9:37 AM To: [EMAIL PROTECTED] Subject: Startup problems with java I installed in my machine Linux mandrake, Tomcat through the ApacheToolbox-1.5.20, which installs the JDK version Blackdown-1.3.0. I installed Jboss 2.2.1, which did not function with the version of JDK of Blackdown, for which I installed the JDK of SUN to make my tests, but now not I can initiate to TomCat. This following error sends me: [jakarta]$ ./start.sh [jakarta]$ Exception in thread main java.lang.NoClassDefFoundEr : org/xml/sax/HandlerBase at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java1) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:178) at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) CLASSPATH has the same value with the two versions of the JDK, with the difference that each version uses its own lib. Some idea
Re: RequestDispatcher.forward()
Check out the HttpMessage and HttpsMessage classes in the com.oreilly.servlet package available from Jason Hunter at www.servlets.com. Does the same basic connection stuff and returns an InputStream which you can wrap in a BufferedReader like Eric does below. The nice thing is that it does secure ssl (https) connections also with the JSSE jar files -- and it's very easy to setup and use. Thanks, --jeff - Original Message - From: Eric Lubin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 18, 2001 8:58 AM Subject: Re: RequestDispatcher.forward() package com.ibm.servconn; import java.net.*; import java.io.*; import java.util.*; import com.ibm.aurora.*; public class URLForward { private String theURL; private String method; public URLForward( String theURL ) { this(theURL,POST); } public URLForward( String theURL, String method ) { this.theURL = theURL; this.method = method; } public String[] execute() throws BehaviorException { Vector v = new Vector(); try { URL theServlet = new URL(theURL); // establish a connection with the server, but do not connect to the servlet yet HttpURLConnection theConnection = (HttpURLConnection)theServlet.openConnection(); theConnection.setRequestMethod(method); // now we can connect to the page theConnection.connect(); // read the results from the servlet as a String BufferedReader in = new BufferedReader(new InputStreamReader(theConnection.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) { v.addElement(inputLine); } in.close(); String da[] = new String[v.size()]; v.copyInto(da); return da; } // have to handle these somehow catch( MalformedURLException mue ) { throw new BehaviorException(Malformed URL address,ServConnBhvrErrors.MALFORMED_URL,mue); } catch( IOException ioe ) { throw new BehaviorException(IOException - the translator might be down,ServConnBhvrErrors.CANT_CONNECT_TO_SERVER,ioe); } } } Eric Lubin T/L 443-6954 External: 561-443-6954 Notes ID: elubin@ibmusm20External: [EMAIL PROTECTED] Sebastian Schulz [EMAIL PROTECTED] on 05/18/2001 10:58:33 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RequestDispatcher.forward() hi, has somebody a work-around to produce the same behavior as if RequestDispatcher.forward() would work with absolute URL's? tanks in advance! basti
Re: Bean Choices (code question)
Hi Charlie, Thanks for confirming this! I was under the impression that static methods were loaded once and never unloaded, but I wasn't sure. On the same subject, are class constructors called when static methods are accessed? Right now, in my all static method classes, I'm doing my initialization in static blocks. I'm wondering if I can move that initialization into the class constructor, but I'm not sure if/when the constructor is called when a static method is called. Any insight on this point, also, is greatly appreciated. Thanks, --jeff - Original Message - From: Cox, Charlie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 18, 2001 4:28 AM Subject: RE: Bean Choices (code question) there is no gc on static objects. static objects(methods,fields, or classes) are created once on startup and there is only one instance of the method or field ever created that all requestors to your class will use. But with Tomcat I do believe that if you have the same class in 2 different contexts, that it will load two separate instances of your bean due to the different class loaders. This also means that if you are writing to the static fields on the first(or any) call, make sure to synchronize the write, in case 2 calls occur at the same time. Charlie -Original Message- From: Jeff Kilbride [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 17, 2001 8:56 PM To: [EMAIL PROTECTED] Subject: Re: Bean Choices (code question) Yeah, I know, but it's tempting to write all the methods as public static. Then I don't have to create the object at all, but I don't know the affects on garbage collection. --jeff - Original Message - From: Ross Dyson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 17, 2001 5:24 PM Subject: RE: Bean Choices (code question) If you make the bean class have a private constructor and a static reference to an instance of its own class, then there will always be a strong reference from the class itself to the instance of the class. (The first call to bean.getInstance() instantiates the private static member variable which is your singleton instance of your bean, the contructor does the db work etc.) Therefore, it won't get gc'd. That's the way I do my classes that do that kind of stuff, anyway. -Original Message- From: Jeff Kilbride [mailto:[EMAIL PROTECTED]] Sent: Friday, 18 May 2001 9:35 AM To: [EMAIL PROTECTED] Subject: Bean Choices (code question) I'm sorry if this is a little off-topic, since it is more about java code, but I thought Tomcat users would be interested/knowledgeable about the way beans work. I have a lot of informational beans that hold static reference data (think ISO codes, State abbreviations, etc...) With these types of beans, I have the choice of instantiating a singleton object reference to the bean and accessing the methods through the object, or making all the methods public static so I can access them via BeanName.method(). For the former, the bean does all of it's initialization and database access in it's constructor and my JSP's have something like the following at the top: %! private static BeanName bean = BeanName.getInstance(); % For the latter, the bean does all of it's initialization and database access in a static block: static { // bean initialization and DB access } and my JSPs reference the static methods: %= BeanName.method() % My question concerns the way beans with all public static methods are instantiated and garbage collected. Because these beans hold unchanging reference info, I only want the data loaded from the database once the first time the bean is referenced. For beans with all public static methods, since there are no object references to them, when are they garbage collected? Is it possible that the bean will be unloaded and the code in my static block will be re-run when the bean is next referenced? Or do these all static objects somehow stick around forever? For the singleton, I know the object will last as long as the JSP is loaded, because there is a definite object reference to the singleton. I'm a little unclear as to what happens with a bean that has all public static methods, though. Can anyone shed some light on this? Thanks, --jeff
Max Connections
Hi, can anyone please tell me how to change the number of connections a tomcat server can take .. ie How do I set the max connections thanks Venkatesh _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Problems upgrading Tomcat with JAXP 1.1
Dear People, I had to upgrade the JAXP on Tomcat from the bundled version, 1.0, to 1.1. Everything works fine except that now I cannot use international characters like ã or ú on the web.xml files. When I use those characters I get an exception: -- start of exception output -- ERROR reading D:\java\gssi\cadastro\server\WEB-INF\web.xml At org.apache.crimson.parser/P-076 Malformed UTF-8 char -- is an XML encoding declaration missing? ERROR reading d:\java\gssi\cadastro\server\WEB-INF\web.xml org.xml.sax.SAXParseException: org.apache.crimson.parser/P-076 Malformed UTF-8 char -- is an XML encoding declaration missing? at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1038) at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1010) at org.apache.crimson.parser.InputEntity.peek(InputEntity.java:841) at org.apache.crimson.parser.Parser2.peek(Parser2.java:2927) at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:999) [ etc. ] -- end of exception output -- Does anyone have an idea as to how to solve this problem? Christian
Tomcat-Apache configuration
Hello, I've installed Tomcat3.2.1 over RedHat 7.0 and followed the steps recommended in the Jakarta web page but Tomcat doesn't work. I think I've made something wrong with the mod_jserv.so file because all the error messages deal with it. First of all I made it using apxs as it's said in the user guide but when I restart Apache after having restarted Tomcat I get an error message that says something like mod_jserv.so doesn't seem to be a DSO module. Then I tried to recompile Apache, I did the following: #./configure --prefix=/usr/local/apache --enable- module=rewrite --enable-shared=rewrite --enable- module=proxy --enable-shared=proxy --enable-module=so then added: #./configure --add- module=/usr/local/apache/libexec/mod_jserv.c #make install then I copied the built mod_jserv.so file from /usr/lib/apache/ to /usr/local/apache/libexec/ and when I tried to start Apache I got: Syntax error on line 1 of /usr/local/tomcat/conf/tomcat- apache.conf: Cannot load /usr/local/apache/libexec/mod_jserv.so into server:undefined symbol: jserv_error_exit ./apachectl start:httpd could not be started Finally I tried copying a prebuilt mod_jserv.so file I downloaded from the web in .../apache/libexec/ but I received this message again: API module structure 'jserv_module' in file /usr/local/apache/libexec/mod_jserv.so is garbled - perhaps this is not an Apache module DSO? I think I'm not the firstone with this problem, if someone could tell me what to do (copy files, edit another ones, re-configure packages, etc) I would thank him/her very much. Thanks in advance... Best regards. Renato
Re: Bean Choices (code question)
Jeff Kilbride wrote: Hi Charlie, [...] On the same subject, are class constructors called when static methods are accessed? Right now, in my all static method classes, I'm doing my initialization in static blocks. I'm wondering if I can move that initialization into the class constructor, but I'm not sure if/when the constructor is called when a static method is called. Any insight on this point, also, is greatly appreciated. Thanks, --jeff [...] Hi :-) I did a test, I find: - when I invoke a static method with className.methodName(...), constructor and non-static init-block will not be invoked - it doesn't metter that if this class is a all static method style class or Not,i.e., this class can have all of the following: % static init-block/non-static init-block % static field/non-static(instance) filed % static method/non-static method - only when this class is being loaded into the classloader, static init-block will be invoked(i.e., normally, static init-block only will be invoked One time), now we only have a Class object of my-class, we don't have the instance object of my-class. - I am not sure if the above is righ when Java Reflection is used to find/load this class(like a Servlet container does) Bo May.18, 2001
RE: Bean Choices (code question)
Title: RE: Bean Choices (code question) -Original Message- From: Bo Xu [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 1:47 PM To: [EMAIL PROTECTED] Subject: Re: Bean Choices (code question) Jeff Kilbride wrote: Hi Charlie, [...] On the same subject, are class constructors called when static methods are accessed? Right now, in my all static method classes, I'm doing my initialization in static blocks. I'm wondering if I can move that initialization into the class constructor, but I'm not sure if/when the constructor is called when a static method is called. Any insight on this point, also, is greatly appreciated. Thanks, --jeff [...] Hi :-) I did a test, I find: - when I invoke a static method with className.methodName(...), constructor and non-static init-block will not be invoked That's what I thought. The constructor is not invoked because there is no instance of the class. Basically, if it's not static, it won't/can't run until an instance is created. Therefore static methods can only call other static methods in the same class. - it doesn't metter that if this class is a all static method style class or Not, i.e., this class can have all of the following: % static init-block/non-static init-block % static field/non-static(instance) filed % static method/non-static method - only when this class is being loaded into the classloader, static init-block will be invoked(i.e., normally, static init-block only will be invoked One time), now we only have a Class object of my-class, we don't have the instance object of my-class. - I am not sure if the above is righ when Java Reflection is used to find/load this class(like a Servlet container does) I think this is where the classloader(s) issue comes into account and that separate instances in different contexts would be considered different classes. There was a very good explaination of tomcat's classloading discussed in a previous thread : http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg13260.html Bo May.18, 2001 Charlie
ServletConfig question on Tomcat
Hello And Happy Friday to all. I am working out of Marty's Core Servlets book and I am having trouble getting an init statement to work. For those that have the book it is on page 40. If you don't have the book, I will try and explain it here. The code below is suposed to look at the web.xml file for some init parameters. According to the book the web.xml file is to be placed in the /installdir/webpages/WEB-INF and the file just lists param names and values. And according to the book, when a servlet gets called and it has the following method public void init(ServletConfig config) super.init(config); message = config.getInitParameter(message); that this init gets called just once, and all subsequent hits of this are threaded. So its a one time initialization. I have the web.xml file filled out properly and I have my class file in the /installdir/webapps/root/web-inf/classes/coreservlets and I marked my code with package coreservlets. All works, it just does not go out and get the web.xml file for my info. Below is all the code, you can try and run it, if you like. It looks kind of cool, and I would like to get it to run. If anyone understands, or knows of a missing config in my setup, please let me know. Thanks Scott Purcell code # package coreservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class ShowMessage extends HttpServlet { private String message; private String defaultMessage = No New Messages; private int repeats = 1; public void init(ServletConfig config) throws ServletException { super.init(config); message = config.getInitParameter(message); if (message == null) { message = defaultMessage; } try { String repeatString = config.getInitParameter(repeats); repeats = Integer.parseInt(repeatString); } catch(NumberFormatException nfe) { } } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(text/html); PrintWriter out = response.getWriter(); String title = The ShowMessage Servlet; out.println(ServletUtil.headWithTitle(title) + BODY BGCOLOR=\#fdf5e6\\n + H1 ALIGN=CENTER + title + /h1); for (int i=0; irepeats; i++) { out.println(message + br); } out.println(/BODY/HTML); } } xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2.2.dtd; web-app servlet servlet-name ShowMessage /servlet-name servlet-class coreservlets.ShowMessage /servlet-class init-param param-name message /param-name param-value Shibboleth /param-value /init-param init-param param-name repeats /param-name param-value 10 /param-value /init-param /servlet /web-app
windows, tomcat.log
When I start tomcat on Win2k, it says, Check logs/tomcat.log for error messages. There is no tomcat.log file anywhere on the server, and the only files in logs/ are: jasper.log, mod_jk.log, and servlet.log. Where are tomcat error messages being logged? Thanks for any help you can provide. Aaron -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Dr. Aaron Titus Department of Physics 316 Marteena Hall North Carolina AT State University Greensboro, NC 27411 Email: [EMAIL PROTECTED] Phone: (336) 334-7646 Fax: (336) 256-0815 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Connections
Hi, I have noticed that the max connection can be changed in the tomcat.properties file # Set the maximum number of socket connections Apache JServ may handle # simultaneously. Make sure your operating environment has enough file # descriptors to allow this number. # Syntax: security.maxConnections=(int)1 # Default: 50 security.maxConnections=50 does anyone know abt this .. please let me know .. thanks Venkatesh _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
RE: windows, tomcat.log
Aaron, I am using Tomcat4b5 on WinNT4. You do not specify what Tomcat version you are using. The log file you seek may be called something like: localhost_log.2001-05-18.txt catalina_log.2001-05-18.txt localhost_examples_log.2001-05-18.txt This is what I see in $TOMCAT_HOME\logs -Christian Christian Rudolph Software Engineer NewsEdge Corporation 80 Blanchard Road Burlington, MA 01803 [EMAIL PROTECTED] -Original Message- From: Aaron Titus [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 2:32 PM To: [EMAIL PROTECTED] Subject: windows, tomcat.log When I start tomcat on Win2k, it says, Check logs/tomcat.log for error messages. There is no tomcat.log file anywhere on the server, and the only files in logs/ are: jasper.log, mod_jk.log, and servlet.log. Where are tomcat error messages being logged? Thanks for any help you can provide. Aaron -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Dr. Aaron Titus Department of Physics 316 Marteena Hall North Carolina AT State University Greensboro, NC 27411 Email: [EMAIL PROTECTED] Phone: (336) 334-7646 Fax: (336) 256-0815 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Hi !! Help Needed
can anyone please tell me what is Ajp12ConnectionHandler I am new to tomcat .. can anyone please tell me what is the port 8007 used for Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/ Parameter name=port value=8007/ /Connector thanks Venkatesh _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
RE: Hi !! Help Needed
Apache connects to tomcat on that port -Original Message- From: Venkatesh Sangam [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 1:42 PM To: [EMAIL PROTECTED] Subject: Hi !! Help Needed can anyone please tell me what is Ajp12ConnectionHandler I am new to tomcat .. can anyone please tell me what is the port 8007 used for Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/ Parameter name=port value=8007/ /Connector thanks Venkatesh _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Re: ServletConfig question on Tomcat
Try to put your servlet directly under Web-inf/classes instead of put it in your pkg coreservlets. See if it works. As my exp, I usually create the package under webapps, then Web-inf/classes is directly under that directory. All servlets are placed under classes. then go to URL: localhost:8080/pkg_name/servlet/servlet-name I think I had a similar problem when not putting a servlet in the class directory but in another dir which is under class dir. Hope this helps. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: Hi !! Help Needed
Hi, does anyone know how to set max connections for the Tomcat server ?? From: Brandon Cruz [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Hi !! Help Needed Date: Fri, 18 May 2001 13:48:32 -0500 Apache connects to tomcat on that port -Original Message- From: Venkatesh Sangam [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 1:42 PM To: [EMAIL PROTECTED] Subject: Hi !! Help Needed can anyone please tell me what is Ajp12ConnectionHandler I am new to tomcat .. can anyone please tell me what is the port 8007 used for Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/ Parameter name=port value=8007/ /Connector thanks Venkatesh _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
RE: ServletConfig question on Tomcat
Thanks, Ill give that a shot, and let you know. Scott -Original Message- From: HD [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 1:52 PM To: [EMAIL PROTECTED] Subject: Re: ServletConfig question on Tomcat Try to put your servlet directly under Web-inf/classes instead of put it in your pkg coreservlets. See if it works. As my exp, I usually create the package under webapps, then Web-inf/classes is directly under that directory. All servlets are placed under classes. then go to URL: localhost:8080/pkg_name/servlet/servlet-name I think I had a similar problem when not putting a servlet in the class directory but in another dir which is under class dir. Hope this helps. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
jsp:include page=%=servletPath% flush=true|false/ errors
Hey, guys, I am new to tomcat... using Tomcat v4.0-b3/b5. I am trying to include other jsps output in one main jsp and getting an IllegalStateException: with error message: Cannot forward after response has been committed. This is what I am doing: % for(int i = 0; i typeNames.length; i++) { url = my url is constructed here; % jsp:include page=%=url% flush=true // if I set the flush to false I see the first iterated page of the servlet that I am including, if I am setting it to true then I get exception right on the first iteration of the loop. % } % I am writing JSPs then I am compiling them into servlets by using jspc.sh script that uses JspC.java in jasper's package. So when I go into the browser I am accessing not JSPs but converted jsps to Servlets which were generated by this script. (jspc.sh). I have tried many different things already, setting isThreadSafe to FALSE, setting buffer to a very big size, setting autoFlush to TRUE and FALSE, nothing seems to work. Has anyone ever encountered such problems? Thanks for your help, Oskar
RE: Tomcat install
Hello, im new to tomcat. I am installing Tomcat 3.1 on a windows 98 machine. I created a directory called tomcat with the bin, conf and the rest of the directories. Can anyone tell me how would I set my environment variables, and how I would set my class path.I also need know how to edit server.xml, web.xml, startup.bat and shutdown.bat properly for my win98 environment. Jim Diggs
RE: javax.xml.parsers.* not found
Title: RE: javax.xml.parsers.* not found Thanks Don Nguyen and Brendan Mckenna. My problem is not the classpath. It is the compiler. When I use javac -XMLTest.java, it didn't work. But c:\jdk1.3\bin\javac XMLTest.java works. Thanks, Hack -Original Message-From: Don Nguyen [mailto:[EMAIL PROTECTED]]Sent: Friday, May 18, 2001 12:32 PMTo: '[EMAIL PROTECTED]'Subject: RE: javax.xml.parsers.* not found Hello, You can put the .jar files anywhere you want in your hard disk as long as you have your classpath pointing to the appropiate directory and/or files. I have found that even pointing to the directory containing my .jar files sometimes do not work and instead I have to explicitly add the .jar file to the classpath( eg.. c:\classpath;. doesn't work but c:\classpath\archive.jar will work). I would try appending the xalan.jar, crimson.jar, etc.. to your classpath. One other important thing is to make sure you add these paths to the front of your classpath and not the end, you could very well have another (possibly outdated)copy of xalan.jar for instance in another directory that is searched first in your classpath and don't forget to add "." current directory if your working directory contains the .jar files you want to use. Don -Original Message- From: Brendan McKenna [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 9:23 AM To: [EMAIL PROTECTED] Subject: Re: javax.xml.parsers.* not found Hi, Perhaps it's a typo but the directory should be: c:\jdk1.3\jre\lib\ext (you forgot the last subdirectory) Brendan : Hello, : : I am trying to write a testing xml program. I downloaded jaxp.jar, : crimson.jar and xalan.jar files from sun and put them in c:\jdk1.3\jre\lib. : and in classpath. In my testing program, I import javax.xml.parsers.*. When : I compiled the program, I got error message "Package javax.xml.parsers not : found in import." Any idea for what am i wrong? : : Thanks, : Jack Li : : -- Brendan McKenna Email: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Tomcat: NT Service doesn't automatically load context classes and Jars
As I understand the Tomcat NT wrapper, all configuration for the NT Service version of Tomcat is obtained from the wrapper.properties files. Does this also mean that I must add to the wrapper.classpath any classes and jar files that are needed? When I run the Tomcat server in normal mode, it scans the WEB-INF/classes and WEB-INF/lib directories under a context and automatically makes available any jar and class files that it finds in those directories. The only way I can get the NT service version to work correctly with my context is to add each of my class and jar files into its wrapper.properties file. Is this normal? thanks, ron
problems installing
Hi everyone, I'm new to tomcat. When I set my paths as follows: TOMCAT_HOME=/home/vvenkata/foo/jakarta-tomcat-3.2.1 JAVA_HOME=/opt/jdk-1.2.2 When I run startup.sh, I get the following error: Using classpath: /home/vvenkata/foo/jakarta-tomcat-3.2.1=/lib/* ./bin/tomcat.sh: /opt/jdk-1.2.2=/bin/java: not found Any suggestions on how to beat this? Vasanth
admin question
is there any way to stop/restart the server remotely without telnet access?? I know I can do a net stop jakarta and net start jakarta. Is there any restart option on the admin console? Has anyone written a Java utilility to do this? Thanks, Eric Lubin [EMAIL PROTECTED]
Re: admin question
Hi Eric .. I also have the same problem .. if u get the solution please let me know .. I also have to write a java program to start/shutdown .. I also have to start the Tomcat remotely give the servers Ip address and Port .. what are the other ways of doing this .. Please let me know can you please tell me what is net start jakarta ?? thanks Venkatesh From: Eric Lubin [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: admin question Date: Fri, 18 May 2001 15:26:14 -0400 is there any way to stop/restart the server remotely without telnet access?? I know I can do a net stop jakarta and net start jakarta. Is there any restart option on the admin console? Has anyone written a Java utilility to do this? Thanks, Eric Lubin [EMAIL PROTECTED] _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Re: admin question
Could you not create a servlet to run the following? org.apache.tomcat.startup.Tomcat -stop Sincerely yours; Mark Mynsted VHA Management Information Systems Client Services [EMAIL PROTECTED] (972) 830 - 0592, Internal x1592 [EMAIL PROTECTED] 5/18/2001 2:26:14 PM is there any way to stop/restart the server remotely without telnet access?? I know I can do a net stop jakarta and net start jakarta. Is there any restart option on the admin console? Has anyone written a Java utilility to do this? Thanks, Eric Lubin [EMAIL PROTECTED]
Re: Bean Choices (code question)
That's what I thought, too. I guess I'll have to leave my initialization code inside the static blocks. Right now, I'm only using these classes in one context, so the classloader issues don't apply. (yet...) Thanks Charlie and Bo! --jeff - Original Message - From: Cox, Charlie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 18, 2001 11:21 AM Subject: RE: Bean Choices (code question) -Original Message- From: Bo Xu [mailto:[EMAIL PROTECTED]] Sent: Friday, May 18, 2001 1:47 PM To: [EMAIL PROTECTED] Subject: Re: Bean Choices (code question) Jeff Kilbride wrote: Hi Charlie, [...] On the same subject, are class constructors called when static methods are accessed? Right now, in my all static method classes, I'm doing my initialization in static blocks. I'm wondering if I can move that initialization into the class constructor, but I'm not sure if/when the constructor is called when a static method is called. Any insight on this point, also, is greatly appreciated. Thanks, --jeff [...] Hi :-) I did a test, I find: - when I invoke a static method with className.methodName(...), constructor and non-static init-block will not be invoked That's what I thought. The constructor is not invoked because there is no instance of the class. Basically, if it's not static, it won't/can't run until an instance is created. Therefore static methods can only call other static methods in the same class. - it doesn't metter that if this class is a all static method style class or Not,i.e., this class can have all of the following: % static init-block/non-static init-block % static field/non-static(instance) filed % static method/non-static method - only when this class is being loaded into the classloader, static init-block will be invoked(i.e., normally, static init-block only will be invoked One time), now we only have a Class object of my-class, we don't have the instance object of my-class. - I am not sure if the above is righ when Java Reflection is used to find/load this class(like a Servlet container does) I think this is where the classloader(s) issue comes into account and that separate instances in different contexts would be considered different classes. There was a very good explaination of tomcat's classloading discussed in a previous thread : http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg13260.html Bo May.18, 2001 Charlie
Re: problems installing
At 12:08 PM 5/18/2001 -0700, you wrote: When I run startup.sh, I get the following error: Using classpath: /home/vvenkata/foo/jakarta-tomcat-3.2.1=/lib/* ./bin/tomcat.sh: /opt/jdk-1.2.2=/bin/java: not found Any suggestions on how to beat this? How is the = getting in your classpath definition? It's got no business being there...
Re: problems installing
At 12:41 PM 5/18/2001 -0700, I wrote: How is the = getting in your classpath definition? It's got no business being there... The wildcard after the lib directory isn't doing you any favors either for that matter.
RE: javax.xml.parsers.* not found
At 03:04 PM 5/18/2001 -0400, you wrote: Thanks Don Nguyen and Brendan Mckenna. My problem is not the classpath. It is the compiler. When I use javac -XMLTest.java, it didn't work. But c:\jdk1.3\bin\javac XMLTest.java works. Its not the compiler then, but the one your using. It would be interesting to have you use the NT port of which and see which compiler your using.
-security flag and (oracle) JDBC realms
I've downloaded the 4.0b5 release and noticed the warning/suggestion to start running with the -security flag. So, I did just that. I also uncommented the Oracle-based JDBCRealm Realm element (and commented out the Memory based realm). Tomcat wouldn't start since it couldn't find the driver so I made a symbolic link (running on RedHat Linux 6.2) in the $CATALINA_HOME/common/lib directory to the classes111.jar file from the Oracle distribution. Is that where the Oracle JDBC driver should be put? I also tried it in $CATALINA_HOME/lib but that didn't work. Once the driver was found I had to make a change to the Realm entry itself. It has connectionURL=jdbc:oracle:thin:@ntserver:1521:ORCL?user=scott;password=tiger so I changed the server, SID, username, and password to suite my installation but Tomcat complained with java.sql.SQLException: invalid arguments in call After looking at the JDBCRealm.java source code it seams that it needs the connectionUser and connectionPassword attributes to be defined (it puts them in the Properties instance to pass to the connect() call from the open() method). So I removed the ?user=...;password=... portion of the connectionURL attribute and added the required two. Things were shaping as Tomcat can now find the JDBC driver and the Oracle driver isn't complaining about the connection information. But now I'm getting another error and this is where my inexperience with Java security model hinders me. I'm getting the following exception when Tomcat starts: java.security.AccessControlException: access denied (java.net.SocketPermission localhost resolve) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272) at java.security.AccessController.checkPermission(AccessController.java:399) at java.lang.SecurityManager.checkPermission(SecurityManager.java:545) at java.lang.SecurityManager.checkConnect(SecurityManager.java:1042) at java.net.InetAddress.getAllByName0(InetAddress.java:559) at java.net.InetAddress.getAllByName0(InetAddress.java:540) at java.net.InetAddress.getByName(InetAddress.java:449) at java.net.Socket.init(Socket.java:100) at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java) at oracle.net.nt.ConnOption.connect(ConnOption.java) at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java) at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java) at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java) at oracle.net.ns.NSProtocol.connect(NSProtocol.java) at oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java) at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java) at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java) at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:539) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:607) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:278) at org.apache.catalina.core.StandardService.start(StandardService.java:353) at org.apache.catalina.core.StandardServer.start(StandardServer.java:458) at org.apache.catalina.startup.Catalina.start(Catalina.java:725) at org.apache.catalina.startup.Catalina.execute(Catalina.java:647) at org.apache.catalina.startup.Catalina.process(Catalina.java:177) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:196) So I had a look at the catalina.policy file but I'm really not sure what I need to add. It seems that a DNS resolution is attempted but the security system denided it. I found the entry: // These permissions apply to the servlet API classes // and those that are shared across all class loaders // located in the common directory grant codeBase file:${catalina.home}/common/- { permission java.security.AllPermission; }; I thought I could add a similar entry like: grant codeBase file:${catalina.home}/common/lib/- { permission java.security.AllPermission; }; but that didn't work. I would like to start running with the -security flag but this will obviously stop me in my tracks. Any help would be appreciated, Kevin. Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie