RE: Setting JAVA_HOME path on Linux 7.0

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

Oops !

Maybe it doesn't with JDK1.3 on Linux, because I've 4 servers running with
long up-times and my own machine using tomcat 3.1 AND JDK1.3. The problem I
found on NT was when using Tomcat as a service as soon as you logged off the
JDK was being shut down, but even this was a problem on the JDK, not TOMCAT,
and it seems to have been solved.

Wellington Silva
UN/FAO

-Original Message-
From: Sterling [mailto:[EMAIL PROTECTED]]
Sent: 10 November 2000 20:48
To: [EMAIL PROTECTED]
Cc: '[EMAIL PROTECTED]'
Subject: Re: Setting JAVA_HOME path on Linux 7.0


H-

This might not be relevant now, but I have read that Tomcat 3.1 doesn't work
with JDK1.3. It only works with JDK1.2.

I was having problems getting Tomcat running using JDK1.3. I switched and
changed my JAVA_HOME to point to JDK1.2 and all the problems went away. Well
not
all, but it started working as soon as I set my CLASS_PATH correctly. (The
whole
500 error terror. 8^)

Newbies .002$.
-Sterling


"Lambert, Stephen : CO IR" wrote:

 I have Tomcat 3.1 running standalone on a RedHat 6.2 server(yeah).

 However, on a Redhat 7.0 server, I having difficulty setting the path for
 JAVA_HOME after installing JDK1.3
 I can't cd to $JAVA_HOME.

 The .bash_profile is as follows:
 # .bash_profile

 # Get the aliases and functions
 if [ -f ~/.bashrc ]; then
 . ~/.bashrc
 fi

 # User specific environment and startup programs

 PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH:$HOME/bin:/usr/local/jdk1.3/bin
 BASH_ENV=$HOME/.bashrc
 USERNAME="root"

 export USERNAME BASH_ENV PATH

 JAVA_HOME=/usr/local/jdk1.3
 export JAVA_HOME

 ---

 Also, when I shutdown the server, it requires /sbin/./shutdown -h now

 The only difference I can tell between the two Linux version is the
ENV(6.2)
 vs BASH_ENV(7.0)

 Can someone help?
 Thanks.



Unable to run JSPs

2000-11-13 Thread Gareth Cantrell

I have been having problems getting tomcat to run JSPs for the last
week.
I have tried with 3.2b4, b5, b6 and now b7... and still get the same
problems:  "cannot load servlet name: jsp"
I'm currently using RH Linux 6.2, with Sun's JDK1.3. I've also tried
this
on NT4, and Win2000 with the same results. Below is the output from the
startup script... below that is the error I get when trying to load
index.jsp.

Regards
Gareth Cantrell

Guessing TOMCAT_HOME from tomcat.sh to ./..
Setting TOMCAT_HOME to ./..
Using classpath:
.:./../lib/ant.jar:./../lib/jasper.jar:./../lib/jaxp.jar:./../lib/parser.jar:./../lib/servlet.jar:./../lib/test:./../lib/webserver.jar:/opt/jdk1.3/lib/tools.jar

[root@cyclone bin]# Starting tomcat. Check logs/tomcat.log for error
messages
2000-11-13 10:33:19 - ContextManager: Adding context Ctx(  )
2000-11-13 10:33:19 - ContextManager: Adding context Ctx( /admin )
2000-11-13 10:33:19 - ContextManager: Adding context Ctx( /examples )
2000-11-13 10:33:19 - ContextManager: Adding context Ctx( /test )
count = 0, total = 57
cannot load servlet name: jsp
2000-11-13 10:33:21 - PoolTcpConnector: Starting HttpConnectionHandler
on 80
2000-11-13 10:33:21 - PoolTcpConnector: Starting Ajp12ConnectionHandler
on 8007


2000-11-13 10:57:32 - Ctx(  ): Exception in: R(  + /index.jsp + null) -
java.lang.NullPointerException
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:471)

at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:136)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at
org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:486)
at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)

at
org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152)

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

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)





Using Jasper for template processing?

2000-11-13 Thread Jaroslav Gergic

Hello Tomcat developers and advanced users!

I have following question:

I would like to use Jasper engine for template processing.  I use
Tomcat with JSPs and its good, but I would like to alter Jasper usage
this way:

An JSP page is compiled into a Java source where the user's JSP
page extends the class HttpJspBase and overrides several methods
notably _jspService().

I want to use Jasper for more generic task. Template processing
independent on Servlets and HTTP. Imagine following interface:

public interface Template {
  void renderTemplate(Writer out) throws java.io.IOException;
}

I want to alter Jasper to process files with JSP-like syntax (of
course with other intrinsic variables accessible inside the
renderTemplate() method) and generate Java source code implementing
the Template interface and than compile the source code using Java
compiler into executable classes. Then load and run generated classes
as they have been written manually.

So I ask:
1) is is possible or is Jasper tightly coupled with HTTP and Servlet
API?
2) if it is possible, how to do that? (which classes can be re-used,
which interfaces and classes have to be re-implemented
3) how much time it can take (1 day, 3 days, a week, two weeks, ...)

Thanks for any comments and suggestions.

Jaroslav Gergic

=
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: question about RequestDispatcher.forward() in tomcat

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

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



Re: Contexts and dispatchers

2000-11-13 Thread Richard Evans

  
  There are two getRequestDispatcher() methods.
  One in the ServletContext that uses absolute paths (start with /).
  One in the request that uses relative paths.
  Looks like you need the absolute path one.

No. My understanding is that the one in ServletContext takes paths relative to
the context root.  _Not_ absolute paths.

To recap ..

I have a URI which I need to forward to the correct ServletContext.  I can
do something like:

ServletContext other = getServletContext().getContext(uri);

This works because getContext() takes absolute paths.

But then how to I call getRequestDispatcher or getRealPath on that other
context? To get the correct result I need to strip off the other contexts root
from the URI before callign getRequestDispatcher or getRealPath.  But I can't
find any way of determining what the root of the other context is.   It could
just be the default "/" context or it could be a context which handles the URL
explicitly.

Help, anyone?

Richard

  
  --- Richard Evans [EMAIL PROTECTED] wrote:
   But I need the context path for a different ServletContext.
   request.getContextPath returns the path for _this_ context, not a
   foreign
   one.
   
-Original Message-
From: Wyn Easton [mailto:[EMAIL PROTECTED]]
Sent: 11 November 2000 21:57
To: [EMAIL PROTECTED]
Subject: Re: Contexts and dispatchers
   
   
--- Richard Evans [EMAIL PROTECTED] wrote:
 "/file/x/y".  (The URL without the context root).  How to I find
   the
 context
   
Use request.getContextPath()
   
If your web app. is called app1 getContextPath() would return /app1
   
   
   
   
=
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/
  



dial up server

2000-11-13 Thread GoldenDawn Fan

Hi, does anyone know how Apache can be used as server
for dial up ISP?

If so, can someone briefly explain how?

Thanks!

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



workers - loadbalancing

2000-11-13 Thread Christopher Blasnik

Hi,

I am currently working on a virtual hosting solution for JSPs / Java
Servlets for my company
fyi: i am using redhat 6.2, tomcat 3.2 beta6 (eagerly awaiting the final
3.2) and the SUN JDK 1.2.2 as the platform for all of this

i am doing all fine configuring virtual hosts and i think i have
(almost) all security issues covered;

the one thing that confuses me about tomcat and / or the JDK i use is
the following:

