RE: Is 3.1 a production ready release?

2000-11-14 Thread Kitching Simon

Hi,

No, 3.1 is not production quality - I know, I tried :-(

However, 3.2 is due out in a matter of a week or two.
I am using 3.2beta6 for a small-medium volume 
business-to-business web site, and it is ok. Not
the fastest webserver in the world, but adequate, 
open-source, free, standards-compliant, and 
improving at a great rate.

The verdict on 3.2's stability will be coming 
in over the next few months, I guess, as
people do try to use it in large sites...

 -Original Message-
 From: Ranko Bijelonic [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, November 13, 2000 11:51 PM
 To:   [EMAIL PROTECTED]
 Subject:  Is 3.1 a production ready release?
 
 Hi,
 
 would you use 3.1 in your production environment or is this just for
 testing
 and development?



Re[2]: Is 3.1 a production ready release?

2000-11-14 Thread Sandor Spruit


Simon

On Tuesday, November 14, 2000, 10:18:50 AM, you wrote:

Kitching Hi,

Kitching No, 3.1 is not production quality - I know, I tried :-(

Kitching However, 3.2 is due out in a matter of a week or two.
Kitching I am using 3.2beta6 for a small-medium volume 
Kitching business-to-business web site, and it is ok. Not
Kitching the fastest webserver in the world, but adequate, 
Kitching open-source, free, standards-compliant, and 
Kitching improving at a great rate.

Isn't Tomcat supposed to be used in conjunction with a good
webserver like Apache ?

Sandor

-- 
ir A.G.L. Spruit, Utrecht University, the Netherlands
Institute of information and computing sciences
"There is a bit of magic in everything, and then some
loss to even things out" (from: Lou Reed, "Magic and Loss")





AW: How many sessions are open?

2000-11-14 Thread Till Gartner

Sounds interesting. Unfortunately I missed the thread about
HttpSessionBindingListener. Any tip where to find some info about it?

-- Till.

-Ursprüngliche Nachricht-
Von: Samuel Yuen [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 9. November 2000 15:21
An: [EMAIL PROTECTED]
Betreff: Re: How many sessions are open?



Hi,

as you must seen, there was some discussion about how to detect the closing
of
a session lately. You can follow the same idea and create a static object
that
implements HttpSessionBindingListener and add this same object to all the
sessions that are created. It can have a internal variable which stores the
number of sessions open.

Samuel


Till Gartner wrote:

 Hi List,

 we're heavily using Tomcat for our new service (check out
 http://www.cardxchange.net for a nice webapp).

 As we went live monday morning (at 1:30 am - uff), we still have some
bugs.
 We
 analyzed them  fixed them in the code. Now we'd like to "roll them out"
in
 our live system. Unfortunately we don't know wether we can shut it down
for
 this one minute task of copying the fixes JSPs and classes and restarting
 the tomcat engine.

 Is there a way to find out how many sessions are open?

 Thanx for the help,
 -- Till.



RE: How many sessions are open?

2000-11-14 Thread Lacerda, Wellington (AFIS)

On the Servlet API javadocs.

Wellington Silva
UN/FAO

-Original Message-
From: Till Gartner [mailto:[EMAIL PROTECTED]]
Sent: 14 November 2000 11:11
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Subject: AW: How many sessions are open?


Sounds interesting. Unfortunately I missed the thread about
HttpSessionBindingListener. Any tip where to find some info about it?

-- Till.

-Ursprüngliche Nachricht-
Von: Samuel Yuen [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 9. November 2000 15:21
An: [EMAIL PROTECTED]
Betreff: Re: How many sessions are open?



Hi,

as you must seen, there was some discussion about how to detect the closing
of
a session lately. You can follow the same idea and create a static object
that
implements HttpSessionBindingListener and add this same object to all the
sessions that are created. It can have a internal variable which stores the
number of sessions open.

Samuel


Till Gartner wrote:

 Hi List,

 we're heavily using Tomcat for our new service (check out
 http://www.cardxchange.net for a nice webapp).

 As we went live monday morning (at 1:30 am - uff), we still have some
bugs.
 We
 analyzed them  fixed them in the code. Now we'd like to "roll them out"
in
 our live system. Unfortunately we don't know wether we can shut it down
for
 this one minute task of copying the fixes JSPs and classes and restarting
 the tomcat engine.

 Is there a way to find out how many sessions are open?

 Thanx for the help,
 -- Till.



Re: servlets problem is still there

2000-11-14 Thread Dominique BATARD



Did you try http://localhost:8004/servlet/hi 
?

Dom

  - Original Message - 
  From: 
  Rasika 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, November 14, 2000 7:41 
  AM
  Subject: servlets problem is still 
  there
  
  
  Hello,I have installed TOMCAT with Apache. I 
  followed your user guide and then tomcat faqs to install tomcat.Now I am 
  able to run .jsp files using both tomcat as well as Apache. I can also run 
  sample servlet provided alongwith examples. But I cannot run my own 
  servlet.I have stored itin webapps/root/web-inf/classes directory. I 
  still don't understand which files need to be configured in order to run my 
  servlets?I have added following block to web.xml 
  fileservlet 
  servlet-namehi/servlet-name 
  servlet-classhi/servlet-class 
  /servlet
  
   
  servlet-mapping 
  servlet-namehi/servlet-name 
  url-pattern/hi/url-pattern 
  /servlet-mapping
  where "hi" is the name of my servlet file. 
  But when I try to run it through browser giving command http://localhost:8040//hi where 8040 is 
  apache port(which I have changed ) it gives me 404 error.Can you 
  please help me in configuring files so as to run my own 
  servlets?Thanks,Rasikaj


Re: downloading Word doc

2000-11-14 Thread Laurens Pit

Can someone get this to the developers? Thanks.

After some more research I do believe there's a bug in Tomcat somewhere. I
hosted my simple servlet in Allaire's JRun on Windows 2000, and it works
fine. Also when I host the servlet in Netscape's IPlanet it works fine. See
the code of the servlet below to test this.

Versions tested: Tomcat 3.1 final, Tomcat 3.2 beta 7
Platform client: Windows 2000.
Platform server: tested on Windows 2000, Linux RedHat v6.2 and Sun Solaris
8.

java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)



Greets,
Laurens

 Hi,

 Whenever I download a file using Tomcat (i.e. it uses
 org.apache.tomcat.servlets.DefaultServlet) it works, except when I try to
 download a Word document. Then the client side seems to get stuck. This is
 reproducable on different client machines using different servers (Linux
and
 Sun). Is anyone else experiencing this problem?

 I have also created a very simple Servlet to download a file. Works fine,
 except again for Word documents. Downloading Word documents from e.g.
 www.idrive.com work fine though, so it must be some servers-side thing.
Can
 anyone please help??


 package com.nervewireless;

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

 public final class FileDownload extends HttpServlet
 {
 public void doGet(HttpServletRequest req, HttpServletResponse res)
 throws IOException, ServletException
 {
 String path = "C:\\TEMP\\" + req.getPathInfo().substring(1);
 System.out.println("PATH: " + path);

 File f = new File(path);
 InputStream  in  = new BufferedInputStream(new
FileInputStream(f));

 res.setContentType("application/x-www-form-urlencoded");
 res.setContentLength((int) f.length());
 res.setHeader("Content-disposition","attachement; filename=" +
 f.getName());
 OutputStream out = res.getOutputStream();

 int  sentsize = 0;
 int  readlen;
 byte buffer[] = new byte[256];

 while ((readlen = in.read(buffer)) != -1 ) {
   out.write(buffer, 0, readlen);
   sentsize += readlen;
 }

 // Success ! Close streams.
 out.flush();
 out.close();
 in.close();

   System.out.println("DONE!");
  }
 }




 Greets,
 Laurens






Integrating servlet output into JSP

2000-11-14 Thread carnell

I am currently migrating two projects that we have, both in Servlets into
JSP.

Rather than rewriting everything into Model 2/with JSP architecture, is it
possible for me to write a JSP page that includes the output of the
Servlet(which make use of out.println a lot etc). I could simply remove the
outs in the Servlet which generate the html/body/end body/end html HTML
tags.?

Thanks,

Craig.




Sessions don't work without cookies since 3.2beta6

2000-11-14 Thread Stubenrauch,Andreas

Hi Folks any comments are welcome:

If Cookies are turned off in a browser the session-management by
url-rewriting does not work. This bug was introduced by 3.2 beta6 and is
still around in beta7 

Just turn cookies off and try any of the session-examples in the
tomcat-distribution

Regards,
Andreas



RE: [BUG] OutputStream is already being used for this request

2000-11-14 Thread Wyn Easton

Maybe you already knew this, but "out" is an implicit object in a JSP.
You probably need a response.setContentType() or the  page directive
that doe the same thing to set your output stream for binary data.

--- kramer [EMAIL PROTECTED] wrote:
 I am getting this while using request.getOutputStream() to write
 binary data
 is a JSP.
 I did some more hunting and it looks like this is not allowed, and
 should be
 done only in a servlet.
 I is a shame, because it was only three lines of code and to go
 through all
 the servlet sets just for just three
 lines of code.
 
 Jim K
 
 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, November 12, 2000 11:06 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [BUG] OutputStream is already being used for this
 request
 
 
 kramer wrote:
 
  I am still getting the error message "OutputStream is already being
 used
 for
  this request" even with 3.2 beta 7.
 
  Does any one know if this should be fix prior to finial 3.2?
 
 Under what circumstances are you getting this message?  There are
 valid
 cases of
 getting this that are required by the servlet 2.2 specification --
 but
 without
 knowing what your scenario is, nobody can tell if this is a feature
 or a bug
 :-).
 
 Craig McClanahan
 
 
 


=
Wyn Easton
[EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Please Look - 3.2 beta 7 problem - RequestDispatcher include()

2000-11-14 Thread Wyn Easton

Are you not suppose to mix URL access with a RequestDispatcher?
Thanks.

Also, in 3.2 beta 6 I could do an include() then a forward().
Now in 3.2 beta 7 I get an illegalState error on the forward()
because of an open outputstream.  I'm not opening an output stream.
The include() must be doing it. 


--- Wyn Easton [EMAIL PROTECTED] wrote:
 I'm having this problem on 3.2 beta 7
 
 The exact text of the  exception is:
 
 java.lang.IllegalArgumentException: Short Read
 
 This Exception is being generated in HttpUtils.java in the
 parsePostData() method.
 
 Here is what is happening:
 
 I'm opening a HttpURLConnection to servlet_A that has been set to use
 the POST method by calling setRequestMethod("POST") for the
 HttpURLConnection. In servlet_A I get a ServletInputStream and
 read from the HttpURLConnection.
 I then get an ServletOutputStream from the response.
 I then get a RequestDispatcher for servlet_B.
 When I call the include() method I get the exception mentioned
 because parsePostData() in HttpUtils tries to read "len" number
 of bytes from the ServletInputStream "in" and there is nothing
 to read. I changed parsePostData() in HttpUtils to return an
 empty Hashtable for this case and it worked fine. 
 (Maybe this is how this should work since nothing read means no
 parameters in the POST data. Even if the len is greater than 0.)
 
 However, if I try to use the ServletOutputStream after returning
 to servlet_A from servlet_B nothing is written to the original
 HttpURLConnection.  I don't know if the ServletOutputStream is
 being closed when I return from the include(). I don't get an
 Exception when writing to the ServletOutputStream. I just don't
 get any data at the listening end of the HttpURLConnection.
 
 I'm going to modify my code to use the include() instead of
 the HttpURLConnection, but shouldn't it work either way?
 
 Thanks.
 
 
 =
 Wyn Easton
 [EMAIL PROTECTED]
 
 __
 Do You Yahoo!?
 Yahoo! Calendar - Get organized for the holidays!
 http://calendar.yahoo.com/


=
Wyn Easton
[EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Re: Integrating servlet output into JSP

2000-11-14 Thread Wyn Easton

This may be over simplifying your problem, but have you looked
at the RequestDispather include() method?
It allows you to use the output of another servlet/JSP in the current
servlet/JSP.
 
--- carnell [EMAIL PROTECTED] wrote:
 I am currently migrating two projects that we have, both in Servlets
 into
 JSP.
 
 Rather than rewriting everything into Model 2/with JSP architecture,
 is it
 possible for me to write a JSP page that includes the output of the
 Servlet(which make use of out.println a lot etc). I could simply
 remove the
 outs in the Servlet which generate the html/body/end body/end html
 HTML
 tags.?
 
 Thanks,
 
 Craig.
 


=
Wyn Easton
[EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Re: Tomcat Logging

2000-11-14 Thread Drasko Kokic

Hi there,

I wonder if there is any more information available on
this subject.
I am looking into configuring the Tomcat 3.1 logger so
that the log file DOES NOT get overwritten on restart
and also to get some timestamps genereted
automatically.
What else is available in Tomcat 3.1 ???

TIA
Drasko


--- Steven Rice [EMAIL PROTECTED] wrote:
 I need more details on the Tomcat logging,  could
 someone please direct
 me to a detail doc about the way tomcat handle
 logging.   I couldn't
 find anything in detail and I don't know java that
 well.
 
 Thanks,
 
 Steven Rice
 
 


__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



mod_jk help

2000-11-14 Thread Alistair Hopkins
Title: 



I'm having some trouble getting apache to find 
a worker.I have the connector in server.xml, and can see that port 8009 
is open using netstat:tcp 
0 0 
*:8009 
*:* 
LISTENI have workers.properties 
configured:worker.list=localworker.local.port=8009worker.local.host=localhostworker.local.type=ajp13worker.local.lbfactor=1I have loaded mod_jk in 
httpd.conf:LoadModule 
jk_module /etc/httpd/modules/mod_jk.so 
...AddModule mod_jk.c 
...JkWorkersFile/home/appserver/tomcat3.2b6/conf/workers.propertiesJkLogFile 
/home/appserver/tomcat3.2b6/logs/mod_jk.logJkLogLevel 
debugI have done a mapping in 
my virtual hosts:JkMount /servlet/* local 
But when I try to access servlets I get a 500 error, 
and in the mod_jk.log I get:
[jk_worker.c (123)]: Into wc_get_worker_for_name 
local[jk_worker.c (127)]: wc_get_worker_for_name, done did not found a 
worker[jk_uri_worker_map.c (344)]: Into 
jk_uri_worker_map_t::map_uri_to_worker[jk_uri_worker_map.c (434)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match
What should I try next? I am restarting apache 
after tomcat to ensure the port is clear, but I can see via netstat that it is 
there and listening.
Help appreciated...
Alistair


RE: Please Look - 3.2 beta 7 problem - RequestDispatcher include()

2000-11-14 Thread Kitching Simon



 -Original Message-
 From: Wyn Easton [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, November 14, 2000 12:24 PM
 To:   [EMAIL PROTECTED]
 Subject:  Please Look -  3.2 beta 7 problem -  RequestDispatcher
 include()
 
 Are you not suppose to mix URL access with a RequestDispatcher?
 Thanks.
 
 Also, in 3.2 beta 6 I could do an include() then a forward().
 Now in 3.2 beta 7 I get an illegalState error on the forward()
 because of an open outputstream.  I'm not opening an output stream.
 The include() must be doing it. 
 
[Kitching Simon] 
I don't think that it is valid to do include then forward, ie
if it was possible before, then *that* was the bug, not
the current behaviour.

To quote from the servlet docs:

forward should be called before the response has been committed
to the client (before response body output has been flushed).
If the response already has been committed, this method throws
an IllegalStateException.

Now I can't find the reference for the moment, but I'm sure that in
the 
specs somewhere it says that the buffer is *always* flushed before
an include operation.

Therefore it is not possible, *by definition* to do an include then
a forward.
  
 --- Wyn Easton [EMAIL PROTECTED] wrote:
  I'm having this problem on 3.2 beta 7
  
  The exact text of the  exception is:
  
  java.lang.IllegalArgumentException: Short Read
  
  This Exception is being generated in HttpUtils.java in the
  parsePostData() method.
  
  Here is what is happening:
  
  I'm opening a HttpURLConnection to servlet_A that has been set to use
  the POST method by calling setRequestMethod("POST") for the
  HttpURLConnection. In servlet_A I get a ServletInputStream and
  read from the HttpURLConnection.
  I then get an ServletOutputStream from the response.
  I then get a RequestDispatcher for servlet_B.
  When I call the include() method I get the exception mentioned
  because parsePostData() in HttpUtils tries to read "len" number
  of bytes from the ServletInputStream "in" and there is nothing
  to read. I changed parsePostData() in HttpUtils to return an
  empty Hashtable for this case and it worked fine. 
  (Maybe this is how this should work since nothing read means no
  parameters in the POST data. Even if the len is greater than 0.)
  
  However, if I try to use the ServletOutputStream after returning
  to servlet_A from servlet_B nothing is written to the original
  HttpURLConnection.  I don't know if the ServletOutputStream is
  being closed when I return from the include(). I don't get an
  Exception when writing to the ServletOutputStream. I just don't
  get any data at the listening end of the HttpURLConnection.
  
  I'm going to modify my code to use the include() instead of
  the HttpURLConnection, but shouldn't it work either way?
  
  Thanks.
  
  
  =
  Wyn Easton
  [EMAIL PROTECTED]
  
  __
  Do You Yahoo!?
  Yahoo! Calendar - Get organized for the holidays!
  http://calendar.yahoo.com/
 
 
 =
 Wyn Easton
 [EMAIL PROTECTED]
 
 __
 Do You Yahoo!?
 Yahoo! Calendar - Get organized for the holidays!
 http://calendar.yahoo.com/



Re: Integrating servlet output into JSP

2000-11-14 Thread carnell

If in my JSP page, say bookholiday.jsp, I would like to include output from
bookholidayshow servlet...

bookholiday.jsp:
html
include body/various menus and stuff
%
RequestDispatcher.include(request, resource);
%
/body
/html

bookholidayshow.java(class/servlet)
doGet(...)
{
out.println... etc..
}

But how do I use RequestDispatcher in the JSP? Can't make much sense of the
docs.

- Original Message -
From: "Wyn Easton" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 14, 2000 12:38 PM
Subject: Re: Integrating servlet output into JSP


 This may be over simplifying your problem, but have you looked
 at the RequestDispather include() method?
 It allows you to use the output of another servlet/JSP in the current
 servlet/JSP.

 --- carnell [EMAIL PROTECTED] wrote:
  I am currently migrating two projects that we have, both in Servlets
  into
  JSP.
 
  Rather than rewriting everything into Model 2/with JSP architecture,
  is it
  possible for me to write a JSP page that includes the output of the
  Servlet(which make use of out.println a lot etc). I could simply
  remove the
  outs in the Servlet which generate the html/body/end body/end html
  HTML
  tags.?
 
  Thanks,
 
  Craig.
 


 =
 Wyn Easton
 [EMAIL PROTECTED]

 __
 Do You Yahoo!?
 Yahoo! Calendar - Get organized for the holidays!
 http://calendar.yahoo.com/





Running batch files when using as a NT service

2000-11-14 Thread David Oxley

Are there any issues with running batch files that call external programs
when Tomcat is set up as an NT service. 
I have a problem that when using the startup.bat my COBOL routine gets
kicked off fine, but when Tomcat is a service the COBOL returns an error
code and never executes. I have a feeling its to do with environment
variables and I am still investigating, but I thought I would just ask if
there were any issues with doing this.

Thanks.
Dave
[EMAIL PROTECTED]



Tomcat 3.2b7

2000-11-14 Thread Horst Fiedler

Hello,

Binary download crashes when attempting to access 
admin's "view all contexts" jsp.

Failure is Nullpointerexception in ContextAdmin where getAttribute()
returns null: 
public void init(HttpServletRequest request) {
FacadeManager facadeM=(FacadeManager)request.getAttribute(
FacadeManager.FACADE_ATTRIBUTE);
realRequest = facadeM.getRealRequest(request);

As no admin role was in, only change applied to downloaded version was
in tomcat-users.xml where a admin user was added:

!-- tomcat admin --
  user name="webadmin" password="tomcat" roles="admin" /

For final 3.2 it would be nice if sufficient basic authentication is
already 
included in binary download.

Environment: Linux SuSe 6.4, .tomcatrc for use by tomcat.sh was:

export JAVA_HOME=/usr/java/jdk1.3
export JAVACMD="$JAVA_HOME/bin/java -Xmx64m"

Request created was:
http://localhost:8080/admin/contextAdmin/contextAdmin.jsp?submit=View+All+ContextsaddContextPath=addContextDocBase=removeContextName=

Maybe I missed something as I did'nt deal with workers, in-process
features, ... 

Last version seen ContextAdmin respond properly: Tomcat 3.1, but quite
sure, many things have changed since.




-- 
T echnische  I nformatik  F iedler  F ürsten F eld
Kirchenplatz 5 A-8280 Fürstenfeld  http://www.tifff.com/tifff/
Tel / Fax / GSM:   (+43) 3382 51263 / 3382 51264 / 676 3074101
Error: 500
Location: /admin/contextAdmin/contextAdmin.jspInternal Servlet Error:javax.servlet.ServletException
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:453)
	at contextAdmin._0002fcontextAdmin_0002fcontextAdmin_0002ejspcontextAdmin_jsp_0._jspService(_0002fcontextAdmin_0002fcontextAdmin_0002ejspcontextAdmin_jsp_0.java:192)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
	at org.apache.tomcat.core.Handler.service(Handler.java:286)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:799)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:745)
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
	at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407)
	at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
	at java.lang.Thread.run(Thread.java:484)

Root cause:
java.lang.NullPointerException
	at ContextAdmin.init(ContextAdmin.java:46)
	at contextAdmin._0002fcontextAdmin_0002fcontextAdmin_0002ejspcontextAdmin_jsp_0._jspService(_0002fcontextAdmin_0002fcontextAdmin_0002ejspcontextAdmin_jsp_0.java:112)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
	at org.apache.tomcat.core.Handler.service(Handler.java:286)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:799)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:745)
	at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
	at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407)
	at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
	at java.lang.Thread.run(Thread.java:484)





RE: Please Look - 3.2 beta 7 problem - RequestDispatcher inclu de()

2000-11-14 Thread Wyn Easton

Fair enough.
I did notice the addition of:

  // NOTE:  This *must* be done before the include flag is set for
// this request!
response.flushBuffer();

in RequestDispatcherImpl.java.  That is probably the change that made
my include - forward stop working.
 
I guess it is OK by the spec. to do multiple include() method calls?

Thanks.

--- Kitching Simon [EMAIL PROTECTED] wrote:
 
 
  -Original Message-
  From:   Wyn Easton [SMTP:[EMAIL PROTECTED]]
  Sent:   Tuesday, November 14, 2000 12:24 PM
  To: [EMAIL PROTECTED]
  Subject:Please Look -  3.2 beta 7 problem -  RequestDispatcher
  include()
  
  Are you not suppose to mix URL access with a RequestDispatcher?
  Thanks.
  
  Also, in 3.2 beta 6 I could do an include() then a forward().
  Now in 3.2 beta 7 I get an illegalState error on the forward()
  because of an open outputstream.  I'm not opening an output stream.
  The include() must be doing it. 
  
   [Kitching Simon] 
   I don't think that it is valid to do include then forward, ie
   if it was possible before, then *that* was the bug, not
   the current behaviour.
 
   To quote from the servlet docs:
 
   forward should be called before the response has been committed
   to the client (before response body output has been flushed).
   If the response already has been committed, this method throws
   an IllegalStateException.
 
   Now I can't find the reference for the moment, but I'm sure that in
 the 
   specs somewhere it says that the buffer is *always* flushed before
   an include operation.
 
   Therefore it is not possible, *by definition* to do an include then
   a forward.
   
  --- Wyn Easton [EMAIL PROTECTED] wrote:
   I'm having this problem on 3.2 beta 7
   
   The exact text of the  exception is:
   
   java.lang.IllegalArgumentException: Short Read
   
   This Exception is being generated in HttpUtils.java in the
   parsePostData() method.
   
   Here is what is happening:
   
   I'm opening a HttpURLConnection to servlet_A that has been set to
 use
   the POST method by calling setRequestMethod("POST") for the
   HttpURLConnection. In servlet_A I get a ServletInputStream and
   read from the HttpURLConnection.
   I then get an ServletOutputStream from the response.
   I then get a RequestDispatcher for servlet_B.
   When I call the include() method I get the exception mentioned
   because parsePostData() in HttpUtils tries to read "len" number
   of bytes from the ServletInputStream "in" and there is nothing
   to read. I changed parsePostData() in HttpUtils to return an
   empty Hashtable for this case and it worked fine. 
   (Maybe this is how this should work since nothing read means no
   parameters in the POST data. Even if the len is greater than 0.)
   
   However, if I try to use the ServletOutputStream after returning
   to servlet_A from servlet_B nothing is written to the original
   HttpURLConnection.  I don't know if the ServletOutputStream is
   being closed when I return from the include(). I don't get an
   Exception when writing to the ServletOutputStream. I just don't
   get any data at the listening end of the HttpURLConnection.
   
   I'm going to modify my code to use the include() instead of
   the HttpURLConnection, but shouldn't it work either way?
   
   Thanks.
   
   
   =
   Wyn Easton
   [EMAIL PROTECTED]


=
Wyn Easton
[EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Problem with directory listing when running tomcat as NT service

2000-11-14 Thread Ole E. Nielsen








Hi tonmcat users,



Im not able to get a directory listing when running tomcat as NT
service, when the docBase is outside of the tomcat directory.



This does not work properly when I run tomcat as a NT service. 

Context path=/food
docBase=c:/food/build/food debug=9

reloadable=true 

/Context



But if I put it under the webapp root or use relative path ../../food/build/food
the servlets works fine. 



The directory listing and access to html documents through tomcat doesnt
work. I have found, that theres a difference if you start tomcat as a NT
service or just in a command prompt. The directory listing works fine if you
just use a command prompt.



Can anyone help?



Im running tomcat3.1 under windows 2000 server. 



Many regards from



Ole Engele Nielsen

Consultant at InterResearch



InterResearch ApS - Trekronergade 126 F - 2500 Valby

Phone: +45 36 14 80 34 - Mobile: +45 20 10 21 74 - Fax: +45 36 14 80 20

E-mail: [EMAIL PROTECTED] - Homepage: www.interresearch.dk 










Re: Integrating servlet output into JSP

2000-11-14 Thread carnell

Thanks, I've tried the code,  the JSP produces my layout/menus and stuff,
but theres no output from the servlet.

getRequestDispatcher appears to work correctly as rd is not null, but
nothing seems to be included. I have tried
both the bookholidayshow, and /servlet/bookholidayshow. The servlet works
fine when entered
into the browser.(although missing html/end html tags etc, IE doesn't care
:)

- Original Message -
From: "Wyn Easton" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 14, 2000 2:55 PM
Subject: Re: Integrating servlet output into JSP


 See code added below.

 --- carnell [EMAIL PROTECTED] wrote:
  If in my JSP page, say bookholiday.jsp, I would like to include
  output from
  bookholidayshow servlet...
 
  bookholiday.jsp:
  html
  include body/various menus and stuff
  %
  RequestDispather rd = request.getRequestDispatcher("bookholidayshow");
  if (rd != null)
  rd.include(request, resource);
  %
  /body
  /html
 
  bookholidayshow.java(class/servlet)
  doGet(...)
  {
  out.println... etc..
  }
 
  But how do I use RequestDispatcher in the JSP? Can't make much sense
  of the
  docs.
 
  - Original Message -
  From: "Wyn Easton" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, November 14, 2000 12:38 PM
  Subject: Re: Integrating servlet output into JSP
 
 
   This may be over simplifying your problem, but have you looked
   at the RequestDispather include() method?
   It allows you to use the output of another servlet/JSP in the
  current
   servlet/JSP.
  
   --- carnell [EMAIL PROTECTED] wrote:
I am currently migrating two projects that we have, both in
  Servlets
into
JSP.
   
Rather than rewriting everything into Model 2/with JSP
  architecture,
is it
possible for me to write a JSP page that includes the output of
  the
Servlet(which make use of out.println a lot etc). I could simply
remove the
outs in the Servlet which generate the html/body/end body/end
  html
HTML
tags.?
   
Thanks,
   
Craig.
   
  
  
   =
   Wyn Easton
   [EMAIL PROTECTED]
  
   __
   Do You Yahoo!?
   Yahoo! Calendar - Get organized for the holidays!
   http://calendar.yahoo.com/
  
 


 =
 Wyn Easton
 [EMAIL PROTECTED]

 __
 Do You Yahoo!?
 Yahoo! Calendar - Get organized for the holidays!
 http://calendar.yahoo.com/




RE: New user question...

2000-11-14 Thread Reynshteyn, Leonid

The directive is a custom tag that Tomcat does not recognize, I think.

tag_test.jsp is a JSP file I mentioned below. It's not in C:, but in
C:/jakarta-tomcat/webapps/Root

I assume that I am not configuring it right and it can't recognize the
custom tags and gives me this error.

Here are the contents of the JSP file:
-
%@ raglib uri="/test.tld" prefix="leo" %
html
head
titleExample JSP with TAG Libs/title
/head

pb Let's see if this works. /b

leo:mytag/leo:mytag


pb End /b
-

Thanks a lot in adavance.

-Lenny


-Original Message-
From: Pierre Delisle [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 7:25 PM
To: [EMAIL PROTECTED]
Subject: Re: New user question...


The error is in the first line of your JSP file 'tag_test.jsp'.

   org.apache.jasper.compiler.ParseException: C:\tag_test.jsp(0,4)
Invalid directive at...

The error message says it is a directive, but without the details, it is
hard to tell exactly what is wrong.

If you tell us what's there, we can help you one step further.

-- Pierre

"Reynshteyn, Leonid" wrote:
 
 I just installed Tomcat for the first time and am trying to run a simple
JSP
 that uses a very simple custom tag. When I run the JSP, I am getting the
 following Jasper compiler exception:
 
 org.apache.jasper.compiler.ParseException: C:\tag_test.jsp(0,4) Invalid
 directive at
 org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:186) at
 org.apache.jasper.compiler.Parser.parse(Parser.java:1073)
 
 Here's what I did:
 
 1) I put the JSP file in "install_dir/webapps/Root" (simple JSPs that
don't
 use custom tags work fine from here)
 2) I put the JSP Tag handler class in
 "install_dir/webapps/Root/Web-inf/classes"
 3) I put the TLD file in "install_dir/webapps/Root"
 
 Any ideas?
 
 Thanks.
 
 -Lenny



Security Constraints

2000-11-14 Thread Brian Charlton

Hi

I'm new to Apache/Tomcat so expect a obvious question.

I'm currently designing a multi-tier internet application based upon J2EE
blueprints.  To implement security in J2EE Web Tier the normal approach is
to denote Web Resources (JSPs, Servlets etc) as protected (e.g. form-based
authentication) in the deployment descriptor file for the Web components.

For a web client to access the resources they are forced ( by the J2EE
container) to login to the system by completing a login form.

This is the J2EE approach (I've read).  

I've been advised that Web/Application servers that support J2EE (i.e.
Enterprise Java Beans) are not brilliant at the moment and I should consider
using Apache/Tomcat as a web server and Oracle 8i as my back end database
and J2EE platform to run business logic in EJBs.

If I can't use J2EE Security constraints in the deployment descriptor file
of the web tier, how does Apache/Tomcat authenticate users?

Yours hopefully

Brian


 Brian Charlton.vcf 

 Brian Charlton.vcf


JSP pages stuck in cache? wont recompile...

2000-11-14 Thread Marty McKeever

Friends,
All of a sudden it seems, whenever i make changes to a JSP and commit them 
to CVS, they aren't being recompiled on the next request (the old version 
is still being served).  To get the new page, i have to manually delete the 
cache and then restart tomcat.
There are other developers working on this server, so i dont know what they 
might've changed to cause this. any ideas?
TIA
Marty



## Marty McKeever[Information Architect]
## [EMAIL PROTECTED] [I-Silver, Inc]




RE: Using Jasper for template processing?

2000-11-14 Thread Jaroslav Gergic


--- CPC Livelink Admin [EMAIL PROTECTED] wrote:
 the servlets except in a web environment. But, being able to do what
 JG
 wants can be useful - for instance, to periodically dump a formatted
 report
 to a static file, so that daily reports are available and can be
 processed
 during system off peak hours.

Yes that is good example. Simply speaking:
1) I need TEMPLATE PROCESSOR in Java
2) My templates are NOT web related
3) The only thing I need to use from Jasper is "JSP to JAVA" compiler,
   modified to generate HTTP uninfected Java code.

Regards
Gergi

=
Jaroslav Gergic (Gergi)
mailto:[EMAIL PROTECTED]
http://nenya.ms.mff.cuni.cz/~gergic/

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Re: Integrating servlet output into JSP

2000-11-14 Thread Wyn Easton

Hmm...
I know that if I'm in the doPost() of a servlet and I include() another
servlet the included servlet's doPost() method will be called.
I'm not sure which method in the servlet is called when you do the 
include from a JSP to a servlet.
Maybe you could put a System.out.println() in the doGet() and
doPost() of the included servlet to see which method is being called.
(Or maybe someone else already knows...)

--- carnell [EMAIL PROTECTED] wrote:
 Thanks, I've tried the code,  the JSP produces my layout/menus and
 stuff,
 but theres no output from the servlet.
 
 getRequestDispatcher appears to work correctly as rd is not null, but
 nothing seems to be included. I have tried
 both the bookholidayshow, and /servlet/bookholidayshow. The servlet
 works
 fine when entered
 into the browser.(although missing html/end html tags etc, IE doesn't
 care
 :)
 
 - Original Message -
 From: "Wyn Easton" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, November 14, 2000 2:55 PM
 Subject: Re: Integrating servlet output into JSP
 
 
  See code added below.
 
  --- carnell [EMAIL PROTECTED] wrote:
   If in my JSP page, say bookholiday.jsp, I would like to include
   output from
   bookholidayshow servlet...
  
   bookholiday.jsp:
   html
   include body/various menus and stuff
   %
   RequestDispather rd =
 request.getRequestDispatcher("bookholidayshow");
   if (rd != null)
   rd.include(request, resource);
   %
   /body
   /html
  
   bookholidayshow.java(class/servlet)
   doGet(...)
   {
   out.println... etc..
   }
  
   But how do I use RequestDispatcher in the JSP? Can't make much
 sense
   of the
   docs.
  
   - Original Message -
   From: "Wyn Easton" [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Tuesday, November 14, 2000 12:38 PM
   Subject: Re: Integrating servlet output into JSP
  
  
This may be over simplifying your problem, but have you looked
at the RequestDispather include() method?
It allows you to use the output of another servlet/JSP in the
   current
servlet/JSP.
   
--- carnell [EMAIL PROTECTED] wrote:
 I am currently migrating two projects that we have, both in
   Servlets
 into
 JSP.

 Rather than rewriting everything into Model 2/with JSP
   architecture,
 is it
 possible for me to write a JSP page that includes the output
 of
   the
 Servlet(which make use of out.println a lot etc). I could
 simply
 remove the
 outs in the Servlet which generate the html/body/end body/end
   html
 HTML
 tags.?

 Thanks,

 Craig.

   
   
=
Wyn Easton
[EMAIL PROTECTED]
   
__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/
   
  
 
 
  =
  Wyn Easton
  [EMAIL PROTECTED]
 
  __
  Do You Yahoo!?
  Yahoo! Calendar - Get organized for the holidays!
  http://calendar.yahoo.com/
 


=
Wyn Easton
[EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



long file names when compiling *.jsp files

2000-11-14 Thread Ari Volcoff

We receive this message when trying to run a jsp file

Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile class for JSPerror:
Can't write:
D:\jdk1.3\jakarta-tomcat\work\localhost_8080%2FRio\_0005f_0005f\Online\Templ
ates\Classes\Forums_0005fObject_0005fClass\Ari\_0002f_0002e_0002e_0002fOnlin
e_0002fTemplates_0002fClasses_0002fForums_0005fObject_0005fClass_0002fAri_00
02ftest_00031_0002ejsptest1_jsp_0.class
1 error

this is because there is a limit of 260 characters for a file name on the NT
Platform !

is there a way to overcome this problem ?


Regards

Ari Volcoff
-
 http://www.portalprise.com

   Tel: 972-3-6164116
   Extension: 210

   Fax: 972-3-6164136

HomePage: http://come.to/ari1
-




will pay money for tomcat install

2000-11-14 Thread Adam Kling

If you can install tomcat with virtual hosts on a RH linux 6.1 box, then I
will pay you money. I have no more hair to pull out..

please msg on icq: 48465297
or

email: [EMAIL PROTECTED]

THanks

-
Adam Kling
CEO, MyBizHosting
http://www.MyBizHosting.com

P.S. Check out http://www.MyBizHosting.com now for instant
access to our hosting plans. We'll even have you automatically
configured as a reseller.  And, of course,  I'll personally make
sure you get a discount if you purchase additional accounts! :-)
-




RE: Please Look - 3.2 beta 7 problem - RequestDispatcher inclu de()

2000-11-14 Thread Kitching Simon



 -Original Message-
 From: Wyn Easton [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, November 14, 2000 2:47 PM
 To:   [EMAIL PROTECTED]
 Subject:  RE: Please Look -  3.2 beta 7 problem -  RequestDispatcher
 inclu de()
 
 Fair enough.
 I did notice the addition of:
 
   // NOTE:  This *must* be done before the include flag is set for
   // this request!
   response.flushBuffer();
 
 in RequestDispatcherImpl.java.  That is probably the change that made
 my include - forward stop working.
  
 I guess it is OK by the spec. to do multiple include() method calls?
[Kitching Simon]  
Yes, no problem with this as far as I know. 

Cheers,

Simon

 Thanks.
 
 --- Kitching Simon [EMAIL PROTECTED] wrote:
  
  
   -Original Message-
   From: Wyn Easton [SMTP:[EMAIL PROTECTED]]
   Sent: Tuesday, November 14, 2000 12:24 PM
   To:   [EMAIL PROTECTED]
   Subject:  Please Look -  3.2 beta 7 problem -  RequestDispatcher
   include()
   
   Are you not suppose to mix URL access with a RequestDispatcher?
   Thanks.
   
   Also, in 3.2 beta 6 I could do an include() then a forward().
   Now in 3.2 beta 7 I get an illegalState error on the forward()
   because of an open outputstream.  I'm not opening an output stream.
   The include() must be doing it. 
   
  [Kitching Simon] 
  I don't think that it is valid to do include then forward, ie
  if it was possible before, then *that* was the bug, not
  the current behaviour.
  
  To quote from the servlet docs:
  
  forward should be called before the response has been committed
  to the client (before response body output has been flushed).
  If the response already has been committed, this method throws
  an IllegalStateException.
  
  Now I can't find the reference for the moment, but I'm sure that in
  the 
  specs somewhere it says that the buffer is *always* flushed before
  an include operation.
  
  Therefore it is not possible, *by definition* to do an include then
  a forward.

   --- Wyn Easton [EMAIL PROTECTED] wrote:
I'm having this problem on 3.2 beta 7

The exact text of the  exception is:

java.lang.IllegalArgumentException: Short Read

This Exception is being generated in HttpUtils.java in the
parsePostData() method.

Here is what is happening:

I'm opening a HttpURLConnection to servlet_A that has been set to
  use
the POST method by calling setRequestMethod("POST") for the
HttpURLConnection. In servlet_A I get a ServletInputStream and
read from the HttpURLConnection.
I then get an ServletOutputStream from the response.
I then get a RequestDispatcher for servlet_B.
When I call the include() method I get the exception mentioned
because parsePostData() in HttpUtils tries to read "len" number
of bytes from the ServletInputStream "in" and there is nothing
to read. I changed parsePostData() in HttpUtils to return an
empty Hashtable for this case and it worked fine. 
(Maybe this is how this should work since nothing read means no
parameters in the POST data. Even if the len is greater than 0.)

However, if I try to use the ServletOutputStream after returning
to servlet_A from servlet_B nothing is written to the original
HttpURLConnection.  I don't know if the ServletOutputStream is
being closed when I return from the include(). I don't get an
Exception when writing to the ServletOutputStream. I just don't
get any data at the listening end of the HttpURLConnection.

I'm going to modify my code to use the include() instead of
the HttpURLConnection, but shouldn't it work either way?

Thanks.


=
Wyn Easton
[EMAIL PROTECTED]
 
 
 =
 Wyn Easton
 [EMAIL PROTECTED]
 
 __
 Do You Yahoo!?
 Yahoo! Calendar - Get organized for the holidays!
 http://calendar.yahoo.com/



Re: will pay money for tomcat install

2000-11-14 Thread Rachel Greenham

On Tuesday 14 November 2000 16:51, you wrote:
 If you can install tomcat with virtual hosts on a RH linux 6.1 box, then I
 will pay you money. I have no more hair to pull out..

If you haven't already, use Tomcat 3.2 - it has support for virtual hosting 
which Tomcat 3.1 did not. Not properly at any rate. In Tomcat 3.2, look in 
the conf/server.xml file at the bottom for hints and a template.

-- 
Rachel



RE: Using Jasper for template processing?

2000-11-14 Thread CPC Livelink Admin


How about using stock Jasper, and then applying an XSL transformation to the
HTML output to clean out the HTML specific code.  Seems like extra work, but
would you would not need to modify the Jasper code itself.

Regards,
Paul

-Original Message-
From: Jaroslav Gergic [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 10:41 AM
To: [EMAIL PROTECTED]
Subject: RE: Using Jasper for template processing?



--- CPC Livelink Admin [EMAIL PROTECTED] wrote:
 the servlets except in a web environment. But, being able to do what
 JG
 wants can be useful - for instance, to periodically dump a formatted
 report
 to a static file, so that daily reports are available and can be
 processed
 during system off peak hours.

Yes that is good example. Simply speaking:
1) I need TEMPLATE PROCESSOR in Java
2) My templates are NOT web related
3) The only thing I need to use from Jasper is "JSP to JAVA" compiler,
   modified to generate HTTP uninfected Java code.

Regards
Gergi

=
Jaroslav Gergic (Gergi)
mailto:[EMAIL PROTECTED]
http://nenya.ms.mff.cuni.cz/~gergic/

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/




Re: New user question...

2000-11-14 Thread Pierre Delisle

There is a typo in your first line. 

%@ raglib uri="/test.tld" prefix="leo" %
^
taglib

   -- Pierre

"Reynshteyn, Leonid" wrote:
 
 The directive is a custom tag that Tomcat does not recognize, I think.
 
 tag_test.jsp is a JSP file I mentioned below. It's not in C:, but in
 C:/jakarta-tomcat/webapps/Root
 
 I assume that I am not configuring it right and it can't recognize the
 custom tags and gives me this error.
 
 Here are the contents of the JSP file:
 -
 %@ raglib uri="/test.tld" prefix="leo" %
 html
 head
 titleExample JSP with TAG Libs/title
 /head
 
 pb Let's see if this works. /b
 
 leo:mytag/leo:mytag
 
 pb End /b
 -
 
 Thanks a lot in adavance.
 
 -Lenny
 
 -Original Message-
 From: Pierre Delisle [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 13, 2000 7:25 PM
 To: [EMAIL PROTECTED]
 Subject: Re: New user question...
 
 The error is in the first line of your JSP file 'tag_test.jsp'.
 
org.apache.jasper.compiler.ParseException: C:\tag_test.jsp(0,4)
 Invalid directive at...
 
 The error message says it is a directive, but without the details, it is
 hard to tell exactly what is wrong.
 
 If you tell us what's there, we can help you one step further.
 
 -- Pierre
 
 "Reynshteyn, Leonid" wrote:
 
  I just installed Tomcat for the first time and am trying to run a simple
 JSP
  that uses a very simple custom tag. When I run the JSP, I am getting the
  following Jasper compiler exception:
 
  org.apache.jasper.compiler.ParseException: C:\tag_test.jsp(0,4) Invalid
  directive at
  org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:186) at
  org.apache.jasper.compiler.Parser.parse(Parser.java:1073)
 
  Here's what I did:
  
  1) I put the JSP file in "install_dir/webapps/Root" (simple JSPs that
 don't
  use custom tags work fine from here)
  2) I put the JSP Tag handler class in
  "install_dir/webapps/Root/Web-inf/classes"
  3) I put the TLD file in "install_dir/webapps/Root"
 
  Any ideas?
 
  Thanks.
 
  -Lenny



Installation with PWS on NT 4.0 with sp4,5

2000-11-14 Thread chris lynch

I had to put the isapi_redirect.dll in the
c:\winnt\system32\inetsrv\ directory for it to be
recognized.  Also it might be worth mentioning thay
you do not want your TOMCAT_HOME to have the ending
slash ie d:\tomcat not d:\tomcat\.  For java_home the
ending slash seems to be fine.
  Santeel

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Re: New user question...

2000-11-14 Thread Kurt Bernhard Pruenner

"Reynshteyn, Leonid" wrote:
 Here are the contents of the JSP file:
 -
 %@ raglib uri="/test.tld" prefix="leo" %
  ^
Not that I've used this before, but isn't that supposed to spell "taglib"?

-- 
Kurt Pruenner - Haendelstrasse 17, 4020 Linz, Austria | Briareos at Olymp BBS:
http://www.mp3.com/Leak http://www.ssw.uni-linz.ac.at | ssh [EMAIL PROTECTED]
...It might be written "Mindfuck", but it's spelt "L-A-I-N"...
np: Universal Selector - Marisol (ambient.01@hyperreal comp.)



RE: Installation with PWS on NT 4.0 with sp4,5

2000-11-14 Thread Mark Franz

You can put the .dll in any directory you want, as long as the registry
reflects the path correctly and the virtual directory is set correctly also.

If you use a trailing \ in either the TOMCAT_HOME or the JAVA_HOME it will
be recognized in the variable as a \\, look at the environment slash in the
workers.properties file, ps=\ or # ps=/, it sets the trailing slash on all
vars in the conf dir.

Mark G. Franz


-Original Message-
From: chris lynch [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 9:34 AM
To: [EMAIL PROTECTED]
Subject: Installation with PWS on NT 4.0 with sp4,5


I had to put the isapi_redirect.dll in the
c:\winnt\system32\inetsrv\ directory for it to be
recognized.  Also it might be worth mentioning thay
you do not want your TOMCAT_HOME to have the ending
slash ie d:\tomcat not d:\tomcat\.  For java_home the
ending slash seems to be fine.
  Santeel

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Re: long file names when compiling *.jsp files

2000-11-14 Thread Pierre Delisle

By searching the archive at
  http://archives.real-time.com/rte-tomcat/

[see "READ THIS First! Mailing-list archive and good tips" posted periodically
on this list]

you will find:
http://archives2.real-time.com/pipermail/tomcat-users/2000-August/008481.html

that gives the details about long JSP filenames and what can 
be done to make them smaller.

-- Pierre

Ari Volcoff wrote:
 
 We receive this message when trying to run a jsp file
 
 Internal Servlet Error:
 
 org.apache.jasper.JasperException: Unable to compile class for JSPerror:
 Can't write:
 D:\jdk1.3\jakarta-tomcat\work\localhost_8080%2FRio\_0005f_0005f\Online\Templ
 ates\Classes\Forums_0005fObject_0005fClass\Ari\_0002f_0002e_0002e_0002fOnlin
 e_0002fTemplates_0002fClasses_0002fForums_0005fObject_0005fClass_0002fAri_00
 02ftest_00031_0002ejsptest1_jsp_0.class
 1 error
 
 this is because there is a limit of 260 characters for a file name on the NT
 Platform !
 
 is there a way to overcome this problem ?
 
 Regards
 
 Ari Volcoff
 -
  http://www.portalprise.com
 
Tel: 972-3-6164116
Extension: 210
 
Fax: 972-3-6164136
 
 HomePage: http://come.to/ari1
 -



File-Name-Spaces

2000-11-14 Thread Craig May

Hi,

I can't seem to get a file of the server if it's name contains spaces.  Is
there a work-around for this?

Regards,
Craig May

Enth Dimension
http://www.enthdimension.com.au



[REPOST] Windows SMB paths in server.xml please?

2000-11-14 Thread Rogério Meneguelli Gatto

Hello,

I've noticed a difference in behaviour in Tomcat 3.1, 3.2b7, and 4.0m4
regarding Windows SMB paths, like this one:

Context path="/ctx" docBase="\\machine\share\path"/

I included this same element (paths are altered here for security) on all three
server.xml.  Tomcat 3.1 and 4.0m4 handle it fine, 3.2b7 gives a 404.  All three
instances are running on the same machine, under the same conditions:

- WinNT 4.0sp4
- JavaService 1.1.0 service wrapper
- Sun JDK 1.3.0

I'd love to be able to use this kind of setup, as it allows me to make those
services start automatically, when nobody is logged on.  Is it possible at all
to implement it for 3.2?  A simple test case shows me that, even in my 3.2
setup, I can use java.io.File to access that smb share, so it doesn't look like
a system problem, but rather the way tomcat 3.2 uses the docBase attribute.

Regards,
Rogério Gatto




tomcat 3.2b5 - worker not found?

2000-11-14 Thread Day, Evan

Platform: Redhat 7.0, OpenSSL 0.9.6, Apache 1.3.14 w/ mm 1.1.3 and mod_ssl
2.7.1, tomcat 3.2b5
Vanilla configurations from fresh builds.

Apache works fine on its own in both HTTP and HTTPS.  Tomcat works find
standalone.

When I turn on mod_jk in apache to run servlets from the apache server, it
works fine if I run apache without SSL.  However, when I do an apachectl
startssl, I start seeing the following in the mod_jk.log:

[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a
match ajp12
[jk_worker.c (123)]: Into wc_get_worker_for_name ajp12
[jk_worker.c (127)]: wc_get_worker_for_name, done did not found a worker
[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a
match ajp12
[jk_worker.c (123)]: Into wc_get_worker_for_name ajp12
[jk_worker.c (127)]: wc_get_worker_for_name, done did not found a worker

I've looked through my httpd.conf (straight out of the apache distribution
with no changes except to include mod_jk.conf), the mod_jk.conf, and the
worker.properties files (only changes were to point the tomcat home and java
directories to the right places).  Haven't been able to find anything in the
archives or various FAQs to shed any light on this.

Any ideas what might be wrong?

Thanks

o  _  _ _
   _o  /\_   _ |\o   (_)\__/o  (_)
 _ \__(_) (_)/_ \_| \   _|/' \/
(_)(_)o (_) o   o  (_) o  (_)(_)'  _\o_
-
Evan Day
SUMMIT Information Systems
[EMAIL PROTECTED] 
(800) 937-7500 x6301




RE: JSP pages stuck in cache? wont recompile...

2000-11-14 Thread Sean Blaes

I am having the same problem.  The pages have the autoflush attribute set
and the server.xml file says to refresh pages when they are changed...

-Original Message-
From: Marty McKeever [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 9:27 AM
To: [EMAIL PROTECTED]
Subject: JSP pages stuck in cache? wont recompile...


Friends,
All of a sudden it seems, whenever i make changes to a JSP and commit them 
to CVS, they aren't being recompiled on the next request (the old version 
is still being served).  To get the new page, i have to manually delete the 
cache and then restart tomcat.
There are other developers working on this server, so i dont know what they 
might've changed to cause this. any ideas?
TIA
Marty



## Marty McKeever[Information Architect]
## [EMAIL PROTECTED] [I-Silver, Inc]



Java.exe application error using Tomcat

2000-11-14 Thread Alex Carrillo

Hi,
I am using Apache SOAP 2.0 with Tomcat 3.1.  I built a Java client that sends  a DOM 
element, and receives a DOM element also.  This works fine, but my Tomcat server stops 
running on each call and displays the following error: Java.exe - application error - 
The instruction at "0x77f6coe6" referenced memory at "0x0010". The memory could 
not be read.   

Your help is appreciated. 
Thanks.





JSP Always compile

2000-11-14 Thread John Sokel



Need help with my JSPs compiling over and over 
again. I run the JSP examples that come with tomcat, and when you load the 
page the first time the JSP compiles and takes a little while to load. 
Every time after that, it loads the class from the work folder and it is much 
faster. 

However, when I put in my jsp pages, the pages 
compile every single time. I cannot seem to figure out why. I look 
at the work folder, and it keeps creating new .java files and recreating the 
.class file. So my directory looks like:
-.class
-_jsp_0.java
-_jsp_1.java
-_jsp_2.java

A new file is created for each request and 
recompiled, rather than using the existing class. I can not figure out 
what is different from my pages and the example pages. Any 
ideas.

I'm running on RH Linux 6.2 with 
Apache.

John


Re: writing jsp output to a file

2000-11-14 Thread Stefan Woithe

Joe Laffey wrote:
 
 On Mon, 13 Nov 2000, John Ellis wrote:
 
  All you need to do is create a virtual browser:
 
  URL pageYouWant = new URL(completeRequestString);
  InputStream in = pageYouWant.openStream();
  // burn off the header from in, then write the rest to a file...
 
  This will all be done, of course, in a completely seperate JVM than your
  Tomcat JVM.
 
  It sounds like an ineresting application of jsp.
 
 What if you compile your ordinary JSP into a servlet (by executing it
 normallY). Then go to the compiled servlet and replace "out" with a normal
 DataOutputStream or FileWriter.
 
 Remember that your JSPs all get converted to servlets, which encapsulate
 the HTML portions of the JSP page into out.print() statements.
 
 If you had to do this a lot I bet you could hack a copy of Tomcat or
 GNUJSP pretty easily so that it did this be default.

Any idea which parts of Tomcat 3.1final to hack in order to build this? I've a 
similiar problem: in a servlet I include a JSP (via request dispatcher). This jsp 
renders just a part of the whole response page and I want to get just this part stored.

Thank you

Stefan




Re: user authentication

2000-11-14 Thread Michelle

Thanx much for the quick response ... may I inquire further please?


: For our system, we're managing it all through sessions.  When the
person logs
: in, their login information is checked against a database object.
If it
: matches, they're logged in.  Otherwise, they're asked to provide a
correct
: login, or bugger off.
:
: After they're logged in, there is a user object associated with
their session
: (session.setAttribute( user, "user" )).
:
: It is through this user object that decides where they can access,
and what they
: can access.

Can to explain this further please - how do you manage the
url-user-role matrix in your user object?  Further, how do you do a
check in a timely fashion for every protected area of your site?

I was thinking of developing some sort of all encompassing "white
pages" for everyone and every url.  When a user logs in, I could
grab all data for that user from the white pages and stuff that info
into the session.  From then on in, for every protected page access,
I could validate the URL against the session data and not hit the
database.  Database updates for new users and roles could be handled
elsewhere.

In this scenario - I would role my own system.

Thanx much - Michelle




Re: File-Name-Spaces

2000-11-14 Thread dynacomconsulting

Hi,
U must encode the filenames.EncodeUrl etc functions
will support.Pl check

Bye,
Ravi
Dynacom
--- Craig May [EMAIL PROTECTED]
wrote:
 Hi,
 
 I can't seem to get a file of the server if it's
 name contains spaces.  Is
 there a work-around for this?
 
 Regards,
 Craig May
 
 Enth Dimension
 http://www.enthdimension.com.au


__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Re: difficulty in running servlets

2000-11-14 Thread dynacomconsulting

Hi,
1.
Pl add servlet mapping tag.Like below
- servlet-mapping
  servlet-namehi/servlet-name 
  url-pattern/hi/url-pattern 
  /servlet-mapping
2.
Check out for the server root and port number .
3.
Check for the classpath of hi.class

Good luck,
Ravi
Dynacom


--- Rasika [EMAIL PROTECTED] wrote:
 Hello,
 I have installed TOMCAT with Apache. I followed your
 user guide and then tomcat faqs to install tomcat.
 Now I am able to run .jsp files using both tomcat as
 well as Apache. I can also run sample servlet
 provided alongwith examples. But I cannot run my own
 servlet.
 I have stored itin webapps/root/web-inf/classes
 directory. 
 I still don't understand which files need to be
 configured in order to run my servlets?
  
 I have added following block to web.xml file
 servlet
   servlet-namehi/servlet-name
   servlet-classhi/servlet-class
 /servlet
  
 where "hi" is the name of my servlet file. But when
 I try to run it through browser giving command
 http://localhost:8040//hi where 8040 is apache
 port(which I have changed ) it gives me 404 error.
  
 Can you please help me in configuring files so as to
 run my own servlets?
  
 Thanks,
 Rasikaj
 


__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Re: servlets problem is still there

2000-11-14 Thread dynacomconsulting

I feel U must check your classpath for the servlet.
--- Rasika [EMAIL PROTECTED] wrote:
 Hello,
 I have installed TOMCAT with Apache. I followed your
 user guide and then tomcat faqs to install tomcat.
 Now I am able to run .jsp files using both tomcat as
 well as Apache. I can also run sample servlet
 provided alongwith examples. But I cannot run my own
 servlet.
 I have stored itin webapps/root/web-inf/classes
 directory. 
 I still don't understand which files need to be
 configured in order to run my servlets?
  
 I have added following block to web.xml file
 servlet
   servlet-namehi/servlet-name
   servlet-classhi/servlet-class
 /servlet
  servlet-mapping
 servlet-namehi/servlet-name
 url-pattern/hi/url-pattern
 /servlet-mapping
  
  
 where "hi" is the name of my servlet file. But when
 I try to run it through browser giving command
 http://localhost:8040//hi where 8040 is apache
 port(which I have changed ) it gives me 404 error.
  
 Can you please help me in configuring files so as to
 run my own servlets?
  
 Thanks,
 Rasikaj
 


__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Testing docs/suggestions? (GTest.java - test/Golden)

2000-11-14 Thread Mike La Budde

I'm trying to utilize the gtest xml tag in my ant build file to automate 
testing (ala the test demo app).

1) Is there any documentation on using gtest?

2) I'd like to process POSTs w/ some test data filled in, any tips on how 
to use the "content" attribute?

3) Any hints/caveats/warnigns/suggestions about how to integrate this into 
my struts environment? (I can execute my *.do's fine.)

4) What's everyone else doing in terms of a) functional 
testing/verification of their webapps and b) performance testing of their 
webserver?? Any suggestions along these lines would be greatly appreciated!

TIA,

Mike




Starting Tomcat at bootup.

2000-11-14 Thread Tony Mueller

Hi, 

Im running RedHat 6.2 and Tomcat 3.1.
I would like to have Tomcat automatically start up at boot time.
Does anyone have a way to do this?

Thanks in advance!

Tony Mueller




Re: Starting Tomcat at bootup.

2000-11-14 Thread David Knaack

From: "Tony Mueller" [EMAIL PROTECTED]
 Im running RedHat 6.2 and Tomcat 3.1.
 I would like to have Tomcat automatically start up at boot time.
 Does anyone have a way to do this?

Depends a little on your installation.  If you just need
to issue a startup.sh command, you can just append the command
to /etc/rc.d/rc.local.

DK




Re: writing jsp output to a file

2000-11-14 Thread Vinny

try this:


%@ page import="java.io.*" %
%


FileWriter tempFile = new FileWriter("/tmp/gold.txt",false);
String data = "To be or not to be";
PrintWriter toFile = new PrintWriter(tempFile);
toFile.println(data);
toFile.close();


%


this writes "To be or not to be" into /tmp/gold.txt on a unix system

Juan Ramirez wrote:

 I would like to write the output of a jsp file to a static html file
 instead of sending it out to a browser.  I have a pagebuilding system
 that uses the power of jsp to do a lot of things, but I need to write
 the resulting jsp to a file instead of streaming it out.  Has anyone
 done anything like this?
 
 Thanks.
 
 Juan




RE: Starting Tomcat at bootup.

2000-11-14 Thread Tony Mueller

Thanks to all!

This works like a charm. 

Note: I needed to add - 
export JAVA_HOME=/usr/local/jdk1.2.2 
to the script since the tomcat.sh could not find my java.

Hope this helps others

Tony

-Original Message-
From: Mike La Budde [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 3:22 PM
To: [EMAIL PROTECTED]
Cc: '[EMAIL PROTECTED]'
Subject: Re: Starting Tomcat at bootup.


Tony:

If you want full sysv init-style scripts you can put this in
/etc/rc.d/init.d:

#!/bin/sh
#
# Startup script for Tomcat
#
# chkconfig: 345 93 06
# description: start|stop|restart Tomcat (the JSP/Servlet engine)
#

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
   start)
 echo -n "Starting tomcat: "
 /opt/tomcat/bin/startup.sh
 echo
 ;;
   stop)
 echo -n "Shutting down tomcat: "
 /opt/tomcat/bin/shutdown.sh
 ;;
   restart)
 $0 stop
 $0 start
 ;;
   *)
 echo "Usage: $0 {start|stop|restart|reload|status}"
 exit 1
esac

exit 0


Then add it via:

chkconfig --add tomcat
chkconfig --level tomcat 345 on

This will start tomcat for run levels 3, 4, and 5 and stop tomcat for the 
others.

HTH,

Mike


At 11/14/2000 02:51 PM -0800, Tony Mueller wrote:
Hi,

Im running RedHat 6.2 and Tomcat 3.1.
I would like to have Tomcat automatically start up at boot time.
Does anyone have a way to do this?

Thanks in advance!

Tony Mueller



help needed

2000-11-14 Thread Gan Keng Hoon

hi team,

 i started developing a web-based email system few weeks back.
everything was just fine untill someday last week, this error began to
happen on some of the links. The links point to some jsp files which run
well before. And they were not modified at all when the error happened.

Error: 500
Location: /emailcentre/reply.jsp
Internal Servlet Error:
null
nullorg.apache.jasper.JasperException: Unable to compile class for
JSPnull at
org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:425)null at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149)null
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)null
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)null
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
Compiled Code)null at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)null at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)null at
org.apache.tomcat.core.ContextManager.service(ContextManager.java,
Compiled Code)null at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java,
Compiled Code)null at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
Compiled Code)null at java.lang.Thread.run(Thread.java, Compiled
Code)null
nullRoot cause:null
nulljava.lang.NullPointerExceptionnull at
java.io.Win32FileSystem.normalize(Win32FileSystem.java, Compiled
Code)null at
java.io.Win32FileSystem.getUserPath(Win32FileSystem.java:263)null at
java.io.Win32FileSystem.resolve(Win32FileSystem.java, Compiled Code)null
at java.io.File.getAbsolutePath(File.java:397)null at
org.apache.jasper.compiler.JspReader.pushFile(JspReader.java, Compiled
Code)null at
org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:125)null at
org.apache.jasper.compiler.JspReader.(JspReader.java:219)null at
org.apache.jasper.compiler.JspReader.createJspReader(JspReader.java:225)null
at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled
Code)null at
org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)null at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149)null
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)null
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)null
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
Compiled Code)null at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)null at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
Compiled Code)null at
org.apache.tomcat.core.ContextManager.service(ContextManager.java,
Compiled Code)null at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java,
Compiled Code)null at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
Compiled Code)null at java.lang.Thread.run(Thread.java, Compiled
Code)null
null


yours
gan





using multiple redirector in IIS

2000-11-14 Thread sherman

Jens et. al,

I have seen several requests/attempts to figure out how to have more
than one redirector hooking TomCat to IIS. I also need this, as I need
to run some servlets inside SSL (credit cards), and others just normal
http (for performance). Jens, did you ever have an opportunity to write
a module?

Regards,

-- Sherman




Re: Tomcat 3.1 crashes when closing ODBC connection

2000-11-14 Thread Julio Serje (@canada.com)



Hany,

I run a little site in an NT with using the ODBC-JDBC 
bridge (andTomcat 3.1...)and everything works fine. Can you be more 
specific?

- What set of ODBC:JDBC drivers are you using (Use the one 
that comes with JDK1.3...)..
- To what type of database are you connecting

If you can send a code snippet with your connection to the 
database, it may help. It seems it isn't a Tomcat pb,as it fails also with 
JSDK.

Julio


  - Original Message - 
  From: 
  Hany Hassan 

  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, November 14, 2000 9:45 
  AM
  Subject: Tomcat 3.1 crashes when closing 
  ODBC connection
  
  Hi,
  
  I'm using tomcat 3.1 with apache on WinNT. I'm 
  doing both Servlets,JSP and also call some classes from theJSP 
  files. I do creae a connection object to the ODBC. But whenever I close the 
  connection object tomcat crashes (shuts down) and givesan "access 
  violation" message. If I do not close the connection, it just works fine, but 
  I feel it's unclean not to close the connections.
  Could there be something wrong in what I'm doing? 
  It also happened with another friend's code. It could be helpful to say that 
  when I was using the JSDK (Java Servlet Development Kit) which comes 
  witha simple servlet server, I had the same problem, too.
  
  Thank you,
  Hany Hassan


Tomcat 3.1 NES 4.0 (iPlanet) help needed

2000-11-14 Thread G Michael Sawka

Hi,

We've been trying to set up Tomcat 3.1 on our Win2k box, which is
running Netscape Enterprise Server 4.0.  We followed the directions
online at the Jakarta website, but have been completely unsuccessful
in getting the redirector to work.  There are no errors when the
redirector is loaded, but we can't access the examples included with
Tomcat or any other mapping we've set up; we get a 404 Not Found
error.  We have even rebuilt nsapi_redirect.dll on our system using
our web server's plugin lib  include directories, but to no avail.

Can anyone offer any suggestions?  They would be much appreciated!
Please cc: [EMAIL PROTECTED] and [EMAIL PROTECTED]

Thank you,
Mike




RE: [BUG] OutputStream is already being used for this request

2000-11-14 Thread kramer

I know that out is an implicit object in a JSP.
I did set the contenttype to image/jpeg or similar, but what I track the
issue to is that JSP does not like grabbing the output stream twice.  I have
already
written the servlet and get no problem, it just too bad to need to do this
just for three
line of code to dump the binary data.

By the way, some JSP FAQ use this method for dumping binary data, they
should not!
Also, for not even with the errors and stack traces, it does work, but it
may not in the
future or with other JSP servers.

Jim K.

-Original Message-
From: Wyn Easton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 6:11 AM
To: [EMAIL PROTECTED]
Subject: RE: [BUG] OutputStream is already being used for this request


Maybe you already knew this, but "out" is an implicit object in a JSP.
You probably need a response.setContentType() or the  page directive
that doe the same thing to set your output stream for binary data.

--- kramer [EMAIL PROTECTED] wrote:
 I am getting this while using request.getOutputStream() to write
 binary data
 is a JSP.
 I did some more hunting and it looks like this is not allowed, and
 should be
 done only in a servlet.
 I is a shame, because it was only three lines of code and to go
 through all
 the servlet sets just for just three
 lines of code.

 Jim K

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, November 12, 2000 11:06 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [BUG] OutputStream is already being used for this
 request


 kramer wrote:

  I am still getting the error message "OutputStream is already being
 used
 for
  this request" even with 3.2 beta 7.
 
  Does any one know if this should be fix prior to finial 3.2?

 Under what circumstances are you getting this message?  There are
 valid
 cases of
 getting this that are required by the servlet 2.2 specification --
 but
 without
 knowing what your scenario is, nobody can tell if this is a feature
 or a bug
 :-).

 Craig McClanahan





=
Wyn Easton
[EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/




RE: Tomcat 3.1 NES 4.0 (iPlanet) help needed

2000-11-14 Thread Randy Cox

 -Original Message-
 From: G Michael Sawka [mailto:[EMAIL PROTECTED]]

 We've been trying to set up Tomcat 3.1 on our Win2k box, which is
 running Netscape Enterprise Server 4.0.  We followed the directions
 online at the Jakarta website, but have been completely unsuccessful
 in getting the redirector to work.  There are no errors when the
 redirector is loaded, but we can't access the examples included with
 Tomcat or any other mapping we've set up; we get a 404 Not Found
 error.  We have even rebuilt nsapi_redirect.dll on our system using
 our web server's plugin lib  include directories, but to no avail.

I've had a similar problem on Win2K using the NT Apache server.  I can show
the Tomcat servlet examples and I know both Apache and Tomcat http servers
are working, but neither the redirection from Apache works nor do the jsp
examples work through using the Tomcat HTTP server.  I have Apache set up on
the standard port and Tomcat set up on 8080.  I've set the Apache httpd.conf
to have the include directive to read my tomcat conf file.  I get 404 errors
when referencing jsp's on either of the localhost http servers.  The jsp has
been compiled in the work folder, but I lose the trail after that for
whether the servelet was built.  Anyone know what might be wrong from there?




RE: question about RequestDispatcher.forward() in tomcat

2000-11-14 Thread Kedar Choudary

Following code will do the job
-
import javax.servlet.*;
import javax.servlet.http.*;

import java.io.*;
import java.util.*;

public class Controller extends HttpServlet {
public void service(ServletRequest req, ServletResponse res) throws
ServletException, IOException {
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("h1This is from Contrller/h1\n");
out.flush();

ServletContext ctx = getServletContext();
RequestDispatcher rd = ctx.getNamedDispatcher("jsp");
rd.include(req, res);
}
}
---

-Original Message-
From: Lacerda, Wellington (AFIS) [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 4:03 PM
To: '[EMAIL PROTECTED]'
Subject: RE: question about RequestDispatcher.forward() in tomcat


I wrote a small MVC framework and I have my controller mapped to a common
name like "dispatch.htm" and I send all requests directly to it, with a
parameter specifying the action. So, all the requests are always like:

a href="dispatch.htm?ACTION=XXXPARM1=YYY..."do something/a

It's working fairly well.

Wellington Silva
UN/FAO

-Original Message-
From: Chen, Kevin [mailto:[EMAIL PROTECTED]]
Sent: 09 November 2000 00:32
To: '[EMAIL PROTECTED]'
Subject: question about RequestDispatcher.forward() in tomcat


I am trying to implement a MVC system. the controller
will intercept all request for .jsp page, then forward
it to the jsp page after some checking.

I am using TOMCAT to run the servlet. and using
extension rul mapping, i.e.:(in web.xml)
servlet-mapping
servlet-name controller /servlet-name
url-pattern *.jsp /url-pattern
/servlet-mapping
My test controller just forward the page to another jsp page,
the code looks like:
RequestDispatcher dis;
dis=getServletContext().getRequestDispatcher("/index.jsp");
dis.forward (req, res);
//dis.include (req, res);

the problem with above approach is that, my controller will
intercept the index.jsp too. which will cause the page cannot
be displayed. looks like the servlet container resend the
index.jsp page to me again and again.


Is there anyway around it?

Appreciate any help.
kevin




tomcat4.0m4 java.net.SocketException

2000-11-14 Thread Juergen Baumann

I have installed tomcat4.0 Milestone 4 on my w2000 pc. The examples do
run fine, however I get the following exception everytime I run one of
the examples.

Here is what I have added in startup.bat and shutdown.bat:
set CATALINA_HOME=C:\Java\tom4.0m4

With tomcact4.0 Milestone 1 or tomcat3.2 beta 5 I do not see this
exception.

Thanks for your help in advance!
JB

java.net.SocketException: Connection reset by peer: JVM_recv in socket
input stream read
at java.net.SocketInputStream.socketRead(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:86)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
at
org.apache.catalina.connector.http.HttpProcessor.read(HttpProcessor.java:863)
at
org.apache.catalina.connector.http.HttpProcessor.parseRequest(HttpProcessor.java:608)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:754)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:902)
at java.lang.Thread.run(Thread.java:484)


__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/