Time does not match

2001-09-07 Thread Magnus Jansson

I live in Sweden and I have a giant trouble with time.

The jsp pages always shows the GMT time but we have GMT+1 and then we have summer and 
winter time so right now the time shows 2 hours after.

My server platform is NetWare 5.1

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - 
Magnus Jansson
IT-Manager
Väddö folkhögskola
760 40 Väddö
Sweden

Phone: +46 (0) 176-528 00
Cellular: +46 (0) 70-370 33 16
Fax: +46 (0) 176-528 28
http://www.vaddo.fhsk.se (work)
http://www.jason.pp.se (private)
ICQ: 52797837




RE: Database Driver

2001-09-07 Thread Artigas, Ricardo Y.

I'm not quite sure but try adding the jar's filepath to your tomcat startup
script (tomcat.bat).
look for the lines similar to below and add one more line for your driver.
(see line with your_sqldriver.jar).
Where did you download your driver from? hth.

:staticClasspath
echo Setting your CLASSPATH statically.
if exist %TOMCAT_HOME%\lib\ant.jar set CP=%CP%;%TOMCAT_HOME%\lib\ant.jar
if exist %TOMCAT_HOME%\lib\jasper.jar set
CP=%CP%;%TOMCAT_HOME%\lib\jasper.jar
if exist %TOMCAT_HOME%\lib\jaxp.jar set CP=%CP%;%TOMCAT_HOME%\lib\jaxp.jar
if exist %TOMCAT_HOME%\lib\parser.jar set
CP=%CP%;%TOMCAT_HOME%\lib\parser.jar
if exist %TOMCAT_HOME%\lib\servlet.jar set
CP=%CP%;%TOMCAT_HOME%\lib\servlet.jar
if exist %TOMCAT_HOME%\lib\webserver.jar set
CP=%CP%;%TOMCAT_HOME%\lib\webserver.jar
if exist %TOMCAT_HOME%\lib\your_sqldriver.jar set
CP=%CP%;%TOMCAT_HOME%\lib\your_sqldriver.jar



:~)
Ricky Y. Artigas
Analyst/Programmer /
Database Administrator
Information Technology Division
Easycall Communications Phils., Inc.
 ---
 IMPORTANT NOTICE: 
  
 This message (and any attachment hereto) may contain privileged and/or
 confidential information specific to EasyCall. If you are not the intended
 addressee indicated in this message, you may not copy or disseminate this
 message (or any attachment hereto) to anyone. Instead, please destroy this
 message (and any attachment hereto), and kindly notify the sender by reply
 email. Any information in this message (and any attachment thereto) that
 do not relate to the official business of EasyCall shall be understood as
 neither given nor endorsed by the company.
 
 
 -Original Message-
 From: Robert Turner [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, September 07, 2001 1:30 PM
 To:   tomcat-user
 Subject:  Database Driver
 
 I downloaded JSQLConnect, JDBC MSSQL type 4 driver,
 but I am failing to get it to work. I am using Windows
 XP (RC1), MSSQL7, IIS5 and Tomcat 3.3
  
 I have placed the jsqlconnect.jar in the tomcat lib
 folder and have also placed that location in the
 CLASSPATH environmental variable.
  
 The code I am using to test it is:
  
 %@ page language=java import=java.sql.* %
 !--
 File: index.jsp
 Author: Robert T Turner
 Date: September 2001
 --
 %
 
 Class.forName(com.jnetdirect.jsql.JSQLDriver);
 
 Connection
 myConn=DriverManager.getConnection(jdbc:JSQLConnect://localhost/database=
 Directoryuser=dailerpassword=phone);
 
 Statement stmt=myConn.createStatement();
 String query=SELECT * FROM Misc_Numbers ORDER BY
 description;
 
 ResultSet rs=stmt.executeQuery(query);
 
 The error message I am getting is
 
 Error: 500
 Location: /jsp/index.jsp
 Internal Servlet Error:
  
 javax.servlet.ServletException: Unable to load class
 com.jnetdirect.jsql.JSQLDriver
  at
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextI
 mpl.java:459)
  at
 _0002findex_0002ejspindex_jsp_14._jspService(_0002findex_0002ejspindex_jsp
 _14.java:118)
  at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
  at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.
 java:130)
  at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.
 java:282)
  at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
  at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
  at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
  at
 org.apache.tomcat.core.Handler.service(Handler.java:287)
  at
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
  at
 org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:
 812)
  at
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
  at
 org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnecti
 on(Ajp12ConnectionHandler.java:166)
  at
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
  at
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
  at java.lang.Thread.run(Thread.java:484)
  
 Root cause: 
 java.lang.ClassNotFoundException: Unable to load class
 com.jnetdirect.jsql.JSQLDriver
  at
 org.apache.jasper.servlet.JasperLoader.findClass(JasperLoader.java:223)
  at
 org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:147)
  at
 java.lang.ClassLoader.loadClass(ClassLoader.java:253)
  at
 java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:120)
  at
 _0002findex_0002ejspindex_jsp_14._jspService(_0002findex_0002ejspindex_jsp
 _14.java:62)
  at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
  at
 

Re: how to connect tomcat with apache running on different m/c

2001-09-07 Thread atif umar

hi,
   thanks for mailing but i didnt fully understand
what u meant do i have to set workers.properties file
on the m/c wehich has apoache runnig on it bcos
workers.properties file actualy is in the 
/tomcat/conf directory 
i have been able to connect the two but still whenever
i try to call a servlet/jsp from apache which is
placed in the 
/tomcat/examples 
then i get this error 

Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete your
request.
Please contact the server administrator,
[EMAIL PROTECTED] and inform them of the
time the error occurred, and anything you might have
done that may have caused the error.

More information about this error may be available in
the server error log.


Apache/1.3.20 Server at localhost Port 80

but the html/gif pages are served properly 
kindly suggest what to do now ?
thanks

 

--- Scott Jones [EMAIL PROTECTED] wrote: 
You need to set up server.xml on the machine that
 will be running tomcat
 so that it'll be listening on whatever port.  For
 example:
 
 Connector

className=org.apache.tomcat.service.PoolTcpConnector
   Parameter name=handler
   

value=org.apache.tomcat.service.connector.Ajp13ConnectionHandler/\
   Parameter name=port value=8009/
 /Connector
 
 Then you need to set up a worker.properties file ON
 THE APACHE box. This
 isn't very clear in the documentation (I figured it
 out yesterday.  :)).
 
 Since my apache machine doesn't have tomcat on it, I
 just made a
 directory in /etc/tomcat/conf and stuck my
 worker.properties file there.
 It'll need to look something like this:
 
 # you can name these workers whatever you want, just
 make sure you match
 # it below in the worker.[worker name].port, etc
 definitions
 worker.list=worker1
 
 # make sure this matches the port number you used in
 your server.xml in 
 # the other machine
 worker.worker1.port=8009
 # this is the IP address or host name of your tomcat
 machine
 worker.worker1.host=192.168.1.31
 worker.worker1.type=ajp13
 # I think that the lbfactor will be optional for you
 -- I actually have
 # tomcat running two instances and then use a load
 balancer worker to
 # use both.
 #worker.worker1.lbfactor=1
 worker.worker1.cachesize=10
 
 Then you'll need to set up your httpd.conf to use
 mod_jk and redirect
 the the appropriate things to your tomcat machine.
 
 For example:
 
 LoadModule jk_module  modules/mod_jk-eapi.so
 AddModule mod_jk.c
 JkWorkersFile /etc/tomcat/conf/workers.properties
 JkLogFile /var/log/mod_jk.log
 JkLogLevel error
 # use the worker name that you defined in
 worker.properties
 # if you decide to use a load balancing worker, then
 send things
 # to the load balacing worker, and it'll figure out
 which instance
 # to send it to.
 JkMount /*.jsp worker1
 
 That should do it.  Good luck!  :)
 
 Cheers,
 
 Scott
 
 On 05 Sep 2001 11:21:12 +0100, atif umar wrote:
  hi , 
 guess this is a very dumb question but i am
  having some problems in running tomcat and apache
 on
  different m/c's  
  i guess that i have to make some changes in the   
 
  1) server.xml
  2) worker.properties 
  
  and in httpd.conf 
  
  could any one tell me exactly what changes i have
 to
  make 
  this configuration used to work fine when both
 were on
  same m/c
  
  the configuration of my m/c's are
  
  - win98
  - apache 1.3.20
  - tomcat 3.2.3
  
  pls do reply as i know this being easy might not
  interest many but still any suggestions will be
 very
  helpful to me
  
  thanks in advance
  
  
  
 


  Do You Yahoo!?
  Send a newsletter, share photos  files, conduct
 polls, organize chat events. Visit http://in/
 groups.yahoo.com
  
 
  


Do You Yahoo!?
Send a newsletter, share photos  files, conduct polls, organize chat events. Visit 
http://in/ groups.yahoo.com



Re: Time does not match

2001-09-07 Thread Joakim Verona

hej,

du måste formattera tiden med Calendar klassen om du skall få till det.
den har alla möliga finesser

/joakim

Magnus Jansson wrote:

I live in Sweden and I have a giant trouble with time.

The jsp pages always shows the GMT time but we have GMT+1 and then we have summer and 
winter time so right now the time shows 2 hours after.

My server platform is NetWare 5.1

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - 
Magnus Jansson
IT-Manager
Väddö folkhögskola
760 40 Väddö
Sweden

Phone: +46 (0) 176-528 00
Cellular: +46 (0) 70-370 33 16
Fax: +46 (0) 176-528 28
http://www.vaddo.fhsk.se (work)
http://www.jason.pp.se (private)
ICQ: 52797837



-- 
Joakim Verona

www.verona.se
[EMAIL PROTECTED]







Re: New nt_service

2001-09-07 Thread Pier Fumagalli

Jonathan Eric Miller [EMAIL PROTECTED] wrote:

 Are you sure it wasn't really a .c.exe file and Explorer didn't just hide
 the extension. ;-)

H YES!~ :)

Pier




AW: struts or tomcat 3.2.1 bug?

2001-09-07 Thread juraj Lenharcik

hello,

the stange thing is, when i get the bean with useBean then i can access all
elements and put them out. no problems perform.

then i put my iterate tag to the jsp. when i debug the jsp i can see that
the bean is correctly in the scope and CAN BE ACCESSED! the iterator runs
ONCE trought the bean writes and then the scope of the bean is suddenly
lost. then i get my meaningful jsp - exception. what could be the problem???


there should be no startup mistake.


thanks
juraj






-Ursprüngliche Nachricht-
Von: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 6. September 2001 18:19
An: [EMAIL PROTECTED]
Betreff: Re: struts or tomcat 3.2.1 bug?




On Thu, 6 Sep 2001, juraj Lenharcik wrote:

 Date: Thu, 6 Sep 2001 17:36:36 +0200
 From: juraj Lenharcik [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: struts or tomcat 3.2.1 bug?

 does anyone knows about a bug in tomcat 3.2.1 with struts? i mean there
was
 a message few weeks ago, but i cant find it again. can someone give me a
 tip?

 the problem is, that i have an application under resin 2.0.2 running and
 when i put it on tomcat 3.2.1 it doesnt run. i get an exception:
 javax.servlet.ServletException: Cannot find bean data in scope
session.


Check your Tomcat log files for error and exception messages -- this kind
of thing is usually caused by missing classes at startup time.


 thanks
 juraj



Craig McClanahan




/apr.h:265: #error Can not determine the proper size for apr_int64_t

2001-09-07 Thread Chris Gokey

Hi...  I'm back trying to compile mod_webapp.so for Solaris 7 this time 
(I was able to sucessfully compile it under Linux two days ago :) . 
 After having to install:
autoconf-2.50
libtool-1.3.5
m4-1.4

I was able to run ./support/buildconf.sh
and ./configure

I'm getting stuck trying to make it, I receive this error:

All done. Now you can issue make. Good luck.
  make

Compiling sources in 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/
jakarta-tomcat-connectors/webapp/lib...
make[1]: Entering directory 
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat
-4.0-b7/jakarta-tomcat-connectors/webapp/lib'
Generating pr_warp_defs.h
Compiling wa_main.c
In file included from 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7
/jakarta-tomcat-connectors/webapp/apr/include/apr_general.h:61,
 from 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7
/jakarta-tomcat-connectors/webapp/include/wa.h:77,
 from wa_main.c:59:
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-connec
tors/webapp/apr/include/apr.h:198: #error Can not determine the proper 
size for
apr_int64_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-connec
tors/webapp/apr/include/apr.h:253: #error Can not determine the proper 
size for
ssize_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-connec
tors/webapp/apr/include/apr.h:256: #error Can not determine the proper 
size for
size_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-connec
tors/webapp/apr/include/apr.h:265: #error Can not determine the proper 
size for
apr_int64_t
make[1]: *** [wa_main.lo] Error 1
make[1]: Leaving directory 
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-
4.0-b7/jakarta-tomcat-connectors/webapp/lib'
make: *** [local-all] Error 2

This is from the latest checkout of jakarata-tomcat-connectors/webapp 
and the apr (Sept 6)


Any idea why it is returning this error?

Thanks,
Chris




solved AW: worker.properties swallows my first worker (mod_jk)

2001-09-07 Thread Hans Schmid

As Costin pointed out, the error was a cut and paste one.

my worker.list started with

worker.list=worker.list= ajp12

It should of course be
worker.list=ajp12

This typo caused interseting effects though ;)


Thanks very much for your help.
Regards,
Hans


 -Ursprüngliche Nachricht-
 Von: Larry Isaacs [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 6. September 2001 19:39
 An: '[EMAIL PROTECTED]'
 Betreff: RE: worker.properties swallows my first worker (mod_jk)


 Hi Hans,

 The answers to your questions are:

 1.) Why gets this hardcoded worker on port 8007 created?

 Don't know, I will investigate.

 2.) Is this a Bug I shall report?

Yes, and please attache the workers.properties in question.

 Thanks.

 Larry


  -Original Message-
  From: Hans Schmid [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 06, 2001 12:57 PM
  To: Tomcat-User
  Subject: worker.properties swallows my first worker (mod_jk)
 
 
  Hello,
 
  This is about mod_jk in Tomcat 3.3b1 on Solaris with Apache 1.3.19
 
  It seems to me that the first worker found in the worker.list
  always gets
  created as ajp12 on port 8007
  regardless what i configure.
 
  The following worker.list entry
  worker.list=worker.list=ajp12-01, ajp12-02, ajp13-01, ajp13-02
 
  produces 4 workers:
  ajp12-01 on port 8007  ajp12
  ajp12-02 on port 9017  ajp12
  ajp13-01 on port 9009  ajp13
  ajp13-02 on port 9019  ajp13
 
  instead of the expected:
  ajp12-01 on port 9007  ajp12
  ajp12-02 on port 9017  ajp12
  ajp13-01 on port 9009  ajp13
  ajp13-02 on port 9019  ajp13
 
  Please note the ajp12-01 worker points to port 8007 instead of 9007.
 
  When I put a space in front of the first worker I get my
  expected 4 workers
  pointing to the correct ports
  plus a 5th worker ('' on port 8007)
 
 
  The following entry in workers.properties
  worker.list=worker.list= ajp12-01, ajp12-02, ajp13-01, ajp13-02
 
  produces 5 workers instead of 4
  Please note the port 8007 for the first worker named
  worker.list= of ajp12
  I do not have a worker assigned to this port (greped through
  all config
  files).
 
 
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (207)]: Into
  build_worker_map,
  creating 5 workers
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
  build_worker_map, creating
  worker worker.list=
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]:
  wc_create_worker, about to
  create instance worker.list= of ajp12
  [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
  ajp12_worker_factory
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]:
  wc_create_worker, about to
  validate and init worker.list=
  [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
  jk_worker_t::validate
  [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
  jk_worker_t::validate for worker worker.list= contact is
  localhost:8007
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]:
  wc_create_worker, done
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]:
  build_worker_map, removing
  old worker.list= worker
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
  build_worker_map, creating
  worker ajp12-01
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]:
  wc_create_worker, about to
  create instance ajp12-01 of ajp12
  [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
  ajp12_worker_factory
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]:
  wc_create_worker, about to
  validate and init ajp12-01
  [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
  jk_worker_t::validate
  [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
  jk_worker_t::validate for worker ajp12-01 contact is localhost:9007
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]:
  wc_create_worker, done
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]:
  build_worker_map, removing
  old ajp12-01 worker
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
  build_worker_map, creating
  worker ajp12-02
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]:
  wc_create_worker, about to
  create instance ajp12-02 of ajp12
  [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
  ajp12_worker_factory
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]:
  wc_create_worker, about to
  validate and init ajp12-02
  [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
  jk_worker_t::validate
  [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
  jk_worker_t::validate for worker ajp12-02 contact is localhost:9017
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]:
  wc_create_worker, done
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]:
  build_worker_map, removing
  old ajp12-02 worker
  [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]:
  build_worker_map, creating
  worker ajp13-01
  [Thu Sep 06 18:26:17 

RE: Image file not found - why not ?

2001-09-07 Thread G.Nagarajan

hi,
try the following
- check the case of the file name, example myimage.jpg instead of
MyImage.jpg
- try giving /webapp/images/MyImage.jpg
- check if you can directly access the image by giving /webapp/images in the
browser and then see if the file is in the file list

Regards,
Nagarajan.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of James
Adams
Sent: Friday, September 07, 2001 12:49 AM
To: [EMAIL PROTECTED]
Subject: Image file not found - why not ?


I have a JSP which tries to load an image which is
referenced by a URI which is set in the request by a servlet.

img src=%= request.getAttribute(imageURL) %
 alt=IMAGE NOT FOUND

Unfortunately this has never worked because Tomcat can never
find the image.  Perhaps I am using a bad URI ?  I have the
image located under my application's base directory in a
subdirectory
named images.  The URIs I've tried are images/MyImage.jpg,
./images/MyImage.jpg and
/images/MyImage.jpg, all of which are not found when I
view the page.

Can anyone please tell me what I'm doing wrong ?  Thanks in
advance for all suggestions, and email of the responses would be
appreciated if possible ([EMAIL PROTECTED]).


-James




tomcat4: sealing violation when reloading servlets

2001-09-07 Thread Taavi Tiirik

I am encountering sealing violation problems with tomcat 4.0
(nightly build 20010825). Whenever I recompile a servlet or
change any .properties files that I use for i18n text
messages press reload, it gives ServletException like this:

Exception Report:
javax.servlet.ServletException: Servlet.init() for servlet jsp
threw exception at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:875)
...

Root Cause:
java.lang.SecurityException: sealing violation
at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
...

As I have understood it can be avoided by not having conflicts
between certain class libraries. I have plenty of them in
jre/lib/ext directory...

Is there any changes to the class loading mechanism in more
current nightly builds?

with best wishes,
Taavi





Re: Tomcat 3.3b2 and mod_jk

2001-09-07 Thread Mark Muffett

Larry

It worked perfectly!!!

I made the changes as suggested - ie apps-sota.xml changed to:

Server
 Host name=sota
   Context path= docBase=webapps/Sota /
 /Host
 Host name=sota.silly.domain.net
   Context path= docBase=webapps/Sota /
 /Host
/Server

and changed

noRoot=false

in server.xml.


This gave a mod_jk.conf like:

## Auto generated on Fri Sep 07 08:37:28 BST 2001##

IfModule !mod_jk.c
  LoadModule jk_module /usr/lib/apache/mod_jk.so
/IfModule

JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log

JkLogLevel emerg



JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /admin ajp13
JkMount /admin/* ajp13

JkMount /Sota ajp13
JkMount /Sota/* ajp13

JkMount / ajp13
JkMount /* ajp13
# To avoid Apache serving root welcome files from htdocs, update
DocumentRoot
# to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT

NameVirtualHost *
VirtualHost *
ServerName sota

JkMount / ajp13
JkMount /* ajp13
DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
/VirtualHost

VirtualHost *
ServerName sota.silly.domain.net

JkMount / ajp13
JkMount /* ajp13
DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
/VirtualHost

(which was much more like what I expected) and it worked completely with no
further changes.

Many thanks

Mark Muffett

PS One bug I have found: running startup.sh jkconf while tomcat is running
removes the ajp12.id file from the conf directory, so shutdown.sh doesn't
work.



- Original Message - 
From: Larry Isaacs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 06, 2001 5:56 PM
Subject: RE: Tomcat 3.3b2 and mod_jk


 Mark,
 
 Sorry I overlooked a detail. Out of habbit, I included a
 context path for both contexts, /Sota.  This meant that
 the correct URL would have been http://sota/Sota/index0.jsp.
 
 Instead, you want the Sota web application served as the
 root context for the two virtual hosts.  For this, change
 the contexts in the apps-sota.xml file to have:
 
 path=
 
 and in the server.xml change the ApacheConfig module to have
 
 noRoot=false
 
 The default behavior for Tomcat 3.3 is for Tomcat not to try
 to take control of Apache's root context.
 
 The setup I have available for testing doesn't allow me to test
 multiple virtual hosts fully. Your feedback will help me
 determine if it is able to work correctly in a real situation.
 
 Thanks,
 Larry
 
  -Original Message-
  From: Mark Muffett [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 06, 2001 12:11 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Tomcat 3.3b2 and mod_jk
  
  
  Larry
  
  Thanks your your comments, but it gets worse and worse...
  
  I've tried to leave everything as auto-generated as possible.  With an
  apps-sota.xml file like:
  
  Server
   Host name=sota
 Context path=/Sota docBase=webapps/Sota /
   /Host
   Host name=sota.silly.domain.net
 Context path= docBase=webapps/Sota /
   /Host
  /Server
  
  I can access http://sota.silly.domain.net:8080/index0.jsp but not
  http://sota:8080/index0.jsp (I don't understand why).
  
  
  If I run startup with the jkconf option I get mod_jk.conf as follows:
  
  ## Auto generated on Thu Sep 06 16:52:13 BST 2001##
  
  IfModule !mod_jk.c
LoadModule jk_module /usr/lib/apache/mod_jk.so
  /IfModule
  
  JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
  JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log
  
  JkLogLevel emerg
  
  
  
  JkMount /examples ajp13
  JkMount /examples/* ajp13
  
  JkMount /admin ajp13
  JkMount /admin/* ajp13
  
  JkMount /Sota ajp13
  JkMount /Sota/* ajp13
  
  NameVirtualHost *
  VirtualHost *
  ServerName sota
  
  JkMount /Sota ajp13
  JkMount /Sota/* ajp13
  /VirtualHost
  
  VirtualHost *
  ServerName sota.silly.domain.net
  /VirtualHost
  
  
  Now I can't get either http://sota/index0.jsp or
  http://sota.silly.domain.net/index0.jsp
  
  I know the auto-generated mod_jk.conf was a lot bigger with 
  Tomcat 3.3m4
  (which I managed to get to work).  (And I've tried copying 
  that across, but
  it doesn't work either).  Is there a bug here, or am I 
  missing something?
  
  
  Thanks in advance for any help.
  
  Mark Muffett
  
  
  
  - Original Message - 
  From: Larry Isaacs [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, September 06, 2001 2:37 PM
  Subject: RE: Tomcat 3.3b2 and mod_jk
  
  
   Hi Mark,
   
   I think things are misconfigured. For the URL 
  http://sota/index0.jsp,
   note that sota is all lowercase.  I assume that Apache will use
   your VirtualHost sota to serve it.  This virtual host is not
   connected to Tomat in any way.  Thus, the JSP pages are coming
   straight out of DocumentRoot as static files.
   
   Also, this looks like an auto-generated config file, yet the
   Sota web application is missing.  I'm not 

RE: How to get jk_nt_service to notice failed startup of my service?

2001-09-07 Thread Andy Bailey

In this case Tomcat has started successfully.

A Servlet throwing a ServletException from init() is not cause for
Tomcat to cease working or
to indicate a failure on startup (as there isn't one).

Andy
-Original Message-
From: Rida Ligurs [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 06, 2001 9:29 PM
To: Tomcat-User (E-mail)
Subject: How to get jk_nt_service to notice failed startup of my
service?


I've been using jk_nt_service successfully for some time now, but I've
noticed that even if my servlet's init() throws a ServletException, the
service still appears to have started successfully in the Services
Manager.

What do I have to do to get startup failure to be properly reflected in
the
Services Manager?



Request object and tomcat...

2001-09-07 Thread Mukul Singh
Does the request object get reused in Tomcat?

We have an application in which request is saved in the session (why this
was done is still a mystery). The application runs on apache/jserv. Now we
are planning to use Tomcat as the application server. My question is,
whether the saved requests in the session will in anyway hamper the
operation on Tomcat?

Many thanks.

Mukul


Re: Image file not found - why not ?

2001-09-07 Thread Vijaya Kumar

Well, If your image locates like below

/webapps
/your_Appln
/webinf

 related class files

/images

place all the image files here

then try the url mapping using ../images/imagename. Hope it'll work, b'cas
I'm usingurl(../images/bg1.jpg)   in my stylesheet. Note I'm using two
periods.

Here is some patches:
Insdide Servlet
  pw.println(htmlheadLINK href='../style/mystyle.css'
rel=stylesheet type=text/css/head);

In Style Sheet

body
{
 background: url(../images/bg1.jpg) fixed
}
a
{
 text-decoration:none
}

Rgds
Vijay

- Original Message -
From: G.Nagarajan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 1:14 PM
Subject: RE: Image file not found - why not ?


 hi,
 try the following
 - check the case of the file name, example myimage.jpg instead of
 MyImage.jpg
 - try giving /webapp/images/MyImage.jpg
 - check if you can directly access the image by giving /webapp/images in
the
 browser and then see if the file is in the file list

 Regards,
 Nagarajan.
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of James
 Adams
 Sent: Friday, September 07, 2001 12:49 AM
 To: [EMAIL PROTECTED]
 Subject: Image file not found - why not ?


 I have a JSP which tries to load an image which is
 referenced by a URI which is set in the request by a servlet.

 img src=%= request.getAttribute(imageURL) %
  alt=IMAGE NOT FOUND

 Unfortunately this has never worked because Tomcat can never
 find the image.  Perhaps I am using a bad URI ?  I have the
 image located under my application's base directory in a
 subdirectory
 named images.  The URIs I've tried are images/MyImage.jpg,
 ./images/MyImage.jpg and
 /images/MyImage.jpg, all of which are not found when I
 view the page.

 Can anyone please tell me what I'm doing wrong ?  Thanks in
 advance for all suggestions, and email of the responses would be
 appreciated if possible ([EMAIL PROTECTED]).


 -James





Why can't I get the JSP and servlet from another pc on the LAN

2001-09-07 Thread LAU ENG HUAT

Please help me :

I have tried over a month on the problem I face with mod_jk and has even
posted into
 Jguru but no reply. I feel like dropping out as my church people is
telling
 me to drop the project but I feel that I can complete this project.

 I very much hope/pray that you can help me. The problem I'm facing is
when I
 try to query from the server for JSP and servlet, I manage to get the
 result. But when I query from the LAN it gives me this error
 I'm trying to use mod_jk with ajp13 protocol.

 Ctx(www.cs.com): 404R( http:/www.cs.com/JSPWorld.jsp + null ) + null

 I'm sure my setup for Bind is correct because on apache alone , the
virtual
 hosting and html files are retrive correctly and also the nslookup
results
 were correct.

 When I include this in the server.xml it tells me the module cannot be
 found.

 !--
 RequestInterceptor
 className=org.apache.tomcat.modules.server.Ajp13Interceptor
 port=8009 /
 --


 Attach here is the 3 files
 1. httpd.conf

 ServerType standalone
 ServerRoot /application/apache
 ServerName www.cs.com
 .
 DocumentRoot /church_Webhosting

 Directory /
Options FollowSymLinks
AllowOverride None
 /Directory

 Directory /church_Webhosting
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
 /Directory
 HostnameLookups Off
 LoadModule jk_module /application/apache/libexec/mod_jk.so
 JkWorkersFile /application/jakarta-tomcat-3.2.3/conf/workers.properties

 JkLogFile /application/jakarta-tomcat-3.2.3/logs/mod_jk.log
 JkLogLevelwarn
 AliasMatch /(.*)\.html$  /church_Webhosting/html/$1.html
 JkMount  /*.jsp ajp13
 JkMount /servlet/*   ajp13

 2. Server.xml
 ?xml version=1.0 encoding=ISO-8859-1?
 Server
 Logger name=tc_logverbosityLevel = DEBUG   /
 Logger name=servlet_log   path=logs/servlet.log   /
 Logger name=JASPER_LOG  path=logs/jasper.log   verbosityLevel =
DEBUG
 /

 ContextManager debug=0 workDir=work showDebugInfo=true 
!--
 ContextInterceptor className=org.apache.tomcat.context.LogEvents
--
 ContextInterceptor className=org.apache.tomcat.context.AutoSetup /
 ContextInterceptor className=org.apache.tomcat.context.WebXmlReader
/

 !-- Uncomment out if you have JDK1.2 and want to use policy
 ContextInterceptor
 className=org.apache.tomcat.context.PolicyInterceptor / --

 ContextInterceptor
 className=org.apache.tomcat.context.LoaderInterceptor /

 ContextInterceptor
 className=org.apache.tomcat.context.DefaultCMSetter /

 ContextInterceptor
 className=org.apache.tomcat.context.WorkDirInterceptor /

 RequestInterceptor
 className=org.apache.tomcat.request.SessionInterceptor
noCookies=false
 /

 RequestInterceptor
className=org.apache.tomcat.request.SimpleMapper1
 debug=0 /

 RequestInterceptor
 className=org.apache.tomcat.request.InvokerInterceptor  debug=0
 prefix=/servlet/ /

 RequestInterceptor
 className=org.apache.tomcat.request.StaticInterceptor  debug=0
 suppress=false /

 RequestInterceptor
 className=org.apache.tomcat.session.StandardSessionInterceptor /

 RequestInterceptor
 className=org.apache.tomcat.request.AccessInterceptor   debug=0 /

 RequestInterceptor   className=org.apache.tomcat.request.SimpleRealm

 debug=0 /

 ContextInterceptor
 className=org.apache.tomcat.context.LoadOnStartupInterceptor /

 !--
 RequestInterceptor
 className=org.apache.tomcat.modules.server.Ajp13Interceptor
 port=8009 /
 --

 Connector className=org.apache.tomcat.service.PoolTcpConnector
 Parameter name=handler
 value=org.apache.tomcat.service.http.HttpConnectionHandler/
 Parameter name=port  value=8080/
 /Connector

 Connector className=org.apache.tomcat.service.PoolTcpConnector
 Parameter name=handler
 value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/
 Parameter name=port value=8007/
 /Connector

 Connector className=org.apache.tomcat.service.PoolTcpConnector
 Parameter name=handler
 value=org.apache.tomcat.service.connector.Ajp13ConnectionHandler/
 Parameter name=port  value=8009/
 /Connector

 Context path=/   docBase=/church_Webhosting/ROOT   debug = 9 
 /Context

 !--
 Host name=www.cs.com
 Context path=/   docBase=/church_Webhosting/ROOT   debug = 9 /
 /Host

 VirtualHost  www.cs.com=192.168.1.10 
 ServerName www.cs.com DocumentRoot /church_Webhosting/ROOT
 /VirtualHost
 --
 /ContextManager
 /Server

 3. worker.properties

 workers.tomcat_home=/application/jakarta-tomcat-3.2.3
 workers.java_home=/usr/java/jdk1.3.1
 ps=/
 worker.list=ajp12, ajp13
 worker.ajp12.port=8007
 worker.ajp12.host=localhost
 worker.ajp12.type=ajp12
 worker.ajp12.lbfactor=1
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 worker.loadbalancer.type=lb
 worker.loadbalancer.balanced_workers=ajp12,ajp13
 worker.inprocess.type=jni
 worker.inprocess.class_path=$(workers.tomcat_home)$(ps)classes
 worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jaxp.jar

 

RE: Apache / mod_jk / Tomcat with Hardware SSL box?

2001-09-07 Thread Mike Roberts

Thanks Jon - I had a look around, and
http://marc.theaimsgroup.com/?l=apache-modsslw=2r=1s=hardwareq=b seems
to suggest that people have managed to get internal hardware SSL working
with Apache.

Can anyone else answer the more general questions though? (ie when does
mod_jk say something was secure; is the Apache port used forwarded by
mod_jk?)

Thanks

Mike

-Original Message-
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]]
Sent: 07 September 2001 03:53
To: [EMAIL PROTECTED]
Subject: Re: Apache / mod_jk / Tomcat with Hardware SSL box?


One thing that you might want to look into assuming you haven't already
bought new hardware is that I think that you can get SSL hardware
accelerator cards rather than a separate box to do it? I don't know much
about it. I just know that I heard something about this where I work. They
were planning on doing this on a Sun box for our LDAP servers. I think that
OpenSSL was supposed to support the cards or something. So, basically,
everything would work the same way as if you weren't using hardware
acceleration, except that some of OpenSSL's processing would be offloaded to
hardware instead. I'm not an expert on this, so, I could be wrong, but, I
figured that I would mention it.

Jon

- Original Message -
From: Mike Roberts [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 06, 2001 7:32 AM
Subject: Apache / mod_jk / Tomcat with Hardware SSL box?


 Hi,

 My company currently use Apache / mod_ssl / mod_jk / Tomcat to support SSL
 in our application

 My SysAdmin department would like to switch our SSL handling to a
dedicated
 hardware solution (eg
 http://www.intel.com/network/idc/products/accel_7115.htm) to take the SSL
 load off of our Webservers. My concern with this though is that our
 application will no longer be able to discern whether a request was secure
 or not. Has anyone tried this kind of thing?

 I guess one option would be for the Hardware SSL box to point to port 443
of
 Apache, but for Apache not to actually pass these requests to mod_ssl
 (Apache's 443 could then be firewalled off from the outside world and
 assumed only used as a target from the hardware SSL box for originally
 secure requests.) As the port is 443 though, would mod_jk still treat it
as
 though SSL was enabled? I doubt it, but thought I would ask.

 Another alternative would be for our app to look for the port requested,
 rather than whether the request was secure or not. We could get the
Hardware
 SSL box to pass originally secure requests to port 443 (or anything other
 than 80 for that matter) as above. In that case though, our App would need
 to know the port number that was attached to on Apache - is this passed
 through by mod_jk?

 Details: Apache 1.3.20 / mod_ssl 2.8.4-1.3.20 / Tomcat 3.2 (with mod_jk
 setup to use AJP13) / Solaris 8

 Thanks for any help,

 Mike

 ---
 Mike Roberts
 Developer
 DigitalRum
 mailto:mike.roberts@**spamdeflector**.digitalrum.com




Re: does tomcat have the cajones?

2001-09-07 Thread jean-frederic clere

Rick Mann wrote:
 
 on 9/6/01 11:24 AM, Denis Haskin at [EMAIL PROTECTED] wrote:
 
  Er... I think you mean cojones.  A cajon is a kind of percussion instrument.
 
 Actually, a cajon is a drawer. Caja is box, so cajon could be a big
 box (colloquial).

Look to http://members.nbci.com/speaker6/jokes/cojones.html

 :-)
 
 
 Roderick Mann   rmann @ latencyzero.com.sansspam



Re: worker.properties swallows my first worker (mod_jk)

2001-09-07 Thread jean-frederic clere

Hans Schmid wrote:
 
 Hello,
 
 This is about mod_jk in Tomcat 3.3b1 on Solaris with Apache 1.3.19
 
 It seems to me that the first worker found in the worker.list always gets
 created as ajp12 on port 8007
 regardless what i configure.
 
 The following worker.list entry
 worker.list=worker.list=ajp12-01, ajp12-02, ajp13-01, ajp13-02
--! TYPO!!!

 
 produces 4 workers:
 ajp12-01 on port 8007  ajp12
 ajp12-02 on port 9017  ajp12
 ajp13-01 on port 9009  ajp13
 ajp13-02 on port 9019  ajp13
 
 instead of the expected:
 ajp12-01 on port 9007  ajp12
 ajp12-02 on port 9017  ajp12
 ajp13-01 on port 9009  ajp13
 ajp13-02 on port 9019  ajp13
 
 Please note the ajp12-01 worker points to port 8007 instead of 9007.
 
 When I put a space in front of the first worker I get my expected 4 workers
 pointing to the correct ports
 plus a 5th worker ('' on port 8007)
 
 The following entry in workers.properties
 worker.list=worker.list= ajp12-01, ajp12-02, ajp13-01, ajp13-02
 
 produces 5 workers instead of 4
 Please note the port 8007 for the first worker named worker.list= of ajp12
 I do not have a worker assigned to this port (greped through all config
 files).
 
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (207)]: Into build_worker_map,
 creating 5 workers
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]: build_worker_map, creating
 worker worker.list=
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]: wc_create_worker, about to
 create instance worker.list= of ajp12
 [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
 ajp12_worker_factory
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]: wc_create_worker, about to
 validate and init worker.list=
 [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
 jk_worker_t::validate
 [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
 jk_worker_t::validate for worker worker.list= contact is localhost:8007
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]: wc_create_worker, done
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]: build_worker_map, removing
 old worker.list= worker
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]: build_worker_map, creating
 worker ajp12-01
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]: wc_create_worker, about to
 create instance ajp12-01 of ajp12
 [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
 ajp12_worker_factory
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]: wc_create_worker, about to
 validate and init ajp12-01
 [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
 jk_worker_t::validate
 [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
 jk_worker_t::validate for worker ajp12-01 contact is localhost:9007
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]: wc_create_worker, done
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]: build_worker_map, removing
 old ajp12-01 worker
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]: build_worker_map, creating
 worker ajp12-02
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]: wc_create_worker, about to
 create instance ajp12-02 of ajp12
 [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (264)]: Into
 ajp12_worker_factory
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]: wc_create_worker, about to
 validate and init ajp12-02
 [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (182)]: Into
 jk_worker_t::validate
 [Thu Sep 06 18:26:17 2001]  [jk_ajp12_worker.c (194)]: In
 jk_worker_t::validate for worker ajp12-02 contact is localhost:9017
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]: wc_create_worker, done
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]: build_worker_map, removing
 old ajp12-02 worker
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]: build_worker_map, creating
 worker ajp13-01
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (138)]: Into wc_create_worker
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (152)]: wc_create_worker, about to
 create instance ajp13-01 of ajp13
 [Thu Sep 06 18:26:17 2001]  [jk_ajp13_worker.c (882)]: Into
 ajp13_worker_factory
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (161)]: wc_create_worker, about to
 validate and init ajp13-01
 [Thu Sep 06 18:26:17 2001]  [jk_ajp13_worker.c (412)]: Into
 jk_worker_t::validate
 [Thu Sep 06 18:26:17 2001]  [jk_ajp13_worker.c (425)]: In
 jk_worker_t::validate for worker ajp13-01 contact is localhost:9009
 [Thu Sep 06 18:26:17 2001]  [jk_ajp13_worker.c (451)]: Into
 jk_worker_t::init
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (177)]: wc_create_worker, done
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (223)]: build_worker_map, removing
 old ajp13-01 worker
 [Thu Sep 06 18:26:17 2001]  [jk_worker.c (213)]: build_worker_map, creating
 worker ajp13-02
 
 and one ajp13-02 on port 9019
 
 My questions:
 1.) Why gets this hardcoded worker on port 8007 created?
 2.) Is this a Bug I shall 

Directory Traversal Vulnerability

2001-09-07 Thread Tal Dayan

Hello,

I am looking for references to the vulnerability described at

http://www.securityfocus.com/vdb/bottom.html?vid=2518


Is it documented in Bugzilla (what bug ID) ? Is it fixed in Tomcat 
3.2.3 ?

Thanks,

Tal



RE: Database Driver

2001-09-07 Thread Robert Turner

 --- Artigas, Ricardo Y. [EMAIL PROTECTED] 
Download a trial/single use copy from 

www.j-netdirect.com

The product JSQLConnect

Robert

wrote:  I'm not quite sure but try adding the jar's
filepath
 to your tomcat startup
 script (tomcat.bat).
 look for the lines similar to below and add one more
 line for your driver.
 (see line with your_sqldriver.jar).
 Where did you download your driver from? hth.
 
 :staticClasspath
 echo Setting your CLASSPATH statically.
 if exist %TOMCAT_HOME%\lib\ant.jar set
 CP=%CP%;%TOMCAT_HOME%\lib\ant.jar
 if exist %TOMCAT_HOME%\lib\jasper.jar set
 CP=%CP%;%TOMCAT_HOME%\lib\jasper.jar
 if exist %TOMCAT_HOME%\lib\jaxp.jar set
 CP=%CP%;%TOMCAT_HOME%\lib\jaxp.jar
 if exist %TOMCAT_HOME%\lib\parser.jar set
 CP=%CP%;%TOMCAT_HOME%\lib\parser.jar
 if exist %TOMCAT_HOME%\lib\servlet.jar set
 CP=%CP%;%TOMCAT_HOME%\lib\servlet.jar
 if exist %TOMCAT_HOME%\lib\webserver.jar set
 CP=%CP%;%TOMCAT_HOME%\lib\webserver.jar
 if exist %TOMCAT_HOME%\lib\your_sqldriver.jar set
 CP=%CP%;%TOMCAT_HOME%\lib\your_sqldriver.jar
 
 
 
 :~)
 Ricky Y. Artigas
 Analyst/Programmer /
 Database Administrator
 Information Technology Division
 Easycall Communications Phils., Inc.
  ---
  IMPORTANT NOTICE: 
 
  This message (and any attachment hereto) may
 contain privileged and/or
  confidential information specific to EasyCall. If
 you are not the intended
  addressee indicated in this message, you may not
 copy or disseminate this
  message (or any attachment hereto) to anyone.
 Instead, please destroy this
  message (and any attachment hereto), and kindly
 notify the sender by reply
  email. Any information in this message (and any
 attachment thereto) that
  do not relate to the official business of EasyCall
 shall be understood as
  neither given nor endorsed by the company.
  
  
  -Original Message-
  From:   Robert Turner [SMTP:[EMAIL PROTECTED]]
  Sent:   Friday, September 07, 2001 1:30 PM
  To: tomcat-user
  Subject:Database Driver
  
  I downloaded JSQLConnect, JDBC MSSQL type 4
 driver,
  but I am failing to get it to work. I am using
 Windows
  XP (RC1), MSSQL7, IIS5 and Tomcat 3.3
   
  I have placed the jsqlconnect.jar in the tomcat
 lib
  folder and have also placed that location in the
  CLASSPATH environmental variable.
   
  The code I am using to test it is:
   
  %@ page language=java import=java.sql.* %
  !--
  File: index.jsp
  Author: Robert T Turner
  Date: September 2001
  --
  %
  
  Class.forName(com.jnetdirect.jsql.JSQLDriver);
  
  Connection
 

myConn=DriverManager.getConnection(jdbc:JSQLConnect://localhost/database=
  Directoryuser=dailerpassword=phone);
  
  Statement stmt=myConn.createStatement();
  String query=SELECT * FROM Misc_Numbers ORDER BY
  description;
  
  ResultSet rs=stmt.executeQuery(query);
  
  The error message I am getting is
  
  Error: 500
  Location: /jsp/index.jsp
  Internal Servlet Error:
   
  javax.servlet.ServletException: Unable to load
 class
  com.jnetdirect.jsql.JSQLDriver
   at
 

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextI
  mpl.java:459)
   at
 

_0002findex_0002ejspindex_jsp_14._jspService(_0002findex_0002ejspindex_jsp
  _14.java:118)
   at
 

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
   at
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 

org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.
  java:130)
   at
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.
  java:282)
   at
 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
   at
 

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
   at
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
 

org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
   at
 

org.apache.tomcat.core.Handler.service(Handler.java:287)
   at
 

org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
   at
 

org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:
  812)
   at
 

org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
   at
 

org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnecti
  on(Ajp12ConnectionHandler.java:166)
   at
 

org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
   at
 

org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
   at java.lang.Thread.run(Thread.java:484)
   
  Root cause: 
  java.lang.ClassNotFoundException: Unable to load
 class
  com.jnetdirect.jsql.JSQLDriver
   at
 

org.apache.jasper.servlet.JasperLoader.findClass(JasperLoader.java:223)
   at
 

org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:147)
   at
 

java.lang.ClassLoader.loadClass(ClassLoader.java:253)
   at
 


Re: /apr.h:265: #error Can not determine the proper size forapr_int64_t

2001-09-07 Thread Pier Fumagalli

Chris Gokey [EMAIL PROTECTED] wrote:

 Hi...  I'm back trying to compile mod_webapp.so for Solaris 7 this time
 (I was able to sucessfully compile it under Linux two days ago :) .
 After having to install:
 autoconf-2.50
 libtool-1.3.5
 m4-1.4
 
 I was able to run ./support/buildconf.sh
 and ./configure
 
 I'm getting stuck trying to make it, I receive this error:
 
 All done. Now you can issue make. Good luck.
 make
 
 Compiling sources in
 /home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/
 jakarta-tomcat-connectors/webapp/lib...
 make[1]: Entering directory
 `/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat
 -4.0-b7/jakarta-tomcat-connectors/webapp/lib'
 Generating pr_warp_defs.h
 Compiling wa_main.c
 In file included from
 /home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7
 /jakarta-tomcat-connectors/webapp/apr/include/apr_general.h:61,
from
 /home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7
 /jakarta-tomcat-connectors/webapp/include/wa.h:77,
from wa_main.c:59:
 /home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
 ec
 tors/webapp/apr/include/apr.h:198: #error Can not determine the proper
 size for
 apr_int64_t
 /home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
 ec
 tors/webapp/apr/include/apr.h:253: #error Can not determine the proper
 size for
 ssize_t
 /home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
 ec
 tors/webapp/apr/include/apr.h:256: #error Can not determine the proper
 size for
 size_t
 /home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
 ec
 tors/webapp/apr/include/apr.h:265: #error Can not determine the proper
 size for
 apr_int64_t
 make[1]: *** [wa_main.lo] Error 1
 make[1]: Leaving directory
 `/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-
 4.0-b7/jakarta-tomcat-connectors/webapp/lib'
 make: *** [local-all] Error 2
 
 This is from the latest checkout of jakarata-tomcat-connectors/webapp
 and the apr (Sept 6)
 
 
 Any idea why it is returning this error?

Yes, it seems that APR is somehow in trouble finding some of the default
definitions in length of storage pointers... Can you send over a copy of
your 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-co
nnectors/webapp/apr/include/apr.h file?

It seems that somehow configure is not recognizing those...

You might want to try also checking out the latest HEAD of apr out of CVS
and configuring your module running:

./configure --with-apr=where_you_checked_out_apr...

That might work...

Pier




Re: Tomcat 3.3b2 and mod_jk

2001-09-07 Thread Mark Muffett

Larry

It worked perfectly!!!

I made the changes as suggested - ie apps-sota.xml changed to:

Server
 Host name=sota
   Context path= docBase=webapps/Sota /
 /Host
 Host name=sota.silly.domain.net
   Context path= docBase=webapps/Sota /
 /Host
/Server

and changed

noRoot=false

in server.xml.


This gave a mod_jk.conf like:

## Auto generated on Fri Sep 07 08:37:28 BST 2001##

IfModule !mod_jk.c
  LoadModule jk_module /usr/lib/apache/mod_jk.so
/IfModule

JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log

JkLogLevel emerg



JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /admin ajp13
JkMount /admin/* ajp13

JkMount /Sota ajp13
JkMount /Sota/* ajp13

JkMount / ajp13
JkMount /* ajp13
# To avoid Apache serving root welcome files from htdocs, update
DocumentRoot
# to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT

NameVirtualHost *
VirtualHost *
ServerName sota

JkMount / ajp13
JkMount /* ajp13
DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
/VirtualHost

VirtualHost *
ServerName sota.silly.domain.net

JkMount / ajp13
JkMount /* ajp13
DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
/VirtualHost

(which was much more like what I expected) and it worked completely with no
further changes.

Many thanks

Mark Muffett

PS One bug I have found: running startup.sh jkconf while tomcat is running
removes the ajp12.id file from the conf directory, so shutdown.sh doesn't
work.


- Original Message -
From: Larry Isaacs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 06, 2001 5:56 PM
Subject: RE: Tomcat 3.3b2 and mod_jk


 Mark,

 Sorry I overlooked a detail. Out of habbit, I included a
 context path for both contexts, /Sota.  This meant that
 the correct URL would have been http://sota/Sota/index0.jsp.

 Instead, you want the Sota web application served as the
 root context for the two virtual hosts.  For this, change
 the contexts in the apps-sota.xml file to have:

 path=

 and in the server.xml change the ApacheConfig module to have

 noRoot=false

 The default behavior for Tomcat 3.3 is for Tomcat not to try
 to take control of Apache's root context.

 The setup I have available for testing doesn't allow me to test
 multiple virtual hosts fully. Your feedback will help me
 determine if it is able to work correctly in a real situation.

 Thanks,
 Larry

  -Original Message-
  From: Mark Muffett [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 06, 2001 12:11 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Tomcat 3.3b2 and mod_jk
 
 
  Larry
 
  Thanks your your comments, but it gets worse and worse...
 
  I've tried to leave everything as auto-generated as possible.  With an
  apps-sota.xml file like:
 
  Server
   Host name=sota
 Context path=/Sota docBase=webapps/Sota /
   /Host
   Host name=sota.silly.domain.net
 Context path= docBase=webapps/Sota /
   /Host
  /Server
 
  I can access http://sota.silly.domain.net:8080/index0.jsp but not
  http://sota:8080/index0.jsp (I don't understand why).
 
 
  If I run startup with the jkconf option I get mod_jk.conf as follows:
 
  ## Auto generated on Thu Sep 06 16:52:13 BST 2001##
 
  IfModule !mod_jk.c
LoadModule jk_module /usr/lib/apache/mod_jk.so
  /IfModule
 
  JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
  JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log
 
  JkLogLevel emerg
 
 
 
  JkMount /examples ajp13
  JkMount /examples/* ajp13
 
  JkMount /admin ajp13
  JkMount /admin/* ajp13
 
  JkMount /Sota ajp13
  JkMount /Sota/* ajp13
 
  NameVirtualHost *
  VirtualHost *
  ServerName sota
 
  JkMount /Sota ajp13
  JkMount /Sota/* ajp13
  /VirtualHost
 
  VirtualHost *
  ServerName sota.silly.domain.net
  /VirtualHost
 
 
  Now I can't get either http://sota/index0.jsp or
  http://sota.silly.domain.net/index0.jsp
 
  I know the auto-generated mod_jk.conf was a lot bigger with
  Tomcat 3.3m4
  (which I managed to get to work).  (And I've tried copying
  that across, but
  it doesn't work either).  Is there a bug here, or am I
  missing something?
 
 
  Thanks in advance for any help.
 
  Mark Muffett
 
 
 
  - Original Message -
  From: Larry Isaacs [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, September 06, 2001 2:37 PM
  Subject: RE: Tomcat 3.3b2 and mod_jk
 
 
   Hi Mark,
  
   I think things are misconfigured. For the URL
  http://sota/index0.jsp,
   note that sota is all lowercase.  I assume that Apache will use
   your VirtualHost sota to serve it.  This virtual host is not
   connected to Tomat in any way.  Thus, the JSP pages are coming
   straight out of DocumentRoot as static files.
  
   Also, this looks like an auto-generated config file, yet the
   Sota web application is missing.  I'm not sure why.  I'll assume
   that this a copy of the 

Fw: PROPPATCH

2001-09-07 Thread Vijaya Kumar


 Is it possible to change any of one/more properties of the DAV resource say
 add new property like author.

 author
 namesomebody/name
 href[EMAIL PROTECTED]/href
 /author

 How to overcome this problem. B'cas when I go through the
 redirection draft, when creating new resource I need to change its
 resourcetype property to redirected-ref. Plz advice.

 Thanx
 Vijay

 Whats the stand of Tomcat 4.0 b7 regarding PROPPATCH header in DAV
   Protocol. Does it supports PROPPATCH or not.
 
  No.
 
   All other headers except
   PROPPATCH is working fine, but later is always responded with HTTP 200
Ok
   status but the operation is not success. Can any one have idea...Plz
advice.
 
  Ok, I'll have it return something else. 403 or 501.
 
  Remy
 





RE: Tomcat 3.3b2 and mod_jk

2001-09-07 Thread Larry Isaacs

Mark,

Thanks for giving Tomcat 3.3 a try. I'm glad to hear of your
success.  Thanks also for the note about the ajp12.id file.
The great majority of my work is on Windows and the tomcat.bat
doesn't delete this file.  I'll see that this is removed
from the tomcat.sh.  In the meantime, you may wish to
comment out that part of the script in tomcat.sh.

Cheers,
Larry

 -Original Message-
 From: Mark Muffett [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 07, 2001 3:50 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Tomcat 3.3b2 and mod_jk
 
 
 Larry
 
 It worked perfectly!!!
 
 I made the changes as suggested - ie apps-sota.xml changed to:
 
 Server
  Host name=sota
Context path= docBase=webapps/Sota /
  /Host
  Host name=sota.silly.domain.net
Context path= docBase=webapps/Sota /
  /Host
 /Server
 
 and changed
 
 noRoot=false
 
 in server.xml.
 
 
 This gave a mod_jk.conf like:
 
 ## Auto generated on Fri Sep 07 08:37:28 BST 2001##
 
 IfModule !mod_jk.c
   LoadModule jk_module /usr/lib/apache/mod_jk.so
 /IfModule
 
 JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
 JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log
 
 JkLogLevel emerg
 
 
 
 JkMount /examples ajp13
 JkMount /examples/* ajp13
 
 JkMount /admin ajp13
 JkMount /admin/* ajp13
 
 JkMount /Sota ajp13
 JkMount /Sota/* ajp13
 
 JkMount / ajp13
 JkMount /* ajp13
 # To avoid Apache serving root welcome files from htdocs, update
 DocumentRoot
 # to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT
 
 NameVirtualHost *
 VirtualHost *
 ServerName sota
 
 JkMount / ajp13
 JkMount /* ajp13
 DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
 /VirtualHost
 
 VirtualHost *
 ServerName sota.silly.domain.net
 
 JkMount / ajp13
 JkMount /* ajp13
 DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
 /VirtualHost
 
 (which was much more like what I expected) and it worked 
 completely with no
 further changes.
 
 Many thanks
 
 Mark Muffett
 
 PS One bug I have found: running startup.sh jkconf while 
 tomcat is running
 removes the ajp12.id file from the conf directory, so 
 shutdown.sh doesn't
 work.
 
 
 - Original Message -
 From: Larry Isaacs [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, September 06, 2001 5:56 PM
 Subject: RE: Tomcat 3.3b2 and mod_jk
 
 
  Mark,
 
  Sorry I overlooked a detail. Out of habbit, I included a
  context path for both contexts, /Sota.  This meant that
  the correct URL would have been http://sota/Sota/index0.jsp.
 
  Instead, you want the Sota web application served as the
  root context for the two virtual hosts.  For this, change
  the contexts in the apps-sota.xml file to have:
 
  path=
 
  and in the server.xml change the ApacheConfig module to have
 
  noRoot=false
 
  The default behavior for Tomcat 3.3 is for Tomcat not to try
  to take control of Apache's root context.
 
  The setup I have available for testing doesn't allow me to test
  multiple virtual hosts fully. Your feedback will help me
  determine if it is able to work correctly in a real situation.
 
  Thanks,
  Larry
 
   -Original Message-
   From: Mark Muffett [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, September 06, 2001 12:11 PM
   To: [EMAIL PROTECTED]
   Subject: Re: Tomcat 3.3b2 and mod_jk
  
  
   Larry
  
   Thanks your your comments, but it gets worse and worse...
  
   I've tried to leave everything as auto-generated as 
 possible.  With an
   apps-sota.xml file like:
  
   Server
Host name=sota
  Context path=/Sota docBase=webapps/Sota /
/Host
Host name=sota.silly.domain.net
  Context path= docBase=webapps/Sota /
/Host
   /Server
  
   I can access http://sota.silly.domain.net:8080/index0.jsp but not
   http://sota:8080/index0.jsp (I don't understand why).
  
  
   If I run startup with the jkconf option I get mod_jk.conf 
 as follows:
  
   ## Auto generated on Thu Sep 06 16:52:13 BST 
 2001##
  
   IfModule !mod_jk.c
 LoadModule jk_module /usr/lib/apache/mod_jk.so
   /IfModule
  
   JkWorkersFile 
 /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
   JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log
  
   JkLogLevel emerg
  
  
  
   JkMount /examples ajp13
   JkMount /examples/* ajp13
  
   JkMount /admin ajp13
   JkMount /admin/* ajp13
  
   JkMount /Sota ajp13
   JkMount /Sota/* ajp13
  
   NameVirtualHost *
   VirtualHost *
   ServerName sota
  
   JkMount /Sota ajp13
   JkMount /Sota/* ajp13
   /VirtualHost
  
   VirtualHost *
   ServerName sota.silly.domain.net
   /VirtualHost
  
  
   Now I can't get either http://sota/index0.jsp or
   http://sota.silly.domain.net/index0.jsp
  
   I know the auto-generated mod_jk.conf was a lot bigger with
   Tomcat 3.3m4
   (which I managed to get to work).  (And I've tried copying
   that across, but
   it doesn't work either).  Is there a bug here, or am I
   missing 

Re: Fw: PROPPATCH

2001-09-07 Thread Dmitri Colebatch

I have absolutely no idea about the DAV resource stuff, but I saw the
href, and assume that expects a URI, in which case perhaps you should
prefix the email address with mailto:

cheers
dim

On Fri, 7 Sep 2001, Vijaya Kumar wrote:

 
  Is it possible to change any of one/more properties of the DAV resource say
  add new property like author.
 
  author
  namesomebody/name
  href[EMAIL PROTECTED]/href
  /author
 
  How to overcome this problem. B'cas when I go through the
  redirection draft, when creating new resource I need to change its
  resourcetype property to redirected-ref. Plz advice.
 
  Thanx
  Vijay
 
  Whats the stand of Tomcat 4.0 b7 regarding PROPPATCH header in DAV
Protocol. Does it supports PROPPATCH or not.
  
   No.
  
All other headers except
PROPPATCH is working fine, but later is always responded with HTTP 200
 Ok
status but the operation is not success. Can any one have idea...Plz
 advice.
  
   Ok, I'll have it return something else. 403 or 501.
  
   Remy
  
 
 
 




RE: Question from a relatively new user: Minimizing the installation footprint of Tomcat

2001-09-07 Thread Larry Isaacs

Anthony,

My understanding is that a JDK is asked for so that the
tools.jar is available as the default Java compiler.  It's only
used as part of converting JSP's to class files.  If you
JSP's are already compiled to servlets, I believe a JRE
would be sufficient.

As for getting a footprint under 30M, that's not something
I have tried. If you wish to consider Tomcat 3.3, it supports
startup without reading the server.xml file.  In your case
some of the modules, such and the JSP related ones, could
be removed to reduce Tomcat's footprint.

Cheers,
Larry


 -Original Message-
 From: Anthony T Matsushita
 [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 06, 2001 4:39 PM
 To: [EMAIL PROTECTED]
 Subject: Question from a relatively new user: Minimizing the
 installation footprint of Tomcat
 
 
 Hi,
 
 I'm working on an embedded system using Linux as the OS.  My group is
 currently evaluating technologies to use as a front end to our
 configuration software and would like a Web front-end.  We're 
 evaluating
 JSP versus Perl / CGI (maybe embPerl).
 
 I was wondering how to minimize Tomcat's installation for 
 deployment after
 we have developed our web-application (all the html and jsp pages and
 supporting classes and beans would be finalized).  Is Java 
 SDK 1.3 really
 necessary to run Tomcat.  Can we have a Java Runtime 
 Environment installed
 instead?  (I'm guessing that Tomcat might use something in SDK 1.3 to
 complie it's JSP pages into Servlets)
 
 I need to get the footprint to be under 30 MB total, 
 hopefully well under
 that if possible.  I was wondering if this is at all 
 attainable, and if
 anyone has any comments or suggestions?
 
 Thanks! -Anthony
 



forward from servlet to JSP got slow

2001-09-07 Thread Aravind Naidu

Hi,
Environment is Tomcat 3.2.3 on Linux.

All of a sudden the forward from a servlet to a JSP page got very slow. It
is weird in that we have 2 servers in a load balance pool and it started
happening on 1 server and while debugging it, I stoped and started the other
one and it started happening in the other also.

Any clues ? It eventually gets there but it takes about 15 seconds.

The code is like this.
getServletContext().getRequestDispatcher(nextPage).forward(req, res);


-- Aravind





RE: Multiple Tomcat Instances

2001-09-07 Thread Marjou Xavier

Hello,

Each Tomcat can be interfaced with a HTTP client with 2 different ways (defined in 
server.xml)
- either with regular HTTP (eg: on port 8080)
- or/and indirectly via Apache (AJP protocol is used, eg port 8007)
If you use HTTP via Apache, Apache will need mod_jk.conf and worker.properties to know 
how to dialogue with Tomcat
If you use only one instance of Tomcat, then the default files (server.xml, 
mod_jk.conf-auto and worker.properties) work well.


Now if you use 2 Tomcats,  you can do:
- in server1.xml
- HTTP on port 8080)
- AJP on port 8007)
-in server2.xml
- HTTP on port 8081)
- AJP on port 8009)
Each Tomcat will have its own socket for serving HTTP. It is not possible to share a 
socket (eg: 8080) between to Tomcats as you are trying to do.

If you use HTTP via Apache, Apache will need to write your own mod_jk.conf and 
worker.properties. (It is important to realize that the default ones are working only 
when there is the default configuration of Tomcat (ie: only one Tomcat)).

I hope this help,
Xavier Marjou








RE: Multiple Tomcat Instances

2001-09-07 Thread Marjou Xavier

 If you use HTTP via Apache, Apache will need to write your own mod_jk.conf and 
worker.properties
I wanted to say : If you use HTTP via Apache, YOU will need to write your own 
mod_jk.conf and worker.properties

Sorry about it




Tomcat v3.3b2 and mod_jk (again)

2001-09-07 Thread Mark Muffett

Larry

Having got yesterday's setup to work, I thought I'd try to go one step
further (having browsed some of the previous correspondence about mod_jk).

Since sota and sota.silly.domain.net are the same site, I tried making
apps-sota.xml as follows:

Server
 Host name=sota
   alias name=sota.silly.domain.net /
   Context path= docBase=webapps/Sota /
 /Host
/Server

This gave me an auto-generated mod_jk.conf as follows:

## Auto generated on Fri Sep 07 12:28:23 BST 2001##

IfModule !mod_jk.c
  LoadModule jk_module /usr/lib/apache/mod_jk.so
/IfModule

JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log

JkLogLevel emerg



JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /admin ajp13
JkMount /admin/* ajp13

JkMount /Sota ajp13
JkMount /Sota/* ajp13

JkMount / ajp13
JkMount /* ajp13
# To avoid Apache serving root welcome files from htdocs, update
DocumentRoot
# to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT

NameVirtualHost *
VirtualHost *
ServerName sota

JkMount / ajp13
JkMount /* ajp13
DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
/VirtualHost


(no mention of sota.silly.domain.net)

Now sota works, but sota.silly.domain.net doesn't (and
sota.silly.domain.net:8080 just gives the default tomcat page).

Any thoughts (or should I just go back to what I had before...

Many thanks

Mark




RE: Tomcat v3.3b2 and mod_jk (again)

2001-09-07 Thread Larry Isaacs

Mark,

Yes, there should be a mention of sota.silly.domain.net.  Assuming
an accurate cut and paste, try capitalizing the 'a' in alias ...
and try again.

The Alias approach does have the effect of mapping sota and
sota.silly.domain.net to the same context. This could be seen as
an advantage or disadvantage depending on your requirements.

Cheers,
Larry

 -Original Message-
 From: Mark Muffett [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 07, 2001 7:48 AM
 To: [EMAIL PROTECTED]
 Subject: Tomcat v3.3b2 and mod_jk (again)
 
 
 Larry
 
 Having got yesterday's setup to work, I thought I'd try to go one step
 further (having browsed some of the previous correspondence 
 about mod_jk).
 
 Since sota and sota.silly.domain.net are the same site, I tried making
 apps-sota.xml as follows:
 
 Server
  Host name=sota
alias name=sota.silly.domain.net /
Context path= docBase=webapps/Sota /
  /Host
 /Server
 
 This gave me an auto-generated mod_jk.conf as follows:
 
 ## Auto generated on Fri Sep 07 12:28:23 BST 2001##
 
 IfModule !mod_jk.c
   LoadModule jk_module /usr/lib/apache/mod_jk.so
 /IfModule
 
 JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
 JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log
 
 JkLogLevel emerg
 
 
 
 JkMount /examples ajp13
 JkMount /examples/* ajp13
 
 JkMount /admin ajp13
 JkMount /admin/* ajp13
 
 JkMount /Sota ajp13
 JkMount /Sota/* ajp13
 
 JkMount / ajp13
 JkMount /* ajp13
 # To avoid Apache serving root welcome files from htdocs, update
 DocumentRoot
 # to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT
 
 NameVirtualHost *
 VirtualHost *
 ServerName sota
 
 JkMount / ajp13
 JkMount /* ajp13
 DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
 /VirtualHost
 
 
 (no mention of sota.silly.domain.net)
 
 Now sota works, but sota.silly.domain.net doesn't (and
 sota.silly.domain.net:8080 just gives the default tomcat page).
 
 Any thoughts (or should I just go back to what I had before...
 
 Many thanks
 
 Mark
 



RE: Directory Traversal Vulnerability

2001-09-07 Thread Larry Isaacs

Given that the document mentions that it is fixed in 
Tomcat 3.2.2beta2, the fix would also appear in Tomcat 3.2.3.
This issue is addressed in the current releases of
Tomcat 3.3 and Tomcat 4.0.

Cheers,
Larry

 -Original Message-
 From: Tal Dayan [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 07, 2001 6:15 AM
 To: [EMAIL PROTECTED]
 Subject: Directory Traversal Vulnerability
 
 
 Hello,
 
 I am looking for references to the vulnerability described at
 
 http://www.securityfocus.com/vdb/bottom.html?vid=2518
 
 
 Is it documented in Bugzilla (what bug ID) ? Is it fixed in Tomcat 
 3.2.3 ?
 
 Thanks,
 
 Tal
 



Re: Tomcat v3.3b2 and mod_jk (again)

2001-09-07 Thread Mark Muffett

Larry

It works fine!!!

One more question (to which I should know the answer): I need the classes in
postgresql.jar for my JDBC Realms login - is there a directory under
TOMCAT_HOME where I should put the file, or is it best just to leave it in
my CLASSPATH?

Many thanks for your help.

Mark

- Original Message -
From: Larry Isaacs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 12:56 PM
Subject: RE: Tomcat v3.3b2 and mod_jk (again)


 Mark,

 Yes, there should be a mention of sota.silly.domain.net.  Assuming
 an accurate cut and paste, try capitalizing the 'a' in alias ...
 and try again.

 The Alias approach does have the effect of mapping sota and
 sota.silly.domain.net to the same context. This could be seen as
 an advantage or disadvantage depending on your requirements.

 Cheers,
 Larry

  -Original Message-
  From: Mark Muffett [mailto:[EMAIL PROTECTED]]
  Sent: Friday, September 07, 2001 7:48 AM
  To: [EMAIL PROTECTED]
  Subject: Tomcat v3.3b2 and mod_jk (again)
 
 
  Larry
 
  Having got yesterday's setup to work, I thought I'd try to go one step
  further (having browsed some of the previous correspondence
  about mod_jk).
 
  Since sota and sota.silly.domain.net are the same site, I tried making
  apps-sota.xml as follows:
 
  Server
   Host name=sota
 alias name=sota.silly.domain.net /
 Context path= docBase=webapps/Sota /
   /Host
  /Server
 
  This gave me an auto-generated mod_jk.conf as follows:
 
  ## Auto generated on Fri Sep 07 12:28:23 BST 2001##
 
  IfModule !mod_jk.c
LoadModule jk_module /usr/lib/apache/mod_jk.so
  /IfModule
 
  JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
  JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log
 
  JkLogLevel emerg
 
 
 
  JkMount /examples ajp13
  JkMount /examples/* ajp13
 
  JkMount /admin ajp13
  JkMount /admin/* ajp13
 
  JkMount /Sota ajp13
  JkMount /Sota/* ajp13
 
  JkMount / ajp13
  JkMount /* ajp13
  # To avoid Apache serving root welcome files from htdocs, update
  DocumentRoot
  # to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT
 
  NameVirtualHost *
  VirtualHost *
  ServerName sota
 
  JkMount / ajp13
  JkMount /* ajp13
  DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
  /VirtualHost
 
 
  (no mention of sota.silly.domain.net)
 
  Now sota works, but sota.silly.domain.net doesn't (and
  sota.silly.domain.net:8080 just gives the default tomcat page).
 
  Any thoughts (or should I just go back to what I had before...
 
  Many thanks
 
  Mark
 





Tomcat 4.0b7 and getRequestDispatcher().forward()

2001-09-07 Thread Paul Kofon

Hi,
I moved an application from T3.2.2 to T4.0b7 and I get the following error 
message when a call is made to getRequestDispatcher().forward() in the 
doPost() method of two servlets like this:

getServletConfig().getServletContext().getRequestDispatcher(/pages/my.jsp).forward(request,
 
response);

The strange thing is that from one servlet within the same application, I 
don't get the error message. I take the same application back to T3.2.2 and 
everything is fine. I simply don't get it!

Regards,

Paul.

A Servlet Exception Has Occurred
Exception Report:
org.apache.jasper.JasperException: Unable to compile class for JSP
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:543)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:430)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:354)
at DomBuilderServlet.doPost(DomBuilderServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:1145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
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.java:215)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
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:2314)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
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:1000)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093)
at java.lang.Thread.run(Thread.java:484)

Root Cause:
java.lang.SecurityException: sealing violation
at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at 
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:670)
at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1088)
at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:987)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at 
org.apache.jasper.compiler.JspParseEventListener.(JspParseEventListener.java:148)
at org.apache.jasper.compiler.ParserController.(ParserController.java:154)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:528)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
 

RE: Tomcat v3.3b2 and mod_jk (again)

2001-09-07 Thread Larry Isaacs

Mark,

Both Tomcat 3.3, and I believe Tomcat 4.0 as well, ignore your
CLASSPATH. They construct a classloader hierarchy more complicated
than you typical application would use.  As a result, some
thought is required to place your classes in the appropriate
classloader. The primary question is whether your classes
should be visible to web applications, to the server classes,
or both.  For Tomcat 3.3, this is documented at:

http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_classes

I haven't tried using a JDBCRealm, so off the top of my
head, I can't say for certain where the proper location is.
Since it is interacting with the JDBCRealm module, you might
try putting postgresql.jar in the lib/container
directory.  If that doesn't work, try lib/common.

Larry


 -Original Message-
 From: Mark Muffett [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 07, 2001 8:14 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Tomcat v3.3b2 and mod_jk (again)
 
 
 Larry
 
 It works fine!!!
 
 One more question (to which I should know the answer): I need 
 the classes in
 postgresql.jar for my JDBC Realms login - is there a directory under
 TOMCAT_HOME where I should put the file, or is it best just 
 to leave it in
 my CLASSPATH?
 
 Many thanks for your help.
 
 Mark
 
 - Original Message -
 From: Larry Isaacs [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, September 07, 2001 12:56 PM
 Subject: RE: Tomcat v3.3b2 and mod_jk (again)
 
 
  Mark,
 
  Yes, there should be a mention of sota.silly.domain.net.  Assuming
  an accurate cut and paste, try capitalizing the 'a' in alias ...
  and try again.
 
  The Alias approach does have the effect of mapping sota and
  sota.silly.domain.net to the same context. This could be seen as
  an advantage or disadvantage depending on your requirements.
 
  Cheers,
  Larry
 
   -Original Message-
   From: Mark Muffett [mailto:[EMAIL PROTECTED]]
   Sent: Friday, September 07, 2001 7:48 AM
   To: [EMAIL PROTECTED]
   Subject: Tomcat v3.3b2 and mod_jk (again)
  
  
   Larry
  
   Having got yesterday's setup to work, I thought I'd try 
 to go one step
   further (having browsed some of the previous correspondence
   about mod_jk).
  
   Since sota and sota.silly.domain.net are the same site, I 
 tried making
   apps-sota.xml as follows:
  
   Server
Host name=sota
  alias name=sota.silly.domain.net /
  Context path= docBase=webapps/Sota /
/Host
   /Server
  
   This gave me an auto-generated mod_jk.conf as follows:
  
   ## Auto generated on Fri Sep 07 12:28:23 BST 
 2001##
  
   IfModule !mod_jk.c
 LoadModule jk_module /usr/lib/apache/mod_jk.so
   /IfModule
  
   JkWorkersFile 
 /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
   JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log
  
   JkLogLevel emerg
  
  
  
   JkMount /examples ajp13
   JkMount /examples/* ajp13
  
   JkMount /admin ajp13
   JkMount /admin/* ajp13
  
   JkMount /Sota ajp13
   JkMount /Sota/* ajp13
  
   JkMount / ajp13
   JkMount /* ajp13
   # To avoid Apache serving root welcome files from htdocs, update
   DocumentRoot
   # to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT
  
   NameVirtualHost *
   VirtualHost *
   ServerName sota
  
   JkMount / ajp13
   JkMount /* ajp13
   DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
   /VirtualHost
  
  
   (no mention of sota.silly.domain.net)
  
   Now sota works, but sota.silly.domain.net doesn't (and
   sota.silly.domain.net:8080 just gives the default tomcat page).
  
   Any thoughts (or should I just go back to what I had before...
  
   Many thanks
  
   Mark
  
 
 



Re: Tomcat v3.3b2 and mod_jk (again)

2001-09-07 Thread Mark Muffett

Larry

Many thanks

Mark

- Original Message -
From: Larry Isaacs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 1:27 PM
Subject: RE: Tomcat v3.3b2 and mod_jk (again)


 Mark,

 Both Tomcat 3.3, and I believe Tomcat 4.0 as well, ignore your
 CLASSPATH. They construct a classloader hierarchy more complicated
 than you typical application would use.  As a result, some
 thought is required to place your classes in the appropriate
 classloader. The primary question is whether your classes
 should be visible to web applications, to the server classes,
 or both.  For Tomcat 3.3, this is documented at:


http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_
classes

 I haven't tried using a JDBCRealm, so off the top of my
 head, I can't say for certain where the proper location is.
 Since it is interacting with the JDBCRealm module, you might
 try putting postgresql.jar in the lib/container
 directory.  If that doesn't work, try lib/common.

 Larry


  -Original Message-
  From: Mark Muffett [mailto:[EMAIL PROTECTED]]
  Sent: Friday, September 07, 2001 8:14 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Tomcat v3.3b2 and mod_jk (again)
 
 
  Larry
 
  It works fine!!!
 
  One more question (to which I should know the answer): I need
  the classes in
  postgresql.jar for my JDBC Realms login - is there a directory under
  TOMCAT_HOME where I should put the file, or is it best just
  to leave it in
  my CLASSPATH?
 
  Many thanks for your help.
 
  Mark
 
  - Original Message -
  From: Larry Isaacs [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, September 07, 2001 12:56 PM
  Subject: RE: Tomcat v3.3b2 and mod_jk (again)
 
 
   Mark,
  
   Yes, there should be a mention of sota.silly.domain.net.  Assuming
   an accurate cut and paste, try capitalizing the 'a' in alias ...
   and try again.
  
   The Alias approach does have the effect of mapping sota and
   sota.silly.domain.net to the same context. This could be seen as
   an advantage or disadvantage depending on your requirements.
  
   Cheers,
   Larry
  
-Original Message-
From: Mark Muffett [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 7:48 AM
To: [EMAIL PROTECTED]
Subject: Tomcat v3.3b2 and mod_jk (again)
   
   
Larry
   
Having got yesterday's setup to work, I thought I'd try
  to go one step
further (having browsed some of the previous correspondence
about mod_jk).
   
Since sota and sota.silly.domain.net are the same site, I
  tried making
apps-sota.xml as follows:
   
Server
 Host name=sota
   alias name=sota.silly.domain.net /
   Context path= docBase=webapps/Sota /
 /Host
/Server
   
This gave me an auto-generated mod_jk.conf as follows:
   
## Auto generated on Fri Sep 07 12:28:23 BST
  2001##
   
IfModule !mod_jk.c
  LoadModule jk_module /usr/lib/apache/mod_jk.so
/IfModule
   
JkWorkersFile
  /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log
   
JkLogLevel emerg
   
   
   
JkMount /examples ajp13
JkMount /examples/* ajp13
   
JkMount /admin ajp13
JkMount /admin/* ajp13
   
JkMount /Sota ajp13
JkMount /Sota/* ajp13
   
JkMount / ajp13
JkMount /* ajp13
# To avoid Apache serving root welcome files from htdocs, update
DocumentRoot
# to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT
   
NameVirtualHost *
VirtualHost *
ServerName sota
   
JkMount / ajp13
JkMount /* ajp13
DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
/VirtualHost
   
   
(no mention of sota.silly.domain.net)
   
Now sota works, but sota.silly.domain.net doesn't (and
sota.silly.domain.net:8080 just gives the default tomcat page).
   
Any thoughts (or should I just go back to what I had before...
   
Many thanks
   
Mark
   
  
 





The Problem Posted Again....

2001-09-07 Thread Ron Nicoletti Jr.

I've completed my installation of jakarta-tomcat-3.2.3 on windows 2000
running IIS, and ISA Server.

The positives ...
Tomcat starts and creates log files
IIS is showing a green up arrow on isapi_redirect.dll

The Negatives ...
When I run a test on the link http://www.mktginc.com/examples/jsp/index.html
my tomcat log displays the following:
[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61
[jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1
[jk_isapi_plugin.c (554)]: HttpExtensionProc error, service() failed

The WiN 2000 Server machine ...
ISA redirects all http requests to port 81.
IIS is setup to listen to port 81


Ron Nicoletti Jr.
Network Administrator
(631) 277-7000
[EMAIL PROTECTED]




AW: Problem with URLs

2001-09-07 Thread Kim Hübel

Hi,

Maybe your problem would be solved by adding / into the path= section...

 -Ursprüngliche Nachricht-
 Von: Andrés Bernal [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 6. September 2001 01:15
 An: Tomcat User
 Betreff: Problem with URLs


 Hi, I have Apache 1.3.20 + Tomcat 3.2.3 + JBoss 2.4.
 The problem is that sometimes (not all the time) when clicking URLs  (well
 written: http://host.com/page.html) in generated JSP pages, Tomcat answers
 with 404 File Not Found http:/host.com/page.html (Note that is http:/ and
 not http://) and in the browser location appears the correct URL.

 Where is the problem?

 (I have the following context in Tomcat:

 Context path=
   docBase=webapps/ROOT
   crossContext=true
   debug=0
   reloadable=false
   trusted=false
 /Context

 In Apache:

 JkMount /*.jsp ajp13
 JkMount /b2bportales/* ajp13
 )

 Thanks for your help!

 Andrés Bernal
 Engineer of Development
 B2BPortales
 Norma Comunicaciones S.A.
 [EMAIL PROTECTED]
 Tel: (57 4) 3122791
  (57 1) 4106355









How can I have a class run on start-up?

2001-09-07 Thread Alex Colic

Hi,

hopefully someone can help me with this. I need some type of a class to
start when the web server starts. This class is going to bind itself to a
port and listen to commands from a VB app. Other classes in other web apps
will register themselves with this class to receive these commands.

My questions are:

1: how can you have a class start when the web server starts? This needs to
work with all web servers.
2: how can you have a class in a web app register itself with the class
listening on the port?

Any suggestions are appreciated.

Regards

Alex Colic




More info. RE: forward from servlet to JSP got slow

2001-09-07 Thread Aravind Naidu

I have more info. Turned all debug values on in Tomcat and this is the
trace. As one can see there is 5 sec gap between the last 2 lines, and I
have no idea what goes on there.


2001-09-07 21:38:02 - ContextManager: SimpleMapper1: SM: Found extension
mapping
 jsp(org.apache.jasper.servlet.JspServlet/null)
2001-09-07 21:38:02 - ContextManager: SimpleMapper1: SM: After mapping R(  +
/le
on/menu-look1.jsp + null) jsp(org.apache.jasper.servlet.JspServlet/null)
2001-09-07 21:38:02 - ContextManager: After processing: R(  +
/leon/menu-look1.j
sp + null)
2001-09-07 21:38:02 - Ctx(  ): Get real path /leon/menu-look1.jsp
/opt/tomcat/we
bapps/ROOT/leon/menu-look1.jsp /opt/tomcat/webapps/ROOT
2001-09-07 21:38:02 - Ctx(  ): Get real path /leon/menu-look1.jsp
/opt/tomcat/we
bapps/ROOT/leon/menu-look1.jsp /opt/tomcat/webapps/ROOT
2001-09-07 21:38:02 - Ctx(  ): Get real path /leon/menu-look1.jsp
/opt/tomcat/we
bapps/ROOT/leon/menu-look1.jsp /opt/tomcat/webapps/ROOT
2001-09-07 21:38:07 - ContextManager: SimpleRealm: Verify user=null
pass=null


-- Aravind


-Original Message-
From: Aravind Naidu [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 September 2001 19:34
To: [EMAIL PROTECTED]
Subject: forward from servlet to JSP got slow


Hi,
Environment is Tomcat 3.2.3 on Linux.

All of a sudden the forward from a servlet to a JSP page got very slow. It
is weird in that we have 2 servers in a load balance pool and it started
happening on 1 server and while debugging it, I stoped and started the other
one and it started happening in the other also.

Any clues ? It eventually gets there but it takes about 15 seconds.

The code is like this.
getServletContext().getRequestDispatcher(nextPage).forward(req, res);


-- Aravind




Re: Question from a relatively new user: Minimizing the installation footprint of Tomcat

2001-09-07 Thread Jonathan Eric Miller

He's talking about what is required for running in a production environment,
not a development environment.

Jon

- Original Message -
From: Raimee [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 06, 2001 11:17 PM
Subject: Re: Question from a relatively new user: Minimizing the
installation footprint of Tomcat


 Actually, you'll need at least the servletapi if you want to write either
and
 certainly a JDK . The
 servlet api ships with Tomcat and Java Runtimes are commonly packaged with
 JDK's.

 Jonathan Eric Miller wrote:

  If you write servlets instead of JSPs I would assume that you can get
away
  with only using the JRE instead of the full JDK. I've never tried it
myself
  though. I see that RUNNING.TXT says to download the JDK though. That
could
  be because they're assuming that you're setting up a development
environment
  though.
 
  Jon
 
  - Original Message -
  From: Anthony T Matsushita [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, September 06, 2001 3:39 PM
  Subject: Question from a relatively new user: Minimizing the
installation
  footprint of Tomcat
 
   Hi,
  
   I'm working on an embedded system using Linux as the OS.  My group is
   currently evaluating technologies to use as a front end to our
   configuration software and would like a Web front-end.  We're
evaluating
   JSP versus Perl / CGI (maybe embPerl).
  
   I was wondering how to minimize Tomcat's installation for deployment
after
   we have developed our web-application (all the html and jsp pages and
   supporting classes and beans would be finalized).  Is Java SDK 1.3
really
   necessary to run Tomcat.  Can we have a Java Runtime Environment
installed
   instead?  (I'm guessing that Tomcat might use something in SDK 1.3 to
   complie it's JSP pages into Servlets)
  
   I need to get the footprint to be under 30 MB total, hopefully well
under
   that if possible.  I was wondering if this is at all attainable, and
if
   anyone has any comments or suggestions?
  
   Thanks! -Anthony
  





Re: tomcat4: sealing violation when reloading servlets

2001-09-07 Thread Jonathan Eric Miller

I don't know for sure if this will help, but, if you have application
specific .jar files that are stored somewhere other than under your
WEB-INF/lib directory, you might want to try to move them there and see if
that makes a difference. What I always try to do when resolving a problem
like this is revert back to the basic installation, test out the sample
programs, make sure that works, then, start adding things back one at a time
until it breaks.

Jon

- Original Message -
From: Taavi Tiirik [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 2:48 AM
Subject: tomcat4: sealing violation when reloading servlets


 I am encountering sealing violation problems with tomcat 4.0
 (nightly build 20010825). Whenever I recompile a servlet or
 change any .properties files that I use for i18n text
 messages press reload, it gives ServletException like this:

 Exception Report:
 javax.servlet.ServletException: Servlet.init() for servlet jsp
 threw exception at
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:875)
 ...

 Root Cause:
 java.lang.SecurityException: sealing violation
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
 ...

 As I have understood it can be avoided by not having conflicts
 between certain class libraries. I have plenty of them in
 jre/lib/ext directory...

 Is there any changes to the class loading mechanism in more
 current nightly builds?

 with best wishes,
 Taavi






RE: The Problem Posted Again....

2001-09-07 Thread Larry Isaacs

After checking some header files, it appears that errno 61
is connection refused.  This suggests that the port number
isapi_redirect is using (via workers.properties) and
the port Tomcat is using (via server.xml) don't match.

Larry

 -Original Message-
 From: Ron Nicoletti Jr. [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 07, 2001 9:00 AM
 To: [EMAIL PROTECTED]
 Subject: The Problem Posted Again
 
 
 I've completed my installation of jakarta-tomcat-3.2.3 on windows 2000
 running IIS, and ISA Server.
 
 The positives ...
 Tomcat starts and creates log files
 IIS is showing a green up arrow on isapi_redirect.dll
 
 The Negatives ...
 When I run a test on the link 
 http://www.mktginc.com/examples/jsp/index.html
 my tomcat log displays the following:
 [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61
 [jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, Error sd = -1
 [jk_isapi_plugin.c (554)]: HttpExtensionProc error, service() failed
 
 The WiN 2000 Server machine ...
 ISA redirects all http requests to port 81.
 IIS is setup to listen to port 81
 
 
 Ron Nicoletti Jr.
 Network Administrator
 (631) 277-7000
 [EMAIL PROTECTED]
 



apache calling tomcat context path ???

2001-09-07 Thread Penny Tse

Hi,
  I have the following setting of web.xml for my webapplication
*
   servlet
  servlet-namegetFile/servlet-name
  description
  /description
  servlet-classgetfile/servlet-class
/servlet

servlet-mapping
  servlet-namegetFile/servlet-name
  url-pattern/int/*/url-pattern
/servlet-mapping
***
It is fine that using just tomcat, I can get response by
calling /web-application/int/1232378/123.jpg


but when I using apache-tomcat, the apache cannot pass the request to
the specified servlet instead finding the file in physical file,
how can I get this work ??
Thanks

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




How to declare Output as Image?

2001-09-07 Thread Andrej Rosenheinrich

Hello,

i have a servlet, getting an BufferedImage, that shall be displayed in 
my webpage. for doing this I use the following code:

ServletOutputStream sos = response.getOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
encoder.encode(image);

(image is the Buffered Image)
Well, the servlet does something, the title-line even claims that there 
is a graphic of  a certain size (the right one, btw ;-)), but in the 
page is only the url of the servlet :-(
I guess, I somehow have to tell the servlet/outputstream??? that the 
upcoming data is an image. right? how can i do this in a servlet? any hints?

TIA
Andrej




Re: how to connect tomcat with apache running on different m/c

2001-09-07 Thread Scott Jones

Hi Atif,

Yeah, it's very confusing because 99% of people run tomcat and apache on
the same machines so worker.properties is included along with tomcat.
The copy of it that you have on your tomcat machine will not do
anything.

 i have been able to connect the two 

How are you sure?

 but the html/gif pages are served properly 

Where do you have those?  Are they on the apache machine or the tomcat
machine (they should be on the apache machine).

Just make sure that your tomcat machine has a correct server.xml file
(with connector(s) on the ports that your worker(s) on the apache
machine will try to use).  If you send copies of your worker.properties,
server.xml, and httpd.conf, I'll be able to help you a little bit more.

Cheers,

Scott

On 07 Sep 2001 08:02:15 +0100, atif umar wrote:
 hi,
thanks for mailing but i didnt fully understand
 what u meant do i have to set workers.properties file
 on the m/c wehich has apoache runnig on it bcos
 workers.properties file actualy is in the 
 /tomcat/conf directory 
 i have been able to connect the two but still whenever
 i try to call a servlet/jsp from apache which is
 placed in the 
 /tomcat/examples 
 then i get this error 
 
 Internal Server Error
 The server encountered an internal error or
 misconfiguration and was unable to complete your
 request.
 Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the
 time the error occurred, and anything you might have
 done that may have caused the error.
 
 More information about this error may be available in
 the server error log.
 
 
 Apache/1.3.20 Server at localhost Port 80
 
 but the html/gif pages are served properly 
 kindly suggest what to do now ?
 thanks
 
  
 
 --- Scott Jones [EMAIL PROTECTED] wrote: 
 You need to set up server.xml on the machine that
  will be running tomcat
  so that it'll be listening on whatever port.  For
  example:
  
  Connector
 
 className=org.apache.tomcat.service.PoolTcpConnector
Parameter name=handler

 
 value=org.apache.tomcat.service.connector.Ajp13ConnectionHandler/\
Parameter name=port value=8009/
  /Connector
  
  Then you need to set up a worker.properties file ON
  THE APACHE box. This
  isn't very clear in the documentation (I figured it
  out yesterday.  :)).
  
  Since my apache machine doesn't have tomcat on it, I
  just made a
  directory in /etc/tomcat/conf and stuck my
  worker.properties file there.
  It'll need to look something like this:
  
  # you can name these workers whatever you want, just
  make sure you match
  # it below in the worker.[worker name].port, etc
  definitions
  worker.list=worker1
  
  # make sure this matches the port number you used in
  your server.xml in 
  # the other machine
  worker.worker1.port=8009
  # this is the IP address or host name of your tomcat
  machine
  worker.worker1.host=192.168.1.31
  worker.worker1.type=ajp13
  # I think that the lbfactor will be optional for you
  -- I actually have
  # tomcat running two instances and then use a load
  balancer worker to
  # use both.
  #worker.worker1.lbfactor=1
  worker.worker1.cachesize=10
  
  Then you'll need to set up your httpd.conf to use
  mod_jk and redirect
  the the appropriate things to your tomcat machine.
  
  For example:
  
  LoadModule jk_module  modules/mod_jk-eapi.so
  AddModule mod_jk.c
  JkWorkersFile /etc/tomcat/conf/workers.properties
  JkLogFile /var/log/mod_jk.log
  JkLogLevel error
  # use the worker name that you defined in
  worker.properties
  # if you decide to use a load balancing worker, then
  send things
  # to the load balacing worker, and it'll figure out
  which instance
  # to send it to.
  JkMount /*.jsp worker1
  
  That should do it.  Good luck!  :)
  
  Cheers,
  
  Scott
  
  On 05 Sep 2001 11:21:12 +0100, atif umar wrote:
   hi , 
  guess this is a very dumb question but i am
   having some problems in running tomcat and apache
  on
   different m/c's  
   i guess that i have to make some changes in the   
  
   1) server.xml
   2) worker.properties 
   
   and in httpd.conf 
   
   could any one tell me exactly what changes i have
  to
   make 
   this configuration used to work fine when both
  were on
   same m/c
   
   the configuration of my m/c's are
   
   - win98
   - apache 1.3.20
   - tomcat 3.2.3
   
   pls do reply as i know this being easy might not
   interest many but still any suggestions will be
  very
   helpful to me
   
   thanks in advance
   
   
   
  
 
 
   Do You Yahoo!?
   Send a newsletter, share photos  files, conduct
  polls, organize chat events. Visit http://in/
  groups.yahoo.com
   
  
   
 
 
 Do You Yahoo!?
 Send a newsletter, share photos  files, conduct polls, 
organize chat events. Visit http://in/ groups.yahoo.com
 





RE: Directory Traversal Vulnerability

2001-09-07 Thread Tal Dayan

Is there a Bugzilla bug ID for it ?

Tal

 -Original Message-
 From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 07, 2001 5:01 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Directory Traversal Vulnerability
 
 
 Given that the document mentions that it is fixed in 
 Tomcat 3.2.2beta2, the fix would also appear in Tomcat 3.2.3.
 This issue is addressed in the current releases of
 Tomcat 3.3 and Tomcat 4.0.
 
 Cheers,
 Larry
 
  -Original Message-
  From: Tal Dayan [mailto:[EMAIL PROTECTED]]
  Sent: Friday, September 07, 2001 6:15 AM
  To: [EMAIL PROTECTED]
  Subject: Directory Traversal Vulnerability
  
  
  Hello,
  
  I am looking for references to the vulnerability described at
  
  http://www.securityfocus.com/vdb/bottom.html?vid=2518
  
  
  Is it documented in Bugzilla (what bug ID) ? Is it fixed in Tomcat 
  3.2.3 ?
  
  Thanks,
  
  Tal
  



Re: non tomcat related question: Servlets

2001-09-07 Thread A.L.

Dmitri,
  Thanks a lot for offering your help.  I am sending
this via yahoo mail so I can only send up to three
attachments at a time.

TO help you understand the code, I have a main
function called SearchLogic, which uses a request
dispatcher to display the rest of the servlets.
  Therefore, to run the web application you will
basically jsut need to run the searchLogic servlet,
since this calls the others.

My problem is as follows.  The searchLogic servlet
first calls a servlet called Browser.  On the right
side of the browser part of the application, to the
right of where it says select group, there are two
arrows.

These arrows change the selected month.

Normally when selecting a date on the perpetual
calendar, and selecting and inserting data on the day
calendar no refresh is necessary to display the data
from the datatabse.

However, after changing the month twice and then
selecting a new day, and entering data, the day
calendar needs to be refreshed to display the new
event.


i know this may be confusing.  Let me know if you have
any questions, and once again thanks for your help,.

-Amos
--- Dmitri Colebatch [EMAIL PROTECTED] wrote:
 sure - send it over, I'll have a little look.
 
 On Thu, 6 Sep 2001, A.L. wrote:
 
   I have a problem which I have asked in several
 forums
  and have received no response.  Basically i have
 some
  code which needs to be debugged, but after
 spending
  hours and hours I am unable to figure out what is
  causing the problem. If anyone has some time to
  briefly look over my code, I will send a copy. 
 The
  problem more likely is very simple, but so far for
 me
  it has been a needle in a haystack.Here is a
  somewhat brief description of my program design
 along
  with the problem.I have created a calendar servlet
  which includes three other servlets:a browser to
  change monthsa month calendar which allows you to
  select the day of the monthand a day calendar
 which
  makes a connection to a database and displays the
  events for the day. I have separate servlet which
  allows you to enter events for the time on a
 specific
  day. My problem is that once I enter some events,
 the
  day calendar doesn't immediately show the
 information
  from the database. The day calendar must be
 refreshed
  a second time.  This doesn't always happen.  I
 noticed
  that it tends to happen after changing months and
 and
  changing days, and then entering the information. 
 In
  other words it work properly most of the time, but
  under certain cicumstances it doesn't work.
 Obviously
  to understand this problem you would need to see
 both
  the code and the running application. Any help
 will be
  greatly appreciated. -Amos  
  
  __
  Do You Yahoo!?
  Get email alerts  NEW webcam video instant
 messaging with Yahoo! Messenger
  http://im.yahoo.com
  
 


__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
 SearchLogic.java

!DOCTYPE web-app 
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN 
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

web-app

display-nameHello, World Application/display-name
description
	This is a simple web application with a source code organization
	based on the recommendations of the Application Developer's Guide.
/description

servlet
servlet-nameCalendar/servlet-name
servlet-classCalendar/servlet-class
/servlet

servlet-mapping
servlet-nameCalendar/servlet-name
url-pattern/Calendar/url-pattern
/servlet-mapping

servlet
servlet-namedayCalendar/servlet-name
servlet-classdayCalendar/servlet-class
/servlet

servlet-mapping
servlet-namedayCalendar/servlet-name
url-pattern/dayCalendar/url-pattern
/servlet-mapping
servlet
servlet-nameDateForm/servlet-name
servlet-classDateForm/servlet-class
/servlet

servlet-mapping
servlet-nameDateForm/servlet-name
url-pattern/DateForm/url-pattern
/servlet-mapping
servlet
servlet-nameDateFormLogic/servlet-name
servlet-classDateFormLogic/servlet-class
/servlet

servlet-mapping
servlet-nameDateFormLogic/servlet-name
url-pattern/DateFormLogic/url-pattern
/servlet-mapping
servlet
servlet-nameHttpServletJXGB/servlet-name
servlet-classHttpServletJXGB/servlet-class
/servlet

servlet-mapping
servlet-nameHttpServletJXGB/servlet-name
url-pattern/HttpServletJXGB/url-pattern
/servlet-mapping
servlet
servlet-nameperpetualCalendarS/servlet-name
servlet-classperpetualCalendarS/servlet-class
/servlet

servlet-mapping
servlet-nameperpetualCalendarS/servlet-name
url-pattern/perpetualCalendarS/url-pattern
/servlet-mapping
servlet
servlet-nameSearchLogic/servlet-name

FORM-based authentication question

2001-09-07 Thread Kevin HaleBoyes

I'm successfully using FORM-based logins in my application but I have
a few questions.  When a user logs in, I want to attach certain information
to the session.  Currently I use a filter that checks to see if the
request.getRemoteUser is set (or has changed) and if so, I do a database
call to get the User information, instantiate a UserClass and set it into
the session.  It works fine but...

The filter gets called for every request but only acts when a user logs in.
Sure the test (to see if anything needs to be done) is simple and fairly
quick, but it is done for _every_ request.

Is there a better way?

I'm thinking something similar in style to the HttpSessionListener interface.
Maybe an AuthenticationListener.  Tomcat 4 (or any Servlet 2.3 container :)
knows when a user has been authenticated (or, for that matter, when the
authentication/session times out) but I don't see any way to hook into that
event.  The timed out session information can be had using the
HttpSessionListener.sessionDestroyed() method and my application knows
if, in the very rare case :-) that a user actually logs out.  But notification
of an authentification seems to be missing (from the spec).

The HttpSessionListener.sessionCreated() method doesn't do what I want since
a session is created even when a user is not authenticated.

How do others attach information to the session once a user has been
authenticated?

Thanks,
Kevin HaleBoyes



Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie



Re: non tomcat related question: Servlets

2001-09-07 Thread A.L.

O.k.  round three 
--- Dmitri Colebatch [EMAIL PROTECTED] wrote:
 sure - send it over, I'll have a little look.
 
 On Thu, 6 Sep 2001, A.L. wrote:
 
   I have a problem which I have asked in several
 forums
  and have received no response.  Basically i have
 some
  code which needs to be debugged, but after
 spending
  hours and hours I am unable to figure out what is
  causing the problem. If anyone has some time to
  briefly look over my code, I will send a copy. 
 The
  problem more likely is very simple, but so far for
 me
  it has been a needle in a haystack.Here is a
  somewhat brief description of my program design
 along
  with the problem.I have created a calendar servlet
  which includes three other servlets:a browser to
  change monthsa month calendar which allows you to
  select the day of the monthand a day calendar
 which
  makes a connection to a database and displays the
  events for the day. I have separate servlet which
  allows you to enter events for the time on a
 specific
  day. My problem is that once I enter some events,
 the
  day calendar doesn't immediately show the
 information
  from the database. The day calendar must be
 refreshed
  a second time.  This doesn't always happen.  I
 noticed
  that it tends to happen after changing months and
 and
  changing days, and then entering the information. 
 In
  other words it work properly most of the time, but
  under certain cicumstances it doesn't work.
 Obviously
  to understand this problem you would need to see
 both
  the code and the running application. Any help
 will be
  greatly appreciated. -Amos  
  
  __
  Do You Yahoo!?
  Get email alerts  NEW webcam video instant
 messaging with Yahoo! Messenger
  http://im.yahoo.com
  
 


__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
 sessionInfo.java
 perpetualCalendarS.java


RE: How to declare Output as Image?

2001-09-07 Thread Kane, David

Andrej,

I think you need to use Response.setContentType...

http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletRespon
se.html#setContentType(java.lang.String)

Dave

-Original Message-
From: Andrej Rosenheinrich
To: [EMAIL PROTECTED]
Sent: 9/7/01 10:39 AM
Subject: How to declare Output as Image?

Hello,

i have a servlet, getting an BufferedImage, that shall be displayed in 
my webpage. for doing this I use the following code:

ServletOutputStream sos = response.getOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
encoder.encode(image);

(image is the Buffered Image)
Well, the servlet does something, the title-line even claims that there 
is a graphic of  a certain size (the right one, btw ;-)), but in the 
page is only the url of the servlet :-(
I guess, I somehow have to tell the servlet/outputstream??? that the 
upcoming data is an image. right? how can i do this in a servlet? any
hints?

TIA
Andrej



Re: non tomcat related question: Servlets

2001-09-07 Thread A.L.

These files should go into a folder with class files
witht he follwoing directory structure:

com\javaexchange\dbConnectionBroker



--- Dmitri Colebatch [EMAIL PROTECTED] wrote:
 sure - send it over, I'll have a little look.
 
 On Thu, 6 Sep 2001, A.L. wrote:
 
   I have a problem which I have asked in several
 forums
  and have received no response.  Basically i have
 some
  code which needs to be debugged, but after
 spending
  hours and hours I am unable to figure out what is
  causing the problem. If anyone has some time to
  briefly look over my code, I will send a copy. 
 The
  problem more likely is very simple, but so far for
 me
  it has been a needle in a haystack.Here is a
  somewhat brief description of my program design
 along
  with the problem.I have created a calendar servlet
  which includes three other servlets:a browser to
  change monthsa month calendar which allows you to
  select the day of the monthand a day calendar
 which
  makes a connection to a database and displays the
  events for the day. I have separate servlet which
  allows you to enter events for the time on a
 specific
  day. My problem is that once I enter some events,
 the
  day calendar doesn't immediately show the
 information
  from the database. The day calendar must be
 refreshed
  a second time.  This doesn't always happen.  I
 noticed
  that it tends to happen after changing months and
 and
  changing days, and then entering the information. 
 In
  other words it work properly most of the time, but
  under certain cicumstances it doesn't work.
 Obviously
  to understand this problem you would need to see
 both
  the code and the running application. Any help
 will be
  greatly appreciated. -Amos  
  
  __
  Do You Yahoo!?
  Get email alerts  NEW webcam video instant
 messaging with Yahoo! Messenger
  http://im.yahoo.com
  
 


__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

dbDriver  sun.jdbc.odbc.JdbcOdbcDriver
dbServer  jdbc:odbc:calendar
dbLogin   null
dbPasswordnull
minConns  4
maxConns  8
logFileString c:/work/test.log
maxConnTime   .5


 HttpServletJXGB.java
 DbConnectionBroker.class


hiding my login.jsp

2001-09-07 Thread Kevin HaleBoyes

I'm using form based authentication with the following in my web.xml file:
login-config
auth-methodFORM/auth-method
form-login-config
form-login-page/login.jsp/form-login-page
form-error-page/loginerror.jsp/form-error-page
/form-login-config
/login-config

I tried to hide my login.jsp and loginerror.jsp pages by putting them
in a subdirectory of WEB-INF (and changing the form-*-page attributes)
but I couldn't login to my application.

Specifically, I put the two files in the WEB-INF/jsp directory and changed
the web.xml file to:
form-login-page/WEB-INF/jsp/login.jsp/form-login-page
form-error-page/WEB-INF/jsp/loginerror.jsp/form-error-page

Any thoughts on why this wouldn't work?

Thanks,
Kevin HaleBoyes



Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie



Servlet/JSP - content-type

2001-09-07 Thread Ratnakar Palle

Hi All,

I'm using model 2 architecture, i.e. request comes to servlet, servlet does
the process and creates the bean and forwards it to JSP. Finally, jsp sends
the response to the client.
But, I've a question about the content-type. My bean, should set the
content-type on jsp and I don't want jsp to set the default content-type.

I'm doing something like this:
%@ page language=java %
jsp:useBean id=controller scope=request
class=apps.test.LoginController /jsp:useBean
% response.setContentType(text/html;charset= + controller.getCharset());
%

But, looks like jsp is ignoring the content-type set by me because jsp by
itself sets the default content-type as I didn't provide any contentType
parameter with %@ page  tag.

Do you've any idea, how to overcome this situation??

Thanks,
-Ratnakar




Re: tomcat4: sealing violation when reloading servlets

2001-09-07 Thread Craig R. McClanahan



On Fri, 7 Sep 2001, Taavi Tiirik wrote:

 Date: Fri, 7 Sep 2001 09:48:38 +0200
 From: Taavi Tiirik [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: tomcat4: sealing violation when reloading servlets

 I am encountering sealing violation problems with tomcat 4.0
 (nightly build 20010825). Whenever I recompile a servlet or
 change any .properties files that I use for i18n text
 messages press reload, it gives ServletException like this:

 Exception Report:
 javax.servlet.ServletException: Servlet.init() for servlet jsp
 threw exception at
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:875)
 ...

 Root Cause:
 java.lang.SecurityException: sealing violation
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
 ...

 As I have understood it can be avoided by not having conflicts
 between certain class libraries. I have plenty of them in
 jre/lib/ext directory...


If you have a copy of the JAXP XML parser here ($JAVA_HOME/jre/lib/ext)
you can pretty much give up.  It won't work.

See the release notes document in the Tomcat 4.0 release for information
on how to deal with XML parsers in Tomcat 4.

 Is there any changes to the class loading mechanism in more
 current nightly builds?

 with best wishes,
 Taavi




Craig





Unsubscribe thaison0@lycos.com

2001-09-07 Thread Thaison Thai

Hi,

I have tried to UNSUBSCRIBE the daily e-mail for about a whole week, but it seems it 
is never successful.  I still keep receiving too many messages everyday!  Can any of 
you please help me to take off my email address:

   [EMAIL PROTECTED]

Thanks,
-Thaison Thai-


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/



Re: hiding my login.jsp

2001-09-07 Thread Craig R. McClanahan

It's not going to work because the servlet container needs to *redirect*
to the login page (for example, so that relative references to images on
the login page itself are resolved correctly).  That means the login page
has to be visible from the browser, which means it cannot be in /WEB-INF.

Craig McClanahan



On Fri, 7 Sep 2001, Kevin HaleBoyes wrote:

 Date: Fri, 7 Sep 2001 17:07:00 +0100 (BST)
 From: Kevin HaleBoyes [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: hiding my login.jsp

 I'm using form based authentication with the following in my web.xml file:
 login-config
 auth-methodFORM/auth-method
 form-login-config
 form-login-page/login.jsp/form-login-page
 form-error-page/loginerror.jsp/form-error-page
 /form-login-config
 /login-config

 I tried to hide my login.jsp and loginerror.jsp pages by putting them
 in a subdirectory of WEB-INF (and changing the form-*-page attributes)
 but I couldn't login to my application.

 Specifically, I put the two files in the WEB-INF/jsp directory and changed
 the web.xml file to:
 form-login-page/WEB-INF/jsp/login.jsp/form-login-page
 form-error-page/WEB-INF/jsp/loginerror.jsp/form-error-page

 Any thoughts on why this wouldn't work?

 Thanks,
 Kevin HaleBoyes


 
 Do You Yahoo!?
 Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
 or your free @yahoo.ie address at http://mail.yahoo.ie





Re: Servlet/JSP - content-type

2001-09-07 Thread Craig R. McClanahan

Calling RequestDispatcher.forward() erases any headers that have been set
by the servlet, so your technique is not going to work.  You will have to
set the content type in the JSP page.

Craig


On Fri, 7 Sep 2001, Ratnakar  Palle wrote:

 Date: Fri, 7 Sep 2001 09:35:36 -0700
 From: Ratnakar  Palle [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Servlet/JSP - content-type

 Hi All,

 I'm using model 2 architecture, i.e. request comes to servlet, servlet does
 the process and creates the bean and forwards it to JSP. Finally, jsp sends
 the response to the client.
 But, I've a question about the content-type. My bean, should set the
 content-type on jsp and I don't want jsp to set the default content-type.

 I'm doing something like this:
 %@ page language=java %
 jsp:useBean id=controller scope=request
 class=apps.test.LoginController /jsp:useBean
 % response.setContentType(text/html;charset= + controller.getCharset());
 %

 But, looks like jsp is ignoring the content-type set by me because jsp by
 itself sets the default content-type as I didn't provide any contentType
 parameter with %@ page  tag.

 Do you've any idea, how to overcome this situation??

 Thanks,
 -Ratnakar






Re: Tomcat 4.0b7 and getRequestDispatcher().forward()

2001-09-07 Thread Craig R. McClanahan

The exception tells you that your JSP page couldn't be compiled -- it's
not a problem with the request dispatcher.  Try calling that page directly
from your browser, and debug whatever invalid syntax is causing the
compilation problem.

Craig


On Fri, 7 Sep 2001, Paul Kofon wrote:

 Date: Fri, 07 Sep 2001 12:13:30
 From: Paul Kofon [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Tomcat 4.0b7 and getRequestDispatcher().forward()

 Hi,
 I moved an application from T3.2.2 to T4.0b7 and I get the following error
 message when a call is made to getRequestDispatcher().forward() in the
 doPost() method of two servlets like this:

 
getServletConfig().getServletContext().getRequestDispatcher(/pages/my.jsp).forward(request,
 response);

 The strange thing is that from one servlet within the same application, I
 don't get the error message. I take the same application back to T3.2.2 and
 everything is fine. I simply don't get it!

 Regards,

 Paul.

 A Servlet Exception Has Occurred
 Exception Report:
 org.apache.jasper.JasperException: Unable to compile class for JSP
   at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:543)
   at
 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
   at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
   at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
   at
 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:430)
   at
 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:354)
   at DomBuilderServlet.doPost(DomBuilderServlet.java:103)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:1145)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
   at
 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
   at
 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   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.java:215)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   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:2314)
   at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
   at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
   at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   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:1000)
   at
 org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093)
   at java.lang.Thread.run(Thread.java:484)

 Root Cause:
 java.lang.SecurityException: sealing violation
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
   at
 
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:670)
   at
 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1088)
   at
 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:987)
   at 

Re: FORM-based authentication question

2001-09-07 Thread Craig R. McClanahan



On Fri, 7 Sep 2001, Kevin HaleBoyes wrote:

 Date: Fri, 7 Sep 2001 16:48:01 +0100 (BST)
 From: Kevin HaleBoyes [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: FORM-based authentication question

 I'm successfully using FORM-based logins in my application but I have
 a few questions.  When a user logs in, I want to attach certain information
 to the session.  Currently I use a filter that checks to see if the
 request.getRemoteUser is set (or has changed) and if so, I do a database
 call to get the User information, instantiate a UserClass and set it into
 the session.  It works fine but...

 The filter gets called for every request but only acts when a user logs in.
 Sure the test (to see if anything needs to be done) is simple and fairly
 quick, but it is done for _every_ request.

 Is there a better way?

 I'm thinking something similar in style to the HttpSessionListener
 interface. Maybe an AuthenticationListener.  Tomcat 4 (or any Servlet
 2.3 container :) knows when a user has been authenticated (or, for
 that matter, when the authentication/session times out) but I don't
 see any way to hook into that event.  The timed out session
 information can be had using the
 HttpSessionListener.sessionDestroyed() method and my application knows
 if, in the very rare case :-) that a user actually logs out.  But
 notification of an authentification seems to be missing (from the
 spec).

 The HttpSessionListener.sessionCreated() method doesn't do what I want since
 a session is created even when a user is not authenticated.

 How do others attach information to the session once a user has been
 authenticated?


You can use HttpSessionListener to detect when the session is created or
destroyed, but there are no servlet API mechanisms that let you hook in to
the user was authenticated event.  You could write a Tomcat-specific
mechanism to do that, but for a portable application the filter approach
seems to me to be the best.

 Thanks,
 Kevin HaleBoyes


Craig




Re: Unsubscribe thaison0@lycos.com

2001-09-07 Thread David Daney

Thaison Thai wrote:

Hi,

I have tried to UNSUBSCRIBE the daily e-mail for about a whole week, but it seems it 
is never successful.  I still keep receiving too many messages everyday!  Can any of 
you please help me to take off my email address:

   [EMAIL PROTECTED]

Thanks,
-Thaison Thai-


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

I have the same problem.  While you're at it take me off also.

[EMAIL PROTECTED]

Thanks.
David Daney.






Re: How can I have a class run on start-up?

2001-09-07 Thread Jonathan Eric Miller

I don't know the answer to your question, but, I'm wondering if the
application actually has to run in Tomcat. It sounds like you might want to
just create a standalone application that listens on a port.

Jon

- Original Message -
From: Alex Colic [EMAIL PROTECTED]
To: Tomcat-User [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 8:36 AM
Subject: How can I have a class run on start-up?


 Hi,

 hopefully someone can help me with this. I need some type of a class to
 start when the web server starts. This class is going to bind itself to a
 port and listen to commands from a VB app. Other classes in other web apps
 will register themselves with this class to receive these commands.

 My questions are:

 1: how can you have a class start when the web server starts? This needs
to
 work with all web servers.
 2: how can you have a class in a web app register itself with the class
 listening on the port?

 Any suggestions are appreciated.

 Regards

 Alex Colic





RE: Multiple Tomcat Instances

2001-09-07 Thread Abhijat Thakur

I am using two tomcats
server1.xml
AJP on Port 8007
server2.xml
AJP on port 8009
I am using Http via Apache.Every time i start tomcat with one of server.xml
files i rename the mod_jk.conf-auto and the included the two static files in
httpd.conf. Even after doing this i can only go to the contexts served by
server1.xml file and not by server2.xml. How do i tell apache as to which
context is to be serverd by which port. I think i am missing this step but
do not know how to do it?

Thanks

Abhijat Thakur


-Original Message-
From: Marjou Xavier [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 4:37 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Multiple Tomcat Instances


Hello,

Each Tomcat can be interfaced with a HTTP client with 2 different ways
(defined in server.xml)
- either with regular HTTP (eg: on port 8080)
- or/and indirectly via Apache (AJP protocol is used, eg port 8007)
If you use HTTP via Apache, Apache will need mod_jk.conf and
worker.properties to know how to dialogue with Tomcat
If you use only one instance of Tomcat, then the default files (server.xml,
mod_jk.conf-auto and worker.properties) work well.


Now if you use 2 Tomcats,  you can do:
- in server1.xml
- HTTP on port 8080)
- AJP on port 8007)
-in server2.xml
- HTTP on port 8081)
- AJP on port 8009)
Each Tomcat will have its own socket for serving HTTP. It is not possible to
share a socket (eg: 8080) between to Tomcats as you are trying to do.

If you use HTTP via Apache, Apache will need to write your own mod_jk.conf
and worker.properties. (It is important to realize that the default ones are
working only when there is the default configuration of Tomcat (ie: only one
Tomcat)).

I hope this help,
Xavier Marjou









Tomcat v3.3b2 and mod_jk (multiple virtual hosts)

2001-09-07 Thread Mark Muffett

Larry

I'm trying something a little more complicated now - I have two different
sites: sota and vp.  I have apps-sota.xml like:

Server
 Host name=sota
   Alias name=sota.silly.domain.net /
   Context path= docBase=webapps/Sota /
 /Host
/Server

and apps-vp.xml like:

Server
 Host name=vp
   Alias name=vp.silly.domain.net /
   Context path= docBase=webapps/Vp /
 /Host
/Server

This gives an auto-generated mod_jk.conf like:

## Auto generated on Fri Sep 07 18:09:24 BST 2001##

IfModule !mod_jk.c
  LoadModule jk_module /usr/lib/apache/mod_jk.so
/IfModule

JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log

JkLogLevel emerg



JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /admin ajp13
JkMount /admin/* ajp13

JkMount /Sota ajp13
JkMount /Sota/* ajp13

JkMount / ajp13
JkMount /* ajp13
# To avoid Apache serving root welcome files from htdocs, update
DocumentRoot
# to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT

JkMount /Vp ajp13
JkMount /Vp/* ajp13

JkMount /100ways ajp13
JkMount /100ways/* ajp13

NameVirtualHost *
VirtualHost *
ServerName vp
ServerAlias sota.silly.domain.net vp.silly.domain.net

JkMount / ajp13
JkMount /* ajp13
DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Vp
/VirtualHost

VirtualHost *
ServerName sota
ServerAlias sota.silly.domain.net

JkMount / ajp13
JkMount /* ajp13
DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
/VirtualHost

(The aliases for vp surprise me)

Now sota  vp  vp.silly.domain.net work fine, but sota.silly.domain.net
(and sota.silly.domain.net:8080) return like vp.

Have I done something wrong, or is this a bug?

Many thanks

Mark




Re: does tomcat have the cajones?

2001-09-07 Thread Mike Wright

Perhaps there is some relevance here. A cajon is also a container.

Mike Wright



Rick Mann wrote:

 on 9/6/01 11:24 AM, Denis Haskin at [EMAIL PROTECTED] wrote:
 
 
Er... I think you mean cojones.  A cajon is a kind of percussion instrument.

 
 Actually, a cajon is a drawer. Caja is box, so cajon could be a big
 box (colloquial).
 
 :-)
 
 
 Roderick Mann   rmann @ latencyzero.com.sansspam
 
 
 
 
 





Re: Rep: Image Not Found

2001-09-07 Thread James Adams

Vijaya you win the prize, having .. in front of the URL made all the
difference.  Thanks so much !

-James



 Vijaya Kumar wrote:
 
 Well, If your image locates like below
 
 /webapps
 /your_Appln
 /webinf
 
  related class files
 
 /images
 
 place all the image files here
 
 then try the url mapping using ../images/imagename. Hope it'll work,
 b'cas
 I'm usingurl(../images/bg1.jpg)   in my stylesheet. Note I'm
 using two
 periods.
 
 Here is some patches:
 Insdide Servlet
   pw.println(htmlheadLINK href='../style/mystyle.css'
 rel=stylesheet type=text/css/head);
 
 In Style Sheet
 
 body
 {
  background: url(../images/bg1.jpg) fixed
 }
 a
 {
  text-decoration:none
 }
 
 Rgds
 Vijay
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
 James
  Adams
  Sent: Friday, September 07, 2001 12:49 AM
  To: [EMAIL PROTECTED]
  Subject: Image file not found - why not ?
 
 
  I have a JSP which tries to load an image which is
  referenced by a URI which is set in the request by a servlet.
 
  img src=%= request.getAttribute(imageURL) %
   alt=IMAGE NOT FOUND
 
  Unfortunately this has never worked because Tomcat can never
  find the image.  Perhaps I am using a bad URI ?  I have the
  image located under my application's base directory in a
  subdirectory
  named images.  The URIs I've tried are images/MyImage.jpg,
  ./images/MyImage.jpg and
  /images/MyImage.jpg, all of which are not found when I
  view the page.
 
  Can anyone please tell me what I'm doing wrong ?  Thanks in
  advance for all suggestions, and email of the responses would be
  appreciated if possible ([EMAIL PROTECTED]).
 
 
  -James
 



RE: How can I have a class run on start-up?

2001-09-07 Thread Peter Romianowski

you could implement a org.apache.catalina.LifecycleListener and attach it to
the context you are using like this:

Context path=/myapp ...
  ...
  Listener className=com.mycompany.MyAppListener/
  ...
/Context

look into the docs for details.
but this is a tomcat-specific thing (and thus not portable).

anyway there's a second approach that comes in mind (but it is not as
clean as the first one)

you simply could write a servlet where you put all code which should be
executed during webapp-initialization into the init-method.
in web.xml you configure the servlet to load on startup. it goes like this:

  servlet
servlet-namesomename/servlet-name
servlet-classsomeclass/servlet-class
load-on-startupa value greater 0/load-on-startup
  /servlet

then the servlet will be called upon webapp-initialization.

dont know if there's is a better (cleaner and portable) solution, but these
two do the job.

greets,
pero

-Original Message-
From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 7:15 PM
To: [EMAIL PROTECTED]
Subject: Re: How can I have a class run on start-up?


I don't know the answer to your question, but, I'm wondering if the
application actually has to run in Tomcat. It sounds like you might want to
just create a standalone application that listens on a port.

Jon

- Original Message -
From: Alex Colic [EMAIL PROTECTED]
To: Tomcat-User [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 8:36 AM
Subject: How can I have a class run on start-up?


 Hi,

 hopefully someone can help me with this. I need some type of a class to
 start when the web server starts. This class is going to bind itself to a
 port and listen to commands from a VB app. Other classes in other web apps
 will register themselves with this class to receive these commands.

 My questions are:

 1: how can you have a class start when the web server starts? This needs
to
 work with all web servers.
 2: how can you have a class in a web app register itself with the class
 listening on the port?

 Any suggestions are appreciated.

 Regards

 Alex Colic





Re: How can I have a class run on start-up?

2001-09-07 Thread Alex Colic



Hmm. I don't know about that. For the user that would just be another app he
has to start. I was trying to automate things. I was wondering about
creating a servlet and forcing it to run when Tomcat starts.

What do you thing?

Alex


-
I don't know the answer to your question, but, I'm wondering if the
application actually has to run in Tomcat. It sounds like you might want to
just create a standalone application that listens on a port.

Jon




session timeout bug ?

2001-09-07 Thread Christian Bourque

Hi !

I've been searching everywhere for this problem and I just can't find any
solution...

I have session that are still active after the timeout period has expired !
Sometimes sessions are cleaned up correctly and sometimes it just don't work
...

I have sessions that didn't timed out even after many hours passed the last
accessed time (my session timeout is set to 15 minutes) !

Is this a known bug in Tomcat 3.2.3 (w/ jdk 1.3.0_02  W2K Server) ?

I would really appreciate any suggestion !

Thanks

Christian Bourque





RE: Tomcat v3.3b2 and mod_jk (multiple virtual hosts)

2001-09-07 Thread Larry Isaacs

Mark,

Thanks for trying this.  It looks like a bug. In:

ServerName vp
ServerAlias sota.silly.domain.net vp.silly.domain.net

The sota.silly.domain.net should not be included in the
ServerAlias.  It is likely a bug in ApacheConfig.java.
I'll take a look.  Having your test case should make
that easy.

In the meantime, rename your config and remove the
sota.silly.domain.net and you should get the behavior
you desire.

Thanks,
Larry

 -Original Message-
 From: Mark Muffett [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 07, 2001 1:17 PM
 To: [EMAIL PROTECTED]
 Subject: Tomcat v3.3b2 and mod_jk (multiple virtual hosts)
 
 
 Larry
 
 I'm trying something a little more complicated now - I have 
 two different
 sites: sota and vp.  I have apps-sota.xml like:
 
 Server
  Host name=sota
Alias name=sota.silly.domain.net /
Context path= docBase=webapps/Sota /
  /Host
 /Server
 
 and apps-vp.xml like:
 
 Server
  Host name=vp
Alias name=vp.silly.domain.net /
Context path= docBase=webapps/Vp /
  /Host
 /Server
 
 This gives an auto-generated mod_jk.conf like:
 
 ## Auto generated on Fri Sep 07 18:09:24 BST 2001##
 
 IfModule !mod_jk.c
   LoadModule jk_module /usr/lib/apache/mod_jk.so
 /IfModule
 
 JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
 JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log
 
 JkLogLevel emerg
 
 
 
 JkMount /examples ajp13
 JkMount /examples/* ajp13
 
 JkMount /admin ajp13
 JkMount /admin/* ajp13
 
 JkMount /Sota ajp13
 JkMount /Sota/* ajp13
 
 JkMount / ajp13
 JkMount /* ajp13
 # To avoid Apache serving root welcome files from htdocs, update
 DocumentRoot
 # to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT
 
 JkMount /Vp ajp13
 JkMount /Vp/* ajp13
 
 JkMount /100ways ajp13
 JkMount /100ways/* ajp13
 
 NameVirtualHost *
 VirtualHost *
 ServerName vp
 ServerAlias sota.silly.domain.net vp.silly.domain.net
 
 JkMount / ajp13
 JkMount /* ajp13
 DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Vp
 /VirtualHost
 
 VirtualHost *
 ServerName sota
 ServerAlias sota.silly.domain.net
 
 JkMount / ajp13
 JkMount /* ajp13
 DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
 /VirtualHost
 
 (The aliases for vp surprise me)
 
 Now sota  vp  vp.silly.domain.net work fine, but 
 sota.silly.domain.net
 (and sota.silly.domain.net:8080) return like vp.
 
 Have I done something wrong, or is this a bug?
 
 Many thanks
 
 Mark
 



jsp vs php.....

2001-09-07 Thread Kennice Low

Hi,

Can anyone give me some advise/opinion/suggestion on jsp vs php ?
What are the advantages of JSP over PHP, or vice versa ?

Any helps/opinion is appreciated.  ;)

best regards,
Kennice




_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




RE: How can I have a class run on start-up?

2001-09-07 Thread Craig R. McClanahan

For a portable solution to the run my class at startup problem, Servlet
2.3 (and therefore Tomcat 4.0) supports a new API called
javax.servlet.ServletContextListener.  If you register such a listener in
your web.xml file, the container will call the contextInitialized() method
when the web application starts up, and contextDestroyed() when the web
application is shut down.

This is safer than the typical approach (use the init() method of a
load-on-startup servlet), because the servlet specification does *not*
guarantee to keep any particular servlet instance in memory for the life
of the application (although Tomcat actually does so).

Craig


On Fri, 7 Sep 2001, Peter Romianowski wrote:

 Date: Fri, 7 Sep 2001 19:35:32 +0200
 From: Peter Romianowski [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: How can I have a class run on start-up?

 you could implement a org.apache.catalina.LifecycleListener and attach it to
 the context you are using like this:

 Context path=/myapp ...
   ...
   Listener className=com.mycompany.MyAppListener/
   ...
 /Context

 look into the docs for details.
 but this is a tomcat-specific thing (and thus not portable).

 anyway there's a second approach that comes in mind (but it is not as
 clean as the first one)

 you simply could write a servlet where you put all code which should be
 executed during webapp-initialization into the init-method.
 in web.xml you configure the servlet to load on startup. it goes like this:

   servlet
 servlet-namesomename/servlet-name
 servlet-classsomeclass/servlet-class
 load-on-startupa value greater 0/load-on-startup
   /servlet

 then the servlet will be called upon webapp-initialization.

 dont know if there's is a better (cleaner and portable) solution, but these
 two do the job.

 greets,
 pero

 -Original Message-
 From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 07, 2001 7:15 PM
 To: [EMAIL PROTECTED]
 Subject: Re: How can I have a class run on start-up?


 I don't know the answer to your question, but, I'm wondering if the
 application actually has to run in Tomcat. It sounds like you might want to
 just create a standalone application that listens on a port.

 Jon

 - Original Message -
 From: Alex Colic [EMAIL PROTECTED]
 To: Tomcat-User [EMAIL PROTECTED]
 Sent: Friday, September 07, 2001 8:36 AM
 Subject: How can I have a class run on start-up?


  Hi,
 
  hopefully someone can help me with this. I need some type of a class to
  start when the web server starts. This class is going to bind itself to a
  port and listen to commands from a VB app. Other classes in other web apps
  will register themselves with this class to receive these commands.
 
  My questions are:
 
  1: how can you have a class start when the web server starts? This needs
 to
  work with all web servers.
  2: how can you have a class in a web app register itself with the class
  listening on the port?
 
  Any suggestions are appreciated.
 
  Regards
 
  Alex Colic
 






Re: Tomcat v3.3b2 and mod_jk (multiple virtual hosts)

2001-09-07 Thread Mark Muffett

Larry

Thanks, but I think the bug goes deeper than that, since I get the same
behaviour if I communicate directly with Tomcat (ie
sota.silly.domain.net:8080 maps to vp:8080).

Best regards

Mark

- Original Message -
From: Larry Isaacs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 6:50 PM
Subject: RE: Tomcat v3.3b2 and mod_jk (multiple virtual hosts)


 Mark,

 Thanks for trying this.  It looks like a bug. In:

 ServerName vp
 ServerAlias sota.silly.domain.net vp.silly.domain.net

 The sota.silly.domain.net should not be included in the
 ServerAlias.  It is likely a bug in ApacheConfig.java.
 I'll take a look.  Having your test case should make
 that easy.

 In the meantime, rename your config and remove the
 sota.silly.domain.net and you should get the behavior
 you desire.

 Thanks,
 Larry

  -Original Message-
  From: Mark Muffett [mailto:[EMAIL PROTECTED]]
  Sent: Friday, September 07, 2001 1:17 PM
  To: [EMAIL PROTECTED]
  Subject: Tomcat v3.3b2 and mod_jk (multiple virtual hosts)
 
 
  Larry
 
  I'm trying something a little more complicated now - I have
  two different
  sites: sota and vp.  I have apps-sota.xml like:
 
  Server
   Host name=sota
 Alias name=sota.silly.domain.net /
 Context path= docBase=webapps/Sota /
   /Host
  /Server
 
  and apps-vp.xml like:
 
  Server
   Host name=vp
 Alias name=vp.silly.domain.net /
 Context path= docBase=webapps/Vp /
   /Host
  /Server
 
  This gives an auto-generated mod_jk.conf like:
 
  ## Auto generated on Fri Sep 07 18:09:24 BST 2001##
 
  IfModule !mod_jk.c
LoadModule jk_module /usr/lib/apache/mod_jk.so
  /IfModule
 
  JkWorkersFile /opt/jakarta-tomcat-3.3-b2/conf/jk/workers.properties
  JkLogFile /opt/jakarta-tomcat-3.3-b2/logs/mod_jk.log
 
  JkLogLevel emerg
 
 
 
  JkMount /examples ajp13
  JkMount /examples/* ajp13
 
  JkMount /admin ajp13
  JkMount /admin/* ajp13
 
  JkMount /Sota ajp13
  JkMount /Sota/* ajp13
 
  JkMount / ajp13
  JkMount /* ajp13
  # To avoid Apache serving root welcome files from htdocs, update
  DocumentRoot
  # to point to: /opt/jakarta-tomcat-3.3-b2/webapps/ROOT
 
  JkMount /Vp ajp13
  JkMount /Vp/* ajp13
 
  JkMount /100ways ajp13
  JkMount /100ways/* ajp13
 
  NameVirtualHost *
  VirtualHost *
  ServerName vp
  ServerAlias sota.silly.domain.net vp.silly.domain.net
 
  JkMount / ajp13
  JkMount /* ajp13
  DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Vp
  /VirtualHost
 
  VirtualHost *
  ServerName sota
  ServerAlias sota.silly.domain.net
 
  JkMount / ajp13
  JkMount /* ajp13
  DocumentRoot /opt/jakarta-tomcat-3.3-b2/webapps/Sota
  /VirtualHost
 
  (The aliases for vp surprise me)
 
  Now sota  vp  vp.silly.domain.net work fine, but
  sota.silly.domain.net
  (and sota.silly.domain.net:8080) return like vp.
 
  Have I done something wrong, or is this a bug?
 
  Many thanks
 
  Mark
 





AW: IIS, tomcat and logging

2001-09-07 Thread Hessing Ingo


Hi!

I have exactly the same logging problem as Mike on his box on my own
system (which is very similar to one of Mike's):

My system:
  W2k Server SP2
  JDK 1.3.1
  Tomcat 3.2.3
  IIS 5 (incl. latest security patches)

I have the latest isapi_redirect.dll and use both ajp12 and inprocess
workers. Within IIS 5 I've selected to log _everything_ (incl.
cs-uri-stem and uri-query), but all I get in the log file (no matter
which worker and no matter which context) is the mere .dll entry:

  (...) GET /jakarta/isapi_redirect.dll - (...)

But what I need is something like this:

  (...) GET /mycontext/mypage.jsp?language=encolor=blue - (...)

How can I log the whole URI right in IIS?

Anybody?

Best wishes

Ingo

 -Ursprüngliche Nachricht-
 Von: Mike Erickson [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 24. Juli 2001 02:43
 An: [EMAIL PROTECTED]
 Betreff: IIS, tomcat and logging
 
 
 Box #1:
 Win 2000 Server
 Sun JDK 1.3.1
 Tomcat 3.2.2
 IIS 5
 
 Box #2:
 Win 2000 Professional
 Sun JDK 1.3
 Tomcat 3.2.1
 IIS
 
 both boxes are mapped to use IIS, when I hit Box #1, the IIS log
 (cs-uri-stem column) shows me:
 /jakarta/isapi_redirect.dll
 when  I hit Box #2, the IIS log shows me :
 /contextname/dir/file.jsp?parameter=foo
 
 I want box #1 to log like Box #2.. but I can't figure out the 
 difference
 (besides a few small version changes), both are set to log 
 the URI-stem
 (Using the IIS logging extended properties) and both have the 
 isapi log
 level set to info..
 
 how do I setup IIS to log the requested filename instead of the filter
 name?
 
 thanks...




Basic question about Apache+Tomcat Memory usage

2001-09-07 Thread srini

hi users,
i have  this basic question in mind from so many days but din't get
an answer for it.
 when i try to execute a simple JSP or Servlet , generally first
time my CPU usage goes to 80-100%.I tried with default examples which comes
with Tomcat. where as i have seen big application which don't use that much
memory even u do some heavy jobs.
 Why is it so ???

 System configuration:
Pentium3900mHz processor   256MB Ram.
Operating system:  win2K
Tomcat 3.2.2

Thanks in advance.

-srini




RE: Servlet/JSP - content-type

2001-09-07 Thread Ratnakar Palle

Hi Craig,

Thanks for your quick response...
I understand that RequestDispatcher.forward() erases any headers but I'm not
setting any header info in the servlet. I want to set it in the jsp, how do
I do that!!
I've the charset info in the databean and I want to use that bean to set it
in the jsp like I indicated in my previous mail:

%@ page language=java %
jsp:useBean id=controller scope=request
class=apps.test.LoginController /jsp:useBean
% response.setContentType(text/html;charset= + controller.getCharset());
%

Any idea??

Hope I was clear!!

Thanks,
-Ratnakar


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig
R. McClanahan
Sent: Friday, September 07, 2001 9:45 AM
To: [EMAIL PROTECTED]
Subject: Re: Servlet/JSP - content-type


Calling RequestDispatcher.forward() erases any headers that have been set
by the servlet, so your technique is not going to work.  You will have to
set the content type in the JSP page.

Craig


On Fri, 7 Sep 2001, Ratnakar  Palle wrote:

 Date: Fri, 7 Sep 2001 09:35:36 -0700
 From: Ratnakar  Palle [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Servlet/JSP - content-type

 Hi All,

 I'm using model 2 architecture, i.e. request comes to servlet, servlet
does
 the process and creates the bean and forwards it to JSP. Finally, jsp
sends
 the response to the client.
 But, I've a question about the content-type. My bean, should set the
 content-type on jsp and I don't want jsp to set the default content-type.

 I'm doing something like this:
 %@ page language=java %
 jsp:useBean id=controller scope=request
 class=apps.test.LoginController /jsp:useBean
 % response.setContentType(text/html;charset= +
controller.getCharset());
 %

 But, looks like jsp is ignoring the content-type set by me because jsp by
 itself sets the default content-type as I didn't provide any contentType
 parameter with %@ page  tag.

 Do you've any idea, how to overcome this situation??

 Thanks,
 -Ratnakar






Re: Basic question about Apache+Tomcat Memory usage

2001-09-07 Thread Craig R. McClanahan

Are you asking about CPU usage or memory usage?

For CPU, the first time you access a page (or whenever you update it),
Tomcat has to translate the page into Java and then compile it.  This is a
pretty CPU-intensive activity, but it only happens once.

For memory, there is a lot to understand about the way JVMs work -- but
basically, from the operating system point of view, the JVM will start out
at whatever you have configured as the minimum heap size, grow as it needs
to, and never give it back (although from *inside* the JVM there will be
free memory that can be reused for new Java object creation).  You can
control the overall memory usage with command line parameters -- see the
Java documentation for more info.

Craig


On Fri, 7 Sep 2001, srini wrote:

 Date: Fri, 7 Sep 2001 12:14:28 -0700
 From: srini [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Basic question about Apache+Tomcat Memory usage

 hi users,
 i have  this basic question in mind from so many days but din't get
 an answer for it.
  when i try to execute a simple JSP or Servlet , generally first
 time my CPU usage goes to 80-100%.I tried with default examples which comes
 with Tomcat. where as i have seen big application which don't use that much
 memory even u do some heavy jobs.
  Why is it so ???

  System configuration:
 Pentium3900mHz processor   256MB Ram.
 Operating system:  win2K
 Tomcat 3.2.2

 Thanks in advance.

 -srini






RE: Servlet/JSP - content-type

2001-09-07 Thread Craig R. McClanahan

On Fri, 7 Sep 2001, Ratnakar  Palle wrote:

 Date: Fri, 7 Sep 2001 12:07:07 -0700
 From: Ratnakar  Palle [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Servlet/JSP - content-type

 Hi Craig,

 Thanks for your quick response...
 I understand that RequestDispatcher.forward() erases any headers but I'm not
 setting any header info in the servlet. I want to set it in the jsp, how do
 I do that!!
 I've the charset info in the databean and I want to use that bean to set it
 in the jsp like I indicated in my previous mail:

 %@ page language=java %
 jsp:useBean id=controller scope=request
 class=apps.test.LoginController /jsp:useBean
 % response.setContentType(text/html;charset= + controller.getCharset());
 %

 Any idea??

 Hope I was clear!!


Ah, missed that little detail ... I jumped to an incorrect conclusion when
you said model 2 :-)

In a JSP 1.1 environment (i.e. Tomcat 3.x), the character set used on the
output page itself is determined by when the container calls
response.getWriter().  There is no spec language to define this, so
containers are free to do what they want -- and Tomcat calls
response.getWriter() before your scriptlet has the chance to do anything.
Therefore, your custom character encoding is ignored.

In a JSP 1.2 environment (i.e. Tomcat 4.0), the container is supposed to
wait before calling getWriter() until you fill the buffer (or flush it
yourself).  Therefore, your code should work in Tomcat 4.

 Thanks,
 -Ratnakar


Craig


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig
 R. McClanahan
 Sent: Friday, September 07, 2001 9:45 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Servlet/JSP - content-type


 Calling RequestDispatcher.forward() erases any headers that have been set
 by the servlet, so your technique is not going to work.  You will have to
 set the content type in the JSP page.

 Craig


 On Fri, 7 Sep 2001, Ratnakar  Palle wrote:

  Date: Fri, 7 Sep 2001 09:35:36 -0700
  From: Ratnakar  Palle [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Servlet/JSP - content-type
 
  Hi All,
 
  I'm using model 2 architecture, i.e. request comes to servlet, servlet
 does
  the process and creates the bean and forwards it to JSP. Finally, jsp
 sends
  the response to the client.
  But, I've a question about the content-type. My bean, should set the
  content-type on jsp and I don't want jsp to set the default content-type.
 
  I'm doing something like this:
  %@ page language=java %
  jsp:useBean id=controller scope=request
  class=apps.test.LoginController /jsp:useBean
  % response.setContentType(text/html;charset= +
 controller.getCharset());
  %
 
  But, looks like jsp is ignoring the content-type set by me because jsp by
  itself sets the default content-type as I didn't provide any contentType
  parameter with %@ page  tag.
 
  Do you've any idea, how to overcome this situation??
 
  Thanks,
  -Ratnakar
 
 






Apache 1.3.20 mod_webapp Tomcat 4b7 HANGS on Windows

2001-09-07 Thread Marcel Maré

I'm having big problems getting this combination to work:
- Apache 1.3.20
- mod_webapp
- Tomcat 4b7
All were recently donwloaded and installed, using defaults as much as
possible.

Accessing the apache server and tomcat standalone is without problems.

In httpd.conf I added:
---
LoadModule webapp_module modules/mod_webapp.so
AddModule mod_webapp.c

WebAppConnection conn  warp  localhost:8008
WebAppDeploy examples  conn  /examples/
WebAppInfo /webapp-info
-

When accessing http://localhost/examples/ and clicking JSP, I'm seeing the
first 4 lines of the page, but then Tomcat hangs.

I get this error on the console:

Starting service Tomcat-Standalone
Apache Tomcat/4.0-b7
Starting service Tomcat-Apache
Apache Tomcat/4.0-b7
java.lang.ArrayIndexOutOfBoundsException: No data available
at
org.apache.catalina.connector.warp.WarpPacket.readUnsignedShort(WarpPacket.j
ava:183)
at
org.apache.catalina.connector.warp.WarpPacket.readString(WarpPacket.java:218
)
at
org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHand
ler.java:118)
at
org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:19
4)
at java.lang.Thread.run(Thread.java:484)


There are NO errors in any of the Tomcat or Apache logs.

Any ideas?

Marcel Maré

WebToTheMax






Re: Basic question about Apache+Tomcat Memory usage

2001-09-07 Thread srini

 ho sorry Craig i was talking about CPU usage. I know first time it
translates JSP page in to Java and compiles it. But is it that much
intensive to eat 80-100% of memory ??
Iam running my application on Apache+Tomcat. For many of the pages
it takes 90-100% even though they are not first time visiting pages. It has
Database connections. what is the problem ?? do i need to check the code or
what ...?

  Thnaks  Craig .

-srini


- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 12:10 PM
Subject: Re: Basic question about Apache+Tomcat Memory usage


 Are you asking about CPU usage or memory usage?

 For CPU, the first time you access a page (or whenever you update it),
 Tomcat has to translate the page into Java and then compile it.  This is a
 pretty CPU-intensive activity, but it only happens once.

 For memory, there is a lot to understand about the way JVMs work -- but
 basically, from the operating system point of view, the JVM will start out
 at whatever you have configured as the minimum heap size, grow as it needs
 to, and never give it back (although from *inside* the JVM there will be
 free memory that can be reused for new Java object creation).  You can
 control the overall memory usage with command line parameters -- see the
 Java documentation for more info.

 Craig


 On Fri, 7 Sep 2001, srini wrote:

  Date: Fri, 7 Sep 2001 12:14:28 -0700
  From: srini [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Basic question about Apache+Tomcat Memory usage
 
  hi users,
  i have  this basic question in mind from so many days but din't
get
  an answer for it.
   when i try to execute a simple JSP or Servlet , generally first
  time my CPU usage goes to 80-100%.I tried with default examples which
comes
  with Tomcat. where as i have seen big application which don't use that
much
  memory even u do some heavy jobs.
   Why is it so ???
 
   System configuration:
  Pentium3900mHz processor   256MB Ram.
  Operating system:  win2K
  Tomcat 3.2.2
 
  Thanks in advance.
 
  -srini
 
 






RE: Servlet/JSP - content-type

2001-09-07 Thread Ratnakar Palle

Thanks Craig for clarification...

I've another question on that line..

I'm actually using the i18n tag library in the same jsp page. That is, it
looks something like this:

%@ page import=com.cisco.appadmin.login.ui.LoginController %
jsp:useBean id=controller scope=request
class=com.cisco.appadmin.login.ui.LoginController /jsp:useBean
%@ taglib uri=http://jakarta.apache.org/taglibs; prefix=i18n %
i18n:bundle baseName=com.cisco.appadmin.text.resources.LoginRB
locale=%= controller.getLocale() % /
% response.setContentType(text/html;charset= + controller.getCharset());
%

So, it should be OK in jsp1.2 spec ( i.e. Tomcat 4.x version), right!!

The reason am asking is, looks like the tag i18n:bundle also sets the
content type but I want the content-type to be set based on my databean.
Based on your reason, this should work because am overwriting the content
type with % response.setContentType(text/html;charset= +
controller.getCharset()); %...
And, container will wait until, the buffer is filled (or flushed)..

Please correct me if am wrong!!

Thanks for your time,
-Ratnakar



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig
R. McClanahan
Sent: Friday, September 07, 2001 12:18 PM
To: [EMAIL PROTECTED]
Subject: RE: Servlet/JSP - content-type


On Fri, 7 Sep 2001, Ratnakar  Palle wrote:

 Date: Fri, 7 Sep 2001 12:07:07 -0700
 From: Ratnakar  Palle [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Servlet/JSP - content-type

 Hi Craig,

 Thanks for your quick response...
 I understand that RequestDispatcher.forward() erases any headers but I'm
not
 setting any header info in the servlet. I want to set it in the jsp, how
do
 I do that!!
 I've the charset info in the databean and I want to use that bean to set
it
 in the jsp like I indicated in my previous mail:

 %@ page language=java %
 jsp:useBean id=controller scope=request
 class=apps.test.LoginController /jsp:useBean
 % response.setContentType(text/html;charset= +
controller.getCharset());
 %

 Any idea??

 Hope I was clear!!


Ah, missed that little detail ... I jumped to an incorrect conclusion when
you said model 2 :-)

In a JSP 1.1 environment (i.e. Tomcat 3.x), the character set used on the
output page itself is determined by when the container calls
response.getWriter().  There is no spec language to define this, so
containers are free to do what they want -- and Tomcat calls
response.getWriter() before your scriptlet has the chance to do anything.
Therefore, your custom character encoding is ignored.

In a JSP 1.2 environment (i.e. Tomcat 4.0), the container is supposed to
wait before calling getWriter() until you fill the buffer (or flush it
yourself).  Therefore, your code should work in Tomcat 4.

 Thanks,
 -Ratnakar


Craig


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig
 R. McClanahan
 Sent: Friday, September 07, 2001 9:45 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Servlet/JSP - content-type


 Calling RequestDispatcher.forward() erases any headers that have been set
 by the servlet, so your technique is not going to work.  You will have to
 set the content type in the JSP page.

 Craig


 On Fri, 7 Sep 2001, Ratnakar  Palle wrote:

  Date: Fri, 7 Sep 2001 09:35:36 -0700
  From: Ratnakar  Palle [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Servlet/JSP - content-type
 
  Hi All,
 
  I'm using model 2 architecture, i.e. request comes to servlet, servlet
 does
  the process and creates the bean and forwards it to JSP. Finally, jsp
 sends
  the response to the client.
  But, I've a question about the content-type. My bean, should set the
  content-type on jsp and I don't want jsp to set the default
content-type.
 
  I'm doing something like this:
  %@ page language=java %
  jsp:useBean id=controller scope=request
  class=apps.test.LoginController /jsp:useBean
  % response.setContentType(text/html;charset= +
 controller.getCharset());
  %
 
  But, looks like jsp is ignoring the content-type set by me because jsp
by
  itself sets the default content-type as I didn't provide any contentType
  parameter with %@ page  tag.
 
  Do you've any idea, how to overcome this situation??
 
  Thanks,
  -Ratnakar
 
 






Re: non tomcat related question: Servlets

2001-09-07 Thread Pier Fumagalli

A.L. [EMAIL PROTECTED] wrote:

 These files should go into a folder with class files
 witht he follwoing directory structure:
 
 com\javaexchange\dbConnectionBroker

Guys, small request, can you handle this privately as it's not related to
Tomcat? Thanks! :)

Pier




Re: Apache 1.3.20 mod_webapp Tomcat 4b7 HANGS on Windows

2001-09-07 Thread Pier Fumagalli

Marcel Maré [EMAIL PROTECTED] wrote:

 I'm having big problems getting this combination to work:
 - Apache 1.3.20
 - mod_webapp
 - Tomcat 4b7
 All were recently donwloaded and installed, using defaults as much as
 possible.

This seems to be a good one (can you please  post a bug on
http://nagoya.apache.org/bugzilla/ ???)...

On what OS?

Pier




Re: Basic question about Apache+Tomcat Memory usage

2001-09-07 Thread Craig R. McClanahan



On Fri, 7 Sep 2001, srini wrote:

 Date: Fri, 7 Sep 2001 12:38:11 -0700
 From: srini [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: Basic question about Apache+Tomcat Memory usage

  ho sorry Craig i was talking about CPU usage. I know first time it
 translates JSP page in to Java and compiles it. But is it that much
 intensive to eat 80-100% of memory ??

If there is nothing higher priority that needs to run, don't you *want*
100% CPU usage, so the compile gets done faster?  :-)

 Iam running my application on Apache+Tomcat. For many of the pages
 it takes 90-100% even though they are not first time visiting pages. It has
 Database connections. what is the problem ?? do i need to check the code or
 what ...?


There's no way to give advice based on generalities here -- the only way
to figure out what inside your page is eating the time is to use tools
like OptimizeIt that will help you isolate the big CPU hogs.

   Thnaks  Craig .

 -srini


Craig



 - Original Message -
 From: Craig R. McClanahan [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, September 07, 2001 12:10 PM
 Subject: Re: Basic question about Apache+Tomcat Memory usage


  Are you asking about CPU usage or memory usage?
 
  For CPU, the first time you access a page (or whenever you update it),
  Tomcat has to translate the page into Java and then compile it.  This is a
  pretty CPU-intensive activity, but it only happens once.
 
  For memory, there is a lot to understand about the way JVMs work -- but
  basically, from the operating system point of view, the JVM will start out
  at whatever you have configured as the minimum heap size, grow as it needs
  to, and never give it back (although from *inside* the JVM there will be
  free memory that can be reused for new Java object creation).  You can
  control the overall memory usage with command line parameters -- see the
  Java documentation for more info.
 
  Craig
 
 
  On Fri, 7 Sep 2001, srini wrote:
 
   Date: Fri, 7 Sep 2001 12:14:28 -0700
   From: srini [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Basic question about Apache+Tomcat Memory usage
  
   hi users,
   i have  this basic question in mind from so many days but din't
 get
   an answer for it.
when i try to execute a simple JSP or Servlet , generally first
   time my CPU usage goes to 80-100%.I tried with default examples which
 comes
   with Tomcat. where as i have seen big application which don't use that
 much
   memory even u do some heavy jobs.
Why is it so ???
  
System configuration:
   Pentium3900mHz processor   256MB Ram.
   Operating system:  win2K
   Tomcat 3.2.2
  
   Thanks in advance.
  
   -srini
  
  
 
 






Re: Basic question about Apache+Tomcat Memory usage

2001-09-07 Thread Pier Fumagalli

srini [EMAIL PROTECTED] wrote:

 ho sorry Craig i was talking about CPU usage. I know first time it
 translates JSP page in to Java and compiles it. But is it that much
 intensive to eat 80-100% of memory ??

It seem to me you're confusing again CPU usage with memory... 80%/100% IS
the CPU percentile activity...

 I am running my application on Apache+Tomcat. For many of the pages
 it takes 90-100% even though they are not first time visiting pages. It has
 Database connections. what is the problem ?? do i need to check the code or
 what ...?

No, it means that the baby _is_ working... It's normal for a CPU to be used
when you process some data, the JVM and APACHE are using all the available
CPU power to deliver the response as soon as possible... If it's a peak
(meaning that after you hit the page the CPU goes back to your normal load
cycle) it's normal... If it stays up at 80% 100% all the time, then, there
is a problem...

Pier





Re: /apr.h:265: #error Can not determine the proper size for apr_int64_t

2001-09-07 Thread Chris Gokey

Hi Pier,

I attached my

/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-co
nnectors/webapp/apr/include/apr.h file as you requested.

I'm not sure what you mean by checking out the latest HEAD. Before I tried
building this I did:

cd /home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-co
nnectors/webapp/
cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co apr

So that should be the lastest right?  Or do you want me to do something different than 
that.  Since I put the apr in jakarta-tomcat-connectors/webapp, do I need to include 
in as a command-line option to configure the path to the apr?

Thanks,
Chris

Pier Fumagalli wrote:

Chris Gokey [EMAIL PROTECTED] wrote:

Hi...  I'm back trying to compile mod_webapp.so for Solaris 7 this time
(I was able to sucessfully compile it under Linux two days ago :) .
After having to install:
autoconf-2.50
libtool-1.3.5
m4-1.4

I was able to run ./support/buildconf.sh
and ./configure

I'm getting stuck trying to make it, I receive this error:

All done. Now you can issue make. Good luck.

make

Compiling sources in
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/
jakarta-tomcat-connectors/webapp/lib...
make[1]: Entering directory
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat
-4.0-b7/jakarta-tomcat-connectors/webapp/lib'
Generating pr_warp_defs.h
Compiling wa_main.c
In file included from
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7
/jakarta-tomcat-connectors/webapp/apr/include/apr_general.h:61,
   from
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7
/jakarta-tomcat-connectors/webapp/include/wa.h:77,
   from wa_main.c:59:
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
ec
tors/webapp/apr/include/apr.h:198: #error Can not determine the proper
size for
apr_int64_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
ec
tors/webapp/apr/include/apr.h:253: #error Can not determine the proper
size for
ssize_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
ec
tors/webapp/apr/include/apr.h:256: #error Can not determine the proper
size for
size_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
ec
tors/webapp/apr/include/apr.h:265: #error Can not determine the proper
size for
apr_int64_t
make[1]: *** [wa_main.lo] Error 1
make[1]: Leaving directory
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-
4.0-b7/jakarta-tomcat-connectors/webapp/lib'
make: *** [local-all] Error 2

This is from the latest checkout of jakarata-tomcat-connectors/webapp
and the apr (Sept 6)


Any idea why it is returning this error?


Yes, it seems that APR is somehow in trouble finding some of the default
definitions in length of storage pointers... Can you send over a copy of
your 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-co
nnectors/webapp/apr/include/apr.h file?

It seems that somehow configure is not recognizing those...

You might want to try also checking out the latest HEAD of apr out of CVS
and configuring your module running:

./configure --with-apr=where_you_checked_out_apr...

That might work...

Pier





#ifndef APR_H
#define APR_H

/**
 * @file include/apr.h
 * @brief APR APR Main Include
 */
