How to use text/vnd.wap.wml MIME Type ?

2001-03-02 Thread Vijay Suryawanshi




Hi,
How to use text/vnd.wap.wml MIME Type to serve WML 
pages from Tomkat ? It's not working after putting mime type mappings in 
web.xml. This is similar problem that Raf 
Colson had faced. 
Raf, did u get any 
workaroud ? If you could help me in this regard, that would be 
appriciated.
Thanks and Regards,
 
VijayVijay 
SuryawanshiVeritas Software, India.91-020-5530203 x 
441


will Tomcat 4.0 support "mulitpart/form-data" encryption?

2001-03-02 Thread Michael Matovsky

I know that Tomcat has difficulties handling forms that are multipart
encrypted, the question I have is will Tomcat 4.0 support forms
"mulitpart/form-data" encryption?

Michael Matovsky
Software Engineer
Delano Technology Corp.
(905) - 947-  ext. 2852
Delano.  What Customer Relationships Should Be. 



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




eteks PJA, BufferedImage.createGraphics() problem

2001-03-02 Thread Nick Didkovsky


Hello,
A while back I asked about the getToolkit() problem I was experiencing
with Tomcat under Solaris, Java 1.2.2.  I was pointed toward eteks'
PJA classes which provide a "pure" Java display substitute for XWindows. 
Xvfb was also suggested, which has caused many intermittent problems, so
I am looking instead at PJA.
SUCCESS:
I have since installed PJA and am now starting tomcat with the PJA-specific
options added.  I even suffered the "ugly fix" for the buggy sun.java2d.SunGraphicsEnvironment.class
to get it to run.
Here's my tomcat start command
$JAVACMD -Xbootclasspath/p:../pja/lib/pja.jar:../pja/lib/rtgraphics.jar 
-Dawt.toolkit=com.eteks.awt.PJAToolkit -Djava2d.font.usePlatformFont=false
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment -Djava.awt.fonts=/usr/java1.2/jre/lib/fonts
-Duser.home=/usr/local/jakarta-tomcat-3.2.1/pja $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} 
org.apache.tomcat.startup.Tomcat "$@" &
The toolkit problem has disappeared.  Hooray.
PROBLEM:
A new problem has appeared, in code where I am trying to create a Jpeg
output stream from an int[] buffer, using JPEGImageEncoder, which requires
creating an image and drawing it into a Graphics2d object pulled from a
BufferedImage.  The following code fails at the createGraphics() line.
Image im = Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(w,
h, buffer, 0, w));    // ok
BufferedImage bi =  new BufferedImage(w, h, BufferedImage.TYPE_INT_BGR);   
// ok
Graphics2D g = bi.createGraphics();    // dies
 
I have burned many hours on this so far.  This only fails on Solaris
- heavily and successfully tested under Windows. Does anyone have any suggestions?
Best,
Nick
PS I ran PJAToolkitDemo and successfully got the few gifs written to
disk, except the ones with fonts, which failed, complaining about no .pjaf
files.  Not supposed to need them in Java 1.2.2... anyway...


Tomcat Mod_jk and NFC Chat

2001-03-02 Thread Juan Alberto Cirez

Hello to all.
I am new to this list and to tomcat as well (I come from an apache
background).
I have the following questions:
I am trying to setup Apache to work with TomCat w/mod_jk to work with
NFC Chat Server.
My apache configuration files are located on /web/apache-conf
I start the server with the following command
/path/to/binary/httpd -f /web/apache-conf/httpd.conf

I have include directive so apache includes the tomcat-apache-conf-auto
file in its configuration.
By the way, how do I tell tomcat to look for mod_jk.so in
/path/to/apache/libexec rather than the server's root?

I want to include the configuration for Tomcat in /web/tomcat-conf
How do I start TomCat so it uses this location for all its configuration
file?

I also wat to include the configuration for the NFC Server in
/web/nfc_chat-conf
How do I start the chat server so it uses this configuration file...?

Help, please

---
Juan Alberto Cirez - Chief Creative Officer
[EMAIL PROTECTED] - [EMAIL PROTECTED]

-- hip2linux Professional Services, Inc.---
- Fortalezza VPN/Firewall
- Commandante Remote Network Management
- Network Security
- Intranet & Extranet Management
---
www.hip2linux.com www.micanno.com
www.dominicanarmy.com www.basementsuite.com
www.micanno.com  www.fortalezza.com
---
 Sunny and Beautiful Vancouver, Canada.
---

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




RE: QuickSorting Vectors

2001-03-02 Thread Craig O'Brien

Vlad and I were thinking along the same lines.  This is easy but may not be
the best for commercial applications.

Here is a simple program I just wrote:

class CraigsVectorSort  {

Vector vec = new Vector();

public static void main(String[] args)  {
CraigsVectorSort v = new CraigsVectorSort();
v.arraySimpleSort();
}

void arraySimpleSort()  {
vec.add(new String("abbot"));
vec.add(new String("silium"));
vec.add(new String("randy"));
vec.add(new String("goofy"));
vec.add(new String("zenia"));
vec.add(new String("pokie"));
vec.add(new String("xylaphone"));
vec.add(new String("dogface"));
vec.add(new String("friggen-joe"));
vec.add(new String("penuckle"));
vec.add(new String("charlie"));
vec.add(new String("manna"));

System.out.println("before: " + vec);
Object[] obArr = vec.toArray();
Arrays.sort(obArr);
vec.removeAllElements();
for (int i = 0; i < obArr.length; i++)  {
vec.add(obArr[i]);
}
obArr = null;
System.out.println("after :0) : " + vec);
}
}

It works efficiently.  You may want to consider using one of the collections
rather then Vector.  You may not need the synchronization so an ArrayList
would be faster.  Many many considerations.

Let me know what you think.

Regards,
Craig O'Brien

Java Programmer/Web Developer
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 6:40 PM
To: [EMAIL PROTECTED]
Subject: Re: QuickSorting Vectors


Don't have a sample but you can
take a look at the java.util.Arrays's sort(Object[]) method.
May be you can use that in combination with Vector.toArray()
which calls System.arraycopy, so this should be fast, may be
even faster than iterating over Vector's elements during
custom sort if you decide to sort Vectors directly.

method...

--V.

Ryan wrote:
>
> I am a student but this is not for a class.. I am trying to keep a thread
> running that holds files in a directory. I just want to maximize my
bandwith
> and CPU usage for my web site.
>
> -ryan
>
> - Original Message -
> From: "Stefán F. Stefánsson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 02, 2001 5:21 PM
> Subject: RE: QuickSorting Vectors
>
> > R U a student?
> >
> > When is the deadline?
> >
> > -Original Message-
> > From: Ryan [mailto:[EMAIL PROTECTED]]
> > Sent: 3. mars 2001 00:46
> > To: [EMAIL PROTECTED]
> > Subject: QuickSorting Vectors
> >
> >
> > Does anyone have a quicksorting class that sorts Vectors containing
> > Strings that wouldn't mind letting me look at?
> >
> >
> > -ryan
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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


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




Re: QuickSorting Vectors

2001-03-02 Thread Fernando Padilla


I know you asked for Vector, but if you could use the Collection classes (
Java2, java.util.Collection, java.util.List, etc ), you can look at
java.util.Collections for some sorting methods

though it's not quicksort, they claim n log(n) ..

fern

ps - no need to respond to this..

On Fri, 2 Mar 2001, Ryan wrote:

> I am a student but this is not for a class.. I am trying to keep a thread
> running that holds files in a directory. I just want to maximize my bandwith
> and CPU usage for my web site.
>
> -ryan
>
>
>
> - Original Message -
> From: "Stefán F. Stefánsson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 02, 2001 5:21 PM
> Subject: RE: QuickSorting Vectors
>
>
> > R U a student?
> >
> > When is the deadline?
> >
> > -Original Message-
> > From: Ryan [mailto:[EMAIL PROTECTED]]
> > Sent: 3. mars 2001 00:46
> > To: [EMAIL PROTECTED]
> > Subject: QuickSorting Vectors
> >
> >
> > Does anyone have a quicksorting class that sorts Vectors containing
> > Strings that wouldn't mind letting me look at?
> >
> >
> > -ryan
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


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




Re: QuickSorting Vectors

2001-03-02 Thread Vladimir Grishchenko

Don't have a sample but you can
take a look at the java.util.Arrays's sort(Object[]) method.
May be you can use that in combination with Vector.toArray()
which calls System.arraycopy, so this should be fast, may be
even faster than iterating over Vector's elements during
custom sort if you decide to sort Vectors directly.

method...

--V.

Ryan wrote:
> 
> I am a student but this is not for a class.. I am trying to keep a thread
> running that holds files in a directory. I just want to maximize my bandwith
> and CPU usage for my web site.
> 
> -ryan
> 
> - Original Message -
> From: "Stefán F. Stefánsson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 02, 2001 5:21 PM
> Subject: RE: QuickSorting Vectors
> 
> > R U a student?
> >
> > When is the deadline?
> >
> > -Original Message-
> > From: Ryan [mailto:[EMAIL PROTECTED]]
> > Sent: 3. mars 2001 00:46
> > To: [EMAIL PROTECTED]
> > Subject: QuickSorting Vectors
> >
> >
> > Does anyone have a quicksorting class that sorts Vectors containing
> > Strings that wouldn't mind letting me look at?
> >
> >
> > -ryan
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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




Re: QuickSorting Vectors

2001-03-02 Thread Ryan

I am a student but this is not for a class.. I am trying to keep a thread
running that holds files in a directory. I just want to maximize my bandwith
and CPU usage for my web site.

-ryan



- Original Message -
From: "Stefán F. Stefánsson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 5:21 PM
Subject: RE: QuickSorting Vectors


> R U a student?
>
> When is the deadline?
>
> -Original Message-
> From: Ryan [mailto:[EMAIL PROTECTED]]
> Sent: 3. mars 2001 00:46
> To: [EMAIL PROTECTED]
> Subject: QuickSorting Vectors
>
>
> Does anyone have a quicksorting class that sorts Vectors containing
> Strings that wouldn't mind letting me look at?
>
>
> -ryan
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


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




Re: help with Tomcat under windows ME...

2001-03-02 Thread dick

Hi Rob,

I do run Tomcat on Window ME and it runs smooth. So,would you give more
information?
e.g. What do you see when you start Tomcat?


Dick
- Original Message -
From: "Rob Smyth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 11:35 PM
Subject: help with Tomcat under windows ME...


> I can't start Tomcat under windows ME...
>
> Is there a way I can do this?  I've made all the appropriate changes to
the
> classpath in the autoexec.bat, but I keep getting the 'out of environment'
> error.
>
> Thanks for any help.
>
> Rob Smyth
>
>






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


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




RE: QuickSorting Vectors

2001-03-02 Thread Stefán F. Stefánsson

R U a student?
 
When is the deadline?

-Original Message-
From: Ryan [mailto:[EMAIL PROTECTED]]
Sent: 3. mars 2001 00:46
To: [EMAIL PROTECTED]
Subject: QuickSorting Vectors


Does anyone have a quicksorting class that sorts Vectors containing
Strings that wouldn't mind letting me look at?
 
 
-ryan


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




QuickSorting Vectors

2001-03-02 Thread Ryan



Does anyone have a quicksorting class 
that sorts Vectors containing Strings that wouldn't mind letting me look 
at?
 
 
-ryan


Tomcat Mod_jk and NFC Chat

2001-03-02 Thread Juan Alberto Cirez

Hello to all.
I am new to this list and to tomcat as well (I come from an apache
background).
I have the following questions:
I am trying to setup Apache to work with TomCat w/mod_jk to work with
NFC Chat Server.
My apache configuration files are located on /web/apache-conf
I start the server with the following command
/path/to/binary/httpd -f /web/apache-conf/httpd.conf

I have include directive so apache includes the tomcat-apache-conf-auto
file in its configuration.
By the way, how do I tell tomcat to look for mod_jk.so in
/path/to/apache/libexec rather than the server's root?

I want to include the configuration for Tomcat in /web/tomcat-conf
How do I start TomCat so it uses this location for all its configuration
file?

I also wat to include the configuration for the NFC Server in
/web/nfc_chat-conf
How do I start the chat server so it uses this configuration file...?

Help, please

---
Juan Alberto Cirez - Chief Creative Officer
[EMAIL PROTECTED] - [EMAIL PROTECTED]

-- hip2linux Professional Services, Inc.---
- Fortalezza VPN/Firewall
- Commandante Remote Network Management
- Network Security
- Intranet & Extranet Management
---
www.hip2linux.com www.micanno.com
www.dominicanarmy.com www.basementsuite.com
www.micanno.com  www.fortalezza.com
---
 Sunny and Beautiful Vancouver, Canada.
---



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




Re: getPathInfo() returns null

2001-03-02 Thread Vladimir Grishchenko

"Craig R. McClanahan" wrote:
> 
> Vladimir Grishchenko wrote:
> 
> > Hi,
> >
> > I'm new to Tomcat and servlets and need some help.
> > Would somebody clarify  why getPathInfo() returns null when a servlet accessed via:
> >
> > http://server/context/servletalias/pathinfo
> >
> > and it returns "pathinfo" when the same servlet accesses via:
> >
> 
> It actually returns "/pathinfo", right?

yes

> 
> >
> > http://server/context/servlet/servletalias/pathinfo
> >
> > Both invocatoin options seem to work (except the Pathinfo part), which is the 
>"correct"
> > way to call servlets? What is the difference?
> >
> 
> What version of Tomcat does this?  You are correct -- you should be able to retrieve 
>the
> path info in either case.

3.2.1
Could my configuration be messed up???

> 
> >
> > Thanx,
> > Vlad.
> >
> 
> Craig McClanahan
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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




install error: "Cannot use classic compiler"

2001-03-02 Thread Mark Johnson

I keep getting this error message while installing ant, servletapi,
tomcat on a machine running Debian (upgraded from slink to potato) with
the IBM Java2 SDK. My PATH includes $JAVA_HOME/bin, where javac resides.

mybox:# java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20001124 (JIT
enabled: jitc))

Here's what's odd. I ran './bootstrap.sh' in the ant directory, and the
build failed with: "Cannot use classic compiler, as it is not
available". AT the end of my rope, I reinstalled the SDK: ant
bootstrapped successfully! I immediately tried './build dist' in the
servletapi (3.2) src directory, and got the same error: "Cannot use
classic compiler, as it is not available".

I've tried changing the 
line in build.xml, disabling the jit compiler, etc, to no avail.

I installed the same setup on another machine with no problems. The only
differences I can identify are:
1. The working installation's IBM J2RE build is earlier: cx1302623
2. The working installation had a fresh Debian potato install (no
upgrade), and perl 5.005 instead of perl 5.004.

TIA, Mark



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




RE: Relative Pathing and SSL

2001-03-02 Thread Stefán F. Stefánsson

I wouldn't imagine that you would.  The thing is that tomcat is
generating the redirection.  The default is of course to append http to
the start and if the thing is on some weird port then it has to do :xxx
where xxx is the port number (in your case 443).

Open your server.xml file.  Look for the AJP12 connector which should
look something like this:






It may be different... I don't know.  Try adding the line  to the  tag (right before the
 line.

As I said, I have no idea if this will do the trick but it's worth the
shot.  Let me know how it goes.

Regards,
Stefan.

-Original Message-
From: Nibler Jeff R. (PDX1JRN) [mailto:[EMAIL PROTECTED]]
Sent: 2. mars 2001 23:51
To: [EMAIL PROTECTED]
Subject: RE: Relative Pathing and SSL


Thanks for your reply Stefan!  I'm using Tomcat 3.2.  It looks as though
I
haven't configured SSL with Tomcat correctly.  I wouldn't think that I'd
have to since I'm using IIS to serve everything.  Where would I put that
"secure" tag in my xml file.  Currently, the https connector is remarked
out
since nothing connects directly to Tomcat.  I don't have much experience
with this though.  Do you or anyone else know if you must set up the SSL
with Tomcat if you are using isapi?  Thanks again!

Jeff

-Original Message-
From: Stefán F. Stefánsson [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 3:18 PM
To: [EMAIL PROTECTED]
Subject: RE: Relative Pathing and SSL


I don't know if this works with isapi also but try to set the parameter
"secure" with the value "true" in your connector tag in server.xml.
What version of tomcat are you using?

Regards, Stefan.

-Original Message-
From: Nibler Jeff R. (PDX1JRN) [mailto:[EMAIL PROTECTED]]
Sent: 2. mars 2001 22:30
To: [EMAIL PROTECTED]
Subject: Relative Pathing and SSL


Hello all, I'm having an interesting problem persisting an SSL
connection
with my Java servlets.  I am using Windows NT/IIS with Tomcat acting
only as
the servlet container (with the isapi_redirect.dll).  Everything works
fine
except when I need to re-direct a user from the servlet back to any
other
page.  When that happens, for some reason it sets the url to http
instead of
https and then adds a colon with port 443 following the url (which is
obviously the port that it should be on, only automatically using the
https
prefix).  

Example:
Should be: https://www.myserver.com/Test.htm
Instead it gives: http:www.myserver.com:443/Test.htm

I have no idea why this is happening.  I can't find any methods for the
HttpServletResponse object that allows me to set the communication
protocol
etc etc.  Here is the line of code that I'm using:
response.sendRedirect("../../Test.htm");
Notice I am using a relative path.  If I use this instead.
response.sendRedirect("https://www.myserver.com/Test.htm");
then it works.  I hate to hard code the url like that though because I
have
a development server and a production server.  I'm at a loss.  Anyone?

Jeff

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


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

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


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




Server.xml DTD?

2001-03-02 Thread William Wishon

Is there a DTD for server.xml?  If so could somebody point me at it.

Thanks,
Bill

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




Re: RMI

2001-03-02 Thread Sam Newman

The way I found to stop this, is to grant all permissions to everything -
that is, copy the policy for the tomcat codebase, just remove all mention of
the code base (e.g. line starts grant { rather than grant codebase { ). I.m
trying to track donw exactly what the problem is, but so far it looks like
tomcat isn't properly handling permisisons for specific codebases.

sam
- Original Message -
From: Sergey V. Udaltsov <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 11:21 PM
Subject: Re: RMI


> Hi
>
> I try to run Tomcat with SecurityManager and policy file.
> First, I found a bug in tomcat.sh - it passes "-security" option to the
> class (it's necessary to add one "shift" statement before calling java).
>
> Then I found that all session-based jsps give me errors like this (in
> tomcat console):



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




Re: newbie servlet deploy question

2001-03-02 Thread Milt Epstein

On Fri, 2 Mar 2001, Bo Xu wrote:

> Jason Novotny wrote:
> 
> > I would like to be able to access a servlet with the URL
> > http://localhost:8080/demo
> >
> > However, it only works if I go to
> > http://localhost:8080/demo/servlet/demo
> >
> > I have the following in server.xml and web.xml respectively:
> >
> >  >  docBase="webapps/demo"
> >  crossContext="true"
> >  debug="0"
> >  reloadable="true"
> >  trusted="false" >
> > 
> >
> > BTW, should I comment out or use the following in some way?
> >  > className="org.apache.tomcat.request.InvokerInterceptor"
> > debug="0" prefix="/servlet/" />
> >
> > My web.xml in webapps/demo/WEB_INF/web.xml has the following:
> >
> > 
> >   demo
> >   org.demo.DemoServlet
> > 
> >
> > 
> >   demo
> >   /demo
> > 
> >
> > So I would like to be able to use   and have the
> > servlet invoked.
> 
> Hi :-)  with jakarta-tomcat-4.0-b1(standalone, JDK1.3, winnt40),
> I find:
[ ... ]

>From something Craig McLanahan wrote in response to someone trying to
do something similar to Jason (and myself), it sounds like this works
in Tomcat 4.0, but not in Tomcat 3.2 (which is what I'm using).
(Question to Jason: Are you using 3.2 or 4.0?)  Personally, I think
I'm stuck with 3.2 for the time being.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


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




RE: AT&T Cable Modem Problem Resolved

2001-03-02 Thread J. Sainz


I agree AT&T support is pretty lame and they think everyone is even lamer
than they are!

-Original Message-
From: Dave Parkin [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 10:55 AM
To: '[EMAIL PROTECTED]'
Subject: AT&T Cable Modem Problem Resolved


2 days ago I asked y'all if tomcat could be causing a problem with AT&T
Cable Modem.

I ended up throwing caution to the and listening to my internal voice.

First, I restored WinMe system to a point in time before problems began
(Nifty System Tool).

Modem connectivity began to show great promise after that, but Network
settings were not entirely correct.

Then, the Network configuration tweaking began. Bottom line rule, ignore
AT&T Phone Tech recommend (they're reading off the same sheet of paper that
they give to all of them). Here is what I recommend.

Protect yourself - Two things: 1) Ask field tech to record your assigned IP
address, Sub-net IP Address, Host, Domain Name, Gateway, DNS Server Search
Order. 2) After they install and get things running, go to your Network
configuration and record what they did to get things to run (so you can
recover later, should the need arise without relying on the Corporate Line).

After my final tweaking, I deligently recorded Network settings.  They were
not what AT&T said they should be to work.

I have not tried reinstalling and running tomcat again since - perhaps
tonight. One victory at a time!

The reason I'm documenting to tomcat mail site is this problem may have
occured after installing and starting tomcat, like it did to me. Modem
operation problem may not be related, but should it happen to you, you'll
greatly appreciate what I've docmented here vs. late night, against the
wall, head beatings accompanied by a Phone Tech telling you "everything
should work now" and rebooting 'til tomorrow).

Here we go:

Identification tab:

Host:  XNNN-X (whatever they documented your hostname to be)

Work group: @home

Computer Name:  (LEAVE BLANK)


Network tab:

NIC or USB Card Properties:

X TCP/IP (make sure it's mapped to TCP/IP)

TCP/IP Protocol Properties:

IP Address:

You can go 2 directions:

* Obtain automatically

Or the more radical

* Specify an IP address
(A "nice" Phone Service Tech will give you if you insist that that's
how field tech got it going.  A "not nice" Phone Service Tech will not give
you this info. - politely find an excuse to call again later - like "my wife
is calling me to dinner, gotta go, I'll tweak a little on my own and call
you back")


WINS Config:

* Disable


Gateway:

Installed gateways:

IP Address: NNN.NNN.NNN.NNN
Subnet Mask: 255.255.255.128
(Service Tech will give you IP Address if you insist that that's how
tech got it going, or "let's give it a try to see if that's the problem")


DNS Config:

* Enable DNS

Host: XNNN-XDomain: cityabbrN.ST.home.com

DNS Servier Search Order:

NNN.NNN.NNN.NNN
NNN.NNN.NNN.NNN
(Service Tech will give you if you insist that that's how tech got
it going)


Bindings:

X Client for MS Networks (choose this option)

NetBIOS:




Restart your machine and enjoy the high speed world of a AT&T Cable Modem!

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


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




RE: Relative Pathing and SSL

2001-03-02 Thread Nibler Jeff R. (PDX1JRN)

Thanks for your reply Stefan!  I'm using Tomcat 3.2.  It looks as though I
haven't configured SSL with Tomcat correctly.  I wouldn't think that I'd
have to since I'm using IIS to serve everything.  Where would I put that
"secure" tag in my xml file.  Currently, the https connector is remarked out
since nothing connects directly to Tomcat.  I don't have much experience
with this though.  Do you or anyone else know if you must set up the SSL
with Tomcat if you are using isapi?  Thanks again!

Jeff

-Original Message-
From: Stefán F. Stefánsson [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 3:18 PM
To: [EMAIL PROTECTED]
Subject: RE: Relative Pathing and SSL


I don't know if this works with isapi also but try to set the parameter
"secure" with the value "true" in your connector tag in server.xml.
What version of tomcat are you using?

Regards, Stefan.

-Original Message-
From: Nibler Jeff R. (PDX1JRN) [mailto:[EMAIL PROTECTED]]
Sent: 2. mars 2001 22:30
To: [EMAIL PROTECTED]
Subject: Relative Pathing and SSL


Hello all, I'm having an interesting problem persisting an SSL
connection
with my Java servlets.  I am using Windows NT/IIS with Tomcat acting
only as
the servlet container (with the isapi_redirect.dll).  Everything works
fine
except when I need to re-direct a user from the servlet back to any
other
page.  When that happens, for some reason it sets the url to http
instead of
https and then adds a colon with port 443 following the url (which is
obviously the port that it should be on, only automatically using the
https
prefix).  

Example:
Should be: https://www.myserver.com/Test.htm
Instead it gives: http:www.myserver.com:443/Test.htm

I have no idea why this is happening.  I can't find any methods for the
HttpServletResponse object that allows me to set the communication
protocol
etc etc.  Here is the line of code that I'm using:
response.sendRedirect("../../Test.htm");
Notice I am using a relative path.  If I use this instead.
response.sendRedirect("https://www.myserver.com/Test.htm");
then it works.  I hate to hard code the url like that though because I
have
a development server and a production server.  I'm at a loss.  Anyone?

Jeff

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


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

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




getCookies bug?

2001-03-02 Thread Miles Poindexter

Hi, newbie to the list here.
I was running Tomcat 3.2.1 on Mac OS X beta and I started having two weird bugs:

1. Tomcat would hang on the first 3 to 6 requests and then finally start working. Then 
everything would work fine.
2. A few times, before it would cease to hang, I would get an error from the Hotspot 
java machine. A fatal error about bad memory space, etc.

This same collection of servlets that make up my site work fine on ServletExec, which 
we are trying to replace with Tomcat.

So I switched to the new Tomcat 4.0 b1 and am having difficulty getting it functional.
At first I had to change the shell script to add my CLASSPATH to it's own. 3.2.1 did 
this, I wonder why it was disabled on 4.0?
Then I had to set both the TOMCAT_HOME and JAVA_HOME which 3.2.1 used to correctly 
guess on its own.
OS X puts the java tools binaries in a folder called "Commands" so I had to create an 
alias called "bin" that pointed to that.

Now it is running, but I get a ClassCastException from catalina when my servlet asks 
the request objects for the cookies. Is this a bug?

Also, how to I make alias to servlets? I did this in web.xml with 3.2.1 but this fails 
with 4.0. I want to make a URI like: /hello  point to a servlet.

Thanks for the help!

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




RE: webapp icons, disabling directory listings, and tags in web.xml

2001-03-02 Thread Stefán F. Stefánsson


>Stefán F. Stefánsson wrote:
>> Ok... thanks (regarding the ).
>>
>> The correct reaction from tomcat... hmmm... not sure I know what you
>> mean here... are you talking in regards to the  or the welcome
>> file list?
>>
>> I'll just answer it in two parts,
>>
>> 1) The icon should be displayed for example in the title bar when the
>> webapp is active in some browser.  I've seen this somewhere on the
>> javasoft site.  Then I got that cute little penguin/triangle thing
with
>> the hands and all...  I admit that this is not exactly on the top of
my
>> priority list but more done out of curiosity.
>
>
>That happens because the page developer included  tags in the
pages
>themselves -- it has nothing to do with the  element in web.xml,
which
>is there for GUI based deployment tools (which Tomcat does not have).

OK.  So that's what it does... funny... never knew that...  Figures, I
was wondering that 16x16 and 32x32 were really big icons for that tiny
little pic up there in the title bar...  silly me.  Thanks for clearing
that up for me... I feel very small now.

>>
>>
>> 2) With regards to the welcome files I want users to be able to go to
>> the URL http://some.host.somewhere/ and not to the URL
>>
http://some.host.somewhere/servlet/com.decode.ips.webservice.controller.
>> IPSControllerServlet.  I think the reason for why I want that is
pretty
>> obvious.
>
>The 2.2 spec is not clear that this is supposed to work (although I
agree
>with you that it should).  If Tomcat 3.x does not do this, you could
submit
>a feature request to make it so.

At least it's not doing it for me.  If I set a servlet in a welcome file
list then nada... and none of the tricks that I've heard of works (doing
a url mapping for something to the servlet and then putting that
something in the welcome file list and so on...).  Also... and this is
an even bigger problem than the last one... the  tag is not
working at all for me.

This is what I have in the 'web.xml':
...

404.htm


404
404.htm

...

The 404.htm is being displayed as a welcome file but every time I try to
access something that does not exist on the server I get the regular
ugly windows internet explorer 404 page.  Have any problems been
reported with ?

>The 2.3 spec will make it mandatory that servlet URIs can be used in
>, and Tomcat 4.0 does this correctly.
>
>
>
>>  The only way I can get that is to create an index.htm file
>> that has this tag in the head section:
>>   
>>
>> But I would much rather that the server handled that and I could skip
>> the stupid index.htm file.  At all costs I do not want the user to
get
>> the directory listing!
>>
>> Thanks for your time,
>> Stefan.
>>
>
>Craig

Regards, Stefan.

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


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




Re: Beans

2001-03-02 Thread Brett W. McCoy

On Fri, 2 Mar 2001, Brett W. McCoy wrote:

> Why does the creation of a Bean fail when I do this:
>
> 
>
> But when I do this:
>
> 
>
> it builds fine?  The bean is in the CLASSPATH (not under WEB-INF), and the
> fully qualified package is imported at the top of the JSP file.  All of
> the other classes used in the JSP file are found, but not the Bean.  Is
> Tomcat using it's own class loader that isn't using the classpath?

Never mind, I found the asnwer.

-- Brett
 http://www.chapelperilous.net/~bmccoy/
---
I can't complain, but sometimes I still do.
-- Joe Walsh


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




RE: Tomcat on Linux

2001-03-02 Thread Adam Fowler

Hi,

Have you got Sun's JDK, or another JDK, version 1.3??? If not, try
installing that instead.

Regards,
Adam.


Adam Fowler
Second year Computer Science undergraduate
University of Wales, Aberystwyth
Carroll College, WI, USA(2000-2001)
web: http://gucciboy.dyndns.org/aff9
e-mail: [EMAIL PROTECTED]
"Every new beginning comes from some other beginning's end"

-Original Message-
From: Wang, Yuhui [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 2:55 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat on Linux


Hello,

I have problem running tomcat on Linux, Red Hat 6.0.  When I try to start
the
tomcat using the script, there is a Java exception of
Can't open config file: /home/tomcat/conf/server.xml due to:
java.io.UnsupportedEncodingException: UTF8

I'm using tomcat 3.2.1

Can someone help me with this.

Yuhui Wang
Software Analyst
[EMAIL PROTECTED]


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




Re: RMI

2001-03-02 Thread Sergey V. Udaltsov

Hi

I try to run Tomcat with SecurityManager and policy file.
First, I found a bug in tomcat.sh - it passes "-security" option to the
class (it's necessary to add one "shift" statement before calling java).

Then I found that all session-based jsps give me errors like this (in
tomcat console):

java.security.AccessControlException: access denied
(java.util.PropertyPermission tomcat.sessionid.randomclass read)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at
java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1278)
at java.lang.System.getProperty(System.java:560)
at
org.apache.tomcat.util.SessionIdGenerator.getIdentifier(SessionIdGenerator.java:124)
at
org.apache.tomcat.util.SessionIdGenerator.generateId(SessionIdGenerator.java:177)
at
org.apache.tomcat.util.SessionUtil.generateSessionId(SessionUtil.java:180)
at
org.apache.tomcat.session.StandardManager.getNewSession(StandardManager.java:379)
at
org.apache.tomcat.session.StandardSessionInterceptor.newSessionRequest(StandardSessionInterceptor.java:177)
at
org.apache.tomcat.core.ContextManager.doNewSessionRequest(ContextManager.java:913)
at org.apache.tomcat.core.RequestImpl.getSession(RequestImpl.java:478)
at
org.apache.tomcat.facade.HttpServletRequestFacade.getSession(HttpServletRequestFacade.java:381)
at
org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:173)
at
org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:149)
at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:99)
at
jsp.sessions._0002fjsp_0002fsessions_0002fcarts_0002ejspcarts_jsp_0._jspService(_0002fjsp_0002fsessions_0002fcarts_0002ejspcarts_jsp_0.java:51)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
2001-03-02 03:45:32 - Ctx( /examples ): Exception in: R( /examples +
/jsp/sessions/carts.jsp + null) - java.lang.NullPointerException
at
jsp.sessions._0002fjsp_0002fsessions_0002fcarts_0002ejspcarts_jsp_0._jspService(_0002fjsp_0002fsessions_0002fcarts_0002ejspcarts_jsp_0.java:132)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)

So in browser I also get the error:

Error: 500

Location: /examples/jsp/sessions/carts.jsp

Internal Servlet Error:

java.lang.NullPointerException
at
jsp.sessions._0002fjsp_0002fsessions_0002fcarts_0002ejspcarts_jsp_0._jspService(_0002fjsp_

RE: tomcat with Apache

2001-03-02 Thread Adam Fowler

Hi,

You'll need to either download the source and recompile it, or easier -
download the redhat RPM.

They're listed on my site. http://willow.cc.edu/docs/adminguide

Regards,
Adam.


Adam Fowler
Second year Computer Science undergraduate
University of Wales, Aberystwyth
Carroll College, WI, USA(2000-2001)
web: http://gucciboy.dyndns.org/aff9
e-mail: [EMAIL PROTECTED]
"Every new beginning comes from some other beginning's end"

-Original Message-
From: Wang, Yuhui [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 5:02 PM
To: '[EMAIL PROTECTED]'
Subject: tomcat with Apache


Hello,
I try to make tomcat working with Apache webserver on a Red Had 6.0 machine.
When I try to restart Apache after the tomcat, it complains about the
mod_jk.so file I downloaded from the website.  Error message is as
API module structure `jk_module` in file /etc/httpd/libexec/mod_jk.so is
garbled - perhaps this is not an Apache moduel DSO?
I tried to download the mod_jk.so file several times.  Same thing happens
everytime.


Yuhui Wang
Software Analyst
[EMAIL PROTECTED]


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




RE: Assigning Servlets to different ports.

2001-03-02 Thread William Wishon

Here's the problem I keep running up against.

The top level XML element is a Server, it contains a ContextManager.The
ContextManager contains both the Connector, which defines the port to listen
on, and the Context entries at the same level.  How do I associate
particular contexts with particular Connectors?  Right now I seem only able
to have one servlet context that maps to "/".  I really should be able to
have two servlets that map to "/", one "/" for port 8080 and one "/" for
port 8081.

I also want the default servlet mappings turned off so that I am no longer
able to access the servlets as "/webapp_name/" when tomcat starts and finds
a war file named "webapp_name".  I only want Tomcat to serve the servlets
that I setup explicitly in server.xml.

One way of achieving this in an apache world would be:

NameVirtualHost 10.0.0.1:8080
NameVirtualHost 10.0.0.1:8081


ServerName port8080.domain.com
DocumentRoot /home/httpd/port8080




ServerName port8081.domain.com
DocumentRoot /home/httpd/port8081




That gives me a different document root for each port.  What I want from
Tomcat is a different servlet to handle requests on each port.

-Bill

> -Original Message-
> From: Alex Fernández [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 02, 2001 4:07 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Assigning Servlets to different ports.
>
>
> Hi William!
>
> Configure two contexts, and load each servlet in one context.
>
> Un saludo,
>
> Alex.
>
> William Wishon wrote:
>
> > Hi,
> >
> > I am trying to assign one of my servlets (say servlet1)
> to port 8080 and
> > another one (say servlet2) to port 8081.  I want them totally
> separate so
> > that I can't access servlet2 on port 8080 nor servlet1 on 8081.
>  Can anyone
> > help me figure out how to do this?
> >
> > -Bill
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


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




RE: Relative Pathing and SSL

2001-03-02 Thread Stefán F. Stefánsson

I don't know if this works with isapi also but try to set the parameter
"secure" with the value "true" in your connector tag in server.xml.
What version of tomcat are you using?

Regards, Stefan.

-Original Message-
From: Nibler Jeff R. (PDX1JRN) [mailto:[EMAIL PROTECTED]]
Sent: 2. mars 2001 22:30
To: [EMAIL PROTECTED]
Subject: Relative Pathing and SSL


Hello all, I'm having an interesting problem persisting an SSL
connection
with my Java servlets.  I am using Windows NT/IIS with Tomcat acting
only as
the servlet container (with the isapi_redirect.dll).  Everything works
fine
except when I need to re-direct a user from the servlet back to any
other
page.  When that happens, for some reason it sets the url to http
instead of
https and then adds a colon with port 443 following the url (which is
obviously the port that it should be on, only automatically using the
https
prefix).  

Example:
Should be: https://www.myserver.com/Test.htm
Instead it gives: http:www.myserver.com:443/Test.htm

I have no idea why this is happening.  I can't find any methods for the
HttpServletResponse object that allows me to set the communication
protocol
etc etc.  Here is the line of code that I'm using:
response.sendRedirect("../../Test.htm");
Notice I am using a relative path.  If I use this instead.
response.sendRedirect("https://www.myserver.com/Test.htm");
then it works.  I hate to hard code the url like that though because I
have
a development server and a production server.  I'm at a loss.  Anyone?

Jeff

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


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




Re: where in tomcat4b1 the general classes?

2001-03-02 Thread Carlos de la Flor

there is not other method?
if i put a new class (once a new jar) i must restart the tomcat.
thanks
Carlos

- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 9:25 PM
Subject: Re: where in tomcat4b1 the general classes?


> Carlos de la Flor wrote:
>
> > my all virtual domains are in /home/users
> > the tomcat home is in /opt/tomcat
> > in the tomcat 3.2.1 in the TOMCAT_HOME i have a directory (its name is
> > classes) and i put in this directory the all classes (*.class files) for
my
> > all virtual domains
> > i try to make this in tomcat 4b1 and the classes (*.class) aren't found.
> > isn't this method posible with the tomcat 4b1?
> > how can i put in one only place the classes (*.class files) for reading
from
> > any virtual domain?
> > thanks
> > Carlos
> >
>
> Put them in a JAR file underneath the "lib" directory.
>
> >
> > Please i need a answer, i have a great problem with this.
> > thanks
> > Carlos
> >
>
> Craig McClanahan
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>


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




Beans

2001-03-02 Thread Brett W. McCoy

Why does the creation of a Bean fail when I do this:



But when I do this:



it builds fine?  The bean is in the CLASSPATH (not under WEB-INF), and the
fully qualified package is imported at the top of the JSP file.  All of
the other classes used in the JSP file are found, but not the Bean.  Is
Tomcat using it's own class loader that isn't using the classpath?

-- Brett
 http://www.chapelperilous.net/~bmccoy/
---
Happiness is a positive cash flow.


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




tomcat with Apache

2001-03-02 Thread Wang, Yuhui
Title: tomcat with Apache





Hello, 


I try to make tomcat working with Apache webserver on a Red Had 6.0 machine.  When I try to restart Apache after the tomcat, it complains about the mod_jk.so file I downloaded from the website.  Error message is as

API module structure `jk_module` in file /etc/httpd/libexec/mod_jk.so is garbled - perhaps this is not an Apache moduel DSO?

I tried to download the mod_jk.so file several times.  Same thing happens everytime.



Yuhui Wang 
Software Analyst 
[EMAIL PROTECTED] 





Connection pooling with PostgreSQL

2001-03-02 Thread Aaron Brashears

After reading and responding to a recent post about postgres, it
dawned on me that postgresql should the support jdbc2.0 calling
mechanisms which include connection pooling. In an effort to find out
how to set it up, and use it with Tomcat 4.0b1, I downloaded the
source code to the jdbc2 driver for postgresql 7.0.3.

I searched through the souce code, but only found references to pooled
connections in the XA classes and not a javax.sql.PooledConnection
implementation. This leads to a few questions:

* Has anyone used pooled connections with postgresql 7? How did you call it?

* Has anyone set up postgresql to work in harmony with tomcat through
jndi? How did you accomplish it?

Thanks.





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




RE: PostgreSQL

2001-03-02 Thread McDermid, Ian

I have used Postgresql with the default admin program without any problems

Ian

-Original Message-
From:   mikhail malamud [SMTP:[EMAIL PROTECTED]]
Sent:   Saturday, March 03, 2001 2:02 AM
To: [EMAIL PROTECTED]
Subject:PostgreSQL

I am compiling PostgreSQL 7.0.3 to be used with the Tomcat 3.2.1 web
application. Does anyone have any success stories or nightmares
about
postgresql and java connectivity. What drivers did you use and why?
Please share.

Thanks,


-mikhail



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

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




RE: Client Certificate Authentication

2001-03-02 Thread Stefán F. Stefánsson

It's not in web.xml.  You have to edit your  tag in
'server.xml'.  Do you have one way authentication working (having the
server authenticate himself for a client browser connecting in)?  If you
have you should have a  tag that looks a little like this:







what you need to do is add the  inside that connector tag.  This should make Tomcat request a
certificate from clients connecting.

note.  This option only works in Tomcat 3.2 and later.

How (and if) you can protect specific webapps with this kind of (two-way
authentication) ssl and have other webapps open on regular SSL (or even
just regular HTTP) is another matter and I'm afraid I can't help you
with that.  Well one thing you could do of course is have two (or three)
instances of tomcat running.  One with two-way authentication, one with
regular SSL and one with regular http.  Then you could set the webapps
in each one according to your needs... but now I'm babbling on and I
don't even know if this is at all what you need...

Regards, Stefan.

-Original Message-
From: Cory Hubert [mailto:[EMAIL PROTECTED]]
Sent: 2. mars 2001 19:32
To: [EMAIL PROTECTED]
Subject: Client Certificate Authentication


Anyone know how to configure your web.xml to accept
Client-Certificates.

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


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




Relative Pathing and SSL

2001-03-02 Thread Nibler Jeff R. (PDX1JRN)

Hello all, I'm having an interesting problem persisting an SSL connection
with my Java servlets.  I am using Windows NT/IIS with Tomcat acting only as
the servlet container (with the isapi_redirect.dll).  Everything works fine
except when I need to re-direct a user from the servlet back to any other
page.  When that happens, for some reason it sets the url to http instead of
https and then adds a colon with port 443 following the url (which is
obviously the port that it should be on, only automatically using the https
prefix).  

Example:
Should be: https://www.myserver.com/Test.htm
Instead it gives: http:www.myserver.com:443/Test.htm

I have no idea why this is happening.  I can't find any methods for the
HttpServletResponse object that allows me to set the communication protocol
etc etc.  Here is the line of code that I'm using:
response.sendRedirect("../../Test.htm");
Notice I am using a relative path.  If I use this instead.
response.sendRedirect("https://www.myserver.com/Test.htm");
then it works.  I hate to hard code the url like that though because I have
a development server and a production server.  I'm at a loss.  Anyone?

Jeff

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




Re: Form based auth

2001-03-02 Thread Mike Slinn

Message-ID: <[EMAIL PROTECTED]>

I read in org.apache.tomcat.request.JDBCRealm.java that the proper URI
should be "/j_security_check", and that if the preceeding "/" is not
present, or if another path is prepended, the path is normalized to
"/j_security_check".

If this URI is recognized, and the path requires security handling,
JDBCRealm.java then prepares a SQL statement to query the database, using
the information specified in the JDBC  in server.xml.

Now, if only I could get it to trigger...

Mike


"McCay, Larry" wrote:

> vVolf,
>
> I have observed the same behavior on 3.1 and 3.2.1.
>
> I am going to dig in a little deeper to see what security functionality is
> supported at all.
>

Form based security was not supported in Tomcat 3.1, but is supported in 3.2
and 4.0.

Note that you do ***not*** provide a "j_security_check" class.  That URI is
handled by Tomcat.  The only thing your webapp includes related to security
is
a form login page and a form error page.

See the "examples" application included with Tomcat.  It uses form-based
security to protect the following URL:

http://localhost:8080/examples/jsp/security/protected

>
> thanks,
>
> -larry
>

Craig McClanahan


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




RE: ADMIN: Anybody out there?

2001-03-02 Thread Nael Mohammad

it works

-Original Message-
From: Caprio, Mike [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 8:21 AM
To: '[EMAIL PROTECTED]'
Subject: ADMIN: Anybody out there?




Hi,

I'd really like to unsubscribe from the tomcat-user list now.

The mailing list manager is ignoring me, I'm not even getting
a "confirm by replying to this message" message.  I've mailed
the owner address and gotten no replies... could somebody please
either fix the mailing list manager or take me off the list 
manually?  Pretty please?


Mike Caprio
Software Engineer   Microwave Radio Corporation
[EMAIL PROTECTED]101 Billerica Avenue, Building 6
978-671-5770North Billerica, MA  01862-1256

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

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




Re: Reading a file from a Context

2001-03-02 Thread Milt Epstein

On Fri, 2 Mar 2001, Kevin Sangeelee wrote:

> On Thu, 1 Mar 2001, Brett G. Palmer wrote:
> 
> > What is the best way to read a file from a Context in Tomcat?  I know I can
> > get the context path from the "getContextPath()" method, but most file
> > stream APIs require a full path.  There most be a clean way to accomplish
> > this without hard coding any directory path info.
> 
> I've used the following in the past, where s is a ServletConfig object
> 
>   ServletContext sc = s.getServletContext();
>   String fullPath = sc.getRealPath("") + "WEB-INF/myfiles/xyz.dat"

Wouldn't getResource() (or getResourceAsStream()) be the way to go
with this?

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


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




Re: Reading a file from a Context

2001-03-02 Thread Mike Slinn

Easy.. you were close to the magic incantation:

s.getServletContext().getRealPath("/WEB-INF/myfiles/xyz.dat");

Mike


Message-ID: <[EMAIL PROTECTED]>

On Thu, 1 Mar 2001, Brett G. Palmer wrote:

> What is the best way to read a file from a Context in Tomcat?  I know I
can
> get the context path from the "getContextPath()" method, but most file
> stream APIs require a full path.  There most be a clean way to accomplish
> this without hard coding any directory path info.

I've used the following in the past, where s is a ServletConfig object

ServletContext sc = s.getServletContext();
String fullPath = sc.getRealPath("") + "WEB-INF/myfiles/xyz.dat"

Kevin Sangeelee
Software Developer
Corpfin Ltd


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




Re: Realm classes and ClassLoaders

2001-03-02 Thread Fernando Padilla

On Fri, 2 Mar 2001, Craig R. McClanahan wrote:

> Fernando Padilla wrote:
> >
> > Again, I'm trying to bridge the gap between the classloader used by the
> > server and the classloader used by the web app.  So that I can cast/use an
> > object from one classloader from the other classloader
> >
> > Ideas?? Help?? Clue?? Rants?? Raves??
> >
> 
> In that case, you're not going to be able to do this cast.  The classes placed
> in $TOMCAT_HOME/server are loaded by a class loader that is not visible to web
> applications (i.e. it is not a parent class loader to the one used for your
> web app).
> 
> If you have additional information from the MyUserPrincipal class that your
> application needs to see, I suggest that you store them as request attributes
> or session attributes inside the authenticator.  This will work for anything
> that is a String or a Java primitive type (wrapped in the corresponding
> wrapper class such as java.lang.Integer for an "int").
> 


1) i hear people say, to add jar file to $TOMCAT_HOME/lib, I tried that
and that did not work, so i added them to $TOMCAT_HOME/server and that did
work.

2) request or session attributes inside the authenticator??
   I'm using MyRealm, the interface to that is just
   authenticate( String user, String pass ), how can I access the request
   or session that is being authenticated??


thank you :):):)

fern



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




Re: Assigning Servlets to different ports.

2001-03-02 Thread Alex Fernández

Hi William!

Configure two contexts, and load each servlet in one context.

Un saludo,

Alex.

William Wishon wrote:

> Hi,
>
> I am trying to assign one of my servlets (say servlet1) to port 8080 and
> another one (say servlet2) to port 8081.  I want them totally separate so
> that I can't access servlet2 on port 8080 nor servlet1 on 8081.  Can anyone
> help me figure out how to do this?
>
> -Bill
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


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




Re: Assigning Servlets to different ports.

2001-03-02 Thread Alex Fernández

Hi William!

Configure two contexts, and load each servlet in one context.

Un saludo,

Alex.

William Wishon wrote:

> Hi,
>
> I am trying to assign one of my servlets (say servlet1) to port 8080 and
> another one (say servlet2) to port 8081.  I want them totally separate so
> that I can't access servlet2 on port 8080 nor servlet1 on 8081.  Can anyone
> help me figure out how to do this?
>
> -Bill
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


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




RE: Tomcat's class loader

2001-03-02 Thread Randy Layman


It is the expected behavior because the class loader for
TOMCAT_HOME/lib can't know which context you are trying to load from.  You
really need to put your utility class into each webapp's class path
(WEB-INF\classes or WEB-INF\lib) if you want it to access the classpath for
a particular webapp.

Randy

-Original Message-
From: Shinta Tjio [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 2:03 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat's class loader 


Hi, all, 
I have a servlet, ServletFoo, that calls a utility 
class that lives in a jar file under $TOMCAT_HOME/lib. 
This utility class calls the ResourceBundle.getBundle() 
on a resource bundle that lives in the servlet's home 
(i.e: $TOMCAT_HOME/webapps/SomeContext/WEB-INF/). 
What I found out was that ServletFoo was loaded by 
Tomcat's AdaptiveClassLoader. The utility class 
was loaded by the system's default class loader. 
And of course, that utility class called 
ResourceBundle.getBundle() it couldn't find the 
resouce file because it lived in the servlet's 
home and the system's default class loader doesn't 
have CLASSPATH pointing to that directory. 
I have been able to fix this by passing the servlet's 
class loader to the utility class, so that it passes 
it to the ResourceBundle.getBundle(). 
My question is, is this the expected behavior of 
Tomcat's class loader? Or is this a bug? 
thanks, 
shinta 

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




Re: memory and/or ms problem

2001-03-02 Thread Match Grun

So what is the tip from Randy?

I also have a possible suggestion, which may be of help:

If you are using JDBC, you should always ensure that you close the
connection to the database. Database connections typically consume
a lot of resource (Oracle uses a process per connection, I am not
sure about MySql or Postgres). Maybe it is the database connection
which is stealing all the memory? Your logic should look like:

try {
  // Get connection
  // Create statement
  // Execute statement
}
catch( Exceptions here ) {
  // Process exceptions
}
finally {
  // Release the connection
}

Also, I make use of a connection pool to share database connections
among multiple modules within the application.

Match.

Gerd Trautner wrote:
> 
> hi randy, thanks for your tips!
> 
> i think i found the reason for the growing memory consumption of my
> servlets.
> 
> preconditions:
> i use servlets to get data out and in a mysql database and generate
> html pages with PrintWriter.print(...) statements.
> my servlets often use:
> ...
> Statement Stmt = C.createStatement();
> ResultSet RS = Stmt.executeQuery("SELECT ..,..,.. from ..");
> while (RS.next())
> {
>//do something with data
>out.println();
> }
> ...
> 
> on each request an instance of a servlet is created and the servlet
> starts reading data out of the database and writes it in the
> PrintWriter stream.
> But what happens if the PrintWriter has no target (because the user
> sends another request or more then one other requests)? I am not sure,
> but it seems that the servlet tries to write to the PrintWriter stream
> and has no success. the result is a growing amount of instances of a
> servlet which try to write to a PrintWriter and have no success. and
> it seems they keep try writing (and consuming memory) a long time ...
> 
> my solution is to check the error state of a Printwriter before
> writing in it. so the code from above looks like this:
> ...
> Statement Stmt = C.createStatement();
> ResultSet RS = Stmt.executeQuery("SELECT ..,..,.. from ..");
> while (RS.next())
> {
>if (out.checkError()) break;
>//do something with data
>out.println();
> }
> ...
> 
> for my application it seems to work, but i think there must be a better
> way,
> (why does the write statement throws an exception and the print
> statement not?)
> any ideas?
> 
> Gerd
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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




java.lang.arrayIndexOutOfBoundsException

2001-03-02 Thread Bryan Murtha


Does anyone have any insight on how to correct the following
error that is being generated everytime I try to send a request to Tomcat.
It's running as a standalone server on :8080 on Redhat 7.
ContextManager: error reading request, Ignored -
java.lang.arrayIndexOutOfBoundsException
thanks,
Bryan

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


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




RE: Help with welcome-file

2001-03-02 Thread Thierry Leveque

Thanks for the help, but it does not work. If I did not put the / in the
context path, I'm unable my jsp in my /app directory. The context is not
good.

> -Original Message-
> From: Darrell Porter [mailto:[EMAIL PROTECTED]]
> Sent: 2 mars, 2001 12:25
> To: '[EMAIL PROTECTED]'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: Help with welcome-file
> 
> 
> Try making the following change:
> 
>crossContext="false" debug="0" reloadable="true"/>
> 
> Note the removal of the '/' before 'app' in the context path.
> 
> Hope this helps.
> 
> _
> Darrell Porter
> Operations Manager
> 415.355.9990 x290
> [EMAIL PROTECTED]
> 
> WiseConnect, Inc. 
> "Powering the people behind stores"
> 
> Visit our GlobalShop booth #4473 in i3
> 
> Go wireless with the WiseConnect Workspace & Palm!
> Enter to win a Palm VII by selecting:
> Enter to Win! 
> 
> 
> -Original Message-
> From: Thierry Leveque [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 02, 2001 6:38 AM
> To: '[EMAIL PROTECTED]'
> Subject: Help with welcome-file
> 
> 
> Hi
> 
> We have a working application under Tomcat 3.2.
> To call our main jsp, we have to call the full URL:
> www.abcd.com/app/index.jsp
> 
> If we try:
> www.abcd.com/app
> 
> We've got an error from Tomcat:
>   2001-03-02 09:31:03 - Ctx(  ): 404 R(  + 
> //app/index.jsp + null) JSP
> file not found
> What is this double / ?? Where does it come from??
> 
> I think my web.xml file is ok:
> 
>   
>   
>   index.jsp
>   
>   
>   index.html
>   
>   
>   index.htm
>   
>   
> 
> web.xml IS in my WEB-INF directory.
> 
> And my context too (in server.xml):
>crossContext="false" debug="0" reloadable="true"/>
> 
> What is wrong?
> 
> And if I delete my file index.jsp from my directory, and try the URL
> www.abcd.com/app, Tomcat return me the list of the file in my docBase
> context directory as it shouldWeird!
> 
> Tomcat 3.2 under Solaris 7 on a Sun 450.
> 
> Thierry Leveque
> Wysdom Inc.
> cell: 514-575-6466
> tel: 514-395-6060 poste 138
> fax: 514-395-6080
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

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




Tomcat on Linux

2001-03-02 Thread Wang, Yuhui



Hello,
 
I have problem running tomcat on Linux, Red Hat 
6.0.  When I try to start the tomcat using the script, there is a Java 
exception of Can't open config file: 
/home/tomcat/conf/server.xml due to: 
java.io.UnsupportedEncodingException: UTF8
 
I'm using tomcat 
3.2.1
 
Can someone help me 
with this.
 
Yuhui Wang Software Analyst [EMAIL PROTECTED] 
 


Re: users, roles and tomcat-users.xml

2001-03-02 Thread Craig R. McClanahan

Dirk Brockmann wrote:

> Hi,
> I am running tomcat 3.2.1. I have
> developed a simple
> test webapp and now I wish to make it
> secure via form
> based authentication.
> I have made use of the security concepts
> that
> come with tomcat as in the examples
> webapp
> and have played with the
> tomcat-users.xml
> and the web.xml belonging to my webapp.
> Now I have run into the following
> problem.
> What if I have many different webapps,
> each with
> an individual set of users, roles, etc.
> As I understand it (I'm fairly new to
> servlets, tomcat, etc)
> then the information in tomcat-users.xml
> is global.
> How do I administer users, roles etc for
> single web-applications?
> Can anyone help me. There must be API
> for this sort
> of thing and I do not want to reinvent
> the wheel.
> I would appreciate very much any help of
> suggestions, so
> far I wasn't able to find anything
> appropriate and
> I am also not sure if I understand the
> security concepts correctly.
> Thanks very much in advance,
> Dirk
>

In Tomcat 3.2, the tomcat-users.xml file is indeed global.  To administer
users for each web app, you need 4.0.

Craig



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




Re: Basic Authentication w/ Tomcat 3.1

2001-03-02 Thread Craig R. McClanahan

[EMAIL PROTECTED] wrote:

> It works fine with Tomcat 3.2, but it should run on Tomcat 3.1 ... don't ask
> me why, I have no idea :-)

This is one of the many bugs in Tomcat 3.1.  If you want to use container managed
security, you need to use 3.2 or later.

>
> Any ideas what is wrong?
> Thanks in advance.
>
> Regards,
> Juergen
>

Craig McClanahan



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




Re: Logout & form-based authentication

2001-03-02 Thread Craig R. McClanahan

Valeriy Molyakov wrote:

> Hi !
>
> I use form-based authentication.
>
> Can I logout without close browser?
>  Best regards,
> Valera M.
> mailto:[EMAIL PROTECTED]

Yes ... just invalidate the current session.

Craig McClanahan



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




Re: Session beans and multiple tomcat servers ?

2001-03-02 Thread Craig R. McClanahan

David Peterson wrote:

> Hi Everybody,
>
> I have a question about the architecture of tomcat and the sharing of
> beans (typically accessed by JSP page code) with a scope of "session".
>
> It seems to me that one major problem with JSP and session-scoped beans
> on tomcat (and possibly other servlet engines ? i'm not trying to bag
> tomcat specifically here !) is that I am restricted to a hardware
> architecture of a *single webserver* running tomcat.
>

Tomcat stand-alone does not support load balancing as you are describing
it.  However, if you declare your web application to be  in
the web.xml file, and your servlet container supports it (which Tomcat does
not), you can indeed have a load balanced environment.  However, there are
two key issues:

* Your application must ensure that all servlet attributes that you
  store implement java.io.Serializable so that the container can
  move your session to a different machine if it wants to.

* Your container must obey the requirement in the servlet spec that,
  at any given point in time, all requests for the same session are being
  handled by the same JVM.  In other words, containers that support
  session migration can only do so "between" requests.

>
> If I wish to run a 'load-balanced' (dns round robin most likely) server
> configuration with multiple instances of tomcat sitting behind the same
> URL, is there any known way in which to share session-scope java beans
> created by one tomcat server across the other servers ?
>

Not with Tomcat standalone.

Apache JServ (and Tomcat running behind Apache) solve this as follows:

* Requests that are not part of a session can be forwarded
  to any available container instance.

* Once a session is established, all future requests for that
  session will come back to the *same* container instance.

This is accomplished by modifying the session identifier to include a
reference to the originating host, which will therefore be included on
subsequent requests.

>
> The only way I can see to solve this problem is to push all session
> information to a backend database accessible by all the webservers, and
> to look up the session information from the database *each* time the
> user moves from page to page (and potentially across tomcat servers).
> This seems kludgy, and the database access requirements defeat both the
> simplicity of the session-bean approach, and add overhead to the very
> scalability and performance that you're trying to achieve by using
> multiple servers.
>

That's the other way to do it.

>
> Any guidance or relevent experiences much appreciated ...
>
> Thanks in advance.
>
> David Peterson
>

Craig McClanahan



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




Re: getPathInfo() returns null

2001-03-02 Thread Craig R. McClanahan

Vladimir Grishchenko wrote:

> Hi,
>
> I'm new to Tomcat and servlets and need some help.
> Would somebody clarify  why getPathInfo() returns null when a servlet accessed via:
>
> http://server/context/servletalias/pathinfo
>
> and it returns "pathinfo" when the same servlet accesses via:
>

It actually returns "/pathinfo", right?

>
> http://server/context/servlet/servletalias/pathinfo
>
> Both invocatoin options seem to work (except the Pathinfo part), which is the 
>"correct"
> way to call servlets? What is the difference?
>

What version of Tomcat does this?  You are correct -- you should be able to retrieve 
the
path info in either case.

>
> Thanx,
> Vlad.
>

Craig McClanahan



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




Re: PostgreSQL

2001-03-02 Thread Aaron Brashears

I've had a great experience in general using postgresql 7. The jdbc
driver that comes with it can be compiled for either jdbc1 or jdbc2
depending on your needs. I've never had an issue with the driver, but
I haven't tried using the javax.sql interfaces yet.

The only thing you should be aware of is that postgresql.jar needs to
be in your classpath when starting tomcat.


On Fri, Mar 02, 2001 at 11:02:02AM -0500, mikhail malamud wrote:
> I am compiling PostgreSQL 7.0.3 to be used with the Tomcat 3.2.1 web
> application. Does anyone have any success stories or nightmares about
> postgresql and java connectivity. What drivers did you use and why?
> Please share.

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




Re: Realm classes and ClassLoaders

2001-03-02 Thread Craig R. McClanahan

Fernando Padilla wrote:

> I have a MyRealm class to lock down my webapp.
>
> That works fine.  I have the jar file with the classes in
> $TOMCAT_HOME/server  and within $WEB_APP/WEB_INF/lib.
>
> The Web App needs to gain access to the username/password given to the
> Realm ( right now I store it in the MyPrincipal class ), to be able to
> login into a backend tier.
>
> I try to cast the Principal ( from getUserPrincipal ), to MyPrincipal, but
> it there is a ClassCastException ( though it is indeed the right class,
> it's from a different class loader.. etc )
>

Different class loader would not matter if it's a parent of the webapp class
loader, but (as we will see) that is not the case.

>
> Again, I'm trying to bridge the gap between the classloader used by the
> server and the classloader used by the web app.  So that I can cast/use an
> object from one classloader from the other classloader
>
> Ideas?? Help?? Clue?? Rants?? Raves??
>

In that case, you're not going to be able to do this cast.  The classes placed
in $TOMCAT_HOME/server are loaded by a class loader that is not visible to web
applications (i.e. it is not a parent class loader to the one used for your
web app).

If you have additional information from the MyUserPrincipal class that your
application needs to see, I suggest that you store them as request attributes
or session attributes inside the authenticator.  This will work for anything
that is a String or a Java primitive type (wrapped in the corresponding
wrapper class such as java.lang.Integer for an "int").

>
> just toss 'em out
>
> fern
>

Craig McClanahan



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




Re: where in tomcat4b1 the general classes?

2001-03-02 Thread Craig R. McClanahan

Carlos de la Flor wrote:

> my all virtual domains are in /home/users
> the tomcat home is in /opt/tomcat
> in the tomcat 3.2.1 in the TOMCAT_HOME i have a directory (its name is
> classes) and i put in this directory the all classes (*.class files) for my
> all virtual domains
> i try to make this in tomcat 4b1 and the classes (*.class) aren't found.
> isn't this method posible with the tomcat 4b1?
> how can i put in one only place the classes (*.class files) for reading from
> any virtual domain?
> thanks
> Carlos
>

Put them in a JAR file underneath the "lib" directory.

>
> Please i need a answer, i have a great problem with this.
> thanks
> Carlos
>

Craig McClanahan



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




Re: Multiple Concurrent Servlet Initialization

2001-03-02 Thread Craig R. McClanahan

Arne Handt wrote:

> Hello All,
>
> I know that this topic has been discussed about two months ago but I wasn't
> able to find a hint helping me to solve my problem in the archive, so I
> touch it again.
> My problem: I have a multithreaded using W3C's Jigsaw HTTP Stack to access
> my servlet (on Jakarta Tomcat v3.1) with multiple requests concurrently,
> using the same URL (with a gap of about 20 ms between sending the requests).
> This is, of course, no problem, when the servlet is already initialized, but
> it leads to multiple servlet instantiation and initialization, if the
> servlet has not been initialized before.
> Is this a Tomcat bug or can it be switched off ? Can anyone help me ? Please
> tell me if you need more information in order to help.
> Thanks for your effort.
>

It's a bug in Tomcat 3.1, fixed in 3.2.

>
> Best regards,
> Arne
>

Craig McClanahan



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




ADMIN: Anybody out there?

2001-03-02 Thread Caprio, Mike



Hi,

I'd really like to unsubscribe from the tomcat-user list now.

The mailing list manager is ignoring me, I'm not even getting
a "confirm by replying to this message" message.  I've mailed
the owner address and gotten no replies... could somebody please
either fix the mailing list manager or take me off the list 
manually?  Pretty please?


Mike Caprio
Software Engineer   Microwave Radio Corporation
[EMAIL PROTECTED]101 Billerica Avenue, Building 6
978-671-5770North Billerica, MA  01862-1256

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




tomcat on netware documentation

2001-03-02 Thread Andrea Caltroni

Is there any document about installing Tomcat on Netware?

Thank you all!

PS I'm sorry for posting this message on the tomcat developer mailing
list. It was an accident!

andrea
-- 
   _
__/ \
 |
  Andrea Caltroni  R&D Software Engineer |
  aeonware  Inc. |
   the leader in e-business automation®  |
  colony park, 290 south main street,  suite 300 |
  alpharetta, GA 30004 USA   |
  Tel. +1(678)624-9794, Fax. +1(678)624-9795 |
  email: [EMAIL PROTECTED], www.aeonware.com |

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




Re: /servlet

2001-03-02 Thread Craig R. McClanahan

Srinivas Kurella wrote:

>
>
> Josh,
> I am not sure if i understand your problem completely , but you DONOT
> necessarily have to follow the webapp dir structure.
>
> This is what i do to make the /servlet work(porting from jrun to
> tomcat with minimum effort :)):
> 1. create a WEB-INF directory under your app directory and add the
> web.xml file to it.
> 2. add a context "" in the server.xml file with the docBase as your
> apps' root dir.
> 3. Add all the jars/classes explicitly to the CLASSPATH variable
> before running tomcat.sh to start tomcat.
>
> This shd work.
>

Until you switch to a servlet container that ignores the CLASSPATH
variable.

If you want your application to be portable, you really really really
should do what the specification requires.

>
> Srini

Craig McClanahan



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




Re: Calling within and across webapp contexts

2001-03-02 Thread Craig R. McClanahan

Rick Herrick wrote:

> I asked the question earlier and never received a response, so I'll try again!
>
> We have a JSP app that's currently running in JRun 2.3.3 (JSP 1.0
> compliant).  When we refer to different directories within the app, we
> always preface with the "context" name, or really the top-level virtual
> directory.  So if you want a common file, you do this:
>
> 
>
> The problem is that, testing under Tomcat, this doesn't work.  It tries to
> prepend the context name onto the path, so that this becomes
> /CpsAdmin/CpsAdmin/Common/loginForm.jsp.
>
> My questions are:
>
> * Is this part of the JSP 1.1 spec?  It flies in the face of conventional
> usage of path names across the board, i.e. anything that starts with '/'
> means you go to the top-level of the server hierarchy.  What's the rationale?
>

Yes.  It was also true for JSP 1.0, so it looks like JRun implemented this wrong
if it behaves the way you describe.

The path you give to  or  is supposed to be the
context-relative path of the file you want to forward to or include.  So, for your
case above, it should be:




> * Is there anyway to change this and make Tomcat do the "right" thing, i.e.
> see '/' as the server root?
>

Nope ... Tomcat is already doing the "right" thing by the specs.  To see for
yourself:

http://java.sun.com/products/jsp/download.html

>
> * Does this also mean that you can't call across contexts?  That is, we
> produce our tools as separate items, since customers may install some
> pieces and not others.  But if two tools are installed, they can work
> together and then would need to call across contexts.  I can think of no
> good reason why this shouldn't be permitted, but based on this behavior, it
> does look as if it would.
>

That is a correct inference.  You cannot do a  or 
across web applications.

The rationale behind all of this is:
* Web apps are supposed to be independent
* Your system administrator should be able to deploy your
  web app on any context path, and it should still work

>
> Thanks in advance for any feedback!  Getting this worked out will help save
> me a TON of time porting over our apps!
>
> Rick Herrick, AKA [EMAIL PROTECTED]
> In zero gravity, nothing is amusing.
> PGP: http://www.rickherrick.com/pgpkey
>

Craig McClanahan



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




Re: SingleThread

2001-03-02 Thread Craig R. McClanahan

James MailingList wrote:

> If a Servlet implements SinglThreadModel interface then how does the Tomcat v3.2.1
> handle it ?
> a. Creates multiple threads as and when the request comes and kicks off the
> multiple instances of the servlet.  If YES, then can we configure how the Min/Max
> threads to be created ?
> b. Creates a single thread and serves one request at a time while putting others
> in a queue ?
> c. Or does it handle in some other way ?
>

(c).  It doesn't create another thread, but it does a synchronized call to the
service() method of the one and only servlet instance.

IMHO using SingleThreadModel is a very bad idea, because it leads you to believe that
you do not have to worry about any threading issues, but that is not true.

>
> Yours Servlet Friendly,
> Walter G. Prabhakar.
>

Craig McClanahan



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




Re: Null session

2001-03-02 Thread Craig R. McClanahan

"Mead, David W." wrote:

> Since we upgraded to Tomcat 3.2 in December, we have been seeing an
> occational null session returned from req.getSession(false);
> We have seen this on slower systems < 300Mhz running Windows 95.  We have
> not seen it on our faster hardware which is running NT, so we're not sure if
> its related to the speed of the system or the OS.
>

It is entirely legal for req.getSession(false) to return null if the original
request is not part of a session.  Are you sure that it always is?

>
> Has anyone else seen this?  Know of any workarounds?
>
> Thanks,
>
> David Mead
>

Craig McClanahan



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




Re: Open-source compliant way of deploying Tomcat to customer sites

2001-03-02 Thread Craig R. McClanahan

"Hawkins, Keith (Keith)" wrote:

> Hello,
>
> We have a product which we sell to our customers for which we want to
> include Tomcat for the version of our product that runs under IIS.  (Our
> product is a servlet based application that is deployed on our customers'
> web servers.)
>
> What is the open-source compliant way we can ship Tomcat to our customers?
> I checked the FAQ, but didn't see anything regarding this.
>
> Please CC my email address  ([EMAIL PROTECTED]) on any replies since I
> don't want to miss a response in the 100+ other messages that arrive in the
> tomcat-user list each day.
>

Keith,

You are more than welcome to include Tomcat in your product, as long as you
obey the conditions of the license agreement.  See the file "LICENSE" in the
top-level directory of your Tomcat distribution.

Basically, it boils down to things like you cannot call your product Apache or
Tomcat, you have to leave the copyright notices alone, and you need to give
credit to Apache for the use of Tomcat in your documentation.  But see the
license for the precise details.

>
> Thanks in advance,
> Keith
>

Craig McClanahan



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




Re: log() ?

2001-03-02 Thread Craig R. McClanahan

"Brett W. McCoy" wrote:

> On Tue, 27 Feb 2001, Shahed Ali wrote:
>
> > Sorry for this stupid question,
> > but how do I use the log() method in servlets ?
> >
> > In JSP application.log() seems to work,
> > but in servlets, I tried getServletContext().log("adad") etc and
> > I keep getting NullPointerExceptions
>

99.9% of the time, this is caused by having a method like this in your servlet:

public void init(ServletConfig config) throws ServletException {
...
}

but forgetting to call super.init(config) inside.  The easiest way to avoid
this is to convert your servlet to the no-args version of init() instead.

Craig McClanahan



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




Re: 4.0b1 manager not working

2001-03-02 Thread Craig R. McClanahan

Michael Engelhart wrote:

> Hi,
>
> I'm having trouble getting the manager application to run on Mac OS X.  I'm under 
>the impression from reading the docs and searching the archive that all I have to do 
>is add a user with the manager role to tomcat-users.xml and then go to 
>http://localhost:8080/manager/
>
> and I'll be prompted for a username/password and then have access.
>
> Well, after downloading a fresh copy and making that single change to the 
>tomcat-users.xml file, when I go to type http://localhost:8080/manager context I get 
>this message:
>
>Cannot find message associated with key managerServlet.unknownCommand
>
> if i add the trailing slash to the manager context like 
>http://localhost:8080/manager/
>
> I just get a blank directory listing page.
>
> Am I missing something?  Tomcat 3.2.1 works fine on the same system.
>

The manager app does not have an HTML based user interface -- it accepts individual 
commands as part of the request uri.  For example, to cause a webapp at context path 
"/myapp" to be reloaded, you would request:

http://localhost:8080/manager/reload?path=/myapp

The details of what commands are accepted are in the Javadoc comments for the servlet 
class (org.apache.catalina.servlets.ManagerServlet).

Craig McClanahan



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




Client Certificate Authentication

2001-03-02 Thread Cory Hubert

Anyone know how to configure your web.xml to accept Client-Certificates.

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




Re: Form based auth

2001-03-02 Thread Craig R. McClanahan

"McCay, Larry" wrote:

> vVolf,
>
> I have observed the same behavior on 3.1 and 3.2.1.
>
> I am going to dig in a little deeper to see what security functionality is
> supported at all.
>

Form based security was not supported in Tomcat 3.1, but is supported in 3.2
and 4.0.

Note that you do ***not*** provide a "j_security_check" class.  That URI is
handled by Tomcat.  The only thing your webapp includes related to security is
a form login page and a form error page.

See the "examples" application included with Tomcat.  It uses form-based
security to protect the following URL:

http://localhost:8080/examples/jsp/security/protected


>
> thanks,
>
> -larry
>

Craig McClanahan



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




Re: More on JServ to Tomcat

2001-03-02 Thread Craig R. McClanahan

"Brett W. McCoy" wrote:

> On Tue, 27 Feb 2001, Duck-Jin Chun wrote:
>
> > I recently migrated from JServ to Tomcat as well.  The migration was
> > smooth, and I'm now working with the latest servlet spec... but I found
> > JServ to be more stable.
> >
> > Anyway... to answer your question, try putting the following in your
> > web.xml file:
> > 
> > CallClient
> >
> > com.company.clients.commpilot.servlets.CallClient > t-class>
> > 
> > 
> > CallClient
> > /CallClient
> > 
> >
> > In general, the "Java Servlet Specification" is a good reference for the
> > format of the web.xml file.
>
> Yep, I found what I needed in the JServ docs, actually.  Some of the
> terminology has changed between JServ and Tomcat.  I think a migration doc
> (and tools) would be very handy to have.
>


I am doing a session at ApacheCon next month in Santa Clara that highlights the
important issues of migrating from Apache JServ to Tomcat.


>
> -- Brett
>  http://www.chapelperilous.net/~bmccoy/
>

Craig



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




RE: Can tomcat do ASP in VBScript

2001-03-02 Thread Steve Toth

You say that you are using OpenBSD?  Which JVM are you using, I tried to
find one that was programmed for OpenBSD ( not using linux binaries ) where
is one?  Thanks

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




Re: webapp icons, disabling directory listings, and tags in web.xml

2001-03-02 Thread Craig R. McClanahan

Stefán F. Stefánsson wrote:

> Ok... thanks (regarding the ).
>
> The correct reaction from tomcat... hmmm... not sure I know what you
> mean here... are you talking in regards to the  or the welcome
> file list?
>
> I'll just answer it in two parts,
>
> 1) The icon should be displayed for example in the title bar when the
> webapp is active in some browser.  I've seen this somewhere on the
> javasoft site.  Then I got that cute little penguin/triangle thing with
> the hands and all...  I admit that this is not exactly on the top of my
> priority list but more done out of curiosity.
>

