Load Balancing on Tomcat.

2001-10-25 Thread manish . khubchandani

Hi all,
My webserver IIS is routing requests for JSPs and SERVLETs  to a Tomcat
Engine installed on one machine (This is working fine).
My aim is to achieve load balancing for Tomcat and distribute requests
between multiple Tomcat workers.
I am not aware of the process by which one can achieve this.
It would be a great help if anybody can please send me some documentation
illustrating the steps invloved in this process.
Do i have to use mod_jk (mostly used with Apache) to achieve this?

Waiting in anticipation...

Thanks & Regards,
Manish Khubchandani.
Associate Consultant,
i-flex solutions ltd.
email id : [EMAIL PROTECTED]





RE: X Windows and Tomcat

2001-10-25 Thread Evan Swanson

when starting tomcat use the start instead of run in the command
i.e catalina.sh start 

-Original Message-
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 1:35 AM
To: [EMAIL PROTECTED]
Subject: Re: X Windows and Tomcat


> Krasi, you need to install a dummie Xserver named Xvfb. With this
> Xserver running you can shut your Xwindows without stopping tomcat.

Shouldn't Tomcat keep on running? Or better yet, daemonize itself?

Nix.



Re: tomcat session problem

2001-10-25 Thread Rinku Randhawa

Thanks Chintan, actually I heard from someone that tomcat server does not
support sessions properly at times, so, I just wanted to clarify it.

- Original Message -
From: "Shah, Chintan V (Chintan)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 25, 2001 3:39 AM
Subject: RE: tomcat session problem


