Unable to compile JSP

2002-10-13 Thread Shanniew

I have already set the JAVA_HOME, CATALINA_HOME.
 \webapps\myjsp\WEB_INF\classes
 \webapps\myjsp\WEB_INF\lib (the dir where I put the .jar by third
party)

However I faced this problem:

HTTP Status 500 -


type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP


Do I need to change the ..\Tomcat\bin\setclasspath.bin to include
\webapps\myjsp\WEB_INF\classes or \webapps\myjsp\WEB_INF\lib.

Am really confused.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




mime-types

2002-10-13 Thread Günter Kukies

Hi,

I want tomcat to serve Exel(.xsl) and Snapshot (snp) files. I added the following 
mime-mapping to the global web.xml in .../conf/web.xml.
But no Application is starting automaticaly at the client site. It seams that the 
mime-type is text/plain. 

If the same files where served from an Apache HTTP-Server everything works fine. 
 

snp
application/octet-stream
  
 
xls
application/vnd.ms-excel




Thanks 
Günter Kukies



Re: tomcat 4.1.12 with apache

2002-10-13 Thread Sven Köhler

> mod_jk is available for use with Tomcat 4.x.  In fact, many subscribers to
> this list are using that very configuration.
> 
> There are many HOW-TO's listed about how to integrate Apache and Tomcat
> 3.x/4.x using mod_jk.  A quick browse through the archives of this list
> archive will provide proof of this.
> 
> mod_webapp is no longer current and should not be used.  Again, reading the
> list archive will prove this as well.

i found mod_jk2 v2.0.1 but i get confused when reading the docs.
the docs talk about mod_jk and mod_jk2 - are these just 2 names for the 
same module?

the docs:
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.1/doc/




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: xml parser in 4.0.6 and 4.1.12

2002-10-13 Thread Jacob Kjome


Do you include XML or DOM libraries in your WEB-INF/lib directory?  Remove 
those if you have them there.  XML and DOM libraries *must* be loaded from 
a parent classloader.  Tomcat should be ignoring the ones in WEB-INF/lib, 
but maybe it isn't fully and you are getting collisions.

Jake

At 05:10 AM 10/14/2002 +, you wrote:

>Hi all,
>
>I am trying to migrate one application from weblogic to tomcat.
>I was able to get it work in  tomcat 4.0.6 but it fails in tomcat
>4.1.12. The problem seems to lie in the xml parser. the jar files
>in the "jakarta-tomcat-4.1.12/common/endorsed" seems not compatible
>with the old ones. since the application is a binary only commercial
>product, I won't be able to make changes. Is there a workaround, or
>am I stuck with tomcat 4.0.x?
>
>java.lang.VerifyError: (class: com/xxx/dom/stubs/ApacheXMLStub, method:
>getXMLDocumentFromURL signature: (Ljava/lang/String;)Lorg/w3c/dom/Document;)
>Incompatible object argument for function call
>at java.lang.Class.forName0(Native Method)
>at java.lang.Class.forName(Class.java:140)
>...
>
>Thanks!
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 



Passing User/Pass via API

2002-10-13 Thread Johann Uhrmann

Hi,

is there an API function available to pass
user name and password from a servlet/JSP to
tomcat?

I found nothing about it and I guess it would
be useful to allow servlets to pass this kind
of information to the servlet container.

Thank You,

Hans




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: java.lang.ArrayIndexOutOfBoundsException

2002-10-13 Thread Bill Barker

This should now be fixed in the next nightly (available shortly after 8am
GMT).  It will also appear in the 3.3.2 release.

Since you are using it behind Apache, as a work-around, you should also be
able to set:
  JkOptions ForwardURICompat
in your httpd.conf file, in which case Apache will do the normalizations
before handing the request off to Tomcat.

"Alex Johansson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> Sometime I'v got this error when accessing
> jsp files
>
> I user apache (+ mod_jk), tomcat 3.3.
>
> Seems to be a tomcat error.
>
> Do you know if this error occures during heavy load on
> tomcat?
>
>
>
> Error: 500
> Location: /../error.jsp
> Internal Servlet Error:
> java.lang.ArrayIndexOutOfBoundsException: -1
> at
>
org.apache.tomcat.modules.mappers.DecodeInterceptor.normalize(DecodeIntercep
> tor.java:371)
> at
>
org.apache.tomcat.modules.mappers.DecodeInterceptor.normalizePath(DecodeInte
> rceptor.java:175)
> at
>
org.apache.tomcat.modules.mappers.DecodeInterceptor.postReadRequest(DecodeIn
> terceptor.java:446)
> at
>
org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:939
> )
> at
>
org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherIm
> pl.java:259)
> at
>
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
> .java:174)
> at
>
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:423)
> at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:448)
> at main_1._jspService(main_1.java:132)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
> at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
> at org.apache.tomcat.core.Handler.service(Handler.java:235)
> at
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91
> 7)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
> at
>
org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Int
> erceptor.java:341)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:516)
> at java.lang.Thread.run(Thread.java:484)
>
>
> Any clue to solve this problem
>
> regards
> _
> > Alex Johansson
> > Systemutvecklare @ TechLex
> > 0708 - 29 26 01
> > [EMAIL PROTECTED]





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: zip or exe, for windows install

2002-10-13 Thread Ben Walding

The exe installs a Win32 service and a couple of start menu items

Frank Liu wrote:

>What's the difference between the ZIP and EXE binary tomcat
>distribution for MS Windows? Can you just unzip it into a directory
>and config it as on Unix box? or do I have to use EXE installer
>for some extra stuff/work?
>
>Thanks!
>Frank
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>  
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




zip or exe, for windows install

2002-10-13 Thread Frank Liu


What's the difference between the ZIP and EXE binary tomcat
distribution for MS Windows? Can you just unzip it into a directory
and config it as on Unix box? or do I have to use EXE installer
for some extra stuff/work?

Thanks!
Frank


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




xml parser in 4.0.6 and 4.1.12

2002-10-13 Thread Frank Liu


Hi all,

I am trying to migrate one application from weblogic to tomcat.
I was able to get it work in  tomcat 4.0.6 but it fails in tomcat
4.1.12. The problem seems to lie in the xml parser. the jar files
in the "jakarta-tomcat-4.1.12/common/endorsed" seems not compatible
with the old ones. since the application is a binary only commercial
product, I won't be able to make changes. Is there a workaround, or
am I stuck with tomcat 4.0.x?

java.lang.VerifyError: (class: com/xxx/dom/stubs/ApacheXMLStub, method:
getXMLDocumentFromURL signature: (Ljava/lang/String;)Lorg/w3c/dom/Document;)
Incompatible object argument for function call
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
...

Thanks!



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: servlet with mod_jk

2002-10-13 Thread sonam singh

use http://IP/jkw/servlet/FlashMenu
regards
Sonam Singh