/**
 * @defgroup APR APR Routines
 * @{
 */

/* So that we can use inline on some critical functions, and use
 * GNUC attributes (such as to get -Wall warnings for printf-like
 * functions).  Only do this in gcc 2.7 or later ... it may work
 * on earlier stuff, but why chance it.
 *
 * We've since discovered that the gcc shipped with NeXT systems
 * as cc is completely broken.  It claims to be __GNUC__ and so
 * on, but it doesn't implement half of the things that __GNUC__
 * means.  In particular it's missing inline and the __attribute__
 * stuff.  So we hack around it.  PR#1613. -djg
 */
#if !defined(__GNUC__) || __GNUC__  2 || \
(__GNUC__ == 2  __GNUC_MINOR__  7) ||\
defined(NEXT)
#define APR_INLINE
#define __attribute__(__x)
#define APR_HAS_INLINE  0
#else
#define APR_INLINE __inline__
#define APR_HAS_INLINE  1
#endif

#define APR_HAVE_ARPA_INET_H 1
#define APR_HAVE_CONIO_H 0
#define APR_HAVE_CRYPT_H 1
#define APR_HAVE_CTYPE_H 1
#define APR_HAVE_DIRENT_H1
#define APR_HAVE_ERRNO_H 1
#define APR_HAVE_FCNTL_H 1
#define APR_HAVE_IO_H0
#define APR_HAVE_LIMITS_H1
#define APR_HAVE_NETDB_H 1
#define APR_HAVE_NETINET_IN_H1
#define APR_HAVE_NETINET_TCP_H   1
#define APR_HAVE_PTHREAD_H   0
#define APR_HAVE_STDARG_H1
#define APR_HAVE_STDIO_H 1
#define APR_HAVE_STDINT_H1
#define APR_HAVE_STDLIB_H1
#define APR_HAVE_SIGNAL_H1
#define APR_HAVE_STRING_H1
#define APR_HAVE_STRINGS_H   1
#define APR_HAVE_SYS_SENDFILE_H  1
#define APR_HAVE_SYS_SIGNAL_H1
#define APR_HAVE_SYS_SOCKET_H1

