RE: Deploying an XSLT filter in Tomcat 4.0
My current web.xml looks like (excluding prolog) It's pretty cool that tomcat's web.xml lets you code in prolog, although I think that will fail the sun standards test :-) -Original Message- From: Martin Coxall [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 21, 2001 10:56 PM To: [EMAIL PROTECTED] Subject: Deploying an XSLT filter in Tomcat 4.0 Does anybody know the current level of support for filters in Tomcat 4.0? I have written a small filter to take the XML output from one of our servlets, and then dependent on a parameter in the ServletRequest, use Xalan to transform the XML to HTML, WML or VoxML as appropriate. Unfortunately, I am completely unable to make Tomcat 4.0 chain the filter to the Servlet, so all I am getting is raw XML rather than HTML etc. My current web.xml looks like (excluding prolog) web-app servlet servlet-nameEchoServlet/servlet-name servlet-classuk.co.itouch.EchoServlet/servlet-class /servlet filter filter-nameEchoFilter/filter-name filter-classuk.co.itouch.EchoFilter/filter-class /filter filter-mapping servlet-nameEchoServlet/servlet-name filter-nameEchoFilter/filter-name /filter-mapping /web-app What am I doing wrong? How do I make Tomcat chain the filter to a servlet? Do I have to invoke the servlet in a special way? Thanks Martin
forward() question
I have some code that looks something like this; RequestDispatcher rd = _req.getRequestDispatcher(/invalid.jsp); try { rd.forward(_req, _resp); } catch ( ServletException e ) { } catch ( java.io.IOException e ) { } The question is does control ever continue after the forward() method call? It would seem sensible that it didn't if you viewed forward as, I no longer wan't this page, but another one instead. My problem is that the above code is in a bean, which does an isValid user check and forwards to a page if they are not. After the bean access I have regular pages which are only mean to be displayed if the user is valid. Like this; jsp:useBean id=userChk class=package.UserValid/ jsp:setProperty name=userChk property=UserName value=auser/ jsp:setProperty name=userChk property=UserPass value=apass/ % userChk.setPageInfo(request, response); % jsp:getProperty name=userChk property=IsValid/ body bgcolor=#7080D0 link=#00FF00 alink=#00 vlink=#00 font size=+1 color=#D0F0F0 p Show this if user is valid /p /body What actually happens is the invalid page is shown, with the additional Show if user is valid html appended to the end. What can I do? I'd really like the forward to actually forward, not act like include.
RE: Context loading of .properties files
Hi Ronald This has come up quite a few times. Search the archives @ http://marc.theaimsgroup.com http://marc.theaimsgroup.com for things like getResource. cheers lyndon -Original Message- From: Ronald G. Louzon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 22, 2001 3:33 PM To: '[EMAIL PROTECTED]' Subject: Context loading of .properties files I have several contexts which use a .properties file for configuration. I need each context to have its own version of that configuration file. Is there a way to load properties files based on context? I am looking for a way to load properties files that is similar to the way in which class and lib files are loaded by the servlet class loader. Ideally, the properties files would be automatically loaded from some place under the WEB-INF directory of a given contest. Thanks, ron
RE: Problem in refresh the new jsp file
You need to find out if its a browser-cache problem, or a tomcat-not-recompiling-source problem. -Original Message- From: Franky Tong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 9:42 AM To: [EMAIL PROTECTED] Subject: Problem in refresh the new jsp file Hi all, I have a problem that I get an outdated JSP page even if I have updated the JSP file in the server. It shows me the old content in the browser even I have refreshed the page. Is there something that I need to set about the caching? Thanks!
RE: xslt processing
Even easier, the latest xerces/xalan supports JAXP ( javax.xml.transform ), which allows very simple access to XSLT transforms. Using the Transformer class, Stream input can be transformed by XSLT to Stream output. -Original Message- From: Arnaud Dostes - NTI [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 5:33 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: xslt processing Cocoon is a great framework, that will do wonders if you handwrite your xml To use dynamically XML (as I like to do), another solution is to use the JDOM API (www.jdom.org) to build the XML doc inside a servlet or jsp, and to use XALAN to perform the XSLT (xml.apache.org) The JDOM api uses XERCES (from the apache found.) but makes it easy to build a doc, so you'll need three jar files, xerces.jar xalan.jar and jdomb6.jar. Copy them to your lib directory. Cheers. - Original Message - From: Hussayn Dabbous [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 20, 2001 4:56 PM Subject: Re: xslt processing try cocoon ... Peter Barta wrote: Hi, does anyone have some suggestions how to configure tomcat for processing xml and xslt on the server side? Thanks: Peter -- Dr. Hussayn Dabbous SAXESS Software Design GmbH Neuenhöfer Allee 125 50935 Köln Telefon: +49-221-56011-0 Fax: +49-221-56011-20 E-Mail: [EMAIL PROTECTED]
RE: Accessing a packaged file
The String parm is the name of the resource, ie it doesn't list resources. -Original Message- From: Jim Downing [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 6:15 PM To: [EMAIL PROTECTED] Subject: Re: Accessing a packaged file I've tried both ways, and I'm still missing something. Thread.currentThread().getContextClassLoader.getResources() doesn't list the resource required - do I have to list it in the web.xml descriptor? jim - Original Message - From: Samson, Lyndon [IT] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 23, 2001 5:47 PM Subject: RE: Accessing a packaged file Or more succinctly; this.getClass().getResourceAsStream(String); From: Filip Hanik [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 5:28 PM To: [EMAIL PROTECTED] Subject: RE: Accessing a packaged file Thread.currentThread().getContextClassLoader().getResourceAsStream picks up files in your WEB-INF/classes or WEB-INF/lib inside of a jar or zip Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net -Original Message- From: Jim Downing [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 9:09 AM To: [EMAIL PROTECTED] Subject: Accessing a packaged file Hi, I'm trying to get a servlet to access a text file that has been packaged with the servlet in a .war file. Is it possible to access the file without knowing it's absolute path when deployed, and if so how? jim
RE: Accessing a packaged file
Or more succinctly; this.getClass().getResourceAsStream(String); -Original Message- From: Filip Hanik [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 5:28 PM To: [EMAIL PROTECTED] Subject: RE: Accessing a packaged file Thread.currentThread().getContextClassLoader().getResourceAsStream picks up files in your WEB-INF/classes or WEB-INF/lib inside of a jar or zip Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net -Original Message- From: Jim Downing [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 9:09 AM To: [EMAIL PROTECTED] Subject: Accessing a packaged file Hi, I'm trying to get a servlet to access a text file that has been packaged with the servlet in a .war file. Is it possible to access the file without knowing it's absolute path when deployed, and if so how? jim
RE: How to read property files?
This works a treat for me InputStream is = this.getClass().getResourceAsStream("myapp.properties"); Properties p = new Properties(); try { p.load(is); } catch ( java.io.IOException e ) { // Can't load props file } That way the properties file can be anywhere in the classpath. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 9:27 PM To: [EMAIL PROTECTED] Subject: How to read property files? I would like to put a myapp.properties file in the top level directory of my webapp. But I can't figure out what filepath to give the Properties.load() method in order to load my servlet property object. Can someone help me? Thanks =eas=
RE: xalan and xerces
In your tomcat.[bat|sh] place the xalan/xerces jar files b4 the xml.jar ( ie tomcats xml parser ) reference. In tomcat 4.0 CLASSPATH will not be available to your servlets/JSP's and WEB-INF/lib will be isolated. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 9:57 PM To: [EMAIL PROTECTED] Subject: xalan and xerces I know this has been asked before, so I went to the archives. I was a bit unsure as to what the answer was, though. Would someone be willing to restate how to get xalan and xerces working for Tomcat 3.1? I have a class that works fine outside of Tomcat, but when I parse inside of Tomcat or use the classpath of tomcat at a command prompt, I get this error: java.lang.NoSuchMethodError at org.apache.xpath.DOM2Helper.getLocalNameOfNode(DOM2Helper.java:326) at org.apache.xalan.templates.TemplateList.getHead(TemplateList.java:471) at org.apache.xalan.templates.TemplateList.getTemplate(TemplateList.java: 528) at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForE ach.java:432) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplat es.java:193) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Tra nsformerImpl.java:2202) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Trans formerImpl.java:2085) at org.apache.xalan.transformer.TransformerImpl.transformNode(Transformer Impl.java:1219) at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java: 2942) at java.lang.Thread.run(Thread.java:484) Thanks -- NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected.
RE: How to read property files?
Works fine for me? My jar file had a manifest, a class ( default package ) and a properties file. I added the jar to the CLASSPATH and executed the class. Voila! As the InputStream has no concept of file paths there is no easy way to determine where in the CLASSPATH it was loaded from. CLASSPATH search order is actually undefined allthough it tends to left to right. The only way I can think of is to split System.getProperties().getProperty("java.class.path") and append the properties file name to every path and then checking if that file is readable. Yuk. -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 3:08 PM To: [EMAIL PROTECTED] Subject: Re: How to read property files? InputStream is = this.getClass().getResourceAsStream("myapp.properties"); Properties p = new Properties(); try { p.load(is); } catch ( java.io.IOException e ) { // Can't load props file } That way the properties file can be anywhere in the classpath. Have you tried doing this from a class inside a .jar file? I have and it didn't work. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 9:27 PM To: [EMAIL PROTECTED] Subject: How to read property files? I would like to put a myapp.properties file in the top level directory of my webapp. But I can't figure out what filepath to give the Properties.load() method in order to load my servlet property object. Can someone help me? Thanks =eas=
RE: How to read property files?
Make sure the directory with the properties file in it is part of your CLASSPATH. Ie add . if the properties is in the current directory. -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 4:18 PM To: [EMAIL PROTECTED] Subject: Re: How to read property files? Have you tried doing this from a class inside a .jar file? I have and it didn't work. Works fine for me? My jar file had a manifest, a class ( default package ) and a properties file. I added the jar to the CLASSPATH and executed the class. Voila! The properties file is not in the jar. Just the class that tries to access it. I didn't try it with the properties file inside the jar, so it may work. But I don't want to do that. I want to make it readily editable. Mark - Original Message - From: "Samson, Lyndon [IT]" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 18, 2001 10:42 AM Subject: RE: How to read property files? Works fine for me? My jar file had a manifest, a class ( default package ) and a properties file. I added the jar to the CLASSPATH and executed the class. Voila! As the InputStream has no concept of file paths there is no easy way to determine where in the CLASSPATH it was loaded from. CLASSPATH search order is actually undefined allthough it tends to left to right. The only way I can think of is to split System.getProperties().getProperty("java.class.path") and append the properties file name to every path and then checking if that file is readable. Yuk. -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 3:08 PM To: [EMAIL PROTECTED] Subject: Re: How to read property files? InputStream is = this.getClass().getResourceAsStream("myapp.properties"); Properties p = new Properties(); try { p.load(is); } catch ( java.io.IOException e ) { // Can't load props file } That way the properties file can be anywhere in the classpath. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 17, 2001 9:27 PM To: [EMAIL PROTECTED] Subject: How to read property files? I would like to put a myapp.properties file in the top level directory of my webapp. But I can't figure out what filepath to give the Properties.load() method in order to load my servlet property object. Can someone help me? Thanks =eas=
RE: Fed up to the back teeth with tomcat !!!
You could allways get the source to Tomcat, and insert your own logging!!! Ooh now, there's an idea :-) -Original Message- From: Andy C [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 9:34 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: re: Fed up to the back teeth with tomcat !!! - Original Message - From: "Sandy McPherson" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 12, 2001 9:06 AM Subject: RE: Fed up to the back teeth with tomcat !!! IMHO: before you go blaming something in public you should first identify the problem lies actually with the product you are slagging. Perhaps you should change your database to mysql! Yes, I would like to apologise for that. Please understand last night I was extremly irratable and unreasonable after a day of frustration. Note: I am uses mysql as well as SQL-server7.0. As I have intimated in another message SQL-server is being used as it is is a "legacy" database. The main page is generated from a mysql databse, only release date queries are being generated from SQL-server. I also have the problem that after a month of trying to find out where the problem lies (by examing logs, hammering a test server with request etc) I am no nearer to the truth. I will however persevere. BTW Is there an easy way to import a SQL-Server database into mysql ? At least that way I could dump the jdbc-odbc bridge ? Regards Andy C Editor R2 project http://www.r2-dvd.org
RE: Fed up to the back teeth with tomcat !!!
Hi Alistair, I tried to get to the Virtuso link www.openlink.com buts its a redirect to internet.com Was your email some kind of clever spam :-) -Original Message- From: Alistair Hopkins [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 11:48 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Fed up to the back teeth with tomcat !!! For more complex data transfers between databases, take a look at virtuoso at openlink.com. It's a meta-database-engine that lets you write SQl loading from one database into another. This is nice as you can remove early-effort-stupidities and rearrange your schema when moving db. Al. -Original Message- From: Danny Angus [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 12, 2001 11:13 AM To: [EMAIL PROTECTED] Subject: RE: Fed up to the back teeth with tomcat !!! BTW Is there an easy way to import a SQL-Server database into mysql ? At least that way I could dump the jdbc-odbc bridge ? if you have fewer than 100's of tables use rational rose to de-construct the SQL server into DDL, throw away all the relationship definitions [sic], switch a few data types, select everything from SQL server into a tab delim or csv file, and bingo.. ready for import into mysql
RE: XSLT vs. JSP
Well actually in the context of generating web applications, XSLT and JSP are both competing. IMHO, XSLT has the huge advantage of separating content and format, unlike JSP. XSLT is also turing complete, I would think for many applications it would be a much better solution than Perl/LineNoise :-) -Original Message- From: Rui M . Silva Seabra [mailto:[EMAIL PROTECTED]] Sent: Friday, April 06, 2001 4:29 PM To: [EMAIL PROTECTED] Subject: Re: XSLT vs. JSP On Fri, Apr 06, 2001 at 09:15:34AM -0600, Jason Izatt wrote: My upfront apologies for an off-topic posting. I'm looking for a good discussion forum on the XSLT vs. JSP argument. Can anyone point me to a good place? I can't, but I also cannot see any argument between XSLT and JSP since they do different things. Anyway, XSLT can't beat a half decent perl programmer. Hugs, rms -- + No matter how much you do, you never do enough -- unknown + Whatever you do will be insignificant, | but it is very important that you do it -- Ghandi + So let's do it...?
RE: Error 500: Internal servlet error
Its usually not a good idea to get political on lists like this, but I just wonder about your email address, it icould/i be considered quite offensive to some people. I'm sure it isn't meant to be. Regarding your error, have you compiled and successfully run the simple hello world servlet, thats a good starting point. If that works your system is installed ok and the problem is with your own code. If so you may want to post the relevant parts. cheers -Original Message- From: white_power [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 05, 2001 2:02 PM To: [EMAIL PROTECTED] Subject: Error 500: Internal servlet error Hello everybody ! I'm an absolute beginner in using tomcat, and I have a little (?) problem. The situation is: I'm using RedHat linux + jdk1.3 + tomcat3.2.1. I compiled a simple servlet to the TOMCAT_HOME/classes/session/WEB-INF/classes directory, named ServletSession.class. The web.xml is the following: ... web-app servlet servlet-nameServletSession/servlet-name servlet-classServletSession/servlet-class /servlet session-config session-timeout 5 /session-timeout /session-config web-app In the server.xml there is a context entry: ... Context path="/session" docBase="classes/session" /Context ... When I type the http://localhost:8080/session/servlet/ServletSession URL I always get this error: Error: 500 Location: /session/servlet/ServletSession Internal Servlet Error: java.lang.NullPointerException at java.lang.ClassLoader.resolveClass0(Native Method) at java.lang.ClassLoader.resolveClass(ClassLoader.java:588) at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j ava:430) at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad er.java:174) at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:265) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289) at org.apache.tomcat.core.Handler.service(Handler.java:254) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) I tried to solve this problem, but now I haven't any idea. Please help me, if you can. thanx: Hajdu Erno.
RE: tomcat in comb. with apache randomly rejecting requests
Kresimir, You may want to analyse what network traffic originating from the browser, just watch the TCP data that IE sends to the server, if the request is the same the problem is most likely on the server, otherwise the browser may be trying to 'intelligently' ( read: brain dead ) cache and this might be causing the problem. -Original Message- From: Lyle H. Ward [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 05, 2001 1:59 PM To: [EMAIL PROTECTED] Subject: Re: tomcat in comb. with apache randomly rejecting requests Not that it is any help, but! I use IE over the net to several secure sites (mostly financial) and see this same behavior. I think it is in the IE code and outside of maybe obtaining the IE source, there isn't any cure. At 08:11 PM 4/4/2001 -0400, you wrote: looks like no-one wants to tackle this question... anyway, does anyone know any good consultants that work with jakarta-tomcat and apache - where additional help (even for a fee) could be asked. Thank you. -Original Message- From: Kresimir (Binsco) [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, April 04, 2001 2:18 PM Subject: tomcat in comb. with apache randomly rejecting requests Hi, I have already posted this quesion, but maybe I have not given enough detail. Please help as this is getting very frustrating. Ok, this is the problem briefly: Very randomly when we try to submit the request to tomcat (that is working with apache) we get the error message from the browser: "This page cannot be accesses... etc..." If we try to re-submit the request just few seconds after, clicking the same submit button ... it will work. Sometimes it will work first time too. Actually it will reject request maybe one out of three times, the slower the connection (I think) the more likely rejection is. Ok, these are the details. The application is a shopping cart and when user is submitting items to the cart, there is no problems. In this case we submit to regular http (not secure), and in the request there is only couple of values. After that, there is a page with the credit card and order information with about 20 or so fields, now this is https protocol we submit to. This is when the problem occurs, this page with 20 or so values, and using https will reject randomly. If you try to submit again once you were rejected, it will go through... This does not happen with netscape at ALL, but with Internet Explorer only. The .jsp that request is submitted to reads those 20 properties into the bean, using property * Also, if we run tomcat only, locally (without apache), so if we submit to localhost:8080, this will not happen. This happens only when we submit over the net using apache, but then again we do not use https when using localhost. Please help, any info is EXTREMELY appreciate as we've been poking around for weeks now. If you need more information or the url to the actual application please let us know. Thank you. !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTMLHEAD META http-equiv=Content-Type content="text/html; charset=windows-1252" META content="MSHTML 5.50.4522.1800" name=GENERATOR/HEAD BODY bgColor=#ff DIVFONT size=2looks like no-one wants to tackle this question.../FONT/DIV DIVFONT size=2anyway, does anyone know any good consultants that work with jakarta-tomcat and/FONT/DIV DIVFONT size=2apache - where additional help (even for a fee) could be asked./FONT/DIV DIVFONT size=2/FONTnbsp;/DIV DIVFONT size=2Thank you./FONT/DIV BLOCKQUOTE dir=ltr style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #00 2px solid; MARGIN-RIGHT: 0px" DIVFONT face=Arial size=2B-Original Message-/BBRBFrom: /BKresimir (Binsco) lt;A href="mailto:[EMAIL PROTECTED]"[EMAIL PROTECTED]/Agt;BRBTo: /BA href="mailto:[EMAIL PROTECTED]"[EMAIL PROTECTED] /A lt;A href="mailto:[EMAIL PROTECTED]"[EMAIL PROTECTED] /Agt;BRBDate: /BWednesday, April 04, 2001 2:18 PMBRBSubject: /Btomcat in comb. with apache randomly rejecting requestsBRBR/DIV/FONT DIV DIVFONT size=2Hi,/FONT/DIV DIVFONT size=2/FONTnbsp;/DIV DIVFONT size=2I have already posted this quesion, but maybe I have not given enough detail./FONT/DIV DIVFONT size=2Please help as this is getting very frustrating./FONT/DIV DIVFONT size=2/FONTnbsp;/DIV DIVFONT size=2Ok, this is the problem briefly:/FONT/DIV DIVFONT size=2/FONTnbsp;/DIV DIVFONT size=2Very randomly when we try to submit the request to tomcat (that is working with/FONT/DIV DIVFONT size=2apache) we get the error message from the browser: "This page cannot be accesses... etc..."/FONT/DIV DIVFONT size=2If we try to re-submit the request just few seconds after, clicking the same submit/FONT/DIV DIVFONT size=2button ... it will work./FONT/DIV DIVFONT size=2Sometimes it will work first time too. Actually it will reject request maybe one out of/FONT/DIV
RE: web.xml problem?
IANAE but... this url-pattern /TrainingPlansRepository/born/servlets/LoginController /url-pattern doesn't seem to match this FORM METHOD=POST ACTION="born/servlets/LoginController" try changing one or the other. regards lyndon -Original Message- From: tomcat user [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 04, 2001 3:31 PM To: '[EMAIL PROTECTED]' Subject: web.xml problem? I'm using tomcat321 on NT4.0. I have a simple login page that I'm trying to call my servlet to do some processing on the request parameters. But, Tomcat cannot find my servlet. See the details below. Any suggestions? Here are my paths: c:\opensource\tomcat321\webapps\TrainingPlansRepository\jsp\Login.html c:\opensource\tomcat321\webapps\TrainingPlansRepository\web-inf\classes\born \servlets\LoginController.class Here is a part of my web.xml: web-app servlet servlet-name LoginController /servlet-name servlet-class born.servlets.LoginController /servlet-class servlet-mapping servlet-name LoginController /servlet-name url-pattern /TrainingPlansRepository/born/servlets/LoginController /url-pattern /servlet-mapping Here is the line that matters in my Login.html: FORM METHOD=POST ACTION="born/servlets/LoginController" Here is the resulting error msg in Netscape: Not Found (404) Original request: /TrainingPlansRepository/jsp/born/servlets/LoginController Not found request: /TrainingPlansRepository/jsp/born/servlets/LoginController __ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup
RE: First ExceptionInInitializerError Then NoClassDefFoundError
Are you running the supplied examples or your own servlet? Try compiling a helloworld servlet, then modifying it incrementally. regards lyndon -Original Message- From: Rajesh A [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 04, 2001 5:12 PM To: [EMAIL PROTECTED] Subject: First ExceptionInInitializerError Then NoClassDefFoundError Everytime I start tomcat 3.2.1 (win2k) and run a servlet I get java.lang.ExceptionInInitializerError. Subsequent requests to the same servlet throw java.lang.NoClassDefFoundError. The servlet class file is located in the webapps/myapp/web-inf/classes/. This dir is in the classpath before starting tomcat. I found similar problem reported in the archives but no solutions. I might have missed something very silly. Please help. Rajesh _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
RE: Cache problem with IE
You could try outputting this header. META HTTP-EQUIV='Expires' CONTENT='-1' Failing that just tack a random number ( System.currentTimeMillis() ) onto each URL to guarentee uniqueness. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Logout of telnet session - tomcat stops
You can use the nohup command to ensure processes continue after logoff. -Original Message- From: Gary Lawson [mailto:[EMAIL PROTECTED]] Sent: Monday, March 12, 2001 11:42 AM To: [EMAIL PROTECTED] Subject: Logout of telnet session - tomcat stops Hello I want to be able to control tomcat on a remote (Solaris) machine by telnet from a PC. It starts fine but when I close the telnet session, tomcat stops. More detail: 1. Log in as gary. 2. su root (it runs on port 80) 3. start tomcat (runs fine) 4. logout root (tomcat still running) 5. logout gary (tomcat stops) I have searched the archive but couldn't find the answer. Any ideas? TIA Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Encrypting password
You could write a custom applet, which could use any encryption algorithm you prefer. -Original Message- From: Sam Newman [mailto:[EMAIL PROTECTED]] Sent: Monday, March 12, 2001 2:35 PM To: [EMAIL PROTECTED] Subject: Encrypting password Am I right in saying the only method for encrypting user entered data (e.g from client desktopn browser to web server) is SSL? sam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Encrypting password
Courier a disk :-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, March 12, 2001 3:09 PM To: '[EMAIL PROTECTED]' Subject: RE: Encrypting password On Mon, 12 Mar 2001, Samson, Lyndon [IT] wrote: You could write a custom applet, which could use any encryption algorithm you prefer. -Original Message- From: Sam Newman [mailto:[EMAIL PROTECTED]] Sent: Monday, March 12, 2001 2:35 PM To: [EMAIL PROTECTED] Subject: Encrypting password Am I right in saying the only method for encrypting user entered data (e.g from client desktopn browser to web server) is SSL? sam but the problem is always 'how to initialize the session keys?' encrypting and decrypting itself is easy. Sloot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Please Help On Static Reference ........
Is parkingPriceHandler an instantiated object or a class? -Original Message- From: Mick Sullivan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 2:48 PM To: [EMAIL PROTECTED] Subject: Please Help On Static Reference Hi all, I was wondering could someoone please help me with this error im getting. Im trying to output a value saved from a previous page in a text box in a new page using the JSP command: INPUT TYPE="TEXT" NAME="price" SIZE="0" VALUE="%=parkingPriceHandler.getPrice()%" The function getPrice() is defined in parkingPriceHandler. This is the error i get: "Can't make static reference to method java.lang.String getPrice() in class parkingPrice.parkingPricehandler." Error: 500 Location: /project/jsp/view_parking_cost.jsp Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile class for JSPC:\tomcat\work\localhost_8080%2Fproject\_0002fjsp_0002fview_0005fparking_ 0005fcost_0002ejspview_0005fparking_0005fcost_jsp_30.java:94: Can't make static reference to method java.lang.String getPrice() in class parkingPrice.parkingPricehandler. out.print(parkingPricehandler.getPrice() ); ^ 1 error at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled Code) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java, Compiled Code) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java, Compiled Code) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java, Compiled Code) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java, Compiled Code) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va, Compiled Code) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java, Compiled Code) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code) at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java, Compiled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code) at java.lang.Thread.run(Thread.java, Compiled Code) Whats the Story with Static Referencing??? Please please help coz my project is due up very soon and Im dead confused, Thanks a million in advance. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Tomcat usability as a WebServer?
Or maybe your could just pass the cgi to a shell of some sort, it would set up the enviroment ( .cshrc etc ) for you. The shell should inherit its initial environment from its parent, ie the java exec. Oh yes, this causes 2 calls to exec|CreateProcess but if you really really have to have CGI... -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Monday, March 05, 2001 7:23 PM To: [EMAIL PROTECTED] Subject: RE: Tomcat usability as a WebServer? Its one of those things that is, and isn't, very easy. In its most simplistic form, running a CGI is as easy as calling exec. Passing parameters specificed by GET are set as enviornment parameters, which exec supports passing. Pasing POST data is as easy as connecting the CGI's input stream to the servlet's input stream. The HTML output is also just as simple. The real difficulty comes in when the CGI expects to have all of the regular machine's environment variables set (i.e. PATH, CLASSPATH, LD_LIBRARY_PATH, USER, etc). Setting them isn't the problem, getting them is, as Java has no way to read these. You could fetch them with a bit of native code, or a shell script (exec something like echo on MS-DOS, read, parse, and store the response). Randy -Original Message- From: Jan Labanowski [mailto:[EMAIL PROTECTED]] Sent: Monday, March 05, 2001 2:22 PM To: '[EMAIL PROTECTED]' Cc: Jan Labanowski Subject: RE: Tomcat usability as a WebServer? On Mon, 5 Mar 2001, Samson, Lyndon [IT] wrote: But but but... tomcat does serve static pages. It can be used as a stand alone web server, and with a simple servlet, it could run cgi progams. Where is this simple servlet? Please do not confuse people... Supporting the CGI protocol according to specs is quite involved since Environment variables are concerned... If the servlet simple, I would like to see it... Jan [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Tomcat usability as a WebServer?
But but but... tomcat does serve static pages. It can be used as a stand alone web server, and with a simple servlet, it could run cgi progams. -Original Message- From: Brett W . McCoy [mailto:[EMAIL PROTECTED]] Sent: Monday, March 05, 2001 5:52 PM To: [EMAIL PROTECTED] Cc: tomcat Subject: Re: Tomcat usability as a WebServer? On 2001.03.05 12:36 Manish Shahdadpuri wrote: I am a new Tomcat user. As far as I understand, tomcat is also a web server in itself. Is it possible to use tomcat alone as a web server without using any other WebServer e.g Apache etc. Only if you are serving JSP and servlets and no static pages or standard CGI programs. For that you will need Apache, iPlanet, IIS, etc. -- Brett http://www.chapelperilous.net/~bmccoy/ Murphy's Law is recursive. Washing your car to make it rain doesn't work. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Log File isapi.log Too Big
You can find out what processes have the file open using handleex from www.sysinternals.com. A top site for nt tools. -Original Message- From: Eli Segev [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 9:06 PM To: [EMAIL PROTECTED] Subject: Re: Log File isapi.log Too Big Randy Layman wrote: Sadly, no. You must stop IIS, remove the file, and restart IIS. Not to hard with a .bat file, however it causes outages in your availability. This does not work. Even if I stop IIS and Tomcat, I can't delete the log file. When I try, I get a sharing violation. I suspect that the association of the file to ISAPI in the registry prevents it from being manipulated outside of Tomcat. Batch file would be something like: net stop "World Wide Web Publishing Service" del isapi.log net start "World Wide Web Publishing Service" Once I got my server running, I turned the logging down to FATAL and it doesn't seem to grow to much. Randy -Original Message- From: Eli Segev [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 3:27 PM To: [EMAIL PROTECTED] Subject: Log File isapi.log Too Big After using Tomcat with IIS 4.0 with the the ISAPI redirector for a while, I have realized that the log file is growing and growing. I would like to empty the file once in a while. Is there any clean way of doing it? -- Eli Segev PTC (781)370-6127 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Eli Segev PTC (781)370-6127 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Generating a random alphanumeric string
This seems ok for the job. There should be some speedups if you need them. Cheers // --- cut --- public class GenID { private static String validChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; private int _IDlength; public GenID(int IDlength) { _IDlength = IDlength; } public String generate() { String resultID = ""; int maxIndex = validChars.length(); java.util.Random rnd = new java.util.Random(); for ( int i = 0 ; i _IDlength ; i++ ) { int rndPos = Math.abs(rnd.nextInt() % maxIndex); resultID += validChars.charAt(rndPos); } return resultID; } } // --- cut --- -Original Message- From: Cato, Christopher [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 2:05 PM To: '[EMAIL PROTECTED]' Subject: Generating a random alphanumeric string Hello, can anyone show me an example or give me a clue about how to generate a random alphanumeric string of lets say 16-32 chars? TomCat is obviously doing it for the session ids, but how would I do the same in a servlet? Regards, Christopher Cato - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re:confused
goonsArrrh The HTML email, please not the HTML email.../goons make a directory under webapps in the tomcat dir ( easiest just to copy an existing dir ), your classes go in dir/WEB-INF/classes, jar files in dir/WEB-INF/lib. HTML gifs etc in dir You don't have to but you can change dir/WEB-INF/web.xml so that you have entries of the form servlet-mapping servlet-name yournewservlet /servlet-name url-pattern /yournewservletpattern /url-pattern /servlet-mapping servlet servlet-name yournewservlet /servlet-name servlet-class yournewservletclass /servlet-class /servlet the url-pattern is what sets up the reference http://yourcomputerhostname:8080/yournewservletpattern so that is runs yourservletclass cheers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Anybody doing doPost successfully ?
Hi Madar You are missing enctype="multipart/form-data" in your post tag on the form. cheers -Original Message- From: Mandar Joshi [mailto:[EMAIL PROTECTED]] Sent: Friday, February 16, 2001 7:36 PM To: [EMAIL PROTECTED] Subject: Re: Anybody doing doPost successfully ? Hi , This is for a Servlet- Well I tried it in both ways - Posting data using a java client like this URL url = new URL( http://mandar:8080/commerceroute/servletname http://mandar:8080/commerceroute/servletname); URLConnection conn = url.openConnection(); if(conn instanceof HttpURLConnection) { HttpURLConnection httpConn = (HttpURLConnection) conn; httpConn.setRequestMethod("POST"); httpConn.setDoOutput(true); out.write(arr); System.out.println("bytes written : " + arr.length); out.flush(); out.close(); out = null; httpConn.getContent(); InputStream ins = httpConn.getInputStream(); InputStreamReader rd = new InputStreamReader(ins); // read from rd } Using a html page like this HTML HEAD TITLERosettaNet Request POST/TITLE /HEAD BODY FORM METHOD=POST ACTION=" http://mandar:8080/commerceroute/ http://mandar:8080/commerceroute/servlet/CRRosettaNetServlet servletname" INPUT TYPE=HIDDEN NAME=ERNO VALUE="Test_Data" INPUT TYPE=SUBMIT NAME="Submit" /FORM /BODY /HTML In both cases the servlet seems to be stuck while reading from the request.InputStream Mandar - Original Message - From: CPC mailto:[EMAIL PROTECTED] Livelink Admin To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Friday, February 16, 2001 11:23 AM Subject: RE: Anybody doing doPost successfully ? I have successfully received post data in a JSP both using the getParameter and using the com.oreilly.servlet utility classes. How are you sending the post data? Are you using a web browser and form, or are you trying to post it yourself using an applet or something. The process does work, so it must be something unique to the way you are sending the info. Regards, Paul -Original Message- From: Mandar Joshi [mailto:[EMAIL PROTECTED]] Sent: Friday, February 16, 2001 1:39 PM To: [EMAIL PROTECTED] Subject: Anybody doing doPost successfully ? Hi, I am still not successful in getting data in doPost. anybody is doing it successfully ? Regards, Mandar - Original Message - From: Mandar Joshi mailto:[EMAIL PROTECTED] To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Thursday, February 15, 2001 6:15 PM Subject: No Data available in doPost ? Hi, I am doing the following thing in my doPost() method. __ public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { try { InputStream ins = request.getInputStream(); logMsg("Bytes available " + ins.available()); } } I am posting some data to this servlet but I am getting the available bytes to be 0 ?? Any guess why is this happening ? TIA Mandar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Newbie Question, this should be easy
You should really run tomcat using the jdk from Sun ( or IBM ) rather than that supplied by an IDE. -Original Message- From: Ashant Chalasani [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 17, 2001 8:19 AM To: [EMAIL PROTECTED] Subject: RE: Newbie Question, this should be easy Paul - James, Thanks for your answer. Still have problems... I am also writing some servlets, which work just fine through the Tomcat server. The problem exists only w/ JSP pages. Does this still mean the class-path is wrong. My Windows environment class-path is set to Java_Home=C:\JBuilder3, and this starts up the tomcat server fine and also processes servlets right. Where should tools.jar be included, if still needed. Thanks, Ashant From: "CPC Livelink Admin" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Newbie Question, this should be easy Date: Fri, 16 Feb 2001 21:36:46 -0500 Well, there are two errors. One, you don't have the java compiler in your classpath. This is usually in a file called tools.jar. Second, the XML tag extentions are case sensitive. You will need to use jsp:usebean and jsp:setproperty (thought I can't remember if it is useBean and setProperty instead - rats) Regards, Paul _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Tomcat 3.1 can't handle load
Hello Sunil The Jdk's have been proven to be quite stable for a long time now. Its highly likely your problem is in the binary code of your jdbc driver. Is a newer driver available? Can you 'switch' databases for a round of testing ( ie try the eval version of oracle ) to see if the problem goes away? cheers -Original Message- From: Sunil Kumar Roy [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 15, 2000 8:52 PM To: [EMAIL PROTECTED] Subject: Tomcat 3.1 can't handle load Hello Sirs, We are developing a B2B website using Tomcat 3.1 for our company.(We are yet to buy a full-fledged webserver since ours is a startup firm). The site displays many images. We use SQL server7.0 for database. When we are interacting with the database, very often the following prompt appears "It has performed an illegal operation will be shut down". There is only one button for "close" in that prompt box.When we click on "close", the tomcat shuts down. The problem also sometimes comes when we are not accessing the database. We are facing great difficulty in developing the site due to this frequent problem. Could you help please? Thanks in anticipation. Regards Sunil K. Roy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: help need
How ironic. An email from a guy asking how to unsubscribe is the ONLY post which doesn't acutally contain the unsubscribe information... Maybe because its HTML? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FLAW IN SERVLET SPECIFICATION IS THE REASON FOR LACK OF STANDARD SUPPORT FOR FILE UPLOAD
I'm not entirely sure what you are saying, however I wrote a multipart/form-data parser whos contructor is passed req.getInputStream() and it works fine under Tomcat. I use the service method of the HttpServlet class rather than doPost, I don't think that would make any difference. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 15, 2001 7:52 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: FLAW IN SERVLET SPECIFICATION IS THE REASON FOR LACK OF STANDARD SUPPORT FOR FILE UPLOAD Ufortunately both servlet spec 2.2 as well as the proposed servlet spec 2.3 are not compliant with neither RFC 1867 nor RFC 2616 although in some parts of the specs mentions is given of HTTP 1.1 and one is let to believe that those specs be compliant with HTTP 1.1. A further evidence which let believe that the spec 2.2 and 2.3 are fully HTTP 1.1 compliant is the following statement found in the introduction of the text: The following Internet Specifications provide relevant information to the development and implementation of the Servlet API and engines which support the Servlet API: · RFC 1630 Uniform Resource Identifiers (URI) · RFC 1738 Uniform Resource Locators (URL) · RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax · RFC 1808 Relative Uniform Resource Locators · RFC 1945 Hypertext Transfer Protocol (HTTP/1.0) · RFC 2045 MIME Part One: Format of Internet Message Bodies · RFC 2046 MIME Part Two: Media Types · RFC 2047 MIME Part Three: Message Header Extensions for non-ASCII text · RFC 2048 MIME Part Four: Registration Procedures · RFC 2049 MIME Part Five: Conformance Criteria and Examples · RFC 2109 HTTP State Management Mechanism · RFC 2145 Use and Interpretation of HTTP Version Numbers · RFC 2324 Hypertext Coffee Pot Control Protocol (HTCPCP/1.0)1 · RFC 2616 Hypertext Transfer Protocol (HTTP/1.1) · RFC 2617 HTTP Authentication: Basic and Digest Authentication As you certainly know, RFC 2616 relies upon RFC 1867 for FORM handling even though RFC 1867 is still in "Experimental" status. I strongly advice either to modify the servlet spec and make support for RFC 2616 and RFC 1867 complete, or to write more clearly that this is not the case. Ideally, it would be very useful if deviations of the spec from those RFC be described in detail. I stumbled across this problem when trying to submit a POST with enctype="multipart-form/data" to Tomcat 3.1 and Tomcat 3.2.1 and got always nulls. Then I looked in the source and found that the javax... returns NULL in case that the submitted POST contains data but the content type not be= "application-xxx-www-form-urlencoded". According to the specs, "If any of the getParameter family of methods is not called, or not all of the above conditions are met, the post data must remain available for the servlet to read via the request#8217;s input stream." but unfortunately that is not the case since the javax.. implementation returns null as result of the doPost with the enctype="multipart-form/data" The only way to handle that problem (and still remain "pure Java") is currently to extend the HttpServlet with a doPost which supports also enctype="multipart-form/data" such as done by Jason in his classes (http://www.servlets.com/resources/com.oreilly.servlet/index.html) however one would normally expect such functionality to be provided by *any* servlet implementation and for sure by the "servlet standard" ! As myself, several hundreds of other developers are hampered by this fact as one can easily find by searching in the archives of the mailing lists for example at technet.oracle.com in the XML discussion group, or in tomcat mailing lists. Your constructive comments will be appreciated. Luca Toldo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: legal issue???
This came up before with the subject tools.jar. I think the response was basically to use jspc to precompile your JSP source. -Original Message- From: Philip Halsey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 10:17 AM To: '[EMAIL PROTECTED]' Subject: legal issue??? Hi, I have been using tomcat for a while now developing an intranet front end to a database system We are now at the point where we are think about how we are to deploy it on user sites and so are doing research on what the best JSP/Servlet server engine to use. As we have been developing on tomcat we would prefer to use it... I am really not sure about the legal issues of doing this with tomcat, especially to do with customers requiring the JDK to compile the JSP files. I have tried to find information about this on the web site but have failed. I would be very grateful for an advise received. Cheers Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Hi Ho - Problem with ServletOutputStream in Tomcat
This is true, I wrote a multipart/form-data parser and the only character set which preserved binary data was ISO-8859-1. Conversions between bytes and characters only work with this encType, your input and output should both use this if you use characters to store binary data. Output streams are supposed to output bytes, the print in the ServletOutputStream method converts a char to a byte array, you'd be better off using the write(byte[] b) method of the base OutputStream class. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 12:45 PM To: [EMAIL PROTECTED] Subject: Hi Ho - Problem with ServletOutputStream in Tomcat I ve created an Servlet that routes Requests and Responses to and from another Server. When i try to get a Image through this Servlet i get an Error 500. I coded the app as described in the j2ee docu for sending binary data. maybee a little code snipplet and the error trace helps to understand http://127.0.0.1:8080/maria/portal/zmr/javalogo52x88.gif this is the url -- http://127.0.0.1:8080 - is my Tomcat instance /maria/portal - is my proxy servlet /zmr/javalogo52x88.gif is the image i want to display in my browser - but /zmr is another webapplication on another tomcat server heres the code for the binary data receiving and sending to the client // Setting the Headers for the Client same as the Servlet received them from the other server while ((strHeaderKey = HttpUrlCon.getHeaderFieldKey(iCounter)) != null) { strHeaderValue = HttpUrlCon.getHeaderField(iCounter); LogIt("ResponseHeader - Value: " + strHeaderKey + " - " + strHeaderValue); response.setHeader(strHeaderKey,strHeaderValue); iCounter +=1; } // figuring out which type of data the servlet is getting if (HttpUrlCon.getContentType().equals("text/html")) { // Text or HTML - thats where i use the PrintWriter PrintWriter out = response.getWriter(); int iByte; while ((iByte = brInput.read()) != -1) { out.print((char) iByte); } } else { try { // Everything else assuming its binary data so i use ServletOutputStream ServletOutputStream out = ((ServletResponse)response).getOutputStream(); int iByte; while ((iByte = brInput.read()) != -1) { out.print((char) iByte); } } catch (IOException e) { this.log("IOException !!",e); } } heres the error trace i get when i try to process it - 2001-02-14 01:26:43 - path="/maria" :proxy: ResponseHeader - Value: Content-Type - image/gif 2001-02-14 01:26:43 - path="/maria" :proxy: ResponseHeader - Value: Content-Length - 1495 2001-02-14 01:26:43 - path="/maria" :proxy: ResponseHeader - Value: Last-Modified - Tue, 13 Feb 2001 10:07:22 GMT 2001-02-14 01:26:43 - path="/maria" :proxy: ResponseHeader - Value: Servlet-Engine - Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.) 2001-02-14 01:26:43 - path="/maria" :proxy: IOException !! - java.io.IOException: Not an ISO 8859_1 character:^ at org.apache.tomcat.core.BufferedServletOutputStream.print(BufferedServletOutp utStream.java:221) at javax.servlet.ServletOutputStream.print(ServletOutputStream.java:177) at at.gv.bmi.maria.proxy.ReturnData(proxy.java:201) at at.gv.bmi.maria.proxy.doGet(proxy.java:63) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) please help me, its important and i dont know how to solve this problem - in my opinion its a problem in the org.apache.tomcat.core.BufferedServletOutputStream Class ?? why does it need a ISO 8859_1 Charset for Binary Data ??? greetings Wolfgang Kremser - To
RE: Need help! :( (XALAN CONFIG )
Hi This question comes up alot on this list. The fix is to put your xml parser before the tomcat one in the CLASSPATH. ie xalan.jar;xerces.jar;xml.jar This will avoid the less functional classes in xml.jar being used when you really want the newer classes. You can make the change in tomcat.[sh|bat] for tomcat 4.0 In 4.0 I think the WEB-INF/lib is automatcally searched b4 the system classpath, so no problems like this. If you want more detail search the list archive. -Original Message- From: Nazir Faisal-LFN003 [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 3:24 PM To: '[EMAIL PROTECTED]' Subject: Need help! :( (XALAN CONFIG ) Hello We are trying to configure Tomcat to work with Xalan (the XSLT engine). We have set up the servlet (XSLT.class) in the webapps directory ie D:\tomcat\webapps\faisal\WEB-INF\Classes\XSLT.class we have also configured the 'web.xml' in D:\tomcat\webapps\faisal\WEB-INF this file looks like : - web.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 XSLT /servlet-name servlet-class XSLT /servlet-class /servlet /web-app -eof web.xml -- We can run simple example servlets however, when using the XALAN API, we keep getting the following errors: tomcat.log-- Context log: path="/examples" Adding context path="/examples" docBase="webapps/examples" Context log: path="" Adding context path="" docBase="webapps/ROOT" Context log: path="/test" Adding context path="/test" docBase="webapps/test" Context log: path="/faisal" Adding context path="/faisal" docBase="webapps/faisal" Starting tomcat. Check logs/tomcat.log for error messages Starting tomcat install="d:\tomcat" home="D:\tomcat" classPath="d:\tomcat\classes;d:\tomcat\lib\webserver.jar; d:\tomcat\lib\jasper.jar;d:\tomcat\lib\xml.jar; d:\tomcat\lib\servlet.jar;c:\jdk1.3\lib\tools.jar; D:\tomcat\lib\servlet.jar;D:\xalan\stylebook-1.0-b3_xalan-2.jar;.; D:\xalan\xalan.jar;D:\xalan\xerces.jar;D:\xalan\xalanj1compat.jar; D:\xalan\xalan2jdoc.jar;D:\xalan\xalanservlet.jar" Context log: path="/admin" Automatic context load docBase="D:\tomcat\webapps\admin" Context log: path="/admin" Adding context path="/admin" docBase="D:\tomcat\webapps\admin" file:///D:/tomcat/webapps/faisal/fruit.xml; Line 3; Column 3; java.lang.NoSuchMethodError at org.apache.xpath.DOM2Helper.getLocalNameOfNode(DOM2Helper.java:326) at org.apache.xalan.templates.TemplateList.getHead(TemplateList.java:471) at org.apache.xalan.templates.TemplateList.getTemplate(TemplateList.java:528) at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.ja va:432) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav a:193) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform erImpl.java:2154) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform erImpl.java:2097) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer Impl.java:2029) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j ava:1189) at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894) at java.lang.Thread.run(Thread.java:484) -eof tomcat.log-- The servlet compiles ok and the all the Xalan jars are placed in the correct directories, however, there seems to be a problem with Tomcat finding the above Xalan API method call. We've tried doing many things already and are urgently needing some help. Here's the simple servlet that we've been working on : XSLT.java--- - import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; import org.w3c.dom.*; public class XSLT extends HttpServlet { public void init(){ TransformerFactory trFactory = TransformerFactory.newInstance(); File xmlFile = new File("birds.xml"); File xslFile = new File("birds.xsl"); try { Transformer transformer = trFactory.newTransformer(new StreamSource(xslFile)); transformer.transform(new StreamSource(xmlFile), new StreamResult(new File("result.out"))) } catch (Exception et) { System.out.print(String.valueOf(et)); } } } eof XSLT.java Nazir Faisal-LFN003.vcf
RE: Hi Ho - Problem with ServletOutputStream in Tomcat
You will probably find it's bytes 127dec that are getting mucked up. In the char/byte conversion the sign bit seems to do some funny stuff when converted. As a quick test create a binary file with low value ( 127 ) bytes and see if it transfers ok. You will need to make sure your reader is using ISO-8859-1 to fix the problem, or even better dont use character readers at all. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 1:39 PM To: [EMAIL PROTECTED] Subject: AW: Hi Ho - Problem with ServletOutputStream in Tomcat thx for your info i used write but my next problem is that the binary content gets somehow translated and isnt the same as before - for example gif images arent displayed correctly --- pdf are displayed wrong -- and so on ... well i dont have a clue why. greetings Wolfgang -Ursprüngliche Nachricht- Von: Samson, Lyndon [IT] [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 14. Februar 2001 14:32 An: '[EMAIL PROTECTED]' Betreff: RE: Hi Ho - Problem with ServletOutputStream in Tomcat This is true, I wrote a multipart/form-data parser and the only character set which preserved binary data was ISO-8859-1. Conversions between bytes and characters only work with this encType, your input and output should both use this if you use characters to store binary data. Output streams are supposed to output bytes, the print in the ServletOutputStream method converts a char to a byte array, you'd be better off using the write(byte[] b) method of the base OutputStream class. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 12:45 PM To: [EMAIL PROTECTED] Subject: Hi Ho - Problem with ServletOutputStream in Tomcat I ve created an Servlet that routes Requests and Responses to and from another Server. When i try to get a Image through this Servlet i get an Error 500. I coded the app as described in the j2ee docu for sending binary data. maybee a little code snipplet and the error trace helps to understand http://127.0.0.1:8080/maria/portal/zmr/javalogo52x88.gif this is the url -- http://127.0.0.1:8080 - is my Tomcat instance /maria/portal - is my proxy servlet /zmr/javalogo52x88.gif is the image i want to display in my browser - but /zmr is another webapplication on another tomcat server heres the code for the binary data receiving and sending to the client // Setting the Headers for the Client same as the Servlet received them from the other server while ((strHeaderKey = HttpUrlCon.getHeaderFieldKey(iCounter)) != null) { strHeaderValue = HttpUrlCon.getHeaderField(iCounter); LogIt("ResponseHeader - Value: " + strHeaderKey + " - " + strHeaderValue); response.setHeader(strHeaderKey,strHeaderValue); iCounter +=1; } // figuring out which type of data the servlet is getting if (HttpUrlCon.getContentType().equals("text/html")) { // Text or HTML - thats where i use the PrintWriter PrintWriter out = response.getWriter(); int iByte; while ((iByte = brInput.read()) != -1) { out.print((char) iByte); } } else { try { // Everything else assuming its binary data so i use ServletOutputStream ServletOutputStream out = ((ServletResponse)response).getOutputStream(); int iByte; while ((iByte = brInput.read()) != -1) { out.print((char) iByte); } } catch (IOException e) { this.log("IOException !!",e); } } heres the error trace i get when i try to process it - 2001-02-14 01:26:43 - path="/maria" :proxy: ResponseHeader - Value: Content-Type - image/gif 2001-02-14 01:26:43 - path="/maria" :proxy: ResponseHeader - Value: Content-Length - 1495 2001-02-14 01:26:43 - path="/maria" :proxy: ResponseHeader - Value: Last-Modified - Tue, 13 Feb 2001 10:07:22 GMT 2001-02-14 01:26:43 - path="/maria" :proxy: ResponseHeader - Value: Servlet-Engine - Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.) 2001-02-14 01:26:43 - path="/maria" :proxy: IOException !! - java.io.IOException: Not an ISO 8859_1 character:^ at org.apache.tomcat.core.BufferedServletOutputStream.print(BufferedServletOutp utStream.java:221) at javax.servlet.ServletOutputStream.print(ServletOutputStream.java:177) at at.gv.bmi.maria.proxy.ReturnData(proxy.java:201) at at.gv.bmi.maria.proxy.doGet(proxy.java:63) at javax.servlet.http.HttpServlet.service(Ht
RE: IllegalAccessError?
Is your Building class and constructor public? I know it sounds basic but its important to the servlet container. -Original Message- From: Matt White [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 14, 2001 5:02 PM To: [EMAIL PROTECTED] Subject: IllegalAccessError? This is most likely a newbie question, so please bear with me. I have a class of my own, ("Building") which is compiled and placed in my WEB-INF directory. Whenever I try to instantiate this class, I receive a IllegalAccessError error. According to the Java 1.2.2 API docs: "Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed." Which makes sense, but the JSP will die with just this: Building b = new Building(); When I go into the generated servlet, I can see that it dies on this same line every time. If I run it like this: Building b; b = new Building(); ... it will die on the second line. To see if there's a problem in my Building class I wrote a simple application which simply takes a dozen Building objects, tosses them into a LinkedList object, and then prints them out one at a time. It works great as an application, but this servlet is giving me fits. Am I doing something wrong? I'm at a loss. - Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Using a servlet superclass
Well no simple solutions will do exactly what you want. There is nothing special about the init method in java. It might be nice if the servlet container promised to walk up the class hierachy calling each init as it goes but thats not how it works. But you could; 1.Use the java debugging interface to detect when the method init is being called in you derived class and call the base class method. 2.Create your own Method object ( bytecode ) and replace the derived classes init method bytecode ( is this even possible? ) giving newinit = function() { call super.init call oldinit } oldinit = derived.init derived.init = newinit Okay, these are a bit tounge in cheek :-) Depends how much you don't want to call super.init() I guess... -Original Message- From: Jill Stephenson [mailto:[EMAIL PROTECTED]] Sent: Monday, February 12, 2001 1:52 AM To: '[EMAIL PROTECTED]' Subject: Using a servlet superclass I have a number of servlets in my application that need to perform common initialisation, etc. So I was thinking of creating a superclass that has an init method that does all of the common work, eg., public class SuperServlet extends HttpServlet { public void init() { // do common initialisation stuff in here } // init } // SuperServlet Then all the workers servlets would extend SuperServlet rather than HttpServlet, eg., public class WorkerServlet extends SuperServlet { ... } // WorkerServlet This seems to be OK, until I implement init in the WorkerServlet, as the init method in the SuperServlet does not then get invoked. While I can call super.init() in the WorkServlet, I want this to be handled automatically as I can bet on someone forgetting this step, eg., public class WorkerServlet extends SuperServlet { public void init() { // don't want to have to make this call == super.init(); } // init ... } // WorkerServlet Is there any way to implement this ? Jill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: *** Generated Tomcat Temporary Class File Name Seem Too Long... Yes ***
Hi Xavier I think its the total length of your path, not just the filename component. Perhaps you should chop out some intermediate directories. cheers -Original Message- From: Xavier [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 4:15 PM To: [EMAIL PROTECTED] Subject: *** Generated Tomcat Temporary Class File Name Seem Too Long... Yes *** Hi Everybody, Please Help Help Help... Yes, the class file names generated by Tomcat seem to be too long to be written on the disk. In fact I have got this error message: Context log: path="" Error in jsp service() : Unable to compile class for JSPerror: Can't write: D:\myCvs\ReefDebug22\work\localhost_8080\JSPpages\def\PBPublisherImpl\_0005f _0005f\Publisher\includes\_0002fJSPpages_0002fdef_0002fPBPublisherImpl_0002f _0002e_0002e_0002fPublisher_0002fincludes_0002fheader_0005fexception_0002ejs pheader_0005fexception_jsp_0.class 1 error Has somebody already seen this kind of behavior ? How can I change the way Tomcat generate the file name ? Any idea are welcome !!! Thanks a lot. Xavier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Where to set the JAVA_HOME?
You could of course set it first thing in your tomcat.[sh|bat] file... -Original Message- From: Jefferson Oliveira Andrade [mailto:[EMAIL PROTECTED]] Sent: Monday, February 12, 2001 6:14 PM To: '[EMAIL PROTECTED]' Subject: RE: Where to set the JAVA_HOME? You do not set it in tomcat. It is am environment variable. You must set it in you operating system. Jefferson. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, February 12, 2001 2:16 PM To: [EMAIL PROTECTED] Subject: Where to set the JAVA_HOME? Hi: Where do you set the JAVA HOME in tomcat? I looked all over the place for this including the .conf file? Thanks, Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: How do I redirect console messages to a log file?
If you are using *nix you could look up the system command tee, but if apache is using stderr it wont work. Its pretty easy to write a little C program ( someone prob. already has ) to do this. PS I knew a guy who used to work @ reef, Ross Dyson ring a bell? -Original Message- From: Erick Ramirez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 3:28 PM To: [EMAIL PROTECTED] Subject: How do I redirect console messages to a log file? I am running Tomcat 3.2.1 on top of Apache 1.3 in a NT Environment. I have tried modifying the Logger element in server.xml so that it reads: Logger name="tc_log" path="logs/tomcat.log" verbosityLevel = "DEBUG" / but it seems to only report "Context" messages, as well as exceptions. I have tried modifying wrapper.properties so that it reads: wrapper.stdout=$(wrapper.tomcat_home)\logs\stdout.log wrapper.stderr=$(wrapper.tomcat_home)\logs\stderr.log and once again, it only reports some of the messages to these files and most of the trace lines are still being reported to the console. I am using a trace() which by default, sends messages to System.out and I would like these lines to be piped into a log file. Can anyone help? Regards, ERICK RAMIREZ ControlServlet Team [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] REEF SA/NV Tour Gallieni II 36, ave du Gen de Gaulle 93006 Bagnolet FRANCE Tel +33 1 5582 9449 www.reef.com http://www.reef.com/ Business is Dynamic. Take Control. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: How do I redirect console messages to a log file?
To redirect stderr under NT use cmd stdout.log 2stderr.log ie startup.bat tomcat.log 2tomcaterr.log -Original Message- From: Erick Ramirez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 4:10 PM To: [EMAIL PROTECTED] Subject: RE: How do I redirect console messages to a log file? From a posting I've unearthed from jGuru.com, it stated that redirecting the messages is as simple as using the command: startup.sh output.log in Unix. As I have mentioned, I am running in a Win NT environment. I have tried the DOS of equivalent of piping the output by: \bin\startup tomcat.log but the trace() lines are still being sent to the console instead of the log file. What else is there that I could do? -Original Message- From: Samson, Lyndon [IT] [mailto:[EMAIL PROTECTED]] Sent: 24 January 2001 16:47 To: [EMAIL PROTECTED] Subject: RE: How do I redirect console messages to a log file? If you are using *nix you could look up the system command tee, but if apache is using stderr it wont work. Its pretty easy to write a little C program ( someone prob. already has ) to do this. PS I knew a guy who used to work @ reef, Ross Dyson ring a bell? -Original Message- From: Erick Ramirez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 3:28 PM To: [EMAIL PROTECTED] Subject: How do I redirect console messages to a log file? I am running Tomcat 3.2.1 on top of Apache 1.3 in a NT Environment. I have tried modifying the Logger element in server.xml so that it reads: Logger name="tc_log" path="logs/tomcat.log" verbosityLevel = "DEBUG" / but it seems to only report "Context" messages, as well as exceptions. I have tried modifying wrapper.properties so that it reads: wrapper.stdout=$(wrapper.tomcat_home)\logs\stdout.log wrapper.stderr=$(wrapper.tomcat_home)\logs\stderr.log and once again, it only reports some of the messages to these files and most of the trace lines are still being reported to the console. I am using a trace() which by default, sends messages to System.out and I would like these lines to be piped into a log file. Can anyone help? Regards, ERICK RAMIREZ ControlServlet Team [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] REEF SA/NV Tour Gallieni II 36, ave du Gen de Gaulle 93006 Bagnolet FRANCE Tel +33 1 5582 9449 www.reef.com http://www.reef.com/ Business is Dynamic. Take Control. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Unable to compile class for JSPerror: HELP!
Why don't you compile you code as a bean and just usebean it from your jsp pages? -Original Message- From: Bob Jones [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 1:37 PM To: [EMAIL PROTECTED] Subject: Unable to compile class for JSPerror: HELP! I am running tomcat stand alone on windows2000 with jdk1.3 Whenever I attempt to compile a jsp that instantiates a class of mine that has 3 levels of inheritance with some methods that are named the same I get a... org.apache.jasper.JasperException: Unable to compile class for JSPerror: An error has occurred in the compiler; Please visit the URL http://www.ibm.com/java/jdk/support for information on investigating/reporting this problem. In the browser and a sun.tools.java.CompilerError: duplicate addition in the console I have researched the java error on the sun site and they say it was a problem with the javac compiler on 1.2.2 and it is fixed on 1.3 I can compile the source that tomcat creates from a command line with no problem And just to confirm that I was really using that jdk install I renamed the tools.jar once and got an error in the browser saying it couldn't find those classes So it appears that this problem only occurs when tomcat tries to compile the jsp even though the jdk compiler doesn't have any issues.. To add another twist I am using the Tomcat environment in VisualAge and it has been going great. Tomcat is a good fit for our app dev and hosting shop in a lot of ways so I REALLY want to figure this one out Thanks in advance. Bob Jones [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
xml.jar
Tomcat use this ( its in the system Classpath created by tomcat.bat ) I need to install another XML parser for my servlet ( WEB-INF/libs ) however the classes in the system classpath seem to be loaded first, screwing up my installed parser. Is there anything I can do about this, ideally I'd like the xml.jar removed from the Class Loader searches for my servlet. thx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Running Tomcat as non-root user
You could use EJB's or a mobile agent framework? -Original Message- From: CPC Livelink Admin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 5:35 PM To: [EMAIL PROTECTED] Subject: RE: Running Tomcat as non-root user You may be able to write yourself some native code to do the switcheroo for you. Then use the java calls to the native call. The code to do the user switch is readily available (though I have not searched for it now, I have seen it before, and it is also available from apache subject to the ASL) This, of course, makes you relatively platform specific. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Geoff Lane Sent: Tuesday, January 16, 2001 12:29 PM To: [EMAIL PROTECTED] Subject: Re: Running Tomcat as non-root user Kitching - Thanks for the response. I was afraid of that. 'ifconfig' is the utility that lets you see information about the network interfaces, not a firewall. :) Do you run multiple machines with a firewall in front of them to do the redirection (w/ load balancing for example) or do you run the firewall on each machine individually? I asked our operations people about the same thing being done in our load balancer (F5/BigIP) - but apparently it can't be done there. Setting up a redirect on each machine could be a pain - not that I'd have to do it. :) Thanks again. Kitching Simon wrote: Hi Geoff, As far as I know (and I did a fair bit of research on this topic), there is no way for any java app to start as one user, then switch to running as another user. What I do is run tomcat on port 8080 as non-root, and use a firewall product to redirect port 80 - 8080. This works fine. I can't give you great details, as the firewall stuff was set up by a sysadmin (which I am not), but we use Solaris and I think the firewall is "ifconfig". I guess that linux' ipchains or ipfilter or whatever can do the same job. Regards, Simon -Original Message- From: Geoff Lane [SMTP:[EMAIL PROTECTED]] Sent: Monday, January 15, 2001 11:46 PM To: [EMAIL PROTECTED] Subject: Running Tomcat as non-root user In the Tomcat UG under the heading 'Modify and Customize the Batch Files' it says one of the reasons to do so (modify start up scripts) would be: "To switch user from root to some other user using the "su" UNIX command." This is an excellent idea from a security standpoint. But to bind to port 80 (instead of the default high port 8080) root is needed. How many applications do this (Apache for example) is to initially run as root, bind to port 80, and then drop root privileges. Is something like this possible with Tomcat running standalone? Running concurrently with Apache would accomplish this because the AJP connection could be run as any user since it's on a high port. Thanks. -- Geoff Lane [EMAIL PROTECTED] (650) 969-5000 x104 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Clarification
Hi All I'm asking this even though I'm pretty sure of the answer and I'm sure its come up before. Short version is, what is the class path search order of WEB-INF/lib ? If it containts a.jar and b.jar and they both contain class C, which class C is instantiated by a servlet? I think its implementation defined. cheers lyndon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Clarification
Sorry I should have been clearer. My example meant the default package, and the question was in relation to what would happen if classes/packages were the same. ie WEB-INF/lib/a.jar contains; org.apache.C WEB-INF/lib/b.jar contains; org.apache.C Which C is loaded? thx lcs -Original Message- From: Wang, Jianming [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 3:20 PM To: '[EMAIL PROTECTED]' Subject: RE: Clarification In order to use class C, you have to import the package which the class C belongs to. So the order of the import determines which class C is used. -Original Message- From: Samson, Lyndon [IT] [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 9:58 AM To: '[EMAIL PROTECTED]' Subject: Clarification Hi All I'm asking this even though I'm pretty sure of the answer and I'm sure its come up before. Short version is, what is the class path search order of WEB-INF/lib ? If it containts a.jar and b.jar and they both contain class C, which class C is instantiated by a servlet? I think its implementation defined. cheers lyndon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: New User help required
Just as a matter of interest, you don't actually need apache to serve out http requests. tomcat can do that on its own. Only if you req the features of apache ( performance/config etc ) should you use it. If your primary interest is servlets/JSP/taglibs etc just use tomcat on its own. lcs -Original Message- From: Jason Norton [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 4:25 PM To: [EMAIL PROTECTED] Subject: New User help required Hi,=20 I have just started to use Apache and would like to get Tomcat operational = and I am having some minor problems. I have both tomcat and apache up and = running and servicing pages as individuals (http://localhost and = http://localhost:8080), but am having some problem getting them to run = together. My set up is SuSE Linux 7.0 Apache 1.3.12 Tomcat 3.2.1 JDK1.3 mod_jk.so (my own compile) Please could someone post for me (or email me) the contents or an example = of there httpd.conf file and any other key .conf you feel I may be making = errors in. This is so that I can see how the tomcat (mod_jk.so) intergrates= itself as this seems to be my big stumbling block and dont fully = understand the available documentation. many thanks in advance Jason Norton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]