--- John Walstra <[EMAIL PROTECTED]> wrote:
> I've just written my first servlet. I have no
> problems access it through 
> Tomcat via port 8080, but can't via Apache and
> mod_jk. I have no problems 
> with JSPs, but receive a 404 error when i try to
> access the servlet through 
> Apache. I'm using Tomcat 4.1.12 and Apache 2.0.42,
> if that is needed.
> 
> The error message:
> 
> HTTP Status 404 - /servlet/FlashMenu
> 
> From my Apache http.conf ( inside Virutal Host ):
> 
> JkMount /*.jsp jkw
> JkMount /servlet/* jkw
> 
> From my web.xml:
> 
> 
> 
>   
> FlashMenuServlet
> FlashMenuServlet
>   
>   
> FlashMenuServlet
> /servlet/FlashMenu
>   
> 
> What am I missing in my config or what should I look
> for?
> 
> -- 
> John Walstra
> [EMAIL PROTECTED]
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: tomcat 4.1.12 with apache

2002-10-13 Thread Michael Schulz


mod_jk is available for use with Tomcat 4.x.  In fact, many subscribers to
this list are using that very configuration.

There are many HOW-TO's listed about how to integrate Apache and Tomcat
3.x/4.x using mod_jk.  A quick browse through the archives of this list
archive will provide proof of this.

mod_webapp is no longer current and should not be used.  Again, reading the
list archive will prove this as well.

-Mike

-Original Message-
From: Dionisio Ruiz de Zarate [mailto:[EMAIL PROTECTED]]
Sent: Sunday, October 13, 2002 5:32 PM
To: Tomcat Users List
Subject: Re: tomcat 4.1.12 with apache


the best for tomcat 4.1.12 is the mod_webapps
- Original Message -
From: "Sven Köhler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 13, 2002 11:00 PM
Subject: tomcat 4.1.12 with apache


> hi,
>
> i want my apache to use tomcat to serve JSP-pages and Servlets.
> I googled and found mod_jserv, mod_jk and mod_webapp.
>
> I couldn't find out, which one to use with tomcat 4.0 because:
>mod_jserv is bad compared to mod_jk
>mod_jk is only bundled with tomcat 3.0
>
> What does that mean?
> Am i supposed to use mod_jk?
>
> mod_webapp was mentioned on some pages, but i didn't find any source or
> binary releases.
>
> Where's the page in the tomcat 4.x docs, that mentions hot to use tomcat
> with apache?
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Logging Error: Unknown error writing event

2002-10-13 Thread Niket Anand

Hello,
I have successfully integrated Apache2.0.4(WIN32) with
JBoss-2.4.7_Tomcat-4.0.4 with the help of mod_jk2.dll.
While running the Jboss server with catalina it is running properly but
showing some error in console mentioned at the end.
I think CoyoteRequest class is not able to assign Request object and giving
NullPointerException
I have put


  


in Catalina_Home/conf/server.xml and JBoss_Home/conf/catalina/jboss.jcml

Please help me as I have to track this error out asap.

[17:29:56,609,STDERR] Logging Error: Unknown error writing event.
[17:29:56,609,STDERR] java.lang.NullPointerException
[17:29:56,609,STDERR]  at
org.apache.coyote.tomcat4.CoyoteRequestFacade.getRequestURI(CoyoteRequestFac
ade.java:350)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at
org.apache.cocoon.environment.http.HttpRequest.getRequestURI(HttpRequest.jav
a:144)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at
org.apache.cocoon.util.log.CocoonLogFormatter.getURI(CocoonLogFormatter.java
:155)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at
org.apache.cocoon.util.log.CocoonLogFormatter.formatPatternRun(CocoonLogForm
atter.java:102)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at
org.apache.cocoon.util.log.ExtensiblePatternFormatter.format(ExtensiblePatte
rnFormatter.java:334)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at
org.apache.log.output.AbstractOutputTarget.format(AbstractOutputTarget.java:
133)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at
org.apache.log.output.AbstractOutputTarget.doProcessEvent(AbstractOutputTarg
et.java:92)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at
org.apache.log.output.AbstractTarget.processEvent(AbstractTarget.java:70)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at org.apache.log.Logger.output(Logger.java:559)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at org.apache.log.Logger.output(Logger.java:538)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at org.apache.log.Logger.debug(Logger.java:110)
[17:29:56,609,STDERR]
[17:29:56,609,STDERR]  at
org.apache.cocoon.servlet.CocoonServlet.getEnvironment(CocoonServlet.java:75
7)
[17:29:56,625,STDERR]
[17:29:56,625,STDERR]  at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:633)
[17:29:56,625,STDERR]
[17:29:56,625,STDERR]  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[17:29:56,625,STDERR]
[17:29:56,625,STDERR]  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
[17:29:56,625,STDERR]
[17:29:56,625,STDERR]  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
[17:29:56,625,STDERR]
[17:29:56,625,STDERR]  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)

Thanks
Niket





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




how to build jk 2.2.0.1 for Tomcat 4.1.2 and apche 2

2002-10-13 Thread yoom nguyen

Does any one able to build jk 2.2.0.1 for tomcat 4.1.2 & apache 2 on
linux?  If yes, please give me some advice on how to build it on linux.


Is Tomcat 4.1.2 already come with jk 2 build?
 I found a few file such as $CATALINE_HOME/bin/tomcat-jni.jar
$CATALINA_HOME/conf/jk2.properties
$CATALINA_HOME/server/lib/tomcat-jk2.jar
However, I can not find the mod_jk2.so

I also get this error when I try to build jk2

prepare:
[mkdir] Created dir: /db2/tomcat/jk2201/jk/build/classes
[mkdir] Created dir: /db2/tomcat/jk2201/jk/build/classes/META-INF
[mkdir] Created dir: /db2/tomcat/jk2201/jk/build/lib

BUILD FAILED
file:/db2/tomcat/jk2201/jk/build.xml:110: Warning: Could not find file
/db2/tomcat/jk2201/coyote/build/lib/tomcat-coyote.jar to copy.


Thanks, ynguyen



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: RE: HELP How to build JK2.2.0.1 on linux

2002-10-13 Thread yoom nguyen

This is what I got back.  

[tomcat@dev1 jk]$ ant jkant
Buildfile: build.xml

jkant:

BUILD FAILED
file:/db2/tomcat/jk2201/jk/build.xml:228: 
srcdir "/db2/tomcat/jk2201/jk/jkant/java" does not exist

Total time: 6 seconds


- Original Message -
From: "Ignacio J. Ortega" <[EMAIL PROTECTED]>
Date: Saturday, October 12, 2002 8:16 pm
Subject: RE: HELP How to build JK2.2.0.1 on linux

> > From: yoom nguyen [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, October 12, 2002 9:16 PM
> 
> > 
> > ***
> > If I run ant under /distribution-from-apaches/jk/native2 
> > directory I got
> > these errors
> > 
> > 1.
> > [taskdef] Could not load definitions from resource META-IN> It coul
> > d not be found.
> > 
> > BUILD FAILED
> > file:/db2/tomcat/jk2201/jk/native2/build.xml:276: Could not 
> > create task
> > or type 
> > of type: so.
> > 
> > 
> 
> 
> You need frist to compile the needed task classes for ant, to do 
> it go
> jk dir and issue ant jkant
> 
> 
> Saludos, 
> Ignacio J. Ortega 
> 
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>For additional commands, e-mail: 
> 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tomcat 4.1.12 with apache

2002-10-13 Thread Dionisio Ruiz de Zarate

the best for tomcat 4.1.12 is the mod_webapps
- Original Message -
From: "Sven Köhler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 13, 2002 11:00 PM
Subject: tomcat 4.1.12 with apache


> hi,
>
> i want my apache to use tomcat to serve JSP-pages and Servlets.
> I googled and found mod_jserv, mod_jk and mod_webapp.
>
> I couldn't find out, which one to use with tomcat 4.0 because:
>mod_jserv is bad compared to mod_jk
>mod_jk is only bundled with tomcat 3.0
>
> What does that mean?
> Am i supposed to use mod_jk?
>
> mod_webapp was mentioned on some pages, but i didn't find any source or
> binary releases.
>
> Where's the page in the tomcat 4.x docs, that mentions hot to use tomcat
> with apache?
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




tomcat 4.1.12 with apache

2002-10-13 Thread Sven Köhler

hi,

i want my apache to use tomcat to serve JSP-pages and Servlets.
I googled and found mod_jserv, mod_jk and mod_webapp.

I couldn't find out, which one to use with tomcat 4.0 because:
   mod_jserv is bad compared to mod_jk
   mod_jk is only bundled with tomcat 3.0

What does that mean?
Am i supposed to use mod_jk?

mod_webapp was mentioned on some pages, but i didn't find any source or 
binary releases.

Where's the page in the tomcat 4.x docs, that mentions hot to use tomcat 
with apache?




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Unspecified NoClassDefFoundError

2002-10-13 Thread Padhu Vinirs


Just curious, why is a servlet calling paintComponent ? Is there any 
accompanying exception ?

-- padhu



Ben Monnahan wrote:

>Hi all,
>
>  I am getting NoClassDefFoundError in my servlet, but it doesn't tell me
>which one it couldn't find.  I'm guessing its a problem with
>GraphicsEnvironment.getLocalGraphicsEnvironment().  I tried a search on
>google, but it didn't turn up anything.  Does anyone know what might be
>wrong?  Here is a stack trace:
>
>java.lang.NoClassDefFoundError
>   at java.lang.Class.forName0(Native Method)
>   at java.lang.Class.forName(Class.java:130)
>   at
>java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
>   at
>java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1053)
>   at visad.java2d.VisADCanvasJ2D.paintComponent(Unknown Source)
>   at visad.java2d.VisADCanvasJ2D.run(Unknown Source)
>   at java.lang.Thread.run(Thread.java:536)
>
>
>System Info:
>   Redhat 7.2
>   Tomcat 4.1.10 (invoker servlet disabled)
>   (no apache)
>   Java 1.4.0_01
>
>
>
>Thanks for your time,
>Ben Monnahan
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>  
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Using daemontools to supervise Tomcat

2002-10-13 Thread Will Hartung

From: "camccuk" <[EMAIL PROTECTED]>
Sent: Friday, October 11, 2002 8:08 AM


> Does anyone have any experience with using Dan Bernstein's daemontools to
> supervise Tomcat? I've had real trouble getting this to work with either
> startup.sh or catalina.sh but I'm putting this down to the fact that I'm
no
> genius with unix processes...

I don't really understand what the issue is here, but I plead ignorance in
that I haven't worked with the DJB tools in a while.

But, as I recall, the tools simply execute the program using the (by
default) 'run' script. When run exits, for whatever reason, the tools fire
it back up.

Now the tomcat startup scripts fire the java process off in the background,
but as I recall there is an option to NOT do that, and simply have tomcat.sh
stay in the foreground.

It seems to me that a few simple tweaks to tomcat.sh, linked to 'run' in the
"proper spot", and it should Just Work.

Lemme look.

"This man has a bad heart. Angina Pectoris, but we have the cure...Yes. Here
they are..."

Yes, here it is, just start catalina.sh with the "run" option, and it
doesn't fork into the background.

#!/bin/sh
# daemontools run script for Tomcat
cd /usr/local/java/jakarta-tomcat-4.0.4/bin
# start tomcat in the foreground, redirect stderr to stdout for logging.
exec ./catalina.sh run 2>&1

Copy or link this script to /services/tomcat/run, and it should fire right
up. Untested, but it should work.

Multilog should work with this as well, as the 'run' option doesn't redirect
stdout or stderr, whereas the (default) 'start' option does. Since multilog
only listens to stdin, the script redirects stderr to stdout so it can be
captured as well. You need to setup the log directory properly, as mentioned
in DJBs faq.

The key is to keep the java process in the foreground for the 'run' script.
supervise puts it in the background for you, so that's why the run script
doesn't need to.

Regards,

Will Hartung
([EMAIL PROTECTED])




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Unspecified NoClassDefFoundError

2002-10-13 Thread Ben Monnahan

Hi all,

  I am getting NoClassDefFoundError in my servlet, but it doesn't tell me
which one it couldn't find.  I'm guessing its a problem with
GraphicsEnvironment.getLocalGraphicsEnvironment().  I tried a search on
google, but it didn't turn up anything.  Does anyone know what might be
wrong?  Here is a stack trace:

java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:130)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
at
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1053)
at visad.java2d.VisADCanvasJ2D.paintComponent(Unknown Source)
at visad.java2d.VisADCanvasJ2D.run(Unknown Source)
at java.lang.Thread.run(Thread.java:536)


System Info:
Redhat 7.2
Tomcat 4.1.10 (invoker servlet disabled)
(no apache)
Java 1.4.0_01



Thanks for your time,
Ben Monnahan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




mod_jk trying to map every request

2002-10-13 Thread drew

I'm running Red Hat Linux 7.1, Apache 1.3, Tomcat 4.1.12, and i'm connecting 
with mod_jk.  I have several virtual hosts in apache, some that use tomcat, and 
others that do not.  the problem is that when I check the mod_jk log file, it 
shows that the module is trying to map every single request that comes in from 
apache, even from the vhosts that have no Jk directives.  obviously most of 
them fail, but the only places I have the JkMount directive are in the 
VirtualHosts that actually need them (in httpd.conf).  Everything is working 
properly, i.e. servlets and JSPs load and run appropriately, but i'm afraid 
that given enough time, once traffic starts picking up, too many requests will 
be unnecessarily sent to mod_jk.  Is this just the way mod_jk behaves?  if so, 
won't it hinder performance if there is too much traffic?  it not, does anyone 
know what might be wrong and what i might be able to do to solve it?

I greatly appreciate any help that is given.

Thanks,
-Drew

Here are the relevant parts of my config files:

--- server.xml ---

  
  



  
  



--- httpd.conf ---

LoadModule jk_module modules/mod_jk.so
AddModule mod_jk.c
JkWorkersFile /var/tomcat4/conf/workers.properties
JkLogFile /var/tomcat4/logs/mod_jk.log
JkLogLevel debug


  ServerName  www.domain1.com
  ServerAdmin "[EMAIL PROTECTED]"
  DocumentRoot/var/www/vhosts/www.domain1.com/httpdocs
  CustomLog   /var/www/vhosts/www.domain1.com/logs/access_log combined
  ErrorLog/var/www/vhosts/www.domain1.com/logs/error_logs
  JkMount /servlet/* ajp13
  JkMount /*.jsp ajp13


  ServerName  www.domain2.com
  ServerAdmin "[EMAIL PROTECTED]"
  DocumentRoot/var/www/vhosts/www.domain2.com/httpdocs
  CustomLog   /var/www/vhosts/www.domain2.com/logs/access_log combined
  ErrorLog/var/www/vhosts/www.domain2.com/logs/error_logs
  JkMount /servlet/* ajp13
  JkMount /*.jsp ajp13


# domain3 does not use tomcat

  ServerName  www.domain3.com
  ServerAdmin "[EMAIL PROTECTED]"
  DocumentRoot/var/www/vhosts/www.domain3.com/httpdocs
  CustomLog   /var/www/vhosts/www.domain3.com/logs/access_log combined
  ErrorLog/var/www/vhosts/www.domain3.com/logs/error_logs



--- workers.properties ---
workers.tomcat_home=/var/tomcat4
workers.java_home=/opt/IBMJava2-131
ps=/
worker.list=ajp12, ajp13
worker.ajp13.port=8009
worker.ajp13.host=11.22.33.44
worker.ajp13.type=ajp13

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Defining methods in JSP pages

2002-10-13 Thread Chris Means

Alex,

Are you aware that you could simply call the method that you defined
directly in the JSP body?

<%!
public String getTitle(HttpServletRequest request) {
String id = request.getParameter("id");
return "id: " + id;
}
%>

<%
  String title = getTitle (request) ;

  out.write (title) ;
%>

-Chris

> -Original Message-
> From: Alex Muc [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, October 12, 2002 12:55 AM
> To: [EMAIL PROTECTED]
> Subject: Defining methods in JSP pages
>
>
> Hi,
>
> I've been using JSPs for quite a while now and have been trying to find
> better ways to do various things.  One of the features of JSPs that I
> stumbled on a while ago was the ability to define methods in JSPs and to
> be able to call those methods from within the page using Java Reflection
> mechanisms.  This works relatively well (see example below), except for
> the baggage of having to do the reflection work.  Alas, that is the
> price we pay for a strongly typed language.
>
> What I'm wondering is why more people don't use the declaration syntax
> as a way to define methods in pages and use those methods to abstract
> out some of the functionality they need?  My answer would be that it is
> generally frowned upon (by the MVC crowd) to put logic into the JSP page
> and to a certain extent I agree.  But, there are times where the logic
> code is only used to modify the display and in those cases it seems to
> me like putting that logic into a method within the JSP makes sense.
>  For example, when building the title string of the page you often have
> to look up or build some sort of descriptive string from the various IDs
> of the objects that are part of the request/session to the page.  It
> seems to me that doing this sort of operation is the kind of thing which
> should be within the JSP page and using methods within the JSP page seem
> to make even more sense as opposed to scriptlets.  The alternatives are:
> 1) Put the "getPageTitle" method into the Model object.  If the model is
> supposed to capture the data of the object then it doesn't seem to me
> like it should be cluttered with methods relevant to displaying
> the object.
> 2) Put the "getPageTitle" method into the Controller object.  Again, if
> the controller is the driver of the business logic of the object(s) then
> it too doesn't seem like the right place for methods relevant to
> displaying the object.
>
> It seems like using methods in JSP pages is a good idea for certain
> things.  It also has it's downsides, the main one that I see is that
> there is no inheritance among JSP pages.  I wonder how hard this would
> be to add?
>
> Does any one have any comments about why defining methods in JSP pages
> is a good or bad idea?  I would really appreciate hearing from you.
>
> Thanks for you time.
> Alex.
>
>
> ***
> Example method in a JSP page:
> ***
>
>
>
>
> <%@ page language="java" import="java.lang.reflect.*" %>
> <%!
> public String getTitle(HttpServletRequest request) {
> String id = request.getParameter("id");
> return "id: " + id;
> }
> %>
> <%  Class c = this.getClass();
>
> // The types for the method call
> Class [] pTypes = new Class [1];
> Class hsr =
> Class.forName("javax.servlet.http.HttpServletRequest");
> pTypes[0] = hsr;
>
> // Get the method
> Method m = c.getMethod("getTitle", pTypes);
>
> // Build the list of parameters to the method
> Object [] params = new Object [1];
> params[0] = request;
>
> // Invoke the method and get the result
> String result = (String) m.invoke(this, params);
> %>
> Method Result: <%= result %>
>
>
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat error: JAVA.ENDORSED.DIRS

2002-10-13 Thread Eric Jackson

I am trying to run Tomcat 4.1.12 on Windows 98 2nd Edition 
 with JRE1.3.1.  After setting my JAVA_HOME and try to start 
 Tomcat, I get the following error
 
E:\tomcat\bin>startup
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
Using CATALINA_BASE:   E:\tomcat
Using CATALINA_HOME:   E:\tomcat
Using CATALINA_TMPDIR: E:\tomcat\temp
Using JAVA_HOME:   E:\j2re1.3.1
Invalid switch - -DJAVA.ENDORSED.DIRS=
E:\tomcat\bin>
 
 what is this error?  I got the same error with JRE1.4.1. How can I get rid of it and 
get my 
 Tomcat server started?
 
 Thanks,
Eric




IIS5 and Tomcat 4.1 - It worked!!!

2002-10-13 Thread Barthelemy Dagenais

I read a lot about IIS5 and Tomcat 4.1 not working together and I spent
three days trying to configure  those two servers. What will follow are the
configuration that I used to make them work. I'm not sure if  those config
SHOULD be like that, but they work and this is for me the most important. I
will also add some tips that i learned during those horrible configuration
days. Please, excuse my english since french is my  primary language.

TIPS

1- You can learn a lot by looking at servers log. For instance, you can
learn if the redirection to tomcat worked by looking at two different logs:
One located in system32\logfiles\W3SVC1 (this is the IIS log) and the other
located at:  %Tomcat%\logs\isapi.log.

You know that the redirection went well on IIS if you see this line in the
iis log :

2002-10-12 11:19:49 192.168.0.7 - 65.95.255.176 80 GET
/jakarta/isapi_redirect.dll - 200
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0)

If there is a problem, it will look like (the response number will change.
In this case, this is -500):

2002-10-12 11:19:49 192.168.0.7 - 65.95.255.176 80 GET
/jakarta/isapi_redirect.dll - 500
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0)

--> Look at the botom of this page if you have this kind of error:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html

The isapi log file didn't really helped (except to tell me there was a
problem with my configuration!), but  if you can understand the error
message generated, it may be interesting.

2- Be sure your firewall isn't interfering. I ran SyGate Personnal Firewall
with all port above 1000 open  (plus port 80 of course) and it blocked my
jsp pages sometime. I don't know why it dit that, but when I  shut it down,
some of my problems were gone.

3- I first made a mistake (i think it is). I add the isapi_redirect.dll in
the ISAPI filter of my website in IIS. That was wrong. When I add it on the
server ISAPI filter instead, it worked. You can access the server ISAPI
filter by right-clicking on the first node in IIS representing your computer
(and not the node representing your website).

4- Here are the websites that helped me the most:

http://www.verysimple.com/scripts/support_tc_iis.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html

I will now asume that you have read this.


5- Finally, the context. They gave me a big headache. I wanted to redirect
all JSP files to Tomcat. I could  redirect jsp files from one directory, but
not from the website root. I finally figured out how to do this.  Here are
part of my server.xml and uriworkermap.properties.

---

-- server.xml --







-- uriworkermap --

#
# Sites to be redirected to Tomcat
#

/*.jsp=ajp13

---

Notice the two context in server.xml. The first one is needed to set the
root of Tomcat. If this line is  commented, Tomcat Root will be
%Tomcat%\webapps\root. In this example, I just set the root to my website
root.

Now the second line. That was to make the uriworkermap.properties work
properly. If you just add this line  (withoud the root context), it will
redirect all JSP files request to %Tomcat%\webapps\root. But with the two
lines, you make redirection from IIS root possible.


6- I used the default Jk2 connector (not the one commented) :

---

-- server.xml --








---


7- When i installed Tomcat, I changed his port from 8080 to 8001. I don't
know why, but I had a conflict on this port.

---

-- server.xml --




---

8- My Tomcat installation (E:\Tomcat4) is not in my website root
(C:\Inetpub\wwwBartheserv). In fact, Tomcat is installed on another hard
drive (on the same computer). That was just for information!

9- As usual, check your registry parameters and be sure to have created a
virtual directory named jakarta with execute permission and redirected to
%Tomcat%\bin. Why jakarta? In the registry, you'll find this  entry:
extension_uri. The value should be: /jakarta/isapi_redirect.dll. The jakarta
virtual directory is the jakarta in this registry value.

I'm not a specialist of apache, tomcat or IIS. I'm just a computer science
student and I can make mistakes.  In that case, I'm not sure if my
configuration are what it is supposed to be, but as I said, it worked for
me. If you have any questions or comments, feel free to ask me.

I hope this will help some people,
Barthelemy



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: unable to start tomcat

2002-10-13 Thread Rahul Sood

Hello Ashish,
Thanx a lot for this, it has really helped, when I typed netstat -an it showed me a 
list of ports and for 8080 it said listening, which made me think that the port was 
free, but anyeway i changed to a different port(1026) and tomcat started Ok this time.

Could you please explain the meaning of listening for port 8080.

Also I would mention here that,
I have run tomcat 3.2.1 and that starts Ok on the same machine , but this version of 
tomcat which is a part of the WSDP didnt start.

Thanx very much once again

Rahul


>>> [EMAIL PROTECTED] 10/12/02 07:19pm >>>
Hi
are u running any other process which is using port
8081 on your machine, 
to check this go to command prompt,
and type command
netstat -an
and see which are the ports used in your machine( i
assume u are on windows platform) or else find the
relevant command on unix,
or u can change the port in tomcat(conf/server.xml) to
other port not used
Ashish
--- Rahul Sood <[EMAIL PROTECTED]> wrote:
> 
> I have installed tomcat using  Web services
> developers pack. When trying =
> =3D
> to start tomcat according to the instructions given
> ( which is running the
> startup.bat file from the command prompt or clicking
> on start tomcat in =
> =3D
> the start menuitems ) a blank window comes up and
> vanishes in seconds and =
> =3D
> tomcat is not started.
>   Looking at the log file this is the error message
> recorded
> 
> java.net.BindException: Address in use:
> JVM_Bind:8081
>   at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpE=
> =3D
> ndpoint.java:268)
>   at
>
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java=
> =3D
> :150)
>   at
>
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConne=
> =3D
> ctor.java:999)
>   at
>
org.apache.catalina.core.StandardService.initialize(StandardServ=
> =3D
> ice.java:582)
>   at
>
org.apache.catalina.core.StandardServer.initialize(StandardServe=
> =3D
> r.java:2244)
>   at
>
org.apache.catalina.startup.Catalina.start(Catalina.java:503)
>   at
>
org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
>   at
>
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
>
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
> com.sun.launcher.Launcher.main(Launcher.java:208)
> [ERROR] Http11Protocol - -Error initializing
> endpoint  =3D
> on: Address in use: JVM_Bind:8081>
> Catalina.start: LifecycleException:  Protocol
> handler initialization =3D
> failed: java.net.BindException: Address in use:
> JVM_Bind:8081
> LifecycleException:  Protocol handler initialization
> failed: java.net.BindE=
> =3D
> xception: Address in use: JVM_Bind:8081
>   at
>
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConne=
> =3D
> ctor.java:1001)
>   at
>
org.apache.catalina.core.StandardService.initialize(StandardServ=
> =3Dtar [EMAIL PROTECTED] 
> ice.java:582)
>   at
>
org.apache.catalina.core.StandardServer.initialize(StandardServe=
> =3D
> r.java:2244)
>   at
>
org.apache.catalina.startup.Catalina.start(Catalina.java:503)
>   at
>
org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
>   at
>
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
>
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
> com.sun.launcher.Launcher.main(Launcher.java:208)
> Catalina.stop: LifecycleException:  This server has
> not yet been started
> LifecycleException:  This server has not yet been
> started
>   at
>
org.apache.catalina.core.StandardServer.stop(StandardServer.java=
> =3D
> :2211)
>   at
>
org.apache.catalina.startup.Catalina.start(Catalina.java:535)
>   at
>
org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
>   at
>
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
>
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
> com.sun.launcher.Launcher.main(Launcher.java:208)
> 
>   A prompt reply and help will be greatly
> apreciated.
> 
> 
> 
> 
> 
> Rahul Sood
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: unable to start tomcat

2002-10-13 Thread Rahul Sood

Thanx lot for the reply, but I have not run any other application or server that might 
bind to this port, could you please suggest something.
thanx in advance

>>> [EMAIL PROTECTED] 10/12/02 03:47pm >>>
Read the message:

java.net.BindException: Address in use: JVM_Bind:8081
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpE=

Some other program is bound to the port.

George Sexton
MH Software, Inc.
Voice: 303 438 9585
http://www.mhsoftware.com 


-Original Message-
From: Rahul Sood [mailto:[EMAIL PROTECTED]] 
Sent: 12 October, 2002 7:34 AM
To: [EMAIL PROTECTED] 
Subject: unable to start tomcat



I have installed tomcat using  Web services developers pack. When trying =
=3D
to start tomcat according to the instructions given ( which is running the
startup.bat file from the command prompt or clicking on start tomcat in =
=3D
the start menuitems ) a blank window comes up and vanishes in seconds and =
=3D
tomcat is not started.
  Looking at the log file this is the error message recorded

java.net.BindException: Address in use: JVM_Bind:8081
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpE=
=3D
ndpoint.java:268)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java=
=3D
:150)
at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConne=
=3D
ctor.java:999)
at org.apache.catalina.core.StandardService.initialize(StandardServ=
=3D
ice.java:582)
at org.apache.catalina.core.StandardServer.initialize(StandardServe=
=3D
r.java:2244)
at org.apache.catalina.startup.Catalina.start(Catalina.java:503)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.launcher.Launcher.main(Launcher.java:208)
[ERROR] Http11Protocol - -Error initializing endpoint 
Catalina.start: LifecycleException:  Protocol handler initialization =3D
failed: java.net.BindException: Address in use: JVM_Bind:8081
LifecycleException:  Protocol handler initialization failed: java.net.BindE=
=3D
xception: Address in use: JVM_Bind:8081
at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConne=
=3D
ctor.java:1001)
at org.apache.catalina.core.StandardService.initialize(StandardServ=
=3Dtar [EMAIL PROTECTED] 
ice.java:582)
at org.apache.catalina.core.StandardServer.initialize(StandardServe=
=3D
r.java:2244)
at org.apache.catalina.startup.Catalina.start(Catalina.java:503)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.launcher.Launcher.main(Launcher.java:208)
Catalina.stop: LifecycleException:  This server has not yet been started
LifecycleException:  This server has not yet been started
at org.apache.catalina.core.StandardServer.stop(StandardServer.java=
=3D
:2211)
at org.apache.catalina.startup.Catalina.start(Catalina.java:535)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.launcher.Launcher.main(Launcher.java:208)

  A prompt reply and help will be greatly apreciated.





Rahul Sood




--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Pls help! why cann't I start tomcat 4?

2002-10-13 Thread chasee


Hi, 

I am getting this 
message when startuping tomcat 4.0.1 after upgrading from tomcat3 to tomcat4:
"ERROR reading java.io.ByteArrayInputStream@61a408
At Line 33 /web-app/servlet-mapping/" .


Is it because of the upgrading? I guess there is an syntax error when 
the engine tries to read one of the web.xmls (in the conf and 
webapps\mycontex\web-inf). What should I do with it? Please kindly help! 


Chasee
 


-
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com


Re: Defining methods in JSP pages

2002-10-13 Thread Craig R. McClanahan

The biggest problem with the general approach you suggest is that you are
mixing Java logic into your pages, which means you need a Java programmer
to maintain them.  A much better strategy is to use a
model-view-controller (MVC) style architecture that has back-end business
logic setting up the dynamic things your page needs in request attributes
or session attributes, and then forward to the page (which can use things
like  to grab them.  An example of a framework for MVC
style development is Struts .

An additional benefit of banishing scriptlets from your pages is that the
JSP page compiler can generate better code, as well as handling bigger and
more complex pages.  The general trend in modern JSP development is away
from scriptlets.

Craig McClanahan

On Sat, 12 Oct 2002, Alex Muc wrote:

> Date: Sat, 12 Oct 2002 01:54:58 -0400
> From: Alex Muc <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Defining methods in JSP pages
>
> Hi,
>
> I've been using JSPs for quite a while now and have been trying to find
> better ways to do various things.  One of the features of JSPs that I
> stumbled on a while ago was the ability to define methods in JSPs and to
> be able to call those methods from within the page using Java Reflection
> mechanisms.  This works relatively well (see example below), except for
> the baggage of having to do the reflection work.  Alas, that is the
> price we pay for a strongly typed language.
>
> What I'm wondering is why more people don't use the declaration syntax
> as a way to define methods in pages and use those methods to abstract
> out some of the functionality they need?  My answer would be that it is
> generally frowned upon (by the MVC crowd) to put logic into the JSP page
> and to a certain extent I agree.  But, there are times where the logic
> code is only used to modify the display and in those cases it seems to
> me like putting that logic into a method within the JSP makes sense.
>  For example, when building the title string of the page you often have
> to look up or build some sort of descriptive string from the various IDs
> of the objects that are part of the request/session to the page.  It
> seems to me that doing this sort of operation is the kind of thing which
> should be within the JSP page and using methods within the JSP page seem
> to make even more sense as opposed to scriptlets.  The alternatives are:
> 1) Put the "getPageTitle" method into the Model object.  If the model is
> supposed to capture the data of the object then it doesn't seem to me
> like it should be cluttered with methods relevant to displaying the object.
> 2) Put the "getPageTitle" method into the Controller object.  Again, if
> the controller is the driver of the business logic of the object(s) then
> it too doesn't seem like the right place for methods relevant to
> displaying the object.
>
> It seems like using methods in JSP pages is a good idea for certain
> things.  It also has it's downsides, the main one that I see is that
> there is no inheritance among JSP pages.  I wonder how hard this would
> be to add?
>
> Does any one have any comments about why defining methods in JSP pages
> is a good or bad idea?  I would really appreciate hearing from you.
>
> Thanks for you time.
> Alex.
>
>
> ***
> Example method in a JSP page:
> ***
>
>
>
>
> <%@ page language="java" import="java.lang.reflect.*" %>
> <%!
> public String getTitle(HttpServletRequest request) {
> String id = request.getParameter("id");
> return "id: " + id;
> }
> %>
> <%  Class c = this.getClass();
>
> // The types for the method call
> Class [] pTypes = new Class [1];
> Class hsr = Class.forName("javax.servlet.http.HttpServletRequest");
> pTypes[0] = hsr;
>
> // Get the method
> Method m = c.getMethod("getTitle", pTypes);
>
> // Build the list of parameters to the method
> Object [] params = new Object [1];
> params[0] = request;
>
> // Invoke the method and get the result
> String result = (String) m.invoke(this, params);
> %>
> Method Result: <%= result %>
>
>
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat 4.0.4 won't reload modified classes

2002-10-13 Thread Craig R. McClanahan



On Sat, 12 Oct 2002, Jacob Kjome wrote:

> Date: Sat, 12 Oct 2002 00:36:50 -0500
> From: Jacob Kjome <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: Tomcat 4.0.4 won't reload modified classes
>
> Keep in mind that the only classes that would be reloadable are
> servlets.  Classes that aren't servlets will be ignored for reloading
> purposes.

While this was true for Tomcat 3.x, it is not true for Tomcat 4.x.
Changes to *any* class (servlet or not) will be detected and cause a
reload, as long as that class has already been loaded by the class loader.
(If it hasn't been loaded yet, there's no reason to force a restart.)

>
> I suggest you read up on the Tomcat manager app.  It can
> stop/start/install/uninstall/deploy/undeploy your app without having to
> restart the whole server.
>
> Jake
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat 4.0.4 won't reload modified classes

2002-10-13 Thread Ashish Kulkarni

Hi,

I also had the same problem but on windows 2000, 
but next day when i restarted my machine it was
working again...
dont know why it happened

Ashish
--- Guillermo Payet <[EMAIL PROTECTED]> wrote:
> 
> Hello,
> 
> I have a server running Tomcat 4.0.4, with a
> multitude of Web 
> applications on top.  Recently, reloading of
> modified classes
> by reloading a Web app manually with the Manager
> Application 
> has stopped working. (Worked fine with 4.0.3)  It's
> been a while
> since we did the upgrade, so it could have been
> somthing else 
> that broke this.  I tried setting up "reloadable" to
> true in the
> application context, and that isn't working either! 
> 
> In any case, we are now forced to restart Tomcat for
> any updated 
> classes to be reloaded.  When reloading our apps via
> the Application
> Manager, the application log shows a succesful
> application reload, 
> but does not show the detection of any modified
> classes.
> 
> We're running on Linux 2.4.7 kernel, Sun jdk
> 1.4.0_01 
> 
> Any ideas?
> 
>   thanks!
> 
>   --G
> 
> 
> -- 
> Guillermo Payet
> O C E A N   G R O U P 
> email: [EMAIL PROTECTED]
> http://www.oceangroup.com
> http://www.localharvest.org
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: unable to start tomcat

2002-10-13 Thread Ashish Kulkarni

Hi
are u running any other process which is using port
8081 on your machine, 
to check this go to command prompt,
and type command
netstat -an
and see which are the ports used in your machine( i
assume u are on windows platform) or else find the
relevant command on unix,
or u can change the port in tomcat(conf/server.xml) to
other port not used
Ashish
--- Rahul Sood <[EMAIL PROTECTED]> wrote:
> 
> I have installed tomcat using  Web services
> developers pack. When trying =
> =3D
> to start tomcat according to the instructions given
> ( which is running the
> startup.bat file from the command prompt or clicking
> on start tomcat in =
> =3D
> the start menuitems ) a blank window comes up and
> vanishes in seconds and =
> =3D
> tomcat is not started.
>   Looking at the log file this is the error message
> recorded
> 
> java.net.BindException: Address in use:
> JVM_Bind:8081
>   at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpE=
> =3D
> ndpoint.java:268)
>   at
>
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java=
> =3D
> :150)
>   at
>
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConne=
> =3D
> ctor.java:999)
>   at
>
org.apache.catalina.core.StandardService.initialize(StandardServ=
> =3D
> ice.java:582)
>   at
>
org.apache.catalina.core.StandardServer.initialize(StandardServe=
> =3D
> r.java:2244)
>   at
>
org.apache.catalina.startup.Catalina.start(Catalina.java:503)
>   at
>
org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
>   at
>
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
>
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
> com.sun.launcher.Launcher.main(Launcher.java:208)
> [ERROR] Http11Protocol - -Error initializing
> endpoint  =3D
> on: Address in use: JVM_Bind:8081>
> Catalina.start: LifecycleException:  Protocol
> handler initialization =3D
> failed: java.net.BindException: Address in use:
> JVM_Bind:8081
> LifecycleException:  Protocol handler initialization
> failed: java.net.BindE=
> =3D
> xception: Address in use: JVM_Bind:8081
>   at
>
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConne=
> =3D
> ctor.java:1001)
>   at
>
org.apache.catalina.core.StandardService.initialize(StandardServ=
> =3Dtar [EMAIL PROTECTED] 
> ice.java:582)
>   at
>
org.apache.catalina.core.StandardServer.initialize(StandardServe=
> =3D
> r.java:2244)
>   at
>
org.apache.catalina.startup.Catalina.start(Catalina.java:503)
>   at
>
org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
>   at
>
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
>
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
> com.sun.launcher.Launcher.main(Launcher.java:208)
> Catalina.stop: LifecycleException:  This server has
> not yet been started
> LifecycleException:  This server has not yet been
> started
>   at
>
org.apache.catalina.core.StandardServer.stop(StandardServer.java=
> =3D
> :2211)
>   at
>
org.apache.catalina.startup.Catalina.start(Catalina.java:535)
>   at
>
org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
>   at
>
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
>
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
> com.sun.launcher.Launcher.main(Launcher.java:208)
> 
>   A prompt reply and help will be greatly
> apreciated.
> 
> 
> 
> 
> 
> Rahul Sood
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Building mod_jk.so for Linux

2002-10-13 Thread Brett Knights

Hi,
I have a RH Linux 7.2 system with Apache 2.0.42 installed.

I am trying to compile mod_jk.so for this system.

I have the jakarta-tomcat-connectors-4.0.6-src files and run the following
to make the .so

from jk/native
./configure --with-apxs=/usr/local/apache2/bin/apxs
make

this process runs without errors but when I copy the mod_jk.so from
jk/native/apache-2.0 and try to configure and run apache I get:

Syntax error on line 1025 of /usr/local/apache2/conf/httpd.conf:
Invalid command 'JkWorkersFile', perhaps mis-spelled or defined by a module
not included in the server configuration

I did include the line:
LoadModule jk_module modules/mod_jk.so

Any help on this would be much appreciated.

FWIW I can't run the ant script that is supposed to build the native
components.
It fails with the following:
BUILD FAILED
file:/usr/local/src/jakarta-tomcat-connectors-4.0.6-src/jk/native2/build.xml
:341: Link failed libjkjni

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat 4.0.4 won't reload modified classes

2002-10-13 Thread Pae Choi

FYI

Tested Tocmat v4.0.3 with J2SE v1.3.x, 1.4.0, 1.4.1fcs. None of
J2SE versions mentioned work.

Regards,


Pae



- Original Message -
From: "Guillermo Payet" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Saturday, October 12, 2002 12:57 PM
Subject: Re: Tomcat 4.0.4 won't reload modified classes


>
> I've traced it to the fact that we're using symbolic links in a link
> tree under the WEB-INF/classes directory.  Apparently the newer Tomcats
> don't like this. (Or maybe the latest JDK?)
>
> --G
>
>
> On Sat, Oct 12, 2002 at 11:26:57AM -0700, Craig R. McClanahan wrote:
> >
> >
> > On Sat, 12 Oct 2002, Jacob Kjome wrote:
> >
> > > Date: Sat, 12 Oct 2002 00:36:50 -0500
> > > From: Jacob Kjome <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: Tomcat Users List <[EMAIL PROTECTED]>
> > > Subject: Re: Tomcat 4.0.4 won't reload modified classes
> > >
> > > Keep in mind that the only classes that would be reloadable are
> > > servlets.  Classes that aren't servlets will be ignored for reloading
> > > purposes.
> >
> > While this was true for Tomcat 3.x, it is not true for Tomcat 4.x.
> > Changes to *any* class (servlet or not) will be detected and cause a
> > reload, as long as that class has already been loaded by the class
loader.
> > (If it hasn't been loaded yet, there's no reason to force a restart.)
> >
> > >
> > > I suggest you read up on the Tomcat manager app.  It can
> > > stop/start/install/uninstall/deploy/undeploy your app without having
to
> > > restart the whole server.
> > >
> > > Jake
> > >
> >
> > Craig
> >
> >
> > --
> > To unsubscribe, e-mail:

> > For additional commands, e-mail:

> >
>
> --
> Guillermo Payet
> O C E A N   G R O U P
> email: [EMAIL PROTECTED]
> http://www.oceangroup.com
> http://www.localharvest.org
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Defining methods in JSP pages

2002-10-13 Thread Chris Means

I use Struts for MVC web applications.

http://jakarta.apache.org/struts

-Chris

> -Original Message-
> From: Alex Muc [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, October 12, 2002 11:09 AM
> To: Tomcat Users List
> Subject: Re: Defining methods in JSP pages
>
>
> Yeah, that thought hit me last night as well (just after I sent the
> message of course:).  I was thinking more about the possibility of doing
> the call from some other JSP page as well.
>
> Do you use these features?  Do you have a prefered place for display
> related functions (model/view/controller/other)?
>
> Alex.
>
> Chris Means wrote:
>
> >Alex,
> >
> >Are you aware that you could simply call the method that you defined
> >directly in the JSP body?
> >
> ><%!
> >public String getTitle(HttpServletRequest request) {
> >String id = request.getParameter("id");
> >return "id: " + id;
> >}
> >%>
> >
> ><%
> >  String title = getTitle (request) ;
> >
> >  out.write (title) ;
> >%>
> >
> >-Chris
> >
> >
> >
> >>-Original Message-
> >>From: Alex Muc [mailto:[EMAIL PROTECTED]]
> >>Sent: Saturday, October 12, 2002 12:55 AM
> >>To: [EMAIL PROTECTED]
> >>Subject: Defining methods in JSP pages
> >>
> >>
> >>Hi,
> >>
> >>I've been using JSPs for quite a while now and have been trying to find
> >>better ways to do various things.  One of the features of JSPs that I
> >>stumbled on a while ago was the ability to define methods in JSPs and to
> >>be able to call those methods from within the page using Java Reflection
> >>mechanisms.  This works relatively well (see example below), except for
> >>the baggage of having to do the reflection work.  Alas, that is the
> >>price we pay for a strongly typed language.
> >>
> >>What I'm wondering is why more people don't use the declaration syntax
> >>as a way to define methods in pages and use those methods to abstract
> >>out some of the functionality they need?  My answer would be that it is
> >>generally frowned upon (by the MVC crowd) to put logic into the JSP page
> >>and to a certain extent I agree.  But, there are times where the logic
> >>code is only used to modify the display and in those cases it seems to
> >>me like putting that logic into a method within the JSP makes sense.
> >> For example, when building the title string of the page you often have
> >>to look up or build some sort of descriptive string from the various IDs
> >>of the objects that are part of the request/session to the page.  It
> >>seems to me that doing this sort of operation is the kind of thing which
> >>should be within the JSP page and using methods within the JSP page seem
> >>to make even more sense as opposed to scriptlets.  The alternatives are:
> >>1) Put the "getPageTitle" method into the Model object.  If the model is
> >>supposed to capture the data of the object then it doesn't seem to me
> >>like it should be cluttered with methods relevant to displaying
> >>the object.
> >>2) Put the "getPageTitle" method into the Controller object.  Again, if
> >>the controller is the driver of the business logic of the object(s) then
> >>it too doesn't seem like the right place for methods relevant to
> >>displaying the object.
> >>
> >>It seems like using methods in JSP pages is a good idea for certain
> >>things.  It also has it's downsides, the main one that I see is that
> >>there is no inheritance among JSP pages.  I wonder how hard this would
> >>be to add?
> >>
> >>Does any one have any comments about why defining methods in JSP pages
> >>is a good or bad idea?  I would really appreciate hearing from you.
> >>
> >>Thanks for you time.
> >>Alex.
> >>
> >>
> >>***
> >>Example method in a JSP page:
> >>***
> >>
> >>
> >>
> >>
> >><%@ page language="java" import="java.lang.reflect.*" %>
> >><%!
> >>public String getTitle(HttpServletRequest request) {
> >>String id = request.getParameter("id");
> >>return "id: " + id;
> >>}
> >>%>
> >><%  Class c = this.getClass();
> >>
> >>// The types for the method call
> >>Class [] pTypes = new Class [1];
> >>Class hsr =
> >>Class.forName("javax.servlet.http.HttpServletRequest");
> >>pTypes[0] = hsr;
> >>
> >>// Get the method
> >>Method m = c.getMethod("getTitle", pTypes);
> >>
> >>// Build the list of parameters to the method
> >>Object [] params = new Object [1];
> >>params[0] = request;
> >>
> >>// Invoke the method and get the result
> >>String result = (String) m.invoke(this, params);
> >>%>
> >>Method Result: <%= result %>
> >>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >>
> >>
> >
> >For additional commands, e-mail:
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> 
> >For additional commands, e-mail:
> 
> >
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> 
> For additiona

virtual servers and class libraries

2002-10-13 Thread Guillermo Payet


Hi,

If I have one server with a multitude of virtual hosts all running
Web applications, what's the "proper" place to place class libraries 
used by all apps?   We've been placing them in the Catalina classpath,
but I'm starting to think this is not the right place for them. 
Should the jar files go on all the ./WEB_INF/lib directories for
all applications???  This seems like a pain to maintain.

mmm... I wonder what the "best practices" approach to this is?

--G

-- 
Guillermo Payet
O C E A N   G R O U P 
email: [EMAIL PROTECTED]
http://www.oceangroup.com
http://www.localharvest.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




mod_jk and ajp14 / ajp13++

2002-10-13 Thread David Cassidy

Dear All,

I'm wanting to get the ajp14 proposed secret key login / validation 
thingy going
and I wanted to know if anyone had had any success / how's it going ...

Look forward to any replies

Ta

David


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat 4.0.4 won't reload modified classes

2002-10-13 Thread Guillermo Payet


Hi Jacob,

> Keep in mind that the only classes that would be reloadable are 
> servlets.  Classes that aren't servlets will be ignored for reloading 
> purposes.

mmm  these are Java beans that are embedded into JSP pages via
 tags.

We are using the Manager app, which reports a succesful app reload 
but fails to reload the updated classes.

thanks

--G

> 
> I suggest you read up on the Tomcat manager app.  It can 
> stop/start/install/uninstall/deploy/undeploy your app without having to 
> restart the whole server.
> 
> Jake
> 
> At 08:22 PM 10/11/2002 -0700, you wrote:
> 
> >Hello,
> >
> >I have a server running Tomcat 4.0.4, with a multitude of Web
> >applications on top.  Recently, reloading of modified classes
> >by reloading a Web app manually with the Manager Application
> >has stopped working. (Worked fine with 4.0.3)  It's been a while
> >since we did the upgrade, so it could have been somthing else
> >that broke this.  I tried setting up "reloadable" to true in the
> >application context, and that isn't working either!
> >
> >In any case, we are now forced to restart Tomcat for any updated
> >classes to be reloaded.  When reloading our apps via the Application
> >Manager, the application log shows a succesful application reload,
> >but does not show the detection of any modified classes.
> >
> >We're running on Linux 2.4.7 kernel, Sun jdk 1.4.0_01
> >
> >Any ideas?
> >
> > thanks!
> >
> > --G
> >
> >
> >--
> >Guillermo Payet
> >O C E A N   G R O U P
> >email: [EMAIL PROTECTED]
> >http://www.oceangroup.com
> >http://www.localharvest.org
> >
> >--
> >To unsubscribe, e-mail:   
> >For additional commands, e-mail: 

-- 
Guillermo Payet
O C E A N   G R O U P 
email: [EMAIL PROTECTED]
http://www.oceangroup.com
http://www.localharvest.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tomcat 4.0.4 won't reload modified classes

2002-10-13 Thread Guillermo Payet


I've traced it to the fact that we're using symbolic links in a link 
tree under the WEB-INF/classes directory.  Apparently the newer Tomcats
don't like this. (Or maybe the latest JDK?)

--G


On Sat, Oct 12, 2002 at 11:26:57AM -0700, Craig R. McClanahan wrote:
> 
> 
> On Sat, 12 Oct 2002, Jacob Kjome wrote:
> 
> > Date: Sat, 12 Oct 2002 00:36:50 -0500
> > From: Jacob Kjome <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Re: Tomcat 4.0.4 won't reload modified classes
> >
> > Keep in mind that the only classes that would be reloadable are
> > servlets.  Classes that aren't servlets will be ignored for reloading
> > purposes.
> 
> While this was true for Tomcat 3.x, it is not true for Tomcat 4.x.
> Changes to *any* class (servlet or not) will be detected and cause a
> reload, as long as that class has already been loaded by the class loader.
> (If it hasn't been loaded yet, there's no reason to force a restart.)
> 
> >
> > I suggest you read up on the Tomcat manager app.  It can
> > stop/start/install/uninstall/deploy/undeploy your app without having to
> > restart the whole server.
> >
> > Jake
> >
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 

-- 
Guillermo Payet
O C E A N   G R O U P 
email: [EMAIL PROTECTED]
http://www.oceangroup.com
http://www.localharvest.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat + Grinder.

2002-10-13 Thread Luminous Heart

Has anyone heard of the Grinder loadtest tool? I am
trying to use it with Tomcat but there is not enough
info about it.


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: virtual servers and class libraries

2002-10-13 Thread Jacob Kjome


It depends on your situation.

If you have a bunch of apps that are all synced to use specific libraries, 
or those libraries are pretty stable such as gnu-regexp-1.1.4.jar (has been 
at that version for a while) then you can put them in $CATALINA_HOME/lib 
(same as shared/lib in Tomcat-4.1.x).  If they are to be used by both the 
server and the webapps, then put them in common/lib.

The thing is, generally, webapps are unique entitiesespecially if they 
are built by different groups of people.  So, if one webapp needs version 
5.6 and the other webapp needs version 5.7 of some library, trying to make 
them share the same one will only bring you grief.  Disk space is 
cheap.  Webapps should come with the jars they need except for libraries 
such as XML/DOM libraries which are required to be loaded via a parent 
classloader (lib or shared/lib, and common/lib).

So, your organization controls both the webapp library versioning and the 
server, you can probably share most things, but in any other case, you 
should be putting all your library dependencies in WEB-INF/lib.

Of course, that just IMHO.

Jake

At 06:28 PM 10/12/2002 -0700, you wrote:

>Hi,
>
>If I have one server with a multitude of virtual hosts all running
>Web applications, what's the "proper" place to place class libraries
>used by all apps?   We've been placing them in the Catalina classpath,
>but I'm starting to think this is not the right place for them.
>Should the jar files go on all the ./WEB_INF/lib directories for
>all applications???  This seems like a pain to maintain.
>
>mmm... I wonder what the "best practices" approach to this is?
>
> --G
>
>--
>Guillermo Payet
>O C E A N   G R O U P
>email: [EMAIL PROTECTED]
>http://www.oceangroup.com
>http://www.localharvest.org
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 



jk 2.2.0.1 and Tomcat 4.1.2

2002-10-13 Thread yoom nguyen

Does any on successful build jk 2.2.0.1 for tomcat 4.1.2 & apache 2 on
linux?
If yes, please give me some advice on how to build it on linux.


Is Tomcat 4.1.2 already come with jk 2 build?
 I found a few file such as $CATALINE_HOME/bin/tomcat-jni.jar
$CATALINA_HOME/conf/jk2.properties
$CATALINA_HOME/server/lib/tomcat-jk2.jar
However, I can not find the 
mod_jk2.so

I also get this error when I try to build jk2

prepare:
[mkdir] Created dir: /db2/tomcat/jk2201/jk/build/classes
[mkdir] Created dir: /db2/tomcat/jk2201/jk/build/classes/META-INF
[mkdir] Created dir: /db2/tomcat/jk2201/jk/build/lib

BUILD FAILED
file:/db2/tomcat/jk2201/jk/build.xml:110: Warning: Could not find file
/db2/tomcat/jk2201/coyote/build/lib/tomcat-coyote.jar to copy.


Thanks, ynguyen


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cant start Tomcat 3.3.1 as an NT service

2002-10-13 Thread jdfranks3


I followed your instructions to run Tomcat 3.3.1 as an NT service and I've had no 
success.  I get the service installed, and when I try to start it all I get is:

Error 1067: The process has terminated unexpectedly.

I changed the TOMCAT_HOME and JAVA_HOME in my wrapper.properties file.  Anything else 
I need to do?

Can you help?

Thanks,

-John Franks




RE: unable to start tomcat

2002-10-13 Thread Sexton, George

Listening means an application is bound to that port and is listening for
connections.

George Sexton
MH Software, Inc.
Voice: 303 438 9585
http://www.mhsoftware.com


-Original Message-
From: Rahul Sood [mailto:[EMAIL PROTECTED]]
Sent: 12 October, 2002 3:42 PM
To: [EMAIL PROTECTED]
Subject: Re: unable to start tomcat


Hello Ashish,
Thanx a lot for this, it has really helped, when I typed netstat -an it
showed me a list of ports and for 8080 it said listening, which made me
think that the port was free, but anyeway i changed to a different
port(1026) and tomcat started Ok this time.

Could you please explain the meaning of listening for port 8080.

Also I would mention here that,
I have run tomcat 3.2.1 and that starts Ok on the same machine , but this
version of tomcat which is a part of the WSDP didnt start.

Thanx very much once again

Rahul


>>> [EMAIL PROTECTED] 10/12/02 07:19pm >>>
Hi
are u running any other process which is using port
8081 on your machine,
to check this go to command prompt,
and type command
netstat -an
and see which are the ports used in your machine( i
assume u are on windows platform) or else find the
relevant command on unix,
or u can change the port in tomcat(conf/server.xml) to
other port not used
Ashish
--- Rahul Sood <[EMAIL PROTECTED]> wrote:
>
> I have installed tomcat using  Web services
> developers pack. When trying =
> =3D
> to start tomcat according to the instructions given
> ( which is running the
> startup.bat file from the command prompt or clicking
> on start tomcat in =
> =3D
> the start menuitems ) a blank window comes up and
> vanishes in seconds and =
> =3D
> tomcat is not started.
>   Looking at the log file this is the error message
> recorded
>
> java.net.BindException: Address in use:
> JVM_Bind:8081
>   at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpE=
> =3D
> ndpoint.java:268)
>   at
>
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java=
> =3D
> :150)
>   at
>
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConne=
> =3D
> ctor.java:999)
>   at
>
org.apache.catalina.core.StandardService.initialize(StandardServ=
> =3D
> ice.java:582)
>   at
>
org.apache.catalina.core.StandardServer.initialize(StandardServe=
> =3D
> r.java:2244)
>   at
>
org.apache.catalina.startup.Catalina.start(Catalina.java:503)
>   at
>
org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
>   at
>
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
>
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
> com.sun.launcher.Launcher.main(Launcher.java:208)
> [ERROR] Http11Protocol - -Error initializing
> endpoint  =3D
> on: Address in use: JVM_Bind:8081>
> Catalina.start: LifecycleException:  Protocol
> handler initialization =3D
> failed: java.net.BindException: Address in use:
> JVM_Bind:8081
> LifecycleException:  Protocol handler initialization
> failed: java.net.BindE=
> =3D
> xception: Address in use: JVM_Bind:8081
>   at
>
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConne=
> =3D
> ctor.java:1001)
>   at
>
org.apache.catalina.core.StandardService.initialize(StandardServ=
> =3Dtar [EMAIL PROTECTED]
> ice.java:582)
>   at
>
org.apache.catalina.core.StandardServer.initialize(StandardServe=
> =3D
> r.java:2244)
>   at
>
org.apache.catalina.startup.Catalina.start(Catalina.java:503)
>   at
>
org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
>   at
>
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
>
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
> com.sun.launcher.Launcher.main(Launcher.java:208)
> Catalina.stop: LifecycleException:  This server has
> not yet been started
> LifecycleException:  This server has not yet been
> started
>   at
>
org.apache.catalina.core.StandardServer.stop(StandardServer.java=
> =3D
> :2211)
>   at
>
org.apache.catalina.startup.Catalina.start(Catalina.java:535)
>   at
>
org.apache.catalina.startup.Catalina.execute(Catalina.java:399)
>   at
>
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
>
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>   at java.lang.reflect.Method.invoke(Native Method)
>   at
> com.sun.launcher.Launcher.main(Launcher.java:208)
>
>   A prompt reply and help will be greatly
> apreciated.
>
>
>
>
>
> Rahul Sood
>
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, V

HELP How to build JK2.2.0.1 on linux

2002-10-13 Thread yoom nguyen

Does any on successful build jk 2.2.0.1 for tomcat 4.1.2 & apache 2 on
linux?

If yes, please give me some advice on how to build it on linux.

I have read a few suguested instructions, however they are all
different.  This is crazy,  We should have some instructions that work
for particular version of tomcat and jk2 posted on the apache web site.
I am volumter to create this document if you of you give me some hint to
get this build properly.

I got Tomcat 4.1.2 working and all paths are set as it should be, but I
still have these type of errors:


***
If I run ant under /distribution-from-apaches/jk/native2 directory I got
these errors

1.
[taskdef] Could not load definitions from resource META-INF/ant.tasks.
It coul
d not be found.

BUILD FAILED
file:/db2/tomcat/jk2201/jk/native2/build.xml:276: Could not create task
or type 
of type: so.


*
And if I run ant from /distribution-from-apaches/jk directory I got
these errors:
guess.server:
 [echo] Apache2 /db2/tomcat/apache2 true
 [echo] Apache13 /db2/tomcat/apache13 ${apache13.detect}
 [echo] IIS ${iis.home} ${iis.detect}
 [echo] Iplanet /db2/tomcat/iplanet6 ${iplanet.detect}


init:

apache20:

BUILD FAILED
file:/db2/tomcat/jk2201/jk/native2/build.xml:276: Could not create task
or type 
of type: so.





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




servlet with mod_jk

2002-10-13 Thread John Walstra

I've just written my first servlet. I have no problems access it through 
Tomcat via port 8080, but can't via Apache and mod_jk. I have no problems 
with JSPs, but receive a 404 error when i try to access the servlet through 
Apache. I'm using Tomcat 4.1.12 and Apache 2.0.42, if that is needed.

The error message:

HTTP Status 404 - /servlet/FlashMenu

>From my Apache http.conf ( inside Virutal Host ):

JkMount /*.jsp jkw
JkMount /servlet/* jkw

>From my web.xml:



  
FlashMenuServlet
FlashMenuServlet
  
  
FlashMenuServlet
/servlet/FlashMenu
  

What am I missing in my config or what should I look for?

-- 
John Walstra
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tomcat v4.1.12 with jk1, not jk2(not yet, at least)

2002-10-13 Thread Pae Choi

First of all, my appologies if this question has been asked before.

I have not been able to keep up with TOMCAT progress lately. But I
have been using it up to 4.0.x so I can be considered as a newbie to
v4.1.x.

I have been using a combination, Apache/HTTP(S)d + mod_jk v1.1.0 +
Tomcat v4.0.3 till now. And I have some time to explore the v4.1.12,
but like to ask some questions to who have been explore it before.

Q1: Is Tocmat v4.1.12 still support "jk" or I should say "jk1" now
  compare to new "jk2"?

Q2: If so, can it be configured same as TOMCAT v4.0.x?

Any suggestions and comments on this are welcome and will be
appreciated. Thank you.

Regards,


Pae
 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: HELP How to build JK2.2.0.1 on linux

2002-10-13 Thread Ignacio J. Ortega

> From: yoom nguyen [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, October 12, 2002 9:16 PM

> 
> ***
> If I run ant under /distribution-from-apaches/jk/native2 
> directory I got
> these errors
> 
> 1.
> [taskdef] Could not load definitions from resource META-INF/ant.tasks.
> It coul
> d not be found.
> 
> BUILD FAILED
> file:/db2/tomcat/jk2201/jk/native2/build.xml:276: Could not 
> create task
> or type 
> of type: so.
> 
> 


You need frist to compile the needed task classes for ant, to do it go
jk dir and issue ant jkant


Saludos, 
Ignacio J. Ortega 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Defining methods in JSP pages

2002-10-13 Thread Alex Muc

Yeah, that thought hit me last night as well (just after I sent the 
message of course:).  I was thinking more about the possibility of doing 
the call from some other JSP page as well.  

Do you use these features?  Do you have a prefered place for display 
related functions (model/view/controller/other)?

Alex.

Chris Means wrote:

>Alex,
>
>Are you aware that you could simply call the method that you defined
>directly in the JSP body?
>
><%!
>public String getTitle(HttpServletRequest request) {
>String id = request.getParameter("id");
>return "id: " + id;
>}
>%>
>
><%
>  String title = getTitle (request) ;
>
>  out.write (title) ;
>%>
>
>-Chris
>
>  
>
>>-Original Message-
>>From: Alex Muc [mailto:[EMAIL PROTECTED]]
>>Sent: Saturday, October 12, 2002 12:55 AM
>>To: [EMAIL PROTECTED]
>>Subject: Defining methods in JSP pages
>>
>>
>>Hi,
>>
>>I've been using JSPs for quite a while now and have been trying to find
>>better ways to do various things.  One of the features of JSPs that I
>>stumbled on a while ago was the ability to define methods in JSPs and to
>>be able to call those methods from within the page using Java Reflection
>>mechanisms.  This works relatively well (see example below), except for
>>the baggage of having to do the reflection work.  Alas, that is the
>>price we pay for a strongly typed language.
>>
>>What I'm wondering is why more people don't use the declaration syntax
>>as a way to define methods in pages and use those methods to abstract
>>out some of the functionality they need?  My answer would be that it is
>>generally frowned upon (by the MVC crowd) to put logic into the JSP page
>>and to a certain extent I agree.  But, there are times where the logic
>>code is only used to modify the display and in those cases it seems to
>>me like putting that logic into a method within the JSP makes sense.
>> For example, when building the title string of the page you often have
>>to look up or build some sort of descriptive string from the various IDs
>>of the objects that are part of the request/session to the page.  It
>>seems to me that doing this sort of operation is the kind of thing which
>>should be within the JSP page and using methods within the JSP page seem
>>to make even more sense as opposed to scriptlets.  The alternatives are:
>>1) Put the "getPageTitle" method into the Model object.  If the model is
>>supposed to capture the data of the object then it doesn't seem to me
>>like it should be cluttered with methods relevant to displaying
>>the object.
>>2) Put the "getPageTitle" method into the Controller object.  Again, if
>>the controller is the driver of the business logic of the object(s) then
>>it too doesn't seem like the right place for methods relevant to
>>displaying the object.
>>
>>It seems like using methods in JSP pages is a good idea for certain
>>things.  It also has it's downsides, the main one that I see is that
>>there is no inheritance among JSP pages.  I wonder how hard this would
>>be to add?
>>
>>Does any one have any comments about why defining methods in JSP pages
>>is a good or bad idea?  I would really appreciate hearing from you.
>>
>>Thanks for you time.
>>Alex.
>>
>>
>>***
>>Example method in a JSP page:
>>***
>>
>>
>>
>>
>><%@ page language="java" import="java.lang.reflect.*" %>
>><%!
>>public String getTitle(HttpServletRequest request) {
>>String id = request.getParameter("id");
>>return "id: " + id;
>>}
>>%>
>><%  Class c = this.getClass();
>>
>>// The types for the method call
>>Class [] pTypes = new Class [1];
>>Class hsr =
>>Class.forName("javax.servlet.http.HttpServletRequest");
>>pTypes[0] = hsr;
>>
>>// Get the method
>>Method m = c.getMethod("getTitle", pTypes);
>>
>>// Build the list of parameters to the method
>>Object [] params = new Object [1];
>>params[0] = request;
>>
>>// Invoke the method and get the result
>>String result = (String) m.invoke(this, params);
>>%>
>>Method Result: <%= result %>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
>>
>
>For additional commands, e-mail:
>
>
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>  
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: