servlet-api

2000-11-30 Thread Carlos

i have download the tomcat 3.2 final and servlet-apic3.2
what i must to make wiht the servlet api file?
thanks
carlos




Re: WAP Configuration

2000-11-30 Thread Jon Skeet

> Second, the content type that is created by a JSP page is controlled by what your
> page declares in the "page" directive, not by Tomcat.  If you wish to have the
> output treated as XML, for example, you would include a directive like this at
> the top of your pages:
> 
> <%@ page contentType="text/xml" %>
> 
> You will need to review the documentation of the WAP Toolkit you are using to
> determine what content type it is expecting, but the choice of content type is up
> to the page author, not the servlet container.

Just to save the original poster the trouble of looking it up, the content
type you want is:

text/vnd.wap.wml

Jon




How to config tomcat4.0 to make my servlets work?

2000-11-30 Thread KINGMAN

I make a directory in WEBAPPS.I make directory "jsp","servlets" in the directory and 
make directory classses in web-inf. I put my servlets class file in directory 
"servlets" ,When I call it in jsp file,it doesn't work.How can I do?
My beans in directory "classes" can't be found too.

thanks.

   
kingman 



Question about Tomcat4.0 work with Apache

2000-11-30 Thread KINGMAN

Tomcat4.0 have no config file tomcat-apache.conf in directory /TOMCAT_HOME/conf;
Tomcat is diffcult.If I make tomcat plug-in  Apche.Then I need not config tomcat?



problems whit Contextadministration

2000-11-30 Thread Persegato Marco

I have a problem whit administration in tomcat3.2 final.
The message is :

Illegal access to internal attribute 
2000-11-30 09:34:04 - Ctx( /admin ): 500 R( /admin + /contextAdmin/contextAdmin.jsp + 
null) 
You must mark the administration application as trusted

help me!





RE: apache virtual directories

2000-11-30 Thread Saurabh Shukla

Kindly read the documentation.

shuklix


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 30, 2000 1:35 AM
To: [EMAIL PROTECTED]
Subject: apache virtual directories



How do I set up virtual directories in Apache?
I used the Alias directive like:

 Alias /temp c:/sampledir/dir2/dir3

This did not work?
Should this work if I add it to the httpd.conf file?

corey.





RE: Java don't stop when I shutdown.

2000-11-30 Thread Saurabh Shukla


kill all java will kill all other java processes too.
You can use this.

kill -9 `ps -C java u --cols=500 | grep tomcat | awk '{print $2}'`

Shuklix


On Wed, Nov 29, 2000 at 09:51:32PM +0200, Jaco van Staden wrote:
>
> Hi
>
> When I excecute ../bin/shutdown.sh all the Java Threads stay alive. When I
> start again new Threads are started. And so on..
>
> What could cause this?
>
> I am using Tomcat 3.1 on RH7 with SUN JDK1.2.2 -native threads.

If anyone is following this, I also have experienced this problem with
no
obvious solution in sight.

I am running IBM's JDK 1.3 for Linux and have seen this problem since
tomcat32b7 -> Catalina 4.0M5.  The magic 'killall java' seems to be the only
fix, as after the first shutdown.sh the Ajp12ConnectionHandler stops
listening
to shutdown requests.

  Just my USD$0.02.
  -- /v\atthew
--
Matthew L Daniel   Rich bachelors should be heavily taxed.
Internet Director  It is not fair that some men should be
SterlingPlanet, Inc.   happier than others.
[EMAIL PROTECTED]-- Oscar Wilde




Re: Access Log for Tomcat in standAlone mode or Running Apache with Tomcat.

2000-11-30 Thread Moursli Nabil

I Already did that after reading the doc first time!
It just doesn't work. Tomcat is running on Mandrake 7.1,
everythings is well setup, but I receive apj12 error and mod_jk
problem... I did compile the source on the same OS version, but it didn't
change nothing realy!

It seems to be apache that doesn't recognize Tomcat!

Nabil.



> you will have to include the config file ( tomcat-apache) of tomcat in
httpd of
> apache
> then start tomcat and
> start apache
>
> Moursli Nabil wrote:
>
> > Can anyone help me with this, I can't run TOMCAT with Apache, so the
only
> > issu I see
> > is to run Tomcat in standAlone mode. If anyone know how to manage Acces
Log
> > on Tomcat.
> > That would be great. Or if you know how to make Apache Run with Tomcat
let
> > me know.
> >
> > Thx in advance.
> >
> > Nabil.
> > CMG-Admiral.
> >
> > - Original Message -
> > From: Russell Freeman <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 29, 2000 3:09 PM
> > Subject: "root-relative" URLs don't work(Tomcat 3.1)
> >
> > > Whenever I have a web page that references a "root-relative" resource,
> > e.g.
> > > "/style.css", tomcat can't see to resolve it properly. It seems to be
> > > ignoring the web site root as specified in server.xml. Obviously if
the
> > > resource lives in the same location as the current page I can drop the
> > > leading forward-slash. However this won't work for resources in
different
> > > locations.
> > >
> > > I've tried turning on debug for the webapp but I'm not seeing
anything.
> > >
> > > Any help appreciated
> > >
> > > Russ
>




Re: Access Log for Tomcat in standAlone mode or Running Apache with Tomcat.

2000-11-30 Thread Moursli Nabil

In fact I get an segmentation faulft on any call to Tomcat from Apache.
I have apache 1.3.12 and Tomcat 3.1.





- Original Message -
From: Krishna Kant <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 30, 2000 8:58 AM
Subject: Re: Access Log for Tomcat in standAlone mode or Running Apache with
Tomcat.


> you will have to include the config file ( tomcat-apache) of tomcat in
httpd of
> apache
> then start tomcat and
> start apache
>
> Moursli Nabil wrote:
>
> > Can anyone help me with this, I can't run TOMCAT with Apache, so the
only
> > issu I see
> > is to run Tomcat in standAlone mode. If anyone know how to manage Acces
Log
> > on Tomcat.
> > That would be great. Or if you know how to make Apache Run with Tomcat
let
> > me know.
> >
> > Thx in advance.
> >
> > Nabil.
> > CMG-Admiral.
> >
> > - Original Message -
> > From: Russell Freeman <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 29, 2000 3:09 PM
> > Subject: "root-relative" URLs don't work(Tomcat 3.1)
> >
> > > Whenever I have a web page that references a "root-relative" resource,
> > e.g.
> > > "/style.css", tomcat can't see to resolve it properly. It seems to be
> > > ignoring the web site root as specified in server.xml. Obviously if
the
> > > resource lives in the same location as the current page I can drop the
> > > leading forward-slash. However this won't work for resources in
different
> > > locations.
> > >
> > > I've tried turning on debug for the webapp but I'm not seeing
anything.
> > >
> > > Any help appreciated
> > >
> > > Russ
>




tomcat admin context

2000-11-30 Thread Carlos

if i run the admin it asks me a password
in the server.xml file i am see the admin context but there is not writte
the ppassword.
Hoiw can i put a default password and login?
thanks
Carlos




RE: Directory problem

2000-11-30 Thread Saurabh Shukla


You have add a few things in your server.xml like specifying the Doc base
for a context.
Have you done that ?

Shuklix


-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 30, 2000 5:54 AM
To: [EMAIL PROTECTED]
Subject: Directory problem


Hello:

I am trying to use tomcat with apache and am having a
problem with my virtual host directory.

In my httpd.conf file, I added index.jsp to my listing
of index files:
DirectoryIndex index.jsp index.php index.html index.htm index.shtml
index.cgi

I also have the following virtual host defined:

  DocumentRoot /home/httpd/videosearch


  Options Indexes FollowSymLinks
  AllowOverride None

  Order allow,deny
  Allow from all




And I used this line to include my jakarta config file:
include /usr/local/jakarta-tomcat/conf/tomcat.conf

My tomcat.conf file is:
LoadModule jserv_module /etc/httpd/modules/mod_jserv.so


# Do not edit!
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel notice

ApJServDefaultPort 8007

AddType text/jsp .jsp
AddHandler jserv-servlet .jsp

ApJServMount /examples /root



I want files with a .jsp extension to be processed by tomcat
and other files handled via Apache.

According to the virtual host directive, when I visit
http://216.65.31.3
I should get the files from /home/httpd/videosearch directory.
But, when I do so, I get the file:
/usr/local/jakarta-tomcat/webapps/ROOT/index.html\
which is not what I wanted.

Also, when I try to load the URL:
http://216.65.31.3/index.jsp
I get a 404 not found error.

This file I wanted to load was:
/home/httpd/videosearch/index.jsp
Which I know is there.

Also, If I try to load this URL
http://216.65.31.3/test.html
It loads the file /home/httpd/videosearch/test.html
which is what I wanted.

Any ideas?

Thanks,
Neil.

--
Neil Aggarwal
JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development -- Java, JSP, servlets, databases




Re: JspC HOW-TO? (Was precompilations)

2000-11-30 Thread Ramesh Kumar . T


 
Aleksey Tsalolikhin wrote:
On Wed, Nov 29, 2000 at 01:29:58PM -0600, Mike La
Budde wrote:
> OK, I'm stumped! How do I use JspC to precompile a specific (or all
of the)
> .jsp file(s)?
>
> I've tried the following:
>
> jspc -uriroot c:\sfwr\tomcat\webapps\examples
> -webapp  c:\sfwr\tomcat\webapps\examples
> c:\sfwr\tomcat\webapps\examples\jsp\num\numguess.jsp
>
> and various other tries w/out success
>
> TIA,
>
> Mike
Dear Mike,
    It might help if you post
what kind of error you are getting,
or what happens when you try.
For me,
tomcat.sh jspc -v -d /usr/local/tomcat/work/localhost_8080%2Fcontextname
-webapp /usr/local/tomcat/webapps/myapp
works, it converts my *.jsp files to *.java files (which I
understand now contain the servlet source code).
    What I'm looking for is a
tool to convert the servlet
source code to servlet classes, using the unique-class-name generation
algorithm described in
http://archives2.real-time.com/pipermail/tomcat-users/2000-August/008481.html
so Tomcat doesn't have to do this work itself when it starts.
 
You do not have to search for any tool.
you can compile the java files using "javac"
and give a mapping in the web.xml for each contexts
ex:
say the file name is test.jsp then an entry like this in web.xml

   
   
jsp.test
   
jsp.test
    
 
   
/jsp/test
   
jsp.test
    

This is automatically done if you use -webinf -webxml options in Jspc.sh/bat
files
so all you hae to do is just  run jspc.sh/bat with the -webinf
-webxml options
 
 
 
    Is there such a tool? 
Or has anybody else run into Tomcat going into
500 server errors while trying to compile JSP pages under heavy load,

 
and if so, how did you deal with it, please?
Yours Sincerely,
Aleksey Tsalolikhin

 


Re: How to config tomcat4.0 to make my servlets work?

2000-11-30 Thread Moursli Nabil

tomcat
|
webapps
|
|
myWebApp
 |
 | index.html (html code..)
 | media/ (put your image here)
 | JSP/ (put youre Jsp here!)
 |
 | WEB-INF
| lib/ (put youre beans, and included classes here)
| classes/ (put youre SERVLETS classes here in there
original strucutre.)
| web.xml / this is you Servlets configuration file, read
the doc for how to confi it.
|
|
OtherWebApp
 |


Hope this will help!



> I make a directory in WEBAPPS.I make directory "jsp","servlets" in the
directory and make directory classses in web-inf. I put my servlets class
file in directory "servlets" ,When I call it in jsp file,it doesn't work.How
can I do?
> My beans in directory "classes" can't be found too.
>
> thanks.
>
>
kingman
>




How to get webapp context path from javax.servlet API?

2000-11-30 Thread Vijayanand Sukumar


Hi ,
I need to know if there is a way to get the context path from without
creating  a dependency on tomcat. If my web-app context is /foo and I want
to convert a  URL relative to the current context back into an external URL
with the full  syntax.
Thanks
Vijayanand Sukumar
Software Engineer
Manage.com
eManagement for eBusiness
www.manage.com
2345 North First St.,
San Jose, CA 95131
Tel: 408-944-1500 ext. 651
Fax: 408-944-1599
[EMAIL PROTECTED]




CGI-Wrapper for Tomcat?

2000-11-30 Thread Karsten Hahn

Hi all,

I'm wondering if there is a Servlet that wraps (and hide) a old
CGI-scripts.

Thanks a lot,

Karsten



ServerAlias'

2000-11-30 Thread James Maggs

Hi There,

I have set up Apache and Tomcat, working together through mod_jk. I'm using
virtual hosting through the  construct in the server.xml file.
However, the corresponding virtual host in apache has several server
aliases. Is there a way to add these server aliases to the server.xml file?
Currently, my Tomcat installation only serves content when requests come in
using the host specified in the  block whereas requests using
the various server aliases generate a 404 error.

Any ideas? My system: RedHat 6.2, Apache 1.3.12, Tomcat 3.2 Beta 8.

Many thanks,

-James




RE: WML Generation from JSP broken!!!!

2000-11-30 Thread Petr Jiricka

I would say the best and cleanest way would be to have the page start with 

<%@page contentType="text/vnd.wap.wml"%>

I think this should work in Tomcat 4 (if not, I would consider it a bug in
TC4).

Petr


> -Original Message-
> From: Scott Jones [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 29, 2000 5:37 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Alex Tang
> Subject: Re: WML Generation from JSP broken
> 
> 
> Could you not just replace your  with
> <% out.println(""); %> ?
> 
> Seems like that would work to me...
> 
> Cheers,
> 
> -Scott
> 
> - Original Message -
> From: "Alex Tang" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Alex Tang"
> <[EMAIL PROTECTED]>
> Sent: Wednesday, November 29, 2000 5:50 PM
> Subject: Re: WML Generation from JSP broken
> 
> 
> > Is there a way to get the compiler to ignore the " version="1.0"?>"
> syntax?
> >
> > Otherwise this means that serving any page that is XML 
> compliant (WML,
> XHTML, etc) now requires a complete
> > rewrite of all JSP files to run in 4.0.
> >
> > Thanks.
> >
> > ...alex...
> >
> >
> > "Craig R. McClanahan" wrote:
> >
> > > Davanum Srinivas wrote:
> > >
> > > > Hi all,
> > > > Attached is a JSP Sample file which generates WML. It 
> works with no
> problems on Tomcat3.1, but
> > > > fails miserably with the latest dev nightly snapshot and m4. Can
> someone shed light?
> > > >
> > >
> > > Well, your page certainly doesn't work under Tomcat 4.0 (which
> implements JSP 1.2).  Furthermore, it
> > > *should* not.
> > >
> > > Because you are starting this page with an 
> directive, the JSP compiler assumes that
> > > you have created this page in the XML syntax for JSP 
> pages, as described
> in the 1.2 spec
> > > .  
> However, this page
> violates several of the rules:
> > > * It does not start with a  element (this is
> > >   what the parse error is complaining about).
> > > * It uses <% %> for a scriptlet, instead of the
> > >   required  element.
> > >
> > > You will need to rewrite your page conforming to the new 
> syntax rules in
> order for it to work correctly
> > > under 4.0.
> > >
> > > >
> > > > Thanks in advance,
> > > > dims
> > > >
> > > > PS: Am not currently subscribed to the list. So please CC me at
> "[EMAIL PROTECTED]"
> > > >
> > >
> > > Craig McClanahan
> > >
> > > PS:  Why did it work under 3.1?  Because 3.1 didn't 
> support the XML
> syntax, so it just passed the 
> > > directive through as template text.
> >
> >
> 



jtml - howto

2000-11-30 Thread lbihyd

friends,
does tomcat support jhtml files ? if so , how do i run them.
thanks a bunch

mohan



rewrite with apache-tomcat

2000-11-30 Thread hatim

hello all
i m french , so excuse me for my bad english !
i m tying to use the rewrite module to rewrite adresses like
http://mysite.com/toto/~hatim/toto.jsp to
http://mysite.com/toto/jsp/toto.jsp?D121DN=hatim
i m using apache 1.3 and tomcat 3.2b6
i can see in my browser a .jsp from a normal url like
http://mysite.com/toto/jsp/toto.jsp?D121DN=hatim
when i stop tomcat , and i use just apache , the rewrite work very well , i
can see the source code of the jsp in my browser ..

but when i started tomcat and apache ,and after clicking on
http://mysite.com/toto/~hatim/toto.jsp  i find this error in the tomcat logs
:
2000-11-30 12:23:11 - Ctx( /toto ): 404 R( /toto + /~hatim/toto.jsp + null)
JSP file not found

for infomation :

in the httpd.conf  i have
LoadModule jserv_module  libexec/mod_jserv.so
LoadModule rewrite_module modules/mod_rewrite.so
.
AddModule mod_jserv.c
AddModule mod_rewrite.c

include /app/jakarta-tomcat/conf/tomcat-apache.conf


RewriteEngine on
RewriteLogLevel 9
RewriteLog logs/rewrite.log
RewriteRule ^/toto/~([^/]+)/(.*\.jsp)$ /toto/jsp/$2?D121DN=$1 [PT,QSA]


 thank you very much for your help

hatim





Tomcat problem. Help!

2000-11-30 Thread Panagiotis Konstantinidis
Title: Tomcat problem. Help!





  Hello there. First of all forgive me if this is the wrong list. I guess this message could be easily posted on Apache's mailing list as well.

  Now, I am using Apache v1.3.12 and Tomcat v3.1 (for Windows). I have written a simple JSP program to open a connection with a mySQL database on the network. The thing is that everytime the line Class.for("org.gjt.mm.myswl.Driver"); is encountered, Tomcat goes off (and I get the error message "Internal Server Error. The server encountered an internal error or misconfiguration and was unable to complete your request"). It goes off just like that and everytime I have to start it up again manually (and everytime it goes off again). I know that this is the line that causes the problem because I have tried to take it out and everything is working fine. I have checked the database and the drivers and everything is fine. Now my question is: Do I have to configure something on Tomcat that I have not done before? Do I have to configure something on Apache? Has anybody encountered this problem before? What would be possible to cause it? I have to say here as well that I checked the Apache's error.log and I found the error message: "Premature end of script headers: c:\\.jsp. What does this mean?

  Thank you in advance.


   Panos





Re: Tomcat problem. Help!

2000-11-30 Thread Kief Morris

Panagiotis Konstantinidis typed the following on 12:26 30/11/2000 +
>   Now, I am using Apache v1.3.12 and Tomcat v3.1 (for Windows).

The first thing I would recommend is upgrading to Apache 1.3.14 and Tomcat 3.2,
since these are the latest stable versions. Tomcat in particular has fixed 
a lot of
bugs since the version you're using.

