Detecting the end of connection in a pushlet

2001-01-04 Thread xavier . marjou

Hello,

When I use a pushlet HTTP mechanism directly between a browser and tomcat, I can 
register my browser to a pushlet (i.e. send the HTTP request) and receive as many push 
as I want (i.e. receive the different "fragments" of the HTTP response). When I make 
an "exit" in my browser, the pushlet in tomcat detect the end of HTTP connection, 
which is useful in order not to keep to many threads on my server.

But it does not work when I use the same mechanism between a browser and tomcat via 
Apache. When I make an "exit" in the browser, the pushlet does not detect that the 
HTTP connection is finished. I think that this can be normal in this case because what 
I check from my servlet in tomcat is the "HTTP" connection between apache and tomcat, 
and not the connection between the browser and tomcat. Any idea for making it working 
or any documentation where I could go deeper in the subject ?

Thanks,
Xavie Marjou

---
Get free personalized email at http://www.iname.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Jserv

2001-01-04 Thread Nagappan A

Hi,
If UR using Debian GNU/Linux I, can help U out, upto some extent

- Original Message -
From: Andrew Burrows <[EMAIL PROTECTED]>

> Hi Tomcat People.
> I have down loaded the mod_jserv.so file but can find information on where
> to install it, any suggestions?

Regards
Nagappan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Howto: mod_jk ?? + tomcat 3.2.1 + apache 1.3.14 + virtual host

2001-01-04 Thread Nagappan A

Hi,
Let, me know that UR using Debian GNU/Linux ??? If, so how (Where) did U
get mod_jk.so. Please let me know. I'm failing @ that stage.
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 05, 2001 6:32 AM
Subject: Howto: mod_jk + tomcat 3.2.1 + apache 1.3.14 + virtual host


> I can successfully create two virtual hosts ( mod_jk + tomcat 3.2.1 +
> apache 1.3.14 ) with ONE instance of tomcat.  I would like to be able to
> let the tow virtual hosts' owner to start their instance of tomcat.  In
> that case, tomcat's instance will own by them instead of NOBODY.
>
> the currently HOWTO only tell us how to setup two virtual hosts with one
> tomcat instance using mod_jk. ( I know there are lot of document tell you
> how to do this with mod_jserv. )
>
> If anyone has successfully doing this, can you post your configuration.  I
> pretty sure a lot of people will need that too..

Regards
Nagappan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Jserv

2001-01-04 Thread Deepak C S

if you integrating it withapache

place mod_jserv.so in <$APACHEHOMEDIR>/libexec

and add a line to httpd.conf as

Include ""

> --
> From: Andrew Burrows[SMTP:[EMAIL PROTECTED]]
> Reply To: [EMAIL PROTECTED]
> Sent: Friday, January 05, 2001 9:28 AM
> To:   [EMAIL PROTECTED]
> Subject:  Jserv
> 
> 
> Hi Tomcat People.
> I have down loaded the mod_jserv.so file but can find information on where
> to install it, any suggestions?
> 
> Andrew
> 
> 
> 
> Andrew Burrows
> National IT Manager
> Flexstor.net Australia
> 5 Roundhay Court 
> Berwick VIC 3806
> Mobile: 0402300400
> Phone: 613 97073008
> Fax: 613 99236069
> E-mail: [EMAIL PROTECTED]
> cc E-mail: [EMAIL PROTECTED]
> www.flexstornet.com.au
> *
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




mail from Arasu

2001-01-04 Thread Balakrishnan Thirunavukkarasu

Dear Sir,

I am using tomcat engine for my intranet project. We use IIS webserver. My
jsp pages runs quiet good. The isapi- redirector filter works fine too. My
problem is that if I run my jsp pages from a different directory cannot
compile jsp pages.

1. My application(jsp files) - C:\jakarta-tomcat\webapps\ROOT\library 
works fine

2. New application(jsp files) - C:\jakarta-tomcat\webapps\ROOT\inventory
 could not find the file or blank page ie., iis not redirecting the jsp
files to tomcat.

My worker.properties in C:\jakarta-tomcat\conf\ contains

worker.ajp12second.host=tarasu
worker.ajp12second.port=8007
 
worker.ajp12.host=localhost
worker.ajp12.port=8007

My uriworkermap.properties in C:\jakarta-tomcat\conf\ contains