That happens because the page developer included  tags in the pages
themselves -- it has nothing to do with the  element in web.xml, which
is there for GUI based deployment tools (which Tomcat does not have).

>
> 2) With regards to the welcome files I want users to be able to go to
> the URL http://some.host.somewhere/ and not to the URL
> http://some.host.somewhere/servlet/com.decode.ips.webservice.controller.
> IPSControllerServlet.  I think the reason for why I want that is pretty
> obvious.

The 2.2 spec is not clear that this is supposed to work (although I agree
with you that it should).  If Tomcat 3.x does not do this, you could submit
a feature request to make it so.

The 2.3 spec will make it mandatory that servlet URIs can be used in
, and Tomcat 4.0 does this correctly.


>  The only way I can get that is to create an index.htm file
> that has this tag in the head section:
>   
>
> But I would much rather that the server handled that and I could skip
> the stupid index.htm file.  At all costs I do not want the user to get
> the directory listing!
>
> Thanks for your time,
> Stefan.
>

Craig



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




Re: webapp icons, disabling directory listings, and tags in web.xml

2001-03-02 Thread Craig R. McClanahan

Stefán F. Stefánsson wrote:

> ok.. so the icon should be working?
>

Are you expecting something to be done with your  element?  If so, you
should be aware that Tomcat basically ignores it completely.  What is it
that you expect Tomcat to do with it?

Craig



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




Re: webapp icons, disabling directory listings, and tags in web.xml

2001-03-02 Thread Craig R. McClanahan

Fernando Padilla wrote:

> OK. I apologize, i must have a 3.1.
>
> So how could we get this behavior with 4.x?
>

By "this behavior", do you mean turning off directory listings?  Go to the
"conf/web.xml" file, and look for the  element for the "default"
servlet.  You will see an initialization parameter named "listings".  Change
the value from "true" to "false".

>
> :) thanx
>
> fern
>

Craig McClanahan



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




Tomcat's class loader

2001-03-02 Thread Shinta Tjio
Title: Tomcat's class loader 





Hi, all,
I have a servlet, ServletFoo, that calls a utility
class that lives in a jar file under $TOMCAT_HOME/lib.
This utility class calls the ResourceBundle.getBundle() 
on a resource bundle that lives in the servlet's home 
(i.e: $TOMCAT_HOME/webapps/SomeContext/WEB-INF/).


What I found out was that ServletFoo was loaded by
Tomcat's AdaptiveClassLoader. The utility class
was loaded by the system's default class loader.
And of course, that utility class called 
ResourceBundle.getBundle() it couldn't find the
resouce file because it lived in the servlet's
home and the system's default class loader doesn't
have CLASSPATH pointing to that directory.


I have been able to fix this by passing the servlet's
class loader to the utility class, so that it passes
it to the ResourceBundle.getBundle().


My question is, is this the expected behavior of
Tomcat's class loader? Or is this a bug?


thanks,
shinta





AT&T Cable Modem Problem Resolved

2001-03-02 Thread Dave Parkin

2 days ago I asked y'all if tomcat could be causing a problem with AT&T
Cable Modem. 

I ended up throwing caution to the and listening to my internal voice.

First, I restored WinMe system to a point in time before problems began
(Nifty System Tool).

Modem connectivity began to show great promise after that, but Network
settings were not entirely correct.

Then, the Network configuration tweaking began. Bottom line rule, ignore
AT&T Phone Tech recommend (they're reading off the same sheet of paper that
they give to all of them). Here is what I recommend. 

Protect yourself - Two things: 1) Ask field tech to record your assigned IP
address, Sub-net IP Address, Host, Domain Name, Gateway, DNS Server Search
Order. 2) After they install and get things running, go to your Network
configuration and record what they did to get things to run (so you can
recover later, should the need arise without relying on the Corporate Line).

After my final tweaking, I deligently recorded Network settings.  They were
not what AT&T said they should be to work.  

I have not tried reinstalling and running tomcat again since - perhaps
tonight. One victory at a time!

The reason I'm documenting to tomcat mail site is this problem may have
occured after installing and starting tomcat, like it did to me. Modem
operation problem may not be related, but should it happen to you, you'll
greatly appreciate what I've docmented here vs. late night, against the
wall, head beatings accompanied by a Phone Tech telling you "everything
should work now" and rebooting 'til tomorrow).

Here we go:

Identification tab:

Host:  XNNN-X (whatever they documented your hostname to be)

Work group: @home

Computer Name:  (LEAVE BLANK)


Network tab:

NIC or USB Card Properties:

X TCP/IP (make sure it's mapped to TCP/IP)

TCP/IP Protocol Properties:

IP Address:

You can go 2 directions:

* Obtain automatically

Or the more radical

* Specify an IP address
(A "nice" Phone Service Tech will give you if you insist that that's
how field tech got it going.  A "not nice" Phone Service Tech will not give
you this info. - politely find an excuse to call again later - like "my wife
is calling me to dinner, gotta go, I'll tweak a little on my own and call
you back")


WINS Config:

* Disable


Gateway:

Installed gateways:

IP Address: NNN.NNN.NNN.NNN
Subnet Mask: 255.255.255.128
(Service Tech will give you IP Address if you insist that that's how
tech got it going, or "let's give it a try to see if that's the problem")


DNS Config:

* Enable DNS

Host: XNNN-XDomain: cityabbrN.ST.home.com

DNS Servier Search Order:

NNN.NNN.NNN.NNN
NNN.NNN.NNN.NNN 
(Service Tech will give you if you insist that that's how tech got
it going)


Bindings:

X Client for MS Networks (choose this option)

NetBIOS:




Restart your machine and enjoy the high speed world of a AT&T Cable Modem!

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




Re[3]: memory and/or ms problem

2001-03-02 Thread Gerd Trautner

hi randy, thanks for your tips!

i think i found the reason for the growing memory consumption of my
servlets.

preconditions:
i use servlets to get data out and in a mysql database and generate
html pages with PrintWriter.print(...) statements.
my servlets often use:
...
Statement Stmt = C.createStatement();
ResultSet RS = Stmt.executeQuery("SELECT ..,..,.. from ..");
while (RS.next())
{
   //do something with data
   out.println();
}
...

on each request an instance of a servlet is created and the servlet
starts reading data out of the database and writes it in the
PrintWriter stream.
But what happens if the PrintWriter has no target (because the user
sends another request or more then one other requests)? I am not sure,
but it seems that the servlet tries to write to the PrintWriter stream
and has no success. the result is a growing amount of instances of a
servlet which try to write to a PrintWriter and have no success. and
it seems they keep try writing (and consuming memory) a long time ...

my solution is to check the error state of a Printwriter before
writing in it. so the code from above looks like this:
...
Statement Stmt = C.createStatement();
ResultSet RS = Stmt.executeQuery("SELECT ..,..,.. from ..");
while (RS.next())
{
   if (out.checkError()) break;
   //do something with data
   out.println();
}
...

for my application it seems to work, but i think there must be a better
way,
(why does the write statement throws an exception and the print
statement not?)
any ideas?

Gerd

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




Sybase (ASA7.0.2) connection question

2001-03-02 Thread Wong, Connie

Hi,

I have trouble using the URL on Sybase. I hope someone can help me.

Configurations:

NT 
Sybase ASA7.0.2
Tomcat 3.1 
DriverName = "com.sybase.jdbc2.jdbc.SybDriver"

The following files are in my CLASSPATH:
  c:\Program Files\Sybase\SQL Anywhere 7\jConnect\classes
  c:\Program Files\Sybase\SQL Anywhere 7\java\jdbcdrv.zip
  c:\Program Files\Sybase\Shared\jConnect-5_2\classes\jconn2.jar


Scenarios:

Case 1. Set URL = "jdbc:sybase:Tds:localhost:2638"

 I got the IOException error:

java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException:
Connection refused: no further information at
com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:423) at
com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:2780) at
com.sybase.jdbc2.tds.Tds.login(Tds.java:338) at
com.sybase.jdbc2.jdbc.SybConnection.tryLogin(SybConnection.java:213) at
com.sybase.jdbc2.jdbc.SybConnection.regularConnect(SybConnection.java:190)
at com.sybase.jdbc2.jdbc.SybConnection.(SybConnection.java:169) at
com.sybase.jdbc2.jdbc.SybConnection.(SybConnection.java:122) at
com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:175) at
java.sql.DriverManager.getConnection(DriverManager.java:517) at
java.sql.DriverManager.getConnection(DriverManager.java:146) at
Benchmark_sybase.query(Benchmark_sybase.java:94) at
Benchmark_sybase.doGet(Benchmark_sybase.java:48) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160) at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
) at java.lang.Thread.run(Thread.java:484) 



Case 2: same URL (URL = "jdbc:sybase:Tds:localhost:2638"), I have to
connect the database from Sybase central in order for my program to run. 


Case 3: set URL = "jdbc:sybase:asademo"  -- I created my table in asademo
database.
   
   I got the following Exception.:

java.sql.SQLException: JZ0D5: Error loading protocol
com.sybase.jdbc2.asademo.asademo. at
com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:423) at
com.sybase.jdbc2.jdbc.ProtocolManager.getProtocol(ProtocolManager.java:102)
at com.sybase.jdbc2.jdbc.SybUrlManager.loadProtocol(SybUrlManager.java:191)
at com.sybase.jdbc2.jdbc.SybUrlManager.init(SybUrlManager.java:133) at
com.sybase.jdbc2.jdbc.SybUrlManager.getUrlProvider(SybUrlManager.java:110)
at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:167) at
java.sql.DriverManager.getConnection(DriverManager.java:517) at
java.sql.DriverManager.getConnection(DriverManager.java:146) at
Benchmark_sybase.query(Benchmark_sybase.java:99) at
Benchmark_sybase.doGet(Benchmark_sybase.java:53) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160) at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
) at java.lang.Thread.run(Thread.java:484) 
 
Thanks,
Connie





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




Re: JDBCRealm again

2001-03-02 Thread Christian Rauh

Chris Andreou wrote:
> 
> I am new tomcat user. Would you mind taking some time and write some
> quiedlines how to setup JDBCReal?

Check:

http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/JDBCRealm.howto

Christian

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




Re: users, roles and tomcat-users.xml

2001-03-02 Thread Christian Rauh

Dirk,

I am not 100% sure but I believe that in tomcat 3.2 authentication is
managed by the container on a global level and cannot be done separately
for each webapp.

Christian

Dirk Brockmann wrote:
> 
> Hi,
> I am running tomcat 3.2.1. I have
> developed a simple
> test webapp and now I wish to make it
> secure via form
> based authentication.
> I have made use of the security concepts
> that
> come with tomcat as in the examples
> webapp
> and have played with the
> tomcat-users.xml
> and the web.xml belonging to my webapp.
> Now I have run into the following
> problem.
> What if I have many different webapps,
> each with
> an individual set of users, roles, etc.
> As I understand it (I'm fairly new to
> servlets, tomcat, etc)
> then the information in tomcat-users.xml
> is global.
> How do I administer users, roles etc for
> single web-applications?
> Can anyone help me. There must be API
> for this sort
> of thing and I do not want to reinvent
> the wheel.
> I would appreciate very much any help of
> suggestions, so
> far I wasn't able to find anything
> appropriate and
> I am also not sure if I understand the
> security concepts correctly.
> Thanks very much in advance,
> Dirk
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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




Mail

2001-03-02 Thread Arafat Mohamed

I apologize if this is the wrong forum, but I really need a quick solution.

I have a jsp page with an error associated with it. How do I set it up so
that the error.jsp emails me with the error message?

Thanks in advance...


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




JDBC Realm not triggering

2001-03-02 Thread Mike Slinn

I feel like I sailed off the edge of the known universe, because there isn't
much documentation for form-based authentication using JDBC realms (at
least, none that I could find, beyond the short JDBCRealm.howto included in
the TomCat docs).

I am using Windows NT Server 4sp6 with JDK1.3 and Tomcat 3.2.1.

I made the following changes to server.xml:




The database tables exist, exactly as shown in , since
mySql is case-sensitive w.r.t. table names.

Here is a piece of my web.xml:

  

  developer
  /pwAdmin/*
  /pwModerator/*
  /pwNormal/*
  /pwPortal/*
  /pwTest/*
  get
  post



  developer



  NONE

  

  
FORM
JDBC

  /index.html
  /register.jsp

  

  
developer
  


Here is the authentication form:

   Login id: 
   Password: 
 



When I press the submit button, I get the following error:
HTTP 404 - File not found
The url reported is http://localhost:8080/j_security_check

Somehow the form action is not being picked up by the TomCat security
mechanism.  What have I missed?

A few more questions:
 - If I omit , does it default to NONE?
 - Is it possible to use * for  to specify that all HTTP
methods are to be subject to security?
 - I would like to use a numeric column in the database to store the user
authentication level, rather than a text string.  Can the JDBC realm be set
up to work this way?
 - I found very little documentation regarding form-based authentication
using JDBC realms. Can you point me to some more?

... thanks
Mike


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




Re: Reading a file from a Context

2001-03-02 Thread Kevin Sangeelee

On Thu, 1 Mar 2001, Brett G. Palmer wrote:

> What is the best way to read a file from a Context in Tomcat?  I know I can
> get the context path from the "getContextPath()" method, but most file
> stream APIs require a full path.  There most be a clean way to accomplish
> this without hard coding any directory path info.

I've used the following in the past, where s is a ServletConfig object

ServletContext sc = s.getServletContext();
String fullPath = sc.getRealPath("") + "WEB-INF/myfiles/xyz.dat"

Kevin Sangeelee
Software Developer
Corpfin Ltd



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




mod_jk.conf-auto

2001-03-02 Thread Bush, Craig R.

Hey guys,

Using Apache 1.3.19 and Tomcat 3.3m1

Anyone know why I tomcat wouldn't write mod_jk.conf-auto on its startup to
/TOMCAT_HOME/conf/jk ??

Can't get Apache to start cause I don't have any file to point the apache
Include statement to in httpd.conf.

Thanks,

craig

Craig R. Bush
Bioinformatics Software Engineer
Human Biological Chemistry and Genetics
University of Texas Medical Branch
409-747-6809
http://www.bioinfo.utmb.edu


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




RE: Help with welcome-file

2001-03-02 Thread Darrell Porter

Try making the following change:



Note the removal of the '/' before 'app' in the context path.

Hope this helps.

_
Darrell Porter
Operations Manager
415.355.9990 x290
[EMAIL PROTECTED]

WiseConnect, Inc. 
"Powering the people behind stores"

Visit our GlobalShop booth #4473 in i3

Go wireless with the WiseConnect Workspace & Palm!
Enter to win a Palm VII by selecting:
Enter to Win! 


-Original Message-
From: Thierry Leveque [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 6:38 AM
To: '[EMAIL PROTECTED]'
Subject: Help with welcome-file


Hi

We have a working application under Tomcat 3.2.
To call our main jsp, we have to call the full URL:
www.abcd.com/app/index.jsp

If we try:
www.abcd.com/app

We've got an error from Tomcat:
2001-03-02 09:31:03 - Ctx(  ): 404 R(  + //app/index.jsp + null) JSP
file not found
What is this double / ?? Where does it come from??

I think my web.xml file is ok:



index.jsp


index.html


index.htm



web.xml IS in my WEB-INF directory.

And my context too (in server.xml):


What is wrong?

And if I delete my file index.jsp from my directory, and try the URL
www.abcd.com/app, Tomcat return me the list of the file in my docBase
context directory as it shouldWeird!

Tomcat 3.2 under Solaris 7 on a Sun 450.

Thierry Leveque
Wysdom Inc.
cell: 514-575-6466
tel: 514-395-6060 poste 138
fax: 514-395-6080

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

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




RE: Tomcat setup

2001-03-02 Thread Darrell Porter

What OS are you running?

I'll presume Windows 95/98.

The simplest way to fix the "Out of Environment Space" is is to modify
C:\CONFIG.SYS and add or modify the existing SHELL= line to read as such:

SHELL=C:\WINDOWS\COMMAND.COM /P /E:3072

The /P tells COMMAND.COM to Persist after loading and the /E: tells
COMMAND.COM to provide an environment space of  bytes where  is a
decimal number.

If your CONFIG.SYS has a [common] section, you'll want to place the SHELL=
statement on the line  below the [common] heading.

Hope this helps,
_
Darrell Porter
Operations Manager
415.355.9990 x290
[EMAIL PROTECTED]

WiseConnect, Inc. 
"Powering the people behind stores"

Visit our GlobalShop booth #4473 in i3

Go wireless with the WiseConnect Workspace & Palm!
Enter to win a Palm VII by selecting:
Enter to Win! 

-Original Message-
From: Marina Hovakimyan [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 6:40 AM
To: [EMAIL PROTECTED]
Subject: Tomcat setup


I have installed Tomcat and now I need to set it up. Well you please tell me

what exactly I need to add or change. When ever I try to add line "set 
JAVA_HOME = c:\jdk1.1.8" I get an error:
Out of environment space.
Out of environment space.
Unable to determine the value of TOMCAT_HOME.
Please send your response to [EMAIL PROTECTED] as soon as possible.
Thank you very mach.
Marina.

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


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

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




Jasper / JSPC config question

2001-03-02 Thread Alan Vogt
Title: Jasper / JSPC config question






Hi all:


I've got Tomcat 4.0 loaded up.  All the servlet stuff works beautifully.


But I haven't been able to compile any JSP's.  I get "class not found" errors for 
routine classes such as java.security.PrivilegedAction...


I can move these "missing" classes into a new Jar file closer to Jasper...  They then 
get found, but I get unsatisfiedLinkError...


This looks and feels like a config error  Does anyone have a good writeup of how 
to configure Jasper?   Are there any links?  


I didn't see any FAQ's that would help.


Thanks,


Alan



[EMAIL PROTECTED]
(617) 245-6548





RE: Session beans and multiple tomcat servers ?

2001-03-02 Thread Andrew Gilbert

One option is a load balancer that will handle session affinity, either on
it's own or through a custom cookie/url rewrite. This is a problem with
almost all web application server solutions, certainly not unique to
Tomcat/JSP.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of David Peterson
Sent: Friday, March 02, 2001 5:05 AM
To: [EMAIL PROTECTED]
Subject: Session beans and multiple tomcat servers ?




Hi Everybody,

I have a question about the architecture of tomcat and the sharing of
beans (typically accessed by JSP page code) with a scope of "session".

It seems to me that one major problem with JSP and session-scoped beans
on tomcat (and possibly other servlet engines ? i'm not trying to bag
tomcat specifically here !) is that I am restricted to a hardware
architecture of a *single webserver* running tomcat.

If I wish to run a 'load-balanced' (dns round robin most likely) server
configuration with multiple instances of tomcat sitting behind the same
URL, is there any known way in which to share session-scope java beans
created by one tomcat server across the other servers ?

The only way I can see to solve this problem is to push all session
information to a backend database accessible by all the webservers, and
to look up the session information from the database *each* time the
user moves from page to page (and potentially across tomcat servers).
This seems kludgy, and the database access requirements defeat both the
simplicity of the session-bean approach, and add overhead to the very
scalability and performance that you're trying to achieve by using
multiple servers.

Any guidance or relevent experiences much appreciated ...

Thanks in advance.


David Peterson



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


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




Re: Servlet Directory

2001-03-02 Thread Match Grun

I do this all the time. I assume that the /Work/MyServlets/bin contains
a WEB-INF directory. docBase should be set to the directory which
contains the WEB-INF directory. Tomcat looks in the WEB-INF/classes
directory for any class files. 

Match

Richard Scales wrote:
> 
> Hi,
> 
> I've just installed tomcat 3.2.1 and its working fine except that I am using
> the default webapps/examples directory to store my servlets which is a pain
> as I physically have to copy them over etc and I would like to keep them on
> a seperate folder somewhere else on my machine.
> 
> I have been trying to achieve this by adding a contex-path to the server.xml
> file with no luck. Currently my servlets are in
> H:\jakarta-tomcat-3.2.1\webapps\examples\WEB-INF\classes and I would like to
> store them in
> H:\Work\MyServlets\bin
> 
> I cannot work out how to change this directory this is as far as I have
> got:-
> 
>   docBase="../../Work/MyServlets/bin"
>  crossContext="false"
>  debug="0"
>  reloadable="true" >
> 
> 
> This does not work and I cannot work out why!
> Can anyone help?
> 
> Thanks Richard
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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




RE: Pb running Tomcat with Apache on a Linux Server

2001-03-02 Thread BENARD Christophe, DDE 34/SG

> Dominique BATARD [mailto:[EMAIL PROTECTED]] wrote :

> Recompile apache avec --enable-module=so
> Recompile éventuellement aussi mod_jk

> Dom

Après une recompilation d'Apache et du module mod_jk, tout fonctionne !!!

Merci pour l'aide.

Christophe

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




Re: Tomcat setup

2001-03-02 Thread Dick Poon

I guess that you are running tomcat in win32 system.
just type the following:

C:\COMMAND.COM /E:4096 /P

this line give more memory to the running environment

Dick Poon
- Original Message -
From: Marina Hovakimyan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 2:40 PM
Subject: Tomcat setup


> I have installed Tomcat and now I need to set it up. Well you please tell
me
> what exactly I need to add or change. When ever I try to add line "set
> JAVA_HOME = c:\jdk1.1.8" I get an error:
> Out of environment space.
> Out of environment space.
> Unable to determine the value of TOMCAT_HOME.
> Please send your response to [EMAIL PROTECTED] as soon as possible.
> Thank you very mach.
> Marina.
>
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>


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




RE: Servlet Directory

2001-03-02 Thread Richard Scales

Anuj,

I've done that and I get now get the Tomcat Admin tools page at
http://localhost:8080/richard/index.html on my machine but cannot access my
servlets below my bin directory.

Any ideas?

Rich

-Original Message-
From: Anuj Agrawal [mailto:[EMAIL PROTECTED]]
Sent: 02 March 2001 13:45
To: [EMAIL PROTECTED]
Subject: Re: Servlet Directory


Adding a context path in server.xml is just one part to it (BTW, in docBase
you
might want to use a fully qualified path rather than a relative path).

The 2nd file that you need to edit is uriworkermap.properties file, and add
(in
your case)
/myservlets/*=ajp12

You may need to restart both Tomcat and the web server.
Good luck.
Anuj.

Richard Scales wrote:

> I've just installed tomcat 3.2.1 and its working fine except that I am
using
> the default webapps/examples directory to store my servlets which is a
pain
> as I physically have to copy them over etc and I would like to keep them
on
> a seperate folder somewhere else on my machine.
>
> I have been trying to achieve this by adding a contex-path to the
server.xml
> file with no luck. Currently my servlets are in
> H:\jakarta-tomcat-3.2.1\webapps\examples\WEB-INF\classes and I would like
to
> store them in
> H:\Work\MyServlets\bin


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

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




Re: newbie servlet deploy question

2001-03-02 Thread Bo Xu

Jason Novotny wrote:

> I would like to be able to access a servlet with the URL
> http://localhost:8080/demo
>
> However, it only works if I go to
> http://localhost:8080/demo/servlet/demo
>
> I have the following in server.xml and web.xml respectively:
>
>   docBase="webapps/demo"
>  crossContext="true"
>  debug="0"
>  reloadable="true"
>  trusted="false" >
> 
>
> BTW, should I comment out or use the following in some way?
>  className="org.apache.tomcat.request.InvokerInterceptor"
> debug="0" prefix="/servlet/" />
>
> My web.xml in webapps/demo/WEB_INF/web.xml has the following:
>
> 
>   demo
>   org.demo.DemoServlet
> 
>
> 
>   demo
>   /demo
> 
>
> So I would like to be able to use   and have the
> servlet invoked.
>
> Thanks very much, Jason
>
> --
> Jason Novotny   [EMAIL PROTECTED]
> Home: (510) 704-9917Work: (510) 486-8662
> NERSC Distributed Computing http://www-didc.lbl.gov
> [...]

Hi :-)  with jakarta-tomcat-4.0-b1(standalone, JDK1.3, winnt40),
I find:

*  in webapps/myapp/WEB_INF/web.xml:
-  if I define the following servlet definitions:
   sn_0
   sn_1
   ...
  sn_m

 - and I define the following servlet-mapping:
   
  sn_0
  /up_0
   
   
  sn_1
  /up_1
   
   ...
   
  sn_m
  /up_m
   
   i.e., I map sn_j to up_j  (0<=j<=m)

*  then :
- if  NOONE "from up_0 to up_m" = "/", we can use the
   following to invoke MyServlet:
   http://localhost:8080/myapp/servlet/MyServlet
   and:
   http://localhost:8080/myapp/up_0
   ...
   http://localhost:8080/myapp/up_m
   i.e., now we have m+1 "named" servlet definitions and
   1 "default(non-named)" servlet definition.

- if ANYONE "from up_0 to up_m" = "/", now I find perhaps
   it is what you need (i suppose up_i="/", 0<=i<=m):
  % we still can use the  following to invoke MyServlet:
   http://localhost:8080/myapp/servlet/MyServlet
   and:
   http://localhost:8080/myapp/up_x(0<=x<=m, x ! = i)
   http://localhost:8080/myapp/YYY
   (YYY!=up_x, YYY can be anything :-)   )
   i.e., we can use:
   http://localhost:8080/myapp
   http://localhost:8080/myapp/
   http://localhost:8080/myapp/hahahahaha//hahahahaha :-)
   ...
   and thay ALL invoke the Same servlet defnition whose name
   is "sn_i" .


Bo
Mar.02, 2001







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




Re[3]: memory and/or ms problem

2001-03-02 Thread Gerd Trautner

hi all,

i found the reason for the growing memory consumption of my servlets.

preconditions:
i use servlets to get data out and in a mysql database and generate
html pages with PrintWriter.print(...) statements.
my servlets often use:
...
Statement Stmt = C.createStatement();
ResultSet RS = Stmt.executeQuery("SELECT ..,..,.. from ..");
while (RS.next())
{
   //do something with data
   out.println();
}
...

each request an instance of a servlet is created and the servlet
starts reading data out of the database and writes it in the
PrintWriter stream.
But what happens if the PrintWriter has no target (because the user
sends another request or more then one other requests)? I am not sure,
but it seems that the servlet tries to write to the PrintWriter stream
and has no success. the result is a growing amount of instances of a
servlet which try to write to a PrintWriter and have no success. and
it seems they keep try writing (and consuming memory) a long time ...

my solution is to check the error state of a Printwriter before
writing in it. so the code from above looks like this:
...
Statement Stmt = C.createStatement();
ResultSet RS = Stmt.executeQuery("SELECT ..,..,.. from ..");
while (RS.next())
{
   if (out.checkError()) break;
   //do something with data
   out.println();
}
...

for my application it seems to work, but i think there must be a better
way,
(why does the write statement throws an exception and the print
statement not?)
any ideas?

Gerd


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




Re[3]: memory and/or ms problem

2001-03-02 Thread Gerd Trautner

hi all,

i found the reason for the growing memory consumption of my servlets.

preconditions:
i use servlets to get data out and in a mysql database and generate
html pages with PrintWriter.print(...) statements.
my servlets often use:
...
Statement Stmt = C.createStatement();
ResultSet RS = Stmt.executeQuery("SELECT ..,..,.. from ..");
while (RS.next())
{
   //do something with data
   out.println();
}
...

each request an instance of a servlet is created and the servlet
starts reading data out of the database and writes it in the
PrintWriter stream.
But what happens if the PrintWriter has no target (because the user
sends another request or more then one other requests)? I am not sure,
but it seems that the servlet tries to write to the PrintWriter stream
and has no success. the result is a growing amount of instances of a
servlet which try to write to a PrintWriter and have no success. and
it seems they keep try writing (and consuming memory) a long time ...

my solution is to check the error state of a Printwriter before
writing in it. so the code from above looks like this:
...
Statement Stmt = C.createStatement();
ResultSet RS = Stmt.executeQuery("SELECT ..,..,.. from ..");
while (RS.next())
{
   if (out.checkError()) break;
   //do something with data
   out.println();
}
...

for my application it seems to work, but i think there must be a better
way,
any ideas?

Gerd


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




PostgreSQL

2001-03-02 Thread mikhail malamud

I am compiling PostgreSQL 7.0.3 to be used with the Tomcat 3.2.1 web
application. Does anyone have any success stories or nightmares about
postgresql and java connectivity. What drivers did you use and why?
Please share.

Thanks,


-mikhail


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




RE: starting additional "services" with Tomcat

2001-03-02 Thread Michael Wentzel

> I am using Tomcat 3.2.1 on Solairs.
> 
> I have some Java code to start a RMI registry that I want to make
> available
> to all webapps.  In stead of having to run yet another process, I want
> it
> to run inside Tomcat's JVM.  What is the best way to do this? 
>  Can I add
> 
> an entry in server.xml to cause Tomcat to run my code at startup?
> Since I am not sure if that can be done, currently, I am thinking of
> puting
> my code inside a servlet and use the load-on-startup feature.

The servlet idea is the best I think.  I believe you could also write
your own class that is Runnable that creates a Thread for your RMI
process and one for the org.apache.tomcat.startup.Tomcat class passing
any command-line params to this class.


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

- Punisher of those who cannot spell dumb!

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




Re: newbie servlet deploy question

2001-03-02 Thread Bo Xu

Jason Novotny wrote:

> I would like to be able to access a servlet with the URL
> http://localhost:8080/demo
>
> However, it only works if I go to
> http://localhost:8080/demo/servlet/demo
>
> I have the following in server.xml and web.xml respectively:
>
>   docBase="webapps/demo"
>  crossContext="true"
>  debug="0"
>  reloadable="true"
>  trusted="false" >
> 
>
> BTW, should I comment out or use the following in some way?
>  className="org.apache.tomcat.request.InvokerInterceptor"
> debug="0" prefix="/servlet/" />
>
> My web.xml in webapps/demo/WEB_INF/web.xml has the following:
>
> 
>   demo
>   org.demo.DemoServlet
> 
>
> 
>   demo
>   /demo
> 
>
> So I would like to be able to use   and have the
> servlet invoked.
>
> Thanks very much, Jason
>
> --
> Jason Novotny   [EMAIL PROTECTED]
> Home: (510) 704-9917Work: (510) 486-8662
> NERSC Distributed Computing http://www-didc.lbl.gov
> [...]

Hi :-)  with jakarta-tomcat-4.0-b1(standalone, JDK1.3, winnt40),
I find:

*  in webapps/myapp/WEB_INF/web.xml:
-  if I define the following servlet definitions:
   sn_0
   sn_1
   ...
  sn_m

 - and I define the following servlet-mapping:
   
  sn_0
  /up_0
   
   
  sn_1
  /up_1
   
   ...
   
  sn_m
  /up_m
   
   i.e., I map sn_j to up_j  (0<=j<=m)

*  then :
- if  NOONE "from up_0 to up_m" = "/", we can use the
   following to invoke MyServlet:
   http://localhost:8080/myapp/servlet/MyServlet
   and:
   http://localhost:8080/myapp/up_0
   ...
   http://localhost:8080/myapp/up_m
   i.e., now we have m+1 "named" servlet definitions and
   1 "default(non-named)" servlet definition.

- if ANYONE "from up_0 to up_m" = "/", now I find perhaps
   it is what you need (i suppose up_i="/", 0<=i<=m):
  % we still can use the  following to invoke MyServlet:
   http://localhost:8080/myapp/servlet/MyServlet
   and:
   http://localhost:8080/myapp/up_x(0<=x<=m, x ! = i)
   http://localhost:8080/myapp/YYY(YYY!=up_x, YYY
   can be anything :-)   )
   i.e., we can use:
   http://localhost:8080/myapp
   http://localhost:8080/myapp/
   http://localhost:8080/myapp/hahahahaha//hahahahaha :-)
   ...
   and thay all invoke that servlet defnition whose name is
   "sn_i" .


Bo
Mar.02, 2001




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




help with Tomcat under windows ME...

2001-03-02 Thread Rob Smyth

I can't start Tomcat under windows ME...

Is there a way I can do this?  I've made all the appropriate changes to the
classpath in the autoexec.bat, but I keep getting the 'out of environment'
error.

Thanks for any help.

Rob Smyth


 winmail.dat

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


error message

2001-03-02 Thread mork71.tomcat

I'm developing JSP and I'm using 'Apache Tomcat Test Environment' (inside Visual Age 
for Java) to test them.
I'm receiving an error that I can't understand.

The console displays this error :
org.apache.jasper.JasperException: Unable to rename class file --firstPath-- to 
--secondPath--
 
The page I'm tryng to view is being correctly compiled and it's showed in the 'JSP 
Page Compile Generated Code' (a Visual Age folder) without an error.

I've searched for the file indicated in the --firstPath-- and for the one indicated in 
the --secondPath-- ( .class files ): neither of them exists.

Thanks in advance.



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




Re: loading applet from web-inf/classes sunfolder

2001-03-02 Thread William Brogden



"Jost, Dominique" wrote:
> 
> hi
> 
> my home-directory on the tomcat server looks like this 
>http://localhost:8080/fundopt. under fundopt i have a folder (called jsp) containing 
>all my jsp files.
> i want to acces an applet (which has its source files in the web-inf/classes/xy 
>folder) with the following piece of code:
> from jsp file (in http://localhost:8080/fundopt/jsp/appletCaller.jsp)
> . this 
>however doesn't work.
> 
> how can i address the applet? what codebase am i to choose?
> 

The form of codebase you are using only works for plain HTML
pages. One easy way to solve this problem and also make image
and sound files work right is to put a  tag in
the  section of the page your JSP writes. Use that
tag to point to the server alias for the directory that
has your class files. 



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

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




RE: loading applet from web-inf/classes sunfolder

2001-03-02 Thread Randy Layman


You must move the Applet code out of the web-inf directory.  Tomcat
doesn't allow anything in this directory to be published through the
HTTP/AJP connections (its for security purposes).

So following your conventions, you probably want to create a
directory called /fundopt/applet and put your applet code in there and then
use codebase="../applet/".

Randy

-Original Message-
From: Jost, Dominique [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 9:45 AM
To: '[EMAIL PROTECTED]'
Subject: loading applet from web-inf/classes sunfolder


hi

my home-directory on the tomcat server looks like this
http://localhost:8080/fundopt. under fundopt i have a folder (called jsp)
containing all my jsp files. 
i want to acces an applet (which has its source files in the
web-inf/classes/xy folder) with the following piece of code:
from jsp file (in http://localhost:8080/fundopt/jsp/appletCaller.jsp)
. this however doesn't work. 

how can i address the applet? what codebase am i to choose?

any help is appreciated

regards
dominique jost

server xml:



This message is for the named person's use only.  It may contain 
confidential, proprietary or legally privileged information.  No 
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender.  You must not, directly or indirectly, use, disclose, distribute, 
print, or copy any part of this message if you are not the intended 
recipient. CREDIT SUISSE GROUP and each of its subsidiaries each reserve
the right to monitor all e-mail communications through its networks.  Any
views expressed in this message are those of the individual sender, except
where the message states otherwise and the sender is authorised to state 
them to be the views of any such entity.




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

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




  1   2   >