>The thing is that everytime the line Class.for("org.gjt.mm.myswl.Driver"); 
>is encountered, Tomcat goes off (and I get the error message "Internal 
>Server Error.

Do you mean Class.forName("org.gjt.mm.myswl.Driver")?

Have you checked your logs? You should get more accurate information about
what's going wrong from the stdout and stderr messages that Tomcat puts out:
these may be going to your console window, or they may be going to log files
in Tomcat's log directory.

Without more specific error information, I would make a guess that it has to
do with the classpath. Your JDBC driver must be in the classpath that the
Tomcat server is using, if not Class.forName() will throw an exception, which
would cause the behavior you're seeing. Try putting the JDBC driver .jar file
in the WEB-INF/lib directory.

Kief



---
   bitBull makes the Internet bite: http://www.bitBull.com/demos/




AW: sun & blackdown jdk1.3.0

2000-11-30 Thread Christoph Leser

I just installed tomcat 3.2.b8 with IBM Java130 on AIX.
Did only little testing, but all works so far ...

I s your problem related to installation or do you get runtime errors ( if 
yes, which ? )

Christoph Leser
S&P Computersysteme GmbH
E-Mail:[EMAIL PROTECTED]
Tel. +49 711 7264112
Fax: +49 711 7289860

-Ursprüngliche Nachricht-
Von:Teófilo Alonso Marbán [SMTP:[EMAIL PROTECTED]]
Gesendet am:Mittwoch, 29. November 2000 15:45
An: listatomcat
Betreff:sun & blackdown jdk1.3.0

Hi all!

I´m trying to test Tomcat running with different jdk's. Everything is OK 
with IBMJava2-SDK-1.3-2.0.i386.rpm (and IBM's former ones and sun 1.2.2prev 
as well).
The problem appears when I try to start Tomcat with sun or even blackdown 
jsdk1.3.0*: some jsdk processes begin to run but Tomcat doesn´t work.

Can't I use 1.3.0 with Tomcat?
Any clue about it?

Thanks in advance.
 << Datei: ATT8.html >>



Tomcat-mysql configuration

2000-11-30 Thread Sameer



Hi everybody,
 
following is the code sample of a jsp file 
working in (Windows NT + SQLServer + Java Web Server) 
environment
 
..
String url = "jdbc:odbc:testdsn";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection(url, 
"", "");
...
 
what changes are necessary in the above code to 
make it work in (Linux + mysql + Tomcat) environment.
Please help,
 
Thanks in anticipation
Sameer
 


RE: Tomcat problem. Help!

2000-11-30 Thread Panagiotis Konstantinidis
Title: RE: Tomcat problem. Help!







> -Original Message-
> From: Kief Morris [mailto:[EMAIL PROTECTED]]
> Sent: 30 November 2000 12:39
> To: [EMAIL PROTECTED]
> Subject: Re: Tomcat problem. Help!
> 
> 
> Panagiotis Konstantinidis typed the following on 12:26 
> 30/11/2000 +
> >   Now, I am using Apache v1.3.12 and Tomcat v3.1 (for Windows).
> 
> The first thing I would recommend is upgrading to Apache 
> 1.3.14 and Tomcat 3.2,
> since these are the latest stable versions. Tomcat in 
> particular has fixed 
> a lot of
> bugs since the version you're using.


I will do so.
 
> >The thing is that everytime the line 
> Class.for("org.gjt.mm.myswl.Driver"); 
> >is encountered, Tomcat goes off (and I get the error message 
> "Internal 
> >Server Error.
> 
> Do you mean Class.forName("org.gjt.mm.myswl.Driver")?


Yes, sorry I meant ClassforName("...");


> Have you checked your logs? You should get more accurate 
> information about
> what's going wrong from the stdout and stderr messages that 
> Tomcat puts out:
> these may be going to your console window, or they may be 
> going to log files
> in Tomcat's log directory.
> 
> Without more specific error information, I would make a guess 
> that it has to
> do with the classpath. Your JDBC driver must be in the 
> classpath that the
> Tomcat server is using, if not Class.forName() will throw an 
> exception, which
> would cause the behavior you're seeing. Try putting the JDBC 
> driver .jar file
> in the WEB-INF/lib directory.
> 
> Kief
> 
> 
> ---
>    bitBull makes the Internet bite: 
http://www.bitBull.com/demos/


  You are right Kief. Thank you for that. I did not include the mysql.jar file in my classpath. I was using Apache and JRun before on Unix and everything was set up, therefore I completely forgot to add the mysql.jar file into my classpath. I assumed that it would already be there.  And the weird thing is that I did not even think that this would be the problem. Thank you one more time for your effort and time.

  Panos





RE: Tomcat problem. Help!

2000-11-30 Thread Saurabh Shukla
Title: Tomcat problem. Help!



Premature end of script header in your case means 
something like when apache passed the request to a program/script, it had 
an abrupt end and apache didn't get the expected/required response for the 
request.
 
In 
your case the problem is with tomcat and not apache. Apache passed that request 
to tomcat and your jsp failed and hence 
you 
got the error premature end of script header.
 
Shuklix
 

  -Original Message-From: Panagiotis Konstantinidis 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, November 30, 2000 5:56 
  PMTo: '[EMAIL PROTECTED]'Subject: Tomcat 
  problem. Help!
    Hello there. First of all 
  forgive me if this is the wrong list. I guess this message could be easily 
  posted on Apache's mailing list as well.
    Now, I am using Apache 
  v1.3.12 and Tomcat v3.1 (for Windows). I have written a simple JSP program to 
  open a connection with a mySQL database on the network. The thing is that 
  everytime the line Class.for("org.gjt.mm.myswl.Driver"); is encountered, 
  Tomcat goes off (and I get the error message "Internal Server Error. The 
  server encountered an internal error or misconfiguration and was unable to 
  complete your request"). It goes off just like that and everytime I have 
  to start it up again manually (and everytime it goes off again). I know that 
  this is the line that causes the problem because I have tried to take it out 
  and everything is working fine. I have checked the database and the drivers 
  and everything is fine. Now my question is: Do I have to configure something 
  on Tomcat that I have not done before? Do I have to configure something on 
  Apache? Has anybody encountered this problem before? What would be possible to 
  cause it? I have to say here as well that I checked the Apache's error.log and 
  I found the error message: "Premature end of script headers: 
  c:\\.jsp. What does this mean?
    Thank you in 
  advance. 
     Panos 



RE: problems whit Contextadministration

2000-11-30 Thread Stubenrauch,Andreas

The answer is:

>You must mark the administration application as trusted

Have a look at your server.xml

> -Original Message-
> From: Persegato Marco [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 30, 2000 9:59 AM
> To: [EMAIL PROTECTED]
> Subject: problems whit Contextadministration
> 
> 
> I have a problem whit administration in tomcat3.2 final.
> The message is :
> 
> Illegal access to internal attribute 
> 2000-11-30 09:34:04 - Ctx( /admin ): 500 R( /admin + 
> /contextAdmin/contextAdmin.jsp + null) 
> You must mark the administration application as trusted
> 
> help me!
> 
> 



RE: send redirect question

2000-11-30 Thread Anand Prasad

Craig,

Is there way using RequestDispatcher or  sendReDirect()   to send a page to
particular frame.

For example.  sendRedirect("index.html" target=_top); 

-_Anand


-Original Message-
From: Rick Bosch [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 3:32 PM
To: [EMAIL PROTECTED]
Subject: Re: send redirect question


if I have a bean that is called from a jsp and has the call

if (!(cookie.tempContains("loggedin"))){
try{
String
param=(request.getParameter("show")!=null)?"?show="+request.getParameter("sh
ow"):"";
response.sendRedirect("index.jsp"+param);
commit=true;
}catch(IOException e){
log.write("Problem launching"+e.getMessage());
}
}else{

and in my jsp 


<%
mybean.init( request,  response);
if(mybean.commit){return;}
%>

 

However we have found that some versions of ie if they mess with the back
button and up with messed up pages (described below).

1) how can i fix it?

2) Then would you say it is not safe to redirect from a bean that you have
pass a refrence to http response?



thanks
-rick

> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Tue, 28 Nov 2000 12:45:46 -0800
> To: [EMAIL PROTECTED]
> Subject: Re: send redirect question
> 
> Rick Bosch wrote:
> 
>> we have several jsp pages that call beans.  Some beans for one reason or
>> another will redirect a user to another page, howver in some cases its
>> possible for a redirect to occur and if the logic of the bean is to
continue
>> writing after a reddirect the client get messed up pages usually the
>> original then some http headers and then the new page.  How is it jsp
pages
>> are somehow "aware" of a redirect but if i call a redirect from a bean it
>> seems to be ignored???
>> 
> 
> Deep down, a JSP page is just a Java class.  And the Java language has no
> concept like the setjmp()/longjmp() combination of C, where you can change
the
> logical flow of control with what amounts to a "go to" statement to a
> completely
> different method in a completely different source file.
> 
> When you call response.sendRedirect() -- or RequestDispatcher.forward(),
which
> has the same basic issue -- control will ultimately be returned to your
page
> when the method you just called returns.  It is up to you to add a
"return"
> statement afterwards, to stop creating the remainder of the current page.
> 
> The only time that this is done for you by the container is when you use
> , or execute a JSP custom tag that tells the container to
skip
> the
> remainder of the current page.
> 
>> 
>> thanks
>> -rick
> 
> Craig McClanahan
> 



RE: Tomcat-mysql configuration

2000-11-30 Thread Panagiotis Konstantinidis



  Well I can tell you how my mySQL database 
works:
.
.
.
String url = 
"jdbc:mysql://isle:3306/football";
where: "jdbc:mysql" is the name of connection and the 
database. "isle" is the name of the server (you could have IP address instead of 
the name) on which the databse is and, "football" is the name of the 
database.
 
Class.forName="(org.gjt.mm.mysql.Driver");
which is the driver that must be loaded (I guess it is 
the same for all the mySQl databases - I am not entirely sure 
though)
 
Connection con = DriverManager.getConnection(url, 
"user", "password");
where "user" and "password" are the real iuser name and 
password that are used in order to grand you access to the 
database
 
  Hope this helps.
[Panagiotis 
Konstantinidis]  -Original 
Message-From: Sameer 
[mailto:[EMAIL PROTECTED]]Sent: 30 November 2000 
12:58To: [EMAIL PROTECTED]Subject: 
Tomcat-mysql configuration

  Hi everybody,
   
  following is the code sample of a jsp file 
  working in (Windows NT + SQLServer + Java Web Server) 
  environment
   
  ..
  String url = "jdbc:odbc:testdsn";
  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  Connection con = DriverManager.getConnection(url, 
  "", "");
  ...
   
  what changes are necessary in the above code to 
  make it work in (Linux + mysql + Tomcat) environment.
  Please help,
   
  Thanks in anticipation
  Sameer
   


mod_jk.dll

2000-11-30 Thread Saikat Chatterjee



Hello All,
Can anyone say where can i get the mod_jk.dll from Apache
site?

Saikat




RE: mod_jk.dll

2000-11-30 Thread Flemming Schmidt Boller

it follows with tomcat 3.2beta

-Original Message-
From: Saikat Chatterjee [mailto:[EMAIL PROTECTED]]
Sent: 30. november 2000 14:16
To: [EMAIL PROTECTED]
Subject: mod_jk.dll




Hello All,
Can anyone say where can i get the mod_jk.dll from Apache
site?

Saikat



Re: mod_jk.so problem on Linux

2000-11-30 Thread Phillip T. Gerringer

I know this is going to help very little but...  Apparently when you get
the garbled message, it means the module was compiled with different
options than the calling module.  I know that is basic but that is where I
would start.  Example:  if your Apache has SSL enabled, then you must
compile mod_jk with the SSL module.

Hope that helps...

On Thu, 30 Nov 2000, Graham Freeman wrote:

> I am having trouble getting mod_jk.so working in Apache 1.3 on my Linux box.
> If I include the instruction
>
>  LoadModulejk_module  libexec/mod_jk.so
> 
> in my httpd.conf file, Apache reports
> 
># ./bin/apachectl configtest
>Syntax error on line 991 of /usr/local/apache/conf/httpd.conf:
>API module structure `jk_module' in file /usr/local/apache/libexec/mod_jk.so is 
>garbled - perhaps this is not an Apache module DSO?
> 
> I have tried recompiling the library from the source, and I get a different
> file length for mod_jk.so (88757) but no change in the behaviour.
> I also tried using mod_jk.conf-auto, but it contains the same LoadModule
> instruction and gives the same error.
> 
> Tomcat 3.2-b8 is otherwise working fine stand-alone.
> 
>   Graham
> 




Tomcat 3.2 thread-pool

2000-11-30 Thread jason

Tomcat 3.2 allocates a thread from a pool to handle a session.
Can this pooling behavior be turned off so that threads die at the end of a 
request/response cycle? (as per the Tomcat 3.1 default)





Re: mod_jk.dll

2000-11-30 Thread Saikat Chatterjee

Hello,
Does it come with Tomcat3.2. I have installed Tomcat 3.2, and Apache
1.3.12 is already installed.SO i need the mod_jk.dll which i shall place
in modules directory of Apache.
But I am not getting the mod_jk.dll in Tomcat3.2 installation.

Saikat

Flemming Schmidt Boller wrote:

> it follows with tomcat 3.2beta
>
> -Original Message-
> From: Saikat Chatterjee [mailto:[EMAIL PROTECTED]]
> Sent: 30. november 2000 14:16
> To: [EMAIL PROTECTED]
> Subject: mod_jk.dll
>
> Hello All,
> Can anyone say where can i get the mod_jk.dll from Apache
> site?
>
> Saikat




RE: mod_jk.so problem on Linux

2000-11-30 Thread GOMEZ Henri

The mod_jk.so was compiled with an apache using EAPI (mod_ssl).
And your apache didn't use such API.

You could see soon at http://rpmized.free.fr/ the announce 
of tomcat 3.2 & tomcat-mod 3.2 RPM ;-)

"Pour la plupart des hommes, se corriger consiste à changer de défauts."
-- Voltaire 

>-Original Message-
>From: Phillip T. Gerringer [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, November 30, 2000 2:20 PM
>To: [EMAIL PROTECTED]
>Subject: Re: mod_jk.so problem on Linux
>
>
>I know this is going to help very little but...  Apparently 
>when you get
>the garbled message, it means the module was compiled with different
>options than the calling module.  I know that is basic but 
>that is where I
>would start.  Example:  if your Apache has SSL enabled, then you must
>compile mod_jk with the SSL module.
>
>Hope that helps...
>
>On Thu, 30 Nov 2000, Graham Freeman wrote:
>
>> I am having trouble getting mod_jk.so working in Apache 1.3 
>on my Linux box.
>> If I include the instruction
>>
>>  LoadModulejk_module  libexec/mod_jk.so
>> 
>> in my httpd.conf file, Apache reports
>> 
>># ./bin/apachectl configtest
>>Syntax error on line 991 of /usr/local/apache/conf/httpd.conf:
>>API module structure `jk_module' in file 
>/usr/local/apache/libexec/mod_jk.so is garbled - perhaps this 
>is not an Apache module DSO?
>> 
>> I have tried recompiling the library from the source, and I 
>get a different
>> file length for mod_jk.so (88757) but no change in the behaviour.
>> I also tried using mod_jk.conf-auto, but it contains the 
>same LoadModule
>> instruction and gives the same error.
>> 
>> Tomcat 3.2-b8 is otherwise working fine stand-alone.
>> 
>>   Graham
>> 
>



RE: Location of mod_jserv.so in tomcat-apache.conf

2000-11-30 Thread Ritwick Dhar

You'll probably have to generate your own tomcat-apache.conf file and
Include that in httpd.conf. Simply copy the existing one and make changes.

Rit

-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 8:08 PM
To: tomcat users list
Subject: Location of mod_jserv.so in tomcat-apache.conf


Hello:

In my tomcat-apache.conf file, there is this line:
LoadModule jserv_module libexec/mod_jserv.so

My apache installation uses a modules directory (even though
I am on Linux). 

Where do I set how this line is generated?

If I change this line, it will be overwritten the next time
tomcat starts.

Thanks, 
Neil.

--
Neil Aggarwal
JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development -- Java, JSP, servlets, databases



RE: send redirect question

2000-11-30 Thread Kief Morris

Anand Prasad typed the following on 19:04 29/11/2000 -0800
>Is there way using RequestDispatcher or  sendReDirect()   to send a page to
>particular frame.
>
>For example.  sendRedirect("index.html" target=_top);

Unfortunately it's the browser which decides which frame to load a page
into, you can't force it on the server side. So a servlet or JSP page can't
decide to load itself into a particular frame any more than a plain HTML
page can decide to load _itself_ into a particular frame.

So if your sendRedirect("index.html") is in myServlet, the HTML which contains
the link tag that loads the original URL has to specify the frame to load 
it in:

click

Whatever output myServlet generates, even if it's a redirect, will show up in
the top frame.

A technique to get better control over your framesets is to load a frameset
which is a JSP page, and give it some parameter which will tell it what to
load in each frame. All of your links will contain target="_top", and the 
entire
frameset is loaded:

sendRedirect("smart_frameset.jsp?main=index.html&nav=nav.html");

Your smart_frameset.jsp checks its parameters and writes its frameset tags
accordingly to load the correct URL in each frame. It's not terribly efficient,
since you're reloading the whole frameset whether you need to or not.

Kief


---
   bitBull makes the Internet bite: http://www.bitBull.com/demos/




apache + tomcat3.1 - same root dir

2000-11-30 Thread Fulton CR (Charles)

Hello, 

I'm trying to setup apache + tomcat3.1. 

Right now I have apache's DocumentRoot set to $TOMCAT_HOME/webapps, thinking
that things might be easier if both had the same document root. Although, by
default tomcat's "" context is set to $TOMCAT_HOME/webapps/ROOT right?

I did noticed that everying in this directory now has a context created for
it, e.g. "images" context, etc. Is this a problem?

I was just wondering what people were doing in the "real world" with similar
setups.

Up to this point we have just been using tomcat standalone. 

thanks, 

-charlie.


--
Charles Fulton
Computational Chemistry
Union Carbide Corp. 
[EMAIL PROTECTED]
304-747-3175



hrefs in documents and sendRedirect()

2000-11-30 Thread Russell Freeman

To restate a so far unresolved problem,

Do I need to include the name of my context in all hyperlinks, e.g. if my
context is /foo, then a link will be , my
stylesheet will be in "/foo/styles.css" etc. 

So far things only work if I add the context prefix but not for
sendRedirect(), which seems to not need it? 

Confused,
Russ




Thread handling question

2000-11-30 Thread Kai Müller

Hi,

I try to understand how Tomcat 3.1 handles requests. I made the
following test:

I send a large amount of requests (JavaScript reloads, 5 per second over
a period of several minutes) from one user to Tomcat.

Result WITHOUT ThreadPool (SimpleTcpConnector):
the number of java processes (threads) increases. If I don't stop the
server crashes. If I stop after a while Tomcat needs some time to
regenerate respectively to work off the threads. Then I can continue.

Result WITH ThreadPool (PoolTcpConnector):
the number of java processes doen't increase to nirvana. If the limit is
adapted (on my 166 MHz ;-) max_threads=15 is ok) Tomcat does not crash.
But: when I stop the requests it needs nevertheless some time to
regenerate. Why? Does it kill the threads then and my PC is too slow? I
thought, all threads are killed immediately if there are more than
max_threads. After a while I can continue.

Can someone explain me in easy words these behaviours? Thank you.

What about Tomcat 3.2 (announced today) and thread pooling? Is it
similar?

Kai Müller


--

Mediadom audiovisuelle Medien GmbH
Merheimer Str. 151
D-50733 Koeln







Lady V: The Pleasure Pill for Women!

2000-11-30 Thread V


LADY V: The Pleasure Pill for Women!

Men Have Their Viagra®! Finally, A Pill for Women! 

It's Here! The Revolutionary Woman's Sexual Sensation is Now
   Available.

Researchers are calling Lady V the greatest breakthrough
for women since the Birth Control Pill. And you don't even need
a prescription to get it!

   Welcome to the New Sexual Revolution!

It's no secret that men have been having the time of their
lives since the wonder pill Viagra® was made available. But,
women were left out in the cold with no pill... nothing! 
Well now thanks to an all-star team of medical researchers 
who have been working around the clock, those days are finally
over. The perfect female "pleasure pill" has been created and
you don't even need a prescription. You can now get it from
Lion Sciences!

Lady V is the world's first pleasure pill scientifically 
designed for women. Lady V is an all-natural proprietary 
herbal blend of prosexual nutrients from around the world
synergistically blended to naturally stimulate neurotransmitter
endorphin signals. This magical combination increases targeted
blood flow, unleashes natural stimulator for maximum stimulation,
triggering pleasure responses quickly. Lady V is safe, natural
and doctor-recommended.
Since its introduction Lady V has been taking the world by storm!
>From Malibu to Miami women are enjoying the most intense pleasure
of their lives! 

• 100% Natural
• Safe
• The Highest Quality Pharmaceutical Pure Nutraceuticals
• Guaranteed Potency
• Certified Purity

 Lady V is Sweeping the Nation!

Women are going crazy over Lady V. Suddenly couples are falling
in love all over again. The passion and pleasure that women are
reporting is off the charts! Lady V has an incredible 88% success
rate. Best of all, while Viagra costs $10 a pill, Lady V costs
less than $1 a pill! It's not just a man's world anymore!

Just look at what a few women have to say:

"I thought my love life was good before, but now it is out of
this world! Lady V is remarkable." — Mary J., Interior Designer

"I haven't smiled like this in a long time. My husband and I 
feel like a couple of 19 year olds again!" — Debra T, Assistant Buyer

"Imagine what it would feel like to have incredible passion
and pleasure anytime you want." — Jennifer C., Film Editor

"Suddenly my husband and I are spending more time in the bedroom
instead of the TV room." — Angie R., Realtor

Ingredients: Vitamin D, Niacin, Vitamin B6, Folic Acid,
Vitamin B12, Avena Sativa, Kava Kava, Guarana, White Willow Extract,
Mura Puama, St. John's Wort, Siberian Ginseng, Cordyceps, Damiana,
and L-Taurine.

Each bottle of Lady V contains 30 tablets.
Take three capsules one hour before romantic activity
as a dietary supplement. 

Risk Free: Double Your Money Back Guarantee

If Lady V does not give the desired results as stated
above, simply return the unused portion for a
double-your money back refund. No questions asked! 

Order Now: Safe, Fast, Secure, Private

Lady V with its DOUBLE YOUR MONEY BACK GUARANTEE is
available only through this special promotional offer.
Herbal V arrives in plain packaging for your privacy.
Any and all information is kept strictly confidential.

Payment Methods

You may FAX or Postal Mail Checks, MasterCard, Visa,
& American Express.payments. Money Orders
are accepted only by Postal Mail. 


Each bottle of Lady V contains 30 tablets.


Step 1: Place a check by your desired quanity.


__ 1 Bottle of Lady V  $24


__ 2 Bottles of Lady V $44


__ 3 Bottles of Lady V $59


Please add $6 shipping and handling for any size order. 
[ Total cost including shipping & handling, 
1 bottle=$30, 2 bottles=$50, 3 bottles=$65 ]

International Orders
Please add $18 shipping and handling for any size order.
[ Total cost including shipping & handling,
1 bottle=$42, 2 bottles=$62, 3 bottles=$77 ]
We cannot accept foreign checks.
International money orders or credit cards only.

Step 2: Place a check by your desired payment method 
and complete fields if necessary.


_Check or CHECK-BY-FAX [details below]


_Money Order 


_American Express 
Account Number__ Exp/

_Visa
Account Number__ Exp/

_MasterCard
Account Number__ Exp/


Please make your check or money order payable to
"Lion Sciences National".
 

Step 3: Please complete and print the following fields clearly.


Name ___ 


Address _


City  


State ___ 


Zip _ 


E-mail __ 


Signature _
[ required for check and credit card orders]



 Toll Free FAX Order Line: 1-800-94

j_security_check mapping

2000-11-30 Thread Juergen Weber

hello,

with 3.2 final I ran into the same problem as the
message below. Is there a solution, so the 8080 is
not necessary, now?

Thanks, Juergen


http://mikal.org/interests/java/tomcat_users/msg09581.html

I am using Tomcat 3.2b6 with mod_jk. When accessing
http://localhost:8080/examples/jsp/security/protected/index.jsp
The login.jsp page works (posts) fine. However, when
accessing through Apache,
http://localhost/examples/jsp/security/protected/index.jsp,
the login.jsp comes up but j_security_check is not
found when I post. Has anyone else had this problem?
Can I manually do the mapping from within web.xml?

 Thanks,
 Charlie



__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/



Re: MVC problem

2000-11-30 Thread Mike La Budde


>
>I believe one solution offerred previously on this list (thank you Craig!)
>was to place all of your .jsp pages underneath /WEB-INF (e.g. 
>/WEB-INF/jsp/...) Since these can never be served up (goes against the 
>jsp/servlet spec)
>
>HTH,
>
>Mike
>
>
>At 11/30/2000 10:20 AM -0600, you wrote:
>> > hi all..
>> >
>> > We're hitting a problem with the MVC approach in tomcat.
>> >
>> > Our controller is designed to intercept all requests for URLs within our
>> > web application so that it can handle internationalization and security
>> > checks centrally.
>> >
>> > The problem is as follows:
>> > - the controller servlet registers interest in URLs of the form '*.jsp'
>> > - a request for 'a.jsp' arrives and the controller checks security and
>> > negotiates the locale settings
>> > - the controller includes the contents of 'a.jsp' in the response
>> >
>> > At this point it seems that tomcat takes over. Unfortunately, it doesn't
>> > retrieve the contents of the page - it just resubmits the request to the
>> > controller again, resulting in an endless loop. This also occurs for a
>> > 'forward'. Not good.
>> >
>> > One of the workarounds is to use URLs of the form '.do' to request page
>> > content. This allows the controller to forward to a .jsp URL without
>> > getting into a loop. The problem is that someone who knows the structure
>> > of the www site can submit requests for '.jsp' directly and bypass any
>> > security checks. The obvious workaround for this is to put tags into the
>> > .jsp pages and java calls into any servlets to perform the security check
>> > - but this negates any advantage to the MVC approach (and forces
>> > page/servlet developers to remember to place checks into all of their
>> > content).
>> >
>> > We're probably missing something - it seems difficult to believe that the
>> > MVC approach has such a fundamental flaw.
>> >
>> > thanks!
>> > David Aiken
>> > BMC Software




Freebsd and mod_jk

2000-11-30 Thread AC

I've just downloaded the 3.2 release on my Frebse 4.1 and I was trying to 
use the mod_jk insetad mod_jserv.
After following the instructions I've compiled with the Freebsd Makefile 
and include in my http.conf th Load module directive.

This is the response I get

apachectl configtest
Syntax error on line 3 of /usr/local/tomcat32/conf/mod_jk.conf:
Cannot load /usr/local/libexec/apache/mod_jk.so into server: 
/usr/local/libexec/apache/mod_jk.so: Undefined symbol "map_name_at"

Any hints??

thanks
andrea




Re: send redirect question

2000-11-30 Thread Moursli Nabil

no!
- Original Message -
From: Anand Prasad <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 30, 2000 4:04 AM
Subject: RE: send redirect question


> Craig,
>
> Is there way using RequestDispatcher or  sendReDirect()   to send a page
to
> particular frame.
>
> For example.  sendRedirect("index.html" target=_top);
>
> -_Anand
>
>
> -Original Message-
> From: Rick Bosch [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 29, 2000 3:32 PM
> To: [EMAIL PROTECTED]
> Subject: Re: send redirect question
>
>
> if I have a bean that is called from a jsp and has the call
>
> if (!(cookie.tempContains("loggedin"))){
> try{
> String
>
param=(request.getParameter("show")!=null)?"?show="+request.getParameter("sh
> ow"):"";
> response.sendRedirect("index.jsp"+param);
> commit=true;
> }catch(IOException e){
> log.write("Problem launching"+e.getMessage());
> }
> }else{
>
> and in my jsp
>
> 
> <%
> mybean.init( request,  response);
> if(mybean.commit){return;}
> %>
> 
> 
>
> However we have found that some versions of ie if they mess with the back
> button and up with messed up pages (described below).
>
> 1) how can i fix it?
>
> 2) Then would you say it is not safe to redirect from a bean that you have
> pass a refrence to http response?
>
>
>
> thanks
> -rick
>
> > From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > Date: Tue, 28 Nov 2000 12:45:46 -0800
> > To: [EMAIL PROTECTED]
> > Subject: Re: send redirect question
> >
> > Rick Bosch wrote:
> >
> >> we have several jsp pages that call beans.  Some beans for one reason
or
> >> another will redirect a user to another page, howver in some cases its
> >> possible for a redirect to occur and if the logic of the bean is to
> continue
> >> writing after a reddirect the client get messed up pages usually the
> >> original then some http headers and then the new page.  How is it jsp
> pages
> >> are somehow "aware" of a redirect but if i call a redirect from a bean
it
> >> seems to be ignored???
> >>
> >
> > Deep down, a JSP page is just a Java class.  And the Java language has
no
> > concept like the setjmp()/longjmp() combination of C, where you can
change
> the
> > logical flow of control with what amounts to a "go to" statement to a
> > completely
> > different method in a completely different source file.
> >
> > When you call response.sendRedirect() -- or RequestDispatcher.forward(),
> which
> > has the same basic issue -- control will ultimately be returned to your
> page
> > when the method you just called returns.  It is up to you to add a
> "return"
> > statement afterwards, to stop creating the remainder of the current
page.
> >
> > The only time that this is done for you by the container is when you use
> > , or execute a JSP custom tag that tells the container to
> skip
> > the
> > remainder of the current page.
> >
> >>
> >> thanks
> >> -rick
> >
> > Craig McClanahan
> >




More Tomcat problems.

2000-11-30 Thread Panagiotis Konstantinidis
Title: More Tomcat problems.





  Hello there again, this is the second message I am sending regarding problems with Tomcat. In my previous message Kief answered solved my question correctly, so I would really appreciate if he could answer again this one. It seems that I have exactly the same problem. I am running a JSP file (lets say myFile.jsp) that open a conenction with the database on the server. The code is like the following:

  <% .
    String url = ;
    String user = ;
    String password = ;


    Class.forName("org.gjt.mm.mysql.Driver");
    Connection con = DriverManager.getConnection(url, user, password);


 .
%>


When the line Connection con = DriverManager.getConnection(url, user, password); is encountered then Tomcat just goes off (and I get the error message from Apache "Internal Server Error."). Just like that, with no error messages or anything. This is really weird because I have downloaded and installed the latest versions of both Apache (v1.3.14) and Tomcat (v3.2) and I have included the JDBC driver .jar file in my classpath.

  I have looked in the "tomcat.log" file and there are no error messages. I have looked in the "error.log" file in the Apache directory and I get the error message (for one more time): [Thu Nov 30 17:47:39 2000] [error] [client 192.168.0.25] Premature end of script headers: c:/work/tomcat/jakarta-tomcat-3.2-b7/webapps/panos/myFile.jsp. I cannot think of anything to do so if somebody knows more about that please help.

   Thank you.


    Panos






Not finding index.html file

2000-11-30 Thread Neil Aggarwal

Hello:

I am using tomcat 3.1.

I create a directory for my web application in the web apps directory.

When I got to /myapp/index.html, I get the index.html file, but
when I go to /myapp, I get a 404 not found.

Apache does load index.html files for other directories.

Does tomcat load index.html files?  If so, how do I configure it
to do so?

Thanks,
Neil.

--
Neil Aggarwal
JAMM Consulting, Inc. -- (972) 612-6056, http://www.JAMMConsulting.com
Custom Internet Development -- Java, JSP, servlets, databases



Re: Question about Tomcat4.0 work with Apache

2000-11-30 Thread Craig R. McClanahan



KINGMAN wrote:

> Tomcat4.0 have no config file tomcat-apache.conf in directory /TOMCAT_HOME/conf;
> Tomcat is diffcult.If I make tomcat plug-in  Apche.Then I need not config tomcat?

Tomcat 4.0-m4 (and earlier) did not support connection to Apache.  It only runs in
stand-alone mode.

The code to connection Tomcat 4.0 is being actively developed, and is planned to be
included in a "milestone 5" release shortly.

Craig McClanahan





Re: servlet-api

2000-11-30 Thread Craig R. McClanahan

Carlos wrote:

> i have download the tomcat 3.2 final and servlet-apic3.2
> what i must to make wiht the servlet api file?
> thanks
> carlos

You only need it if you want to look at the sources for the API classes found in
"servlet.jar".  The Tomcat distribution includes the executable version of
"servlet.jar" that you can use to compile your servlets with.  It is also used
when you run Tomcat.

Craig





Re: How to get webapp context path from javax.servlet API?

2000-11-30 Thread Craig R. McClanahan

Vijayanand Sukumar wrote:

> Hi ,
> I need to know if there is a way to get the context path from without
> creating  a dependency on tomcat. If my web-app context is /foo and I want
> to convert a  URL relative to the current context back into an external URL
> with the full  syntax.

When processing a servlet request, simply call

String contextPath = request.getContextPath();

and you can use this value to construct an absolute URL.

>
> Thanks
> Vijayanand Sukumar

Craig McClanahan





Re: CGI-Wrapper for Tomcat?

2000-11-30 Thread Craig R. McClanahan

Karsten Hahn wrote:

> Hi all,
>
> I'm wondering if there is a Servlet that wraps (and hide) a old
> CGI-scripts.
>
> Thanks a lot,
>
> Karsten

There is not such a servlet in any current distribution of Tomcat.  If someone
wanted to write one, I'd certainly be willing to include it.

Craig McClanahan





Re: mod_jk.so problem on Linux

2000-11-30 Thread Dominique BATARD

You must compile mod_jk with the right apxs.

Dom
- Original Message -
From: "Phillip T. Gerringer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 30, 2000 2:20 PM
Subject: Re: mod_jk.so problem on Linux


> I know this is going to help very little but...  Apparently when you get
> the garbled message, it means the module was compiled with different
> options than the calling module.  I know that is basic but that is where I
> would start.  Example:  if your Apache has SSL enabled, then you must
> compile mod_jk with the SSL module.
>
> Hope that helps...
>
> On Thu, 30 Nov 2000, Graham Freeman wrote:
>
> > I am having trouble getting mod_jk.so working in Apache 1.3 on my Linux
box.
> > If I include the instruction
> >
> >  LoadModulejk_module  libexec/mod_jk.so
> >
> > in my httpd.conf file, Apache reports
> >
> ># ./bin/apachectl configtest
> >Syntax error on line 991 of /usr/local/apache/conf/httpd.conf:
> >API module structure `jk_module' in file
/usr/local/apache/libexec/mod_jk.so is garbled - perhaps this is not an
Apache module DSO?
> >
> > I have tried recompiling the library from the source, and I get a
different
> > file length for mod_jk.so (88757) but no change in the behaviour.
> > I also tried using mod_jk.conf-auto, but it contains the same LoadModule
> > instruction and gives the same error.
> >
> > Tomcat 3.2-b8 is otherwise working fine stand-alone.
> >
> >   Graham
> >
>
>





Re: jtml - howto

2000-11-30 Thread Craig R. McClanahan

lbihyd wrote:

> friends,
> does tomcat support jhtml files ? if so , how do i run them.
> thanks a bunch
>
> mohan

Tomcat does not currently have any support for .jhtml files.  It would seem
feasible to write such a thing, and anyone interested is invited to submit it
for possible inclusion in some future version of Tomcat.

Craig McClanahan





Solaris binary for mod_jk.so

2000-11-30 Thread Jonathan Eric Miller

First off, I would like to congratulate the Tomcat developers for the
release of 3.2. You guys are doing a greate job and I look forward to using
it.

One thing that I think would be very helpful to users is if you could
provide binaries for mod_jk. I'm guessing it's just a matter of resources
and not having developers around that can make these binaries. From what I
remember, there used to be Solaris binaries awhile back. Then, Solaris
seemed to be dropped in favor of Linux. I just wanted to make a point that
there are probably still a lot of Solaris users out there that might
appreciate have a binary as well.

I'm going to try to build it right now. It's been a few months since I last
did this. At that time I found that the instructions had improved a bit
which I really appreciated. I had major problems building mod_jserv
previously, due to pretty much non-existent or incorrect documentation.

BTW, I'm hoping at some point to no longer have to use Apache Web Server at
all and instead just use Tomcat in stand-alone mode. However, there are a
few issues that I need to resolve first. One issue is that I want to limit
SSL connections to using 128-bit encryption and not 40-bit or 56-bit. I'm
not sure if this is possible with Tomcat.

Jon





Re: mod_jk.dll

2000-11-30 Thread Craig R. McClanahan

Saikat Chatterjee wrote:

> Hello,
> Does it come with Tomcat3.2. I have installed Tomcat 3.2, and Apache
> 1.3.12 is already installed.SO i need the mod_jk.dll which i shall place
> in modules directory of Apache.
> But I am not getting the mod_jk.dll in Tomcat3.2 installation.
>

I have not had a chance to post all of the pre-built versions of the native code
modules yet.  In the mean time, you can use the mod_jk.dll file from 3.2-beta-8,
but there has been at least one bug fix since then, so you will want to update
as soon as the final version is available (or compile it yourself from the
source distribution).

>
> Saikat
>

Craig McClanahan





TomCat and Apache

2000-11-30 Thread William Colls

In getting my Tomcat-Apache set to work, I need to create another alias
in the tomcat-apache.conf file. However, modifying this file by hand
seems a bad idea since it is regenerated at each tomcat startup. Where,
(server.xml, web.xml, somewhere else) and in what form can I put this
information, so that it will get picked up, and included in the
tomcat-apache.conf file each time it is created?

TIA.

--
/* == */

William E. Colls   Tel 613 591 0079
PROComputer SystemsFax 613 591 3924
67 Willow Glen Dr www.procomsys.com
Kanata  Ontario  Canada   PEG Member 1998051404

  Specialists in Progress Software development since 1985





Re: Tomcat 3.2 thread-pool

2000-11-30 Thread Craig R. McClanahan

[EMAIL PROTECTED] wrote:

> Tomcat 3.2 allocates a thread from a pool to handle a session.

Actually, to handle a request -- not a session.

>
> Can this pooling behavior be turned off so that threads die at the end of a 
>request/response cycle? (as per the Tomcat 3.1 default)

Not with the standard PoolTcpConnector that is used.  You could switch to using the 
SimplePoolConnector -- but I doubt it has had very
much testing lately.

Also, why would you want this?  Recycling the threads in the pooled connector is one 
of the reasons that Tomcat 3.2 has better
performance than 3.1.

Craig McClanahan





Re: hrefs in documents and sendRedirect()

2000-11-30 Thread Craig R. McClanahan

Russell Freeman wrote:

> To restate a so far unresolved problem,
>
> Do I need to include the name of my context in all hyperlinks, e.g. if my
> context is /foo, then a link will be , my
> stylesheet will be in "/foo/styles.css" etc.
>

If you are creating hyperlinks that start with "/" then you *do* need the
context path added on the front.  This is because the browser will interpret
such a URL as being relative to the server's document root.

If you use relative URLs, though (not starting with "/"), then you do *not* want
to add the context path.  For example, if you have a page "index.html" that
wants to create a link to a page "display.html" in the same directory, simply
write:

The Display Page

>
> So far things only work if I add the context prefix but not for
> sendRedirect(), which seems to not need it?
>

response.sendRedirect() converts relative URLs back to absolute ones (adding the
content path for you).  This behavior is required by the servlet specification,
although not every servlet container actually does it.

>
> Confused,
> Russ

Craig McClanahan





Servlet in the middle... in the middle.. in the middle

2000-11-30 Thread Bragg, Casey

Is there a way to do the following?

Let's say a user requests /foo/junk.gif, or /foo/test.jsp.

I'd like all requests to /foo/* to first be processed by a servlet.  
The servlet performs some operation (user authentication specifically).  
If the servlet processing performs normally, I want the request forwarded to
the page actually requested (in the case of .jsp files, the page must be
processed by the jsp engine first of course).

I've set my Tomcat 3.1 up as defined below.  The result is an infinite loop.
A request of /foo/junk.gif is redirected to the servlet and then to
/foo/junk.gif (which then is redirected to the servlet and then to
/foo/junk.gif... and so on).

Thanks so much for your help!

...Casey

---

Given a file at webapps/foo/junk.gif

And the following in server.xml : (Maps /foo urls to the middle_serv
context)


middle_serv


middleServlet




middle_serv


*.gif



And a servlet called middleServlet: 
public void doGet (HttpServletRequest request, HttpServletResponse
response) {
try {
// Perform user authentication.. on failure, go to
login page... otherwise proceed

// Determine the originally requested URL and
forward the user to that page
String orig_url = request.getRequestURI();

getServletConfig().getServletContext().getRequestDispatcher(orig_url).forwar
d(request, response);
} catch (Exception ex) {
ex.printStackTrace ();
}   
}

==
Casey Bragg - Software Engineer
Allegiance Telecom, Inc.  Dallas, TX
214-261-8679 - [EMAIL PROTECTED]
==




Re: j_security_check mapping

2000-11-30 Thread Mike La Budde

I ran in to the same problem. The solution is to modify the
mod_jk.conf-auto file (and save w/ a different name) as follows: 

#
# The following line mounts all JSP files and the /servlet/ uri to
tomcat
#
JkMount /iristafulfill/servlet/* ajp12
JkMount /iristafulfill/*.jsp ajp12
JkMount /iristafulfill/*.do ajp12
JkMount /iristafulfill/pages/security/j_security_check ajp12

Both of the last two lines were added manually. The first, 'cause
we're using struts and the second for the login page

HTH, 

Mike

At 11/30/2000 09:09 AM -0800, you wrote:
hello,

with 3.2 final I ran into the same problem as the
message below. Is there a solution, so the 8080 is
not necessary, now?

Thanks, Juergen


http://mikal.org/interests/java/tomcat_users/msg09581.html

I am using Tomcat 3.2b6 with mod_jk. When accessing
http://localhost:8080/examples/jsp/security/protected/index.jsp
The login.jsp page works (posts) fine. However, when
accessing through Apache,
http://localhost/examples/jsp/security/protected/index.jsp,
the login.jsp comes up but j_security_check is not
found when I post. Has anyone else had this problem?
Can I manually do the mapping from within web.xml?

 Thanks,
 Charlie



__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/


/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 
 Michael H. La Budde    email:  [EMAIL PROTECTED]
 Prosoft, Inc.  phone:  414-860-6509
 [EMAIL PROTECTED]   fax:    414-860-7014
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 




Re: Solaris binary for mod_jk.so

2000-11-30 Thread Craig R. McClanahan

Jonathan Eric Miller wrote:

> First off, I would like to congratulate the Tomcat developers for the
> release of 3.2. You guys are doing a greate job and I look forward to using
> it.
>
> One thing that I think would be very helpful to users is if you could
> provide binaries for mod_jk. I'm guessing it's just a matter of resources
> and not having developers around that can make these binaries. From what I
> remember, there used to be Solaris binaries awhile back. Then, Solaris
> seemed to be dropped in favor of Linux. I just wanted to make a point that
> there are probably still a lot of Solaris users out there that might
> appreciate have a binary as well.
>

I have asked for help on the developer list in accumulating pre-compiled
versions of the native code modules on the developer list.  I'd like to post
them all, no matter how popular or obscure a particular platform is.

>
> I'm going to try to build it right now. It's been a few months since I last
> did this. At that time I found that the instructions had improved a bit
> which I really appreciated. I had major problems building mod_jserv
> previously, due to pretty much non-existent or incorrect documentation.
>
> BTW, I'm hoping at some point to no longer have to use Apache Web Server at
> all and instead just use Tomcat in stand-alone mode. However, there are a
> few issues that I need to resolve first. One issue is that I want to limit
> SSL connections to using 128-bit encryption and not 40-bit or 56-bit. I'm
> not sure if this is possible with Tomcat.
>

Hmmm.  By default, the SSL connection factory in Tomcat is initialized to accept
all possible cipher suites.  It wouldn't be too hard to make that configurable.

In Tomcat 4.0, you have an additional option -- a recent addition to the servlet
2.3 spec requires the servlet container to expose two new request attributes:
the cipher suite that is being used, and the key size.  It would be possible to
programmatically reject such a request in a servlet or a filter.

> Jon

Craig McClanahan





Getting jsession param from URL

2000-11-30 Thread Brian Hannan

I write jsession into URLs I generate for web pages being served.  This
all works fine and Tomcat detects the session id in the URL.

The only problem is I would like to also grab the jsession ID from the
URL to detect URLs sent from pages related to a stale session.

I'm unable to see the jsession param.  I've tried playing with every
method in HttpServletRequest, but the jsession id is always missing.

Is there anyway to have Tomcat not strip jsession from a URL?

Thanks for the help.

--
Brian Hannan
Chief Admiral of Uncle Jam's Navy

"One nation under a groove, gettin' down just for the FUNK of it."



begin:vcard 
n:Hannan;Brian
tel;cell:408.394.5791
tel;fax:408.517.2201
tel;work:408.394.5791
x-mozilla-html:FALSE
url:http://www.airflash.com
org:http://www.twofisted.com/barbv.gif">P-FUNK Research Institute, Airflash Division
adr:;;12900 Saratoga Ave.;Saratoga;CA;95070;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Barbarella's Favorite Pet
note:One nation under a groove, gettin' down just for the FUNK of it.
x-mozilla-cpt:;1
fn:Brian Hannan
end:vcard



Re: Thread handling question

2000-11-30 Thread Aleksey Tsalolikhin

On Thu, Nov 30, 2000 at 05:21:56PM +0100, Kai Müller wrote:
> Hi,
> 
> I try to understand how Tomcat 3.1 handles requests.
[...]
> 
> What about Tomcat 3.2 (announced today) and thread pooling? Is it
> similar?

Dear Kai,

Check out the "Use a Thread Pool in your Connectors" section in
Tomcat User's Guide at 
http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/uguide/tomcat_ug.html,
it describes how 3.2's thread pool works.

Sincerely,
Aleksey



Re: Servlet in the middle... in the middle.. in the middle

2000-11-30 Thread Craig R. McClanahan

"Bragg, Casey" wrote:

> Is there a way to do the following?
>
> Let's say a user requests /foo/junk.gif, or /foo/test.jsp.
>
> I'd like all requests to /foo/* to first be processed by a servlet.
> The servlet performs some operation (user authentication specifically).
> If the servlet processing performs normally, I want the request forwarded to
> the page actually requested (in the case of .jsp files, the page must be
> processed by the jsp engine first of course).
>
> I've set my Tomcat 3.1 up as defined below.  The result is an infinite loop.
> A request of /foo/junk.gif is redirected to the servlet and then to
> /foo/junk.gif (which then is redirected to the servlet and then to
> /foo/junk.gif... and so on).
>

This question came up earlier today as well.  The bottom line is that you cannot
do what you are after in Tomcat 3.x (which is based on the servlet 2.2
specification).  You can do it by using a Filter from the servlet 2.3 API (which
Tomcat 4.0 supports).  See my expanded explanation on a thread with subject "MVC
problem".

>
> Thanks so much for your help!
>
> ...Casey
>

Craig McClanahan





build failed on tomcat

2000-11-30 Thread Scott Liu

Hi All,

I have installed j2sdk1_3_0 binary version on solaris 2.6
and had jakarta-ant built. When I tried to build the tomcat
it failed since there was no class of SAXParserFactory.
I could not find anything in the j2sdk1_3_0 directories.
Do I need to install other class libraries to make it work?

Thanks

Scott

# ./build.sh
Searching for build.xml ...
Buildfile: /export/home/usr/local/jakarta-tomcat/build.xml

BUILD FAILED

No JAXP compliant XML parser found. See http://java.sun.com/xml for the
reference implementation.
java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)

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

at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at org.apache.tools.ant.Main.runBuild(Main.java:401)
at org.apache.tools.ant.Main.main(Main.java:149)






Re: Solaris binary for mod_jk.so

2000-11-30 Thread brent . johnson


Why should they worry about compiling that for you?  I just installed 3.2 a
little while ago and I had no problems.  If you'd just take a look at the
mod_jk documentation it gives you the EXACT command you need to run under
Solaris to get mod_jk.so to compile.  If you still can't get it to work
though, email me directly and I'll attach and send you a copy of my
mod_jk.so file.

- Brent



   

"Jonathan  

Eric Miller" To: "Tomcat User" 
<[EMAIL PROTECTED]>
   Subject: Solaris binary for mod_jk.so 

   

11/30/00   

01:23 PM   

Please 

respond to 

tomcat-user

   

   




First off, I would like to congratulate the Tomcat developers for the
release of 3.2. You guys are doing a greate job and I look forward to using
it.

One thing that I think would be very helpful to users is if you could
provide binaries for mod_jk. I'm guessing it's just a matter of resources
and not having developers around that can make these binaries. From what I
remember, there used to be Solaris binaries awhile back. Then, Solaris
seemed to be dropped in favor of Linux. I just wanted to make a point that
there are probably still a lot of Solaris users out there that might
appreciate have a binary as well.

I'm going to try to build it right now. It's been a few months since I last
did this. At that time I found that the instructions had improved a bit
which I really appreciated. I had major problems building mod_jserv
previously, due to pretty much non-existent or incorrect documentation.

BTW, I'm hoping at some point to no longer have to use Apache Web Server at
all and instead just use Tomcat in stand-alone mode. However, there are a
few issues that I need to resolve first. One issue is that I want to limit
SSL connections to using 128-bit encryption and not 40-bit or 56-bit. I'm
not sure if this is possible with Tomcat.

Jon









Re: Getting jsession param from URL

2000-11-30 Thread Craig R. McClanahan

Brian Hannan wrote:

> I write jsession into URLs I generate for web pages being served.  This
> all works fine and Tomcat detects the session id in the URL.
>
> The only problem is I would like to also grab the jsession ID from the
> URL to detect URLs sent from pages related to a stale session.
>
> I'm unable to see the jsession param.  I've tried playing with every
> method in HttpServletRequest, but the jsession id is always missing.
>
> Is there anyway to have Tomcat not strip jsession from a URL?
>

You can ask Tomcat to give you the session id that was requested (whether it is
valid or not) by calling:

request.getRequestedSessionId();

There are other calls to tell you whether the requested session id was actually
valid, and whether it came from a cookie or the request URL.  See the servlet
API javadocs on HttpServletRequest for more info.

>
> Thanks for the help.
>
> --
> Brian Hannan

Craig McClanahan





Init-Parameters in web.xml

2000-11-30 Thread Thorsten Moeller

Hi!

I use Visual Age for Java 3,02 with Tomcat 3.1 integrated. I have the
problem that when I start Servlets (e.g.
http://localhost:8080/servlet/my.package.MyServlet) the parameters
standing in "web.xml" are not read in. The file is stored in the directory
\webapps\ROOT\WEB INF. The web.xml should be error free,
since I exported the Servlet also into a new created context,
and it works reading the parameters in. Does someone have a tip? 

Thorsten




Running JSP's w/ Apache and Tomcat

2000-11-30 Thread Jeff Brown

hi,

I would like to set up apache and tomcat so that apache handles all of my
static html pages and all of the JSP pages are handled by tomcat
basically exactly how JServ/GNUJSP works.  What do I need to add to
tomcat.conf/server.xml in order to get this scenario to work correctly?
I've been playing with different context settings and have checked all
available docs and faqs without any success.  With a default set up (simply
installing Tomcat, putting my jars in /lib and including tomcat.conf in
httpd.conf) when I try to access a jsp file that's in my
/usr/local/apache/htdocs dir, I get an error saying it can't be found in
webapps/ROOT.  Copying the file there seems to make it work, but then I have
to maintain the same file in two places because as soon as I remove it from
my apache document root, apache can no longer find the file and I don't even
get the Tomcat error.

Anyone out there with a similar scenario?  It seems like this should be
fairly basic, but the included documentation on Apache/Tomcat configs is
sketchy at best.
___
jb



In the process of installing tomcat: failed to build

2000-11-30 Thread Scott Liu

Hi All,

In order to install tomcat I upgraded our system to Java 2.
In both binary version of j2sdk and source version of it
I could not find the "classes.zip" (so that I could locate
the javax.xml.parsers.SAXParserFactory class to build
jakarta-tomcat). Can anyone tell me what I am missing
here?

Between I could not find "SAXParserFactory" in jaxp.jar
and parser.jar from jaxp1-0-1.zip either. Any info or suggestion
would helpful. Thanks.


Scott Liu





Re: build failed on tomcat

2000-11-30 Thread Robert B. Easter

On Thursday 30 November 2000 14:57, Scott Liu wrote:
> Hi All,
>
> I have installed j2sdk1_3_0 binary version on solaris 2.6
> and had jakarta-ant built. When I tried to build the tomcat
> it failed since there was no class of SAXParserFactory.
> I could not find anything in the j2sdk1_3_0 directories.
> Do I need to install other class libraries to make it work?
>
> Thanks
>

You are missing the Java API for XML Parsing.  When you unzipped the 
jakarta-tomcat, you should find a README file.  You'll have to read it's 
installation steps one by one.  It explains what else you have to install and 
how to setup all of the environment variables etc to make things work 
smoothly.  I'm a novice at Java stuff, but followed the README and it is 
working.  Now I just have to read LOTS more documentation to learn how to 
start making my own stuff.  I come from php/apache and postgresql, so this is 
much different!


> Scott
>
> # ./build.sh
> Searching for build.xml ...
> Buildfile: /export/home/usr/local/jakarta-tomcat/build.xml
>
> BUILD FAILED
>
> No JAXP compliant XML parser found. See http://java.sun.com/xml for the
> reference implementation.
> java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:120)
> at org.apache.tools.ant.Main.runBuild(Main.java:401)
> at org.apache.tools.ant.Main.main(Main.java:149)

-- 
 Robert B. Easter  [EMAIL PROTECTED] -
- CompTechNews Message Board   http://www.comptechnews.com/ -
- CompTechServ Tech Services   http://www.comptechserv.com/ -
-- http://www.comptechnews.com/~reaster/ 



Re: build failed on tomcat

2000-11-30 Thread Robert B. Easter

btw, I'm using JDK 1.2.2 but I don't think it matters

On Thursday 30 November 2000 14:57, you wrote:
> Hi All,
>
> I have installed j2sdk1_3_0 binary version on solaris 2.6
> and had jakarta-ant built. When I tried to build the tomcat
> it failed since there was no class of SAXParserFactory.
> I could not find anything in the j2sdk1_3_0 directories.
> Do I need to install other class libraries to make it work?
>
> Thanks
>
> Scott
>
> # ./build.sh
> Searching for build.xml ...
> Buildfile: /export/home/usr/local/jakarta-tomcat/build.xml
>
> BUILD FAILED
>
> No JAXP compliant XML parser found. See http://java.sun.com/xml for the
> reference implementation.
> java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:120)
> at org.apache.tools.ant.Main.runBuild(Main.java:401)
> at org.apache.tools.ant.Main.main(Main.java:149)

-- 
 Robert B. Easter  [EMAIL PROTECTED] -
- CompTechNews Message Board   http://www.comptechnews.com/ -
- CompTechServ Tech Services   http://www.comptechserv.com/ -
-- http://www.comptechnews.com/~reaster/ 



Re: MVC problem

2000-11-30 Thread Vik P. Solem

Hello David.

I don't know if this will help you, but when we needed to perform some
basic functionality prior to each page request we created a super-class
for our servlets (actually it was jhtml, not JSP, but it was a while
ago).

This super class was a servlet that implemented the method
service(req,resp), and in that method we did some important global
things.  We tracked page level security, guaranteed a single thread per
session (by synchronizing on the session object), and then after/within
that logic we called super.service(req,resp) which then went on to run
the appropriate page for us.  (This requires that your JSPs (or servlets
if you write the controller separately as I'd suggest) extend this
intermediary class which would in turn extend HttpJspBase.

I'm not sure if I've explained it very well.  I'd be happy to write a
better description if you'd like one.  Please feel free to email me
directly at [EMAIL PROTECTED]

Assuming that I've described it well enough that it's recognizable, has
anyone else out there used this approach?

-Vik

"Aiken, David" wrote:
> 
> > hi all..
> >
> > We're hitting a problem with the MVC approach in tomcat.
...
-- 
Vik P. Solem[EMAIL PROTECTED]781-344-1133
VikTech Systems Inc.   Built right, now.
http://www.viktech.com



linux and mod_jk

2000-11-30 Thread Landaluze Produktions IS - Carlos

i am using linux suse.
i have dounload the tomcat 3.2 final
i have a fiel mod_jk.so
for running with linux i must compile this file(mod_jk.so)?
if i must compiled it:
i have my tomcat in /opt/jakarta
the mod. in /usr/lib/apache
how i compile it?
thanks
Carlos




connection pool

2000-11-30 Thread Landaluze Produktions IS - Carlos

in the tomcat conf file (server.xmlk) i have see that there is a conection
pool for oracle and mysql
1.- is posible to make a conecion pool to a MSQL server?
2.- if a am using a JDBC driver (rmijdbc) and the SQLserver ip is
192.168.1.3, how can i make a conection pool to this database?
i dont known how can i do it?
please help me
Thaks
Carlos




Tomcat 3.2 tries to read POST data before forwarding to JSP

2000-11-30 Thread Duane Morse

The following partial stack trace illustrates a problem/bug in Tomcat 3.2
(final release) when a servlet processes
a POST request and then forwards processing to a JSP.   In "pre-processing",
Tomcat is trying to read the form
data, but since it's already been read, it generates a "short read" error.
Since the servlet API
specifically says that the forward command allows one servlet to do some
processing of a message before
passing on the work to another servlet, this behavior is either a bug in the
Tomcat 3.2 implementation (trying
to read the POST data without knowing whether the subsequent servlet wants
the data) or it's a serious shortcoming
of the servlet API (you can't ever forward a POST request).

java.lang.IllegalArgumentException: Short Read at
javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238) at
org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101) at
org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691) at
org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
at org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250) at
org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRe
questFacade.java:222) at
org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326) at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370) 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.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194) 


Duane Morse, Eldorado Computing Inc., Phoenix Arizona




Postgres Driver.

2000-11-30 Thread Sterling

H-

Can anyone point me in the direction of a postgres driver so I can hook
up JSP to work with my postgres database?
I checked the Postgres website and it's down. 8^(

I'm getting
javax.servlet.ServletException: Unable to load class postgresql.Driver
errors when I attempt it.

I believe that's the problem.

Thanks for any information anyone can provide.
Thanks.
-Sterling





Re: MVC problem

2000-11-30 Thread Vik P. Solem

OOPS.

Sorry about that folks.  This won't work in Tomcat the way I described. 
I just noticed that in the Tomcat source the service method on
HttpJspBase is final.  

We're still waiting for management to decide on Apache-Tomcat vs.
WebLogic.  It looks like lessons learned previously in WebLogic are not
transferable to Tomcat.

Sorry about my previous noise on the list.  I guess all servlet
container are not created equal.  Time to reread that spec.

-Vik


"Vik P. Solem" wrote:
> 
> Hello David.
> 
> I don't know if this will help you, but when we needed to perform some
> basic functionality prior to each page request we created a super-class
> for our servlets (actually it was jhtml, not JSP, but it was a while
> ago).
> 
> This super class was a servlet that implemented the method
> service(req,resp), and in that method we did some important global
> things.  We tracked page level security, guaranteed a single thread per
> session (by synchronizing on the session object), and then after/within
> that logic we called super.service(req,resp) which then went on to run
> the appropriate page for us.  (This requires that your JSPs (or servlets
> if you write the controller separately as I'd suggest) extend this
> intermediary class which would in turn extend HttpJspBase.
> 
> I'm not sure if I've explained it very well.  I'd be happy to write a
> better description if you'd like one.  Please feel free to email me
> directly at [EMAIL PROTECTED]
> 
> Assuming that I've described it well enough that it's recognizable, has
> anyone else out there used this approach?
> 
> -Vik
> 
> "Aiken, David" wrote:
> >
> > > hi all..
> > >
> > > We're hitting a problem with the MVC approach in tomcat.
> ...
> --
> Vik P. Solem[EMAIL PROTECTED]781-344-1133
> VikTech Systems Inc.   Built right, now.
> http://www.viktech.com

-- 
Vik P. Solem[EMAIL PROTECTED]781-344-1133
VikTech Systems Inc.   Built right, now.
http://www.viktech.com



Re: j_security_check mapping

2000-11-30 Thread Jacob Kjome

Mike,

I'm confused as to what you mean here?  First of all, what is that
"iristafulfill" context?  Is that you own?  I also
looked for a class file called "j_security_check.class" and I
didn't find it anywhere in the sample context or any other context that
comes with 3.2 final.

Can you or someone else be a bit more explicit as to how to get this to
work through Apache on port 80.

Jake


At 12:46 PM 11/30/2000 -0600, you wrote:
I ran in to the same problem. The
solution is to modify the mod_jk.conf-auto file (and save w/ a different
name) as follows: 

#
# The following line mounts all JSP files and the /servlet/ uri to
tomcat
#
JkMount /iristafulfill/servlet/* ajp12
JkMount /iristafulfill/*.jsp ajp12
JkMount /iristafulfill/*.do ajp12
JkMount /iristafulfill/pages/security/j_security_check ajp12

Both of the last two lines were added manually. The first, 'cause
we're using struts and the second for the login page

HTH, 

Mike

At 11/30/2000 09:09 AM -0800, you wrote:
hello,

with 3.2 final I ran into the same problem as the
message below. Is there a solution, so the 8080 is
not necessary, now?

Thanks, Juergen


http://mikal.org/interests/java/tomcat_users/msg09581.html

I am using Tomcat 3.2b6 with mod_jk. When accessing
http://localhost:8080/examples/jsp/security/protected/index.jsp
The login.jsp page works (posts) fine. However, when
accessing through Apache,
http://localhost/examples/jsp/security/protected/index.jsp,
the login.jsp comes up but j_security_check is not
found when I post. Has anyone else had this problem?
Can I manually do the mapping from within web.xml?

 Thanks,
 Charlie



__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 
 Michael H. La Budde    email:  [EMAIL PROTECTED]
 Prosoft, Inc.  phone:  414-860-6509
 [EMAIL PROTECTED]   fax:    414-860-7014
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 



Re: build failed on tomcat

2000-11-30 Thread Craig R. McClanahan

Scott Liu wrote:

> Hi All,
>
> I have installed j2sdk1_3_0 binary version on solaris 2.6
> and had jakarta-ant built. When I tried to build the tomcat
> it failed since there was no class of SAXParserFactory.
> I could not find anything in the j2sdk1_3_0 directories.
> Do I need to install other class libraries to make it work?
>

There are several prerequisites for building Tomcat from sources -- they are
documented (for Tomcat 4.0 at least) in the "README.txt" file in the top level
directory of the source distribution (CVS repository "jakarta-tomcat-4.0").

In particular, the error you got below is because you need to download and
install the Java API for XML Parsing (JAXP) release.  See the readme file for
more details.

>
> Thanks
>
> Scott
>

Craig McClanahan

PS:  All of these steps are required only if you want to build Tomcat from
source.  If you just want to run it, download the binary distribution instead --
everything you need (except for a JDK, and the JSSE classes for SSL) is
included.



Re: build failed on tomcat

2000-11-30 Thread Scott Liu

Now it is being built after I modified the "build.sh" and
"build.xml" to reflect the change of "xml.jar" in
jakarta-ant.

Thanks,

Scott

Robert B. Easter wrote:

> On Thursday 30 November 2000 14:57, Scott Liu wrote:
> > Hi All,
> >
> > I have installed j2sdk1_3_0 binary version on solaris 2.6
> > and had jakarta-ant built. When I tried to build the tomcat
> > it failed since there was no class of SAXParserFactory.
> > I could not find anything in the j2sdk1_3_0 directories.
> > Do I need to install other class libraries to make it work?
> >
> > Thanks
> >
>
> You are missing the Java API for XML Parsing.  When you unzipped the
> jakarta-tomcat, you should find a README file.  You'll have to read it's
> installation steps one by one.  It explains what else you have to install and
> how to setup all of the environment variables etc to make things work
> smoothly.  I'm a novice at Java stuff, but followed the README and it is
> working.  Now I just have to read LOTS more documentation to learn how to
> start making my own stuff.  I come from php/apache and postgresql, so this is
> much different!
>
> > Scott
> >
> > # ./build.sh
> > Searching for build.xml ...
> > Buildfile: /export/home/usr/local/jakarta-tomcat/build.xml
> >
> > BUILD FAILED
> >
> > No JAXP compliant XML parser found. See http://java.sun.com/xml for the
> > reference implementation.
> > java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
> >
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> >
> > at java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Class.java:120)
> > at org.apache.tools.ant.Main.runBuild(Main.java:401)
> > at org.apache.tools.ant.Main.main(Main.java:149)
>
> --
>  Robert B. Easter  [EMAIL PROTECTED] -
> - CompTechNews Message Board   http://www.comptechnews.com/ -
> - CompTechServ Tech Services   http://www.comptechserv.com/ -
> -- http://www.comptechnews.com/~reaster/ 




RE: build failed on tomcat

2000-11-30 Thread Renee Petris

You' need to install an XML parser that is compatible with the Java
  API for XML Parsing (JAXP) specification.  Try Sun's reference
implementation
at: http://java.sun.com/xml. You'll need to add jaxp.jar and parser.jar to
your classpath.


-Original Message-
From: Robert B. Easter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 30, 2000 1:06 PM
To: [EMAIL PROTECTED]
Subject: Re: build failed on tomcat


btw, I'm using JDK 1.2.2 but I don't think it matters

On Thursday 30 November 2000 14:57, you wrote:
> Hi All,
>
> I have installed j2sdk1_3_0 binary version on solaris 2.6
> and had jakarta-ant built. When I tried to build the tomcat
> it failed since there was no class of SAXParserFactory.
> I could not find anything in the j2sdk1_3_0 directories.
> Do I need to install other class libraries to make it work?
>
> Thanks
>
> Scott
>
> # ./build.sh
> Searching for build.xml ...
> Buildfile: /export/home/usr/local/jakarta-tomcat/build.xml
>
> BUILD FAILED
>
> No JAXP compliant XML parser found. See http://java.sun.com/xml for the
> reference implementation.
> java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:120)
> at org.apache.tools.ant.Main.runBuild(Main.java:401)
> at org.apache.tools.ant.Main.main(Main.java:149)

-- 
 Robert B. Easter  [EMAIL PROTECTED] -
- CompTechNews Message Board   http://www.comptechnews.com/ -
- CompTechServ Tech Services   http://www.comptechserv.com/ -
-- http://www.comptechnews.com/~reaster/ 



Re: [ANNOUNCEMENT] Tomcat 3.2 Final Release

2000-11-30 Thread Matt Goss



Michael Percy wrote:

> WOOHOO! Congratulations all Tomcat developers, you rock!

Ditto!!! :)


begin:vcard 
n:Goss;Matt
tel;fax:919-657-1501
tel;work:919-657-1432
x-mozilla-html:FALSE
url:www.rtci.com
org:RTCI;Custom Solutions
adr:;;201 Shannon Oaks Circle;Cary;NC;27511;US
version:2.1
email;internet:[EMAIL PROTECTED]
title:Web Developer
fn:Matt
end:vcard



Re: Postgres Driver.

2000-11-30 Thread Craig R. McClanahan

Sterling wrote:

> H-
>
> Can anyone point me in the direction of a postgres driver so I can hook
> up JSP to work with my postgres database?
> I checked the Postgres website and it's down. 8^(
>

I got my driver by downloading the Postgres source distribution from
.  It's in the "src/interfaces/jdbc" directory,
including a makefile to build it (postgresql.jar).

>
> I'm getting
> javax.servlet.ServletException: Unable to load class postgresql.Driver
> errors when I attempt it.
>

NOTE:  For Postgres 7.0.3 the driver name changed to org.postgresql.Driver.

>
> I believe that's the problem.
>
> Thanks for any information anyone can provide.
> Thanks.
> -Sterling

Craig McClanahan





Re: MVC problem

2000-11-30 Thread Vik P. Solem

OK, this works (tested in Tomcat 3.1).

Extend HttpServlet and implement HttpJspPage. (The easy way is to copy
HttpJspBase.java and then edit the service() method.)

Then have your JSP's (or your servlets I think, but I haven't tested
that yet) extend the new class that you just created.

In the service method you can do any pre processing that you like before
ever getting to the JSP page itself.  This allows you to write a bit of
code once and have it run in front of every page that you want.

I have a dumb example of this for Tomcat 3.1.  For the curious, please
send me email directly, as I'm a bit uncomfortable at the current length
of this thread.

-Vik

"Vik P. Solem" wrote:
> 
> Hello David.
> 
> I don't know if this will help you, but when we needed to perform some
> basic functionality prior to each page request we created a super-class
> for our servlets (actually it was jhtml, not JSP, but it was a while
> ago).
> 
> This super class was a servlet that implemented the method
> service(req,resp), and in that method we did some important global
> things.  We tracked page level security, guaranteed a single thread per
> session (by synchronizing on the session object), and then after/within
> that logic we called super.service(req,resp) which then went on to run
> the appropriate page for us.  (This requires that your JSPs (or servlets
> if you write the controller separately as I'd suggest) extend this
> intermediary class which would in turn extend HttpJspBase.
> 
> I'm not sure if I've explained it very well.  I'd be happy to write a
> better description if you'd like one.  Please feel free to email me
> directly at [EMAIL PROTECTED]
> 
> Assuming that I've described it well enough that it's recognizable, has
> anyone else out there used this approach?
> 
> -Vik
> 
> "Aiken, David" wrote:
> >
> > > hi all..
> > >
> > > We're hitting a problem with the MVC approach in tomcat.
> ...
> --
> Vik P. Solem[EMAIL PROTECTED]781-344-1133
> VikTech Systems Inc.   Built right, now.
> http://www.viktech.com

-- 
Vik P. Solem[EMAIL PROTECTED]781-344-1133
VikTech Systems Inc.   Built right, now.
http://www.viktech.com



Re: connection pool

2000-11-30 Thread Craig R. McClanahan



Landaluze Produktions IS - Carlos wrote:

> in the tomcat conf file (server.xmlk) i have see that there is a conection
> pool for oracle and mysql

This is not actually a connection pool.  It is configuring which JDBC driver
will be used by the JDBCRealm module to look up users for container-managed
security.  You can certainly use SQLServer for this as long as you have a JDBC
driver that supports it -- the details for how to configure the parameters for
this driver should be in the driver's documentation.

The basic entry in server.xml would look similar to the others -- you would
replace the class name with the class name of the driver you want to use, modify
the username and password parameters, and then set up the connection url however
the driver's documentation tells you to.

>
> 1.- is posible to make a conecion pool to a MSQL server?
> 2.- if a am using a JDBC driver (rmijdbc) and the SQLserver ip is
> 192.168.1.3, how can i make a conection pool to this database?
> i dont known how can i do it?
> please help me
> Thaks
> Carlos

Craig McClanahan





Re: Servlet in the middle... in the middle.. in the middle

2000-11-30 Thread Vik P. Solem

As I mentioned on the same thread "MVC problem" (after I had a few false
starts...) you can do your authentication in a single servlet and then
use <%@ page extend="MySecureServlet"%> in your pages so that they all
extend your servlet with the desired functionality.

-Vik

"Craig R. McClanahan" wrote:
> 
> "Bragg, Casey" wrote:
> 
> > Is there a way to do the following?
> >
> > Let's say a user requests /foo/junk.gif, or /foo/test.jsp.
> >
> > I'd like all requests to /foo/* to first be processed by a servlet.
> > The servlet performs some operation (user authentication specifically).
> > If the servlet processing performs normally, I want the request forwarded to
> > the page actually requested (in the case of .jsp files, the page must be
> > processed by the jsp engine first of course).
> >
> > I've set my Tomcat 3.1 up as defined below.  The result is an infinite loop.
> > A request of /foo/junk.gif is redirected to the servlet and then to
> > /foo/junk.gif (which then is redirected to the servlet and then to
> > /foo/junk.gif... and so on).
> >
> 
> This question came up earlier today as well.  The bottom line is that you cannot
> do what you are after in Tomcat 3.x (which is based on the servlet 2.2
> specification).  You can do it by using a Filter from the servlet 2.3 API (which
> Tomcat 4.0 supports).  See my expanded explanation on a thread with subject "MVC
> problem".
> 
> >
> > Thanks so much for your help!
> >
> > ...Casey
> >
> 
> Craig McClanahan

-- 
Vik P. Solem[EMAIL PROTECTED]781-344-1133
VikTech Systems Inc.   Built right, now.
http://www.viktech.com



Re: Tomcat 3.2 tries to read POST data before forwarding to JSP

2000-11-30 Thread Craig R. McClanahan

Duane,

The problem you're referring to doesn't happen to me, even though I use this
kind of programming approach all the time (in Struts).  Do you have a simple
test case that you can send to help us isolate this?

Craig McClanahan


Duane Morse wrote:

> The following partial stack trace illustrates a problem/bug in Tomcat 3.2
> (final release) when a servlet processes
> a POST request and then forwards processing to a JSP.   In "pre-processing",
> Tomcat is trying to read the form
> data, but since it's already been read, it generates a "short read" error.
> Since the servlet API
> specifically says that the forward command allows one servlet to do some
> processing of a message before
> passing on the work to another servlet, this behavior is either a bug in the
> Tomcat 3.2 implementation (trying
> to read the POST data without knowing whether the subsequent servlet wants
> the data) or it's a serious shortcoming
> of the servlet API (you can't ever forward a POST request).
>
> java.lang.IllegalArgumentException: Short Read at
> javax.servlet.http.HttpUtils.parsePostData(HttpUtils.java:238) at
> org.apache.tomcat.util.RequestUtil.readFormData(RequestUtil.java:101) at
> org.apache.tomcat.core.RequestImpl.handleParameters(RequestImpl.java:691) at
> org.apache.tomcat.core.RequestImpl.getParameterValues(RequestImpl.java:259)
> at org.apache.tomcat.core.RequestImpl.getParameter(RequestImpl.java:250) at
> org.apache.tomcat.facade.HttpServletRequestFacade.getParameter(HttpServletRe
> questFacade.java:222) at
> org.apache.jasper.servlet.JspServlet.preCompile(JspServlet.java:326) at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:370) 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.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
> .java:194)
>
> Duane Morse, Eldorado Computing Inc., Phoenix Arizona



MySQL driver

2000-11-30 Thread c cw288

Hi,
I am using tomcat and apache on Solaris 7 and I want to use MySQL as
my JDBC. I need a driver for this. Is mm.mysql driver is the one I
should use and where can I download this driver?

Thanks,
Cathy
_
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com




Import statements in JSP generated servlets

2000-11-30 Thread Elijah Roberts

I have a question regarding the import statements that get inserted into
the servlet code generated from JSP files. Specifically with Tomcat 4,
but it is really just a general JSP question. At the top of each
generated servlet file, Tomcat inserts serveral import statements, such
as:

import java.io.PrintWriter;
import java.io.IOException;
...

In a JSP page that I wrote, I used a PrintWriter object, but forgot to
import it myself in the JSP file. On my test Tomcat box it compiled and
worked properly, because of the import statement that was inserted by
Tomcat when generating the page. When I went to actually deploy it to our
production box, which runs JRun, it would not compile without my adding
an import statement to the top of the JSP.

My question is, what does the JSP spec say about this? The goal for JSP
is to get it to run without modification on any server that supports JSP,
so which behavior is correct? Should Tomcat not import any packages or
objects outside of the javax.servlet package, or is there a set of
packages and classes that should be imported by all JSP compliant
servers? I'm going to go look through the spec, but I thought I'd ask as
someone here probably knows the answer.

Elijah Roberts
[EMAIL PROTECTED]



Don't try to mix jaxp-1.1ea with Tomcat!

2000-11-30 Thread Duane Morse

I've tried for 3 days to get Tomcat 3.2 (b8 and now the final release0
to work with Sun's 1.1 early release of XML parsing software (jaxp-1.1ea),
without success,
so if you're looking for XML parsers to use with your Tomcat build, don't
use these!

Duane Morse, Eldorado Computing Inc., Phoenix Arizona




custom tag life cycle question - are custom tags expensive?

2000-11-30 Thread Dave Harms

I notice that section 5.4.7 of the JSP 1.1 spec states that "at 
execution time the implementation of a JSP will use an available Tag 
instance with the appropriate prefix and name that is not being used, 
initialize it, and then follow the protocol described below. 
Afterwards, it will release the instance and make it available for 
further use."

When I look at my generated JSP code I see new instances of my custom 
tags created on each call to _jspService. This seems to be in 
contravention of the spec which implies a tag instance pool. It would 
also suggest that some care needs to be taken to make custom tags as 
lightweight as possible in the current implementation. 

Thoughts?

Dave

Dave Harms
[EMAIL PROTECTED]




Re: j_security_check mapping

2000-11-30 Thread Mike La Budde

Yes, sorry for the incomplete explanation, iristafulfill is the name of
the project/context that I'm working on. 

In order to integrate the Apache web server w/ Tomcat you need to tell
Apache which "things" to redirect to Tomcat. That is the whole
point of the 

JkMount xyz worker 

lines in your mod_jk.conf-auto file (I have made modifications to mine
and saved it as mod_jk.config)

The login.jsp form that you use must be coded in a specific way (i.e. the
field names, and the POST to action="j_security_check") The
latter, j_security_check, is handled by the AccessInterceptor (a request
interceptor specified in your server.xml file and available in your
distrib. under src/org/apache/tomcat/request/AccessInterceptor.java).
This is why the value "j_security_check" is not a class file.


I hope I've clarified things a bit, please re-read the mod_jk How To for
a much better explanation than I've given here. 

Mike

PS: Jake: If this wasn't satisfactory, please feel free to email me
direct, or give me a call (phone nbr is below)


At 11/30/2000 03:28 PM -0600, you wrote:
Mike,

I'm confused as to what you mean here?  First of all, what is that
"iristafulfill" context?  Is that you own?  I also
looked for a class file called "j_security_check.class" and I
didn't find it anywhere in the sample context or any other context that
comes with 3.2 final.

Can you or someone else be a bit more explicit as to how to get this to
work through Apache on port 80.

Jake


At 12:46 PM 11/30/2000 -0600, you wrote:
I ran in to the same problem. The
solution is to modify the mod_jk.conf-auto file (and save w/ a different
name) as follows: 

#
# The following line mounts all JSP files and the /servlet/ uri to
tomcat
#
JkMount /iristafulfill/servlet/* ajp12
JkMount /iristafulfill/*.jsp ajp12
JkMount /iristafulfill/*.do ajp12
JkMount /iristafulfill/pages/security/j_security_check ajp12

Both of the last two lines were added manually. The first, 'cause
we're using struts and the second for the login page

HTH, 

Mike

At 11/30/2000 09:09 AM -0800, you wrote:
hello,

with 3.2 final I ran into the same problem as the
message below. Is there a solution, so the 8080 is
not necessary, now?

Thanks, Juergen


http://mikal.org/interests/java/tomcat_users/msg09581.html

I am using Tomcat 3.2b6 with mod_jk. When accessing
http://localhost:8080/examples/jsp/security/protected/index.jsp
The login.jsp page works (posts) fine. However, when
accessing through Apache,
http://localhost/examples/jsp/security/protected/index.jsp,
the login.jsp comes up but j_security_check is not
found when I post. Has anyone else had this problem?
Can I manually do the mapping from within web.xml?

 Thanks,
 Charlie



__
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 
 Michael H. La Budde    email:  [EMAIL PROTECTED]
 Prosoft, Inc.  phone:  414-860-6509
 [EMAIL PROTECTED]   fax:    414-860-7014
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 



Tomcat 3.2 ClassCastException after servlet update on getAttribute

2000-11-30 Thread David Rees

I also just tried this on Tomcat 3.2, same problem.

Again, here's the problem:

I have a form which posts to a jsp, which then instantiates a bean with the
data from the form, which then forwards the request to a servlet which does
a getAttribute to obtain then the bean data.  It then forwards on again to
another jsp.

The problem occurs during development:  Updating the servlet causes a
ClassCastException.  Shutting down and restarting Tomcat makes the
ClassCastException go away.

This happens on Tomcat 3.1 and 3.2.  It does not happen on the Tomcat 4.0 m4
build.

Should I post this issue to the -dev list?  It seems like a Tomcat bug to
me.

-Dave

> Replying to my own message:
>
> I just downloaded and tried it under Tomcat 3.1 which showed the same
> problem.  So at least this isn't a new bug.  :-)
>
> I also tried Tomcat 4.0-m4 which works perfectly in for my test case.
>
> > I have a simple test case (which this was generated under) which I can
> > post to the list if anyone is interested.
> >
> > Is this a known bug?  I haven't tried the same thing under Tomcat 3.1
> > yet, as I was under the impression that Tomcat 3.2beta was superior to
> > Tomcat 3.1.
>




formbased security

2000-11-30 Thread John de la Garza

where can I get complete documentation on formbased security?  The servlet
2.2 spec is sufficient.




Re: Import statements in JSP generated servlets

2000-11-30 Thread Craig R. McClanahan

Elijah Roberts wrote:

> I have a question regarding the import statements that get inserted into
> the servlet code generated from JSP files. Specifically with Tomcat 4,
> but it is really just a general JSP question. At the top of each
> generated servlet file, Tomcat inserts serveral import statements, such
> as:
>
> import java.io.PrintWriter;
> import java.io.IOException;
> ...
>

>
> In a JSP page that I wrote, I used a PrintWriter object, but forgot to
> import it myself in the JSP file. On my test Tomcat box it compiled and
> worked properly, because of the import statement that was inserted by
> Tomcat when generating the page. When I went to actually deploy it to our
> production box, which runs JRun, it would not compile without my adding
> an import statement to the top of the JSP.
>
> My question is, what does the JSP spec say about this? The goal for JSP
> is to get it to run without modification on any server that supports JSP,
> so which behavior is correct? Should Tomcat not import any packages or
> objects outside of the javax.servlet package, or is there a set of
> packages and classes that should be imported by all JSP compliant
> servers? I'm going to go look through the spec, but I thought I'd ask as
> someone here probably knows the answer.
>

The default import list is defined in the JSP spec.  For JSP 1.2, it's on p. 47:

java.lang.*
javax.servlet.*
javax.servlet.jsp.*
javax.servlet.http.*

In Tomcat 3.x, a known problem with Jasper was that it generated some additional
non-standard import statements.  It looks like we haven't addressed that problem
yet in Tomcat 4.


>
> Elijah Roberts
> [EMAIL PROTECTED]

Craig McClanahan





Re: Postgres Driver.

2000-11-30 Thread Sterling

H-

Thanks for the reply.

I ftp'd into posrgresql.org but didn't find any src directory. 8^(

Are you saying that you went into this directory and downloaded a file that you
compiled on your system (using root) and it than was able to be called via JSP?
Or was there some other setup and README.txt file that came with it that you
had to use to set it up?

Any other thoughts on where I could find this file in some other location? How
big is this file? KB's or MB's? What's the name of the file? Do you know the
name?
I went to the website and found some ftp directories but nothing that looked
like what I was looking for. I did find a 'source' directory but it didn't have
an interfaces directory. 8^(

I'm using 6.5.3 postgres. Would it be easier to just dl the lastest and
greatest and install that? Would that be a valuable solution? Or would I still
need to locate this extra file and get it somewhere?

Thanks again for any further info.
-Sterling


"Craig R. McClanahan" wrote:

> Sterling wrote:
>
> > H-
> >
> > Can anyone point me in the direction of a postgres driver so I can hook
> > up JSP to work with my postgres database?
> > I checked the Postgres website and it's down. 8^(
> >
>
> I got my driver by downloading the Postgres source distribution from
> .  It's in the "src/interfaces/jdbc" directory,
> including a makefile to build it (postgresql.jar).
>
> >
> > I'm getting
> > javax.servlet.ServletException: Unable to load class postgresql.Driver
> > errors when I attempt it.
> >
>
> NOTE:  For Postgres 7.0.3 the driver name changed to org.postgresql.Driver.
>
> >
> > I believe that's the problem.
> >
> > Thanks for any information anyone can provide.
> > Thanks.
> > -Sterling
>
> Craig McClanahan




RE: Servlet in the middle... in the middle.. in the middle

2000-11-30 Thread Bragg, Casey

Neat solution!  Thanks Vik.

One snafu though this only protects JSPs...  I also need to protect html
and gif files.

Thanks again...

...Casey

==
Casey Bragg - Software Engineer
Allegiance Telecom, Inc.  Dallas, TX
214-261-8679 - [EMAIL PROTECTED]
==


-Original Message-
From: Vik P. Solem [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 30, 2000 4:26 PM
To: [EMAIL PROTECTED]
Subject: Re: Servlet in the middle... in the middle.. in the middle


As I mentioned on the same thread "MVC problem" (after I had a few false
starts...) you can do your authentication in a single servlet and then
use <%@ page extend="MySecureServlet"%> in your pages so that they all
extend your servlet with the desired functionality.

-Vik



web app. mapping configuration

2000-11-30 Thread Stefan Woithe

Hi all,

Using Tomcat 3.2final

In $TOMCAT_HOME/conf/server.xml:

 


In myapp/WEB-INF/web.xml:



MasterServlet


com.hulla.devil.MasterServlet




MasterServlet


/



So I can call

http://localhost:8080/myapp

an it works fine. Now, the servlet includes JSP which contain image tags. The images 
are localted in

myapps/images

and the "src" attribute of the "img" tag reads like:

src="images/myimage1.gif"

The browser asks correctly for

http://localhost:8080/myapp/images/myimage1.gif

PROBLEM: The server doesn't deliver them. Instead it calls the MasterServlet. How to 
write web.xml or organize the myapp subdirectories to enable the pictures to be found? 
One thing is 'must be': The MasterServlet acts like an welcome page (so I never want 
to call something like

http://localhost:8080/myapp/MasterServlet

)

Thank you indeed

Stefan




Re: Postgres Driver.

2000-11-30 Thread Sterling

H-

Thanks for your email.

I found another page that has the download file but not for my version.

I'm using postgres 6.5.3.
Here's the page in case others are looking for it.
http://www.retep.org.uk/postgres/download.html

The closest version I found on this page is 6.5.2. Would it be a problem to use
this version instead?
I really don't know.

-Sterling




"Craig R. McClanahan" wrote:

> Sterling wrote:
>
> > H-
> >
> > Can anyone point me in the direction of a postgres driver so I can hook
> > up JSP to work with my postgres database?
> > I checked the Postgres website and it's down. 8^(
> >
>
> I got my driver by downloading the Postgres source distribution from
> .  It's in the "src/interfaces/jdbc" directory,
> including a makefile to build it (postgresql.jar).
>
> >
> > I'm getting
> > javax.servlet.ServletException: Unable to load class postgresql.Driver
> > errors when I attempt it.
> >
>
> NOTE:  For Postgres 7.0.3 the driver name changed to org.postgresql.Driver.
>
> >
> > I believe that's the problem.
> >
> > Thanks for any information anyone can provide.
> > Thanks.
> > -Sterling
>
> Craig McClanahan




Unsubscribe Help

2000-11-30 Thread Cory C. Omand

After many attempts to unsubscribe, I have still not been
unsubscribed from this list.  Can someone point me to the
correct person to remove me?  I've already sent mail to
tomcat-user-unsubscribe and tomcat-user-help with no result.

Thanks,
c.




  1   2   >