/examples/*.jsp=ajp12
/examples/servlet/*=ajp12

/library/*.jsp=ajp12second
/library/servlet/*=ajp12second

/inventory/*.jsp=ajp12second
/inventory/servlet/*=ajp12second

My server.xml in C:\jakarta-tomcat\conf\ contains ( just few lines)






I would be thankful if you could rectify my error.

Thanking you
regards
Arasu

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: IllegalStateException???

2001-01-04 Thread Ralph Einfeldt

Have a look at the generated source for your jsp.
Maybe tomcat is generating a out.print(SomeThing)
before your forward.

I haven't tried it with tomcat, but with gnujsp
something like
<%!
  some declarations
%>
<%
  some scriptlet doing a forward
%> 

will lead to trouble, because it generates a out.print("\n") for the 
line feed between the declaration and the scriptlet. In Gnujsp you 
have to write:

<%!
  some declarations
%><%
  some scriptlet doing a forward
%>

Maybe this also applies to tomcat ?
> -Ursprüngliche Nachricht-
> Von: Matt Goss [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 4. Januar 2001 19:22
> An: [EMAIL PROTECTED]
> Betreff: Re: IllegalStateException???
> 
> 
> The servlet that gets posted to performs some business logic 
> via JavaBeans and then
> forwards to the display page (in this case, the confirm.jsp) 
> it never gets the output
> stream and it doesn't include any other jsp's.
> 
> //save the changes and then send to confirm page
> Customer tmpcust =
> (Customer)req.getSession(false).getAttribute("tmpcust");
> try{
> logger.log("removing 
> customer:"+tmpcust.getId(), logger.INFO);
> this.clist.removeCustomer(tmpcust.getId());
> logger.log("customer removed", logger.INFO);
> }catch(Exception E){
> logger.log(E, "error removing 
> customer", logger.ERROR);
> req.setAttribute("msg", "error 
> removing customer, check logs");
> 
> this.send(req, resp, 
> this.props.getProperty("error"),
> "editcustomer");
> return;
> }
> this.send(req, resp, 
> this.props.getProperty("confirm"),
> "editcustomer");
> //snip
> public void send(HttpServletRequest req, HttpServletResponse 
> resp, String page, String
> component) throws IOException, ServletException
> {
> RequestDispatcher rd = 
> req.getRequestDispatcher("/"+component+"/"+page);
> rd.forward(req, resp);
> }
> 
> ??? any clue?
> Matt
> 
> Kitching Simon wrote:
> 
> > According to the sun servlet specs, you are **not allowed** to
> > do a forward operation after having called a method to get the
> > output stream, exactly as the message states.
> >
> > Are you sure you have never obtained an output stream
> > before attempting to forward to "confirm.jsp" ??
> >
> > If you have something like
> >   posted data --> servlet1
> >   servlet1 does "include" for "handle-data.jsp"
> >   servlet1 does "forward" to "confirm.jsp"
> > then if handle-data.jsp obtains an output stream, this would
> > exactly explain the problem.
> >
> > I suspect that the first thing *any* jsp page does is grab the
> > output stream, have a look at the generated jsp code for
> > "handle-data.jsp" or whatever your equivalent is.
> >
> > If your situation is different from what I have guessed, then
> > please include more information in your next post - the page
> > you included here looks ok, so the problem is probably in the
> > upstream processing you didn't give any info about!
> >
> > Cheers,
> >
> > Simon
> >
> > > -Original Message-
> > > From: Matt Goss [SMTP:[EMAIL PROTECTED]]
> > > Sent: Thursday, January 04, 2001 4:23 PM
> > > To:   [EMAIL PROTECTED]
> > > Subject:  IllegalStateException???
> > >
> > > Hi everyone,
> > > I just ported an applicaiton onto tomcat 3.2 that ran 
> fine on JRUN 3.0.
> > > The application consists of servlets that accept form 
> posts from JSP's,
> > > they process the data and then forward to other jsp pages. When I
> > > forward to a specific page, the page displays fine, but 
> I'm getting an
> > > error message on my server screen :
> > > 
> > > 2001-01-04 09:53:05 - Ctx( /rollout ):IllegalStateException in: R(
> > > /rollout +/editcomponent/confirm.jsp + null) Cannot forward as
> > > OutputStream or Writer has already been obtained
> > > 
> > > the page is a simple confirmation page and looks like this:
> > > 
> > > 
> > > 
> > > CUSTOMER OPERATION CONFIRMATION
> > >  content="text/html; charset=iso-8859-1">
> > >
> > > 
> > > 
> > > The <%=request.getParameter("cmd")%> operation was successful!
> > > :)
> > > Return to the Customer list
> > > Return to navigation page
> > > 
> > > 
> > > 
> > >
> > > does anyone have any idea what could be causing this???
> > > Matt Goss << File: Card for Matt Goss >>  << File: ATT17765.txt >>
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addi

Looking for a good reference....

2001-01-04 Thread Peter Brandt-Erichsen

Hi folks,

Could you please recommend your
favourite reference for Java Network
Programming or how to use the java.net
package effectively and efficiently...

Thanks
Peter




-Original Message-
From: Riley, Cameron <[EMAIL PROTECTED]>
To: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
Date: Thursday, January 04, 2001 6:11 PM
Subject: RE: TOMCAT 4.0 / Catalina Policy / Reading files


>Craig,
>
>Thanks for your prompt reply.
>
>>The first thing to understand is that security manager support in Tomcat
>4.0 is
>>not complete yet.  This should be fixed within the next couple weeks.  By
>>default, it is not enabled -- the exception above has a different cause.
>
>No worries. Thanks for all your work on Catalina.
>
>>Yes.  The docs about Java2's security model are in the JDK 1.2 or 1.3
>>documentation bundle, under the "Security" heading.
>
>I read through them but have never had to digest them before, hence some
>confusion on my part.
>
>>However, a sealing violation error occurs under the following
>circumstances:
>>* Classes are packaged into JAR files (assume your classes
>>  are in package com.mycompany.mypackage).
>>* JAR files are marked as "sealed" in the JAR manifest entry.
>>* You attempt to load a class in the "com.mycompany.mypackage"
>>  class from some *other* JAR file.
>>
>>The basic idea of sealing is that a Java package can say "all of the
>classes in
>>this package are in this JAR file -- any classes who claim they are part
of
>this
>>package from elsewhere are imposters."
>
>ok I was barking up the wrong tree then, I thought it was the reference to
a
>File Object pointing outside of Tomcat which was causing it.
>
>In my case I have 'mypackage' classes compiled to /WEB-INF/classes without
>being jarred. The particular class and method that is causing the sealed
>Exception is in package com.mycompany.util, the method though uses Objects
>from jdom-b5.jar. The jdom JAR is in the /WEB-INF/lib, it isnt marked
>"sealed" and my classes arent in a JAR. Are classes compiled to
>/WEB-INF/classes assumed sealed? I tried adding a manifest file to the
>/classes/meta-inf directory but to no effect.
>
>
>
>Cameron Riley
>
>
>
>
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, email: [EMAIL PROTECTED]
>
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: tomcat4-4.0-m5-1 RPM available

2001-01-04 Thread Rajas

Hi All,
Got a small Query for you all, Like JSP , is hot deploymennt of java beans
possible in Tomcat??
For eg. If I am using a bean in my jsp and suppose if I make some changes in
the .java file of the bean and recomplie it,will these cahnges in the bean
be effected without restarting the tomcat server
Please help,
Thanking you in Advance.
Regards,
Rajas Kirtane
- Original Message -
From: "GOMEZ Henri" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 14, 2000 8:15 PM
Subject: tomcat4-4.0-m5-1 RPM available


The latest milestone release of Tomcat 4.0, milestone 5, has just been made
available in RPM format at :

http://rpmized.free.fr/

The RPM for apache connector, mod_webapp, will be released ASAP.

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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: CLASSPATH trouble

2001-01-04 Thread kalai selvan

Hi!

This is very usual problem.

In general , CLASSPATH is refer to the set of classes. say, it could be set to
/Lib direcotry or where your *.Jar(set of class files required by the
application is in compressed form) fiels are kept.

In tomcat, you can test your classes putting under the following directory:

/tomcat/webapps/examples/web-inf/classes

if you havc packaged all the classess under one package name, say Demo

keep the class files under the directory
/tomcat/webapps/examples/web-inf/classess/demo

rgds
kalaiselvan



"Dustin M. Hawley" wrote:

> Greetings -
>
> This is my first mail to the list so I hope I don't offend.  I am running
> Tomcat 3.2 under Windows NT 4.0
> and I am having trouble running JSP pages that use Java classes.  I get a
> 500 error (Internal Servlet
> error) when trying to load them.  First of all, tomcat.bat is not building
> CLASSPATH dynamically as it
> should.  After Tomcat is running if I check CLASSPATH by typing "echo
> %CLASSPATH%" at the
> command line I get no results.  I have tried creating TOMCAT_HOME\classes
> and putting the classes
> there with no luck.  Also, in the test tree there are a few JSP documents
> that use classes that do
> not function either.  I have also tried setting CLASSPATH staticly myself
> which does not work either.
> This leaves me to wonder if CLASSPATH is the right variable or if it is even
> being checked by Tomcat
> at any time.  Basically, I just need to know where to put my classes and
> what I need to do to get
> Tomcat to see them.  Everything else under Tomcat seems to be okay.
>
> Thanks in advance,
> Dustin
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Restricting Tomcat to a single IP address?

2001-01-04 Thread Malcolm Kerec

Hi,

I'm having troubles restricting my Tomcat installation to answering to only 
one address on a machine with many IP addresses.  In my config, I have the 
bind address set to the specific IP address that I want to use, however 
requests to other IP's on the box that do not already have a port 80 
(that's the port I'm using instead of 8080) process get answered by 
Tomcat.  This is not an ideal situation & I can't seem to change it!

Any help would be greatly appreciated!  Reply to [EMAIL PROTECTED]

Regards,
Malcolm Kerec

__


Malcolm KerecHealth Communication Network -
Systems AdministratorMedical Director
Email: [EMAIL PROTECTED]
Tel: +61 2 6281 5881

  http://www.hcn.com.au http://www.md.com.au


 The Leader in Health Internet and Clinical Computing
__



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: LDAPRealm

2001-01-04 Thread Martin Smith

This is what I'm looking for, too:  I'm trying to use an LDAP directory
for authentication and authorization.

I'm totally new to Tomcat and just subscribed to this list and am
checking thru the archives:   does the same mechanism authenticate and
obtain additional credentials?

Martin



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Adding authentication such as JDBCRealm

2001-01-04 Thread Martin Smith

Hmm--

I think you have to ask yourself:  how do I know the request came "from
outside the company?"



Martin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Tomcat 4.0 + iPlanet on Solaris

2001-01-04 Thread guyr

iPlanet Web Server from 4.1 onwards has JSP 1.1 support built-in.  Why do
you want to use Tomcat in this environment?

-Original Message-
From: Purav Patel - Sun Microsystems [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 2:21 PM
To: [EMAIL PROTECTED]
Subject: Tomcat 4.0 + iPlanet on Solaris


Hello..

I am running Tomcat-4.0-m4 on Solaris and I would like to integrate it with 
iPlanet Web Server (FastTrack Edition).  However, from what I know there are
no 
connectors currently available for Tomcat 4.0.  So it only runs in
stand-alone 
mode as of now.

Does anybody know if and when a connector is going to be available for
iPlanet 
web servers?

Thanks,
PP





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Jserv

2001-01-04 Thread Andrew Burrows


Hi Tomcat People.
I have down loaded the mod_jserv.so file but can find information on where
to install it, any suggestions?

Andrew



Andrew Burrows
National IT Manager
Flexstor.net Australia
5 Roundhay Court 
Berwick VIC 3806
Mobile: 0402300400
Phone: 613 97073008
Fax: 613 99236069
E-mail: [EMAIL PROTECTED]
cc E-mail: [EMAIL PROTECTED]
www.flexstornet.com.au
*


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




JSP Compile error importing javax.mail

2001-01-04 Thread Brian Sondergaard



I've seen this problem posted before, but I 
couldn't find a solution. Any ideas would be greatly appreciated!
 
I'm attempting to use JavaMail from a JSP, but the 
page will not compile. I recieve the following 
two errors:
 
org.apache.jasper.JasperException: Unable to 
compile class for 
JSP/opt/software/jakarta-tomcat/work/.../_0002fMailTest_0002ejspMailTest_jsp_0.java:15: 
Package javax.mail not found in import.import 
javax.mail.*;   
^/opt/software/jakarta-tomcat/work/.../_0002fMailTest_0002ejspMailTest_jsp_0.java:16: 
Package javax.mail.internet not found in import.import 
javax.mail.internet.*;   ^2 
errors
Here are the first few lines of the 
JSP:
 
<%@page import="java.io.*"%><%@page 
import="java.util.*"%><%@page import="javax.mail.*"%><%@page 
import="javax.mail.internet.*"%>  
 
 
mail.jar and activation.jar are in the WEB-INF/lib 
directory and are included in the resulting classpath as reflected 
in jasper.log: 
 
Classpath according to the Servlet Engine is: ... 
:/WEB-INF/lib/activation.jar:/WEB-INF/lib/mail.jar
 
     is the full path 
to the base directory for the given servlet context.
 
I have a couple of dozen JSP's that use other 
dependent classes. In every case, the packages are imported just like MailTest, 
and the corresponding jar files are in the WEB-INF/lib directory. The situation 
seems to be identical, but the page that attempts to import the JavaMail 
packages will not compile.
 
By the way, there are 17 jar files in my 
WEB-INF/lib directory, all of which are added properly to the classpath produced 
by Tomcat (as seen in Jasper.log). Seemingly by coincidence, mail.jar and 
activation.jar are the last two files specified in the classpath. Could that 
have anything to do with it?
 
This is Tomcat 3.1 on Solaris using 
Apache.
 
Thanks for any 
suggestions!


mod_jk

2001-01-04 Thread Nagappan

Hello,
Where can I, get "mod_jk.so". I'm actually running Debian GNU/Linux.
I, tried with the actual source and compiled myself. That is NOT working
fine. I, tried with RPM's also but I'm NOT able 2 install because of
newer version "mod_jk.so.rpm". Please someone who knows help me out 2
run in Debian GNU/Linux. R, is there NO way for only Debian. Let me know
that, please...

Thankx in advance
Regards
Nagappan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Help with Tomcat

2001-01-04 Thread vincent

you may add to autoexec.bat-
set TOMCAT_HOME=c:\Tomcat4
set JAVA_HOME=c:\JDK1.3

... replace the directories with your own path. =)


- Original Message -
From: "Edgar Deleon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 05, 2001 10:58 AM
Subject: Help with Tomcat


I'm using Visual Age for Java to learn the language.  Visual Age already
contains the Java classes and everything needed to write and run Java
programs.

I installed Tomcat and need to know how to set the JAVA_HOME environment
variable.  Do I need to install the Java SKD 1.2 to be able to set this
variable?

Please help,  Edgar.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: TOMCAT 4.0 / Catalina Policy / Reading files

2001-01-04 Thread Riley, Cameron

Craig,

Thanks for your prompt reply.

>The first thing to understand is that security manager support in Tomcat
4.0 is
>not complete yet.  This should be fixed within the next couple weeks.  By
>default, it is not enabled -- the exception above has a different cause.

No worries. Thanks for all your work on Catalina.

>Yes.  The docs about Java2's security model are in the JDK 1.2 or 1.3
>documentation bundle, under the "Security" heading.

I read through them but have never had to digest them before, hence some
confusion on my part.

>However, a sealing violation error occurs under the following
circumstances:
>* Classes are packaged into JAR files (assume your classes
>  are in package com.mycompany.mypackage).
>* JAR files are marked as "sealed" in the JAR manifest entry.
>* You attempt to load a class in the "com.mycompany.mypackage"
>  class from some *other* JAR file.
>
>The basic idea of sealing is that a Java package can say "all of the
classes in
>this package are in this JAR file -- any classes who claim they are part of
this
>package from elsewhere are imposters."

ok I was barking up the wrong tree then, I thought it was the reference to a
File Object pointing outside of Tomcat which was causing it.

In my case I have 'mypackage' classes compiled to /WEB-INF/classes without
being jarred. The particular class and method that is causing the sealed
Exception is in package com.mycompany.util, the method though uses Objects
from jdom-b5.jar. The jdom JAR is in the /WEB-INF/lib, it isnt marked
"sealed" and my classes arent in a JAR. Are classes compiled to
/WEB-INF/classes assumed sealed? I tried adding a manifest file to the
/classes/meta-inf directory but to no effect. 



Cameron Riley








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Help with Tomcat

2001-01-04 Thread Edgar Deleon



I'm using Visual Age for Java to learn the 
language.  Visual Age already contains the Java classes and everything 
needed to write and run Java programs.
 
I installed Tomcat and need to know how to set the 
JAVA_HOME environment variable.  Do I need to install the Java SKD 1.2 to 
be able to set this variable?
 
Please help,  
Edgar.


Linux mod_jk + Apache help

2001-01-04 Thread W J La Cholter

I'm trying to get a servlet invoked by Apache using mod_jk.  Is there any
magic involved?

I got the RPMs and installed them on Mandrake Linux 7.0 (i586).  The
auto-generated mod_jk.conf refers to the default examples directory, so it
should just work.  However, when I try to access a servlet through
http://localhost/examples/servlet/HelloWorldExample
it fails but
http://localhost:8080/examples/servlet/HelloWorldExample
works.

I turned up the logging level to see if mod_jk gets called, and the log
indicates it does:
[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a
match ajp12

Here are the versions:
tomcat-3.2.1-1
tomcat-mod-3.2.1
apache-1.3.14-2mdk
Sun JDK 1.3

I read the FAQ and the HOWTOs.  I also tried Ajp13 for grins, but that
didn't help.  Any help would be most appreciated.

TIA,
William La Cholter


__
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Howto: mod_jk + tomcat 3.2.1 + apache 1.3.14 + virtual host

2001-01-04 Thread bhkwan

I can successfully create two virtual hosts ( mod_jk + tomcat 3.2.1 +
apache 1.3.14 ) with ONE instance of tomcat.  I would like to be able to
let the tow virtual hosts' owner to start their instance of tomcat.  In
that case, tomcat's instance will own by them instead of NOBODY.

the currently HOWTO only tell us how to setup two virtual hosts with one
tomcat instance using mod_jk. ( I know there are lot of document tell you
how to do this with mod_jserv. )

If anyone has successfully doing this, can you post your configuration.  I
pretty sure a lot of people will need that too..


thanks


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RequestDispatcher and Context Path

2001-01-04 Thread Steve Haines

Is there a way to modify the current context path that a servlet is running
in before forwarding a request to a JSP page?

Here's the scenario:

I have a controller servlet that is accessed as follows:

http://localhost:8080/myapp/myservlet

And the page I want to forward is at:

http://localhost:8080/myapp/myfolder/mypage.jsp

Forwarding it via a RequestDispatcher works fine:

// Forward the request to the proper Url
RequestDispatcher dispatcher = req.getRequestDispatcher(
"/myfolder/mypage.jsp" );
dispatcher.forward( req, res );

But the page itself references other pages and resources relative to it - 

mypage.jsp:
  images/myimage.gif 
  otherpage.jsp

The URLs of those resource are:
http://localhost:8080/myapp/myfolder/images/myimage.gif
http://localhost:8080/myapp/myfolder/otherpage.jsp

Because the URL of the request is
http://localhost:8080/myapp/myservlet

These resources cannot be found - it assumes that the resources are at:
http://localhost:8080/myapp/images/myimage.gif
http://localhost:8080/myapp/otherpage.jsp

*Note the absence of the "myfolder"..

Here are my workarounds:
1. Reference every resource in the jsp page as "myfolder/resource" - but
then my JSP development environment is messed up (cannot preview)
2. Map a new URL to the servlet in the web.xml file "/myfolder/myservlet"
and then somehow send a redirect to the new URL when some first connects, so
it will look like this:
http://localhost:8080/myapp/myfolder/myservlet

I am looking for a way to programmatically tell the Servlet Context where
its Context Path is before the forward, but I am unable to find the proper
function calls..

Any suggestions would be greatly appreciated!

Thanks,
Steve

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




JSP won't return anything if Tomcat 3.2.1 start as nobody.

2001-01-04 Thread bhkwan

jsp page return 404 if I start tomcat 3.2.1 as nobody.  If I start it as
root, jsp is fine.

what is going on?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




TC 3.1 Sessions / http & https

2001-01-04 Thread Shahed Ali



Hi,
 
I am using Tomcat 3.1 w/JDK 1.3 on Intel Solaris 8 with 
StrongHold web server (Apache 1.3.14)
 
I have a webcontext and 2 AjpServMount directives, both 
pointing to the same webapp.
One mount is in the  of Apache, and the 
other in the default server.
 
When I create a session variable under the context and 
access it via http:// , it is not visible 
under https://
 
How can I share the session under both http and https 
?
 
I dont think I had that problem when I used TC 3.2.1 and used 
NamedVirtualHost in Apache.
However, is there anyway to get it to work with TC 3.1 
?
 
Thanks
Shahed
 


Re: CLASSPATH trouble

2001-01-04 Thread Pete Ehli

If you set the classpath I have had to reboot - your better off if you do to
make sure your changes take effect - this is from my experience but maybe my
machine is a letter strange. The classpath is not for your class files and
yes you must set the classpath to point to tool.jar. If you know anything
about java and the api you import your class from the api or from packages
you create or both or you instantiate them with the new statement. Again the
class path is for tomcat not your class files - who cares what it does as
long as tomcat runs. If you look at the examples directory under webapps you
can easily find out where to put your bean classes or packages. The examples
directory is webapps\examples\WEB-INF\classes - examples uses this directory
for class files it's JSP's use. Set your environment variables - get tomcat
to run and mimic the examples directory to see where what goes where. That
is why the examples are there. Also the docs would easily answer you
questions.
-- Pete --


- Original Message -
From: "Dustin M. Hawley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 04, 2001 12:32 PM
Subject: RE: CLASSPATH trouble


>
> I understand how to set the environment variables (which you don't need
> to reboot to instantiate, btw).  I was referring to checking them, which
> can be done at the command line with "echo %YOURVARIABLE%".  This will
> return it's current value.  The trouble is that unless I set the CLASSPATH
> statically Tomcat doesn't seem to set it up dynamically as it should with
> the tomcat.bat file (which I verified using the above command).  My
> JAVA_HOME variable is set to where it should be.  Are you saying that
> CLASSPATH should staticly point to the JDK's tools.jar?  I'm a little
> confused.  I'm thinking that perhaps I was unclear before.  Could someone
> give me a short synopsis of the purpose of the CLASSPATH variable, what
> it should be set to and where I put my class files that are called by
> my JSP documents?
>
> Thanks,
> Dustin
>
>
> -Original Message-
> From: Pete Ehli [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 12:30 PM
> To: [EMAIL PROTECTED]
> Subject: Re: CLASSPATH trouble
>
>
> First off  the command via dos is -- set -- to see the classpath. You set
> environment variables in the system icon via the control panel folder.
Click
> on the environment tab and enter under user variables for Administrator in
> the variable textbox at the bottom CLASSPATHthen in the value
> textbox type C:\jdk1.3\lib\tools.jar  this is a permanent set
> command it is accepted as such by NT. You also need JAVA_HOME and if you
> want ANT_HOME. Look in the docs for these paths or email me directly. Oh
and
> by the way yes tomcat needs to know JAVAHOME and also use the startup.bat
> and shutdown.bat to start and stop tomcat. I would edit this files back to
> there original state and also for environment rules to take place you must
> reboot.
> -- Pete -- [EMAIL PROTECTED]
>
> - Original Message -
> From: "Dustin M. Hawley" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 04, 2001 10:55 AM
> Subject: CLASSPATH trouble
>
>
> >
> > Greetings -
> >
> > This is my first mail to the list so I hope I don't offend.  I am
running
> > Tomcat 3.2 under Windows NT 4.0
> > and I am having trouble running JSP pages that use Java classes.  I get
a
> > 500 error (Internal Servlet
> > error) when trying to load them.  First of all, tomcat.bat is not
building
> > CLASSPATH dynamically as it
> > should.  After Tomcat is running if I check CLASSPATH by typing "echo
> > %CLASSPATH%" at the
> > command line I get no results.  I have tried creating
TOMCAT_HOME\classes
> > and putting the classes
> > there with no luck.  Also, in the test tree there are a few JSP
documents
> > that use classes that do
> > not function either.  I have also tried setting CLASSPATH staticly
myself
> > which does not work either.
> > This leaves me to wonder if CLASSPATH is the right variable or if it is
> even
> > being checked by Tomcat
> > at any time.  Basically, I just need to know where to put my classes and
> > what I need to do to get
> > Tomcat to see them.  Everything else under Tomcat seems to be okay.
> >
> > Thanks in advance,
> > Dustin
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTEC

RE: detecting timeout (was: Session Problem)

2001-01-04 Thread COLE,GLENN (Non-HP-SantaClara,ex2)

>> >HttpSession session = request.getSession();
>> >String username = (String) request.getAttribute("user");
>> >if (username == null) {
>> >... the user is *not* logged on ...
>> >} else {
>> >   ... the user *is* logged on ...
>> >}
[snip]
>> >* If the session has timed out, a new session will be created
>> >  by the logic above -- but the "user" attribute will be missing
>> >  (because the user has not gone through your "login" yet).
>> >  Typically, you would redirect them to the login page here.

>> If the user tries to bookmark a page inside the application,
>> so they can return at a later date without signing on (a no-no),
>> the symptom appears the same.

>That's why I mentioned in the text above to do a check like this on *every*
>request.  Similar code would be needed at the top of every JSP page in a
>servlets+JSP app -- in the Struts Framework

>example application, I demonstrate how to build a nice little custom tag
that
>does this for you so that you don't have to laboriously cut and paste the
code.

No doubt that's a much better solution than my current
<% include file="check_logged_in.jsp" %> hack.  There's
so much to learn


>> So the question I had was:  how can I detect whether they tried this
>> "deep bookmark," or whether the session just timed out?

>If you care, you can try the "check the referer" trick, but if you're going

>to do the same thing anyway (redirect the user to the login page), does it 
>really make a difference?

To me, even though the eventual action is the same, it *does* 
make a difference.

That's because as a user, I'd like to know *why* it is that I'm
being asked to sign on, even though I did so "a little while ago."

I could probably have a more general page that would cover both
bases ("either your session timed out, or you did not use the
login page"), I'd rather be more specific, if doing so is not
an outrageous amount of work.

Thanks for the feedback, Craig!

--Glenn

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




errors trying to execute tutorial

2001-01-04 Thread Bill Evans

When I attempt to execute the jsp tutorial, I get the following error. I
have been successful
executing the servlet examples, but are unable to execute any of the jsp
examples.

Thanks in advance for all help,

2001-01-04 04:09:12 - Ctx( /hellouser ): JasperException: R( /hellouser +
/hellouser.jsp + null) Cannot read file: \hellouser.jsp
2001-01-04 04:09:12 - Ctx( /hellouser ): Exception in: R( /hellouser +
/hellouser.jsp + null) - java.lang.NoSuchMethodError
at
org.apache.tomcat.context.ExceptionHandler.doService(DefaultCMSetter.java:28
1)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java:1147)
at org.apache.tomcat.core.Handler.service(Handler.java:311)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)


BE
Colorado Springs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Slow upload speeds

2001-01-04 Thread wostuff

Hi everyone.

I am using Tomcat-3.2.1 on W2K, Solaris with or without apache. Since I 
need to provide users with functionality to upload fairly big files (> 10 
MB), speed is essential.

My uploader is based on Jason Hunter code. Maximum upload speed I could 
achieve is between 40 and 60 Kbytes/s (even when client and server are on 
the same machine). Bottleneck (quiet predictable) seems to be in 
ServletInputStream misc. "read()" methods. Speed does not seem to be 
dependant on a platform or web server.

Anyone was able to achieve better speeds (at least around 100 kBytes/s)? 
Any ideas ?

Thanks

Andrus


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: TOMCAT 4.0 / Catalina Policy / Reading files

2001-01-04 Thread Craig R. McClanahan

"Riley, Cameron" wrote:

> I would like an directory under the webapp/myapp directory to have
> read,write,delete file permissions. Currently I am getting an Exception;
>
>java.lang.SecurityException: sealing violation
>

The first thing to understand is that security manager support in Tomcat 4.0 is
not complete yet.  This should be fixed within the next couple weeks.  By
default, it is not enabled -- the exception above has a different cause.

>
> when I try to create a File Object from the file in my application. I cant
> get the catalina.policy to open it up;
>
>   grant codeBase "file:${catalina.home}/webapps/myapp/-"
>   {
> permission java.io.FilePermission
> "${catalina.home}/webapps/myapp/myopendirectory/-", "read,write,delete";
>   };
>
> Does the "/-" mean 'and all sub-directories'? I am totally confused on all
> this and couldnt find any documentation on it.
>

Yes.  The docs about Java2's security model are in the JDK 1.2 or 1.3
documentation bundle, under the "Security" heading.

However, a sealing violation error occurs under the following circumstances:
* Classes are packaged into JAR files (assume your classes
  are in package com.mycompany.mypackage).
* JAR files are marked as "sealed" in the JAR manifest entry.
* You attempt to load a class in the "com.mycompany.mypackage"
  class from some *other* JAR file.

The basic idea of sealing is that a Java package can say "all of the classes in
this package are in this JAR file -- any classes who claim they are part of this
package from elsewhere are imposters."

>
> Cameron Riley
>

Craig McClanahan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




nonHttpServlet Support

2001-01-04 Thread Cory Hubert

Does tomcat support non-HttpServlets?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




TOMCAT 4.0 / Catalina Policy / Reading files

2001-01-04 Thread Riley, Cameron



I would like an directory under the webapp/myapp directory to have
read,write,delete file permissions. Currently I am getting an Exception;

   java.lang.SecurityException: sealing violation

when I try to create a File Object from the file in my application. I cant
get the catalina.policy to open it up;

  grant codeBase "file:${catalina.home}/webapps/myapp/-" 
  {
permission java.io.FilePermission
"${catalina.home}/webapps/myapp/myopendirectory/-", "read,write,delete";
  };

Does the "/-" mean 'and all sub-directories'? I am totally confused on all
this and couldnt find any documentation on it.






Cameron Riley




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: detecting timeout (was: Session Problem)

2001-01-04 Thread Craig R. McClanahan

"COLE,GLENN (Non-HP-SantaClara,ex2)" wrote:

> Craig McClanahan writes:
>
> >The strategy I follow is to store a username (or some User object) as a
> session
> >attribute when the user logs on, like this:
> >
> >HttpSession session = request.getSession();
> >String username = ... whatever the username is ...
> >session.setAttribute("user", username);
> >
> >Now on every request, I can check very simply whether the user is logged on
> or
> >not:
> >
> >HttpSession session = request.getSession();
> >String username = (String) request.getAttribute("user");
> >if (username == null) {
> >... the user is *not* logged on ...
> >} else {
> >   ... the user *is* logged on ...
> >}
> [snip]
> >* If the user comes back before the session has timed out,
> >  the "user" attribute will still be present.
> >
> >* If the session has timed out, a new session will be created
> >  by the logic above -- but the "user" attribute will be missing
> >  (because the user has not gone through your "login" yet).
> >  Typically, you would redirect them to the login page here.
>
> If the user tries to bookmark a page inside the application,
> so they can return at a later date without signing on (a no-no),
> the symptom appears the same.
>

That's why I mentioned in the text above to do a check like this on *every*
request.  Similar code would be needed at the top of every JSP page in a
servlets+JSP app -- in the Struts Framework 
example application, I demonstrate how to build a nice little custom tag that
does this for you so that you don't have to laboriously cut and paste the code.

>
> So the question I had was:  how can I detect whether they tried this
> "deep bookmark," or whether the session just timed out?

If you care, you can try the "check the referer" trick, but if you're going to
do the same thing anyway (redirect the user to the login page), does it really
make a difference?

>
> Thanks to the RequestHeaderExample servlet, I think I just found an
> answer.  The header "referer" appears to be set when the page is accessed
> from a link, and contains the full URI of the original page.  (The header
> is not set if the new URI is entered directly.)
>
> Thus, it appears the following will work (Apache 1.3.12 + Tomcat 3.2.1):
>
>String referer = request.getHeader( "referer" );
>if( referer == null  ||  referer.toUpperCase.indexOf( "X.COM" ) < 0 ) {
>   ... deep bookmark ...
>} else {
>   ... timeout ...
>}
>
> Is there a better way?
>

> --Glenn, who should probably lurk longer before asking

Craig McClanahan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




new to tomcat/apache IRIX

2001-01-04 Thread Dave Salisbury


Hope someone can clue me in on the basics here?
Yep, I'm a newbie to servlets.

I'm hoping to set up a servlet and jsp enabled Apache server on
IRIX 6.5, but am having some trouble figuring out 
what to do.

It seems mod_jserv has been superceded by mod_jk.
Fair enough, but where can I get mod_jk.c?  It's not
in the jakarta-tomcat-3.2.1 or 3.1.1 distributions as
the docs seem to indicate, nor in any of the apache
distributions.  Also apxs seems to be only in the
Apache 1.3.9 distribution.  Is this the best/only  Apache version
to use?  I take it I'll also have to compile into Apache mod_so 
to be able to bring in mod_jk, but I'd sure like to forget
about dynamic linking if I can.  Can it all be compiled into
one big footprint?

Any advice out there on Tomcat/Apache setups
that are not loaded on an NT or Linux box will
be greatly appreciated, even if it's just "don't even try it"!

Thanx for any suggestions or info!

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Apache-Tomcat-Jserv-apxs 255 errors

2001-01-04 Thread CC


Greetings,
I have sucessfully installed apache 1.3.14 and tomcat on red hat linux 6.2-
apache and tomcat work great separately, but when i attempt to compile
jakarta-tomcat/src/native/apache/jserv
with the command: apxs -c -o mod_jserv.so *.c
I get the following errors:

gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED  
-I/u
sr/local/apache/include  -c mod_jserv.c
  -o mod_jserv.so mod_jserv.o jserv_wrapper_win.o jserv_wrapper_unix.o
jserv_wra
pper.o jserv_watchdog.o jserv_utils.o jserv_status.o jserv_protocols.o
jserv_mma
p.o jserv_image.o jserv_balance.o jserv_ajpv12.o jserv_ajpv11.o autochange.o
apxs:Break: Command failed with rc=255

At which point I'm dead in the water. Would anyone have any ideas?
Thanks for your assistance.
Curt Cearley


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: JSP won't return anything if Tomcat 3.2.1 start as nobody.

2001-01-04 Thread Trevor Little

Your problem most likely has to do with your permissions... maybe some
of your jsps are owned by root. You can recursivly change all the
permissions in a directory by doing
# chown -R nobody:nobody /dir/you/want/to/change


[EMAIL PROTECTED] wrote:
> 
> jsp page return 404 if I start tomcat 3.2.1 as nobody.  If I start it as
> root, jsp is fine.
> 
> what is going on?
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: JSP won't return anything if Tomcat 3.2.1 start as nobody.

2001-01-04 Thread Craig R. McClanahan

[EMAIL PROTECTED] wrote:

> jsp page return 404 if I start tomcat 3.2.1 as nobody.  If I start it as
> root, jsp is fine.
>
> what is going on?
>

First, this is a user question better served on TOMCAT-USER, not on TOMCAT-DEV
-- please do not cross post.

Second, the most likely explanation is your operating system permissions are not
set so that user "nobody" can read the files.

Craig McClanahan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




JSP won't return anything if Tomcat 3.2.1 start as nobody.

2001-01-04 Thread bhkwan

jsp page return 404 if I start tomcat 3.2.1 as nobody.  If I start it as
root, jsp is fine.

what is going on?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Jikes integration with Tomcat and JDK1.2.2

2001-01-04 Thread Hawkins, Keith (Keith)


I thought I would try to use Jikes as the compiler of choice for Tomcat to
use when compiling JSPs into Servlets.  I downloaded jikes and tried to
compile a simple test app with it to verify that it works before trying to
get Tomcat to use it.  My test compiles fail with Jikes complaining that the
standard jdk jar files   (rt.jar, src.jar) etc. are an "invalid zip format"
and that it can't find packages java/lang and java/util because of this.

Has anyone seen this with Jikes?  What is the workaround?

I am using Jikes 1.12 and running under WinNT4.0,  if that helps.

Thanks,
Keith




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




detecting timeout (was: Session Problem)

2001-01-04 Thread COLE,GLENN (Non-HP-SantaClara,ex2)

Craig McClanahan writes:

>The strategy I follow is to store a username (or some User object) as a
session
>attribute when the user logs on, like this:
>
>HttpSession session = request.getSession();
>String username = ... whatever the username is ...
>session.setAttribute("user", username);
>
>Now on every request, I can check very simply whether the user is logged on
or
>not:
>
>HttpSession session = request.getSession();
>String username = (String) request.getAttribute("user");
>if (username == null) {
>... the user is *not* logged on ...
>} else {
>   ... the user *is* logged on ...
>}
[snip]
>* If the user comes back before the session has timed out,
>  the "user" attribute will still be present.
>
>* If the session has timed out, a new session will be created
>  by the logic above -- but the "user" attribute will be missing
>  (because the user has not gone through your "login" yet).
>  Typically, you would redirect them to the login page here.

If the user tries to bookmark a page inside the application,
so they can return at a later date without signing on (a no-no),
the symptom appears the same.

So the question I had was:  how can I detect whether they tried this
"deep bookmark," or whether the session just timed out?

Thanks to the RequestHeaderExample servlet, I think I just found an
answer.  The header "referer" appears to be set when the page is accessed
from a link, and contains the full URI of the original page.  (The header
is not set if the new URI is entered directly.)

Thus, it appears the following will work (Apache 1.3.12 + Tomcat 3.2.1):

   String referer = request.getHeader( "referer" );
   if( referer == null  ||  referer.toUpperCase.indexOf( "X.COM" ) < 0 ) {
  ... deep bookmark ...
   } else {
  ... timeout ...
   }

Is there a better way?

--Glenn, who should probably lurk longer before asking

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: CLASSPATH trouble

2001-01-04 Thread Dustin M. Hawley


Michael, Jianming and Pete -

Thanks a lot!  I finally got it working.

-Original Message-
From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 12:18 PM
To: '[EMAIL PROTECTED]'
Subject: RE: CLASSPATH trouble


classes imported in jsp's should be under ./Web-inf/classes/
and jars under ./Web-inf/lib/

/webapps/app/Web-inf/
  |
  \-/classes/
  |
  \-/com/
  |
  \-/...


The important part to notice about the CLASSPATH is:


if exist "%TOMCAT_HOME%\lib\ant.jar" set CP=%CP%;%TOMCAT_HOME%\lib\ant.jar
if exist "%TOMCAT_HOME%\lib\jasper.jar" set
CP=%CP%;%TOMCAT_HOME%\lib\jasper.jar
if exist "%TOMCAT_HOME%\lib\jaxp.jar" set CP=%CP%;%TOMCAT_HOME%\lib\jaxp.jar
if exist "%TOMCAT_HOME%\lib\parser.jar" set
CP=%CP%;%TOMCAT_HOME%\lib\parser.jar
if exist "%TOMCAT_HOME%\lib\servlet.jar" set
CP=%CP%;%TOMCAT_HOME%\lib\servlet.jar
if exist "%TOMCAT_HOME%\lib\webserver.jar" set
CP=%CP%;%TOMCAT_HOME%\lib\webserver.jar


as you can see the tomcat jars need to be able to be found in the CLASSPATH.
The CLASSPATH environ var tells the JVM where to look for classes that it
needs.

Hope this straightens everything out for you...


---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: a simple test to charset

2001-01-04 Thread Kitching Simon

Very interesting - a concrete example is always more interesting
to investigate than an abstract bug!

So I gave your code a try and it worked fine on my system!
I can't imagine what might be making it run for me but not run for you..

Just a by-the-way: I think you should also be setting
the charset attribute of the content type for safety,
but I have to admit I don't either, and accents have
always worked fine for me.

How I run it (ie how it works fine):
* tomcat 3.2.1 on HPUX
* Microsoft IE4 as the browser
* I set up a specific servlet-mapping to run the HelloWorldExample,
  rather than running it through the invoker servlet. (I had deliberately
  turned off the invoker servlet a long time ago; funny enough, I
  can't seem to get it running again now...)


You might want to try using a url-encoded version of your url, ie
not
http://my_ip/servlet/HelloWorldExample?name=André
but
http://my_ip/servlet/HelloWorldExample?name=Andr%E9

Actually, though, both of these work OK for me anyway.

I'll have a think about this tomorrow (home time now) -
good luck tracking this down...

Simon
> -Original Message-
> From: André Alves [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 9:06 PM
> To:   [EMAIL PROTECTED]
> Subject:  a simple test to charset
> 
> I, made the following test:
> import java.io.*;
> import java.text.*;
> import java.util.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
> 
> public class HelloWorldExample extends HttpServlet
> {
>   public void doGet(HttpServletRequest request, HttpServletResponse
> response) throws IOException, ServletException
>   {
> String strName = request.getParameter("name"); 
> response.setContentType("text/html");
> PrintWriter out = response.getWriter();
> 
> out.println("");
> out.println("");
> out.println("");
> out.println("");
> out.println("");
> out.println("start");
> out.println("");
> out.println("Name = "+strName);
> out.println("");
> out.println("end");
> out.println("");
> out.println("");
>   }
> }
> 
> And I invoke this servlet with the url:
> http://my_ip/servlet/HelloWorldExample?name=André
> 
> The html responde is:
> 
> start
> Name: Andr
> end
> 
> Tomcat did not catch special caracter "é". 
> 
> __
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: CLASSPATH trouble

2001-01-04 Thread Wang, Jianming

There are two places you can put your classes.
1. someapp/WEB-INF/classes/
   put your class files (including their package structure) directly under
this "classes" folder.
2. someapp/WEB-INF/lib/
   if your classes are in a jar file, put the jar file directly under this
"lib" folder.

Hope this help

-Original Message-
From: Dustin M. Hawley [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 3:33 PM
To: '[EMAIL PROTECTED]'
Subject: RE: CLASSPATH trouble



I understand how to set the environment variables (which you don't need
to reboot to instantiate, btw).  I was referring to checking them, which
can be done at the command line with "echo %YOURVARIABLE%".  This will
return it's current value.  The trouble is that unless I set the CLASSPATH
statically Tomcat doesn't seem to set it up dynamically as it should with
the tomcat.bat file (which I verified using the above command).  My
JAVA_HOME variable is set to where it should be.  Are you saying that
CLASSPATH should staticly point to the JDK's tools.jar?  I'm a little
confused.  I'm thinking that perhaps I was unclear before.  Could someone
give me a short synopsis of the purpose of the CLASSPATH variable, what
it should be set to and where I put my class files that are called by
my JSP documents?

Thanks,
Dustin


-Original Message-
From: Pete Ehli [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 12:30 PM
To: [EMAIL PROTECTED]
Subject: Re: CLASSPATH trouble


First off  the command via dos is -- set -- to see the classpath. You set
environment variables in the system icon via the control panel folder. Click
on the environment tab and enter under user variables for Administrator in
the variable textbox at the bottom CLASSPATHthen in the value
textbox type C:\jdk1.3\lib\tools.jar  this is a permanent set
command it is accepted as such by NT. You also need JAVA_HOME and if you
want ANT_HOME. Look in the docs for these paths or email me directly. Oh and
by the way yes tomcat needs to know JAVAHOME and also use the startup.bat
and shutdown.bat to start and stop tomcat. I would edit this files back to
there original state and also for environment rules to take place you must
reboot.
-- Pete -- [EMAIL PROTECTED]

- Original Message -
From: "Dustin M. Hawley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 04, 2001 10:55 AM
Subject: CLASSPATH trouble


>
> Greetings -
>
> This is my first mail to the list so I hope I don't offend.  I am running
> Tomcat 3.2 under Windows NT 4.0
> and I am having trouble running JSP pages that use Java classes.  I get a
> 500 error (Internal Servlet
> error) when trying to load them.  First of all, tomcat.bat is not building
> CLASSPATH dynamically as it
> should.  After Tomcat is running if I check CLASSPATH by typing "echo
> %CLASSPATH%" at the
> command line I get no results.  I have tried creating TOMCAT_HOME\classes
> and putting the classes
> there with no luck.  Also, in the test tree there are a few JSP documents
> that use classes that do
> not function either.  I have also tried setting CLASSPATH staticly myself
> which does not work either.
> This leaves me to wonder if CLASSPATH is the right variable or if it is
even
> being checked by Tomcat
> at any time.  Basically, I just need to know where to put my classes and
> what I need to do to get
> Tomcat to see them.  Everything else under Tomcat seems to be okay.
>
> Thanks in advance,
> Dustin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: CLASSPATH trouble

2001-01-04 Thread Michael Wentzel

classes imported in jsp's should be under ./Web-inf/classes/
and jars under ./Web-inf/lib/

/webapps/app/Web-inf/
  |
  \-/classes/
  |
  \-/com/
  |
  \-/...


The important part to notice about the CLASSPATH is:


if exist "%TOMCAT_HOME%\lib\ant.jar" set CP=%CP%;%TOMCAT_HOME%\lib\ant.jar
if exist "%TOMCAT_HOME%\lib\jasper.jar" set
CP=%CP%;%TOMCAT_HOME%\lib\jasper.jar
if exist "%TOMCAT_HOME%\lib\jaxp.jar" set CP=%CP%;%TOMCAT_HOME%\lib\jaxp.jar
if exist "%TOMCAT_HOME%\lib\parser.jar" set
CP=%CP%;%TOMCAT_HOME%\lib\parser.jar
if exist "%TOMCAT_HOME%\lib\servlet.jar" set
CP=%CP%;%TOMCAT_HOME%\lib\servlet.jar
if exist "%TOMCAT_HOME%\lib\webserver.jar" set
CP=%CP%;%TOMCAT_HOME%\lib\webserver.jar


as you can see the tomcat jars need to be able to be found in the CLASSPATH.
The CLASSPATH environ var tells the JVM where to look for classes that it
needs.

Hope this straightens everything out for you...


---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




connection problem

2001-01-04 Thread Laszlo Szakacs

Hi,

I am using tomcat 4.0 m5 with apache web server 1.3.14. I checked the jsp
and servlet examples shipped with tomcat but didn't work. 
Then I was looking through the tomcat's configuration file server.xml and I
found that I need to add some lines in the httpd.conf of the web server in
order to tell the web server which http port is used to listen for any
(servelt&jsp) request by tomcat (kind of glue between the two). By default
this port in server.xml was set to 8008 under the "tomcat-apache" 
 tag. The comment in the server.xml showed 3 additional lines
that I have to add in httpd.conf. The first line will load an intermediate
module the second line specifies the tomcat's port number 8008 and the third
will mount the examples web application. Now, if I am correct so far, under
windows nt I need a mod_webapp.dll whose source file I found in the src
folder (in the same folder I also found mod_webapp.so for unix). So finally
I think I need to get or build a mod_webapp.dll in order to link the web
server and the servlet-jsp container. Can you provide me that dll file or
should I build it or you have another suggestion?

Please send any respond to this email or [EMAIL PROTECTED]
thank you, in advance
Laszlo Szakacs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: CLASSPATH trouble

2001-01-04 Thread Dustin M. Hawley


What should the CLASSPATH variable include?  I've tried
pointing it to several directories and even to specific
files and I still cannot access JSP documents that reference
these external class files.  If you'd like I can paste the
error message that Tomcat reports (essentially error 500,
internal servlet error, unable to load class).

-Original Message-
From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 11:59 AM
To: '[EMAIL PROTECTED]'
Subject: RE: CLASSPATH trouble


I think it's actually better to either set your environ variables
it the batch files.  This way you don't have to deal with rebooting
you just restart the tomcat process.  It's all a matter of 
preferences though...


---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: CLASSPATH trouble

2001-01-04 Thread Dustin M. Hawley


I understand how to set the environment variables (which you don't need
to reboot to instantiate, btw).  I was referring to checking them, which
can be done at the command line with "echo %YOURVARIABLE%".  This will
return it's current value.  The trouble is that unless I set the CLASSPATH
statically Tomcat doesn't seem to set it up dynamically as it should with
the tomcat.bat file (which I verified using the above command).  My
JAVA_HOME variable is set to where it should be.  Are you saying that
CLASSPATH should staticly point to the JDK's tools.jar?  I'm a little
confused.  I'm thinking that perhaps I was unclear before.  Could someone
give me a short synopsis of the purpose of the CLASSPATH variable, what
it should be set to and where I put my class files that are called by
my JSP documents?

Thanks,
Dustin


-Original Message-
From: Pete Ehli [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 04, 2001 12:30 PM
To: [EMAIL PROTECTED]
Subject: Re: CLASSPATH trouble


First off  the command via dos is -- set -- to see the classpath. You set
environment variables in the system icon via the control panel folder. Click
on the environment tab and enter under user variables for Administrator in
the variable textbox at the bottom CLASSPATHthen in the value
textbox type C:\jdk1.3\lib\tools.jar  this is a permanent set
command it is accepted as such by NT. You also need JAVA_HOME and if you
want ANT_HOME. Look in the docs for these paths or email me directly. Oh and
by the way yes tomcat needs to know JAVAHOME and also use the startup.bat
and shutdown.bat to start and stop tomcat. I would edit this files back to
there original state and also for environment rules to take place you must
reboot.
-- Pete -- [EMAIL PROTECTED]

- Original Message -
From: "Dustin M. Hawley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 04, 2001 10:55 AM
Subject: CLASSPATH trouble


>
> Greetings -
>
> This is my first mail to the list so I hope I don't offend.  I am running
> Tomcat 3.2 under Windows NT 4.0
> and I am having trouble running JSP pages that use Java classes.  I get a
> 500 error (Internal Servlet
> error) when trying to load them.  First of all, tomcat.bat is not building
> CLASSPATH dynamically as it
> should.  After Tomcat is running if I check CLASSPATH by typing "echo
> %CLASSPATH%" at the
> command line I get no results.  I have tried creating TOMCAT_HOME\classes
> and putting the classes
> there with no luck.  Also, in the test tree there are a few JSP documents
> that use classes that do
> not function either.  I have also tried setting CLASSPATH staticly myself
> which does not work either.
> This leaves me to wonder if CLASSPATH is the right variable or if it is
even
> being checked by Tomcat
> at any time.  Basically, I just need to know where to put my classes and
> what I need to do to get
> Tomcat to see them.  Everything else under Tomcat seems to be okay.
>
> Thanks in advance,
> Dustin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: CLASSPATH trouble

2001-01-04 Thread Michael Wentzel

I think it's actually better to either set your environ variables
it the batch files.  This way you don't have to deal with rebooting
you just restart the tomcat process.  It's all a matter of 
preferences though...


---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: CLASSPATH trouble

2001-01-04 Thread Pete Ehli

First off  the command via dos is -- set -- to see the classpath. You set
environment variables in the system icon via the control panel folder. Click
on the environment tab and enter under user variables for Administrator in
the variable textbox at the bottom CLASSPATHthen in the value
textbox type C:\jdk1.3\lib\tools.jar  this is a permanent set
command it is accepted as such by NT. You also need JAVA_HOME and if you
want ANT_HOME. Look in the docs for these paths or email me directly. Oh and
by the way yes tomcat needs to know JAVAHOME and also use the startup.bat
and shutdown.bat to start and stop tomcat. I would edit this files back to
there original state and also for environment rules to take place you must
reboot.
-- Pete -- [EMAIL PROTECTED]

- Original Message -
From: "Dustin M. Hawley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 04, 2001 10:55 AM
Subject: CLASSPATH trouble


>
> Greetings -
>
> This is my first mail to the list so I hope I don't offend.  I am running
> Tomcat 3.2 under Windows NT 4.0
> and I am having trouble running JSP pages that use Java classes.  I get a
> 500 error (Internal Servlet
> error) when trying to load them.  First of all, tomcat.bat is not building
> CLASSPATH dynamically as it
> should.  After Tomcat is running if I check CLASSPATH by typing "echo
> %CLASSPATH%" at the
> command line I get no results.  I have tried creating TOMCAT_HOME\classes
> and putting the classes
> there with no luck.  Also, in the test tree there are a few JSP documents
> that use classes that do
> not function either.  I have also tried setting CLASSPATH staticly myself
> which does not work either.
> This leaves me to wonder if CLASSPATH is the right variable or if it is
even
> being checked by Tomcat
> at any time.  Basically, I just need to know where to put my classes and
> what I need to do to get
> Tomcat to see them.  Everything else under Tomcat seems to be okay.
>
> Thanks in advance,
> Dustin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Servlet error I can't seem to resolve

2001-01-04 Thread Michael Wentzel

is your web.xml set up correctly for the class?

for example:


servletname


com.pkg.here.ServletName




servletname


/servletname/



Show the configuration you are using for the servlet in your web.xml
if you do already have this set up.

I don't believe this is a problem with TOMCAT finding the lib dir
but more like TOMCAT not being told where the Servlet is located.


---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




a simple test to charset

2001-01-04 Thread André Alves

I, made the following test:
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloWorldExample extends HttpServlet
{
  public void doGet(HttpServletRequest request, HttpServletResponse
response) throws IOException, ServletException
  {
String strName = request.getParameter("name"); 
response.setContentType("text/html");
PrintWriter out = response.getWriter();

out.println("");
out.println("");
out.println("");
out.println("");
out.println("");
out.println("start");
out.println("");
out.println("Name = "+strName);
out.println("");
out.println("end");
out.println("");
out.println("");
  }
}

And I invoke this servlet with the url:
http://my_ip/servlet/HelloWorldExample?name=André

The html responde is:

start
Name: Andr
end

Tomcat did not catch special caracter "é". 

__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Missing wrapper.properties file

2001-01-04 Thread Pete Ehli

Just unzip tomcat again in a temp folder and add this file. You must of
deleted it by accident. I have a spare folder with the default files just
for this reason.

- Original Message -
From: "Gillespie, Robert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 04, 2001 2:19 AM
Subject: Missing wrapper.properties file


> In your documentation, it says:
> Locate the wrapper.properties template file in your Tomcat conf directory.
> There is no wrapper.properties file in that folder.
>
> Please send me the file or tell me a solution.
>
> Thank you very much,
>
> Robert Gillespie
> Sony EU Project
>
>
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed.
> Sony cannot accept liability for statements made which are clearly
> the sender's own and not made on behalf of Sony.
> (01)
> **
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Session Problem

2001-01-04 Thread Michael Wentzel

> HttpSession session = request.getSession();

Also, the request.getSession() method is overloaded as
request.getSession(boolean) with the boolean param specifying
whether to create a new session if one does not exist, i.e.
if request.getSession(false) is used a new HttpSession will
not be instantiated if one does not already exist.  This
allows for more specific user checking in that you can check
if there is a valid session as well as if there is a valid
user stored in the session.


 ---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Session Problem

2001-01-04 Thread Michael Wentzel
Title: RE: Session Problem



You can also set 
the server timeout in TOMCAT_HOME/conf/web.xml
or in your 
individual webapp web.xml in the:
 
    
    
    
30    
    

block.
 ---Michael WentzelSoftware Developerhttp://www.aswethink.com">Software As We 
Thinkmailto:[EMAIL PROTECTED]">Michael 
Wentzel


RE: Session Problem

2001-01-04 Thread Kitching Simon

And the "default" timeout for sessions can be set in your
web.xml file with:



30



The value is in minutes...

Cheers,

Simon

> -Original Message-
> From: Jeff Fletcher [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 8:36 PM
> To:   '[EMAIL PROTECTED]'
> Subject:  RE: Session Problem
> 
> HttpSession session = request.getSession(true);
> session.setMaxInactiveInterval(300);
>  
> Will set the timeout to 5 minutes (300 seconds).
>  
> Jeff
>  
> 
>   -Original Message-
>   From: Mike Campbell [mailto:[EMAIL PROTECTED]]
>   Sent: Thursday, January 04, 2001 12:37 PM
>   To: '[EMAIL PROTECTED]'
>   Subject: RE: Session Problem
>   
>   
> 
>   Craig (or anyone), 
> 
>   > You might want to turn your thinking inside out on how to 
>   > handle this problem 
>   > :-). 
> 
>   I came in on this discussion thread mid-strand, and have a question.
> Your code snipped on session handling made perfect sense, and really made
> the session-handling issue finally "click" for me.  My question is about
> timeouts; where is the timeout value set?
> 
>   Thanks 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Q:load on startup

2001-01-04 Thread Michael Wentzel

> Are there any other log messages besides "cannot load 
> servlet" that might be
> helpful in figuring this out (like a stack trace)?

Got it.  I was swallowing an Exception deep in the tree
so it looked like the class was never getting loaded.
An Exception in the init() method was causing the problem.


 ---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Servlet error I can't seem to resolve

2001-01-04 Thread Lin Gan

I got same problem. Someone can help me?

Hi,
I try to run Servlet from TOMCAT, but it has error.
Please give me some help!

The Servlet is to access Oracle DB. V8i. from the
Travel DB that I download from Oracle site. I use
Jdeveloper 3.1.1.2 to create this project. It compiles
and runs fine in Jdeveloper. When I try to deploy it
to TOMCAT, it has the following error message:

Error: 500
Location: /examples/servlet/test/test
Internal Servlet Error:
java.lang.NullPointerException
at java.lang.ClassLoader.resolveClass0(Native Method)
at
java.lang.ClassLoader.resolveClass(ClassLoader.java:588)
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:430)
at
org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoader.java:174)
at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:265)
at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
at
org.apache.tomcat.core.Handler.service(Handler.java:254)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)




It looks to me like Tomcat cannot fine the lib files.

Also, the test.jar deployment file has sub directory.
If I unzip them to
“F:\tomcat\jakarta-tomcat-3.2\webapps\examples\WEB-INF\classes”,
it will create several sub directories and jar files.
How can I run the “test.class” file, if the file is in
a sub directory say “myproject”? Can Tomcat get the
lib and attachment file from all the sub directory?



Thanks very much.


kenny


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Session Problem

2001-01-04 Thread Craig R. McClanahan


Mike Campbell wrote:
 
Craig (or anyone),
> You might want to turn your thinking inside out on how
to
> handle this problem
> :-).
I came in on this discussion thread mid-strand, and have
a question.  Your code snipped on session handling made perfect sense,
and really made the session-handling issue finally "click" for me
I'm glad it helped.
.  My question is about timeouts;
where is the timeout value set?
 
The default timeout value is set in the web.xml file, like this:
    
    
   
30 
    
    
but at any time, you can change the timeout for an individual session
by calling session.setMaxInactiveInterval() with a new value (measured
in seconds).
 
Thanks
Craig McClanahan
 


RE: Session Problem

2001-01-04 Thread Jeff Fletcher
Title: RE: Session Problem



    HttpSession session = 
request.getSession(true);
    
session.setMaxInactiveInterval(300);
 
Will 
set the timeout to 5 minutes (300 seconds).
 
Jeff
 

  -Original Message-From: Mike Campbell 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, January 04, 2001 12:37 
  PMTo: '[EMAIL PROTECTED]'Subject: RE: 
  Session Problem
  Craig (or anyone), 
  > You might want to turn your thinking inside out on how to 
  > handle this problem > 
  :-). 
  I came in on this discussion thread mid-strand, and have a 
  question.  Your code snipped on session handling made perfect sense, and 
  really made the session-handling issue finally "click" for me.  My 
  question is about timeouts; where is the timeout value set?
  Thanks 


Re: Tomcat 4.0 + iPlanet on Solaris

2001-01-04 Thread Craig R. McClanahan

Purav Patel - Sun Microsystems wrote:

> Hello..
>
> I am running Tomcat-4.0-m4 on Solaris and I would like to integrate it with
> iPlanet Web Server (FastTrack Edition).  However, from what I know there are no
> connectors currently available for Tomcat 4.0.  So it only runs in stand-alone
> mode as of now.
>
> Does anybody know if and when a connector is going to be available for iPlanet
> web servers?
>

The plan is to get the new connector working for Apache on Unix platforms first,
and then expand from there to supporting iPlanet and IIS as Tomcat 3.2 does.  How
long it takes is totally a function of how many volunteers are willing to work on
creating and debugging this code.

Additional assistance would be welcomed.

>
> Thanks,
> PP
>

Craig McClanahan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Q:load on startup

2001-01-04 Thread Craig R. McClanahan

Michael Wentzel wrote:

> When trying to configure a servlet to load
> at server startup using:
>
> 
> 
> PDFStyle
> 
> 
> reporting.PDFStyleServlet
> 
> 
>   -2147483645
> 
> 
>
> I get the following:
>
> cannot load servlet name: PDFStyle
>
> The class file is in the Web-inf/classes/reporting path
> as it should be but it's still not loading.
>

Is your class file is actually at

WEB-INF/classes/reporting/PDFStyleServlet.class

and is it compiled into package "reporting"?

Are there any other log messages besides "cannot load servlet" that might be
helpful in figuring this out (like a stack trace)?

>
> Any ideas on what's wrong?  Is this the correct form for
> the load-on-startup tag in web.xml?  What does the integer
> represent(classid...)?
>

It represents the order in which servlets are loaded, if there is more than
one.  See the servlet spec 
for details.

>
> ---
> Michael Wentzel

Craig McClanahan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Session Problem

2001-01-04 Thread Mike Campbell
Title: RE: Session Problem





Craig (or anyone),


> You might want to turn your thinking inside out on how to 
> handle this problem
> :-).


I came in on this discussion thread mid-strand, and have a question.  Your code snipped on session handling made perfect sense, and really made the session-handling issue finally "click" for me.  My question is about timeouts; where is the timeout value set?

Thanks





Re: finding the root directory of an application (in a war-compatible way)

2001-01-04 Thread Craig R. McClanahan

Guillaume Barreau wrote:

> Dear tomcat users,
>
> How do I find the root directory of the application to which a servlet belongs?
> I know that the following works:
> getServletContext().getRealPath("")
>
> But the documentation on getRealPath warns me that this is not going to work if
> my application is deployed as a war file.
> Is there a way of doing this that would work with war?
> Say I want to access file foo.txt that is in the root directory of my
> application. How do I get to this file if the application is deployed as a war
> file?
>

To access a resource within your web app, in a manner that works even on servlet
containers that run directly from a WAR, do something like the following:

InputStream is =
  getServletContext().getResourceAsStream("/WEB-INF/myprops.properties");

Now, you can load the "myprops.properties" resource in a manner that is totally
portable.

>
> Thanks for any help,
>
> Guillaume Barreau
>

Craig McClanahan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Session Problem

2001-01-04 Thread Craig R. McClanahan

"Mohan K. Chintala" wrote:

> hi All,
>
> I am binding the session object with the username and storing it in
> a Hashtable. I want to check whether it is the same session or not, whenever
> an user logs in. I want to check whether the same user has already Logged
> In. Its working fine with Windows NT and Servlet Exec. But Whenever i deploy
> the same application on linux(Tomcat with Appache). I am getting the Current
> Session from the Hashtable(Which is Global (Servlet-Level) Variable). Could
> any one know what  the Problem could be. I look forward to an answer from
> one of our mail list friends.
>

You might want to turn your thinking inside out on how to handle this problem
:-).

Consider that the servlet container is already maintaining a Hashtable of all
the sessions, in some global static variable, for you.  Therefore, keeping your
own global Hashtable is a duplication of effort.

The strategy I follow is to store a username (or some User object) as a session
attribute when the user logs on, like this:

HttpSession session = request.getSession();
String username = ... whatever the username is ...
session.setAttribute("user", username);

Now on every request, I can check very simply whether the user is logged on or
not:

HttpSession session = request.getSession();
String username = (String) request.getAttribute("user");
if (username == null) {
... the user is *not* logged on ...
} else {
   ... the user *is* logged on ...
}

Why does this work?

* The servlet container always gets the right session for you,
  creating a new one if necessary.

* Your "login" process decided that this was an authorized
  user, and put the "user" attribute there.

* If the user comes back before the session has timed out,
  the "user" attribute will still be present.

* If the session has timed out, a new session will be created
  by the logic above -- but the "user" attribute will be missing
  (because the user has not gone through your "login" yet).
  Typically, you would redirect them to the login page here.

* If you invalidate() a session -- which you should do at "logout"
  time -- the next request will create a new session (just as if
  the old session had timed out) and the same thing happens:
  you detect that they are not logged in, and redirect them
  to the login page.



>
> Regards,
> mohan..
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: charset problem

2001-01-04 Thread Michael Wentzel

Another source of the problem could be the jdbc drivers you
are using.  

What database are you using?  

What jdbc drivers are you using?

I don't think this is the problem but figured it's worth a go.


---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Tomcat 4.0 + iPlanet on Solaris

2001-01-04 Thread Purav Patel - Sun Microsystems

Hello..

I am running Tomcat-4.0-m4 on Solaris and I would like to integrate it with 
iPlanet Web Server (FastTrack Edition).  However, from what I know there are no 
connectors currently available for Tomcat 4.0.  So it only runs in stand-alone 
mode as of now.

Does anybody know if and when a connector is going to be available for iPlanet 
web servers?

Thanks,
PP





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: charset problem

2001-01-04 Thread André Alves

Hi Simon,
The problem it not in sql beacuse when a run this servlet JServ this
word perfectly. The problem occurs only in Tomcat

--- Kitching Simon <[EMAIL PROTECTED]> escreveu: > Hi Andre,
> 
> I'm still willing to bet your sql is the problem.
> It looks exactly like you are catching a nasty
> exception somewhere, and totally ignoring it
> (though I have been known to be wrong on
> occasions :-)
> 
> I think you will have to provide more info, and
> in particular do some research/debugging yourself,
> then ask *specific questions* in this group
> to get help - you know how hard it is to debug 
> code you've written yourself, that is in front of
> you. And in addition, while people here are pretty
> helpful, no-one is being paid to solve problems..
> (I'm just trying to avoid working on my own bugs
> at the moment..)
> 
> I use special characters (french, german) with tomcat,
> inserting into database fields, and have no problems,
> so it works in the general case. Of course, we use
> instances of Oracle which have been configured to 
> use the ISO-8859-1 character set, etc. I didn't have
> to set up Tomcat special in any way, as far as I
> can remember.
> 
> What you *can* take away from the answers so
> far is that no-one seems to have encountered a 
> similar issue with tomcat, ie that it is not a known 
> bug or common problem.
> 
> Good luck solving it!
> 
> Simon
> 
> > -Original Message-
> > From:   André Alves [SMTP:[EMAIL PROTECTED]]
> > Sent:   Thursday, January 04, 2001 8:04 PM
> > To: [EMAIL PROTECTED]
> > Subject:RE: charset problem
> > 
> > The query is simply ignored. setting environment variable
> > "TOMCAT_OPTS=-Dfile.encoding=ISO8859_1", not work. Is like tomcat
> > recived the request but made nothing .
> > 
> >   I enter data in the simple html form. tomcat receives this
> datas,
> > and send the end page, as if the data were inserted but, when I
> made
> > a search, the data had not been modified. This only occurs when
> > characters special in the form exist. When I don't have any
> special
> > characters in the form, the data are brought up to date.
> > 
> > --- Michael Wentzel <[EMAIL PROTECTED]> escreveu: >
> Does
> > anything at all get inserted into the database or is the query
> > > simply ignored/Exception thrown/...?  If you post the exact
> results
> > > of executing your query and a snippet of code used to do so it
> > > would
> > > help diagnose the problem.
> > > 
> > > 
> > > ---
> > > Michael Wentzel
> > > Software Developer
> > > Software As We Think
> > > 
> > > 
> > >
> >
>
-
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, email:
> [EMAIL PROTECTED]
> > >  
> > 
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! Photos - Share your holiday photos online!
> > http://photos.yahoo.com/
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, email:
> [EMAIL PROTECTED]
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>  


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: charset problem

2001-01-04 Thread Kitching Simon

Hi Andre,

I'm still willing to bet your sql is the problem.
It looks exactly like you are catching a nasty
exception somewhere, and totally ignoring it
(though I have been known to be wrong on
occasions :-)

I think you will have to provide more info, and
in particular do some research/debugging yourself,
then ask *specific questions* in this group
to get help - you know how hard it is to debug 
code you've written yourself, that is in front of
you. And in addition, while people here are pretty
helpful, no-one is being paid to solve problems..
(I'm just trying to avoid working on my own bugs
at the moment..)

I use special characters (french, german) with tomcat,
inserting into database fields, and have no problems,
so it works in the general case. Of course, we use
instances of Oracle which have been configured to 
use the ISO-8859-1 character set, etc. I didn't have
to set up Tomcat special in any way, as far as I
can remember.

What you *can* take away from the answers so
far is that no-one seems to have encountered a 
similar issue with tomcat, ie that it is not a known 
bug or common problem.

Good luck solving it!

Simon

> -Original Message-
> From: André Alves [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 8:04 PM
> To:   [EMAIL PROTECTED]
> Subject:  RE: charset problem
> 
> The query is simply ignored. setting environment variable
> "TOMCAT_OPTS=-Dfile.encoding=ISO8859_1", not work. Is like tomcat
> recived the request but made nothing .
> 
>   I enter data in the simple html form. tomcat receives this datas,
> and send the end page, as if the data were inserted but, when I made
> a search, the data had not been modified. This only occurs when
> characters special in the form exist. When I don't have any special
> characters in the form, the data are brought up to date.
> 
> --- Michael Wentzel <[EMAIL PROTECTED]> escreveu: > Does
> anything at all get inserted into the database or is the query
> > simply ignored/Exception thrown/...?  If you post the exact results
> > of executing your query and a snippet of code used to do so it
> > would
> > help diagnose the problem.
> > 
> > 
> > ---
> > Michael Wentzel
> > Software Developer
> > Software As We Think
> > 
> > 
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >  
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: MIME-type filter

2001-01-04 Thread Craig R. McClanahan

±è¼º°ü wrote:

> Hi everyone~~
>
> I'd like to know that Tomcat4.0 can support MIME-type filter.
>
> and if it does, how to config and use?

There are no MIME-type filters built in to Tomcat 4.0, but you could easily
create such a thing, using two different techniques:

* Write a custom Valve implementation that
  wrapped all the requests and responses to
  a web app, and did the filtering if a matching
  MIME type was encountered.  (For any other
  MIME type, the data would be passed through
  unchanged).

* Since Tomcat 4.0 supports the servlet 2.3
  proposed final draft APIs, you can also write
  a javax.servlet.Filter to do the same thing.  The
  advantage here is that your Filter will be portable
  to any servlet container that supports 2.3, not
  proprietary to Tomcat.

Do you have a particular type of filtering in mind?  It would probably be useful
to include an example Filter that does something like this in the Tomcat
distribution.

Craig McClanahan



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: load on startup

2001-01-04 Thread Kitching Simon

Perhaps the problem is that your servlet *is*
being started, but is throwing an exception
during constructor or init method..print
statements in your constructor and init method
should prove this one way or another.

The load-on-startup value is just an integer that
indicates order of startup (low numbers first). The
value you've used is just a very very low integer :-)

Actually, you might want to use "0" or "1" as your
load-on-startup value, to ensure that the DefaultServlet
(which uses this -ve value itself to try to get started before
everything else) does actually get started before your
servlet code.

> -Original Message-
> From: Michael Wentzel [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 7:15 PM
> To:   '[EMAIL PROTECTED]'
> Subject:  Q:load on startup 
> 
> When trying to configure a servlet to load
> at server startup using:
> 
> 
>   
>   PDFStyle
>   
>   
>   reporting.PDFStyleServlet
>   
>   
> -2147483645
>   
> 
> 
> I get the following:
> 
> cannot load servlet name: PDFStyle
> 
> The class file is in the Web-inf/classes/reporting path
> as it should be but it's still not loading.
> 
> Any ideas on what's wrong?  Is this the correct form for
> the load-on-startup tag in web.xml?  What does the integer
> represent(classid...)?
> 
> 
> ---
> Michael Wentzel
> Software Developer
> Software As We Think
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: charset problem

2001-01-04 Thread André Alves

The query is simply ignored. setting environment variable
"TOMCAT_OPTS=-Dfile.encoding=ISO8859_1", not work. Is like tomcat
recived the request but made nothing .

  I enter data in the simple html form. tomcat receives this datas,
and send the end page, as if the data were inserted but, when I made
a search, the data had not been modified. This only occurs when
characters special in the form exist. When I don't have any special
characters in the form, the data are brought up to date.

--- Michael Wentzel <[EMAIL PROTECTED]> escreveu: > Does
anything at all get inserted into the database or is the query
> simply ignored/Exception thrown/...?  If you post the exact results
> of executing your query and a snippet of code used to do so it
> would
> help diagnose the problem.
> 
> 
> ---
> Michael Wentzel
> Software Developer
> Software As We Think
> 
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>  


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Servlet mapping problem

2001-01-04 Thread Craig R. McClanahan

Marco Leal wrote:

> I don't know if this message got through the first time I sent it. If
> you're seeing it again, I'm sorry.
>

Two questions:

* What version of Tomcat?  If it's less than 3.2 you should upgrade.

* Are you running Tomcat stand-alone or behind a web server
  like Apache.  If it is the latter, you have to add some Apache
  configuration stuff (using mod_rewrite) to make Apache deal
  with jsessionid correctly.  There is a FAQ entry on this at
   - do a search for "URL rewriting"
  to find it.

Craig McClanahan


>
> --
>
> Hi guys!
>
> I'm having some problems with servlet mapping in a servlet application.
> My 'web.xml' file looks like this:
>
> [...]
> 
> room
> myapp.presentation.Room
> 
> 
> room
> /room
> 
> [...]
>
> I'm using session management through URL encoding. The problem is this:
> if, for instance, I access the above servlet like this:
>
> http://localhost:9000/room?type=a
>
> I have no problem and everything is fine but if the sessionid goes into
> the URL like this:
>
> http://localhost:9000/room;jsessionid=xebW6G9aFVCb96y6yNTVSMxN?type=a
>
> I get:
>
> Error: 404
> File Not Found: /room;jsessionid=xebW6G9aFVCb96y6yNTVSMxN
>
> I'm guessing the problem is in the servlet-mapping section of the
> 'web.xml' file but I've tried lots of variations but nothing worked.
> Could anyone shed some light on this, please?
>
> --
> Marco Leal
> MobiComp - Mobile Computing & Wireless Solutions
> http://www.mobicomp.com/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




CLASSPATH trouble

2001-01-04 Thread Dustin M. Hawley


Greetings -

This is my first mail to the list so I hope I don't offend.  I am running
Tomcat 3.2 under Windows NT 4.0
and I am having trouble running JSP pages that use Java classes.  I get a
500 error (Internal Servlet
error) when trying to load them.  First of all, tomcat.bat is not building
CLASSPATH dynamically as it
should.  After Tomcat is running if I check CLASSPATH by typing "echo
%CLASSPATH%" at the
command line I get no results.  I have tried creating TOMCAT_HOME\classes
and putting the classes
there with no luck.  Also, in the test tree there are a few JSP documents
that use classes that do
not function either.  I have also tried setting CLASSPATH staticly myself
which does not work either.
This leaves me to wonder if CLASSPATH is the right variable or if it is even
being checked by Tomcat
at any time.  Basically, I just need to know where to put my classes and
what I need to do to get
Tomcat to see them.  Everything else under Tomcat seems to be okay.

Thanks in advance,
Dustin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Q:load on startup

2001-01-04 Thread Michael Wentzel

When trying to configure a servlet to load
at server startup using:



PDFStyle


reporting.PDFStyleServlet


  -2147483645



I get the following:

cannot load servlet name: PDFStyle

The class file is in the Web-inf/classes/reporting path
as it should be but it's still not loading.

Any ideas on what's wrong?  Is this the correct form for
the load-on-startup tag in web.xml?  What does the integer
represent(classid...)?


---
Michael Wentzel
Software Developer
Software As We Think

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: IllegalStateException???

2001-01-04 Thread Kitching Simon

Hmm .. looks ok to me..

On to theory # 2 :-)

Is the <%= request.getParameter("cmd") %> perhaps throwing an
exception (due to null being returned)? It might be that exception-
catching code (that tomcat auto-inserts when generating .jsp -> .java)
is trying to do a redirect to an error page...I've had problems with this
before.

Why not try putting
<%
 String cmd = "oops";
  try
{
  cmd = request.getParameter("cmd");
}
catch(Throwable t)
{
}
%>

at the top of your page, then using
<%= cmd %> instead of <%= request.getParameter("cmd") %> ??

This should let you know if theory #2 flies or dies :-)

Cheers,

Simon

> -Original Message-
> From: Matt Goss [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 7:22 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: IllegalStateException???
> 
> The servlet that gets posted to performs some business logic via JavaBeans
> and then
> forwards to the display page (in this case, the confirm.jsp) it never gets
> the output
> stream and it doesn't include any other jsp's.
> 
> //save the changes and then send to confirm page
> Customer tmpcust =
> (Customer)req.getSession(false).getAttribute("tmpcust");
> try{
> logger.log("removing customer:"+tmpcust.getId(),
> logger.INFO);
> this.clist.removeCustomer(tmpcust.getId());
> logger.log("customer removed", logger.INFO);
> }catch(Exception E){
> logger.log(E, "error removing customer",
> logger.ERROR);
> req.setAttribute("msg", "error removing customer,
> check logs");
> 
> this.send(req, resp,
> this.props.getProperty("error"),
> "editcustomer");
> return;
> }
> this.send(req, resp,
> this.props.getProperty("confirm"),
> "editcustomer");
> //snip
> public void send(HttpServletRequest req, HttpServletResponse resp, String
> page, String
> component) throws IOException, ServletException
> {
> RequestDispatcher rd =
> req.getRequestDispatcher("/"+component+"/"+page);
> rd.forward(req, resp);
> }
> 
> ??? any clue?
> Matt
> 
> Kitching Simon wrote:
> 
> > According to the sun servlet specs, you are **not allowed** to
> > do a forward operation after having called a method to get the
> > output stream, exactly as the message states.
> >
> > Are you sure you have never obtained an output stream
> > before attempting to forward to "confirm.jsp" ??
> >
> > If you have something like
> >   posted data --> servlet1
> >   servlet1 does "include" for "handle-data.jsp"
> >   servlet1 does "forward" to "confirm.jsp"
> > then if handle-data.jsp obtains an output stream, this would
> > exactly explain the problem.
> >
> > I suspect that the first thing *any* jsp page does is grab the
> > output stream, have a look at the generated jsp code for
> > "handle-data.jsp" or whatever your equivalent is.
> >
> > If your situation is different from what I have guessed, then
> > please include more information in your next post - the page
> > you included here looks ok, so the problem is probably in the
> > upstream processing you didn't give any info about!
> >
> > Cheers,
> >
> > Simon
> >
> > > -Original Message-
> > > From: Matt Goss [SMTP:[EMAIL PROTECTED]]
> > > Sent: Thursday, January 04, 2001 4:23 PM
> > > To:   [EMAIL PROTECTED]
> > > Subject:  IllegalStateException???
> > >
> > > Hi everyone,
> > > I just ported an applicaiton onto tomcat 3.2 that ran fine on JRUN
> 3.0.
> > > The application consists of servlets that accept form posts from
> JSP's,
> > > they process the data and then forward to other jsp pages. When I
> > > forward to a specific page, the page displays fine, but I'm getting an
> > > error message on my server screen :
> > > 
> > > 2001-01-04 09:53:05 - Ctx( /rollout ):IllegalStateException in: R(
> > > /rollout +/editcomponent/confirm.jsp + null) Cannot forward as
> > > OutputStream or Writer has already been obtained
> > > 
> > > the page is a simple confirmation page and looks like this:
> > > 
> > > 
> > > 
> > > CUSTOMER OPERATION CONFIRMATION
> > > 
> > >
> > > 
> > > 
> > > The <%=request.getParameter("cmd")%> operation was successful!
> > > :)
> > > Return to the Customer list
> > > Return to navigation page
> > > 
> > > 
> > > 
> > >
> > > does anyone have any idea what could be causing this???
> > > Matt Goss << File: Card for Matt Goss >>  << File: ATT17765.txt >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED] <<
> File: Card for Matt Goss >>  << File: ATT19241.txt >> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




SSL Password

2001-01-04 Thread Guy Payne

How do I keep from having to enter a PEM pass phrase when I want to start my
Apache secure web server?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: IllegalStateException???

2001-01-04 Thread Matt Goss

The servlet that gets posted to performs some business logic via JavaBeans and then
forwards to the display page (in this case, the confirm.jsp) it never gets the output
stream and it doesn't include any other jsp's.

//save the changes and then send to confirm page
Customer tmpcust =
(Customer)req.getSession(false).getAttribute("tmpcust");
try{
logger.log("removing customer:"+tmpcust.getId(), logger.INFO);
this.clist.removeCustomer(tmpcust.getId());
logger.log("customer removed", logger.INFO);
}catch(Exception E){
logger.log(E, "error removing customer", logger.ERROR);
req.setAttribute("msg", "error removing customer, check logs");

this.send(req, resp, this.props.getProperty("error"),
"editcustomer");
return;
}
this.send(req, resp, this.props.getProperty("confirm"),
"editcustomer");
//snip
public void send(HttpServletRequest req, HttpServletResponse resp, String page, String
component) throws IOException, ServletException
{
RequestDispatcher rd = req.getRequestDispatcher("/"+component+"/"+page);
rd.forward(req, resp);
}

??? any clue?
Matt

Kitching Simon wrote:

> According to the sun servlet specs, you are **not allowed** to
> do a forward operation after having called a method to get the
> output stream, exactly as the message states.
>
> Are you sure you have never obtained an output stream
> before attempting to forward to "confirm.jsp" ??
>
> If you have something like
>   posted data --> servlet1
>   servlet1 does "include" for "handle-data.jsp"
>   servlet1 does "forward" to "confirm.jsp"
> then if handle-data.jsp obtains an output stream, this would
> exactly explain the problem.
>
> I suspect that the first thing *any* jsp page does is grab the
> output stream, have a look at the generated jsp code for
> "handle-data.jsp" or whatever your equivalent is.
>
> If your situation is different from what I have guessed, then
> please include more information in your next post - the page
> you included here looks ok, so the problem is probably in the
> upstream processing you didn't give any info about!
>
> Cheers,
>
> Simon
>
> > -Original Message-
> > From: Matt Goss [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, January 04, 2001 4:23 PM
> > To:   [EMAIL PROTECTED]
> > Subject:  IllegalStateException???
> >
> > Hi everyone,
> > I just ported an applicaiton onto tomcat 3.2 that ran fine on JRUN 3.0.
> > The application consists of servlets that accept form posts from JSP's,
> > they process the data and then forward to other jsp pages. When I
> > forward to a specific page, the page displays fine, but I'm getting an
> > error message on my server screen :
> > 
> > 2001-01-04 09:53:05 - Ctx( /rollout ):IllegalStateException in: R(
> > /rollout +/editcomponent/confirm.jsp + null) Cannot forward as
> > OutputStream or Writer has already been obtained
> > 
> > the page is a simple confirmation page and looks like this:
> > 
> > 
> > 
> > CUSTOMER OPERATION CONFIRMATION
> > 
> >
> > 
> > 
> > The <%=request.getParameter("cmd")%> operation was successful!
> > :)
> > Return to the Customer list
> > Return to navigation page
> > 
> > 
> > 
> >
> > does anyone have any idea what could be causing this???
> > Matt Goss << File: Card for Matt Goss >>  << File: ATT17765.txt >>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


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



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


RE: charset problem

2001-01-04 Thread Michael Wentzel

Does anything at all get inserted into the database or is the query
simply ignored/Exception thrown/...?  If you post the exact results
of executing your query and a snippet of code used to do so it would
help diagnose the problem.


---
Michael Wentzel
Software Developer
Software As We Think


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: charset problem

2001-01-04 Thread G.Nagarajan

Hi,
Just check if the following solve your problem
http://archives.java.sun.com/cgi-bin/wa?A2=ind0012&L=servlet-interest&P=R333
99

http://archives.java.sun.com/cgi-bin/wa?A2=ind0012&L=servlet-interest&P=R336
95

Regards,
Nagaraj



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Similar charset problem

2001-01-04 Thread Thom Park

Slightly off-topic but similarly -  tomcat does have a problem with
multi-byte characters.

If you try to browse a file system via tomcat on a Kanji or Chinese
language
system you'll get a 'not an ISO-8859_1' character exception from tomcat if
any of the filenames
contain multi-byte characters.

It seems to be related to the workaround in the following code:

[\src\share\org\apache\tomcat\core\BufferedServletOutputStream.java]--
public void print(String s) throws IOException {
if (s==null) s="null";
int len = s.length();
for (int i = 0; i < len; i++) {
char c = s.charAt (i);

//
// XXX NOTE:  This is clearly incorrect for many strings,
// but is the only consistent approach within the current
// servlet framework.  It must suffice until servlet output
// streams properly encode their output.
//
if ((c & 0xff00) != 0) {// high order byte must be zero
String errMsg = sm.getString(
"servletOutputStreamImpl.fmt.not_iso8859_1",
 new Object[] {new Character(c)});
throw new IOException(errMsg);
}
write(c);
}
}

True, it isn't related to this problem, but it does demonstrate a problem
that tomcat has with multi-byte characters.
What is tomcat's position on multi-byte chars in general and, how could I
work around this restriction.
Kitching Simon wrote:

> I think the most likely cause is that it is your SQL
> statement that is throwing an exception when you
> try to insert non-ascii characters into a text column
> in the database.
>
> Java text is all based on UNICODE, so it is unlikely
> that tomcat has any problems at all with special
> characters.
>
> So the point for *you* to check is whether your
> SQL is being run, and if so whether it is throwing
> an exception.
>
> If you can confirm that your SQL is not being
> run at all (ie that the problem *is* somewhere in
> tomcat) then I suggest you post again.
>
> > -Original Message-
> > From: André Alves [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, January 04, 2001 6:34 PM
> > To:   [EMAIL PROTECTED]
> > Subject:  charset problem
> >
> > Hi,
> > I'm using apache 1.3.9, tomcat 3.2.1 and NT 4 SP 5.
> > When I pass words with special characters like parameter to tomcat,
> > to be inserted in a data base, the insert don't occurs. I would like
> > know if exists any configuration to tomcat accept words with special
> > characters, like "André" or "João".
> >
> > Thanks
> >
> >
> > __
> > Do You Yahoo!?
> > Yahoo! Photos - Share your holiday photos online!
> > http://photos.yahoo.com/
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




META-INF is not extracted from WAR file by tomcat 3.2.1

2001-01-04 Thread Patrick G. Maggiulli

Hello!

I've tomcat 3.2.1 running on my nt 4.0 workstation.
No special casing, using it simply "out of the box".
I've created a WAR file using the JAR utility that
comes bundled in Sun's jdk1.1.8 distribution, and
placed it under the TOMCAT_HOME\webapps folder.
When tomcat is invoked (not invoked as a service)
the WAR file contents gets extracted except the
META-INF folder and its contents.  what i read on
the console is the following:

FileNotFoundException: META-INF/MANIFEST.MF

I do see the remainder of the WAR file correctly
extracted.  Interestingly, if I stop and then start
tomcat again the FileNotFoundException is not reported.

Is this expected behavior?

Any thing that can be shared I'd appreciate it.

thx, pgm...
-- 
Patrick G. MaggiulliAvaya Inc.
tel:  732 817 2038  101 Crawfords Corner Road, Room 2C-615A
fax:  732 817 5305  Holmdel NJ 07733
ema:  [EMAIL PROTECTED] http://sjbcs.web.lucent.com/~pgmag/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: charset problem

2001-01-04 Thread André Alves

I think that it is not an error of sql, because servlet worked
perfectly in Jserv 1.1.1. I migrated for tomcat and servlet stopped
to function when it inserts characters special. I do not know what's
happening.


--- Kitching Simon <[EMAIL PROTECTED]> escreveu: > I think the
most likely cause is that it is your SQL
> statement that is throwing an exception when you
> try to insert non-ascii characters into a text column
> in the database.
> 
> Java text is all based on UNICODE, so it is unlikely
> that tomcat has any problems at all with special
> characters. 
> 
> So the point for *you* to check is whether your
> SQL is being run, and if so whether it is throwing
> an exception. 
> 
> If you can confirm that your SQL is not being
> run at all (ie that the problem *is* somewhere in
> tomcat) then I suggest you post again.
> 
> > -Original Message-
> > From:   André Alves [SMTP:[EMAIL PROTECTED]]
> > Sent:   Thursday, January 04, 2001 6:34 PM
> > To: [EMAIL PROTECTED]
> > Subject:charset problem
> > 
> > Hi, 
> > I'm using apache 1.3.9, tomcat 3.2.1 and NT 4 SP 5.
> > When I pass words with special characters like parameter to
> tomcat,
> > to be inserted in a data base, the insert don't occurs. I would
> like
> > know if exists any configuration to tomcat accept words with
> special
> > characters, like "André" or "João".
> > 
> > Thanks
> > 
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! Photos - Share your holiday photos online!
> > http://photos.yahoo.com/
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, email:
> [EMAIL PROTECTED]
> 
>
-
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>  


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: charset problem

2001-01-04 Thread Michael Wentzel

> I think the most likely cause is that it is your SQL
> statement that is throwing an exception when you
> try to insert non-ascii characters into a text column
> in the database.
> 
> Java text is all based on UNICODE, so it is unlikely
> that tomcat has any problems at all with special
> characters. 
> 
> So the point for *you* to check is whether your
> SQL is being run, and if so whether it is throwing
> an exception. 
> 
> If you can confirm that your SQL is not being
> run at all (ie that the problem *is* somewhere in
> tomcat) then I suggest you post again.

As a starting point for your inserts make sure your database
is configured to use an appropriate character set as we as
if your SQL is formed correctly.



---
Michael Wentzel
Software Developer
Software As We Think

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Tomcat Standalone worked, now doesn't.

2001-01-04 Thread Sterling

H-


Just for closure here is where the Kaffe entered the picture.

When Tomcat was started the first time and worked all was well.
When I shut it down and than started it again I immediately realized that I did not 
set the env variables again so it didn't work. I should have put them in bashrc to be 
sure but anyway I didn't so ...
Tomcat didn't start.
Oops... set env variables and it didn't start and never would from then on out.
Reason. When it couldn't find JAVA_HOME it started looking for JAVA which was a list 
of symbolic links that eventually lead to Kaffe which started.
Once started it stayed up and wouldn't let go. Not knowing that Kaffe had started 
until mentioned to look for it by this list even if JAVA_HOME was set the process 
would never work because Kaffe took the port.

Killed Kaffe. (Remembered to reset) Env Variables, Revived Tomcat. Happy.

Take it easy every one.
Thanks.
-Sterling

-= Computers do only what you tell them, not what you intended to tell them. =-

Sterling wrote:

> H-
>
> I'm trying to get Tomcat working as a stand alone on my server. Again.
>
> I have unzipped/tared the 3.2 binary into the usr/local directory.
> Tomcat was working before but for some reason it appeared to be
> interferring with Apache and would grab the pages first (timeout) than
> apache would display the page. It also prevented cgi scripts from being
> run.
>
> This was confirmed when I ./bin/shutdown.sh tomcat and all those
> problems went away. My apache server worked fine.
> I'm not looking to merge the two.
>
> But now that I try to restart Tomcat it doesn't work.
> I have set all the env variables.
> TOMCAT_HOME=/usr/local/jakarta-tomcat-3.2.1; export TOMCAT_HOME
> JAVA_HOME=/usr/local/jdk1.3; export JAVA_HOME
> CLASSPATH=/usr/local/jdk1.3/lib/tools.jar ; export CLASSPATH
>
> Thinking that apache might be interferring with tomcat's start up (it
> complained of an address already in use) I stopped apache
> (/etc/init.d/apache stop) than ran ./bin/startup.sh. This is what it
> did.
> Using classpath:
> 
>/usr/local/jakarta-tomcat-3.2.1/lib/ant.jar:/usr/local/jakarta-tomcat-3.2.1/lib/jasper.jar:/usr/local/jakarta-tomcat-3.2.1/lib/jaxp.jar:/usr/local/jakarta-tomcat-3.2.1/lib/parser.jar:/usr/local/jakarta-tomcat-3.2.1/lib/servlet.jar:/usr/local/jakarta-tomcat-3.2.1/lib/test:/usr/local/jakarta-tomcat-3.2.1/lib/webserver.jar:/usr/local/jdk1.3/lib/tools.jar:/usr/local/jdk1.3/lib/tools.jar
>
> XX:/usr/local/jakarta-tomcat-3.2.1# 2001-01-03 12:23:27 -
> ContextManager: Adding context Ctx( /examples )
> 2001-01-03 12:23:27 - ContextManager: Adding context Ctx( /admin )
> Starting tomcat. Check logs/tomcat.log for error messages
> 2001-01-03 12:23:27 - ContextManager: Adding context Ctx(  )
> 2001-01-03 12:23:27 - ContextManager: Adding context Ctx( /test )
> FATAL:java.net.BindException: Address already in use
> java.net.BindException: Address already in use
> at java.net.PlainSocketImpl.socketBind(Native Method)
> at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:397)
>
> Those FATAL.java.net errors I think are the main problem but I don't
> know what could be causing them.
> BTW - there is no tomcat.log file. There is a servlet and jasper.log
> file. I have pasted them below. As you can see not much there.
> Anyone have any thoughts on what it could be and how to fit it?
> Any info or assistance is much appreciated.
> Thanks.
> -Sterling
>
> PS(I'm running Debian 2.2rev2, JDK1.3, Tomcat3.2.1, and I downloaded the
> old Java library which was preventing it from running the first time.)
> xxx:/usr/local/jakarta-tomcat-3.2.1/logs# less jasper.log
> 2001-01-03 12:23:28 - Scratch dir for the JSP engine is:
> /usr/local/jakarta-tomcat-3.2.1/work/localhost_8080%2Fexamples
> 2001-01-03 12:23:28 - IMPORTANT: Do not modify the generated servlets
> xxx:/usr/local/jakarta-tomcat-3.2.1/logs# less servlet.log
> 2001-01-03 12:23:28 - path="/examples" :jsp: init
> 2001-01-03 12:23:28 - path="/admin" :jsp: init
> 2001-01-03 12:23:28 - path="" :jsp: init
> 2001-01-03 12:23:29 - path="/test" :jsp: init
> This was created right after I ran the ./bin/startup.sh script.
> Well if you have any thoughts I'd love to hear them. Thanks.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: charset problem

2001-01-04 Thread Kitching Simon

I think the most likely cause is that it is your SQL
statement that is throwing an exception when you
try to insert non-ascii characters into a text column
in the database.

Java text is all based on UNICODE, so it is unlikely
that tomcat has any problems at all with special
characters. 

So the point for *you* to check is whether your
SQL is being run, and if so whether it is throwing
an exception. 

If you can confirm that your SQL is not being
run at all (ie that the problem *is* somewhere in
tomcat) then I suggest you post again.

> -Original Message-
> From: André Alves [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 6:34 PM
> To:   [EMAIL PROTECTED]
> Subject:  charset problem
> 
> Hi, 
> I'm using apache 1.3.9, tomcat 3.2.1 and NT 4 SP 5.
> When I pass words with special characters like parameter to tomcat,
> to be inserted in a data base, the insert don't occurs. I would like
> know if exists any configuration to tomcat accept words with special
> characters, like "André" or "João".
> 
> Thanks
> 
> 
> __
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: [PATCH PROPOSAL] for mod_jk (was: RE: gracefull shutdown/removalof worker from load balance...)

2001-01-04 Thread Michael Kuz
Title: RE: [PATCH PROPOSAL] for  mod_jk (was: RE: gracefull shutdown/removalof  worker from load balance...)





The worker.property file is only read once, at startup. It would require major change to current mod_jk (as I understand it) to add multiple reads. 

I don't think that it would be a good idea anyway...  all those reads to the file would negatively impact performance.



Michael R. Kuz
Developer
Service Intelligence
(403) 261-5000 ext. 363
[EMAIL PROTECTED]




> -Original Message-
> From: Fritz Thielemann [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 10:31 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PATCH PROPOSAL] for mod_jk (was: RE: gracefull
> shutdown/removalof worker from load balance...)
> 
> 
> Hi Michael,
> 
> sounds good. but is it possible to change workers.prop on the 
> fly while
> mod_jk is running? as others reading props only at startup, 
> you checking
> constantly for the value of worker.tc7.active?
> 
> thanks
> 
> Fritz
> 
> Michael Kuz wrote:
> 
> >    Part 1.1.1Type: Plain Text (text/plain)
> >
> > Name: activeState.patch
> >    activeState.patch    Type: unspecified type 
> (application/octet-stream)
> > Encoding: quoted-printable
> >
> >    Part 1.3Type: Plain Text (text/plain)
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 





charset problem

2001-01-04 Thread André Alves

Hi, 
I'm using apache 1.3.9, tomcat 3.2.1 and NT 4 SP 5.
When I pass words with special characters like parameter to tomcat,
to be inserted in a data base, the insert don't occurs. I would like
know if exists any configuration to tomcat accept words with special
characters, like "André" or "João".

Thanks


__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Problem with Tomcat as NT service

2001-01-04 Thread Daniel Haischt

hiya,

try to put your jdbc driver's zip/jar file in your
workers.properties file. this must look something
like this...

worker.inprocess.class_path=my-jdbc-driver.jar

i'm not sure whether you have to modify the worker.properties
or the wrapper.properties file. so you also might try the following
in your wrapper.properties file...

wrapper.class_path=my-jdbc-driver.jar

regards

daniel haischt
--

-Ursprüngliche Nachricht-
Von: Vinod [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 3. Januar 2001 12:47
An: [EMAIL PROTECTED]
Betreff: Problem with Tomcat as NT service


Hi,
I have jakarta-tomcat-3.2 running on Win NT4 and IIS. I have used
jk_nt_service.exe to make tomcat as NT service and followed the steps as it
is in the documentation. After that I have started the service, when I run a
small jdbc example I got the sql exception 'No suitable jdbc driver found'.
The same program runs fine when I start tomcat manually. Please provide
solution.

Thanx n Regards,
Vinod

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: [PATCH PROPOSAL] for mod_jk (was: RE: gracefull shutdown/removalof worker from load balance...)

2001-01-04 Thread Fritz Thielemann

Hi Michael,

sounds good. but is it possible to change workers.prop on the fly while
mod_jk is running? as others reading props only at startup, you checking
constantly for the value of worker.tc7.active?

thanks

Fritz

Michael Kuz wrote:

>Part 1.1.1Type: Plain Text (text/plain)
>
> Name: activeState.patch
>activeState.patchType: unspecified type (application/octet-stream)
> Encoding: quoted-printable
>
>Part 1.3Type: Plain Text (text/plain)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: IllegalStateException???

2001-01-04 Thread Ingo Luetkebohle

On Thu, Jan 04, 2001 at 10:23:13AM -0500, Matt Goss wrote:
> I just ported an applicaiton onto tomcat 3.2 that ran fine on JRUN 3.0.
> The application consists of servlets that accept form posts from JSP's,
> they process the data and then forward to other jsp pages. When I
> forward to a specific page, the page displays fine, but I'm getting an
> error message on my server screen :

What does the code of the forwarding page look like?

The error message sounds as if you had already printed some
content. Because forwarding is an HTTP-Header operation, it needs to
be done before any content is sent. The reason is works nonetheless
could be the page caching Tomcat performs. Strange, but check it out.

Ingo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: IllegalStateException???

2001-01-04 Thread Kitching Simon

According to the sun servlet specs, you are **not allowed** to
do a forward operation after having called a method to get the
output stream, exactly as the message states.

Are you sure you have never obtained an output stream
before attempting to forward to "confirm.jsp" ??

If you have something like
  posted data --> servlet1
  servlet1 does "include" for "handle-data.jsp"
  servlet1 does "forward" to "confirm.jsp"
then if handle-data.jsp obtains an output stream, this would
exactly explain the problem.

I suspect that the first thing *any* jsp page does is grab the
output stream, have a look at the generated jsp code for
"handle-data.jsp" or whatever your equivalent is.

If your situation is different from what I have guessed, then
please include more information in your next post - the page
you included here looks ok, so the problem is probably in the
upstream processing you didn't give any info about!

Cheers,

Simon

> -Original Message-
> From: Matt Goss [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 4:23 PM
> To:   [EMAIL PROTECTED]
> Subject:  IllegalStateException???
> 
> Hi everyone,
> I just ported an applicaiton onto tomcat 3.2 that ran fine on JRUN 3.0.
> The application consists of servlets that accept form posts from JSP's,
> they process the data and then forward to other jsp pages. When I
> forward to a specific page, the page displays fine, but I'm getting an
> error message on my server screen :
> 
> 2001-01-04 09:53:05 - Ctx( /rollout ):IllegalStateException in: R(
> /rollout +/editcomponent/confirm.jsp + null) Cannot forward as
> OutputStream or Writer has already been obtained
> 
> the page is a simple confirmation page and looks like this:
> 
> 
> 
> CUSTOMER OPERATION CONFIRMATION
> 
> 
> 
> 
> The <%=request.getParameter("cmd")%> operation was successful!
> :)
> Return to the Customer list
> Return to navigation page
> 
> 
> 
> 
> does anyone have any idea what could be causing this???
> Matt Goss << File: Card for Matt Goss >>  << File: ATT17765.txt >> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: finding the root directory of an application (in a war-compatible way)

2001-01-04 Thread Ingo Luetkebohle

On Thu, Jan 04, 2001 at 04:22:14PM +, Guillaume Barreau wrote:
> Is there a way of doing this that would work with war? 

Getting the root-directory of an application deployed directly from a
war can not work because in that case there is not root-dir!

However, you can get at your files using getResourceAsStream.

Ingo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




finding the root directory of an application (in a war-compatible way)

2001-01-04 Thread Guillaume Barreau

Dear tomcat users,

How do I find the root directory of the application to which a servlet belongs?
I know that the following works:
getServletContext().getRealPath("")

But the documentation on getRealPath warns me that this is not going to work if
my application is deployed as a war file. 
Is there a way of doing this that would work with war? 
Say I want to access file foo.txt that is in the root directory of my
application. How do I get to this file if the application is deployed as a war
file?

Thanks for any help,

Guillaume Barreau   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




[PATCH PROPOSAL] for mod_jk (was: RE: gracefull shutdown/removal of worker from load balance...)

2001-01-04 Thread Michael Kuz
Title: RE: gracefull shutdown/removal of worker from load balance...



Thanks 
Dave, here you go!
 
WARNINGThis is not an official patch and that it 
has only been tested on Linux.
Use at 
your own risk :)
OVERVIEW
 
The 
patch allows for a worker.name.active parameter to be added to the 
workers.property file. eg: worker.tc7.active=0
 
If the 
active parameter = 1, worker will accept new connections as per SOP (this is 
also the default state, so if the parameter is not in the file it still 
works, or if the value is anything other then 0 it still 
works...) If the active parameter = 0, the worker will continue to 
service existing sessions, but will not accept new 
sessions. I'm still working on a way to determine actives sessions 
in a worker...  
Feedback appreciated!
 
Michael R. 
Kuz Developer Service Intelligence (403) 261-5000 
ext. 363 [EMAIL PROTECTED] 


  -Original Message-From: Dave Smith 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, October 20, 2000 9:01 
  AMTo: [EMAIL PROTECTED]Subject: Re: 
  gracefull shutdown/removal of worker from load balance...
  Michael,
   
  Please post the patch, if you would. Sounds like 
  a very useful piece of code.
   
  Regards,
   
  Dave
  
- Original Message - 
From: 
Michael Kuz 
To: '[EMAIL PROTECTED]' 

Sent: Thursday, January 04, 2001 9:51 
AM
Subject: RE: gracefull shutdown/removal 
of worker from load balance...

We've got the load balancer working just fine, but had to 
patch mod_jk in order to allow for the removal of TC worker from the pool. 

I've added a setting called 'active' for each worker. When 
active is set to 0, the worker will not accept new connections, but continue 
with the existing sessions. (This allows us to remove the Tomcat box with no 
loss of users session info...)
I submitted the patch, but have heard nothing back. If you 
(or anyone else) is interested I will post it. 
Michael R. Kuz Developer 
Service Intelligence (403) 261-5000 
ext. 363 [EMAIL PROTECTED] 

> -Original Message- > 
From: Boaz Shaham [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, January 03, 2001 3:21 AM 
> To: '[EMAIL PROTECTED]' > Subject: RE: gracefull shutdown/removal of worker from load 
balance... > > 
> mod_jserv documentation indicates that this 
should be done. > Take a look at > http://java.apache.org/jserv/howto.load-balancing.html 
> > However, we tried it but 
could not make it work. I dont know if mod_jk > 
supports this, but I"ll be glad to hear that someone succeeded 
> > - Boaz > > -Original Message- 
> From: Michael Kuz [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, January 03, 2001 03:51 
> To: '[EMAIL PROTECTED]'; 
'[EMAIL PROTECTED]' > Subject: 
gracefull shutdown/removal of worker from load balance... > > > Hello 
all, > How do I remove a worker from the load 
balancer without > killing its current 
> sessions? > i.e.: I don't 
want any new sessions created on that worker, > 
and the existing > sessions must be allowed to 
expire 'naturally' > (I can't just delete the 
entry from the balanced_workers > property of 
the > load balancer or current/established 
sessions get killed/ are > not redirected 
> to the > proper worker) 
> Our setup: We've got multiple Apache web 
servers behind LVS > with multiple 
> TC(3.2) boxes behind the web servers... 
> Thanks in advance > > > 
> > Michael R. Kuz 
> Developer > Service 
Intelligence > (403) 261-5000 ext. 363 
> [EMAIL PROTECTED] > > 
- 
> To unsubscribe, e-mail: 
[EMAIL PROTECTED] > For 
additional commands, email: [EMAIL PROTECTED] 
> 
 activeState.patch

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


tomcat iis

2001-01-04 Thread yanfang peng

dear sirs or madames,

I installed apache server and tomcat on my NT 4.0
(SP5)
Think Pad 600, which already have iis 4.0 and
JaverServer for developer installed.

Tomcat works fine with apache and iis http server, the
documentation you guys supplied is excellent. I really
appreciate it. I'll try to figure out the scalabity of
tomcat works with iis. If it is really good, I'll try
very hard to promote it to my clients who's systems
are PC and Window based. 

Of cause if you guys have any information in this
respect, please send me a message.

Peter Peng 01/04/01



__
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: gracefull shutdown/removal of worker from load balance...

2001-01-04 Thread Dave Smith
Title: RE: gracefull shutdown/removal of worker from load balance...



Michael,
 
Please post the patch, if you would. Sounds like a 
very useful piece of code.
 
Regards,
 
Dave

  - Original Message - 
  From: 
  Michael Kuz 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Thursday, January 04, 2001 9:51 
  AM
  Subject: RE: gracefull shutdown/removal 
  of worker from load balance...
  
  We've got the load balancer working just fine, but had to 
  patch mod_jk in order to allow for the removal of TC worker from the pool. 
  
  I've added a setting called 'active' for each worker. When 
  active is set to 0, the worker will not accept new connections, but continue 
  with the existing sessions. (This allows us to remove the Tomcat box with no 
  loss of users session info...)
  I submitted the patch, but have heard nothing back. If you (or 
  anyone else) is interested I will post it. 
  Michael R. Kuz Developer 
  Service Intelligence (403) 261-5000 
  ext. 363 [EMAIL PROTECTED] 
  
  > -Original Message- > 
  From: Boaz Shaham [mailto:[EMAIL PROTECTED]] 
  > Sent: Wednesday, January 03, 2001 3:21 AM 
  > To: '[EMAIL PROTECTED]' > Subject: RE: gracefull shutdown/removal of worker from load 
  balance... > > 
  > mod_jserv documentation indicates that this 
  should be done. > Take a look at > http://java.apache.org/jserv/howto.load-balancing.html 
  > > However, we tried it but 
  could not make it work. I dont know if mod_jk > 
  supports this, but I"ll be glad to hear that someone succeeded 
  > > - Boaz > > -Original Message- 
  > From: Michael Kuz [mailto:[EMAIL PROTECTED]] 
  > Sent: Wednesday, January 03, 2001 03:51 > To: '[EMAIL PROTECTED]'; 
  '[EMAIL PROTECTED]' > Subject: 
  gracefull shutdown/removal of worker from load balance... > > > Hello 
  all, > How do I remove a worker from the load 
  balancer without > killing its current 
  > sessions? > i.e.: I don't 
  want any new sessions created on that worker, > and 
  the existing > sessions must be allowed to expire 
  'naturally' > (I can't just delete the entry from 
  the balanced_workers > property of the 
  > load balancer or current/established sessions get 
  killed/ are > not redirected > to the > proper worker) 
  > Our setup: We've got multiple Apache web servers 
  behind LVS > with multiple > TC(3.2) boxes behind the web servers... > Thanks in advance > 
  > > > > Michael R. Kuz > Developer > Service Intelligence 
  > (403) 261-5000 ext. 363 > [EMAIL PROTECTED] > 
  > 
  - 
  > To unsubscribe, e-mail: 
  [EMAIL PROTECTED] > For 
  additional commands, email: [EMAIL PROTECTED] 
  > 


Re: curious behavior - pseudo servlet-mapping with mod_jk

2001-01-04 Thread Luc Vanlerberghe

Great, now I am confused... :)

No, what you read in my comments is correct...

The fact that both "quiz" and "Quiz" are accepted in the URL is entirely
dependent on the implementation of the InvokerInterceptor.  Other
servlet containers may or may not have such an interceptor configured.  
Containers configured for production use (including tomcat) probably
will not.

To comply with the servlet spec, a servlet must be mapped to a
url-pattern in a  in web.xml like


quiz
/quiz


Relying on the presence of a /servlet/* interceptor would be
non-portable.

Luc

P.s.: Apparently you are on GMT-6, I'm on GMT+1.  Don't count on fast
replies :)

> > 
> >  quiz
> >  /quiz
> > 

Jacob Kjome wrote:
> 
> Thanks, Luc
> 
> But I'm not sure if you answered my question or not.
> 
> I understand the /servlet/ stuff and that you can even leave out any
> registration of a servlet and see that servlet under, for example,
> /servlet/Quiz (as long as the class is named Quiz.class with case being
> meaningful).
> 
> The thing I'm seeing, but not sure why, is that when actaully
> registering a servlet like:
> 
> 
>  quiz
>  Quiz
> 
> 
> you can now reference the serlvet in question by calling it with the
> spelling in either the  or .
> 
> Maybe that is what you just said.
> 
> The thing is, you can throw out the fact that Tomcat uses /servlet/ in
> the default settings for the RequestInterceptor in server.xml.  That
> path can be different among servlet runners.  As long as the URL in your
> HTML is relative and is written like href="./quiz", you will be on
> target either way.  Now, if you've gotten to the servlet successfully
> already, the URL referencing back to itself will always be correct.
> 
> The issue now becomes only "will other servlet runner
> RequestInterceptor's recognize the spellings of both  and
>  to invoke the Quiz.class servlet"?
> 
> I think you may have answered the above question by saying that Tomcat's
> RequestInterceptor, specifically, accepts both the  and
>  spellings when referencing the servlet (that is
> referencing Quiz.class as /Quiz or /quiz) in a URL but that this is NOT
> a behavior that can be counted on by other servlet runner
> RequestInterceptor's.
> 
> Am I reading you correctly?
> 
> Jake
> 
> -Original Message-
> From: Luc Vanlerberghe [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 03, 2001 11:05 AM
> To: [EMAIL PROTECTED]
> Subject: Re: curious behavior - pseudo servlet-mapping with mod_jk
> 
> That's because you're using the InvokerInterceptor that is mapped to all
> /servlet/ requests.
> 
> In your server.xml file you'll see the entry:
>  className="org.apache.tomcat.request.InvokerInterceptor"
> debug="0" prefix="/servlet/" />
> 
> It is just a handy tool to use during development that allows you to
> call any servlet without having to register it in .
> Apparently it accepts both the class name and the servlet name to invoke
> a servlet.  For servlets that are defined within a package, you'd use
> http://localhost/mycontext/servlet/xxx.yyy.mypackage.Quiz (could be that
> it must be http://localhost/mycontext/servlet/xxx/yyy/mypackage/Quiz,
> not sure) with Quiz being in the appropriate sub-/sub-/subdirectory
> under /WEB-INF/classes.
> 
> Most servlet-containers will have a similar mechanism, but I don't think
> there's really a standard, so for production you'd better use the
> standard  entries.
> 
> Luc Vanlerberghe
> 
> Jacob Kjome wrote:
> >
> > I just noticed something that seems to work for me, but I can't
> determine
> > quite why?  Maybe someone can confirm that this is expected behavior
> or
> > not.
> >
> > I am running Tomcat 3.2.1 on Windows 2000
> >
> > It seems that if you have a servlet registered in web.xml like this:
> >
> > 
> > quiz
> > Quiz
> > 
> >
> > AND you have the default values in mod_jk.conf:
> >
> > JkMount /mycontext/*.jsp ajp13
> > JkMount /mycontext/servlet/* ajp13
> >
> > you are able to access the above servlet at either of the following
> URL's:
> >
> > http://localhost/mycontext/servlet/Quiz
> > http://localhost/mycontext/servlet/quiz
> >
> > Notice the case difference in Quiz/quiz
> >
> > It seems that the  provides a rudimentary amount of
> servlet
> > mapping.
> >
> > I tested this theory by changing the  to "quiza" and
> testing
> > that.  After I did that, "Quiz" and "quiza" worked, but "quiz" did
> not.
> >
> > NOTE:  This was done WITHOUT servlet mapping tags such as:
> >
> > 
> >  quiz
> >  /quiz
> > 
> >
> > So, it seems you can very simply (without complex servlet mappings)
> make
> > your servlet case insensitive; that is in First letter upper case java
> > style class naming syntax OR all lower case.
> >
> > HOWEVER,
> >
> > I am not sure if this is portable accross servers!
> >
> > Can someone confirm that this isn't just a quirk of Tomcat?  Should it
> work
> > this way based on the servlet spec 

IllegalStateException???

2001-01-04 Thread Matt Goss

Hi everyone,
I just ported an applicaiton onto tomcat 3.2 that ran fine on JRUN 3.0.
The application consists of servlets that accept form posts from JSP's,
they process the data and then forward to other jsp pages. When I
forward to a specific page, the page displays fine, but I'm getting an
error message on my server screen :

2001-01-04 09:53:05 - Ctx( /rollout ):IllegalStateException in: R(
/rollout +/editcomponent/confirm.jsp + null) Cannot forward as
OutputStream or Writer has already been obtained

the page is a simple confirmation page and looks like this:



CUSTOMER OPERATION CONFIRMATION




The <%=request.getParameter("cmd")%> operation was successful!
:)
Return to the Customer list
Return to navigation page




does anyone have any idea what could be causing this???
Matt Goss


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



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


Using an in-process worker with Apache

2001-01-04 Thread vd

Hi,

I'm doing performance tests and would like to see the incidence of the
worker type on response time. As Tomcat's documentation underlines the
speed of the in-process worker vs. ajp workers, I wanted to test this
configuration but I get the following errors in mod_jk.log :

[jk_jni_worker.c (975)]: Fail-> could not create JVM, code: -1
[jk_jni_worker.c (424)]: Fail-> can't open jvm
[jk_worker.c (164)]: wc_create_worker validate failed for inprocess
[jk_worker.c (229)]: build_worker_map failed to create workerinprocess

I'm using Tomcat 3.2.1 with Sun's JDK v 1.3.0 and Apache 1.3.12 under
Windows NT 4.0 i386 SP5. I've tried the Hotspot and Classic JVMs with the
same result.

Rereading the documentation, I found that the use of the in-process worker
is documented for NES/iWS and MS IIS, but not for Apache.

Does this mean that the in-process worker is not supported with Apache ?

Did I miss something ?

Has anyone succeeded in getting this configuration to work ?

Thanks in advance.

Vincent DEFERT
MEDIAPPS



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: why must I add the port number

2001-01-04 Thread Ted Husted

Many people may already have a webserver running on 80, so out of the
box, Tomcat is setup to play well with others. 

As mentioned, on NT you can just change the 8080 in the configuration
file to 80, as the Web browsers expect (if you are not running IIS or
another webserver already). 

*** REPLY SEPARATOR  ***

On 1/4/2001 at 3:49 PM Birte Glimm wrote:

Hi, I have installed tomcat as a standalone webserver on Win 2000. 
To get a page or a servlet I have to type e.g.
http://localhost:8080/examples/servlet/helloWorldExample
but why must I include the port? Isn`t it the standard http port as in
all other webservers? If the port number is missing I get "Cannot find
server" and "The page cannot be displayed"

Thanks

Birte Glimm




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: method flushBuffer()V not found

2001-01-04 Thread William Brogden

If your system ever had JSDK or other servlet engines installed
you may be having interference from earlier servlet library JAR
files. A stray copy of jsdk.jar kept me confused for days!


> Constelix - Web Developers' Community wrote:
> 
> Hi, when I try any of the examples included in
> %TOMCAT_HOME%/webapps/examples/jsp/index.html, my browser reports:
> 
> javax.servlet.ServletException: javax.servlet.ServletResponse: method
> flushBuffer()V not found
>   at... a lot of components and methods of the JSP pages
> 
> I have even downloaded and installed Tomcat again, but the problems
> stays the same.
> 
> Does anyone know why this happens, and what I should do?
> 
> Thank you very much, and best regards.
> 
> Luis Rosso

-- 
WBB - [EMAIL PROTECTED]
Java Cert mock exams http://www.lanw.com/java/javacert/
Author of Java Developer's Guide to Servlets and JSP 
ISBN 0-7821-2809-2

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




  1   2   >