isn't tomcat supposed to spawn more than one process when configuring
the 
worker.ajp13.lbfactor=10 for example ? or did i misunderstand the
(rather scarce :-) documentation ?
somehow i think that this depends on the JDK that is used:
in the beginning, when i was still experimenting with (apache)jserv and
different java servlets, i used blackdown's jdk 1.2.2, and every time i
restarted apache and therefore the servlet engine / container, at least
4 or more java processes were spawned
but using the same configuration and instead of JDK from blackdown using
SUN's java development kit, only one! process was spawned from the
start! - the same now with tomcat (although i havent tried it with any
other JDK than SUN's yet, i must admit)

Or did i misunderstand the whole issue, and the loadbalancing is done in
some other way ?

I hope someone can shed some light on this!

signing confused-and-hopefully-not-sounding-too-newbieish,

christopher blasnik
mailto:[EMAIL PROTECTED]



making mod_jk.conf-auto default to ajp13???

2000-11-13 Thread Jacob Kjome

Gal Shachor wrote:

At 09:30 AM 6/23/2000 +0200, you wrote:
This does require you to change mod_jk.conf, or just to change the
ApacheConfig task
and recompile...


 From the above statement, it sounds like the only way to get Tomcat to 
spit out a mod_jk.conf-auto file that uses ajp13 rather than ajp12 is to 
recompile Tomcat with a switch of the variable named ApacheConfig to use 
ajp13.  Is this correct?

I was hoping there would be a way to make this happen by adding some info 
to the server.xml file.

Is there any easy way to do this other than recompiling Tomcat?

thanks,

Jake




Re: tomcat 4.0 m4: ParseException: Cannot read file: ze file

2000-11-13 Thread James Cook

It appears to be an error that occurs while parsing jar files. ze probably
refers to a ZipEntry object. Perhaps, one or more of your jar files are corrupt?

jim

- Original Message -
From: "Christian Mallwitz" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 13, 2000 8:36 AM
Subject: tomcat 4.0 m4: ParseException: Cannot read file: ze file


 Can someone tell me what that means ?
 Thanks
 Christian
 --
 Christian Mallwitz INTERSHOP Communications Germany
 Senior Software Engineerphone: +49 3641 894 334





Re: non-cookie session tracking?

2000-11-13 Thread Daniel A. Theobald

I have a huge tree of static html.  Does this mean that anytime I serve
a page, I would have to first parse all the URLs and run them each
through the encodeURL method for every link that appears on every page? 
Is there another (more automatic) way?  The performance hit seems
prohibitive.

theo

Konrad Kamiñski wrote:
 
 Use response.encodeURL (url) for URL encoding with session tracking
 
 -Original Message-
 From: Daniel A. Theobald [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 13, 2000 4:20 PM
 To: [EMAIL PROTECTED]
 Subject: non-cookie session tracking?
 
 Does or will tomcat support automatic url rewriting for session
 tracking?  Our client does not allow the use of cookies.  Any
 suggestions?
 theo



out.write() method

2000-11-13 Thread Peter Choe

i am writing a web based mail client in jsp.  i have tomcat3.2 running
on a freebsd machine.

i am using java mail package and have managed to connect to the pop
server and get a list of the unread mail.  but when i try to view mail
that is just plain text something strange happens.

the message is just printed out without some return carriages.

example:

 Hi, one more question:) THe PrintWriter class has both write and print
method. THe one i saw in your notes is the print method. What's the
difference between the two methods? thanks, Ge Sun From: Peter Choe
To: "GE SUN" Subject: Re: CIS9771 MW6--SemiColon?? Date: Mon, 30 Oct 2000 08:18:57 
-0500  i have found that not using the semicolon works on most databases. the only 
thing i can say is that with the database try it without the semicolon. if you get a 
sqlexception, try it with the semicolon.  but i think that in general you don't 
need the semicolon because the JDBC driver should translate the SQL statement to 
the appropriate format for the database.  as for my example, it is a typographical 
error. it should be:  stmt.executeUpdate("UPDATE coffee_bean SET 
price=10.99"+"WHERE bean='FRENCH ROAST'");  peter choe   At 10:46 PM 10/29/00 
+, you wrote:  Prof Choe, While reading JDBC short course, text book, and 
your notes for this section, i was confused of the use of semicolon inside a query. 
Some of the statements included the semicolon at the end of sql statement, some 
didn't. For example: 1 the one with semicolon: ResultSet 
rs=stmt.executeQuery("SELECT programmer, cups FROM JoltData ORDED BY cups DESC;"); 
2. the one without semicolon: ResultSet rs=stmt.executeQuery("SELECT * FROM 
Books"); When do we need to include the semicolon, or the semicolon doesn't 
matter???  My other question is also about the syntax. In your JDBC note, you 
wrote one statement as follows: stmt.excuteUpdate("UPDATE coffee_bean SET 
price=10.99" + WHERE bean= "FRENCH ROAST"); I thought the "WHERE bean= " should 
also be quoted since it is a part of the sql commend. But i don't know how to fix 
this, should it be: stmt. executeUpdate("UPDATE coffee_bean SET price=10.99"+ 
"WHERE bean=\"FRENCH ROAST\""); or stmt.executeUpdate("UPDATE coffee_bean SET 
price=10.99"+"WHERE bean='FRENCH ROAST'"); ?  GE SUN  
_ Get Your 
Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information 
about yourself, create your own public profile at http://profiles.msn.com.

but when i view this in a java application and use System.out.println()
to print it is normal.  when i looked at the code in the works
directory, i noticed that the code say out.write() where out is an
object of JasperWriter.  how can i print this message with the correct
line carriages?

peter choe



apache Can't locate API module structure in file mod_jk.so

2000-11-13 Thread Marco Pöhler

Hi,

i try to start apache with mod_jk. I compiled mod_jk using the source-dist
and copy mod_jk.so to APACHE/libexec. The lines in my httpd.conf are:

LoadModule  jk_module libexec/mod_jk.so
AddModule   mod_jk.c

when i try to start apache i got this error:

root@marvin:/usr/local/apache  ./bin/apachectl start
Syntax error on line 207 of /usr/local/apache/conf/httpd.conf:
Can't locate API module structure `jk_module´ in file
/usr/local/apache/libexec/mod_jk.so: /usr/local/apache/libexec/mod_jk.so:
undefined symbol: jk_module
./bin/apachectl start: httpd could not be started

Line 207 is the LoadModule Line above.

thanks in advance

Marco





RE: non-cookie session tracking?

2000-11-13 Thread CPC Livelink Admin


That's the problem with not using cookies.  Since (in most cases) you will
be using tomcat in conjunction with some other web server (tomcats limited
web server is not sufficient for heavy use), the web server will directly
serve your static pages - tomcat will never see them. If you need to track a
session across a link to static pages, then you need to make those pages
dynamic and turn on URL rewriting in your dynamic code.

Also, note that automatic rewriting is not a good idea in general.  How does
tomcat know which URLs to rewrite, and which ones not to? For instance, if
your static pages refer to http://www.slashdot.org you probably don't want
any rewrite to occur there.

You may need to look at using an invisible (or very small) frame to enclose
the static page requests inside of a small JSP/servlet to maintain your
state.  While I haven't thought it through completely, you may be able to
use some tricky URL magic (like mod_rewrite I thnk on apache) to make your
static links autmagically come through your JSP wrapper, which maintains the
app state. WOuld probably be easier if all your static pages use relative
links.  Hmmm

Hope this helps,
Paul

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 11:47 AM
To: [EMAIL PROTECTED]
Subject: Re: non-cookie session tracking?


I have a huge tree of static html.  Does this mean that anytime I serve
a page, I would have to first parse all the URLs and run them each
through the encodeURL method for every link that appears on every page?
Is there another (more automatic) way?  The performance hit seems
prohibitive.

theo

Konrad Kamiñski wrote:

 Use response.encodeURL (url) for URL encoding with session tracking

 -Original Message-
 From: Daniel A. Theobald [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 13, 2000 4:20 PM
 To: [EMAIL PROTECTED]
 Subject: non-cookie session tracking?

 Does or will tomcat support automatic url rewriting for session
 tracking?  Our client does not allow the use of cookies.  Any
 suggestions?
 theo




RE: non-cookie session tracking?

2000-11-13 Thread Burgess, Jay
Title: RE: non-cookie session tracking?





Another option, assuming you know ahead of time which URLs on a page should have the session ID propagated, would be to use Javascript to grab the session ID off of the current page's URL, add it to the new page's URL, and then ask for the new page. 

For example, each URL on your static HTML page can be changed as follows:


(old) 
a href=myPage.htmlGo to myPage/a


(new) 
a href=javascript:addSessionID('myPage.html')Go to myPage/a


The addSessionID() function can grab the sessionID value from the current URL, append it to the page name passed into the function, and then set location to the new URL.

Jay



-Original Message-
From: CPC Livelink Admin [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: non-cookie session tracking?




That's the problem with not using cookies. Since (in most cases) you will
be using tomcat in conjunction with some other web server (tomcats limited
web server is not sufficient for heavy use), the web server will directly
serve your static pages - tomcat will never see them. If you need to track a
session across a link to static pages, then you need to make those pages
dynamic and turn on URL rewriting in your dynamic code.


Also, note that automatic rewriting is not a good idea in general. How does
tomcat know which URLs to rewrite, and which ones not to? For instance, if
your static pages refer to http://www.slashdot.org you probably don't want
any rewrite to occur there.


You may need to look at using an invisible (or very small) frame to enclose
the static page requests inside of a small JSP/servlet to maintain your
state. While I haven't thought it through completely, you may be able to
use some tricky URL magic (like mod_rewrite I thnk on apache) to make your
static links autmagically come through your JSP wrapper, which maintains the
app state. WOuld probably be easier if all your static pages use relative
links. Hmmm


Hope this helps,
Paul


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 11:47 AM
To: [EMAIL PROTECTED]
Subject: Re: non-cookie session tracking?



I have a huge tree of static html. Does this mean that anytime I serve
a page, I would have to first parse all the URLs and run them each
through the encodeURL method for every link that appears on every page?
Is there another (more automatic) way? The performance hit seems
prohibitive.


theo


Konrad Kamiñski wrote:

 Use response.encodeURL (url) for URL encoding with session tracking

 -Original Message-
 From: Daniel A. Theobald [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 13, 2000 4:20 PM
 To: [EMAIL PROTECTED]
 Subject: non-cookie session tracking?

 Does or will tomcat support automatic url rewriting for session
 tracking? Our client does not allow the use of cookies. Any
 suggestions?
 theo





Re: out.write() method

2000-11-13 Thread Peter Choe

hey!  that actually worked.  thanks for the tip.

peter choe

CPC Livelink Admin wrote:
 
 Maybe its that you need to replace "\n" with "BR" (Break Line) to get the
 new lines in HTML, since HTML ignores the formatting of the input text.
 (Unless you use the PRE tag I think)
 
 -Original Message-
 From: Peter Choe [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 13, 2000 11:44 AM
 To: [EMAIL PROTECTED]
 Subject: out.write() method
 
 i am writing a web based mail client in jsp.  i have tomcat3.2 running
 on a freebsd machine.
 
 i am using java mail package and have managed to connect to the pop
 server and get a list of the unread mail.  but when i try to view mail
 that is just plain text something strange happens.
 
 the message is just printed out without some return carriages.
 
 example:
 
  Hi, one more question:) THe PrintWriter class has both write and print
 method. THe one i saw in your notes is the print method. What's the
 difference between the two methods? thanks, Ge Sun From: Peter Choe
 To: "GE SUN" Subject: Re: CIS9771 MW6--SemiColon?? Date: Mon, 30 Oct 2000
 08:18:57 -0500  i have found that not using the semicolon works on most
 databases. the only thing i can say is that with the database try it
 without the semicolon. if you get a sqlexception, try it with the
 semicolon.  but i think that in general you don't need the semicolon
 because the JDBC driver should translate the SQL statement to the
 appropriate format for the database.  as for my example, it is a
 typographical error. it should be:  stmt.executeUpdate("UPDATE coffee_bean
 SET price=10.99"+"WHERE bean='FRENCH ROAST'");  peter choe   At 10:46
 PM 10/29/00 +, you wrote:  Prof Choe, While reading JDBC short
 course, text book, and your notes for this section, i was confused of the
 use of semicolon inside a query. Some of the statements included the
 semicolon at the end of sql statement, some didn't. For example: 1 the
 one with semicolon: ResultSet rs=stmt.executeQuery("SELECT programmer,
 cups FR
 but when i view this in a java application and use System.out.println()
 to print it is normal.  when i looked at the code in the works
 directory, i noticed that the code say out.write() where out is an
 object of JasperWriter.  how can i print this message with the correct
 line carriages?
 
 peter choe



auto-loading

2000-11-13 Thread '

Hi,
How do I stop tomcat from automatically loading applications in /webapps?
do I uncomment the ...context.AutoSetup  ContextInterceptor in server.xml?

Will this effect anything else?

thanks!



Re: non-cookie session tracking?

2000-11-13 Thread Daniel A. Theobald

This approach sounds promising, with much less of a performance hit than
doing it dynamically on the server side.  Has anyone actually tried this
approach before?

The way the site works right now, any page that leaves the site is
brought up in a separate window anyway.  So by the same token we could
have any url that needs to maintain session use the addSessionID
approach.  

This project has many restrictions:
No cookies,
No frames,
Applets only when explicitly authorized.

All which ultimately hurt performance.  One question I have is if every
single page in the entire site is generated from our main.jsp page, does
it do any good to integrate with Apache?  My understanding is that
Apache would only serve the static pages requested directly.  Is that
correct?

theo






 "Burgess, Jay" wrote:
 
 Another option, assuming you know ahead of time which URLs on a page
 should have the session ID propagated, would be to use Javascript to
 grab the session ID off of the current page's URL, add it to the new
 page's URL, and then ask for the new page.
 
 For example, each URL on your static HTML page can be changed as
 follows:
 
 (old)
 a href="myPage.html"Go to myPage/a
 
 (new)
 a href="javascript:addSessionID('myPage.html')"Go to myPage/a
 
 The addSessionID() function can grab the sessionID value from the
 current URL, append it to the page name passed into the function, and
 then set "location" to the new URL.
 
 Jay



user authentication

2000-11-13 Thread Michelle

I've been delving through the Tomcat archives and various guru site
out there, trying to piece together a sound approach to handling
user authentication and rights access.  I've seen some threads and
articles on using sessions, some references in the Tomcat archives
to JDBCRealm (which I cannot find anything more on), hooking into
databases .. etc.  I find I am a bit miffed and coming here looking
for some suggestions.

My site 
 will have static and dynamic pages
 will contain both protected and unprotected areas
 in the protected areas, will require logins
 each user will be assigned a role for the protected area
which grants access rights such as read, write, admin
- yes, an ACL model

Any thoughts on the best approach?

 Should I use JDBCRealm (an can someone send me the link
   to docs please?)
 Should I use the session object to hold a URL to role access
hash once a user logs?
 Should I spin my own (YIKES!)?

Experts - do you have any opinions?

Much much thanx in advance.

Michelle




writing jsp output to a file

2000-11-13 Thread Juan Ramirez

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: writing jsp output to a file

2000-11-13 Thread Joe Laffey

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.


Joe Laffey
LAFFEY Computer Imaging
St. Louis, MO
-
With no walls or fences on the Internet, who needs Windows or Gates?
-




downloading Word doc

2000-11-13 Thread Laurens Pit

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




RE: non-cookie session tracking?

2000-11-13 Thread CPC Livelink Admin
Title: RE: non-cookie session tracking?




Well, 
for the first one, they don't have a session yet - so the JavaScript just needs 
to be smart enough to behave when it's not there. As sson as they hit a 
dynamic page, they will get a session, and then the 'static' pages can use 
it.

  -Original Message-From: Burgess, Jay 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, November 13, 2000 02:18 
  PMTo: '[EMAIL PROTECTED]'Subject: RE: 
  non-cookie session tracking?
  While our servlets use cookies for session handling, we use 
  this technique all the time with parameters other than session ID. I 
  thought it might be applicable to your problem. 
  However, now I'm wondering about the "bootstrap" case i.e. how 
  do you get the session ID onto the URL for the very FIRST page? Maybe 
  there's more to this than my original email implied.
  Jay 
  -Original Message- From: 
  Daniel A. Theobald [mailto:[EMAIL PROTECTED]] 
  Sent: Monday, November 13, 2000 12:14 PM To: [EMAIL PROTECTED] Subject: Re: 
  non-cookie session tracking? 
  This approach sounds promising, with much less of a 
  performance hit than doing it dynamically on the 
  server side. Has anyone actually tried this approach before? 
  The way the site works right now, any page that leaves the 
  site is brought up in a separate window anyway. 
  So by the same token we could have any url that needs 
  to maintain session use the addSessionID approach. 
  This project has many restrictions: No 
  cookies, No frames, Applets 
  only when explicitly authorized. 
  All which ultimately hurt performance. One question I 
  have is if every single page in the entire site is 
  generated from our main.jsp page, does it do any good 
  to integrate with Apache? My understanding is that Apache would only serve the static pages requested directly. Is 
  that correct? 
  theo 
   "Burgess, Jay" wrote:  
   Another option, assuming you know ahead of time 
  which URLs on a page  should have the session ID 
  propagated, would be to use Javascript to  grab 
  the session ID off of the current page's URL, add it to the new 
   page's URL, and then ask for the new page. 
For example, each URL on 
  your static HTML page can be changed as  
  follows:   
  (old)  a href="myPage.html"Go to 
  myPage/a   
  (new)  a 
  href="javascript:addSessionID('myPage.html')"Go to myPage/a 
The addSessionID() function 
  can grab the sessionID value from the  current 
  URL, append it to the page name passed into the function, and  then set "location" to the new URL.  
   Jay 


3.2b7 Fails to Compile on WinNT4.0

2000-11-13 Thread raimee


Hello,

I am trying to build 3.2b7 for Windows.

Using
WindowsNT 4.0 SP5
suns jdk1.3,
jaxp v.1.01
servlet.jar 2.2


here is the output of the compile:


Searching for build.xml ...
Buildfile: D:\Tomcat\jakarta-tomcat-3.2-b7-src\build.xml

prepare:
[mkdir] Created dir: D:\Tomcat\build\tomcat
[mkdir] Created dir: D:\Tomcat\build\tomcat\bin
[mkdir] Created dir: D:\Tomcat\build\tomcat\classes
[mkdir] Created dir: D:\Tomcat\build\tomcat\conf
[mkdir] Created dir: D:\Tomcat\build\tomcat\doc
[mkdir] Created dir: D:\Tomcat\build\tomcat\lib
[mkdir] Created dir: D:\Tomcat\build\tomcat\lib\test
[mkdir] Created dir: D:\Tomcat\build\tomcat\lib\test\Golden
[mkdir] Created dir: D:\Tomcat\build\tomcat\logs
[mkdir] Created dir: D:\Tomcat\build\tomcat\src
[mkdir] Created dir: D:\Tomcat\build\tomcat\webapps
 [copy] Copying 14 files to D:\Tomcat\build\tomcat\bin
 [copy] Copying 16 files to D:\Tomcat\build\tomcat\conf
 [copy] Copying 1 files to D:\Tomcat\build\tomcat\conf
 [copy] Copying 36 files to D:\Tomcat\build\tomcat\doc
 [copy] Copying 1 files to D:\Tomcat\build\tomcat
 [copy] Copying 1 files to D:\Tomcat\build\tomcat\lib
 [copy] Copying 36 files to D:\Tomcat\build\tomcat\lib\test\Golden

tomcat:
[javac] Compiling 216 source files to D:\Tomcat\build\tomcat\classes
[javac]
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\jasper\runtime\JspFactoryImpl.java:93:

class org.apache.jasper.runtime.PageContextImpl is an abstract class. It
can't be instantiated.
[javac] if( pc == null ) pc= new PageContextImpl(this);
[javac]  ^
[javac]
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\jasper\runtime\JspFactoryImpl.java:95:

class org.apache.jasper.runtime.PageContextImpl is an abstract class. It
can't be instantiated.
[javac] pc =  new PageContextImpl(this);
[javac]   ^
[javac]
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\jasper\runtime\PageContextImpl.java:101:

class org.apache.jasper.runtime.PageContextImpl must be declared abstract.
It does not define void handlePageException(java.lang.Throwable) from class
javax.servlet.jsp.PageContext.
[javac] public class PageContextImpl extends PageContext {
[javac]  ^
[javac]
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpServletRequestFacade.java:83:

class org.apache.tomcat.facade.HttpServletRequestFacade must be declared
abstract. It does not define java.util.Map getParameterMap() from interface
javax.servlet.ServletRequest.
[javac] final class HttpServletRequestFacade implements
HttpServletRequest {
[javac] ^
[javac]
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpServletRequestFacade.java:83:

class org.apache.tomcat.facade.HttpServletRequestFacade must be declared
abstract. It does not define java.lang.StringBuffer getRequestURL() from
interface javax.servlet.http.HttpServletRequest.
[javac] final class HttpServletRequestFacade implements
HttpServletRequest {
[javac] ^
[javac]
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpServletRequestFacade.java:83:

class org.apache.tomcat.facade.HttpServletRequestFacade must be declared
abstract. It does not define void setCharacterEncoding(java.lang.String)
from interface javax.servlet.ServletRequest.
[javac] final class HttpServletRequestFacade implements
HttpServletRequest {
[javac] ^
[javac]
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpServletResponseFacade.java:84:

class org.apache.tomcat.facade.HttpServletResponseFacade must be declared
abstract. It does not define void resetBuffer() from interface
javax.servlet.ServletResponse.
[javac] final class HttpServletResponseFacade  implements
HttpServletResponse
[javac] ^
[javac]
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\ServletContextFacade.java:82:

class org.apache.tomcat.facade.ServletContextFacade must be declared
abstract. It does not define java.util.Set getResourcePaths() from
interface javax.servlet.ServletContext.
[javac] final class ServletContextFacade implements ServletContext {
[javac] ^
[javac]
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\ServletContextFacade.java:82:

class org.apache.tomcat.facade.ServletContextFacade must be declared
abstract. It does not define java.lang.String getServletContextName() from
interface javax.servlet.ServletContext.
[javac] final class ServletContextFacade implements ServletContext {
[javac] ^
[javac]
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\SimpleFacadeManager.java:103:

class org.apache.tomcat.facade.ServletContextFacade is an abstract class.
It can't be instantiated.

RE: downloading Word doc

2000-11-13 Thread CPC Livelink Admin


Is it just word, or excel, powerpoint, etc too?  Could this be the Frontpage
extentions/Office SP1a bug rearing it's ugly head?  This bug causes issues
when Word tries to download the file, but it doesn't share the same browser
cookies/sessions and so it gets sent to a login page or something else
instead of the file it wants.



-Original Message-
From: Laurens Pit [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 02:41 PM
To: [EMAIL PROTECTED]
Subject: downloading Word doc


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





Re: Using Jasper for template processing?

2000-11-13 Thread Dave Smith

Hi Jaroslav,

I already make use of user-defined JSP templates on my site
http://www.zzpost.com/. The
webapp runs a user-defined JSP  then uploads the output to the users own
website.

The question you need to ask is, for what reason would you take the time and
trouble to "decouple" servlets from http? That is a lot of work for nothing
IMHO.

Just create your system so that it is web-based and you'll be fine.

Dave
- Original Message -
From: "Jaroslav Gergic" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 13, 2000 3:30 AM
Subject: Using Jasper for template processing?


 Hello Tomcat developers and advanced users!

 I have following question:

 I would like to use Jasper engine for template processing.  I use
 Tomcat with JSPs and its good, but I would like to alter Jasper usage
 this way:

 An JSP page is compiled into a Java source where the user's JSP
 page extends the class HttpJspBase and overrides several methods
 notably _jspService().

 I want to use Jasper for more generic task. Template processing
 independent on Servlets and HTTP. Imagine following interface:

 public interface Template {
   void renderTemplate(Writer out) throws java.io.IOException;
 }

 I want to alter Jasper to process files with JSP-like syntax (of
 course with other intrinsic variables accessible inside the
 renderTemplate() method) and generate Java source code implementing
 the Template interface and than compile the source code using Java
 compiler into executable classes. Then load and run generated classes
 as they have been written manually.

 So I ask:
 1) is is possible or is Jasper tightly coupled with HTTP and Servlet
 API?
 2) if it is possible, how to do that? (which classes can be re-used,
 which interfaces and classes have to be re-implemented
 3) how much time it can take (1 day, 3 days, a week, two weeks, ...)

 Thanks for any comments and suggestions.

 Jaroslav Gergic

 =
 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/





Windows SMB paths in server.xml

2000-11-13 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
 S/MIME Cryptographic Signature


RE: Using Jasper for template processing?

2000-11-13 Thread CPC Livelink Admin


Remember, Servlets are not necessarily HTTP beasts.  The servlet spec (from
my perusal) specifically leaves open what kind of environment the servlet
will live in.  This is why there are specific HTTP extentions of the base
servlet classes.  Now, that being said, I don't know of any other way to use
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.

-Original Message-
From: Dave Smith [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 03:25 PM
To: [EMAIL PROTECTED]
Subject: Re: Using Jasper for template processing?


Hi Jaroslav,

I already make use of user-defined JSP templates on my site
http://www.zzpost.com/. The
webapp runs a user-defined JSP  then uploads the output to the users own
website.

The question you need to ask is, for what reason would you take the time and
trouble to "decouple" servlets from http? That is a lot of work for nothing
IMHO.

Just create your system so that it is web-based and you'll be fine.

Dave
- Original Message -
From: "Jaroslav Gergic" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 13, 2000 3:30 AM
Subject: Using Jasper for template processing?


 Hello Tomcat developers and advanced users!

 I have following question:

 I would like to use Jasper engine for template processing.  I use
 Tomcat with JSPs and its good, but I would like to alter Jasper usage
 this way:

 An JSP page is compiled into a Java source where the user's JSP
 page extends the class HttpJspBase and overrides several methods
 notably _jspService().

 I want to use Jasper for more generic task. Template processing
 independent on Servlets and HTTP. Imagine following interface:

 public interface Template {
   void renderTemplate(Writer out) throws java.io.IOException;
 }

 I want to alter Jasper to process files with JSP-like syntax (of
 course with other intrinsic variables accessible inside the
 renderTemplate() method) and generate Java source code implementing
 the Template interface and than compile the source code using Java
 compiler into executable classes. Then load and run generated classes
 as they have been written manually.

 So I ask:
 1) is is possible or is Jasper tightly coupled with HTTP and Servlet
 API?
 2) if it is possible, how to do that? (which classes can be re-used,
 which interfaces and classes have to be re-implemented
 3) how much time it can take (1 day, 3 days, a week, two weeks, ...)

 Thanks for any comments and suggestions.

 Jaroslav Gergic

 =
 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/






IIS Configuration

2000-11-13 Thread Eric Min

Hi,
   I followed the tomcat-IIS how-to to configes tomcat with IIS. It works
fine with http://localhost:8080; http://127.0.0.1 and
http://www.test.com/examples/, but if I changed the url to my project with
http header, for example, http://www.test.com,
it does not work. It asks me for username, password and domain name. How can
I solve the problem?

   Thanks,

   Eric Min

   digitlaemissary.com




Re: downloading Word doc

2000-11-13 Thread Juan Ramirez

Just a guess, but try setting the content type to application/msword
instead of application/x-www-form-urlencoded.

Juan

CPC Livelink Admin wrote:
 
 Is it just word, or excel, powerpoint, etc too?  Could this be the Frontpage
 extentions/Office SP1a bug rearing it's ugly head?  This bug causes issues
 when Word tries to download the file, but it doesn't share the same browser
 cookies/sessions and so it gets sent to a login page or something else
 instead of the file it wants.
 
 -Original Message-
 From: Laurens Pit [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 13, 2000 02:41 PM
 To: [EMAIL PROTECTED]
 Subject: downloading Word doc
 
 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



IIS how to

2000-11-13 Thread Eric Min

Hi,
   After configed with IIS 4.0, the url www.test.com/examples and
www.test.com:8080/myproject work well, but www.test.com/myproject does not
work. I con not change the port number to 80 because it is used by IIS.
Waiting for your reply.

   Thanks,

   Eric Min

   DigitlaEmissary.com




Re: 3.2b7 Fails to Compile on WinNT4.0

2000-11-13 Thread Pierre Delisle

Looks like it is not picking up the proper servlet.jar.

If I compile with the 2.3 servlet.jar, I get the same compilation
errors as you do...

-- Pierre



[EMAIL PROTECTED] wrote:
 
 Hello,
 
 I am trying to build 3.2b7 for Windows.
 
 Using
 WindowsNT 4.0 SP5
 suns jdk1.3,
 jaxp v.1.01
 servlet.jar 2.2
 
 here is the output of the compile:
 
 
 Searching for build.xml ...
 Buildfile: D:\Tomcat\jakarta-tomcat-3.2-b7-src\build.xml
 
 prepare:
 [mkdir] Created dir: D:\Tomcat\build\tomcat
 [mkdir] Created dir: D:\Tomcat\build\tomcat\bin
 [mkdir] Created dir: D:\Tomcat\build\tomcat\classes
 [mkdir] Created dir: D:\Tomcat\build\tomcat\conf
 [mkdir] Created dir: D:\Tomcat\build\tomcat\doc
 [mkdir] Created dir: D:\Tomcat\build\tomcat\lib
 [mkdir] Created dir: D:\Tomcat\build\tomcat\lib\test
 [mkdir] Created dir: D:\Tomcat\build\tomcat\lib\test\Golden
 [mkdir] Created dir: D:\Tomcat\build\tomcat\logs
 [mkdir] Created dir: D:\Tomcat\build\tomcat\src
 [mkdir] Created dir: D:\Tomcat\build\tomcat\webapps
  [copy] Copying 14 files to D:\Tomcat\build\tomcat\bin
  [copy] Copying 16 files to D:\Tomcat\build\tomcat\conf
  [copy] Copying 1 files to D:\Tomcat\build\tomcat\conf
  [copy] Copying 36 files to D:\Tomcat\build\tomcat\doc
  [copy] Copying 1 files to D:\Tomcat\build\tomcat
  [copy] Copying 1 files to D:\Tomcat\build\tomcat\lib
  [copy] Copying 36 files to D:\Tomcat\build\tomcat\lib\test\Golden
 
 tomcat:
 [javac] Compiling 216 source files to D:\Tomcat\build\tomcat\classes
 [javac]
 
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\jasper\runtime\JspFactoryImpl.java:93:
 
 class org.apache.jasper.runtime.PageContextImpl is an abstract class. It
 can't be instantiated.
 [javac] if( pc == null ) pc= new PageContextImpl(this);
 [javac]  ^
 [javac]
 
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\jasper\runtime\JspFactoryImpl.java:95:
 
 class org.apache.jasper.runtime.PageContextImpl is an abstract class. It
 can't be instantiated.
 [javac] pc =  new PageContextImpl(this);
 [javac]   ^
 [javac]
 
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\jasper\runtime\PageContextImpl.java:101:
 
 class org.apache.jasper.runtime.PageContextImpl must be declared abstract.
 It does not define void handlePageException(java.lang.Throwable) from class
 javax.servlet.jsp.PageContext.
 [javac] public class PageContextImpl extends PageContext {
 [javac]  ^
 [javac]
 
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpServletRequestFacade.java:83:
 
 class org.apache.tomcat.facade.HttpServletRequestFacade must be declared
 abstract. It does not define java.util.Map getParameterMap() from interface
 javax.servlet.ServletRequest.
 [javac] final class HttpServletRequestFacade implements
 HttpServletRequest {
 [javac] ^
 [javac]
 
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpServletRequestFacade.java:83:
 
 class org.apache.tomcat.facade.HttpServletRequestFacade must be declared
 abstract. It does not define java.lang.StringBuffer getRequestURL() from
 interface javax.servlet.http.HttpServletRequest.
 [javac] final class HttpServletRequestFacade implements
 HttpServletRequest {
 [javac] ^
 [javac]
 
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpServletRequestFacade.java:83:
 
 class org.apache.tomcat.facade.HttpServletRequestFacade must be declared
 abstract. It does not define void setCharacterEncoding(java.lang.String)
 from interface javax.servlet.ServletRequest.
 [javac] final class HttpServletRequestFacade implements
 HttpServletRequest {
 [javac] ^
 [javac]
 
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpServletResponseFacade.java:84:
 
 class org.apache.tomcat.facade.HttpServletResponseFacade must be declared
 abstract. It does not define void resetBuffer() from interface
 javax.servlet.ServletResponse.
 [javac] final class HttpServletResponseFacade  implements
 HttpServletResponse
 [javac] ^
 [javac]
 
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\ServletContextFacade.java:82:
 
 class org.apache.tomcat.facade.ServletContextFacade must be declared
 abstract. It does not define java.util.Set getResourcePaths() from
 interface javax.servlet.ServletContext.
 [javac] final class ServletContextFacade implements ServletContext {
 [javac] ^
 [javac]
 
D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\ServletContextFacade.java:82:
 
 class org.apache.tomcat.facade.ServletContextFacade must be declared
 abstract. It does not define java.lang.String getServletContextName() from
 interface javax.servlet.ServletContext.
 

RE: 3.2b7 Fails to Compile on WinNT4.0

2000-11-13 Thread Marc Saegesser

I had the same problem until I realiazed that I didn't have the tomcat_32
branch of jakarta-servletapi.

cvs co -r tomcat_32 jakarta-servletapi



-Original Message-
From: Pierre Delisle [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 3:28 PM
To: [EMAIL PROTECTED]
Subject: Re: 3.2b7 Fails to Compile on WinNT4.0


Looks like it is not picking up the proper servlet.jar.

If I compile with the 2.3 servlet.jar, I get the same compilation
errors as you do...

-- Pierre



[EMAIL PROTECTED] wrote:

 Hello,

 I am trying to build 3.2b7 for Windows.

 Using
 WindowsNT 4.0 SP5
 suns jdk1.3,
 jaxp v.1.01
 servlet.jar 2.2

 here is the output of the compile:
 

 Searching for build.xml ...
 Buildfile: D:\Tomcat\jakarta-tomcat-3.2-b7-src\build.xml

 prepare:
 [mkdir] Created dir: D:\Tomcat\build\tomcat
 [mkdir] Created dir: D:\Tomcat\build\tomcat\bin
 [mkdir] Created dir: D:\Tomcat\build\tomcat\classes
 [mkdir] Created dir: D:\Tomcat\build\tomcat\conf
 [mkdir] Created dir: D:\Tomcat\build\tomcat\doc
 [mkdir] Created dir: D:\Tomcat\build\tomcat\lib
 [mkdir] Created dir: D:\Tomcat\build\tomcat\lib\test
 [mkdir] Created dir: D:\Tomcat\build\tomcat\lib\test\Golden
 [mkdir] Created dir: D:\Tomcat\build\tomcat\logs
 [mkdir] Created dir: D:\Tomcat\build\tomcat\src
 [mkdir] Created dir: D:\Tomcat\build\tomcat\webapps
  [copy] Copying 14 files to D:\Tomcat\build\tomcat\bin
  [copy] Copying 16 files to D:\Tomcat\build\tomcat\conf
  [copy] Copying 1 files to D:\Tomcat\build\tomcat\conf
  [copy] Copying 36 files to D:\Tomcat\build\tomcat\doc
  [copy] Copying 1 files to D:\Tomcat\build\tomcat
  [copy] Copying 1 files to D:\Tomcat\build\tomcat\lib
  [copy] Copying 36 files to D:\Tomcat\build\tomcat\lib\test\Golden

 tomcat:
 [javac] Compiling 216 source files to D:\Tomcat\build\tomcat\classes
 [javac]

D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\jasper\runtime\JspF
actoryImpl.java:93:

 class org.apache.jasper.runtime.PageContextImpl is an abstract class. It
 can't be instantiated.
 [javac] if( pc == null ) pc= new PageContextImpl(this);
 [javac]  ^
 [javac]

D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\jasper\runtime\JspF
actoryImpl.java:95:

 class org.apache.jasper.runtime.PageContextImpl is an abstract class. It
 can't be instantiated.
 [javac] pc =  new PageContextImpl(this);
 [javac]   ^
 [javac]

D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\jasper\runtime\Page
ContextImpl.java:101:

 class org.apache.jasper.runtime.PageContextImpl must be declared abstract.
 It does not define void handlePageException(java.lang.Throwable) from
class
 javax.servlet.jsp.PageContext.
 [javac] public class PageContextImpl extends PageContext {
 [javac]  ^
 [javac]

D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpS
ervletRequestFacade.java:83:

 class org.apache.tomcat.facade.HttpServletRequestFacade must be declared
 abstract. It does not define java.util.Map getParameterMap() from
interface
 javax.servlet.ServletRequest.
 [javac] final class HttpServletRequestFacade implements
 HttpServletRequest {
 [javac] ^
 [javac]

D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpS
ervletRequestFacade.java:83:

 class org.apache.tomcat.facade.HttpServletRequestFacade must be declared
 abstract. It does not define java.lang.StringBuffer getRequestURL() from
 interface javax.servlet.http.HttpServletRequest.
 [javac] final class HttpServletRequestFacade implements
 HttpServletRequest {
 [javac] ^
 [javac]

D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpS
ervletRequestFacade.java:83:

 class org.apache.tomcat.facade.HttpServletRequestFacade must be declared
 abstract. It does not define void setCharacterEncoding(java.lang.String)
 from interface javax.servlet.ServletRequest.
 [javac] final class HttpServletRequestFacade implements
 HttpServletRequest {
 [javac] ^
 [javac]

D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\HttpS
ervletResponseFacade.java:84:

 class org.apache.tomcat.facade.HttpServletResponseFacade must be declared
 abstract. It does not define void resetBuffer() from interface
 javax.servlet.ServletResponse.
 [javac] final class HttpServletResponseFacade  implements
 HttpServletResponse
 [javac] ^
 [javac]

D:\Tomcat\jakarta-tomcat-3.2-b7-src\src\share\org\apache\tomcat\facade\Servl
etContextFacade.java:82:

 class org.apache.tomcat.facade.ServletContextFacade must be declared
 abstract. It does not define java.util.Set getResourcePaths() from
 interface javax.servlet.ServletContext.
 [javac] final class ServletContextFacade implements ServletContext {
 [javac] 

Re: Why do I have to use 8080 in URL?

2000-11-13 Thread Michael J. Suzio

Mark Franz wrote:
 on my dev machine running Workstation 4.0 and the option 
 pack PWS I have to use
 http://machinename:8080/dir/file.jsp
 I have gone through all the properties I can think of but 
 nothing works to alieviate this requirement to use 
 8080 in the URL.

Your PWS option pack probably installed a Web server on port 80, so
Tomcat can't use that port.  Thus, it has to use some other port,
8080 is the suggested default.  When you try to use port 80,
what happens?

-- 
Michael J. Suzio
Lead Software Engineer -- ISS Southfield
[EMAIL PROTECTED]



RE: Why do I have to use 8080 in URL?

2000-11-13 Thread Mark Franz

Not Found (404)
Original request: /jakarta/isapi_redirect.dll

Not found request: /jakarta/isapi_redirect.dll 

Mark G. Franz


-Original Message-
From: Michael J. Suzio [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 2:21 PM
To: [EMAIL PROTECTED]
Subject: Re: Why do I have to use 8080 in URL?


Mark Franz wrote:
 on my dev machine running Workstation 4.0 and the option 
 pack PWS I have to use
 http://machinename:8080/dir/file.jsp
 I have gone through all the properties I can think of but 
 nothing works to alieviate this requirement to use 
 8080 in the URL.

Your PWS option pack probably installed a Web server on port 80, so
Tomcat can't use that port.  Thus, it has to use some other port,
8080 is the suggested default.  When you try to use port 80,
what happens?

-- 
Michael J. Suzio
Lead Software Engineer -- ISS Southfield
[EMAIL PROTECTED]



Re: mod_jk does not compile (3.2b7)

2000-11-13 Thread Igor Stelmashenko

I'm having the same problem on solaris(apache_1.3.14, gcc version 2.95.2 19991024 
(release)) 
Any tips or pointers are greatly appreciated! I've tried everything mentioned on
http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html
I have also collected kernel trace - apxs tries execute "-o" ?! If I
run manually (gcc -shared -o mod_jk.so *.o) afterwards - I get 10 pages worth 
of "undefined" stuff.


apxs -o mod_jk.so -DSOLARIS -I../jk -I/opt/java/include -I/opt/java/include/solaris -c 
*.c ../jk/*.c

 good messages 
and then: 

 ---try execute   -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o 
jk_pool.o jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o jk_jni_worker.o 
jk_connect.o jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o mod_jk.o  
Can't exec "-o": No such file or directory at /usr/local/apache/bin/apxs line 246.
apxs:Break: Command failed with rc=255
[root@aurora apache1.3]# 

[root@aurora apache1.3]# uname -a[root@aurora apache1.3]# gcc -shared -o mod_jk.so *.o
Text relocation remains referenced
against symbol  offset  in file
unknown   0x85c   jk_ajp12_worker.o
unknown   0x858   jk_ajp12_worker.o
unknown   0x828   jk_ajp12_worker.o
unknown   0x84c   jk_ajp12_worker.o


SunOS aurora 5.7 Generic_106541-11 sun4u sparc SUNW,Ultra-80

carnell wrote:
 
 cd /opt/tomcat/jakarta-tomcat/src/native/apache1.3
 
 /opt/apache/bin/apxs -o
 mod_jk.so -DSOLARIS -I../jk -I/usr/java/include -I/usr/java/include/solaris
 -lposix4 -c *.c ../jk/*.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c mod_jk.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_ajp12_worker.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_ajp13.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_ajp13_worker.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_connect.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_jni_worker.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_lb_worker.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_map.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_msg_buff.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_nwmain.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_pool.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_sockbuf.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_uri_worker_map.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_util.c
 gcc -DSOLARIS2=260 -DUSE_EXPAT -I../lib/expat-lite -fPIC -DSHARED_MODULE -I/
 opt/apache_1.3.12/include -I../jk -I/usr/java/include -I/usr/java/include/so
 laris -DSOLARIS  -c ../jk/jk_worker.c
 ld -G -o mod_jk.so jk_worker.o jk_util.o jk_uri_worker_map.o jk_sockbuf.o
 jk_pool.o jk_nwmain.o jk_msg_buff.o jk_map.o jk_lb_worker.o jk_jni_worker.o
 jk_connect.o jk_ajp13_worker.o jk_ajp13.o jk_ajp12_worker.o
 mod_jk.o -lposix4
 apxs:Break: Command failed with rc=16711680
 
 And it worked under 3.2 b6 :( Any ideas?
 
 Craig.



jk_nt_service

2000-11-13 Thread Hernandez, Rey

Is jk_nt_service only available for the Tomcat beta builds?



Re: Contexts and dispatchers

2000-11-13 Thread Wyn Easton

Hi Richard,

Sorry for the misunderstanding.  I think I finally see what you are
trying to do.

Suppose you have two web apps app1 and app2.
You are in a servlet in app1 and you want a RequestDispatcher
for a JSP (say my.jsp) in app2.  You would:

RequestDispatcher rd;
String uri = "/app2/my.jsp";
ServletContext ctxt =getServletContext().getContext(uri);
rd=ctxt.getRequestDispatcher("/app2.jsp");
if (rd != null)
 rd.include(request,response);

"ctxt" is the Servlet Context of app2, so you don't need
to strip or add anything.

Are we getting any closer?








--- Richard Evans [EMAIL PROTECTED] wrote:
   
   There are two getRequestDispatcher() methods.
   One in the ServletContext that uses absolute paths (start with /).
   One in the request that uses relative paths.
   Looks like you need the absolute path one.
 
 No. My understanding is that the one in ServletContext takes paths
 relative to
 the context root.  _Not_ absolute paths.
 
 To recap ..
 
 I have a URI which I need to forward to the correct ServletContext. 
 I can
 do something like:
 
 ServletContext other = getServletContext().getContext(uri);
 
 This works because getContext() takes absolute paths.
 
 But then how to I call getRequestDispatcher or getRealPath on that
 other
 context? To get the correct result I need to strip off the other
 contexts root
 from the URI before callign getRequestDispatcher or getRealPath.  But
 I can't
 find any way of determining what the root of the other context is.  
 It could
 just be the default "/" context or it could be a context which
 handles the URL
 explicitly.
 
 Help, anyone?
 
 Richard
 
   
   --- Richard Evans [EMAIL PROTECTED] wrote:
But I need the context path for a different ServletContext.
request.getContextPath returns the path for _this_ context, not
 a
foreign
one.

 -Original Message-
 From: Wyn Easton [mailto:[EMAIL PROTECTED]]
 Sent: 11 November 2000 21:57
 To: [EMAIL PROTECTED]
 Subject: Re: Contexts and dispatchers


 --- Richard Evans [EMAIL PROTECTED] wrote:
  "/file/x/y".  (The URL without the context root).  How to I
 find
the
  context

 Use request.getContextPath()

 If your web app. is called app1 getContextPath() would return
 /app1




 =
 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/



RE: jk_nt_service

2000-11-13 Thread Mark Franz

I run it with 3.1

Mark G. Franz


-Original Message-
From: Hernandez, Rey [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 2:48 PM
To: '[EMAIL PROTECTED]'
Subject: jk_nt_service


Is jk_nt_service only available for the Tomcat beta builds?



j_security_check preprocessing

2000-11-13 Thread Barry Dunne

I need to store the username/password entered by the user in order to use 
them later to connect to an external system, so I tried changing login.jsp 
to post to a jsp file rather than j_security_check.

The jsp then stores the username/password and tries to call j_security_check 
as follows:

%! String userName, password; %

%
  userName = request.getParameter("j_username");
  password = request.getParameter("j_password");
%

%-- store login information in javax.servlet.http.HttpSession --%
%
  session.setAttribute("login_username", userName);
  session.setAttribute("login_password", password);
%

%-- execute security check --%
jsp:forward page="j_security_check"
  jsp:param name="j_username" value="%= userName %"/
  jsp:param name="j_password" value="%= password %"/
/jsp:forward


However, this gives the exception below (in tomcat 4m4) and creates an empty 
file called j_security_check in the login directory.

If I change the jsp:forward to another jsp it works and the jsp gets all the 
parameters/attributes and header info.

Is this a bug or is there any other way to call j_security_check manually?

Or at least replicate the work of authenticating the username/password and 
storing that as the principal.

Thanks,
Barry.


A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Servlet.service() for servlet default threw 
exception
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:537)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at 
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:431)
at 
login._0002flogin_0002fsecurity_0005fcheck_0002ejspsecurity_0005fcheck_jsp_32._jspService(_0002flogin_0002fsecurity_0005fcheck_0002ejspsecurity_0005fcheck_jsp_32.java:102)
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:181)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:317)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:396)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:180)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:165)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:443)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:242)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:1876)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:343)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:785)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:902)
at java.lang.Thread.run(Thread.java:484)

Root Cause:
java.lang.NullPointerException
at 
org.apache.catalina.resources.FileResources.setResource(FileResources.java:586)
at 
org.apache.catalina.servlets.DefaultServlet.doPut(DefaultServlet.java:401)
at 
org.apache.catalina.servlets.DefaultServlet.doPost(DefaultServlet.java:365)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:517)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at 
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:431)
at 
login._0002flogin_0002fsecurity_0005fcheck_0002ejspsecurity_0005fcheck_jsp_32._jspService(_0002flogin_0002fsecurity_0005fcheck_0002ejspsecurity_0005fcheck_jsp_32.java:102)
at 

Re: Setting JAVA_HOME path on Linux 7.0

2000-11-13 Thread Gregory Guthrie

At 03:11 PM 11/10/2000 -0500, you wrote:

I'm using tomcat 3.2 and jdk1.3 and it works fine on debian.  Haven't
tryed tomcat 3.1 with jdk1.3

-- I've had many problems trying to get this to work,
I started with the Debian tomcat, and have posted a few notes to this 
group, but not gotten much help.

I'd really love it if you could tell me the steps to a working tomcat + 
Apache install on Debian!

Thanks,

Gregory


Gregory Guthrie
[EMAIL PROTECTED] (641)472-1125Fax: -1103





New user question...

2000-11-13 Thread Reynshteyn, Leonid

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




RE: auto-loading

2000-11-13 Thread Kitching Simon



 -Original Message-
 From: ' [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, November 13, 2000 7:37 PM
 To:   [EMAIL PROTECTED]
 Subject:  auto-loading
 
 Hi,
 How do I stop tomcat from automatically loading applications in /webapps?
 do I uncomment the ...context.AutoSetup  ContextInterceptor in server.xml?
[Kitching Simon]  
I presume you mean *comment out* the AutoSetup.
This is exactly what needs to be done.

 Will this effect anything else?
 
 thanks!
[Kitching Simon]  
Cheers,

Simon



Re: auto-loading

2000-11-13 Thread Jim Richards


Uncomment, no ... comment out the interceptor for
AutoSetup and this will stop it loading everything 
in $TOMCAT_HOME/webapps

Ypu'll then need to create a context for anything
you want loaded from there (admin/examples/test)

' wrote:
 
 Hi,
 How do I stop tomcat from automatically loading applications in /webapps?
 do I uncomment the ...context.AutoSetup  ContextInterceptor in server.xml?
 
 Will this effect anything else?
 
 thanks!



Re: New user question...

2000-11-13 Thread Pierre Delisle

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



adding sessionId to apache logs

2000-11-13 Thread kenneth topp



Well, I did it, and it was too easy.

Adding a line in SessionInterceptor.beforeBody():

response.addHeader("jsessid", (reqSessionId!=null) ? reqSessionId
 : rrequest.getRequestedSessionId() );


And in httpd.conf:

LogFormat "%h %l %{jsessid}o %t \"%r\" %s %b" toppkcommon


Wow... too simple... now I need the program to interprete the info ;)

Thanks tomcat crew, thanks apache crew,

Kenneth




I want to unsubscribe from this list

2000-11-13 Thread truename

Hi Tomcat,
   I have tried 3 times to sign out the mail list. Who can help me?

Best Regards,
Leslie



¸Ï¿ì×¢²áÍøÒ×È«ÐÂ163.comÃâ·ÑÐÅÏä
http://images.163.com/images/163com/
WAPÊÖ»ú--ÖÁ¿á´ó½±µÈ×ÅÄ㣡



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

2000-11-13 Thread kramer

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






problem in running servlet

2000-11-13 Thread Rasika Joshi

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
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.




difficulty in running servlets

2000-11-13 Thread Rasika



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 
/servletwhere "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: difficulty in running servlets

2000-11-13 Thread Jovie



 try adding 
this
 
servlet-mapping 
servlet-namehi/servlet-name 
url-pattern/hi/url-pattern 
/servlet-mapping

 to your 
web.xml

  -Original Message-From: Rasika 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 14, 2000 5:06 
  PMTo: [EMAIL PROTECTED]Subject: difficulty 
  in running servlets
  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 
  /servletwhere "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


servlets problem is still there

2000-11-13 Thread Rasika




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


Problems getting generated images through the IIS connector.

2000-11-13 Thread Michel Lehon

Hi,

We are having a wierd problem here... here's the (short) story.

We are generating JPEG Images from one of our servlets (Java2D and the sun
Jpeg codec).

It shows up correctly in IE without problems... but when we try to print the
page (yep, some of our users want to do that), the images do not show.

The wired thing is that it only happens when we access the images through
IIS (using the isapi_redirect filter).
When we access the image through tomcat (port 8080) they show and print
correctly.


I tried to look a little bit further...
In IE when I take the properties of the image (coming trough Tomcat:8080) it
knows the size (in pixels and in bytes) and it shows it mime/type (JPEG).
When I do the same trough IIS it does not know the size (in bytes) nor its
mime type. Even save image does not work as expected (it only saves in BMP).

I almost forgot to mention versions... I does that under Tomcat 3.1 (final)
and the new 3.2b7, I'm going to test with the 4.0M4 very soon.

Does anyone has any idea ???

Thanks a lot.

Michel Lehon.
[EMAIL PROTECTED]
SAS Data Warehousing and Web Enablement.




Re: mod_jk does not compile (3.2b7)

2000-11-13 Thread carnell

For Solaris:

apxs -o
mod_jk.so -DSOLARIS -I../jk -I/usr/java/include -I/usr/java/include/solaris 
-c *.c ../jk/*.c
On some systems, this will build the module correctly, but will fail at
runtime with a "symbol "fdatasync" not found". To fix, add -lposix4 just
before the -c in the above command.

as in the howto mod-jk. I had to add the -lposix4 in the 3.2b6 release.

before the -c as instructed:

"/opt/apache/bin/apxs -o
mod_jk.so -DSOLARIS -I../jk -I/usr/java/include -I/usr/java/include/solaris
-lposix4 -c *.c ../jk/*.c"


- Original Message -
From: "John Tangney" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; "carnell" [EMAIL PROTECTED]
Sent: Monday, November 13, 2000 6:59 PM
Subject: Re: mod_jk does not compile (3.2b7)


 On 11/13/00 2:54 AM, carnell at [EMAIL PROTECTED] wrote:

  apxs:Break: Command failed with rc=16711680
 
  And it worked under 3.2 b6 :( Any ideas?

 Yeah. I worked through a similar one. It's probably something in apxs
 itself. In my case, I needed to modify $CFG_LD_SHLIB inside apxs. Maybe
your
 problem is something similar...?

 Your output line that ends with  -lposix4  looks suspcious. Shouldn't
those
 options go before the list of files?

 Also check that you have specified args to apxs in the correct order. Yes,
 order matters.

 Good luck!
 --johnt






howto: allow access to a context only from a single ip?

2000-11-13 Thread freakazoid

hi,

is it possible to deny all access to a context
of my tomcat server except for clients
with a specific ip adress?

tnx





RE: Problems getting generated images through the IIS connector.

2000-11-13 Thread Etienne Baert

Hi,

I do have have the same problem, I am interested in sharing any solution
you can find.

Etienne

-Original Message-
From: Michel Lehon [mailto:[EMAIL PROTECTED]]
Sent: mardi 14 novembre 2000 8:17
To: [EMAIL PROTECTED]
Subject: Problems getting generated images through the IIS connector.


Hi,

We are having a wierd problem here... here's the (short) story.

We are generating JPEG Images from one of our servlets (Java2D and the sun
Jpeg codec).

It shows up correctly in IE without problems... but when we try to print the
page (yep, some of our users want to do that), the images do not show.

The wired thing is that it only happens when we access the images through
IIS (using the isapi_redirect filter).
When we access the image through tomcat (port 8080) they show and print
correctly.


I tried to look a little bit further...
In IE when I take the properties of the image (coming trough Tomcat:8080) it
knows the size (in pixels and in bytes) and it shows it mime/type (JPEG).
When I do the same trough IIS it does not know the size (in bytes) nor its
mime type. Even save image does not work as expected (it only saves in BMP).

I almost forgot to mention versions... I does that under Tomcat 3.1 (final)
and the new 3.2b7, I'm going to test with the 4.0M4 very soon.

Does anyone has any idea ???

Thanks a lot.

Michel Lehon.
[EMAIL PROTECTED]
SAS Data Warehousing and Web Enablement.




Re: user authentication

2000-11-13 Thread Daniel Bruce Lynes

On Mon, 13 Nov 2000, Michelle wrote:

 I've been delving through the Tomcat archives and various guru site
 out there, trying to piece together a sound approach to handling
 user authentication and rights access.  I've seen some threads and
 articles on using sessions, some references in the Tomcat archives
 to JDBCRealm (which I cannot find anything more on), hooking into
 databases .. etc.  I find I am a bit miffed and coming here looking
 for some suggestions.
 
 My site 
  will have static and dynamic pages
  will contain both protected and unprotected areas
  in the protected areas, will require logins
  each user will be assigned a role for the protected area
 which grants access rights such as read, write, admin
 - yes, an ACL model

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.

 
 Any thoughts on the best approach?
 
  Should I use JDBCRealm (an can someone send me the link
to docs please?)
  Should I use the session object to hold a URL to role access
 hash once a user logs?
  Should I spin my own (YIKES!)?

That's what we chose to do.  However, we have very specific needs for our
project.  Perhaps you do not, for yours.  Perhaps you just want a UNIX-style ACL
system.  If that is the case, and you're not overly concerned about passwords
flying over the network, you might consider Apache access control files (if
you're using Apache), or whatever the similar item is for IIS.)

Daniel Lynes
eService System Corp.




SSL support

2000-11-13 Thread Christian Pich

I am wondering if there is any SSL support in Tomcat 3.1.
If yes how do I do it?

Christian