> Hi Rinku,
>
> Your application should work fine in both the browsers opened
> simultaneously...only if the second browser window is not opened from the
> first browser window using Ctrl+N
>
> If you are opening the 2nd browser window from 1st one only... as said
> above, then the session object will be single and both of the browsers
will
> be interacting(i.e. reading, writing or get/set) with the single session
> object...and in that case, it will not behave properly..
>
> ya, but if you have opened two browser windows separately, then there will
> be two different session objects for each of them, you must be able to
work
> on both of them simultaneously..
>
> I hope, this will help you.
>
> regards,
> Chintan.
>
> -Original Message-
> From: Rinku Randhawa [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 25, 2001 12:16 AM
> To: [EMAIL PROTECTED]
> Subject: tomcat session problem
>
>
> Hi there,
>
> I am using jakarta-tomcat - 3.2.3 server to run my project. I am finding
> that session tracking, when more than one browser window is opened at one
> time, doesn't come out to be correct. I am using its inbuilt session
object
> and the cookies are enabled in my browser. When more than one sessions are
> running then the page presented is unpredictable.Sometimes correct page
> displays and sometimes totally diferent page gets displayed. It works
great
> except if I have 2 browsers sessions up - then it gets confused and losses
> track of which is the current session.
>
> Are there any issues with the Tomcat server regarding session tracking?
>
> Thanks in advance,
> -Rinku




RE: tomcat session problem

2001-10-25 Thread Geoff Howard

I am pretty sure from having been through this before that Netscape and IE
differ on this issue.  The description below holds for IE, but not Netscape
which will share a session no matter how you open the 2nd window.

Geoff

-Original Message-
From: Shah, Chintan V (Chintan) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 3:39 AM
To: '[EMAIL PROTECTED]'
Subject: RE: tomcat session problem


Hi Rinku,

Your application should work fine in both the browsers opened
simultaneously...only if the second browser window is not opened from the
first browser window using Ctrl+N

If you are opening the 2nd browser window from 1st one only... as said
above, then the session object will be single and both of the browsers will
be interacting(i.e. reading, writing or get/set) with the single session
object...and in that case, it will not behave properly.. 

ya, but if you have opened two browser windows separately, then there will
be two different session objects for each of them, you must be able to work
on both of them simultaneously..

I hope, this will help you.

regards,
Chintan.

-Original Message-
From: Rinku Randhawa [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 12:16 AM
To: [EMAIL PROTECTED]
Subject: tomcat session problem


Hi there,

I am using jakarta-tomcat - 3.2.3 server to run my project. I am finding
that session tracking, when more than one browser window is opened at one
time, doesn't come out to be correct. I am using its inbuilt session object
and the cookies are enabled in my browser. When more than one sessions are
running then the page presented is unpredictable.Sometimes correct page
displays and sometimes totally diferent page gets displayed. It works great
except if I have 2 browsers sessions up - then it gets confused and losses
track of which is the current session.

Are there any issues with the Tomcat server regarding session tracking?

Thanks in advance,
-Rinku



RE: File Download - CSV question ****

2001-10-25 Thread Evan Swanson


I order to reduce the variable, I tried installing TC4.0 on the same 
windows based machine. I am using the same client for both( IE5.0 ).

Results:
TC3.2 will present a popup box for downloading files with .CSV extention.
TC4.0 throws data directly up on the screen.


Is there any reason for this? Can I change the configuration? 

Is this a MIME type problem?


-Original Message-
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 10:11 PM
To: Tomcat-User
Subject: Re: File Download - CSV question 


Are you using the same client between the two servers?  IE seems to
consider itself more important than mimetypes, and if it sees a file
extension it recognises it treats it as it deems fit, regardless of the
mimetype.  So one possibility is that you have just installed excel or
something on the client, and IE is redirecting the download there.

another option is that the mimetype being sent in tomcat 4.0 is different
to 3.x, but I'm not sure about this, so will let someone else answer this
option.

if you outline exactly what client/server you were using before, and now,
it will make the question more specific.  for intsance, tc3.2 on windows
with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k
client with IE5.0.

cheers
dim

On Wed, 24 Oct 2001, Evan Swanson wrote:

> 
> I wrote an application that for Tomcat 3.2 running on window. In the HTML
> the is a reference (  ) to the filename. 
> When I run this on windows I get a popup "save as" selection box. 
> When I run this on Tomcat4.0 on Unix it no longer gives me the selection
box
> but instead displays the data on the screen.
> 
> Is this a difference between TC32 adn TC40 or Unix / Windows.
> Is this configurable.
> 
> 
> Thanks in advance.
> 
> 



getRemoteAddr() vs getRemoteHost()

2001-10-25 Thread Miao, Franco CAWS:EX

 When I put the following code in my Jsp, it comes up two identical
remote IP addresses, instead of one remote IP and one remote host name. My
computer  has Internet IP and valid Internet DNS server. Any suggestion
about
that?


Thanks!

out.print( request.getRemoteAddr() );
out.print( request.getRemoteHost() );

Franco




Re: Is Tomcat 4.0 Backward Compatible with 3.2.3 App??

2001-10-25 Thread Vernon Wu

We run into the compatible problem in our one module of servlet/JSP
application. A few months ago, I implemented it using the 3.x version of
Tomcat. After the 4.x version was stable, I had tried to move it over to the
Tomcat 4 for a better performence. The problem we run into is an exception
on a serializable from the DB access utility. The non-standard DB access
utility is from IBM, Informix formerly. We had reported this problem on the
support mailing list for more than a month, not response yet. I don't know
whether the problem is related with the Servlet/JSP spec or not. I would
like to know the cause.

Thanks in advance.

v.
- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 1:27 PM
Subject: Re: Is Tomcat 4.0 Backward Compatible with 3.2.3 App??


>
>
> On Tue, 25 Sep 2001 [EMAIL PROTECTED] wrote:
>
> > Date: Tue, 25 Sep 2001 09:53:26 -0700
> > From: [EMAIL PROTECTED]
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: Is Tomcat 4.0 Backward Compatible with 3.2.3 App??
> >
> > How backward compatible is Tomcat 4.0?
> >
> > I have an application that I developed with tomcat 3.2 and deployed on
> > JRun 3.0. Since then I have installed the final 4.0 and now have some
> > changes to make to my application and I am getting all kinds of errors
> > using the same .WAR file.
> >
> > I have re-installed 3.2.3 to make sure that I did not screw up a config
file
> > or something else and it works fine. Is there something that I missed
> > where I have to do a conversion on my older apps to use them in Tomcat
4.0?
> >
>
> If an application that works on Tomcat 3.2.3 meets the following criteria,
> it should run unchanged on Tomcat 4.0:
>
> * Compliant with the Servlet 2.2 and JSP 1.1 specs
>
> * Does not rely on bugs in Tomcat 3.2.3 that have been fixed in 4.0
>
> * Does not rely on non-specification-related behavior that might
>   have changed in 4.0
>
> Failure to run is a bug in 4.0 if all these criteria are met.  By far the
> most common problem people have is web.xml files that have elements not
> conforming to the DTD requirements (which violates the first requirement
> above) -- Tomcat 3.2.3 accepted such web.xml files anyway, but Tomcat 4.0
> will not.
>
> > Thanks
> >
> > Eric Wright, Programmer / Analyst
> > Vivid Solutions Inc.
> > INTERNET : [EMAIL PROTECTED]
>
> Craig
>
>
>



RE: File Download - CSV question ****

2001-10-25 Thread Evan Swanson

Thanks for answering...

That is the thing, I am using the same client in both situations.

I am using IE5.0 in both situations. The only difference is going from
TC3.2 on windows to TC4.0 on HP Unix. I would think that the IE would be
making the 
decision on how to handle the file by the extension name but it is not.

Is MIME type something you can configure on Tomcat? 


-Original Message-
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 10:11 PM
To: Tomcat-User
Subject: Re: File Download - CSV question 


Are you using the same client between the two servers?  IE seems to
consider itself more important than mimetypes, and if it sees a file
extension it recognises it treats it as it deems fit, regardless of the
mimetype.  So one possibility is that you have just installed excel or
something on the client, and IE is redirecting the download there.

another option is that the mimetype being sent in tomcat 4.0 is different
to 3.x, but I'm not sure about this, so will let someone else answer this
option.

if you outline exactly what client/server you were using before, and now,
it will make the question more specific.  for intsance, tc3.2 on windows
with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k
client with IE5.0.

cheers
dim

On Wed, 24 Oct 2001, Evan Swanson wrote:

> 
> I wrote an application that for Tomcat 3.2 running on window. In the HTML
> the is a reference (  ) to the filename. 
> When I run this on windows I get a popup "save as" selection box. 
> When I run this on Tomcat4.0 on Unix it no longer gives me the selection
box
> but instead displays the data on the screen.
> 
> Is this a difference between TC32 adn TC40 or Unix / Windows.
> Is this configurable.
> 
> 
> Thanks in advance.
> 
> 



Re: Precompiled jsp's

2001-10-25 Thread dhay



I precompile my jsps at build time using jspc.  If you add the mappings in your
web.xml, the server will use these instead of precompiling the jsps for you.

Dave





"Nikola Milutinovic" <[EMAIL PROTECTED]> on
10/25/2001 01:23:42 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Re: Precompiled jsp's



> Why are you pre-compiling the JSP's?
> Doesn't Tomcat do that automatically?

How do you precompile JSPs on startup? I know they can be precompiled if called
with that "precompile" URL. But suppose I had a lot of JSPs and I would like to
tell Tomcat to precompile a defined portion of them into run-time servlets, so I
could avoid that initial lag of first-time-run JSP.

Nix.









Re: tomcat session problem

2001-10-25 Thread Rinku Randhawa

Thanks Ralph for the information, my question is when there are 2 sessions
running on the web in the same PC (by opening 2 browsers) then it doesn't
track the sessions properly and changes the value of the session when I go
to different pages even if I limit one session to one browser.

Thanks,
-Rinku

- Original Message -
From: "Ralph Einfeldt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 25, 2001 2:32 AM
Subject: AW: tomcat session problem


> It's not a tomcat issue, it more an issue of your application.
>
> If you open a second windows from a running session, the windows
> will share the session from tomcat. From the view of tomcat the
> windows are indistinguishable from each other. Tomcat even can't
> recognize that there are two windows (That's true for any server
> that talks HTTP with its clients).
> So if you want to allow more than one window, your application
> has to take care of that.
>
> > -Ursprüngliche Nachricht-
> > Von: Rinku Randhawa [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 24. Oktober 2001 20:46
> > An: [EMAIL PROTECTED]
> > Betreff: tomcat session problem
> >
> >
> > Hi there,
> >
> > I am using jakarta-tomcat - 3.2.3 server to run my project. I
> > am finding
> > that session tracking, when more than one browser window is
> > opened at one
> > time, doesn't come out to be correct. I am using its inbuilt
> > session object
> > and the cookies are enabled in my browser. When more than one
> > sessions are
> > running then the page presented is unpredictable.Sometimes
> > correct page
> > displays and sometimes totally diferent page gets displayed.
> > It works great
> > except if I have 2 browsers sessions up - then it gets
> > confused and losses
> > track of which is the current session.
> >
> > Are there any issues with the Tomcat server regarding session
> > tracking?
> >
> > Thanks in advance,
> > -Rinku
> >
> >
> >
> >




Providing for persistent files in a web-app

2001-10-25 Thread Frank Lawlor

I have a web app that allows users to add files to 
the app, some of which can be displayed via URL
references (many different file types).

Currently these files are in a subdirectory ("New") of the
web-app.  This creates a maintenance problem
since replacing the web-app (erase webapps/MyApp.war,
erase webapps/MyApp directory, and deploy new 
MyApp.war) also destroys the "New" directory.

Rather that having a complicated process of saving
and restoring the "New" directory it seems like it 
would be better to keep it elsewhere.  However, the
contents still need to be displayable in a browser as URLs.

The best approach I could think of was to add a 
simple tomcat web-app whose only purpose is to
hold the contents of "New".

Any problems with this approach?  Is there a 
better/simpler approach?

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.






Error in mod-webapp nightly snapshot

2001-10-25 Thread David Smith

Pier -- Thought you might want to know about this (you might already).  I 
just built mod-webapp from the nightly snapshot dated 10-25-2001 and found an 
error in the build.

Line 77 of WarpConnector.java imports 
'org.apache.catalina.ServerSocketFactory' when it looks like it should import 
(at least for Tomcat 4.0.1) 'org.apache.catalina.net.ServerSocketFactory'

I made the change in the snapshot I downloaded and it built without a hitch.

--David Smith



RE: sourcepath problem in building tomcat (apxs pb building mod_jk.so)

2001-10-25 Thread Larry Isaacs

The Tomcat 3.3 release is built on a Sun box running
SunOS.  It has no problem using the build.xml file
as is.  I don't know why your system is having
trouble with the ';' in build.xml, though perhaps
its a JDK 1.2.1 issue, assuming thats what you are
still using.

You are correct that the "ant" build doesn't build
mod_jk.so.  Building of the native connectors is
done separately.  Given that I'm pretty much a
Windows person, and don't know much about Solaris,
someone else will have to provide advice about
how to get mod_jk.so to build on Solaris.  You might
search the tomcat-user archive to see if similar
errors have been encountered in the past.

Cheers,
Larry

> -Original Message-
> From: Bill Cai [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 25, 2001 1:32 AM
> To: [EMAIL PROTECTED]
> Cc: Bill Cai
> Subject: Re: sourcepath problem in building tomcat (apxs pb building
> mod_jk.so)
> 
> 
> I think the problem is it didn't like the ";"s in the
> value of "sourcepath". It no longer complains after I 
> changed them to ":"s. I guess the source was for 
> Windows platform. On Solaris ";" means end of the
> command...
> 
> However, it still complains about "srcdir" in the
> following block:
> 
>   
> debug="${debug}"
>optimize="${optimize}"
>deprecation="off"
>srcdir="src/share">
> 
> Actually, what I want is "mod_jk.so". Not sure "ant"
> it
> will build the whole thing including mod_jk.so? I
> went to build/tomcat/apache1.3 to build mod_jk.so
> individually by using build-solaris.sh or 
> build-unix.sh. But both of them failed "apxs" from
> my apache installation. I didn't install a binary
> version of apache. I built it by using:
> 
> configure --prefix=/usr/local/apache \
> --enable-module=most --enable-shared=max
> 
> But that failed on linking from apxs. i.e., didn't
> product an mod_jk.so
> 
> Thanks,
> 
> Bill
> >From: Larry Isaacs 
> > Subject:  RE: sourcepath problem in building tomcat
> > Date:  Wed, 24 Oct 2001 08:20:32 -0400
> >
> > I don't use JDK1.2.1, so I don't know much of the
> > details about it.  However, the help message:
> >
> >
> >[-g][-O][-debug][-depend][-nowarn][-verbose][-classpat>h
> > path][-nowrite][-deprecation][-d dir][-J > flag>] file.java...
> >
> > is very 1.1.8-like and doesn't support the
> >-sourcepath
> > argument.  I would guess that Ant is thinking the
> JDK >is
> > Java2 and assumes the javac supports the -sourcepath
> > argument.  Maybe this isn't a correct assumption for
> > JDK 1.2.1.
> >
> > I would highly recommend upgrading your JDK.  I
> think
> > there are other problems in store if you continue
> >using
> > it.  If you upgrade, I think your compile problem
> >would
> > disappear.
> >
> > Cheers,
> > Larry
> >
> >
> 
> > It is jdk 1.2.1:
> > 
> > java version "1.2.1"
> > Solaris VM (build Solaris_JDK_1.2.1_04, native
> > threads, sunwjit)
> > 
> > Thanks,
> > 
> > Bill
> > 
> > --- Bill Cai <[EMAIL PROTECTED]> wrote:
> > > I thought that I was using at least jdk1.2. But I
> > > willl check tonight because I have multiple jdks
> > > installed.
> > > 
> > > Thanks,
> > > 
> > > Bill
> > > 
> > > > >From: Larry Isaacs 
> > > > > Subject:  RE: sourcepath problem in building
> > > > tomcat
> > > > > Date:  Tue, 23 Oct 2001 12:51:51 -0400
> > > > >
> > > > > It appears that the javac being executed is
> > > coming
> > > > from
> > > > > JDK 1.1.8.  Is JDK1.1.8 what you want to be
> > > using,
> > > > > or is an old javac being picked up by mistake?
> > 
> > > If
> > > > > JDK 1.1.8 is correct, I would like to see the
> > > log
> > > > > for the "detect:" through "init:" targets.
> > > > >
> > > > > Larry
> > > > >
> > > > --- Bill Cai <[EMAIL PROTECTED]> wrote:
> > > > > I always got the following error when building
> > > > > tomcat
> > > > > by using ant. I tried ant 1.1 1.2 1.4. Any
> > idea?
> > > > > 
> > > > > tomcat_util:
> > > > > [javac] Compiling 91 source files to
> > > > >
> > > >
> > >
> >
> /usr/local/jakarta/jakarta-tomcat-3.3-dev-src/build/tomcat/classes
> > > > > [javac] javac: invalid flag: -sourcepath
> > > > > [javac] use: javac
> > > > >
> > > >
> > >
> >
> [-g][-O][-debug][-depend][-nowarn][-verbose][-classpath
> > > > > path][-nowrite][-deprecation][-d
> > dir][-J > > > > flag>] file.java...
> > > > > 
> > > > > BUILD FAILED
> > > > > 
> > > > >
> > > >
> > >
> >
> /usr/local/jakarta/jakarta-tomcat-3.3-dev-src/build.xml:206:
> > > > > Compile failed, messages should have been
> > > > provided.
> > > > > 
> > > > > 
> > > > >
> > > __
> > > > > Do You Yahoo!?
> > > > > Make a great connection at Yahoo! Personals.
> > > > > http://personals.yahoo.com
> > > > 
> > > > 
> > > >
> > __
> > > > Do You Yahoo!?
> > > > Make a great connection at Yahoo! Personals.
> > > > http://personals.yahoo.com
> > > > 
> > > 
> > > 
> > > __
> > 

RE: File Download - CSV question ****

2001-10-25 Thread Filip Hanik

I also believe that you can configure IE to prompt you for different file
types.

Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net

>-Original Message-
>From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, October 24, 2001 10:11 PM
>To: Tomcat-User
>Subject: Re: File Download - CSV question 
>
>
>Are you using the same client between the two servers?  IE seems to
>consider itself more important than mimetypes, and if it sees a file
>extension it recognises it treats it as it deems fit, regardless of the
>mimetype.  So one possibility is that you have just installed excel or
>something on the client, and IE is redirecting the download there.
>
>another option is that the mimetype being sent in tomcat 4.0 is different
>to 3.x, but I'm not sure about this, so will let someone else answer this
>option.
>
>if you outline exactly what client/server you were using before, and now,
>it will make the question more specific.  for intsance, tc3.2 on windows
>with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k
>client with IE5.0.
>
>cheers
>dim
>
>On Wed, 24 Oct 2001, Evan Swanson wrote:
>
>>
>> I wrote an application that for Tomcat 3.2 running on window. In the HTML
>> the is a reference (  ) to the filename.
>> When I run this on windows I get a popup "save as" selection box.
>> When I run this on Tomcat4.0 on Unix it no longer gives me the
>selection box
>> but instead displays the data on the screen.
>>
>> Is this a difference between TC32 adn TC40 or Unix / Windows.
>> Is this configurable.
>>
>>
>> Thanks in advance.
>>
>>
>
>




Tomcat vs. Apache/Tomcat

2001-10-25 Thread Timothy Fisher

Can someone explain the advantages of using Tomcat
with Apache, as opposed to using Tomcat as both web
server and app server?

Thanks,
Tim




Re: question

2001-10-25 Thread Timothy Fisher

Make sure the directory structure under the
WEB-INF/classes directory mirrors your package names.

Tim

--- Dmitri Colebatch <[EMAIL PROTECTED]> wrote:
> they should go in the WEB-INF/classes, or as a jar
> in WEB-INF/lib.  You
> have got them in the correct directory structure
> dont you?
> 
> hth
> dim
> 
> On Wed, 24 Oct 2001, Pal, Anshu wrote:
> 
> > Hi!
> > I recently installed Tomcat ( ver 3.3) . Where
> should I put the non -servlet
> > class files required by the servlets . I tried
> putting them under
> > WEB-INF/classes directory. I get a
> java.lang.NoClassDefFoundError Exception.
> > I tried putting them in the WEB-INF lib directory
> . doesn't work either.
> > 
> > Any suggestions ?
> > TIA
> > 
> > 
> > Anshu Pal
> > 
> > Proprietary/Confidential Information belonging to
> CGI may be contained in
> > this message. If you are not a recipient indicated
> or intended in
> > this message (or responsible for delivery of this
> message to such person),
> > or you think for any reason that this message may
> have been
> > addressed to you in error, you may not use or copy
> or deliver this message
> > to anyone else. In such case, you should destroy
> this message
> > and kindly notify the sender by reply e-mail.
> > 
> > 
> 




RE: servlets path in tomcat 3.3

2001-10-25 Thread Larry Isaacs

Hi Mathieu,

RequestInterceptor is still supported, but not used because modules.xml
provides for simpler syntax in the server.xml.  Thus, the
InvokerInterceptor is still there in server.xml, but it appears as:



The class for InvokerInterceptor is now
org.apache.tomcat.modules.generators.InvokerInterceptor.  Unfortunately,
it has lost its ability to set the prefix, which is hardcoded to
"/servlet/".  I'll add the prefix property back in for Tomcat 3.3.1.
In the meantime, you could use the PasswordPrompter.war add-on module
as an example of how to create a MyInvokerInterceptor add-on module.
Modify the InvokerInterceptor source to allow the prefix to be set.
Your "interceptors.xml" might look like:









Hope this helps.

Cheers,
Larry

> -Original Message-
> From: mathieu [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 24, 2001 5:10 AM
> To: [EMAIL PROTECTED]
> Subject: Re: servlets path in tomcat 3.3
> 
> 
> That's fine for a couple of servlets, but I have more than 
> 6500 servlets, I 
> can't map them all by hand.
> In Tomcat 3.2, the RequestInvoker had a prefix argument which 
> could be used 
> to redirect matching paths to servlets
> 
>  className="org.apache.tomcat.request.InvokerInterceptor"
> debug="0" prefix="/servlet/" />
> 
> With prefix="/", I could forward any request to servlets 
> without using 
> "/servlet/" in the url.
> Where is the RequestInterceptor gone?
> 
> > Add a servlet-mapping to your web.xml file.
> >
> > 
> >   
> > SnoopServlet
> >   
> >   
> > /SnoopServlet
> >   
> > 
> >
> > mperreno wrote:
> > > Is it possible to use non-standard paths for servlet i.e. use map
> > > anything after the context name to servlets:
> > > www.foobar.com/foo/SnoopServlet
> > > instead of
> > > www.foobar.com/foo/servlet/SnoopServlet
> > >
> > > I managed to do it with tomcat 3.2 but I can't do it with 
> tomcat 3.3
> > >
> > > thanks
> > >
> > > --
> > > mathieu perrenoud [iis]
> 
> -- 
> mathieu perrenoud [kesako]
> 



Re: Launching subprocess under Tomcat as a Service

2001-10-25 Thread Frank Lawlor

You should try to figure out what it is hanging on.
Add some tracing.

You can launch a subprocess, but it is running as the 
service user in a service environment.  This is VERY
likely different from your non-service environment.

To help debug:
  - print out the path to a file
  - print out the classpath ...
  - print out the env ...
  - remember that services are usually set to NOT be able
to interact with the desktop.  Try changing it to yes.
  - remember that it may have different permissions so
it might not have access to resources that you do.
  - remember that you cannot access mounted drives

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.






login from home page

2001-10-25 Thread Carlo Sorda

Hi,
I have this situation:

I have an Home Page, in my home page there are two text box for input login
and password.
What can I do for authenticate a user and go to a protect area.
My protect area is configured whit:

> FORM
> 
> /admin/login.jsp
> /admin/loginerror.jsp
> 
> 

When I direct go in http://localhost/admin/ my login.jsp appear and all OK,
but nothing do to when I insert name and password on my home page.
What can I do? There is a solution?
Thanks, Carlo Sorda




RE: Launching subprocess under Tomcat as a Service

2001-10-25 Thread Wolfgang Stein

I encountered some problems on file i/o
due the fact that the WINs current working
directory differs if tomcat is started as a NT service.

HTH
Wolfgang Stein

> -Original Message-
> From: Robert Casto [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 25, 2001 4:40 AM
> To: [EMAIL PROTECTED]
> Subject: Launching subprocess under Tomcat as a Service
> 
> 
> To all,
> 
> I have a servlet that spawns a process to generate PDF 
> reports. When I run
> Tomcat 3.2.3 using the startup.bat method, everything works fine. The
> subprocess runs, completes its task, and my Servlet returns 
> and completes
> its processing. The problem comes when running Tomcat as a 
> service using
> jk_nt_service.exe. My Servlet will run, all of my webpages 
> will work, but
> when my Servlet spawns the subprocess to generate the PDF 
> file, it hangs. I
> have tried changing the settings of the service to log in as 
> various users
> with no luck. Any suggestions on how to ensure that the 
> subprocess will
> execute while running Tomcat as a service. NOTE: This problem 
> occurs whether
> I am using NT4 SP6 or Win2k.
> 
> Robert Casto
> 
> 
> .
>  CinciJava | Java Development and Training
> 
> Robert Casto | [EMAIL PROTECTED]
> 513-349-JAVA | www.cincijava.com
> 
> 
>



TC4: stopping/starting an application works, reloading does not

2001-10-25 Thread Wolfgang Stein

Are there any known problems related to 
reloading of an application with the 'manager' app ?

E.g. a servlet request did not load a servlet
since i forgot to deploy the corresponding servlet class.

After deploying it and reloading the application 'myapp' with
  http://localhost:8080/manager/reload?path=/myapp
the servlet is still not found.

After doing successively 
  http://localhost:8080/manager/stop?path=/myapp
  http://localhost:8080/manager/start?path=/myapp
the servlet of application 'myapp' is loaded successfully.

The corresponding servlet entry/mapping in myapp/WEB-INF/web.xml
was already present on the first attempt.

Any similar experiences ?
Wolfgang Stein



Re: Can't get precompiled JSP to be welcome page?

2001-10-25 Thread dhay



Hey Alex - looks like we're on the same lists!

This is a known bug - I submitted it about a month ago!  See Bug 3309

They said it will be fixed in 3.3.1 (maybe)!

I got around it by having my index.htm as welcome page, and redirecting to the
jsp I wanted.  Ugly, but it works.

Cheers,

Dave







"Alex Colic" <[EMAIL PROTECTED]> on 10/24/2001
01:39:51 PM

Please respond to [EMAIL PROTECTED]

To:   "Tomcat-User" <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Can't get precompiled JSP to be welcome page?



Hi,

I have a JSP file, pwLogin.jsp that I precompiled. I then added the
following to my web.xml file:

 
  pwLogin
  pwLogin
 

...

 
  pwLogin
  /pwLogin.jsp
 

...



/pwLogin.jsp
   pwLogin.jsp


When I access my web app without specifiying a JSP I get a page of web apps
root directory. If I specify webapp/pwLogin.jsp I get the page.

Any help, ideas is appreciated.


Alex










JDBC Realm

2001-10-25 Thread Mihai Gheorghiu

Tomcat 3.2.2 on RH7.0
I created a JDBC realm as per "JDBC Realms"
server.xml
...
 

...
Application in webapps/development/*
WEB-INF/web.xml
...


  
 Protected Area
 /*
  DELETE
 GET
 POST
  PUT
  
  
 tomcatRole
  



  BASIC
  development

...
When I try to log in, I am prompted twice:
First, a Win-like window:
Please type your user name and password
Site:xxx.yyy.zzz.ttt
Realm:development
User Name
Pasword
Save this password in your password list
OK   Cancel
Then it starts loading the applet, Java console pops up, and another window
(with Duke's icon) comes up:
Firewall:xxx.yyy.zzz.ttt/xxx.yyy.zzz.ttt
Realm:   development
Scheme:  basic
User name:
Password:
Yes   No
Once authenticated, the applet displays some data queried by a servlet.
Could this be the cause for being prompted twice?
I'd like to ask for username/password only once, in the beginning. How can I
do that, while preventing users from logging directly into the next level?
Thank you very much for your patience and support.




Re: Tomcat and firewalls...

2001-10-25 Thread Barry White

Go to the ZoneAlarm "programs" section and see if your program has access to
the internet.  If you are not sure about the settings then delete all of the
setting for  the programs in ZoneAlarm and start up Tomcat and mySQL.
ZoneAlarm will ask you if you want to allow these programs to access the
internet... just click yes.

P.S. Your problem could also be your anitvirus sorftware or w2k indexing.
Try disabling these and see if that helps.

later.
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 24, 2001 4:22 AM
Subject: RE: Tomcat and firewalls...


> Dave,
>
> Maybe I've got my ZoneAlarm seetings wrong. I use the basic version
> (not Pro), on my home pc, and run Tomcat/Java/MySql on that pc. My
> application doesn't seem to work when I have ZoneAlarm on. I'd like it to,
> as I hate leaving my home server wide open when I go to work.
>
> Dave
>
>
>
> -Original Message-
> From: David A. Fuess [mailto:[EMAIL PROTECTED]]
> Sent: 24 October 2001 03:17
> To: [EMAIL PROTECTED]
> Subject: RE: Tomcat and firewalls...
>
>
> I use Zone Alarm and it doesn't bother Tomcat at all.
>
> Dave
>
> At 01:54 PM 10/23/2001 +0100, you wrote:
> >I use ZoneAlarm and I've found that I have to turn it off in order to use
> >Tomcat
> >
> >Dave
> >
> >
> >
> >-Original Message-
> >From: Thomas Diamond [mailto:[EMAIL PROTECTED]]
> >Sent: 23 October 2001 01:47
> >To: [EMAIL PROTECTED]
> >Subject: Tomcat and firewalls...
> >
> >
> >I think that something's wrong with Tomcat and firewalls
> >As I've written in previous letters I had some problems with Win2K
> >crashing inexplicably while running Tomcat. The system was rebooting on
> >its own. After I disabled the atomatic reboot feature I got a Blue
> >Screen saying something about vsdatant.sys ( a file installed with
> >ZoneAlarm ). I also had some other problems with ZoneAlarm so I
> >completely removed it from my system. OK, I said to myself, now you are
> >safe. Today, while I was testing my JSPs locally I got a blue screen
> >saying something about "DRIVER_IRQL_NOT_LESS_OR_EQUAL"  and  mentioning
> >a file called "nisdrv.sys". I searched a bit and found that this is a
> >file installed with Norton Internet Security (I've got version Norton
> >Internet Security 2001 version 2.5 installed). So what's goig on? Tomcat
> >cannot run in a machine with a firewall or I 've done it again ?
> >
> >Tom.
>
>  From the Desk of ...
> David A. Fuess
> [EMAIL PROTECTED], http://www.Fuess.Net
>




RE: Automatic Application Deployment

2001-10-25 Thread Brad . Moreland

I actually found the problem in my web.xml file.  I sort of figured out what
needs to go in there, but I really need a tutorial that is in layman's
terms.  The docs included with Tomcat regarding the web.xml file just say to
read the servlet spec.  The servlet spec assumes that a "real web developer"
is the reader.  I need something that will help a newbie understand the
web.xml file.  Can anyone point me to some descent documentation?

Thanks in advance!!
Brad Moreland

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 8:53 PM
To: [EMAIL PROTECTED]
Subject: Re: Automatic Application Deployment


What you are describing should work.  Are there any messages in the log
files that might point at problems in deploying the app?

Craig


On Wed, 24 Oct 2001 [EMAIL PROTECTED] wrote:

> Date: Wed, 24 Oct 2001 11:07:11 -0500
> From: [EMAIL PROTECTED]
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Automatic Application Deployment
>
> Hi!
> I am attempting to Auto Deploy a war (clmtest.war in this case) file.  I
put
> it in the appBase ($CATALINA_HOME/webapps) and it expands automatically as
> expected when I restart tomcat.  My problem is that I cannot access my
pages
> from a browser.  I continue to get the standard 404 error that "The
> requested resource (/clmtest/) is not available. ".  If I add a context
> manually to my server.xml file it works fine.  I am under the impression
> according to the documentation that I should not have to manually add a
> context.
> I'm using Solaris 8 and Tomcat 4.0.1
> Help!?
> Thanks in advance!!
> Brad Moreland
>
> +++The information transmitted is intended only for the person or entity
to
> which it is addressed and may contain confidential and/or privileged
> material.  Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited.   If you
received
> this in error, please contact the sender and destroy any copies of this
> document.+++
>
+++The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and destroy any copies of this
document.+++



Re: Update JSP

2001-10-25 Thread Siomara Pantarotto

When you work with tomcat3.2.1 sun recommends to create two environment 
variables:

ANT_HOME and TOMCAT_HOME they both point to the tomcat installation folder. 
Do you have that set?

Siomara


>From: Claudia Sarmiento <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: Update JSP
>Date: Wed, 24 Oct 2001 19:42:36 -0500
>
>Hello:
>I'm using tomcat 3.2.1, and i want to change a JSP page, but i don't know
>how i do that, i tried to compile in my app dir with the build.bat but i
>received the error : NoClassDefFound Error /org/apache/tools/ant/main
>
>Thanks in advance.
>
>
>Claudia


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




RE: Update JSP

2001-10-25 Thread Durham David Cntr 805CSS/SCBE

If you want to change a JSP page, just modify the file.  That's all you
have to do.


-Original Message-
From: Claudia Sarmiento [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 7:43 PM
To: '[EMAIL PROTECTED]'
Subject: Update JSP 


Hello:
I'm using tomcat 3.2.1, and i want to change a JSP page, but i don't
know
how i do that, i tried to compile in my app dir with the build.bat but i
received the error : NoClassDefFound Error /org/apache/tools/ant/main

Thanks in advance.


Claudia



Re: Tomcat 4.0.1 Final and Xerces Parser

2001-10-25 Thread Frank Lawlor

Have you read
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

If this doesn't answer your questions, then it might be good to 
identify it here and try to get the howto updated.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.






Re: how to keep form data

2001-10-25 Thread David Smith

I would like to add to that.   It's a better user experience to do the 
validation on the client side since they don't have to actually submit and 
then wait for a reply, but definitely still validate on the server side as 
well.  All data coming into a web server should be considered untrusted until 
proven otherwise.  After all, the submission might come from one of your 
pages or some hacker trying to break/exploit your app.

As far as keeping form data, I tend to have the form submit data to the page 
it's in and then do some code to grab the data and process it.  Then forward 
the user to the next page.  Obviously do a quick check and if there is no 
form data skip the processing.  If there's a problem, then just take the 
submitted form data and enter it back in the form with value="<%= ... %>" 
attributes.

--David Smith

On Wednesday 24 October 2001 08:05 pm, you wrote:
> If you do the validation in the client side (using java script) you do not
> lose the information. Besides this is a better approach once you don't want
> your code to do the avalidation in the server side and then post that the
> user made a mistake.
>
> Keep validation in the client side always
>
> Siomara pantarotto
>
>
>
> From: Henry <[EMAIL PROTECTED]>
>
> >Reply-To: [EMAIL PROTECTED]
> >To: <[EMAIL PROTECTED]>
> >Subject: how to keep form data
> >Date: Wed, 24 Oct 2001 09:19:47 -0600 (Mountain Daylight Time)
> >
> >when a user submits a form, the content is checked and
> >if anything is invalid, the user is prompted to
> >correct and submit the form again.
> >
> >how can i keep the content the user typed in before?
> >
> >I am using RequestDispatcher.forward("originalform.html");
> >
> >is there a flag or something to set?
>
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




Strange problems happening with virtualhosting: URGENT

2001-10-25 Thread Gabriel J Zimmerman


Hi,

I am using Tomcat 3.2.3 on a Linux system with a setup of multiple
virtual hosts. Most of my class files are in the /lib
directory, but when I move them out, I still get these problems.

I am having two very strange problems:

First, the java classes do not seem to be able to load a properties file
located in the classes directory using the following code snipit:

InputStream is =
getClass().getResourceAsStream("/prop_file_name.properties");
Properties props=new Properties();
props.load(is);

I get a null pointer exception at the "props.load(is)" line. This would
assumedly mean that the properties file is not there, but it is there
under the correct name. In fact, this is a program copied from another
server with a similar configuration, except it did not use the virtual
hosting. This problem is especially weird, because the webapps recognize
my tld files located in the lib directory.

Second, I am using the mailer taglib, and although everything seems to
go through fine and the taglib reports no errors and there are no
exceptions thrown, the mail doesn't get sent. I tried this from all
virtual hosts on the box with the same problem both using a general mail
server and localhost as the mail server. On another box this same code
works fine, and sendmail works on the box. The code is posted below.

In my investigating this problem there are a couple direct questions:
1) Is there anything I need to do to add a virtual host to Tomcat other
than adding the following lines to the server.xml file?:

  


  

2) Might there be some problem with a class located in the
TOMCAT_HOME/lib directory trying to call getResourceAsStream on a class
that is located in an individual webapp, even if that webapp is the one
that is using the class file in TOMCAT_HOME/lib?
3) Is there anything else that anyone can think that might be causing
this?

This a very urgent problem. Any help would be greatly appreciated.

Thanks,
Gabe



RE: Question

2001-10-25 Thread Reynir Hübner

well it can, and we are using it like that.
just grab a sample of workers.properties and uriworkermap.props. from
older versions of tomcat.
I posted the url to the documentation on how to get AJP (mod_jk) for
apache to work with tomcat 4 few days ago, and then we used the
documentation for tomcat 3.2.3 on how to use the isapi_redirect.dll but
we got that one in it´s most recent version from tomcat 3.3
distribution.

hope it helps
-reynir



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 24. október 2001 15:54
To: [EMAIL PROTECTED]
Subject: Question


I'm a total Newbie and am looking for a Tomcat - and - IIS -
Documentation
for Tomcat 4.
It cant be the same, since workers.properties etc. dont come with Tomcat
4.
Thx for help
Grtz
Jan




RE: Help ... Weird Problem

2001-10-25 Thread A.L.

Randy,
   After reinstalling bot JVM and Tomcat everything
worked fine.  I appreciate your response.

Thank you,
  -Amos
--- Randy Layman <[EMAIL PROTECTED]> wrote:
> 
>   Depending upon which version of Tomcat you are
> using:
>   1.  TC 3.2 and previous have a bug where a
> misconfiguration can
> cause the CPU load to spike and the page to never be
> served
>   2.  Some versions don't handle the situation where
> you require
> authentication but set the constraints such that the
> login page also needs
> authentication (creating an endless loop)
> 
>   If you did a clean install then whatever might have
> been hacked,
> regarding Tomcat, will have been replaced.
> 
>   If the JVM was corrupt you would be getting crashes
> and not endless
> processing.
> 
>   Is Tomcat outputting any information to
> STDOUT/STDERR/its log files
> that would be relevant to this?
> 
>   Randy
> 
> > -Original Message-
> > From: A.L. [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 23, 2001 7:35 PM
> > To: [EMAIL PROTECTED]
> > Subject: Help ... Weird Problem
> > 
> > 
> > Everything has been working fin ewith Tomcat until
> all
> > of a sudden certain web apps stopped working.   I
> have
> > no idea what could have happened.  I tried to
> > reinstall Tomcat, and when I do so, all the admin
> web
> > apps work fine, but ones that I have created that
> were
> > working before no longer work.  I'm worried that
> > perhaps someone has hacked into my computer.
> > 
> > The problem I get now is that when I try to view a
> > page on the localhost: the browser continues to
> try to
> > load the page, but is unable to.  What I am
> wondering
> > is if it is possible that the jvm I downloaded
> from
> > sun could become corrupt.  What wlse could cause
> such
> > a weird problem.
> > 
> > -Thanks
> > 
> > __
> > Do You Yahoo!?
> > Make a great connection at Yahoo! Personals.
> > http://personals.yahoo.com
> > 


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Re: Running Tomcat 3.2.3 (or 4.0) on a multi-homed machine.

2001-10-25 Thread Craig R. McClanahan



On Wed, 24 Oct 2001, Prasanna Uppaladadium wrote:

> Date: Wed, 24 Oct 2001 15:43:52 -0400
> From: Prasanna Uppaladadium <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Running Tomcat 3.2.3 (or 4.0) on a multi-homed machine.
>
> Hello.
>
> Is there a way to run Tomcat 3.2.3 or 4.0 so that the server will listen
> on a specific host interface (IP address)?
>
> For example, my machine has two IP addresses (123.123.123.123 and
> 111.111.111.111). I would like to run two instances of Tomcat on port 80
> each one listening on one of the interfaces respectively. I specifically
> don't want to use Virtual Hosting.
>
> The server.xml file on both versions of Tomcat seem to take a port
> parameter but not a host parameter.
>

Tomcat 4 supports the "address" parameter for this.  See the docs at:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/http11.html

> One way to solve this of course is to use Apache as a front for Tomcat.
> But I would like to use Tomcat as a standard alone web server if at all
> this is possible.
>
> Thanks for any help.
> Prasanna.
>
>
Craig McClanahan





Re: tomcat session problem

2001-10-25 Thread Craig R. McClanahan

It's more likely to be a problem with your application, or a
misunderstanding of how browsers handle cookies.

In general, cookies are *not* specific to a particular browser window.
Therefore, all windows that the client has open are part of the same
session.  This is the way Netscape (at least 4.7.x) always runs -- but in
IIS it's configurable.  But the bottom line is that you cannot expect each
window to be running in its own session.

Craig


On Wed, 24 Oct 2001, Rinku Randhawa wrote:

> Date: Wed, 24 Oct 2001 14:46:25 -0400
> From: Rinku Randhawa <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: tomcat session problem
>
> Hi there,
>
> I am using jakarta-tomcat - 3.2.3 server to run my project. I am finding
> that session tracking, when more than one browser window is opened at one
> time, doesn't come out to be correct. I am using its inbuilt session object
> and the cookies are enabled in my browser. When more than one sessions are
> running then the page presented is unpredictable.Sometimes correct page
> displays and sometimes totally diferent page gets displayed. It works great
> except if I have 2 browsers sessions up - then it gets confused and losses
> track of which is the current session.
>
> Are there any issues with the Tomcat server regarding session tracking?
>
> Thanks in advance,
> -Rinku
>
>
>




RE: Compilation Error when building Tomcat

2001-10-25 Thread Craig R. McClanahan

Did you download the "optional.jar" file that goes with Ant, and put it in
the $ANT_HOME/lib directory?  Did you add xalan.jar (from JAXP/1.1) to the
$ANT_HOME/lib directory?  Both of these requirements are documented on the
"BUILDING.txt" step about downloading and installing Ant.

Craig


On Wed, 24 Oct 2001, Nitin Vira wrote:

> Date: Wed, 24 Oct 2001 11:20:20 -0700
> From: Nitin Vira <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: Compilation Error when building Tomcat
>
> Hi Craig,
>
> I am really sorry for taking up too many of your resources on this, but i just cant 
>figure out how to get tomcat to build.
> I used the release version of tomcat source and i think it gets build upto 
>dist-static and then it gives the following error, i think in target dist-prepare,
>
> tomcat-docs:
>
> BUILD FAILED
>
> C:\jakarta-tomcat-4.0-rc1-src\webapps\tomcat-docs\build.xml:84: Class org.apache
> .tools.ant.taskdefs.XSLTProcess doesn't support the nested "param" element
>
>
> So i downloaded the latest source from the nightly builds but after updating 
>build.properties when i try to run ant -projecthelp i get following error
>
> C:\Tomcat\jakarta-tomcat-4.0>ant -projecthelp
> Searching for build.xml ...
> Buildfile: C:\Tomcat\jakarta-tomcat-4.0\build.xml
>
> BUILD FAILED
>
> C:\Tomcat\jakarta-tomcat-4.0\build.xml:239: Class org.apache.tools.ant.taskdefs.
> Zip doesn't support the nested "zipfileset" element
>
> Total time: 1 second
>
> Could you please help me figure out the problem,
> Thanks for your help.
> Nitin
>
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 23, 2001 11:04 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Compilation Error when building Tomcat
>
>
>
>
> On Tue, 23 Oct 2001, Nitin Vira wrote:
>
> > Date: Tue, 23 Oct 2001 10:12:43 -0700
> > From: Nitin Vira <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: RE: Compilation Error when building Tomcat
> >
> > Hi Craig,
> >
> > I figured as much, but i dont quite get from where to get the latest servlet.jar 
>and where to put and make the ant pick up this jar and not any other.
> > Thanks once again for your help.
> >
>
> See the "BUILDING.txt" file in the top level source directory of Tomcat.
> It tells you exactly where to get everything (including getting the latest
> Servlet and JSP classes from the "jakarta-servletapi1-4" repository).
>
> > Nitin
> >
>
> Craig
>
>




Re: XML ClassCastException and tomcat 4.0 documentation

2001-10-25 Thread Frank Lawlor

Joel,

You asked for help from "Someone who knows what they're doing"
so I probably don't qualify, but you might try putting the xerces jar in
your
jre/lib/ext and see if it helps.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.






Re: driver configuration with DB2 and tomcat

2001-10-25 Thread Barry White

I don't think you can use .zip files in the lib directory.  Try renaming it
to .jar.
Barry
- Original Message -
From: "Lawrence Louie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 21, 2001 11:31 PM
Subject: driver configuration with DB2 and tomcat


> Hi,
>
> I am having DB2 for my end, and I have servlet running
> inside tomcat-apache 4.0.  I have gotten DB2 exception
> error about loading the DB2 driver.  I have place the
> db2java.zip in the tomcat-apache/lib directory, and I
> am still having exception problem.
>
> However, if I am just running JDBC application from
> the command prompt, and I can retrieve data from the
> DB2, everything seem to works fine.
>
> Any hint of what I should try?
>
> Thanks!
>
> Lawrence
>
>
> __
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com
>




RE: how to keep form data

2001-10-25 Thread Mehdi

Ooh.. i have issue with this.  Validation should always be carried out on
the server side.

If validation is done on the client side, that is good, but server side
validation is always a must, especially if data being entered could cause
problems with data integrity ( i have seen this happen before).  Server side
code is the last defence and the safest as you dont need to worry about
whether or not javascript is enabled in their browser.

Mehdi :)

-Original Message-
From: Siomara Pantarotto [mailto:[EMAIL PROTECTED]]
Sent: 25 October 2001 01:05
To: [EMAIL PROTECTED]
Subject: Re: how to keep form data


If you do the validation in the client side (using java script) you do not
lose the information. Besides this is a better approach once you don't want
your code to do the avalidation in the server side and then post that the
user made a mistake.

Keep validation in the client side always

Siomara pantarotto



>From: Henry <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: how to keep form data
>Date: Wed, 24 Oct 2001 09:19:47 -0600 (Mountain Daylight Time)
>
>when a user submits a form, the content is checked and
>if anything is invalid, the user is prompted to
>correct and submit the form again.
>
>how can i keep the content the user typed in before?
>
>I am using RequestDispatcher.forward("originalform.html");
>
>is there a flag or something to set?
>


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





switch between http and https. how?

2001-10-25 Thread Taavi Tiirik


I have Tomcat 4 running fine with both http and https protocols.
I would like to use http for serving most of the documents and
only j_security_check (form based login) should be done over
https. How can I configure this?

with best wishes,
Taavi





RE: tomcat 4.0: Plug in custom Realm

2001-10-25 Thread Barney Hamish

You'll notice in the realm file there is a line that gives the class of the
JDBC Realm interceptor you're using. You should replace this class name with
the name of whatever inteceptor you want to use.

ie, change the line:
className="org.apache.catalina.realm.JDBCRealm"
to
className="my.FooBarRealm"
or whatever.

As long as this class can be found somewhere in your class path tomcat
should be able to load it.
Hamish


-Original Message-
From: Maneesha Jain [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 2:40 AM
To: [EMAIL PROTECTED]
Subject: tomcat 4.0: Plug in custom Realm


Hi,

I want to plug in a custom Realm class in server.xml in tomcat 4.0 ?

Is that possible ?

Can I need to implement the Realm interface and stick that in the
server.xml file?

Where should I put this class, so the tomcat can resolve it when parsing
server.xml ?

Is this procedure documented anywhere ?

Regards
Maneesha



RE: Running Tomcat 3.2.3 (or 4.0) on a multi-homed machine.

2001-10-25 Thread Larry Isaacs

On Tomcat 3.2.3, try:


...

...


On Tomcat 3.3 (and I believe 4.x) add:

address="123.123.123.123"

to the connector.  For Tomcat 3.3, that would be:



Hope that helps.

Cheers,
Larry



-Original Message-
From: Prasanna Uppaladadium [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 3:44 PM
To: [EMAIL PROTECTED]
Subject: Running Tomcat 3.2.3 (or 4.0) on a multi-homed machine.


Hello.

Is there a way to run Tomcat 3.2.3 or 4.0 so that the server will listen 
on a specific host interface (IP address)?

For example, my machine has two IP addresses (123.123.123.123 and 
111.111.111.111). I would like to run two instances of Tomcat on port 80 
each one listening on one of the interfaces respectively. I specifically 
don't want to use Virtual Hosting.

The server.xml file on both versions of Tomcat seem to take a port 
parameter but not a host parameter.

One way to solve this of course is to use Apache as a front for Tomcat. 
But I would like to use Tomcat as a standard alone web server if at all 
this is possible.

Thanks for any help.
Prasanna.



Re: Win2K IIS/Tomcat hangs

2001-10-25 Thread Dan Rasmussen

I got this privately from Larry but I would like to
publicly thank him for nailing it on the head and solving
this problem for me.  Using the 3.2.3 redirector with 3.3
is what caused my problem.  Simply dripping in the 3.3
version instantly solved the problem. 

Thanks very much.

Dan Rasmussen


--- Larry Isaacs <[EMAIL PROTECTED]> wrote:
> The mail server is unbelievably slow at the moment.
> Here was my response.
> 
> Larry
> 
> -Original Message-
> From: Larry Isaacs 
> Sent: Wednesday, October 24, 2001 8:01 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Win2K IIS/Tomcat hangs 
> 
> 
> Hi Dan,
> 
> I can't tell from the log, but I believe this is the
> symptom you would get if you accidentally used the
> isapi_redirect.dll from Tomcat 3.2.3 with Tomcat 3.3.
> To be safe, I would double check this.
> 
> To shoot in the dark a little bit, what happens if
> Tomcat isn't running when you try this.  Does it behave
> the same way or provide an error like it should?  Maybe
> something else is on the receiving end.  For fun,
> you could try switching to Ajp12 and see if something
> different occurs.
> 
> In your current setup, does the Tomcat 3.3 log show any
> sign that it received anything from the Ajp13 worker?
> 
> Cheers,
> Larry
> 
> > -Original Message-
> > From: Dan Rasmussen [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 23, 2001 4:47 PM
> > To: [EMAIL PROTECTED]
> > Subject: Win2K IIS/Tomcat hangs 
> > 
> > 
> > 
> > Hello,
> > 
> > I just joined the list (no confirmation yet so I'm not
> sure
> > this is going to take).  I did check the archives and
> have
> > seen similar postings but no info that fixes my
> problem...
> > 
> > I have been attempting to get IIS on Win2K/SP2 to play
> with
> > tomcat 3.3.  I have tomcat 3.3 installed and serving up
> the
> > Tomcat examples using this url:
> > http://localhost:8080/examples/jsp/index.html.  
> > 
> > I then used the "Tomcat IIS HowTo" to get IIS setup.  I
> got
> > to the point where I get a green up arrow on the filter
> but
> > when I try to get at 
> > 
> > http://localhost/examples/jsp/index.html
> > 
> > The browser (exploder 5 or netscape 6.1) just hangs
> (see
> > below for the tail of the iis_redirect.log which has a
> > happy look about it to my untrained eye).  I did the
> whole
> > bit with making the jakarta virtual directory and
> adding
> > the ISAPI filter.  I don't think I would get this far
> > otherwise.  
> > 
> > The redirector is a downloaded binary.  I checked the
> > registry entries.  What else could be wrong?  Is there
> > something I missed in IIS: Security?, other virtual
> > directories besides jakarta?.  Suggestions?
> > 
> > I had no problems integrating with Apache on NT and few
> > with Apache on Solaris.  IIS is a different story :( 
> > 
> > Any help greatly appreciated.
> > 
> > Thanks.
> > 
> > Dan Rasmussen
> > 
> > 
> > [jk_isapi_plugin.c (439)]: HttpFilterProc
> > [/examples/jsp/index.html] is a servlet url - should
> > redirect to ajp13
> > [jk_isapi_plugin.c (461)]: HttpFilterProc check if
> > [/examples/jsp/index.html] is points to the web-inf
> > directory
> > [jk_isapi_plugin.c (517)]: HttpExtensionProc started
> > [jk_worker.c (123)]: Into wc_get_worker_for_name ajp13
> > [jk_worker.c (127)]: wc_get_worker_for_name, done 
> found a
> > worker
> > [jk_isapi_plugin.c (539)]: HttpExtensionProc got a
> worker
> > for name ajp13
> > [jk_ajp13_worker.c (654)]: Into
> jk_worker_t::get_endpoint
> > [jk_ajp13_worker.c (539)]: Into jk_endpoint_t::service
> > [jk_ajp13.c (346)]: Into ajp13_marshal_into_msgb
> > [jk_ajp13.c (480)]: ajp13_marshal_into_msgb - Done
> > [jk_connect.c (108)]: Into jk_open_socket
> > [jk_connect.c (115)]: jk_open_socket, try to connect
> socket
> > = 2692
> > [jk_connect.c (124)]: jk_open_socket, after connect ret
> = 0
> > [jk_connect.c (132)]: jk_open_socket, set TCP_NODELAY
> to on
> > [jk_connect.c (140)]: jk_open_socket, return, sd = 2692
> > [jk_ajp13_worker.c (167)]: In
> > jk_endpoint_t::connect_to_tomcat, connected sd = 2692
> > 
> > Thats the end of the log as the world spins... waiting
> for
> > its reply.
> > 
> > 
> > 
> > =
> > -- replies to [EMAIL PROTECTED] --
> > 
> > Anything that appears after this sentence is inserted
> by 
> > Yahoo (or others) and may not be a good idea.
> > 
> > __
> > Do You Yahoo!?
> > Make a great connection at Yahoo! Personals.
> > http://personals.yahoo.com
> > 


=
-- replies to [EMAIL PROTECTED] --

Anything that appears after this sentence is inserted by 
Yahoo (or others) and may not be a good idea.

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



RE: Update JSP

2001-10-25 Thread Barney Hamish

You shouldn't actually need to do anything to get tomcat to recompile the
page (assuming you don't have automatic compilation turned off). Just
request the page and tomcat should recompile it for you. If that doesn't
work shutdown tomcat, delete all the files in the $tomcat_home/work
directory and start tomcat again and it should recompile the JSP page
automatically for you.

-Original Message-
From: Claudia Sarmiento [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 2:43 AM
To: '[EMAIL PROTECTED]'
Subject: Update JSP 


Hello:
I'm using tomcat 3.2.1, and i want to change a JSP page, but i don't know
how i do that, i tried to compile in my app dir with the build.bat but i
received the error : NoClassDefFound Error /org/apache/tools/ant/main

Thanks in advance.


Claudia



RE: tomcat session problem

2001-10-25 Thread Geoff Howard

just out of curiosity, what browser are you using, and how are you beginning
the second browser session?

Geoff

-Original Message-
From: Rinku Randhawa [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 2:46 PM
To: [EMAIL PROTECTED]
Subject: tomcat session problem


Hi there,

I am using jakarta-tomcat - 3.2.3 server to run my project. I am finding
that session tracking, when more than one browser window is opened at one
time, doesn't come out to be correct. I am using its inbuilt session object
and the cookies are enabled in my browser. When more than one sessions are
running then the page presented is unpredictable.Sometimes correct page
displays and sometimes totally diferent page gets displayed. It works great
except if I have 2 browsers sessions up - then it gets confused and losses
track of which is the current session.

Are there any issues with the Tomcat server regarding session tracking?

Thanks in advance,
-Rinku




Servlet Mapping -- Servlet getting called twice

2001-10-25 Thread Smith, Lawrence T (Lance)

Please HELP:
I don't know if what I am seeing is standard behavior or something I am
doing wrong.

I have the following in my web.xml file:

  CardServlet
  /Cards/*


The servlet at this point only writes out a simple hello page and debug
output of getPathInfo() and getRequestURI() but it will do some pretty heavy
processing which I don't want done twice. What is happening is as follows:

I submit the URL: 
/foo/Cards/a/b/aCard.jsp
The servlet debug prints:
pathInfo=>/a/b/aCard.jsp
requestURI=>/foo/Cards/a/b/aCard.jsp
pathInfo=>/a/b/
requestURI=>/foo/Cards/a/b/

I submit the URL: 
/foo/Cards/aCard.jsp
The servlet debug prints:
pathInfo=>/aCard.jsp
requestURI=>/foo/Cards/aCard.jsp
pathInfo=>/
requestURI=>/foo/Cards/

What I thought should happen is that I would only get called once. Is what I
am seeing the proper behavior or am I doing something wrong? Help. The first
time the servlet gets called with what I would expect the second call is
really throwing me for a loop.
Thanks for any help given.





Questions on tomcat heap usage and garbage collection (avoiding OutOfMemoryError exceptions)

2001-10-25 Thread Bang, Steinar

I wrote earlier:

> Craig R. McClanahan [mailto:[EMAIL PROTECTED]] writes:

[snip!]
> But it doesn't address my real worry at the moment:
> that a script kiddie armed with nothing more than
> the httperf testing tool can bring my tomcat to 
> crash.

>> and/or whether your test JSP page can temporarily be
>> set to not use sessions so that this doesn't happen.

> Hm... yes, but our actual application (not the test
> page I've done the current tests on), will be Struts
> based, and I don't think Struts will work without
> sessions...?

Some things I've tried now, are:
 1. decrease the  in the web.xml
of the webapp the .jsp being tested resides in
from 30 minutes to 1 minute

 2. limit the maximum number of threads used by tomcat
by using the max_threads setting in 
in the server.xml file, as outlined in


What I thought might happen here was that I could
trade the crash for a slowdown under heavy load

What happens in 1. is that the tomcat processes don't
seem to ever get the OutOfMemoryError exception, and
die.  But the response seems to be seriously slowed
down over time.  I wonder why?  I'm also wondering if
a low  will create problems for
Struts applications?

When I limited the maximum number of threads to 30,
the footprint of the tomcat Java processes seemed
to level out at 78MB and stay there.  So I thought
things might be stable.  However with a long enough
test running, things eventually crashed.


















This email, its content and any attachments is PRIVATE AND CONFIDENTIAL to
TANDBERG Television. If received in error please notify the sender and
destroy the original message and attachments.



Servlet Mapping -- Servlet getting called twice

2001-10-25 Thread Smith, Lawrence T (Lance)

Please HELP:
I don't know if what I am seeing is standard behavior or something I am
doing wrong.

I have the following in my web.xml file:

  CardServlet
  /Cards/*


The servlet at this point only writes out a simple hello page and debug
output of getPathInfo() and getRequestURI() but it will do some pretty heavy
processing which I don't want done twice. What is happening is as follows:

I submit the URL: 
/foo/Cards/a/b/aCard.jsp
The servlet debug prints:
pathInfo=>/a/b/aCard.jsp
requestURI=>/foo/Cards/a/b/aCard.jsp
pathInfo=>/a/b/
requestURI=>/foo/Cards/a/b/

I submit the URL: 
/foo/Cards/aCard.jsp
The servlet debug prints:
pathInfo=>/aCard.jsp
requestURI=>/foo/Cards/aCard.jsp
pathInfo=>/
requestURI=>/foo/Cards/

What I thought should happen is that I would only get called once. Is what I
am seeing the proper behavior or am I doing something wrong? Help. The first
time the servlet gets called with what I would expect the second call is
really throwing me for a loop.
Thanks for any help given.





Can't open InputStream to manager??

2001-10-25 Thread Yoav Shapira

Hi there,

I have a servlet that tries to do something like:

URL url = new
URL("http://manageruser:[EMAIL PROTECTED]:myport/manager/list";);
URLConnection con = url.openConnection();
BufferedReader bin = new BufferedReader(new
InputStreamReader(con.getInputStream);

The third line throws an exception.  The connection itself is fine,
I can call stuff like con.getContentLength() and it works (correctly)
without a problem.  

Is the manager app coded specifically to disallow opening stream to it?
Has anyone else tried/encountered something like this?

Thanks!

Yoav Shapira
Millennium Pharmaceuticals



jasper directory missing in distribution

2001-10-25 Thread Joel P. Worrall

Is it my imagination or is the jasper directory under CATALINA-HOME missing
from the 4.0.1 distribution.  I am still having an issue with the xerces
parser, so I read the docs on using other XML parsers.  The docs mention
removing files from the jasper directory, but when I download the
jakarta-tomcat-4.0.1.tar.gz, the jasper directory does not exist/is not
included.

Why?


Joel P. Worrall
Senior Software Engineer
 CommNav, Inc.
  (717) 796-1936 x274
  [EMAIL PROTECTED]
[EMAIL PROTECTED]
 home - (717) 796-2314
 Tango the gifted Llama
-





Should I switch to tomcat 4.0

2001-10-25 Thread Tarek M. Nabil

Hi everyone,

I haven't been doing any server side java development for a while, so I
installed tomcat to get to do some development on it every now and then
as not to forget and stay updated. Which version do you recommend, I
don't wanna use tomcat 3.3 and then discover that the new specifications
are much different, should I switch to Tomcat 4.0?

Thanks,

Tarek Nabil



Security Question

2001-10-25 Thread Drasko . Kokic



Hi there,
I have read the "Existing Risks and Problems" (Chapter 8 in the internal
document of the TC-3.3) and spotted that there is a potentional security
risk in using Tomcat as a platform for the Application Gateway to an
enterprise business support system.
One of very important subprojects I still need to solve is providing a
secure environment and currently we are constructing a sort of "Checking
Engine" that basically test every parameter against predescribed conditions
and reject all invalid requests.
Has anybody already thought about this or eventually produced some
code/concept?  I hope some of original contributors will also read this
post.
I have some development resources allocated to this task, but would prefer
if we could join forces with other interested parties as this must be a
very important issue.
Drasko





JSP - How do I make it invisible to the browser's "back" button?

2001-10-25 Thread Navarro, Jose

Hi!

I have developed a JSP page which in turns invokes a servlet used to keep
track of the number of times a certain page in my web is visited.

In other words, when I have a link to some page, I do not link the target
page directly but execute the JSP instead. More or less it goes this way:

http://the/
desired/URL.htm" target="_self">Text of the link

(here, "thisorthatpage" stands for an achronim that is stored in my hits
database and that identifies the page being visited).

So when the user clicks on the link, he or she is redirected to the jsp page
which invokes the counter servlet and then redirects the user to the target
(destination) page.

The problem is that the jsp is stored in the browser's list of visited
pages. If then the user wants to go back and clicks on the corresponding
browser's button, the jsp page is executed again and he is redirected one
more time to the same page. The feeling, therefore, is that the back button
doesn't work at all.

Then it would be very interesting to remove the jsp URL from the browser's
access list, so the consequence would be that it would be "invisible" to the
back command. Well, I hope that it is possible to access this list of
visited pages from the jsp code and remove its own entry.

Is this possible? If so, can you tell me how? If not, do you know any other
way to implement it?

Thanks alot for your help!

Regards,

Jose.






the meaning of message "WebappClassLoader: Lifecycle error"

2001-10-25 Thread Kamil Kukura

I have database connection pooling that runs in background in application
scope. From time to time I can found strange error message in catalina.out
logfile:

WebappClassLoader: Lifecycle error : CL stopped
java.lang.NoClassDefFoundError: java/lang/System
at
repDB.cpooling.JDCConnectionPool.reapConnections(JDCConnectionPool.java:75)
at repDB.cpooling.ConnectionReaper.run(JDCConnectionPool.java:36)


The source of JDCConnectionPool is attached. The pool is created in bean
that is in application scope. I guess the problem occurs because of that
ConnectionReaper thread running.

--
Kamil Kukura


 JDCConnectionPool.java


RE: tomcat session issue

2001-10-25 Thread Larry Isaacs

I'm not aware of any session bugs in Tomcat 3.2.3 that would
explain this.  It is more likely to be some sort of user
error.  Can't tell if browser caching would be involvled.
Perhaps you could post some simplified code that demonstrates
the problem.

Larry

> -Original Message-
> From: Rinku Randhawa [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 24, 2001 9:51 AM
> To: [EMAIL PROTECTED]
> Subject: tomcat session issue
> 
> 
> Hi there,
> 
> I am using jakarta-tomcat - 3.2.3 server to run my project. I 
> am finding
> that session tracking, when more than one browser window is 
> opened at one
> time, doesn't come out to be correct. I am using its inbuilt 
> session object
> and the cookies are enabled in my browser. When more than one 
> sessions are
> running then the page presented is unpredictable.Sometimes 
> correct page
> displays and sometimes totally diferent page gets displayed. 
> It works great
> except if I have 2 browsers sessions up - then it gets 
> confused and losses
> track of which is the current session.
> 
> Are there any issues with the Tomcat server regarding session 
> tracking?
> 
> Thanks in advance,
> -Rinku
> 



Problems with PostgreSQL + Tomcat solved - sort of

2001-10-25 Thread Nikola Milutinovic

Hi all.

Now it's working all of a sudden. I have made three changes:

- removed $CATALINA_OPTS=-Djdbc.drivers=org.postgresql.Driver
- removed: import="javax.sql.*" from page directive
- added: Class.forName( "org.postgresql.Driver" ) to my code

Could someone answer these questions:

QUESTION 1. What is the proper way of specifying a JDBC driver in Tomcat?

In a standalone application I will use "-Djdbc.drivers=..." and it works. Tomcat, 
obviously, doesn't like it. Is there some property file, where I can specify JDBC 
drivers? I would like to make my code as independant of a database used, as possible. 
By specifying which JDBC driver I'm using and supplying JDBC connection parameters in 
web.xml I am getting there.

QUESTION 2. Should I put as a parameter in my web.xml?

QUESTION 3. How would Tomcat use JDBC realm on, say, PostgreSQL, anyway?

QUESTION 4. Could it be that importing "javax.sql.*" broke my JSP?

I was getting all sort of *compiler* errors, not runtimes. Jasper was trying to parse 
"postgresql" (inside JDBC connection string???) to Integer:

java.lang.NumberFormatException: postgresql
at java.lang.Integer.parseInt(Integer.java, Compiled Code)
at java.lang.Integer.parseInt(Integer.java, Compiled Code)
at org.apache.jasper.compiler.Compiler.getJspLineErrors(Unknown Source)
...

on Class.forName( "org.postgresql.Driver" ) it complained:

/usr/local/java/tomcat-4.0/work/mercury.ev.co.yu/addr_book/firm$jsp.java:20: Type 
expected.
Class.forName( "org.postgresql.Driver" );

It was getting very weird. Thank God, it is working now, but being an administrator, 
I'd like to know this in the future.

Nix.



RE: Can't get precompiled JSP to be welcome page?

2001-10-25 Thread Randy Layman


The problem seems to be that Tomcat is scanning the file system for
the welcome pages, not including the servlet mappings.  What I do is create
a zero length file of the file name.  Tomcat will see this and redirect the
/ request to /whatever.jsp (the welcome file), which is then intercepted.
This fix only adds a few bytes (one file entry in the contents) to the
application and doesn't reveal anything about the internals that people
couldn't already easily figure out.

Randy


> -Original Message-
> From: Alex Colic [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 24, 2001 1:40 PM
> To: Tomcat-User
> Subject: Can't get precompiled JSP to be welcome page?
> 
> 
> Hi,
> 
> I have a JSP file, pwLogin.jsp that I precompiled. I then added the
> following to my web.xml file:
> 
>   
>   pwLogin
>   pwLogin
>   
> 
> ...
> 
>   
>   pwLogin
>   /pwLogin.jsp
>   
> 
> ...
> 
> 
> 
> /pwLogin.jsp
> pwLogin.jsp
> 
> 
> When I access my web app without specifiying a JSP I get a 
> page of web apps
> root directory. If I specify webapp/pwLogin.jsp I get the page.
> 
> Any help, ideas is appreciated.
> 
> 
> Alex
> 



RE: Precompiled jsp's

2001-10-25 Thread Randy Layman



> -Original Message-
> From: Barry White [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 24, 2001 1:16 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Precompiled jsp's
> 
> 
> Why are you pre-compiling the JSP's?
> Doesn't Tomcat do that automatically?

Tomcat does to it automatically, but there are two primary reasons that
people want to precompile JSPs for distribution:
1.  You can't legally deploy the JDK/tools.jar that Tomcat needs to
compile without an agreement with Sun.  Precompiling eliminates the need for
the JDK, simply a JRE is now needed.

2.  It makes it more difficult for people to view and modify the
source code of your application.  This way, over ambitious people aren't
modifying their source code in an effort to fix your "bugs" and crackers
have to put forth more effort to find vulnerabilities (scaning Java byte
code is more difficult than scanning JSP souce).

Randy

> 
> - Original Message - 
> From: "Thys De Wet (ZA)" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 24, 2001 5:12 AM
> Subject: Precompiled jsp's
> 
> 
> > Ok so I got my  JSP's compiled into class files..
> > Placed them in /WEB-INF/classes..
> > Now how do I tell Tomcat 3.2.3 to use these class files ... 
> > 
> > ANy help 
> > 
> > PLEASE ..
> > 
> > *begs on knees*
> > 
> > 
> > 
> > 
> **
> > 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. If you have received this email in error 
> please notify
> > the system manager.
> > 
> > This footnote also confirms that this email message has 
> been swept by
> > MIMEsweeper for the presence of computer viruses.
> > 
> > www.mimesweeper.com
> > 
> **
> > 
> 



RE: XML ClassCastException and tomcat 4.0 documentation

2001-10-25 Thread Dan Silcox

I don't remember exactly what my error was but I rolled my JDOM 7 upgrade
back to JDOM 6 because I was having some compatibility problems.  You may
want to see if that helps.  I know JDOM6 works with the latest xerces.jar.

-Original Message-
From: Joel P. Worrall [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 5:04 PM
To: [EMAIL PROTECTED]
Subject: XML ClassCastException and tomcat 4.0 documentation


I am facing a terrible dilemma and in need of accurate information.

I believe my issue deals with the Tomcat 4 class loaders and my problem
surrounds the use of Tomcat 4.0.1 on jdk 1.4 with the JDOM beta 7 jar.

2 scenarios:

1.  unpack tomcat 4, configure the server.xml to look to my webapp.

My application WEB-INF/lib jar contains jdom beta 7 and the latest and
greatest xerces jar (built from source of xml.apache.org).  (Note that we
now have a xerces jar in the CATALINA_HOME/common/lib directory AND my
webapp/WEB-INF/lib directories)

For some reason, despite the fact that both xerces are recent, the following
exception occurs.

javax.servlet.ServletException: Servlet.init() for servlet jsp threw
exception
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:871)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3267)
at org.apache.catalina.core.StandardContext.start

- Root Cause -
java.lang.ClassCastException:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.
java:103)
at
org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:183)
at
org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCa
che.java:165)
at
org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:1
38)
at
org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:32
4)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
at org.apache.catalina.core.StandardWrapper.load
..

For some reason, the ClassLoader(?) get confused and spits back a that
ClassCastException, claiming that the xerces DocumentBuilderFactory
implementation does not implement the interface - when it clearly does.

2.  Ok, so I remove the xerces.jar from the webapp/WEB-INF/lib directory.

I startup the system.  Now the jspservlet starts fine but my own servlet
that (a few levels deeper) makes a call to org.jdom.input.SAXBuilder chokes
b/c the org.apache.xerces.parsers.SAXParser is being cast to an XMLReader.
Now I checked the xerces.jar's SAXParser class AND IT DOES implement
XMLReader, but it throws the following exception none the less.

This leads me to believe its ClassLoader issue.

javax.servlet.ServletException: Error in building:
org.apache.xerces.parsers.SAXParser
at com.commnav.sbh.servlets.ControlServlet.init(ControlServlet.java:155)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
.
org.jdom.JDOMException: Error in building:
org.apache.xerces.parsers.SAXParser
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:306)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:583)
at
com.commnav.sbh.framework.config.ServletConfigConfiguration.(ServletCo
nfigConfiguration.java:41)
at com.commnav.sbh.servlets.ControlServlet.init(ControlServlet.java:90)
.
Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.SAXParser
at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:392)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:283)
... 20 more
Root cause: java.lang.ClassCastException:
org.apache.xerces.parsers.SAXParser
at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:392)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:283)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:583)
at
com.commnav.sbh.framework.config.ServletConfigConfiguration.(ServletCo
nfigConfiguration.java:41)
at com.commnav.sbh.servlets.ControlServlet.init(ControlServlet.java:90)


My frustration comes in that the documentation (HOWTO on ClassLoader) seems
to be very inaccurate, and I am left wondering how the ClassLoaders work,
what I need to configure to seperate these jars or whatever might be needed.

Someone who knows what they're doing... please help me.  I can (and do)
duplicate the error like clockwork.  I'm certain not to be the only one with
this issue and I hope to contribute the solution / explanation to the
community.

thanks,
the llama


Joel P. Worrall
Senior Software Engineer
 CommNav, Inc.
  (717) 796-1936 x274
  [EMAIL PROTECTED]
[EMAIL PROTECTED]
 home - (717) 796-2314
 Tango the gifted Llama
-






JSP-JDBC-Problem

2001-10-25 Thread Hostmaster of the day

Hi there !

I got the following problem :

Our Tomcat 3.2.1 (RH 6.2) server is located in New York.
twz1jdbcForMysql-1.0.4-GA is installed.

Our mySQL 3.23. (RH 6.1) server is located in Baltimore.
Remote '%' access is enabled.

I'm trying to access from our NY server to the mySQL db in
Baltimore using : 

databaseURL =
jdbc:z1MySQL://www.domain.com:3306/database?user=correctuser&password=
**";

All I get is an Internal Servlet Error
javax.servlet.ServletException: The url cannot be null

I don't know what this mean.

What is my fault and what can I do against it.

Thank you,
HotD*




Where to place the Login.html file

2001-10-25 Thread raj

Due to the bug (yet unresolved) in Tomcat 3.x, the Login.html and 
Error.html files cannot be
placed inside the servlets dir.

For instance:
My servlet is inside the dir called "foo" (i.e webapps/foo) and is 
called "bar".
URL pattern is "/*" for security.
This means "Login.html" and "Error.html" cannot be placed inside 
/webapps/foo.

Question: Where should I placed them instead?

I have tried to place them in webapps and declared them (in web.xml) as:
/../LoginForm.html
/../LoginError.html

but this would not work.

Any suggestion would be most appreciated. Should I try another
URL pattern?

The release note says something about placing "other" files in "other"
sub-dirs but what other files and what other
sub-dirs.

Some clarity would help, n'est pas?

Cheers
-raj






JNDI question

2001-10-25 Thread Jaime Garcia Bonis

Hi evryone

I have a question about how JNDI works in Tomcat 4.0.1
How can i set up a JNDI naming repository in order to create a
datasource???

In the server.xml i have this:

 
  
userscott


passwordtiger
driverClassName
  oracle.jdbc.driver.OracleDriver

driverName

jdbc:oracle:thin:@zagarron:1521:orcl
  

Inside de Context tag of my application.

In the web.xml i have this:


  jdbc/FtcAppDb
  javax.sql.DataSource
 Container


i get the datasource object doing this :DataSource ds =
(DataSource)ctx.lookup("jdbc/FtcAppDb");
but when i try to create the connection object i get a Null Pointer
exception error

Could anyone help me i don't have a clue about what happen.

Thanks for the time



Javaservice

2001-10-25 Thread Mithu Chowdhury

The link to javaservice is not working.

Thanks,



Mithu Chowdhury
GIS Programmer/Analyst
Ducks Unlimited, Inc.
Ph: (734) 623-2000, ext  139





Tomcat shutdown destroy not called

2001-10-25 Thread Erik B


With small or medium load destroy is called at shutdown.
With heavy load destroy is not called at shutdown.

I have also tried ContextListeners and with heavy load
contextDestroyed is not called either.

What can I do to ensure that either destroy or contextDestroyed
is called before tomcat is shutdown.

Im using Tomcat 4 on Win 2000.

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




mod_webapp not forwarding

2001-10-25 Thread Frank Niedermann

Hallo!

I have a problem with Apache Webserver and Tomcat 4.0.1 on my Linux-
Server. I installed the module webapp for apache and it seems to be
working because httpd -t says it's all ok:
  httpd -t:
  dettlx07:/var/log # httpd -t
  [Wed Oct 24 17:48:40 2001] [warn] Loaded DSO libexec/mod_webapp.so uses
  plain Apache 1.3 API,
  this module might crash under EAPI! (please recompile it with -DEAPI)
  Syntax OK
  dettlx07:/var/log #

These are my new lines in httpd.conf for webapp:
  LoadModule webapp_module libexec/mod_webapp.so
  AddModule mod_webapp.c

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

Now I try to connect at http://dettlx07/examples I get an error-page
("page not found"), but the apache-webserver and the tomcat-server
are working, i can connect to dettlx07:80 and dettlx07:8080

I get following info from apaches error.log:
  /var/log/apache/error.log:
  [Wed Oct 24 17:44:50 2001] [notice] child pid 29838 exit signal
 Segmentation fault (11)
  [Wed Oct 24 17:44:50 2001] [notice] child pid 29837 exit signal
 Segmentation fault (11)
  [Wed Oct 24 17:44:50 2001] [notice] child pid 29836 exit signal
 Segmentation fault (11)
  [Wed Oct 24 17:44:52 2001] [notice] child pid 29844 exit signal
 Segmentation fault (11)
  [Wed Oct 24 17:44:53 2001] [notice] child pid 29846 exit signal
 Segmentation fault (11)
  dettlx07:/var/log #

Any ideas?

 Regards,
Frank

-- 
 -
---<  F  B  N  >-
 [EMAIL PROTECTED] -  Frank Niedermann
 [EMAIL PROTECTED]http://fbn.dyndns.org
   *Welcome to the Future - Linux
-



Class partially reloaded even after restarting Tomcat

2001-10-25 Thread Cathy Ooi

Hi,

I don't know if anyone have come across this ...

I'm running a Tomcat-3.3-m4, with Apache 1.3 on Red Hat Linux release 7.0.
My JVM is Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20010329 (JIT
enabled: jitc)).

I have 2 JSP pages menu.jsp and data.jsp that called a class DBManager that in
turn uses DBConfig that contains final static variables e.g. DBConfig.DB_URL.

Originally, DBConfig.DB_URL = "10.10.10.10:3306".
Called http://testserver/menu.jsp.
And I get an Exception "java.lang.Exception: Cannot connect to MySQL server on
10.10.10.10:3306". Perfectly okay, since "10.10.10.10:3306" is the wrong value.

So I modified to the correct value, DBConfig.DB_URL = "10.10.10.20:3388".
Compile & upload DBConfig.class again.
Remove the generated files in "work".
Shutdown & start up tomcat again.
Called http://testserver/menu.jsp again. And I get an Exception
"java.lang.Exception: Cannot connect to MySQL server on 10.10.10.10:3306" again!
But when I called http://testserver/data.jsp, the page was displayed correctly
with the data retrieved from the DB.

I've tried stopping & restarting both tomcat & apache several times but the
result remains the same. I've even 'pstree -ap' to check that all tomcat
processes has terminated. But the old value stubbornly remains after several
shutdowns & startups.

Finally, my colleague shutdown tomcat and waited about 30 minutes before
starting up tomcat again. (Previously, there's a few seconds interval between
shutdown and startup) This time, menu.jsp works correctly.

Is there anywhere tomcat might have cached the class or value?
Is there a faster way to get the static final value reloaded?

Thanks in advance.

Cathy.

p.s. There are 2 other J2SE applications running in the same server, but I don't
think this should matter since they're both running in different processes,
right?



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




important: help needed with servlets path

2001-10-25 Thread mperreno

(apache 1.3.12 tomcat 3.3)

As seen in the doc, an url path can be sliced in

context path + servlet path + path info

what's not said is that once the context path is matched, the servlet path 
must contain "/servlet/" for the servlet path to be interpreted as a servlet!

Actually I use jserv and I have the following directive

ApJServMount /script /java

and any url matching http://host/script/* is a servlet
I *have to* do the same thing with mod_jk

I have ~160 virtual hosts and 6500 servlets, so I can't name them all in a 
web.xml file

This could be done with Tomcat3.2 in which one could change the /servlet/ 
prefix with anything (prefix="/" for me) in the 

help 

-- 
mathieu perrenoud [iis]



how to configure mod_jk (tomcat 3.3) for multiple hosts?

2001-10-25 Thread Schulz, Sebastian

hi,

i need information on how to enable loadbalancing in a
one to many scenario (one apache - many tomcats at different
hosts) using apache 1.3.20, tomcat 3.3 and mod_jk.

i successfully enabled loadbalancing on one machine
(different ajp13-workers at the same port), but don't know
exactly how to aply this to different hosts.

any suggestions highly appreciated.

thank you all in advance,
basti

p.s.

any tuning-hints for such an enviroment?
it has to work with approximately 6000 
(up to 1) concurrent Requests (!)



Re: X Windows and Tomcat

2001-10-25 Thread Nikola Milutinovic

> Krasi, you need to install a dummie Xserver named Xvfb. With this
> Xserver running you can shut your Xwindows without stopping tomcat.

Shouldn't Tomcat keep on running? Or better yet, daemonize itself?

Nix.



Re: Questions on tomcat heap usage and garbage collection (avoiding OutOfMemoryError exceptions)

2001-10-25 Thread Bang, Steinar

Craig R. McClanahan [mailto:[EMAIL PROTECTED]] writes:

> The most important task in a situation like this is
> to find out why memory is being consumed in the first
> place.  Generally, this is caused by one of the
> following types of factors:

> * Creating lots and lots of session attributes in your
>   applications (which causes the objects to stay
>   allocated until the session times out or is
>   invalidated)

Ah, OK.  That probably accounts for the increase
in size I see in the processes.

> * Creating a new session on every request from your
>   stress test tool, which causes a new session object
>   to be created each time.

Yes, this is probably what happens.

> The latter case is pretty insidious for doing stress 
> testings, because JSP pages are session-aware by
> default (unless you tell them not to).  This
> behavior is not typical of real users, howevever,
> because they will be returning the same session id
> (and therefore accessing the same session)
> throughout their interaction with the server.

> You should investigate whether httperf (or other
> tool) can let you remember the session id that was
> assigned in the first place and then reuse it on the
> subsequent requests,

It looks like the --session-cookie and --wsess arguments
to httperf may be doing what you suggest.  And using
this argument may give a more realistic test (I'm
running one right now).

But it doesn't address my real worry at the moment:
that a script kiddie armed with nothing more than
the httperf testing tool can bring my tomcat to 
crash.

> and/or whether your test JSP page can temporarily be
> set to not use sessions so that this doesn't happen.

Hm... yes, but our actual application (not the test
page I've done the current tests on), will be Struts
based, and I don't think Struts will work without
sessions...?

Thanx!


- Steinar























This email, its content and any attachments is PRIVATE AND CONFIDENTIAL to
TANDBERG Television. If received in error please notify the sender and
destroy the original message and attachments.



how to configure mod_jk (tomcat 3.3) for multiple hosts?

2001-10-25 Thread Schulz, Sebastian

hi,

i need information on how to enable loadbalancing in a
one to many scenario (one apache - many tomcats at different
hosts) using apache 1.3.20, tomcat 3.3 and mod_jk.

i successfully enabled loadbalancing on one machine
(different ajp13-workers at the same port), but don't know
exactly how to aply this to different hosts.

any suggestions highly appreciated.

thank you all in advance,
basti

p.s.

any tuning-hints for such an enviroment?
it has to work with approximately 6000 
(up to 1) concurrent Requests (!)




RE: **** File Download - CSV question ****

2001-10-25 Thread Shah, Chintan V (Chintan)

one simple thing, just try it out

on ur windows machine, in browser window...location bar... write the url u r
trying to open thru anchor link..

i.e. in browser window location bar :
http: and see, if it opens up
the file in browser or pops up 'save as'  dialog box.  If it shows u "save
as" dialog box, then that means, your browser doesn't support
interpretation/opening of that file into it.

regards,
Chintan


-Original Message-
From: Evan Swanson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 9:01 PM
To: '[EMAIL PROTECTED]'
Subject:  File Download - CSV question 


I wrote an application that for Tomcat 3.2 running on window. In the HTML
the is a reference (  ) to the filename. 
When I run this on windows I get a popup "save as" selection box. 
When I run this on Tomcat4.0 on Unix it no longer gives me the selection box
but instead displays the data on the screen.

Is this a difference between TC32 adn TC40 or Unix / Windows.
Is this configurable.


Thanks in advance.



RE: tomcat session problem

2001-10-25 Thread Shah, Chintan V (Chintan)

Hi Rinku,

Your application should work fine in both the browsers opened
simultaneously...only if the second browser window is not opened from the
first browser window using Ctrl+N

If you are opening the 2nd browser window from 1st one only... as said
above, then the session object will be single and both of the browsers will
be interacting(i.e. reading, writing or get/set) with the single session
object...and in that case, it will not behave properly.. 

ya, but if you have opened two browser windows separately, then there will
be two different session objects for each of them, you must be able to work
on both of them simultaneously..

I hope, this will help you.

regards,
Chintan.

-Original Message-
From: Rinku Randhawa [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 12:16 AM
To: [EMAIL PROTECTED]
Subject: tomcat session problem


Hi there,

I am using jakarta-tomcat - 3.2.3 server to run my project. I am finding
that session tracking, when more than one browser window is opened at one
time, doesn't come out to be correct. I am using its inbuilt session object
and the cookies are enabled in my browser. When more than one sessions are
running then the page presented is unpredictable.Sometimes correct page
displays and sometimes totally diferent page gets displayed. It works great
except if I have 2 browsers sessions up - then it gets confused and losses
track of which is the current session.

Are there any issues with the Tomcat server regarding session tracking?

Thanks in advance,
-Rinku




RE: Questions on tomcat heap usage and garbage collection (avoidi ng O utOfMemoryError exceptions)

2001-10-25 Thread Bang, Steinar

Randy Layman [mailto:[EMAIL PROTECTED]] writes:

> I think the best thing you can do is to determine
> where the memory is going and fix your leaks.  I say
> your leaks because in my experience, Tomcat doesn't
> leak memory and doesn't take a lot of memory for each
> connection.

I perhaps wasn't too clear about what I was doing.
There is no real application involved in the tests
I'm mentioning.  It's just a simple JSP page _hammered_
by requests.

The usage is atypical, I'm the first to admit, but it
worries me that hammering the server with requests
can make tomcat _crash_ (ref. DOS attacks).

In fact, the crash is the real worry.  Why does a
single OutOfMemoryError cause _all_ tomcat processes
running under apache control to crash?






















This email, its content and any attachments is PRIVATE AND CONFIDENTIAL to
TANDBERG Television. If received in error please notify the sender and
destroy the original message and attachments.



RE: Why I can't connect - part 2

2001-10-25 Thread Martin van den Bemt

First start tomcat, wait a bit, then start apache. try the url
/webapp-info/ to see if the DEPLOYED is set to true in both cases.
If you start it the other way around or start apache to soon, only the
/webapp-info/ is set the true and the rest is set to false.

Mvgr,
martin

> -Original Message-
> From: Kemp Randy-W18971 [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 24, 2001 3:51 PM
> To: '[EMAIL PROTECTED]'
> Subject: Why I can't connect - part 2
>
>
> Can someone explain why I can't connect in Windows 2000 with
> Tomcat 4.01 and
> Apache 1.3.22?
> 1.  I am using all binaries, and I put mod_webapp.so and libapp.dll in
> Apache directory Modules.
> 2.  I put this entry in Tomcat server.xml after the EJB entry
>  reloadable="true" />
> 3.  I put this in Apache httpd.conf at the end
> 
>ServerName localhost
>WebAppConnection conn warp localhost:8080
>WebAppDeploy examples conn /examples/
>WebAppDeploy onjava conn /onjava/
>WebAppInfo /webapp-info
>  
> Added following after commented out loadmods
> LoadModule webapp_module modules/mod_webapp.so
> AddModule mod_webapp.c
> 4.  I put my war file in the tomcat webapps directory.
> 5.  I can bring up localhost and localhost:8080 OK.
> 6.  If I type localhost/onjava/, the following entry is in the
> Apache error
> logs: (both Apache and Tomcat are started)
>
> Fri Oct 19 12:41:00 2001] [error] [client 127.0.0.1] File does not exist:
> c:/program files/apache group/apache/htdocs/onjava
> [Fri Oct 19 12:41:44 2001] [error] Connection "conn" cannot connect
> [Fri Oct 19 12:41:44 2001] [error] Cannot open connection "conn"
> [Fri Oct 19 15:21:00 2001] [error] Web-application not yet deployed
> [Fri Oct 19 15:22:08 2001] [error] Web-application not yet deployed
> [Fri Oct 19 15:22:21 2001] [error] Web-application not yet deployed
> [Fri Oct 19 15:24:42 2001] [error] Cannot deploy application examples
> [Fri Oct 19 15:24:42 2001] [error] Cannot deploy application examples
>
> What could I be missing?
>
>
>




AW: tomcat session problem

2001-10-25 Thread Ralph Einfeldt

It's not a tomcat issue, it more an issue of your application.

If you open a second windows from a running session, the windows 
will share the session from tomcat. From the view of tomcat the 
windows are indistinguishable from each other. Tomcat even can't
recognize that there are two windows (That's true for any server
that talks HTTP with its clients). 
So if you want to allow more than one window, your application
has to take care of that. 

> -Ursprüngliche Nachricht-
> Von: Rinku Randhawa [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 24. Oktober 2001 20:46
> An: [EMAIL PROTECTED]
> Betreff: tomcat session problem
> 
> 
> Hi there,
> 
> I am using jakarta-tomcat - 3.2.3 server to run my project. I 
> am finding
> that session tracking, when more than one browser window is 
> opened at one
> time, doesn't come out to be correct. I am using its inbuilt 
> session object
> and the cookies are enabled in my browser. When more than one 
> sessions are
> running then the page presented is unpredictable.Sometimes 
> correct page
> displays and sometimes totally diferent page gets displayed. 
> It works great
> except if I have 2 browsers sessions up - then it gets 
> confused and losses
> track of which is the current session.
> 
> Are there any issues with the Tomcat server regarding session 
> tracking?
> 
> Thanks in advance,
> -Rinku
> 
> 
> 
> 



Re: servlet upload

2001-10-25 Thread E B

 --- Pier Fumagalli <[EMAIL PROTECTED]> wrote: > E
B at [EMAIL PROTECTED] wrote:
> 
> > In my webapp under tomcat, I am using oreilly's
> > cos.jar for uploading files. I observe that
> > repeated uploading of same file fails. ie., when
> > I upload a file for second time(different content,
> > same file name), in my servlet I am getting the
> > old file only. It is probably due to caching,
> > does anybody know how do disable this caching ?
> > 
> > the files are jar files. does jvm cache them ?
> > or tomcat ? I see some jar cache files in the
> temp.
> > The class used to access the uploaded file is
> > com.oreilly.servlet.MultipartRequest
> 
> Nope, but AFAICS, those servlets use a file system
> path, not a path relative
> to the web-application temporary path to store the
> uploaded files... Did you
> try changing the upload directory parameter to be
> different for the two
> web-applications?
> 

There is only one webapp. 
btw, I have some files like jar_cache22482.tmp
Who is caching these. Is it jvm, or tomcat, 
or cos.jar ? Any idea? More over, I get these
tmp files only with tomcat 4.





Nokia Game is on again. 
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.



Re: servlet upload

2001-10-25 Thread E B

 --- Bo Xu <[EMAIL PROTECTED]> wrote: > E B wrote:
> 
> > In my webapp under tomcat, I am using oreilly's
> > cos.jar for uploading files. I observe that
> > repeated uploading of same file fails. ie., when
> > I upload a file for second time(different content,
> > same file name), in my servlet I am getting the
> > old file only. It is probably due to caching,
> >  does anybody know how do disable this caching ?
> >
> > the files are jar files. does jvm cache them ?
> > or tomcat ? I see some jar cache files in the
> temp.
> > The class used to access the uploaded file is
> > com.oreilly.servlet.MultipartRequest
> > [...]
> 
> I use TC-4.0 + cos.jar(cos-23Jan2001.zip from
> www.servlets.com) to test
> it,
> I upload zTest.jar twice(same name, different
> content),  in
> Servlet-side, I get
> the new zTest.jar in the 2nd time.
> 


For me, the second upload works only if I 
restart tomcat. does tomcat got to do anything
with this ?



Nokia Game is on again. 
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.



Re: Memory settings problem

2001-10-25 Thread Jeff Turner

On Wed, Oct 24, 2001 at 02:14:38PM +0100, Hornsby Peter wrote:
> In order to start Java with increased memory settings, which of the
> following is correct in tomcat.bat - 
> 
> set _STARTJAVA=start "%JAVA_HOME%\bin\java -Xms64m -Xsx120m"
> set _RUNJAVA="%JAVA_HOME%\bin\java -Xms64m -Xsx120m"

Neither. Type 'java -X' to see the options. You probably want -Xmx and
-Xms. You can set these in your TOMCAT_OPTS variable rather than edit
tomcat.sh

--Jeff

> 
> I'm using tomcat 3.3
> 
> Thanks,
> Pete



Re: sourcepath problem in building tomcat (apxs pb building mod_jk.so)

2001-10-25 Thread Bill Cai

I think the problem is it didn't like the ";"s in the
value of "sourcepath". It no longer complains after I 
changed them to ":"s. I guess the source was for 
Windows platform. On Solaris ";" means end of the
command...

However, it still complains about "srcdir" in the
following block:

  


Actually, what I want is "mod_jk.so". Not sure "ant"
it
will build the whole thing including mod_jk.so? I
went to build/tomcat/apache1.3 to build mod_jk.so
individually by using build-solaris.sh or 
build-unix.sh. But both of them failed "apxs" from
my apache installation. I didn't install a binary
version of apache. I built it by using:

configure --prefix=/usr/local/apache \
--enable-module=most --enable-shared=max

But that failed on linking from apxs. i.e., didn't
product an mod_jk.so

Thanks,

Bill
>From: Larry Isaacs 
> Subject:  RE: sourcepath problem in building tomcat
> Date:  Wed, 24 Oct 2001 08:20:32 -0400
>
> I don't use JDK1.2.1, so I don't know much of the
> details about it.  However, the help message:
>
>
>[-g][-O][-debug][-depend][-nowarn][-verbose][-classpat>h
> path][-nowrite][-deprecation][-d dir][-J flag>] file.java...
>
> is very 1.1.8-like and doesn't support the
>-sourcepath
> argument.  I would guess that Ant is thinking the
JDK >is
> Java2 and assumes the javac supports the -sourcepath
> argument.  Maybe this isn't a correct assumption for
> JDK 1.2.1.
>
> I would highly recommend upgrading your JDK.  I
think
> there are other problems in store if you continue
>using
> it.  If you upgrade, I think your compile problem
>would
> disappear.
>
> Cheers,
> Larry
>
>

> It is jdk 1.2.1:
> 
> java version "1.2.1"
> Solaris VM (build Solaris_JDK_1.2.1_04, native
> threads, sunwjit)
> 
> Thanks,
> 
> Bill
> 
> --- Bill Cai <[EMAIL PROTECTED]> wrote:
> > I thought that I was using at least jdk1.2. But I
> > willl check tonight because I have multiple jdks
> > installed.
> > 
> > Thanks,
> > 
> > Bill
> > 
> > > >From: Larry Isaacs 
> > > > Subject:  RE: sourcepath problem in building
> > > tomcat
> > > > Date:  Tue, 23 Oct 2001 12:51:51 -0400
> > > >
> > > > It appears that the javac being executed is
> > coming
> > > from
> > > > JDK 1.1.8.  Is JDK1.1.8 what you want to be
> > using,
> > > > or is an old javac being picked up by mistake?
> 
> > If
> > > > JDK 1.1.8 is correct, I would like to see the
> > log
> > > > for the "detect:" through "init:" targets.
> > > >
> > > > Larry
> > > >
> > > --- Bill Cai <[EMAIL PROTECTED]> wrote:
> > > > I always got the following error when building
> > > > tomcat
> > > > by using ant. I tried ant 1.1 1.2 1.4. Any
> idea?
> > > > 
> > > > tomcat_util:
> > > > [javac] Compiling 91 source files to
> > > >
> > >
> >
>
/usr/local/jakarta/jakarta-tomcat-3.3-dev-src/build/tomcat/classes
> > > > [javac] javac: invalid flag: -sourcepath
> > > > [javac] use: javac
> > > >
> > >
> >
>
[-g][-O][-debug][-depend][-nowarn][-verbose][-classpath
> > > > path][-nowrite][-deprecation][-d
> dir][-J > > > flag>] file.java...
> > > > 
> > > > BUILD FAILED
> > > > 
> > > >
> > >
> >
>
/usr/local/jakarta/jakarta-tomcat-3.3-dev-src/build.xml:206:
> > > > Compile failed, messages should have been
> > > provided.
> > > > 
> > > > 
> > > >
> > __
> > > > Do You Yahoo!?
> > > > Make a great connection at Yahoo! Personals.
> > > > http://personals.yahoo.com
> > > 
> > > 
> > >
> __
> > > Do You Yahoo!?
> > > Make a great connection at Yahoo! Personals.
> > > http://personals.yahoo.com
> > > 
> > 
> > 
> > __
> > Do You Yahoo!?
> > Make a great connection at Yahoo! Personals.
> > http://personals.yahoo.com
> 
> 
> __
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Re: Precompiled jsp's

2001-10-25 Thread Nikola Milutinovic

> Why are you pre-compiling the JSP's?
> Doesn't Tomcat do that automatically?

How do you precompile JSPs on startup? I know they can be precompiled if called with 
that "precompile" URL. But suppose I had a lot of JSPs and I would like to tell Tomcat 
to precompile a defined portion of them into run-time servlets, so I could avoid that 
initial lag of first-time-run JSP.

Nix.



Re: File Download - CSV question ****

2001-10-25 Thread Dmitri Colebatch

Are you using the same client between the two servers?  IE seems to
consider itself more important than mimetypes, and if it sees a file
extension it recognises it treats it as it deems fit, regardless of the
mimetype.  So one possibility is that you have just installed excel or
something on the client, and IE is redirecting the download there.

another option is that the mimetype being sent in tomcat 4.0 is different
to 3.x, but I'm not sure about this, so will let someone else answer this
option.

if you outline exactly what client/server you were using before, and now,
it will make the question more specific.  for intsance, tc3.2 on windows
with a win98 client with IE4.0 and now using tc4.0 on linux with a win2k
client with IE5.0.

cheers
dim

On Wed, 24 Oct 2001, Evan Swanson wrote:

> 
> I wrote an application that for Tomcat 3.2 running on window. In the HTML
> the is a reference (  ) to the filename. 
> When I run this on windows I get a popup "save as" selection box. 
> When I run this on Tomcat4.0 on Unix it no longer gives me the selection box
> but instead displays the data on the screen.
> 
> Is this a difference between TC32 adn TC40 or Unix / Windows.
> Is this configurable.
> 
> 
> Thanks in advance.
> 
> 




how to configure mod_jk for multiple hosts?

2001-10-25 Thread Sebastian Schulz

hi,

i need information on how to enable loadbalancing in a
one to many scenario (one apache - many tomcats at different
hosts) using apache 1.3.20, tomcat 3.3 and mod_jk.

i successfully enabled loadbalancing on one machine
(different ajp13-workers at the same port), but don't know
exactly how to aply this to differnt hosts.

any suggestions highly appreciated.

thank you all in advance,
basti

p.s.

any tuning-hints for such an enviroment?
it has to work with approximately 6000 
(up to 1) concurrent Requests (!)

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net




Re: question

2001-10-25 Thread Dmitri Colebatch

they should go in the WEB-INF/classes, or as a jar in WEB-INF/lib.  You
have got them in the correct directory structure dont you?

hth
dim

On Wed, 24 Oct 2001, Pal, Anshu wrote:

> Hi!
> I recently installed Tomcat ( ver 3.3) . Where should I put the non -servlet
> class files required by the servlets . I tried putting them under
> WEB-INF/classes directory. I get a java.lang.NoClassDefFoundError Exception.
> I tried putting them in the WEB-INF lib directory . doesn't work either.
> 
> Any suggestions ?
> TIA
> 
> 
> Anshu Pal
> 
> Proprietary/Confidential Information belonging to CGI may be contained in
> this message. If you are not a recipient indicated or intended in
> this message (or responsible for delivery of this message to such person),
> or you think for any reason that this message may have been
> addressed to you in error, you may not use or copy or deliver this message
> to anyone else. In such case, you should destroy this message
> and kindly notify the sender by reply e-mail.
> 
> 




Launching subprocess under Tomcat as a Service

2001-10-25 Thread Robert Casto

To all,

I have a servlet that spawns a process to generate PDF reports. When I run
Tomcat 3.2.3 using the startup.bat method, everything works fine. The
subprocess runs, completes its task, and my Servlet returns and completes
its processing. The problem comes when running Tomcat as a service using
jk_nt_service.exe. My Servlet will run, all of my webpages will work, but
when my Servlet spawns the subprocess to generate the PDF file, it hangs. I
have tried changing the settings of the service to log in as various users
with no luck. Any suggestions on how to ensure that the subprocess will
execute while running Tomcat as a service. NOTE: This problem occurs whether
I am using NT4 SP6 or Win2k.

Robert Casto


.
 CinciJava | Java Development and Training

Robert Casto | [EMAIL PROTECTED]
513-349-JAVA | www.cincijava.com






Re: Questions on tomcat heap usage and garbage collection(avoiding OutOfMemoryError exceptions)

2001-10-25 Thread Pier Fumagalli

Bang, Steinar at [EMAIL PROTECTED] wrote:

> Which brings us to question 2: tuning apache/tomcat:
> When reading the documentation, I thought that there
> was supposed to be a single tomcat process, serving
> all requests.  However top reports a lot of tomcat
> processes, when I'm stresstesting the server, which
> leads me to belive that there is a separate tomcat
> process for each apache server process running.
> Is this correct?

Nope.. That's the idiotish implementation of Threads under Linux. Under
Linux every thread is seen as a process by "ps" so, if you have an
application using 500 threads, "ps" will report 500 processes (this is
because Linux has just one scheduling table for all, unlike real operating
systems which have two, and differentiate between threads and processes).

Short test to prove it, you know how much ram you have in your machine, do a
"ps" and see the amount of Ram used by each single "java" process, sum it
all up, see how much swap space you're using, and "tad" You have more
memory than you thought

Regarding your OutOfMemoryException, when that's thrown in one thread, all
other threads die too, because all threads reside in the same memory space,
so, if one thread doesn't have memory left, so not even the others. (they're
threads, not processes).

Pier (I hate Linux's threading model)




Re: Automatic Application Deployment

2001-10-25 Thread Craig R. McClanahan

What you are describing should work.  Are there any messages in the log
files that might point at problems in deploying the app?

Craig


On Wed, 24 Oct 2001 [EMAIL PROTECTED] wrote:

> Date: Wed, 24 Oct 2001 11:07:11 -0500
> From: [EMAIL PROTECTED]
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Automatic Application Deployment
>
> Hi!
> I am attempting to Auto Deploy a war (clmtest.war in this case) file.  I put
> it in the appBase ($CATALINA_HOME/webapps) and it expands automatically as
> expected when I restart tomcat.  My problem is that I cannot access my pages
> from a browser.  I continue to get the standard 404 error that "The
> requested resource (/clmtest/) is not available. ".  If I add a context
> manually to my server.xml file it works fine.  I am under the impression
> according to the documentation that I should not have to manually add a
> context.
> I'm using Solaris 8 and Tomcat 4.0.1
> Help!?
> Thanks in advance!!
> Brad Moreland
>
> +++The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material.  Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited.   If you received
> this in error, please contact the sender and destroy any copies of this
> document.+++
>




Re: Precompiled jsp's

2001-10-25 Thread Thomas Crook

You need to include the URL to servlet mappings in
your web.xml file. The -webinc switch will generate
the mappings. Here's the command line I use:

jspc -d jsp2java -p com.myco.myapp.jsp -webinc
WEB-INF/jspc.xml -webapp .

After Ant runs the jspc command I have it run a javac
task which places the class files in
WEB-INF/classes/com/myco/myapp/jsp

Then I run a small script to insert the webinc
generated file "jspc.xml" into web.xml


===
Thys De Wet (ZA) wrote:

Ok so I got my  JSP's compiled into class files..
Placed them in /WEB-INF/classes..
Now how do I tell Tomcat 3.2.3 to use these class
files ... 

ANy help 

PLEASE ..

*begs on knees*



**
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. If you have received this email in
error please notify
the system manager.

This footnote also confirms that this email message
has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**




http://briefcase.yahoo.com.au - Yahoo! Briefcase
- Manage your files online.



Question

2001-10-25 Thread jan . ruessel

I'm a total Newbie and am looking for a Tomcat - and - IIS - Documentation
for Tomcat 4.
It cant be the same, since workers.properties etc. dont come with Tomcat 4.
Thx for help
Grtz
Jan




Re: tomcat 4.0: Plug in custom Realm

2001-10-25 Thread Craig R. McClanahan



On Tue, 23 Oct 2001, Maneesha Jain wrote:

> Date: Tue, 23 Oct 2001 17:39:37 -0700
> From: Maneesha Jain <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: tomcat 4.0: Plug in custom Realm
>
> Hi,
>
> I want to plug in a custom Realm class in server.xml in tomcat 4.0 ?
>
> Is that possible ?
>

Yes.

> Can I need to implement the Realm interface and stick that in the
> server.xml file?
>

In the server.xml file, you would create an entry like this:

  

with "..." replaced by whatever other attributes you need.  The startup
processing will automatically look for matching property setter methods
(for instance, an attribute "debug" will look for a "setDebug()" method)
in your implementation class.

> Where should I put this class, so the tomcat can resolve it when parsing
> server.xml ?
>

The class itself needs to be unpacked under $CATALINA_HOME/server/classes,
or in a JAR file under $CATALINA_HOME/server/lib.

> Is this procedure documented anywhere ?
>
> Regards
> Maneesha
>
>

Craig





Re: tomcat 4.0: Plug in custom Realm

2001-10-25 Thread Dmitri Colebatch

sorry - I just realised that url doesn't actually contain info on writing
your own.  

hopefully the second part of my email is still useful (o:

cheers
im

On Thu, 25 Oct 2001, Dmitri Colebatch wrote:

> yep, see http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html
> for details on how to create one.  Depending one what you need to do, it
> may be easier to subclass the JDBC realm and override the getStatement
> (? I think thats it) methods...
> 
> hth
> dim
> 
> On Tue, 23 Oct 2001, Maneesha Jain wrote:
> 
> > Hi,
> > 
> > I want to plug in a custom Realm class in server.xml in tomcat 4.0 ?
> > 
> > Is that possible ?
> > 
> > Can I need to implement the Realm interface and stick that in the
> > server.xml file?
> > 
> > Where should I put this class, so the tomcat can resolve it when parsing
> > server.xml ?
> > 
> > Is this procedure documented anywhere ?
> > 
> > Regards
> > Maneesha
> > 
> > 
> 
> 




Re: tomcat 4.0: Plug in custom Realm

2001-10-25 Thread Dmitri Colebatch

yep, see http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html
for details on how to create one.  Depending one what you need to do, it
may be easier to subclass the JDBC realm and override the getStatement
(? I think thats it) methods...

hth
dim

On Tue, 23 Oct 2001, Maneesha Jain wrote:

> Hi,
> 
> I want to plug in a custom Realm class in server.xml in tomcat 4.0 ?
> 
> Is that possible ?
> 
> Can I need to implement the Realm interface and stick that in the
> server.xml file?
> 
> Where should I put this class, so the tomcat can resolve it when parsing
> server.xml ?
> 
> Is this procedure documented anywhere ?
> 
> Regards
> Maneesha
> 
> 




Update JSP

2001-10-25 Thread Claudia Sarmiento

Hello:
I'm using tomcat 3.2.1, and i want to change a JSP page, but i don't know
how i do that, i tried to compile in my app dir with the build.bat but i
received the error : NoClassDefFound Error /org/apache/tools/ant/main

Thanks in advance.


Claudia



Re: how to keep form data

2001-10-25 Thread Siomara Pantarotto

If you do the validation in the client side (using java script) you do not 
lose the information. Besides this is a better approach once you don't want 
your code to do the avalidation in the server side and then post that the 
user made a mistake.

Keep validation in the client side always

Siomara pantarotto



>From: Henry <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: how to keep form data
>Date: Wed, 24 Oct 2001 09:19:47 -0600 (Mountain Daylight Time)
>
>when a user submits a form, the content is checked and
>if anything is invalid, the user is prompted to
>correct and submit the form again.
>
>how can i keep the content the user typed in before?
>
>I am using RequestDispatcher.forward("originalform.html");
>
>is there a flag or something to set?
>


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




isapi_redirect does not pass certificate in javax.servlet.request.X509Certificate

2001-10-25 Thread Kar YEOW

How do you get isap_redirect to pass the client certificate to tomcat?
Anyone?
TIA.
Kar





File Download - CSV question

2001-10-25 Thread Evan Swanson



I wrote an application that for Tomcat 3.2 running on window. In the HTML
the is a reference (  ) to the filename. 
When I run this on windows I get a popup "save as" selection box. 
When I run this on Tomcat4.0 on Unix it no longer gives me the selection box
but instead displays the data on the screen.

Is this a difference between TC32 adn TC40 or Unix / Windows.
Is this configurable.


Thanks in advance.




Re: Why can't I connect

2001-10-25 Thread Pier Fumagalli

Kemp Randy-W18971 at [EMAIL PROTECTED] wrote:

> Can someone explain why I can't connect in Windows 2000 with Tomcat 4.01 and
> Apache 1.3.22?
> 1.  I am using all binaries, and I put mod_webapp.so and libapp.dll in
> Apache directory Modules.
> 2.  I put this entry in Tomcat server.xml after the EJB entry
> 
> 3.  I put this in Apache httpd.conf at the end
> 
>  ServerName localhost
>  WebAppConnection conn warp localhost:8080

Localhost:8008, not 8080

Pier


>  WebAppDeploy examples conn /examples/
>  WebAppDeploy onjava conn /onjava/
>  WebAppInfo /webapp-info
> 
> 4.  I put my war file in the tomcat webapps directory.
> 5.  I can bring up localhost and localhost:8080 OK.
> 6.  If I type localhost/onjava/, the following entry is in the Apache error
> logs: (both Apache and Tomcat are started)
> 
> Fri Oct 19 12:41:00 2001] [error] [client 127.0.0.1] File does not exist:
> c:/program files/apache group/apache/htdocs/onjava
> [Fri Oct 19 12:41:44 2001] [error] Connection "conn" cannot connect
> [Fri Oct 19 12:41:44 2001] [error] Cannot open connection "conn"
> [Fri Oct 19 15:21:00 2001] [error] Web-application not yet deployed
> [Fri Oct 19 15:22:08 2001] [error] Web-application not yet deployed
> [Fri Oct 19 15:22:21 2001] [error] Web-application not yet deployed
> [Fri Oct 19 15:24:42 2001] [error] Cannot deploy application examples
> [Fri Oct 19 15:24:42 2001] [error] Cannot deploy application examples
> 
> What could I be missing?
> 
> 
> 
> 




Win2K IIS/Tomcat hangs

2001-10-25 Thread Dan Rasmussen

Hello,

if (true == repeate message)  
{
Sorry this is a repeat... I just joined the list yesterday
and sent this to the list at the same time but didn't get
confirmation that I joined until this afternoon.  I just
started seeing traffic on the list and I'm afraid that I
might have missed any replies if it did make it to the
list. 
}

I did check the archives and have seen similar postings but
no info that fixes my problem...

I have been attempting to get IIS on Win2K/SP2 to play with
tomcat 3.3.  I have tomcat 3.3 installed and serving up the
Tomcat examples using this url:
http://localhost:8080/examples/jsp/index.html.  

I then used the "Tomcat IIS HowTo" to get IIS setup.  I got
to the point where I get a green up arrow on the filter but
when I try to get at 

http://localhost/examples/jsp/index.html

The browser (exploder 5 or netscape 6.1) just hangs (see
below for the tail of the iis_redirect.log which has a
happy look about it to my untrained eye).  I did the whole
bit with making the jakarta virtual directory and adding
the ISAPI filter.  I don't think I would get this far
otherwise.  

The redirector is a downloaded binary.  I checked the
registry entries.  What else could be wrong?  Is there
something I missed in IIS: Security?, other virtual
directories besides jakarta?.  Suggestions?

I had no problems integrating with Apache on NT and few
with Apache on Solaris.  IIS is a different story :( 

Any help greatly appreciated.

Thanks.

Dan Rasmussen


[jk_isapi_plugin.c (439)]: HttpFilterProc
[/examples/jsp/index.html] is a servlet url - should
redirect to ajp13
[jk_isapi_plugin.c (461)]: HttpFilterProc check if
[/examples/jsp/index.html] is points to the web-inf
directory
[jk_isapi_plugin.c (517)]: HttpExtensionProc started
[jk_worker.c (123)]: Into wc_get_worker_for_name ajp13
[jk_worker.c (127)]: wc_get_worker_for_name, done  found a
worker
[jk_isapi_plugin.c (539)]: HttpExtensionProc got a worker
for name ajp13
[jk_ajp13_worker.c (654)]: Into jk_worker_t::get_endpoint
[jk_ajp13_worker.c (539)]: Into jk_endpoint_t::service
[jk_ajp13.c (346)]: Into ajp13_marshal_into_msgb
[jk_ajp13.c (480)]: ajp13_marshal_into_msgb - Done
[jk_connect.c (108)]: Into jk_open_socket
[jk_connect.c (115)]: jk_open_socket, try to connect socket
= 2692
[jk_connect.c (124)]: jk_open_socket, after connect ret = 0
[jk_connect.c (132)]: jk_open_socket, set TCP_NODELAY to on
[jk_connect.c (140)]: jk_open_socket, return, sd = 2692
[jk_ajp13_worker.c (167)]: In
jk_endpoint_t::connect_to_tomcat, connected sd = 2692

Thats the end of the log as the world spins... waiting for
its reply.



=
-- replies to [EMAIL PROTECTED] --

Anything that appears after this sentence is inserted by 
Yahoo (or others) and may not be a good idea.

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Re: CATALINA_BASE

2001-10-25 Thread Lloyd H. Meinholz

I'm using Solaris 8 on a Sparc, using jdk1.3.1_01 and tomcat 4.0.1-b1.

I seem to have totally misunderstood CATALINA_BASE and CATALINA_HOME. I
have set CATALINA_BASE to the dist dir that I built and set
CATALINA_HOME to a different dir that contains "conf", "logs", "webapps"
and "work" dirs (copied from CATALINA_BASE). When I run startup.sh, I
get the output about what environment variables are being used, but no
tomcat is running (no java in ps) and I get the following entry in
$CATALINA_BASE/logs/catalina.out:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/catalina/startup/Bootstrap

If I unset CATALINA_HOME, I can run tomcat ok. However, I would like to
try to get this to work with multiple CATALINA_HOMEs.

When I look at the Bootstrap.java file, in the comments section, it says
something about the server directory being under catalina.home and the
code seems to do it this way to. Did I make a mistake or misunderstand
CATALINA_HOME and CATALINA_BASE? 

For fun, I tried just copying the "server" dir to CATALINA_HOME (even
though that seems at odds with what CATALINA_HOME is for) and that
didn't seem to help. Thanks for any help,

Lloyd



"Craig R. McClanahan" wrote:
> 
> On Thu, 11 Oct 2001, Fred Lankovic wrote:
> 
> > Date: Thu, 11 Oct 2001 13:14:01 -0500 (CDT)
> > From: Fred Lankovic <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: CATALINA_BASE
> >
> > What is CATALINA_BASE ?
> > is it a directory?
> > Thanks
> >
> 
> There are two environment variables that affect how relative paths are
> resolved for Tomcat 4.0:
> 
> * CATALINA_HOME - the assumed base for the "conf", "logs", "webapps",
>   and "work" directories.
> 
> * CATALINA_BASE - the assumed base for the "bin", "classes", "common",
>   "lib", and "server" directories.
> 
> If these values are *not* defined in your environment, these values are
> calculated as follows:
> 
> * CATALINA_HOME will be set to the directory above the "bin" directory
>   that contains "catalina.sh" and "catalina.bat".
> 
> * CATALINA_BASE will be set to whatever CATALINA_HOME is set to.
> 
> The reason for two variables is to allow you to "install" a single copy of
> the static part of Tomcat 4 (the startup scripts, the unpacked "classes"
> directories, and the "lib" directories that contain JAR files) and use it
> for several different dynamic environments (the configuration files, log
> files, webapps, and work directories) -- for example, if you have several
> developers sharing the same machine.
> 
> Craig



XML ClassCastException and tomcat 4.0 documentation

2001-10-25 Thread Joel P. Worrall

I am facing a terrible dilemma and in need of accurate information.

I believe my issue deals with the Tomcat 4 class loaders and my problem
surrounds the use of Tomcat 4.0.1 on jdk 1.4 with the JDOM beta 7 jar.

2 scenarios:

1.  unpack tomcat 4, configure the server.xml to look to my webapp.

My application WEB-INF/lib jar contains jdom beta 7 and the latest and
greatest xerces jar (built from source of xml.apache.org).  (Note that we
now have a xerces jar in the CATALINA_HOME/common/lib directory AND my
webapp/WEB-INF/lib directories)

For some reason, despite the fact that both xerces are recent, the following
exception occurs.

javax.servlet.ServletException: Servlet.init() for servlet jsp threw
exception
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:871)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3267)
at org.apache.catalina.core.StandardContext.start

- Root Cause -
java.lang.ClassCastException:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
at
javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.
java:103)
at
org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:183)
at
org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCa
che.java:165)
at
org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:1
38)
at
org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:32
4)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
at org.apache.catalina.core.StandardWrapper.load
..

For some reason, the ClassLoader(?) get confused and spits back a that
ClassCastException, claiming that the xerces DocumentBuilderFactory
implementation does not implement the interface - when it clearly does.

2.  Ok, so I remove the xerces.jar from the webapp/WEB-INF/lib directory.

I startup the system.  Now the jspservlet starts fine but my own servlet
that (a few levels deeper) makes a call to org.jdom.input.SAXBuilder chokes
b/c the org.apache.xerces.parsers.SAXParser is being cast to an XMLReader.
Now I checked the xerces.jar's SAXParser class AND IT DOES implement
XMLReader, but it throws the following exception none the less.

This leads me to believe its ClassLoader issue.

javax.servlet.ServletException: Error in building:
org.apache.xerces.parsers.SAXParser
at com.commnav.sbh.servlets.ControlServlet.init(ControlServlet.java:155)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
.
org.jdom.JDOMException: Error in building:
org.apache.xerces.parsers.SAXParser
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:306)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:583)
at
com.commnav.sbh.framework.config.ServletConfigConfiguration.(ServletCo
nfigConfiguration.java:41)
at com.commnav.sbh.servlets.ControlServlet.init(ControlServlet.java:90)
.
Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.SAXParser
at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:392)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:283)
... 20 more
Root cause: java.lang.ClassCastException:
org.apache.xerces.parsers.SAXParser
at org.jdom.input.SAXBuilder.createParser(SAXBuilder.java:392)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:283)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:583)
at
com.commnav.sbh.framework.config.ServletConfigConfiguration.(ServletCo
nfigConfiguration.java:41)
at com.commnav.sbh.servlets.ControlServlet.init(ControlServlet.java:90)


My frustration comes in that the documentation (HOWTO on ClassLoader) seems
to be very inaccurate, and I am left wondering how the ClassLoaders work,
what I need to configure to seperate these jars or whatever might be needed.

Someone who knows what they're doing... please help me.  I can (and do)
duplicate the error like clockwork.  I'm certain not to be the only one with
this issue and I hope to contribute the solution / explanation to the
community.

thanks,
the llama


Joel P. Worrall
Senior Software Engineer
 CommNav, Inc.
  (717) 796-1936 x274
  [EMAIL PROTECTED]
[EMAIL PROTECTED]
 home - (717) 796-2314
 Tango the gifted Llama
-





Re: JDBC Problem

2001-10-25 Thread James Chuang

Can't see how this is a tomcat question, but the Oracle connect string
should be:

jdbc:oracle:thin:@::

so using your example, it should be something like:

jdbc.oracle:thin:@hostname:1521:dbname


- Original Message -
From: "The Duke" <[EMAIL PROTECTED]>
To: "Tomcat-user Mailinglist" <[EMAIL PROTECTED]>
Sent: Wednesday, October 24, 2001 3:26 AM
Subject: JDBC Problem


> When I want to open a connection to the oracle database I get a sql
exception and the message that the Network Adapter could not establish the
connection.
>
> I use following :
> - oracle.jdbc.driver.OracleDriver
> - jdbc:oracle:thin://hostname/dbname
>
> Can anyone help?
>
> Dennis
>
>
> Make a difference, help support the relief efforts in the U.S.
> http://clubs.lycos.com/live/events/september11.asp




  1   2   >