Re: The Problem Posted Again....

2001-09-07 Thread Denis Haskin

Ron Nicoletti Jr. wrote:

 I've completed my installation of jakarta-tomcat-3.2.3 on windows 2000
 running IIS, and ISA Server.

 The positives ...
 Tomcat starts and creates log files
 IIS is showing a green up arrow on isapi_redirect.dll

 The Negatives ...
 When I run a test on the link http://www.mktginc.com/examples/jsp/index.html
 my tomcat log displays the following:
 [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61

errno=61 is connection refused.  Sounds like IIS is trying to talk to Tomcat
on a different port than tomcat is listening on?  Are you sure Tomcat is coming
up and staying up?

Check server.xml to see what port Tomcat is listening on for the ajp protocol
(by default it's 8007 for ajp12) and check workers.properties to make sure it's
the same there.

I'm not familiar with what other configurations are necessary for IIS.

dwh




RE: Servlet/JSP - content-type

2001-09-07 Thread Craig R. McClanahan



On Fri, 7 Sep 2001, Ratnakar  Palle wrote:

 Date: Fri, 7 Sep 2001 12:41:38 -0700
 From: Ratnakar  Palle [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Servlet/JSP - content-type

 Thanks Craig for clarification...

 I've another question on that line..

 I'm actually using the i18n tag library in the same jsp page. That is, it
 looks something like this:

 %@ page import=com.cisco.appadmin.login.ui.LoginController %
 jsp:useBean id=controller scope=request
 class=com.cisco.appadmin.login.ui.LoginController /jsp:useBean
 %@ taglib uri=http://jakarta.apache.org/taglibs; prefix=i18n %
 i18n:bundle baseName=com.cisco.appadmin.text.resources.LoginRB
 locale=%= controller.getLocale() % /
 % response.setContentType(text/html;charset= + controller.getCharset());
 %

 So, it should be OK in jsp1.2 spec ( i.e. Tomcat 4.x version), right!!

 The reason am asking is, looks like the tag i18n:bundle also sets the
 content type but I want the content-type to be set based on my databean.
 Based on your reason, this should work because am overwriting the content
 type with % response.setContentType(text/html;charset= +
 controller.getCharset()); %...
 And, container will wait until, the buffer is filled (or flushed)..

 Please correct me if am wrong!!


Conceptually, this should work ... but you might want to ask on the
TAGLIBS-USER list as well.  I've never used this particular tag library.

 Thanks for your time,
 -Ratnakar


Craig




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig
 R. McClanahan
 Sent: Friday, September 07, 2001 12:18 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Servlet/JSP - content-type


 On Fri, 7 Sep 2001, Ratnakar  Palle wrote:

  Date: Fri, 7 Sep 2001 12:07:07 -0700
  From: Ratnakar  Palle [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: RE: Servlet/JSP - content-type
 
  Hi Craig,
 
  Thanks for your quick response...
  I understand that RequestDispatcher.forward() erases any headers but I'm
 not
  setting any header info in the servlet. I want to set it in the jsp, how
 do
  I do that!!
  I've the charset info in the databean and I want to use that bean to set
 it
  in the jsp like I indicated in my previous mail:
 
  %@ page language=java %
  jsp:useBean id=controller scope=request
  class=apps.test.LoginController /jsp:useBean
  % response.setContentType(text/html;charset= +
 controller.getCharset());
  %
 
  Any idea??
 
  Hope I was clear!!
 

 Ah, missed that little detail ... I jumped to an incorrect conclusion when
 you said model 2 :-)

 In a JSP 1.1 environment (i.e. Tomcat 3.x), the character set used on the
 output page itself is determined by when the container calls
 response.getWriter().  There is no spec language to define this, so
 containers are free to do what they want -- and Tomcat calls
 response.getWriter() before your scriptlet has the chance to do anything.
 Therefore, your custom character encoding is ignored.

 In a JSP 1.2 environment (i.e. Tomcat 4.0), the container is supposed to
 wait before calling getWriter() until you fill the buffer (or flush it
 yourself).  Therefore, your code should work in Tomcat 4.

  Thanks,
  -Ratnakar
 

 Craig

 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig
  R. McClanahan
  Sent: Friday, September 07, 2001 9:45 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Servlet/JSP - content-type
 
 
  Calling RequestDispatcher.forward() erases any headers that have been set
  by the servlet, so your technique is not going to work.  You will have to
  set the content type in the JSP page.
 
  Craig
 
 
  On Fri, 7 Sep 2001, Ratnakar  Palle wrote:
 
   Date: Fri, 7 Sep 2001 09:35:36 -0700
   From: Ratnakar  Palle [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Servlet/JSP - content-type
  
   Hi All,
  
   I'm using model 2 architecture, i.e. request comes to servlet, servlet
  does
   the process and creates the bean and forwards it to JSP. Finally, jsp
  sends
   the response to the client.
   But, I've a question about the content-type. My bean, should set the
   content-type on jsp and I don't want jsp to set the default
 content-type.
  
   I'm doing something like this:
   %@ page language=java %
   jsp:useBean id=controller scope=request
   class=apps.test.LoginController /jsp:useBean
   % response.setContentType(text/html;charset= +
  controller.getCharset());
   %
  
   But, looks like jsp is ignoring the content-type set by me because jsp
 by
   itself sets the default content-type as I didn't provide any contentType
   parameter with %@ page  tag.
  
   Do you've any idea, how to overcome this situation??
  
   Thanks,
   -Ratnakar
  
  
 
 






Re: /apr.h:265: #error Can not determine the proper size forapr_int64_t

2001-09-07 Thread Tom Northcutt

Found this on google:

http://www2.real-time.com/pipermail/tomcat-devel/2001-July/020147.html



On Fri, 7 Sep 2001, Chris Gokey wrote:

Hi...  I'm back trying to compile mod_webapp.so for Solaris 7 this time 
(I was able to sucessfully compile it under Linux two days ago :) . 
 After having to install:
autoconf-2.50
libtool-1.3.5
m4-1.4

I was able to run ./support/buildconf.sh
and ./configure

I'm getting stuck trying to make it, I receive this error:

All done. Now you can issue make. Good luck.
  make

Compiling sources in 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/
jakarta-tomcat-connectors/webapp/lib...
make[1]: Entering directory 
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat
-4.0-b7/jakarta-tomcat-connectors/webapp/lib'
Generating pr_warp_defs.h
Compiling wa_main.c
In file included from 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7
/jakarta-tomcat-connectors/webapp/apr/include/apr_general.h:61,
 from 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7
/jakarta-tomcat-connectors/webapp/include/wa.h:77,
 from wa_main.c:59:
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-connec
tors/webapp/apr/include/apr.h:198: #error Can not determine the proper 
size for
apr_int64_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-connec
tors/webapp/apr/include/apr.h:253: #error Can not determine the proper 
size for
ssize_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-connec
tors/webapp/apr/include/apr.h:256: #error Can not determine the proper 
size for
size_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-connec
tors/webapp/apr/include/apr.h:265: #error Can not determine the proper 
size for
apr_int64_t
make[1]: *** [wa_main.lo] Error 1
make[1]: Leaving directory 
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-
4.0-b7/jakarta-tomcat-connectors/webapp/lib'
make: *** [local-all] Error 2

This is from the latest checkout of jakarata-tomcat-connectors/webapp 
and the apr (Sept 6)


Any idea why it is returning this error?

Thanks,
Chris





Re: How to declare Output as Image?

2001-09-07 Thread Denis Haskin

Andrej Rosenheinrich wrote:

 Hello,

 i have a servlet, getting an BufferedImage, that shall be displayed in
 my webpage. for doing this I use the following code:

 ServletOutputStream sos = response.getOutputStream();
 JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
 encoder.encode(image);

 I guess, I somehow have to tell the servlet/outputstream??? that the
 upcoming data is an image. right? how can i do this in a servlet? any hints?

You have to tell the client what the content-type of the response is, so add
something like:

response.setContentType(image/jpeg);

Then when the browser gets the response, it looks at the header and says oh,
it's image data and knows to render it accordingly.

dwh




Re: /apr.h:265: #error Can not determine the proper size for apr_int64_t

2001-09-07 Thread Chris Gokey

After doing:
cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co -r HEAD apr
(inside of jakarta-tomcat-connectors/webapps)

I attached the apr/include/apr.h file in this email.

Here are the error messages I received.

---

All done. Now you can issue make. Good luck.
 
  make

Compiling sources in 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/
jakarta-tomcat-connectors/webapp/apr...
make[1]: Entering directory 
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat
-4.0-b7/jakarta-tomcat-connectors/webapp/apr'
Making all in strings
make[2]: Entering directory 
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat
-4.0-b7/jakarta-tomcat-connectors/webapp/apr/strings'
make[3]: Entering directory 
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat
-4.0-b7/jakarta-tomcat-connectors/webapp/apr/strings'
/bin/sh 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomca
t-connectors/webapp/apr/libtool --silent --mode=compile gcc
-DHAVE_CONFIG_H -
DSOLARIS2=7 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT   -I../include 
-I../include/
arch/unix  -c apr_cpystrn.c  touch apr_cpystrn.lo
In file included from apr_cpystrn.c:55:
../include/apr.h:198: #error Can not determine the proper size for 
apr_int64_t
../include/apr.h:253: #error Can not determine the proper size for ssize_t
../include/apr.h:256: #error Can not determine the proper size for size_t
../include/apr.h:265: #error Can not determine the proper size for 
apr_int64_t
make[3]: *** [apr_cpystrn.lo] Error 1
make[3]: Leaving directory 
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-
4.0-b7/jakarta-tomcat-connectors/webapp/apr/strings'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-
4.0-b7/jakarta-tomcat-connectors/webapp/apr/strings'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-
4.0-b7/jakarta-tomcat-connectors/webapp/apr'
make: *** [apr-all] Error 2

--

If I try specifying what the path of the apr during configure, I get this:

  ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=`pwd`/apr
checking for test... /bin/test
checking for true... /bin/true
checking for echo... /bin/echo
checking for grep... /bin/grep
checking for cat... /bin/cat
checking for sed... /bin/sed
checking for rm... /bin/rm
checking sources directory... 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-connectors/webapp
checking debugging flags... disabled
checking Java support... disabled
checking Tomcat 4.0 directory... not required
checking if apxs is working... ok
setting target module to... 
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-connectors/webapp/apache-1.3
checking APR directory... configure: error: Cannot find APR buildconf 
program in /usr/local/apache_1.3.17
 

Why is it looking in /usr/local/apche_1.3.17 for buildconf when I 
specify the apr in a completely different directory?

Take care,
Chris


Pier Fumagalli wrote:

Chris Gokey [EMAIL PROTECTED] wrote:

Hi...  I'm back trying to compile mod_webapp.so for Solaris 7 this time
(I was able to sucessfully compile it under Linux two days ago :) .
After having to install:
autoconf-2.50
libtool-1.3.5
m4-1.4

I was able to run ./support/buildconf.sh
and ./configure

I'm getting stuck trying to make it, I receive this error:

All done. Now you can issue make. Good luck.

make

Compiling sources in
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/
jakarta-tomcat-connectors/webapp/lib...
make[1]: Entering directory
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat
-4.0-b7/jakarta-tomcat-connectors/webapp/lib'
Generating pr_warp_defs.h
Compiling wa_main.c
In file included from
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7
/jakarta-tomcat-connectors/webapp/apr/include/apr_general.h:61,
   from
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7
/jakarta-tomcat-connectors/webapp/include/wa.h:77,
   from wa_main.c:59:
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
ec
tors/webapp/apr/include/apr.h:198: #error Can not determine the proper
size for
apr_int64_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
ec
tors/webapp/apr/include/apr.h:253: #error Can not determine the proper
size for
ssize_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
ec
tors/webapp/apr/include/apr.h:256: #error Can not determine the proper
size for
size_t
/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-4.0-b7/jakarta-tomcat-conn
ec
tors/webapp/apr/include/apr.h:265: #error Can not determine the proper
size for
apr_int64_t
make[1]: *** [wa_main.lo] Error 1
make[1]: Leaving directory
`/home/mddevel/MD8_Devel/MD8/packages/jakarta-tomcat-
4.0-b7/jakarta-tomcat-connectors/webapp/lib'
make: *** [local-all] Error 2

This is from the latest checkout of 

Re: /apr.h:265: #error Can not determine the proper size forapr_int64_t

2001-09-07 Thread Pier Fumagalli

Tom Northcutt [EMAIL PROTECTED] wrote:

 Found this on google:
 
 http://www2.real-time.com/pipermail/tomcat-devel/2001-July/020147.html

Oh, yes... I remember that now (my tomcat-user archive is limited locally,
and July was a LONG time ago)... If I remember it right, the guy didn't have
a package installed... Something like SUNWinc or something like that...

On my SOL8 those are the relevant packages I installed.

system  SUNWarcArchive Libraries
system  SUNWbtool  CCS tools bundled with SunOS
system  SUNWheaSunOS Header Files
system  SUNWipcInterprocess Communications
system  SUNWlibC   Sun Workshop Compilers Bundled libC
system  SUNWlibm   Sun WorkShop Bundled libm
system  SUNWlibms  Sun WorkShop Bundled shared libm
system  SUNWpshPlatform Support, Driver Header Files
system  SUNWsprot  Solaris Bundled tools
system  SUNWsrhSource Compatibility Header Files

Might change for your setup, though...

Pier




RE: Servlet/JSP - content-type

2001-09-07 Thread Ratnakar Palle

Thanks Craig, I'll check with TAGLIBS-USER list

-Ratnakar


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig
R. McClanahan
Sent: Friday, September 07, 2001 1:02 PM
To: [EMAIL PROTECTED]
Subject: RE: Servlet/JSP - content-type




On Fri, 7 Sep 2001, Ratnakar  Palle wrote:

 Date: Fri, 7 Sep 2001 12:41:38 -0700
 From: Ratnakar  Palle [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Servlet/JSP - content-type

 Thanks Craig for clarification...

 I've another question on that line..

 I'm actually using the i18n tag library in the same jsp page. That is, it
 looks something like this:

 %@ page import=com.cisco.appadmin.login.ui.LoginController %
 jsp:useBean id=controller scope=request
 class=com.cisco.appadmin.login.ui.LoginController /jsp:useBean
 %@ taglib uri=http://jakarta.apache.org/taglibs; prefix=i18n %
 i18n:bundle baseName=com.cisco.appadmin.text.resources.LoginRB
 locale=%= controller.getLocale() % /
 % response.setContentType(text/html;charset= +
controller.getCharset());
 %

 So, it should be OK in jsp1.2 spec ( i.e. Tomcat 4.x version), right!!

 The reason am asking is, looks like the tag i18n:bundle also sets the
 content type but I want the content-type to be set based on my databean.
 Based on your reason, this should work because am overwriting the content
 type with % response.setContentType(text/html;charset= +
 controller.getCharset()); %...
 And, container will wait until, the buffer is filled (or flushed)..

 Please correct me if am wrong!!


Conceptually, this should work ... but you might want to ask on the
TAGLIBS-USER list as well.  I've never used this particular tag library.

 Thanks for your time,
 -Ratnakar


Craig




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig
 R. McClanahan
 Sent: Friday, September 07, 2001 12:18 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Servlet/JSP - content-type


 On Fri, 7 Sep 2001, Ratnakar  Palle wrote:

  Date: Fri, 7 Sep 2001 12:07:07 -0700
  From: Ratnakar  Palle [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: RE: Servlet/JSP - content-type
 
  Hi Craig,
 
  Thanks for your quick response...
  I understand that RequestDispatcher.forward() erases any headers but I'm
 not
  setting any header info in the servlet. I want to set it in the jsp, how
 do
  I do that!!
  I've the charset info in the databean and I want to use that bean to set
 it
  in the jsp like I indicated in my previous mail:
 
  %@ page language=java %
  jsp:useBean id=controller scope=request
  class=apps.test.LoginController /jsp:useBean
  % response.setContentType(text/html;charset= +
 controller.getCharset());
  %
 
  Any idea??
 
  Hope I was clear!!
 

 Ah, missed that little detail ... I jumped to an incorrect conclusion when
 you said model 2 :-)

 In a JSP 1.1 environment (i.e. Tomcat 3.x), the character set used on the
 output page itself is determined by when the container calls
 response.getWriter().  There is no spec language to define this, so
 containers are free to do what they want -- and Tomcat calls
 response.getWriter() before your scriptlet has the chance to do anything.
 Therefore, your custom character encoding is ignored.

 In a JSP 1.2 environment (i.e. Tomcat 4.0), the container is supposed to
 wait before calling getWriter() until you fill the buffer (or flush it
 yourself).  Therefore, your code should work in Tomcat 4.

  Thanks,
  -Ratnakar
 

 Craig

 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Craig
  R. McClanahan
  Sent: Friday, September 07, 2001 9:45 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Servlet/JSP - content-type
 
 
  Calling RequestDispatcher.forward() erases any headers that have been
set
  by the servlet, so your technique is not going to work.  You will have
to
  set the content type in the JSP page.
 
  Craig
 
 
  On Fri, 7 Sep 2001, Ratnakar  Palle wrote:
 
   Date: Fri, 7 Sep 2001 09:35:36 -0700
   From: Ratnakar  Palle [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Subject: Servlet/JSP - content-type
  
   Hi All,
  
   I'm using model 2 architecture, i.e. request comes to servlet, servlet
  does
   the process and creates the bean and forwards it to JSP. Finally, jsp
  sends
   the response to the client.
   But, I've a question about the content-type. My bean, should set the
   content-type on jsp and I don't want jsp to set the default
 content-type.
  
   I'm doing something like this:
   %@ page language=java %
   jsp:useBean id=controller scope=request
   class=apps.test.LoginController /jsp:useBean
   % response.setContentType(text/html;charset= +
  controller.getCharset());
   %
  
   But, looks like jsp is ignoring the content-type set by me because jsp
 by
   itself sets the default content-type as I didn't provide any
contentType
   parameter with %@ page  tag.
  
   Do 

RE: Database Driver - I have found the answer

2001-09-07 Thread Robert Turner

I have found the answer to the problem. In the files
workers.properties and wrapper.properties there are
some classpath lines. I each I added a line with the
JSQLconnect.jar in it.

worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)JSQLconnect.jar
wrapper.class_path=$(wrapper.tomcat_home)\lib\JSQLconnect.jar

Whether they are both needed I do not know, I am not
going to play around now that it works.

Thank you for all your help.

Robert T Turner




-Original Message-
   I downloaded, yesterday, JSQLConnect but I am
failing to get it to
 work. I am using Windows XP (RC1), MSSQL7, IIS5 and
Tomcat 3.3

   I have placed the jsqlconnect.jar in the tomcat
lib
 folder and have also
 placed that location in the CLASSPATH environmental
 variable.

   The code I am using to test it is:

   %@ page language   !--
   File: index.jsp
   Author: Robert T Turner
   Date: September 2001
   --
   %

   Class.forName(com.jnetdirect.jsql.JSQLDriver);

   Connection
myConnÞrManager.getConnection(jdbc:JSQLConnect://loc
 alhost/database
 rectoryuserÚilerpassword
   Statement stmt   String query description;

   ResultSet rs
   The error message I am getting is

   Error: 500
   Location: /jsp/index.jsp
   Internal Servlet Error:

   javax.servlet.ServletException: Unable to load
class
 com.jnetdirect.jsql.JSQLDriver
at
org.apache.jasper.runtime.PageContextImpl.handlePageExcept
 ion(PageContextImp
 l.java:459)
at
_0002findex_0002ejspindex_jsp_14._jspService(_0002findex_0
 002ejspindex_jsp_1
 4.java:118)
at

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.
 java:119)
at

javax.servlet.http.HttpServlet.service(HttpServlet.java:85
 3)
at

org.apache.jasper.servlet.JspServlet$JspCountedServlet.ser
 vice(JspServlet.ja
 va:130)
at

javax.servlet.http.HttpServlet.service(HttpServlet.java:85
 3)
at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.ser
 vice(JspServlet.ja
 va:282)
at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspSer
 vlet.java:429)
at

org.apache.jasper.servlet.JspServlet.service(JspServlet.ja
 va:500)
at

javax.servlet.http.HttpServlet.service(HttpServlet.java:85
 3)
at

org.apache.tomcat.core.ServletWrapper.doService(ServletWra
 pper.java:405)
at

org.apache.tomcat.core.Handler.service(Handler.java:287)
at

org.apache.tomcat.core.ServletWrapper.service(ServletWrapp
 er.java:372)
at

org.apache.tomcat.core.ContextManager.internalService(Cont
 extManager.java:81
 2)
at

org.apache.tomcat.core.ContextManager.service(ContextManag
 er.java:758)
at

org.apache.tomcat.service.connector.Ajp12ConnectionHandler
 .processConnection
 (Ajp12ConnectionHandler.java:166)
at

org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEnd
 point.java:416)
at

org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Thre
 adPool.java:501)
at java.lang.Thread.run(Thread.java:484)

   Root cause:
   java.lang.ClassNotFoundException: Unable to load
class
 com.jnetdirect.jsql.JSQLDriver
at
org.apache.jasper.servlet.JasperLoader.findClass(JasperLoa
 der.java:223)
at
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoa
 der.java:147)
at

java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at

java.lang.ClassLoader.loadClassInternal(ClassLoader.java:3
 13)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at

_0002findex_0002ejspindex_jsp_14._jspService(_0002findex_0
 002ejspindex_jsp_1
 4.java:62)
at

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.
 java:119)
at

javax.servlet.http.HttpServlet.service(HttpServlet.java:85
 3)
at

org.apache.jasper.servlet.JspServlet$JspCountedServlet.ser
 vice(JspServlet.ja
 va:130)
at

javax.servlet.http.HttpServlet.service(HttpServlet.java:85
 3)
at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.ser
 vice(JspServlet.ja
 va:282)
at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspSer
 vlet.java:429)
at

org.apache.jasper.servlet.JspServlet.service(JspServlet.ja
 va:500)
at

javax.servlet.http.HttpServlet.service(HttpServlet.java:85
 3)
at

org.apache.tomcat.core.ServletWrapper.doService(ServletWra
 pper.java:405)
at

org.apache.tomcat.core.Handler.service(Handler.java:287)
at

org.apache.tomcat.core.ServletWrapper.service(ServletWrapp
 er.java:372)
at

org.apache.tomcat.core.ContextManager.internalService(Cont
 extManager.java:81
 2)
at

org.apache.tomcat.core.ContextManager.service(ContextManag
 er.java:758)
at

org.apache.tomcat.service.connector.Ajp12ConnectionHandler
 .processConnection
 (Ajp12ConnectionHandler.java:166)
at

org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEnd
 point.java:416)
at

org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Thre
 adPool.java:501)
at java.lang.Thread.run(Thread.java:484)

   Is there something I need to set up in any of the
properties files
 or xml files?

   I think I am 

RE: Re: Another issue with tc4.0-b7 webapp and Apache 1.3.20 accessfiles in another location

2001-09-07 Thread Peter Shankey

I hoped a bug report the number is 3476
Pete

Pier Fumagalli [EMAIL PROTECTED] wrote:

Peter Shankey [EMAIL PROTECTED] wrote:

 Solaris sparc 8
 Tomcat 4.0 b7
 Apache 1.3.20
 webapp module 1.0 for tc4.0-b7
 I am trying to use a location to install the web application (war) files
 other than $CATALINA_HOME. Currently I am working with the default files
 which are installed when the Tomcat application is compiled. I can get it
 to work from the default location. However, I can not from any other. I
 have read the docs until my eyes blend, but no joy. What am I missing?
 how could I run these files from /u80/w4/PUB/tc/default-webapps ?
 I have included my log file from tomcat, server.xml part/of httpd.conf
 and a detailed directory listing of the location I am trying to install
 the default files. I think it may-be and issue with webapp because I
 could access the files Tomcat's build-in http connector. Also the log
 file tend to make me think that as well.

Yes... It seems to be a problem with the webapp module... I'll dig into
that, in the meantime, please post a bug on
http://nagoya.apache.org/bugzilla so that we can track the status (and gets
into my todo list :)

pier




__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




Re: No one answering my question (security realted problem)

2001-09-07 Thread Sukhwinder Singh

  Completely clear your CLASSPATH. Then, install a fresh copy of Tomcat.
Then,
  try to access some of the sample servlets.
  
  If that doesn't work, you might want to give Tomcat 4 a try. Tomcat 4 is
due out in mid-September. Tomcat 4 doesn't use CLASSPATH at all, so, maybe
that'll fix your problem.
  
Also, make sure you're running the latest version of Sun's JDK, 1.3.1.
  
  Jon
  
Yes I am using jdk1.3.1. I had already cleared the classpath which was set
using autoexce.bat when I found in mail archive that two servlet.jar in
classpath can cause this sealing violation . My problem is only related to
tomcat 3.2.3 and version 3.2.2 works well.

Sukhwinder Singh

  - Original Message -
  From: Sukhwinder Singh [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, September 06, 2001 4:10 PM
  Subject: Re: No one answering my question (security realted problem)
  
  
  
 It's unclear to me why you're recompiling tomcat.  Why not just use
a
   binary
 distribution?  I've never compiled it from source...
  
 dwh
  
   Hello,
 I have also downloaded binary version of tomcat 3.2.3 but even that
   doesn't start.
  
   SS
  
  
  
  
  
   ___
   http://inbox.excite.com
  
  
  





___
http://inbox.excite.com





servlet.jar

2001-09-07 Thread Ryan Ford

Hello List :)

I have successfully installed the following system:

RedHat 7.1
Apache 1.3.19 (I think - I installed the one that comes with RH dist.)
Tomcat 3.2.3 Binary
Sun JDK 1.3.1 Binary

Everything plays together nicely so far, except I can't seem to compile a
servlet.  From what I'm seeing and what I understand, its somehow not
recognizing my servlet.jar file in $TOMCAT_HOME/lib (even though it sees the
tools.jar among others).  Any help would be much appreciated.

Error Message is:

SimpleServlet.java:1: package javax.servlet does not exist
import javax.servlet.*;
^
SimpleServlet.java:2: package javax.servlet.http does not exist
import javax.servlet.http.*;
^

And then everywhere I make a reference to something in one of those packages
O get a cannot resolve symbol


Servlet Code:

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class SimpleServlet extends HttpServlet {

public void init(ServletConfig config)
  throws ServletException {
super.init(config);
}

public void doGet(HttpServletRequest request,
  HttpServletResponse response)
  throws ServletException, IOException {
response.setContentType(text/html);
PrintWriter out = response.getWriter();

out.println(html);
out.println(headtitleSimpleServlet/title/head);
out.println(body);

out.println(Your request method was  + request.getMethod()
  + \n);

out.println(/body/html);
out.close();
}
}



homegrown client authentication

2001-09-07 Thread Brad Pardee

Does anyone know if its possible to override the
default client authentication under HTTPS.  If I
understand right, the default authentication just
verifies that the clients certificate has been signed
by somebody in the server's truststore.  Is it
possible to extend the SSLAuthenticator class to
implement your own authentication and set this class
as the authenticator instead?  I'm using tomcat 3.2.3

Thanks in advance!

__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



RE: servlet.jar

2001-09-07 Thread Ryan Ford


LOL Somehow my classpath got aced, and when i finally added a path to the
servlet.jar file(using the directory didnt work =P) my servlet compiled..

Thanks for your time :)

-Original Message-
From: Ryan Ford [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 2:39 PM
To: Tomcat-User (E-mail)
Subject: servlet.jar


Hello List :)

I have successfully installed the following system:

RedHat 7.1
Apache 1.3.19 (I think - I installed the one that comes with RH dist.)
Tomcat 3.2.3 Binary
Sun JDK 1.3.1 Binary

Everything plays together nicely so far, except I can't seem to compile a
servlet.  From what I'm seeing and what I understand, its somehow not
recognizing my servlet.jar file in $TOMCAT_HOME/lib (even though it sees the
tools.jar among others).  Any help would be much appreciated.

Error Message is:

SimpleServlet.java:1: package javax.servlet does not exist
import javax.servlet.*;
^
SimpleServlet.java:2: package javax.servlet.http does not exist
import javax.servlet.http.*;
^

And then everywhere I make a reference to something in one of those packages
O get a cannot resolve symbol


Servlet Code:

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class SimpleServlet extends HttpServlet {

public void init(ServletConfig config)
  throws ServletException {
super.init(config);
}

public void doGet(HttpServletRequest request,
  HttpServletResponse response)
  throws ServletException, IOException {
response.setContentType(text/html);
PrintWriter out = response.getWriter();

out.println(html);
out.println(headtitleSimpleServlet/title/head);
out.println(body);

out.println(Your request method was  + request.getMethod()
  + \n);

out.println(/body/html);
out.close();
}
}



Error: 500 in jk_nt_service.exe; not logoff error

2001-09-07 Thread Rick Hodgson

I've encountered an error which I've not seen discussed in any thread.

I get a null pointer exception when I attempt to execute my servlet via
Tomcat running under the jk_nt_service.exe module.

If I stop the Jakarta service and run Tomcat as a forground process,
my servlet works as expected.

Note, I get the exact same error if I run Tomcat via the JavaService
module mentioned in the TC3.2.3 documentation.

Also, my servlet is indirectly invoked via a Do It web page. This Do
It page is being correctly processed by Tomcat as NT service.

Environment:
jdk1.3.1
j2sdkee1.2.1
IIS 5.5/sp1
Tomcat3.2.3 (dated 07/17/2001)
Win2K/sp2

Installed, configured and tested Tomcat3.2.3 with supplied /examples.

Installed, configured and tested Tomcat3.2.3 jk_nt_service.exe with
supplied /examples.

Deployed and configured my ebiz servlet in webapps/ebiz.

Any attempt to invoke the servlet Rwh_Ebiz_Svlt fails with the
following:

-
Error: 500
Location: /ebiz/Rwh_Ebiz_Svlt
Internal Servlet Error:

java.lang.NullPointerException
 at java.lang.ClassLoader.resolveClass0(Native Method)
 at java.lang.ClassLoader.resolveClass(ClassLoader.java:588)
 at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:518)

 at
org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoader.java:174)

 at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:265)

 at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
 at org.apache.tomcat.core.Handler.service(Handler.java:254)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)

 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
 at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)

 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

 at java.lang.Thread
-

As can be seen, Tomcat does parse and attempt to load
/ebiz/Rwh_Ebiz_Svlt but fails.

The stderr.log from Tomcat as service shows the following extra line
in its exception handler:

-
2001-09-07 17:23:24 - Ctx( /ebiz ): Exception in: R( /ebiz +
Rwh_Ebiz_Svlt + null) - java.lang.NullPointerException
-

Anyone else encounter this problem? Anyone have a solution?

Rick W. Hodgson



  1   2   >