Re: Error 500 need help

2002-08-09 Thread Carlos Ferreira


it looks like you have an xml parser conflict ( tomcat's xerces and the
jdk's xml parser ).

either download tomcat4-LE-jdk14 or reorder your xml parser's jar files in
your classpath ( ie put xml-apis.jar, xercesImpl.jar first in your
CLASSPATH). check xerces' documentation for further info.


good look

 ***i'm getting an error i can't solve.
 during the build process i get a message that states this:
 [javadoc]
 /Jakarta/jakarta-tomcat-4.0.4-src/jasper/src/share/org/apache/jasper/compile
 r/SunJavaCompiler.java:65:package sun.tools.javac does not exist
 import sun.tools.javac.Main;
  ^
 the build is successful but the jsp examples generate the error below

 any one have a solution??  i'm using j2sdk1.4.0_01 on read hat linux
 7.2. i'm assuming that i get this error because of the message above.


 Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error
 type Exception report
 message Internal Server Error
 description The server encountered an internal error (Internal Server
 Error) that prevented it from fulfilling this request.
 Exception
 javax.servlet.ServletException: Servlet.init() for servlet jsp threw
 exception
   at
 org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:94
 6)
   at
 org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
 va:214)
   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:190)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
 66)
   at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
 .java:475)
   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:2347)
   at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
 )
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
 66)
   at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
 java:170)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
 64)
   at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
 )
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
 64)
   at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
   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
 :174)
   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:
 1027)
   at
 org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
 )
   at java.lang.Thread.run(Thread.java:536)
 root cause
 java.lang.NoClassDefFoundError: org/w3c/dom/ranges/DocumentRange
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:130)
   at
 org.apache.xerces.parsers.AbstractDOMParser.setDocumentClassName(AbstractDOM
 Parser.java:347)
   at
 org.apache.xerces.parsers.AbstractDOMParser.reset(AbstractDOMParser.java:417
 )
   at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:151)
   at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:253)
   at
 org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:20
 1)
   at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86) at
 org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:201)
   at
 org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCa
 che.java:165)
   at
 org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:138)
   

Re: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache 2.0.35

2002-06-18 Thread Carlos Ferreira

because the Tomcat-Apache Service listens on port 8008 ( see your 
server.xml, at the end )


best regards

carlos ferreira



Jeffrey Bonevich wrote:

 Why would I do that when Tomcat is listening on 8080?

 Actually did a little more research and there is already a bug 
 registered that covers this issue.

 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4042

 Looks as though there has been no action on this one for a while, and 
 now it is very pertinent as the Port directive no longer exists for 
 Apache 2.

 jeff

 Jay Gardner wrote:

 Try localhost:8008 instead

 --Jay Gardner

 -Original Message-
 From: Jeffrey Bonevich [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 18, 2002 5:57 PM
 To: [EMAIL PROTECTED]
 Subject: Configuration problems: mod_webapp with Tomcat 4.0.3 and Apache
 2.0.35

 Ok, on to the next set of issues!  Finally got mod_webapp compiled
 properly and installed in Apache 2 (configtest returns Syntax Ok).  Then
 I add the VirtualHost section:

 NameVirtualHost 65.186.165.33
 VirtualHost 65.186.165.33
  ServerName tomcat.bonevich.com
  DocumentRoot /usr/local/tomcat/webapps/
  WebAppConnection warpConnection warp localhost:8080
  WebAppDeploy examples warpConnection /examples
 /VirtualHost

 ...and when I do another configtest I get errors:
 [root@strider apache2]# bin/apachectl configtest
 Syntax error on line 995 of /usr/local/apache2/conf/httpd.conf:
 Invalid port number (p1) No Port statement found

 Line 995 is the WebAppDeploy directive.  Is this mod_webapp looking for
 the (now depracated) Port statement in the main body of the config?  If
 so, time to update code.  If not, what am I missing?  (As a side note,
 tried the VirtualHost directives with 127.0.0.1, with :80 appended, and
 with just *; same error each time.)

 jeff


 -- 
 Jeffrey Bonevich
 Ann Arbor, Michigan
 [EMAIL PROTECTED]
 http://www.bonevich.com

 Hwæt! Wë Gär-Dena   in geär-dagum,
 peod-cyninga,   prym gefrünon,
 hü ða aepelingas   ellen fremedon!


 -- 
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]








--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: New Apache 2.0 / Tomcat 4.0.3 Windows Setup Guide

2002-06-05 Thread Carlos Ferreira


mod_jk also works on linux ( RedHat 7.0 and 7.2 with Apache 2.0.36 /
Tomcat 4.0.3 ). downloaded jakarta-tomcat-connectors-4.0.4-b2-src or later
and followed the docs.


Carlos Ferreira
Gilem Informatique

 aha that explains why I could not get mod_jk to work!

 On Tue, 4 Jun 2002 14:28, you wrote:
 Yes, mod_jk and mod_webapp serve the same purpose. At the moment,
 however, the only connector that works with Apache 2.x on Windows is
 mod_jk, and the only connector that works in Apache 2.x on Linux is
 mod_webapp. Strange state of affairs. :-P

 As for Apache/Tomcat versus Tomcat standalone, yes -- the
 configurability, flexibility, expandability, scaleability, and security
 of Apache are the main reasons to stick with Apache as your primary
 server. When it comes down to it, Tomcat is still just a REFERENCE
 IMPLEMENTATION of the Java Servlets/JSP specification.

 ___

 Kevin Yank
 Technical Content Director
 SitePoint.com - Master the Web!

 e: [EMAIL PROTECTED]
 w: www.sitepoint.com
 ___

  -Original Message-
  From: Martin Shears [mailto:[EMAIL PROTECTED]]
  Sent: June 4, 2002 12:51 AM
  To: Tomcat Users List
  Subject: Re: New Apache 2.0 / Tomcat 4.0.3 Windows Setup Guide
 
 
  Looking forward to the linux version! I need to set them up
  on RedHat 7.2/7.3
 
  Setting up Apache 2.0/Tomcat 4.0.3 has been one of those low
  priority tasks I
  have at work for a new project.  I guess the interesting part
  for me has been
  mod_jk, mod_jk2, mod_webapp etc ie joining to Tomcat.
  Getting the right
  versions, compiling the source .. documenting it for the next person.
 
  Do mod_jk and mod_webapp serve the same purpose?
 
  Someone asked my why do I need Apache, why not use Tomcat
  alone.  I am
  familiar with the security and configuration of Apache, need
  to use SSL,
  mixed context of html, perl, servlets and jsp.  That is as
  good as my answer
  gets.  I wonder if anyone would suggest Tomcat standalone who
  has been there
  done that.
 
  They sure did not teach this stuff at university :)
 
  Cheers
 
  Martin
 
  On Tue, 4 Jun 2002 13:49, you wrote:
   I've just published my updated setup guide for Apache 2.0
  and Tomcat  4.0.3 on Windows. Interested parties may find it here:

  http://sitepoint.com/article.php/305

  It covers everything from obtaining and installing a working version
  of
 mod_jk to setting up Tomcat as a Windows service without using any 3rd
 party software.

  I also plan to publish a Linux version of this setup guide within a
 week.

  Feedback is welcome!

  -Kevin Yank
   Technical Content Director, SitePoint.com

 --
 Martin Shears BS(MathsCompSci)| Email: [EMAIL PROTECTED]
 Chariot NetConnect | Web:   http://www.chariot.net.au/
 Technical Services Group   | Phone  (+61):   08 8359 2955
 6/63 Pirie St ADELAIDE S.Aust  | Fax(+61):   08 8359 3413

 You are reminded that this e-mail and its attachments are subject to
 Chariot Internet Limited's legal disclaimer located at
 http://www.chariot.net.au/disclaimer.htm. You are encouraged to read it
 carefully to be aware of risks involved in electronic
 communication.

 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED] For additional
 commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: ??? Using JSPs to Send Not-Modified-Since Header ???

2002-06-04 Thread Carlos Ferreira


a not so good solution would be to subclass
org.apache.jasper.runtime.HttpJspBase ( or redesign it ) with your
required behaviour and extend your jsp pages from this new class.
the problem is that HttpJspBase is tomcat specific. perhaps somebody has a
better idea.

Carlos Ferreira
Gilem Informatique

 Hi all,

 In looking at past posts, I'm afraid I know the horrible answer
 to this issue but I thought I'd ask just in case I missed
 anything.

 Let me start by saying I'm using Tomcat v4.0.4 beta 3.

 As you know, when a client (usually a web browser) has a cached
 version of a resource (usually a web page) it can send an
 If-Modified-Since header to the HTTP server. The server
 compares the time/date stamp specified in the header with that of
 the requested resource. If the resource has *not* been modified
 since the time specified in the If-Modified-Since header, the
 server sends back a 304 (Not-Modified) response, effectively
 telling the client (usually a web browser) that its cached
 version of the resource is still valid.

 When writing a servlet, it's easy to handle this sort of
 scenario. The javax.servlet.http.HttpServlet class has a
 service() method. This method first checks if the incoming HTTP
 method is a GET. If it is, the service() method proceeds to
 call the getLastModified() method of the servlet. As a
 developer, you can override getLastModified() to return a long
 value representing the last time the requested resource was
 changed. Depending on the value returned by getLastModified()
 (note that -1 is returned if you don't override the method) the
 service() method may simply return a 304, Not-Modified response
 rather than calling the servlet's doGet() method.

 Now, the $18.32 Question: How do you ensure getLastModified()
 is called in JSP?

 No, you cannot simply do this:

 %!
   public long getLastModified() {
  return xxx;
   }
 %

 The problem is that the above method will never be called by the
 container.

 I traced through some of the Tomcat/Catalina/Jasper code and it
 seems to me that the response code is being set to 200/OK very
 early on in the processing.

 I also took a cursory look at the JSP spec and didn't find any
 indication of setting a Not-Modified response code...so, I am
 thinking this is something that is (strangely) missing in the JSP
 specification. I have a JSP page that needs to update itself once
 per day. Therefore, it would be very handy to have the
 getLastModified() functionality enjoyed by servlet writers.

 Can anyone confirm this?

 Thanks...


 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED] For additional
 commands, e-mail: mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Problems getting webapp module to work with apache 1.3 on windows

2001-12-16 Thread Carlos Ferreira

there's an error in your server.xml:

Context path=site docBase=/ debug=0/

should be:

Context path=site docBase=site_dir_located_under_webapps debug=0/



- Original Message -
From: Pritpal Dhaliwal [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, September 14, 2001 6:49 AM
Subject: Problems getting webapp module to work with apache 1.3 on windows


 Hi,

 My environment is:
 Win2k advanced server
 apache 1.3.20
 tomcat 4.0.1
 webapp module

 I am trying to do the following:

 In httpd.conf:
 WebAppConnection conn  warp  localhost:8008
 VirtualHost IP
 ServerName myhost
 ..
 WebAppDeploy site  conn  /
 ..

 /VirtualHost

 In server.xml I have:

 blah ..


  !-- Define the default virtual host --
   Host name=myhost debug=1
appBase=C:/www/desiest.bachansoft.com
 unpackWARs=true
 !-- I just want a root web app right now --
   Context path=site docBase=/ debug=0/
   /Host

 blah ..


 My log file says apache_log in tomcat logs
 ( size: 54MB, yes 54 MB in less than a minute):
 2001-12-15 13:10:48
 [org.apache.catalina.connector.warp.WarpConfigurationHandler] Cannot find
 C:\Programs\Tomcat4.0\webapps\site for appl. site host
 desiest.bachansoft.com
 #this line was repeated few thousand times
 2001-12-15 13:10:48
 [org.apache.catalina.connector.warp.WarpConfigurationHandler] Error
 deploying web application site under http://myhost:80/

 my web.xml is:
 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
 error-page
 error-code404/error-code
 location/index.jsp/location
 /error-page
 /web-app


 What am i doing wrong here?

 any help will be appreciated.

 Regards,
 Pritpal Dhaliwal





 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: [Tomcat Documentation Redactors To Hire] - WAS: TOMCAT SUCKS

2001-06-29 Thread Carlos Ferreira

i could help with translations: french, german, portuguese


- Original Message - 
From: GOMEZ Henri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, June 29, 2001 9:41 AM
Subject: [Tomcat Documentation Redactors To Hire] - WAS: TOMCAT SUCKS 


  Not to get into a great big argument over OS version commercial
 products, but if OS projects expect to be taken with the same 
 consideration
 as commercial they have to accept to be compared across the board. This
 includes documentation. You can't just pick and choose the 
 battles you want
 to fight. 
 
 Could we close this thread positively ?
 
 We all know that tomcat documentation is incomplete and we need help 
 in that area.
 
 Tomcat IS AN OPENSOURCE project with a big user community,
 Jon Stevens recently reported more than 50-100k downloads / month.
 
 Everybody could be involved in the project, and not necessary 
 developpers. I'm sure there is around potentials documentation 
 redactors.
 
 So who will be interested in working on the Tomcat Documentation ?
 
 --
 
 
 For the most part, the documentation in OS projects 
 just plain
 sucks, if it even exists. Believe it or not this is one of the 
 reasons OS is
 often frowned upon. Look at Microsoft, sure its close source, 
 people may
 think it sucks, blah blah blah, but do you have idea how much 
 information is
 on MSDN?
  The lack of documentation available goes against some very basic
 rules of Software Engineering. In the real world does this 
 really matter? I
 dunno, but often times packaging and presentation, and a 
 finished looka nd
 feel are the key to getting in the door and this is where most 
 OS projects
 fail miserably.
  Because its free might be the reason the documentation sucks, it
 shouldn't be a justification. (not that i'm saying tomcat sucks, just
 argueing the point).
 




url redirection and tomcat

2001-06-18 Thread Carlos Ferreira



hi all,


i'm looking for information on url redirection and 
it's effects on tomcat:

i'm using Apache 1.3.20 / PHP 4.0.5 / Tomcat 3.2.1 
on WinMe

what i want to do is to split an url like http://www.myhost.com/product/XXX/.jsp 
be split up into http://www.myhost.com/product/.jsp; 
 being transmitted as an argument.

The rewrite rules i've used in apache are as 
follows:

RewriteEngine on
RewriteRule^/product/([^/]+)/(.*) 
/product/$2?param1=$1 [QSA]RewriteRule ^(.+) - 
[PT]
Alias /product 
"c:/Apache/tomcat/webapps/product"
In Tomcat's server.xml i've added:

 
Context path="/product" 
 
docBase="webapps/product" 
 
crossContext="false" 
debug="0" 
 
reloadable="true"   
/Context
When i try to call the page http://www.myhost.com/product/XXX/.jsp 
Tomcat says there is an error: can't find page /product/XXX/.jsp ( seems 
doesn't Apache doesn't request the correct/rewirten page name or Tomcat doesn't 
correctly understand the request... :( ; i've tried to call the page 
/product/.jsp without the rewriting rules which works fine; i've also used 
PHP pages with the rewriting rule which worked. Only have problems with servlets 
and jsp pages.

If you have any ideas... Are there any replacements 
for SimpleMapper1???


thxs in adavance for your help


Regards


Carlos Ferreira

ps sorry for the bad english :(