Re: Login Servlet

2001-03-23 Thread Martin Smith

public boolean next()
 throws SQLException

Moves the cursor down one row from its current position. A
ResultSet cursor is initially positioned before the first row; the first
call to the method next makes the first row the current row; the
second call makes the second row the current row, and so on.


Returns:
true if the new current row is valid; false if there are no more
rows
Throws:
SQLException - if a database access error occurs

mfs


Vladimir Grishchenko wrote:

 
  ps I'm surprised "boolean found = rs.next()" works if result set is empty.
  I'd kind of expect a null pointer exception. I always do
  if (rs != null  rs.next()) {
// assign something
  }
  if i'm expecting a single row.

 I guess there's a difference between an empty ResultSet and no ResultSet :)

 --V.




Re: Session tracking not working - POSTing FORMs

2001-03-23 Thread Craig R. McClanahan



On Fri, 23 Mar 2001, David Wall wrote:

  The most likely explanation is that you are using instance variables in
  your servlets, instead of local variables, to represent the information
  for a particular request.  These variables are shared across all of the
  simultaneous requests to the same servlet, so it's easy for one request to
  scribble on the data of another request.
 
 Does anybody know if session tracking -- when cookies are not enabled and
 using encodeURL/encodeRedirectURL -- works across POST requests.  I've noted
 that it seems okay with GET requests, but is there anything that needs to be
 done to ensure that the session id is sent correctly for FORM POSTs?
 

As long as you remember to call response.encodeURL() around the value of
the action parameter on your form element, it will work fine.

i.e. if you were writing the element in a servlet:

writer.print("form action=\"");
writer.print(response.encodeURL("/my/action/url"));
writer.println("\" method=\"POST\");

 Davd
 
 

Craig McClanahan






Re: Tomcat and Jsp files

2001-03-23 Thread nmlaney


You've answered your own question, Tomcat does not see JSP files in the
Apache html root. You must put ALL JSP files in the Tomcat root directory
and ALL Servlets in the WEB-INF\classes directory OR setup up an
application context.

To setup additional contexts you use the same convention as the root:

# The following line mounts all JSP files and the /servlet/ uri to tomcat
JkMount /someApp/* ajp13
JkMount /someApp/*.jsp ajp13

Thus the JSP files go in webapps\someApp and Servlet files go in
webapps\someApp\WEB-INF\classes

For a good discussion of  servlet contexts, click on the developing web
applications with tomcat link at
http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/index.html


Neill Laney
http://home.nc.rr.com/nlaney
--
Web Developer/Technical Support Specialist.



   
   
Chris Andreou  
   
chrisa@strll  
   
c.com 
   
   
   
03/23/2001 
   
02:09 PM   
   
Please 
   
respond to 
   
tomcat-user
   
   
   
   
   




Hi I am using Tomcat 3.2.1 and Apache on an Nt platform. My confusion is
this:
In http.conf file I have :

JkMount /*.jsp ajp12
JkMount /servlet/* ajp12

Should all the .jsp files be under the webapps directory? I have a jsp file
under my webroot Apache directory but Tomcat does not see it?

Thanks

Chris







RE: oracle JDBC doesn't work

2001-03-23 Thread Nester Dias

I agree with you, I checked up my database co nnections and it shoud be done
in the same manner..i.e using "jdbc:oracle:thin:@abc.def.com:1521:SID"
Nester
-Original Message-
From: George McKInney [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 10:58 PM
To: [EMAIL PROTECTED]
Subject: RE: oracle JDBC doesn't work


I think that (not being a DB guru):
   Connection  con =
 DriverManager.getConnection("jdbc:oracle:thin:storedb",
 "username", "password");
   }

should be more like:

...
DriverManager.getConnection("jdbc:oracle:thin:@storedb",
...

note the '@' between "thin:" and "storedb" (and the colon is necessary)

Our setup uses (though the format above may work for you):

"jdbc:oracle:thin:@abc.def.com:1521:SID"

where:
abc.def.com is the machine name
1521 is the port to connect to
SID is the database identifier.

Hope this helps.

George McKinney, Developer
tantalus communications inc.
500-1122 Mainland Street
Vancouver, BC, Canada V6B 5L1
[EMAIL PROTECTED]

Direct  604.726.6753
Main604.609.0700
Fax 604.609.0705
www.tantalus.com
"When eBusiness experience counts."


 -Original Message-
 From: Jack Li [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 23, 2001 7:32 AM
 To: [EMAIL PROTECTED]
 Subject: oracle JDBC doesn't work



 I got message "Connection refused: no further information".
 Here are the
 settings:

 1. We are using Oracle 7.3. The database server name is storedb.
 2. I downloaded oracle jdbc driver from Oracle.com. The
 downloaded driver is
 Oracle 7 driver for NT. It has classes102.zip and
 classes111.zip and two
 dlls.
 3. I put calsses111.zip into c:\jdk1.3\bin and add "c:\jdk1.3\bin" to
 CLASSPATH and PATH
 4. test the connection in jsp as:
 try{
   DriverManager.registerDriver(new
 oracle.jdbc.driver.OracleDriver());
   Connection  con =
 DriverManager.getConnection("jdbc:oracle:thin:storedb",
 "username", "password");
   }
   catch(SQLException e){
   out.println(e.getMessage());
   }

 The username and password are good. I can make connection
 using jdbc-odbc
 bridge.
 What's the problem do I have with oracle JDBC?

 Thanks,
 Jack Li

 -Original Message-
 From: Bryant, William [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 9:21 AM
 To: [EMAIL PROTECTED]
 Subject: RE: JDBC driver for oracle




 You can get the JDBC drivers from Oracle.com.  Select
 download, then choose
 'JDBC drivers' from teh drop down list.  You will need a free
 oracle technet
 login.

 ... Mike

 -Original Message-
 From: Jack Li [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 9:11 AM
 To: [EMAIL PROTECTED]
 Subject: JDBC driver for oracle


 Hi,

 Where can I have a free JDBC driver for oracle?

 Thanks,
 Jack







Re: A very weird problem

2001-03-23 Thread Rajeev Jha

well we tried this on tomcat running on win9x box and it is getting added(!),
in log file you can see adding context /at though docBase points to some bogus
location.
did u try to stop+start the server after adding these contexts ?

Pradeep Kumar wrote:

 I have got Tomcat 3.2.1 on the Solaris box. I have got a directory called
 "at" under webapps directory. The problem is that when I start the tomcat
 server, my context "at" doesn't get loaded (I don't see the message "Adding
 context Ctx( /at )").
 The examples and test context does get loaded. I even tried to put the at
 directory out of the webapp directory and defined in the context in the
 server.xml file. But the "at" context doesn't load.
 The real weird behavior is that, when I rename the test directory to test1,
 the test context is loaded.
 I tried all kind of things like, creating a war file of "at", installing
 tomcat again. But can't fix this problem. Even the log file is not created
 under logs directory.

 I am really having very tough time with this, your help here is highly
 appreciated.

 Thanks in advance,
 pradeep

--
eagles may soar, but weasels don't get sucked into jet engines
 -- anonymous psycopath on ./
---
Rajeev Jha
Indegene Lifesystems P Ltd.
130, 1st cross , 5th block, kormangla , bang!ore - 95
voice -- +91-80- 55243 14/24

http://www.indegene.com





Re: Session tracking not working - POSTing FORMs

2001-03-23 Thread David Crooke

Use an encoded URL for the ACTION parameter of the FORM tag.

David Wall wrote:

  The most likely explanation is that you are using instance variables in
  your servlets, instead of local variables, to represent the information
  for a particular request.  These variables are shared across all of the
  simultaneous requests to the same servlet, so it's easy for one request to
  scribble on the data of another request.

 Does anybody know if session tracking -- when cookies are not enabled and
 using encodeURL/encodeRedirectURL -- works across POST requests.  I've noted
 that it seems okay with GET requests, but is there anything that needs to be
 done to ensure that the session id is sent correctly for FORM POSTs?

 Davd




Re: HELP: Trying to config/install Tomcat as a Service using Jakarta NT Service

2001-03-23 Thread Mohan Nade

Where do I get the 'jk_nt_service.exe' file.

I hope it does not come with the tomcat. Is it an external utility?

Regards,
Mohan

- Original Message -
From: "Jeff Leung" [EMAIL PROTECTED]
To: "Tomcat (E-mail)" [EMAIL PROTECTED]
Cc: "Jeff Leung" [EMAIL PROTECTED]
Sent: Friday, March 23, 2001 5:10 AM
Subject: FW: HELP: Trying to config/install Tomcat as a Service using
Jakarta NT Service



 I am attempting to configure Tomcat as an NT service.  This is my
 environment:

 Platform: Windows 2000
 JDK:  JDK 1.2.2
 Tomcat:  3.2.1
 Webserver (Apache):  1.3.9

 I have installed Apache and modified my httpd.conf file to include
 the include directive for tomcat.  I have modified Tomcat's
 wrapper.properties file for the Tomcat path and JDK path.
 Tomcat and Apache are loaded on the local drive.

 I have installed the service using jk_nt_service.exe and received the
 following:

 "Asked (and given) winsock 1.1
 The service named Jakarta was created. Now adding registry entries
 Registry values were added. If you have already updated
 wrapper.properties you may start the Jakarta service by
 executing "net start Jakarta" from the command prompt"

 While attempting to start the service from the command line using
 "net start", I receive the following response:

 "The Jakarta service is starting.
  The Jakarta service could not be started.

  The service did not report an error.

  More help is available by typing NET HELPMSG 3546"


 Where do I start to troubleshoot.

 Thanks.


 Jeffrey Leung






Why is my init method run twice?

2001-03-23 Thread Helgesen Hans Jørgen

I'm new to this list, so please forgive me if this question has been raised
before

I'm running Tomcat 3.2.1, Apache 1.3.12, java 1.2.2 and Redhat 6.2.

I have a servlet to which I want to pass a single parameter via the web.xml
file (below). I'm obtaining the parameter value by calling
config.getInitParameter() in the init method of the servlet.

This seems to work fine, the init method is called and the value obtained OK
when Tomcat is started.

The problem is that when the first request for the servlet arrives, the init
method is run A SECOND TIME. This time the init parameter IS NOT AVAILABLE.

My theory is that Tomcat calls the init method once for each thread, but if
that is true, I would expect Tomcat to pass the init parameters each time?

What is wrong?

BTW, I can't get the servlet-mapping to work either. Any obvious errors?

Thanks,
Hans J. Helgesen

Here is my web.xml file:

!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"

web-app
  display-nameMy test application/display-name
  description
Description of my test application
  /description

  servlet
servlet-nameMyServlet/servlet-name
description
  Description of my servlet
/description

servlet-classno.fellesdata.MyServlet/servlet-class

init-param
  param-nameConfigFile/param-name
 
param-value/usr/local/jakarta-tomcat/webapps/poes/WEB-INF/myservlet.config
/param-value
/init-param

   load-on-startup5/load-on-startup
  /servlet

  servlet-mapping
servlet-nameMyServlet/servlet-name
url-pattern/MyServlet/url-pattern
  /servlet-mapping

/web-app


And here is part of my servlet code:

public void init (ServletConfig config) throws ServletException
{
super.init(config);
bla-bla-bla.
// Load configfile if it exists.
configfile = config.getInitParameter("ConfigFile");
if (null == configfile) {
  configfile = "default.value";
}
}




Re: [tc33] randomClass not honoured?

2001-03-23 Thread Endre Stølsvik

On Thu, 22 Mar 2001, Larry Isaacs wrote:

Thanks.. but ..

| For Tomcat 3.3m2, see SessionIdGenerator ... / in server.xml.

 (oops.. m2, yes.. not b2 :)

How would I use this? class="..." didn't work. In the server.xml it says:

!-- You can add a "home" attribute to represent the "base" for
 all relative paths. If none is set, the TOMCAT_HOME property
 will be used, and if not set "." will be used.
 webapps/, work/ and log/ will be relative to this ( unless
 set explicitely to absolute paths ).
 You can also specify a "randomClass" attribute, which determines
 a subclass of java.util.Random will be used for generating  session IDs.
 By default this is "java.security.SecureRandom".
 Specifying "java.util.Random" will speed up Tomcat startup,
 but it will cause sessions to be less secure.
  --
ContextManager debug="0" workDir="work" 

That's a "typo" in the docs, then! ;)


-- 
Mvh,
Endre






RE: HELP: Trying to config/install Tomcat as a Service using Jakarta NT Service

2001-03-23 Thread Gary Lawson

http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.1/bin/win32/i38
6/

-Original Message-
From: Mohan Nade [mailto:[EMAIL PROTECTED]]
Sent: 23 March 2001 08:31
To: [EMAIL PROTECTED]
Subject: Re: HELP: Trying to config/install Tomcat as a Service using
Jakarta NT Service


Where do I get the 'jk_nt_service.exe' file.

I hope it does not come with the tomcat. Is it an external utility?

Regards,
Mohan

- Original Message -
From: "Jeff Leung" [EMAIL PROTECTED]
To: "Tomcat (E-mail)" [EMAIL PROTECTED]
Cc: "Jeff Leung" [EMAIL PROTECTED]
Sent: Friday, March 23, 2001 5:10 AM
Subject: FW: HELP: Trying to config/install Tomcat as a Service using
Jakarta NT Service



 I am attempting to configure Tomcat as an NT service.  This is my
 environment:

 Platform: Windows 2000
 JDK:  JDK 1.2.2
 Tomcat:  3.2.1
 Webserver (Apache):  1.3.9

 I have installed Apache and modified my httpd.conf file to include
 the include directive for tomcat.  I have modified Tomcat's
 wrapper.properties file for the Tomcat path and JDK path.
 Tomcat and Apache are loaded on the local drive.

 I have installed the service using jk_nt_service.exe and received the
 following:

 "Asked (and given) winsock 1.1
 The service named Jakarta was created. Now adding registry entries
 Registry values were added. If you have already updated
 wrapper.properties you may start the Jakarta service by
 executing "net start Jakarta" from the command prompt"

 While attempting to start the service from the command line using
 "net start", I receive the following response:

 "The Jakarta service is starting.
  The Jakarta service could not be started.

  The service did not report an error.

  More help is available by typing NET HELPMSG 3546"


 Where do I start to troubleshoot.

 Thanks.


 Jeffrey Leung






start tomcat: socket closed exception

2001-03-23 Thread Benjamin Stocker


Hy,

i tried to start tomcat on a suse70 linux server, i use the following
versions:

  jdk 1.1.8v1
  jakarta-3.1-29
  kernel 2.2.16

when I start tomcat using /opt/jakarta/bin/startup.sh, I get the following
messages and everything seems to be ok:

Guessing TOMCAT_HOME from tomcat.sh to ./..
Setting TOMCAT_HOME to ./..
Using classpath:
.:./../lib/ant.jar:./../lib/jasper.jar:./../lib/servlet.jar:./../lib/test:./../lib/webserver.jar:./../lib/xml.jar
inuit:/opt/jakarta/bin # Starting tomcat. Check logs/tomcat.log for error
messages

but after 5 (or 6...) seconds, tomcat crashes:

java.net.SocketException: Socket closed
at java.net.PlainSocketImpl.close(PlainSocketImpl.java:408)
at java.net.Socket.close(Socket.java:383)
[...]

the socket 8080 is free and tomcat is not already running. I searched all
archives and found many peoples having the same problem, but unfortunately no
answers. I even can find no helpful informations in the logfiles.

Any help will be greatfully appreciated!
Benjamin




urgent help please

2001-03-23 Thread Pradeep Kumar

Hello all,
I need some urgent help from you guys.

I have tomcat 3.2.1 on solaris box. The problem is when start the server, my
context is not loading. I have a directory defined under webapps called at
and it has WEB-INF directory and web.xml

Please give me a quick reply if you know about this.

Thanks,




Re: Tomcat Startup Problem

2001-03-23 Thread tomcat

You might have to edit the workers.properties file and set the path to the
tomcat and jdk directories in it.

-Thos

On Fri, 23 Mar 2001, Muniraja Balaji wrote:

 Hi,
  I am new to Tomcat, i have downloaded the Tomcat Zip file and unzipped to the 
local drive. After that i have configured the JAVA_HOME,TOMCAT_HOME and CLASSPATH 
variables also. When i startup Tomcat i get an error message

 Can't find class org/apache/tomcat/startup/Tomcat and closes the opened window which 
is used to startup the tomcat server.

  Any idea why it is happening.

  Thanks in Advance for any help..

 Take Care..Have a Good Day
 Patience .has it's own rewards.
 M.Balaji
 Phone: (065) - 423-6563


 --

 This e-mail may contain confidential and/or privileged information. If you are not 
the intended recipient (or have received this e-mail in error) please notify the 
sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.






Directory

2001-03-23 Thread baumans pascal

Hello,

I want to access a directory located outside the tomcat root directory.
(example:   c:\temp   )

Can I make a shortcut or a link for this directory ? I need to access it 
throught JSP page ...

Thanx.
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




mod_jk on HPUX11

2001-03-23 Thread Daniel Brack

Hi,

Thanks to all who helped with my problems. Tomcat/Apache works fine now.

Daniel



Compatibility with different flavors of UNIX

2001-03-23 Thread Simon McMenzie

Hi all,

I have successfully installed the following on Solaris 2.6

apache
mod_ssl
tomcat
mod_jk

I also need to implement this on HPUX and on AIX.

Will the components above ALL run on HP and AIX? More specifically, when
building mod_jk on Solaris, one runs

apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr...etc

so what switch needs to be passed for HP and AIX?

Thanks in advance for any help you can provide.

Simon McMenzie
Senior Developer/Engineer
Interlink Software Services Ltd
_
mailto: [EMAIL PROTECTED]
Office: (044) 1625 521 222
Mobile   : 07931 772 139
Fax   : (044) 1625 521 333





MySQL accesing thru Network

2001-03-23 Thread java4dinman

I am using MySQL and JDBC drive which works fine in localhost:3306. 
But when accesing from network like 192.168.0.2:8080 from other 
machine it does not work. how can I change the setting in MySQL for 
network connection.

Thanx in advance.

DINMAN

Enjoy being an Indyan at http://www.indya.com



Re: Directory

2001-03-23 Thread Arnaud Vandyck

baumans pascal wrote:
 
 Hello,
 
 I want to access a directory located outside the tomcat root directory.
 (example:   c:\temp   )
 
 Can I make a shortcut or a link for this directory ? I need to access it
 throught JSP page ...

File file = new File("C:\anywhere");
or
File temp = File.createTempFile("pattern", ".suffixe");
temp.deleteOnExit();
//the file will be created in C:\temp or /tmp, it depends on your system

-- 
Arnaud Vandyck http://www.ressource-toi.org/



Re: Directory

2001-03-23 Thread baumans pascal

ok but I have 250 text files in this directory and I want to create a html 
link on each of them, in this way I'll have the 250 link on a html page and 
those 250 files will be availlabe for downloading ...
so Is there another way to do thoses links on a jsp page ?

From: Arnaud Vandyck [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Directory
Date: Fri, 23 Mar 2001 11:07:38 +0100

baumans pascal wrote:
 
  Hello,
 
  I want to access a directory located outside the tomcat root directory.
  (example:   c:\temp   )
 
  Can I make a shortcut or a link for this directory ? I need to access it
  throught JSP page ...

File file = new File("C:\anywhere");
or
File temp = File.createTempFile("pattern", ".suffixe");
temp.deleteOnExit();
//the file will be created in C:\temp or /tmp, it depends on your system

--
Arnaud Vandyck http://www.ressource-toi.org/

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: Refresh

2001-03-23 Thread Kevin Sangeelee

Here's a one liner from the net that will remove the ^M from your configs.
Remember that a lot of Win editors will put them back in when you save
(UltraEdit has good support for DOS and Unix files).

perl -pi -e "s/\cM//g" filename

On Thu, 22 Mar 2001, Ryan wrote:

 I use slackware 7.1 and have hacked my smb.conf to pieces.. kinda
 
 the best part about using samba is seeing ^M all over the place when you use
 vi
 but yeah I'll try that net command.. learn something new everyday...
 
 
 -ryan
 
 
 - Original Message -
 From: "Kevin Sangeelee" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, March 22, 2001 1:28 PM
 Subject: Re: Refresh
 
 
  This is true, but it's possible to configure samba to cooperate nicely
  with it's native file system. I'm not at work at the moment so I can't
  check my files, but I think that rummaging around the docs on pessimistic
  locking gets you close to the issues. I'm currently running samba/tomcat
  on a RH6.2 box with more or less vanilla smb.conf, and it works perfectly.
  The only time I had to reconfigure sambas locking settings (on a different
  box) was when I needed a Unix program to detect write-locks held by a
  samba client.
 
  Kevin
 
  On Thu, 22 Mar 2001, Craig R. McClanahan wrote:
 
   On Thu, 22 Mar 2001, Ryan wrote:
  
Even so.. I've still had to 'touch' half the time. Though I access my
 JSP
code through windows via samba. Dunno if that has anything to do with
 it.
   
  
   Yes, it absolutely does.
  
   Network file systems often cache directory information about the files
 you
   access, in order to avoid lots of network traffic.  Thus, a file can be
   changed on the Samba server (with an updated timestamp), and the Samba
   client (i.e. the machine Tomcat is running on) does not know that.
  
   IMHO, running your webapps via a network file system (Windows shared
   disks, Samba, Unix NFS, etc.) is not a good idea.  You'd be much better
   off (and have much better performance) if you moved Tomcat to where the
   files are located, rather than the other way around.
 
 
 




Re: MySQL accesing thru Network

2001-03-23 Thread A.T.Z.


how can I change the setting in MySQL for
network connection.

Use user_at_other_domain.some_TLD instead of the normal user you would use 
in your grant statement.

This is well explained in the MySQL manual found at www.mysql.com or in the 
docs directory in the source dir.

Hope this helps.

Bye,


B.




Re: Refresh

2001-03-23 Thread Ryan

I just use the program  'dos2unix'

it rules

-ryan

- Original Message -
From: "Kevin Sangeelee" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 23, 2001 2:30 AM
Subject: Re: Refresh


 Here's a one liner from the net that will remove the ^M from your configs.
 Remember that a lot of Win editors will put them back in when you save
 (UltraEdit has good support for DOS and Unix files).

 perl -pi -e "s/\cM//g" filename

 On Thu, 22 Mar 2001, Ryan wrote:

  I use slackware 7.1 and have hacked my smb.conf to pieces.. kinda
 
  the best part about using samba is seeing ^M all over the place when you
use
  vi
  but yeah I'll try that net command.. learn something new everyday...
 
 
  -ryan
 
 
  - Original Message -
  From: "Kevin Sangeelee" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, March 22, 2001 1:28 PM
  Subject: Re: Refresh
 
 
   This is true, but it's possible to configure samba to cooperate nicely
   with it's native file system. I'm not at work at the moment so I can't
   check my files, but I think that rummaging around the docs on
pessimistic
   locking gets you close to the issues. I'm currently running
samba/tomcat
   on a RH6.2 box with more or less vanilla smb.conf, and it works
perfectly.
   The only time I had to reconfigure sambas locking settings (on a
different
   box) was when I needed a Unix program to detect write-locks held by a
   samba client.
  
   Kevin
  
   On Thu, 22 Mar 2001, Craig R. McClanahan wrote:
  
On Thu, 22 Mar 2001, Ryan wrote:
   
 Even so.. I've still had to 'touch' half the time. Though I access
my
  JSP
 code through windows via samba. Dunno if that has anything to do
with
  it.

   
Yes, it absolutely does.
   
Network file systems often cache directory information about the
files
  you
access, in order to avoid lots of network traffic.  Thus, a file can
be
changed on the Samba server (with an updated timestamp), and the
Samba
client (i.e. the machine Tomcat is running on) does not know that.
   
IMHO, running your webapps via a network file system (Windows shared
disks, Samba, Unix NFS, etc.) is not a good idea.  You'd be much
better
off (and have much better performance) if you moved Tomcat to where
the
files are located, rather than the other way around.
  
 
 





Re: urgent help please

2001-03-23 Thread Rajeev Jha

first thing is to check the log files , if it has something like:
loaded context /abcd
or not.if this context is loaded as per the log files then check the docBase
attribute of your context , whether it is pointing to correct physical directory
or not. and check for possible case-mismatch also.

Pradeep Kumar wrote:

 Hello all,
 I need some urgent help from you guys.

 I have tomcat 3.2.1 on solaris box. The problem is when start the server, my
 context is not loading. I have a directory defined under webapps called at
 and it has WEB-INF directory and web.xml

 Please give me a quick reply if you know about this.

 Thanks,

--
eagles may soar, but weasels don't get sucked into jet engines
 -- anonymous psycopath on ./
---
Rajeev Jha
Indegene Lifesystems P Ltd.
130, 1st cross , 5th block, kormangla , bang!ore - 95
voice -- +91-80- 55243 14/24

http://www.indegene.com





RE: urgent help please

2001-03-23 Thread Pradeep Kumar

Rajeev,
Thanks for your reply.
I don't see any log file under logs dir.

I have no clue, why the context is not loading and why the log file is not
generated. Please help
pradeep

 -Original Message-
From:   Rajeev Jha [mailto:[EMAIL PROTECTED]] 
Sent:   Friday, March 23, 2001 4:32 AM
To: [EMAIL PROTECTED]
Subject:Re: urgent help please

first thing is to check the log files , if it has something like:
loaded context /abcd
or not.if this context is loaded as per the log files then check the docBase
attribute of your context , whether it is pointing to correct physical
directory
or not. and check for possible case-mismatch also.

Pradeep Kumar wrote:

 Hello all,
 I need some urgent help from you guys.

 I have tomcat 3.2.1 on solaris box. The problem is when start the server,
my
 context is not loading. I have a directory defined under webapps called at
 and it has WEB-INF directory and web.xml

 Please give me a quick reply if you know about this.

 Thanks,

--
eagles may soar, but weasels don't get sucked into jet engines
 -- anonymous psycopath on ./
---
Rajeev Jha
Indegene Lifesystems P Ltd.
130, 1st cross , 5th block, kormangla , bang!ore - 95
voice -- +91-80- 55243 14/24

http://www.indegene.com







jdbc

2001-03-23 Thread affan



Hi All,

Please let me know from where i willdownload 
the JDBC-ODBC Bridge driver for access database. Please give the because i 
search all java site i couldn't got it.

affan


Re: Directory

2001-03-23 Thread Arnaud Vandyck

baumans pascal wrote:
 
 ok but I have 250 text files in this directory and I want to create a html
 link on each of them, in this way I'll have the 250 link on a html page and
 those 250 files will be availlabe for downloading ...
 so Is there another way to do thoses links on a jsp page ?

try {
 File directory = new File("C:\directory");
 if (directory.isDirectory()) {
  String[] filenames = directory.list();
  //or
  // File[] file = directory.listFiles();
  /*
then, you can write the 
a href="%=filename%"%=filename%/a
link.
  */
  }
}
catch(IOException ioex) {}

so you can do this with JSP's, but...

If you want the user to download the txt files, you have to tell the
server (Apache? Tomcat-standalone?) where to find these files by
creating an Alias directive or something else.

Hope it helps.

-- 
Arnaud Vandyck http://www.ressource-toi.org/



RE: EJB

2001-03-23 Thread E. Vinayak

Hi Johnson,

Thanks a lot.

Regards

E. Vinayak
KaNini Consultants Pvt Ltd
7/1, Norton Second Street
Mandaveli, Chennai - 600 028.
Tel: 91-44-4956862
TeleFax: 91-44-4952664
Mobile: 98410 49568


-Original Message-
From: Johnson Lim [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 11:37 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: EJB


Yes,

You can look at www.jboss.org, there are sample how to use EJB using Servlet
on Tomcat

Johnson

-Original Message-
From: E. Vinayak [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 11:31
To: [EMAIL PROTECTED]
Subject: RE: EJB


Hi Fumi,

Thanks. Is there any way we can make EJB work in Tomcat.

Thanks  Regards

E. Vinayak
KaNini Consultants Pvt Ltd
7/1, Norton Second Street
Mandaveli, Chennai - 600 028.
Tel: 91-44-4956862
TeleFax: 91-44-4952664


-Original Message-
From: fumi [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 8:17 PM
To: [EMAIL PROTECTED]
Subject: Re: EJB


Hell No.

fumi




Re: jdbc

2001-03-23 Thread Frank Mau
Title: Re: jdbc




Hi affan,
You find some jdbc-driver and jdbc-odbc-bridges on
http://industry.java.sun.com/products/jdbc/drivers
Have fun
Frank
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]



Ursprngliche Nachricht vom 23.03.01, 12:22:33
Autor: affan [EMAIL PROTECTED]
Thema: jdbc



Hi All,

Please
let me know from where i willdownload the JDBC-ODBC Bridge driver
for access database. Please give the because i search all java site i
couldn't got it.

affan



Re: Possible bug: welcome files and parameters

2001-03-23 Thread S. Schmidt

Remy Maucherat wrote:
  Tomcat 4 will return a 302 (temporary redirect) pointing to
  /news/path_of_the_welcome_file.
  The thing is I don't know if I should include the query parameters in the
  Location header (which is not something I'm doing right now).
 
 Ok, it's a bug. Fixing it now :)
Is there a reason for Tomcat to use a 302 redirect? I think it would be
better to rewrite the request internally, as other servers (i.e. Apache)
do. 
Does the user really need to see what file actually answered the
request?

with kind regards,
Stefan Schmidt



tomcat-IIS

2001-03-23 Thread Pradeep Kumar

Hi,
I am using tomcat 3.2.1 with IIS on win2k.

My requirement is that any request to the site goes via a servlet. So, for
the first request this servlet will forward a homepage.jsp.

Now how do I make this work with IIS and tomcat ?

Thanks,

pradeep



java -server

2001-03-23 Thread Joakim Hellström

Hi!

I'm running tomcat 3.2 on Solaris 2.7 witk jdk 1.3.

If you run tomcat with java -server instead of as default -client does that
improve the overall performance for tomcat??


//  Joakim Hellstrm





tomcat

2001-03-23 Thread baumans pascal

I use Tomcat-standalone But My problem is : I don't know how/where to create 
a alias directive :) There is a file named : my_tomcat_apache.conf, there 
are some alias but the alias I declare on this file don't work... ???

I know how to find the files in java but I cannot propose a download because 
they are outside Root directory...

The question :

How Create an Alias ?

Thank you :o)
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




ODP: Question on import javax.servlet.*;???

2001-03-23 Thread Herchel Wojciech

 I know Ive been at this for bout 6 months now, but what do 
 you mean when you 
 say "'servlet.jar' should be located in the classpath"?
that means that you should compile it with

javac -classpath .;PATH_TO_SERVLET_API YourClass.java

regards,
vVolf



IIS/Tomcat Problems

2001-03-23 Thread Mark Levy

Hello,

I have been trying to use Tomcat through IIS and have run into some
problems.  After fixing my typos and removing the extra space from my
registry name I was able to get the green arrow up for my filter.  I then
tried to go to the examples page, and got the following debug output:

[jk_isapi_plugin.c (418)]: HttpFilterProc started
[jk_isapi_plugin.c (439)]: In HttpFilterProc test redirection of
/examples/jsp/index.html
[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a
match ajp12
[jk_isapi_plugin.c (449)]: HttpFilterProc [/examples/jsp/index.html] is a
servlet url - should redirect to ajp12
[jk_isapi_plugin.c (471)]: HttpFilterProc check if
[/examples/jsp/index.html] is points to the web-inf directory
[jk_isapi_plugin.c (418)]: HttpFilterProc started
[jk_isapi_plugin.c (439)]: In HttpFilterProc test redirection of
/jakarta/isapi_redirect.dll
[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (436)]: jk_uri_worker_map_t::map_uri_to_worker, done
without a match
[jk_isapi_plugin.c (462)]: HttpFilterProc [/jakarta/isapi_redirect.dll] is
not a servlet url
[jk_isapi_plugin.c (471)]: HttpFilterProc check if
[/jakarta/isapi_redirect.dll] is points to the web-inf directory

This is repeated several times as the browser just spins until it times out.
It also appears that some portion of IIS is hosed after this because I
cannot bring up the management console once I try it.

At this point I believe my configuration is correct, but I have no idea what
my next steps should be.

Any help would be greatly appreciated.

Thanks

Mark



context for home directories?

2001-03-23 Thread Jon August


How do I allow users to run jsp or servlets out of their home directories?

For example:

http://www.domain.com/~user/junk.jsp

or

http://www.domain.com/~user/servlet/junkServlet

Thanks,
-Jon





RE: Java application as service

2001-03-23 Thread David Baum

Hei Rajesh,

Don't know if Andy gave you an answere, so here's mine.

I've used JavaService
(http://www.alexandriasc.com/software/JavaService/index.html). It's easy
us install and configure. and it's free :)

"JavaService is a Win32 executable that allows any Java class to be run
as an NT service. It uses JNI's invocation API to create a Java Virtual
Machine using any JNI compliant Java implementation. "

Good luck!

/d.


 -Original Message-
 From: Rajesh Jumde [mailto:[EMAIL PROTECTED]]
 Sent: 22. mars 2001 13:11
 To: [EMAIL PROTECTED]
 Subject: Java application as service
 
 
 Hello Andy,
 
   I want to start my java application as a WINNT/Windows2000
 service.
   What should I do for the same.
   Can you pls suggest me?
 
 Regards,
 Rajesh
 
 



Re: context for home directories?

2001-03-23 Thread baumans pascal


You can use an Alias ...

ps: how to declare an alias with tomcat :) ?

From: Jon August [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: context for home directories?
Date: Fri, 23 Mar 2001 08:35:38 -0500 (EST)


How do I allow users to run jsp or servlets out of their home directories?

For example:

http://www.domain.com/~user/junk.jsp

or

http://www.domain.com/~user/servlet/junkServlet

 Thanks,
   -Jon



_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Re: Apache/Tomcat sendRedirect rpoblem

2001-03-23 Thread Matt Goss

I've also had similar problems. I found that in nested if statements and
if...else iterations, if you don't put a return after the sendredirect
or forward it tries to execute the rest of the code...
Matt Goss

[EMAIL PROTECTED] wrote:
 
 I've been having the same problem sporadically for a while.  I've
 found that I can seemingly fix it if I put a 'return;' at the end of my
 'if(){}' statement before the closing '}' and after the 'response.sendRedirect()'.
 This might cause strange problems I'm not aware of yet.
 
 On Wed, 21 Mar 2001, Robin Green wrote:
 
  "Shay Gabay, Nice-Eye" [EMAIL PROTECTED] wrote:
  I'm having a problem, when a jsp page calls request.sendRedirect to
  redirect to another page, all of the contents of the page doing the
  redirect (starting somewhere in the middle) are output before the contents
  of the target page.
 
  Wrong mail list. Forwarding to tomcat-user...
  _
  Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
 
 

begin:vcard 
n:Goss;Matt
tel;fax:919-657-1501
tel;work:919-657-1432
x-mozilla-html:FALSE
adr:;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Matt
end:vcard



Re: Tomcat-Startup in windows

2001-03-23 Thread Ying Ho

Hi Shlomi,

I tried as you suggested but the nt service does not seems to work. I have
changed the tomcat and jave home to the appropriate path and can setup the NT
Service but it does want to start. I have tried to remove the Nt service using
jk_nt_service and add the NT Service but it still won't let me manually start
the service as it started in NT-Service-howto.html. The methods two that you
suggest works fine so I can't understand why the first method won't work.

My PC Config is:
Win 2000 Pro with SP1.
Apache 1.3 + Tomcat 3.2.1
wrapper.java_home=c:\jdk1.3.0_02
wrapper.tomcat_home="C:\Program Files\Apache Group\jakarta-tomcat-3.2.1"

Thanks,
Ying.

- Original Message -
From: shlomi sarfati
To: [EMAIL PROTECTED]
Sent: Wednesday, March 22, 2000 10:10 AM
Subject: RE: Tomcat-Startup in windows


look there are couple of options
1. make the tomcat as nt service (NT-Service-howto , i am attaching this
document)
in this way the tomcat will run as nt service , it will be loaded every time
after the the computer starts before the  login process
2. put your bat files in your startup directory (i am usint win 2000 :
C:\Documents and Settings\shlomi\Start Menu\Programs\Startup) you can right
click on your start menu button then choose open \ programs \ startup .
in this way the server will start after the user log in .

hope i can help


-Original Message-
From: venkatesan [mailto:[EMAIL PROTECTED]]
Sent: Thu, March 22, 2001 10:54 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Tomcat-Startup in windows


Hi shlomi sarfati,
I tried but server is not starting while i started the system. Can you
give the directory hierarchy so that i will past my *.bat files...

Regards
venkatesh...

shlomi sarfati wrote:

 put tomcat as nt service

 -Original Message-
 From: venkatesan [mailto:[EMAIL PROTECTED]]
 Sent: Thu, March 22, 2001 10:36 AM
 To: tomcat
 Subject: Tomcat-Startup in windows

 Hi All,
I have a tomcat server working fine with Apache in Windows-NT. I
 have a script which starts tomcat before Apache. Can anybody tell that
 where i have to put these script so that tomcat would be started
 automatically while my system restarts

 Thanks in advance
 Regards
 Venkatesh




RE: jdbc

2001-03-23 Thread William Kaufman

Actually, you've already got it: it's part of the standard JRE.

If you want JDBC implementations specific to your database (and you probably
do--the JDBC-ODBC bridge is pretty bad), check with your database vendor.



-- Bill K.

-Original Message-
From: affan [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 3:23 AM
To: [EMAIL PROTECTED]
Subject: jdbc


Hi All,

Please let me know from where i will download the JDBC-ODBC Bridge driver
for access database. Please give the because i search all java site i
couldn't got it.

affan



Embedded Tomcat

2001-03-23 Thread Klaus Sonnenleiter




I've been using Tomcat for quite a while now and 
so far everything was working fine. That is, until I tried to embed Tomcat in 
one of my applications... Is there any documentation that could tell me how to 
do that? I followed the examples in the files EmbededTomcat (3.2.1) and Embedded 
(4.0b1), but in both cases I keep getting the same symptom: At run time, upon 
trying to add any context, I get an AccessControlException (see stacktrace 
below). Please note that I'm trying to access the same directories that work 
perfectly fine in a standalone Tomcat.

ContextManager: Adding context Ctx( 
)cannot process configuration web service using 
/home/klaus/dev/java/jakarta-tomcat-3.2.1/webapps/ROOTSecurity 
init for Context /home/klaus/dev/java/jakarta-tomcat-3.2.1/webapps/ROOT 
failedjava.security.AccessControlException: access 
denied(java.lang.RuntimePermission createClassLoader 
) at 
java.lang.Throwable.fillInStackTrace(Native 
Method) at 
java.lang.Throwable.fillInStackTrace(Compiled 
Code) at 
java.lang.Throwable.init(Compiled 
Code) at 
java.lang.Exception.init(Compiled 
Code) at 
java.lang.RuntimeException.init(RuntimeException.java:47) 
at 
java.lang.SecurityException.init(SecurityException.java:39) 
at 
java.security.AccessControlException.init(AccessControlException.java:57) 
at java.security.AccessControlContext.checkPermission(Compiled 
Code) at 
java.security.AccessController.checkPermission(Compiled 
Code) at 
java.lang.SecurityManager.checkPermission(Compiled 
Code) at 
java.lang.SecurityManager.checkCreateClassLoader(SecurityManager.java:611) 
at 
java.lang.ClassLoader.init(ClassLoader.java:236) 
at 
org.apache.tomcat.loader.AdaptiveClassLoader.init(AdaptiveClassLoader.java:213) 
at 
org.apache.tomcat.loader.AdaptiveServletLoader.init(AdaptiveServletLoader.java:88) 
at org.apache.tomcat.context.LoaderInterceptor.contextInit(Compiled 
Code) at 
org.apache.tomcat.core.ContextManager.initContext(Compiled 
Code) at 
org.apache.tomcat.startup.EmbededTomcat.initContext(Compiled 
Code) at 
TestEmbed.main(TestEmbed.java:14)


running tomcat on Visual age

2001-03-23 Thread Patrick . Pierra

I'can't run tomcat on VA.
I've imported all the tomcat ressources (servlet.jar, jasper.jar,
parser.jar, webserver.jar,.) in VA.
When i'm trying to run the tomcat.class in the webserver package i receive
an error
someone could help me

PP




RE: Java application as service

2001-03-23 Thread Mark Mynsted

Yeah, but I was bitten by the issue where the classpath may only be 256 characters or 
less.  It fails with "operation completed successfully".  Anybody found a good fix for 
that?

 "David Baum" [EMAIL PROTECTED] 3/23/2001 7:41:17 AM 
Hei Rajesh,

Don't know if Andy gave you an answere, so here's mine.

I've used JavaService
(http://www.alexandriasc.com/software/JavaService/index.html). It's easy
us install and configure. and it's free :)

"JavaService is a Win32 executable that allows any Java class to be run
as an NT service. It uses JNI's invocation API to create a Java Virtual
Machine using any JNI compliant Java implementation. "

Good luck!

/d.


 -Original Message-
 From: Rajesh Jumde [mailto:[EMAIL PROTECTED]] 
 Sent: 22. mars 2001 13:11
 To: [EMAIL PROTECTED] 
 Subject: Java application as service
 
 
 Hello Andy,
 
   I want to start my java application as a WINNT/Windows2000
 service.
   What should I do for the same.
   Can you pls suggest me?
 
 Regards,
 Rajesh
 
 





Re: Why is my init method run twice?

2001-03-23 Thread Milt Epstein

On Fri, 23 Mar 2001, [iso-8859-1] Helgesen  Hans Jørgen wrote:

 I'm new to this list, so please forgive me if this question has been raised
 before
 
 I'm running Tomcat 3.2.1, Apache 1.3.12, java 1.2.2 and Redhat 6.2.
 
 I have a servlet to which I want to pass a single parameter via the web.xml
 file (below). I'm obtaining the parameter value by calling
 config.getInitParameter() in the init method of the servlet.
 
 This seems to work fine, the init method is called and the value obtained OK
 when Tomcat is started.
 
 The problem is that when the first request for the servlet arrives, the init
 method is run A SECOND TIME. This time the init parameter IS NOT AVAILABLE.
 
 My theory is that Tomcat calls the init method once for each thread, but if
 that is true, I would expect Tomcat to pass the init parameters each time?
 
 What is wrong?

How are you calling the servlet?  I.e., via what URL?

Note that you can have different servlet definitions (servlet-name)
for the same servlet (i.e. servlet-class), and they are considered
different "instances", such that multiple instances of the servlet
class will be created (meaning init() will be called multiple times),
and only the parameters specified for each definition will be
available to that instance.  It looks like you only have one servlet
definition, but still, if you call the servlet via the class name
directly, it will create a separate instance.  E.g., from what you
have below, if you call /servlet/MyServlet and
/servlet/no.fellesdata.MyServlet, two separate instances will be
created.


 BTW, I can't get the servlet-mapping to work either. Any obvious errors?

What exact URLs are you trying?  What happens when you try them?
Perhaps you haven't specified the appropriate directives in your
apache/tomcat conf file to tell apache to pass it to tomcat for that
URL.


 Here is my web.xml file:
 
 !DOCTYPE web-app
 PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
 "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"
 
 web-app
   display-nameMy test application/display-name
   description
 Description of my test application
   /description
 
   servlet
 servlet-nameMyServlet/servlet-name
 description
   Description of my servlet
 /description
 
 servlet-classno.fellesdata.MyServlet/servlet-class
 
 init-param
   param-nameConfigFile/param-name
  
 param-value/usr/local/jakarta-tomcat/webapps/poes/WEB-INF/myservlet.config
 /param-value
 /init-param
 
load-on-startup5/load-on-startup
   /servlet
 
   servlet-mapping
 servlet-nameMyServlet/servlet-name
 url-pattern/MyServlet/url-pattern
   /servlet-mapping
 
 /web-app
 
 
 And here is part of my servlet code:
 
 public void init (ServletConfig config) throws ServletException
 {
   super.init(config);
   bla-bla-bla.
   // Load configfile if it exists.
   configfile = config.getInitParameter("ConfigFile");
   if (null == configfile) {
 configfile = "default.value";
   }
 }
   
 

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




Re: Logging in tomcat

2001-03-23 Thread Mark Mynsted

I think the simplest way is to just use
application.log("This is a message to be logged");

This goes to the Servlet.log.  A little better maybe would be to define something like:
String logHeader = request.getServletPath() + ": ";

Then use
application.log(logHeader + "This is a message to be logged.");

This way the log message will be prefixed with the servlet generating the message.

The "application" variable is automatically defined for the service method.

 tomcat user [EMAIL PROTECTED] 3/22/2001 3:04:12 PM 
I am a new user to the Tomcat world.

I haven't found much info on logging in tomcat. Is there somewhere I can go
to look up this info?

How does logging work in tomcat. If I write system.out's, will I see those
on the tomcat console? Or, does this have to go through logging? If so, how
would I invoke the logging mechanism?

I'm just interested in getting debug info out of Tomcat.

Thanks


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





RE: Tomcat dies on OS X

2001-03-23 Thread Steve Fyfe

It runs fine for me when I start it from a Terminal window using the Tomcat.sh script. 
I did make sure to define the TOMCAT_HOME and JAVA_HOME environment variables first. 
And I am using it with Apache, not standalone.

How did you get it started? What exactly did you get for a stack trace? You may need 
to enable more logging options to track down the problem.

Steve Fyfe
CNI Corporation
Milford New Hampshire

[EMAIL PROTECTED]
(603) 673-6600

-Original Message-
From:   [EMAIL PROTECTED] 
Sent:   Thursday, March 22, 2001 12:31 PM
To: [EMAIL PROTECTED]
Subject:Tomcat dies on OS X

I'm running tomcat 3.2.1. on Mac OS X Public Beta and after starting
tomcat up, it will suddenly die not respond...When I shut it down it
throws me some errors pertaining to the HttpConnectionHandler class.

When I try to startup again, it throws the same error.  If I change the
port number in server.xml and restart the whole problematic cycle starts
again.

I've narrowed down some specific behaviors like:
- when I start tomcat, I can access the main page at http://localhost:port
- context manager recognizes and sets the appropriate paths for my
  servlets and jsps
- when I try to access my servlets/jsps, tomcat suddenly does not respond
  and thats where the trouble starts...

if anyone has any insights or information about this behavior, pls let me
know...

// s a n d e e p
// [EMAIL PROTECTED]




Problem consulting database

2001-03-23 Thread João Folha



Hi there.

In my very simple web application where i consult a 
ms access database db.mdb. Somehow a new file is created 
db.ldb.
Why this happen can i control 
that?

jfolha


Re: running tomcat on Visual age

2001-03-23 Thread Martin Mauri

It would be useful for us that you send that error...

 I'can't run tomcat on VA.
 I've imported all the tomcat ressources (servlet.jar, jasper.jar,
 parser.jar, webserver.jar,.) in VA.
 When i'm trying to run the tomcat.class in the webserver package i receive
 an error
 someone could help me

 PP




oracle JDBC doesn't work

2001-03-23 Thread Jack Li


I got message "Connection refused: no further information". Here are the
settings:

1. We are using Oracle 7.3. The database server name is storedb.
2. I downloaded oracle jdbc driver from Oracle.com. The downloaded driver is
Oracle 7 driver for NT. It has classes102.zip and classes111.zip and two
dlls.
3. I put calsses111.zip into c:\jdk1.3\bin and add "c:\jdk1.3\bin" to
CLASSPATH and PATH
4. test the connection in jsp as:
try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection  con = DriverManager.getConnection("jdbc:oracle:thin:storedb",
"username", "password");
}
catch(SQLException e){
out.println(e.getMessage());
}

The username and password are good. I can make connection using jdbc-odbc
bridge.
What's the problem do I have with oracle JDBC?

Thanks,
Jack Li

-Original Message-
From: Bryant, William [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 9:21 AM
To: [EMAIL PROTECTED]
Subject: RE: JDBC driver for oracle




You can get the JDBC drivers from Oracle.com.  Select download, then choose
'JDBC drivers' from teh drop down list.  You will need a free oracle technet
login.

... Mike

-Original Message-
From: Jack Li [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 9:11 AM
To: [EMAIL PROTECTED]
Subject: JDBC driver for oracle


Hi,

Where can I have a free JDBC driver for oracle?

Thanks,
Jack





RE: Problem consulting database

2001-03-23 Thread CAJIGA,JAVIER (Non-HP-USA,ex1)

You could find the explanation of this in Article Q136128 at
 
http://search.support.microsoft.com/kb/c.asp?FR=0
http://search.support.microsoft.com/kb/c.asp?FR=0SA=GNLNG=ENG
SA=GNLNG=ENG
 
select your criteria as :
 
ACCESS
ldb

-Original Message-
From: Joo Folha [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 10:19 AM
To: [EMAIL PROTECTED]
Subject: Problem consulting database


Hi there.
 
In my very simple web application where i consult a ms access database
db.mdb. Somehow a new file is created db.ldb.
 Why this happen can i control that?
 
jfolha




Re: Problem consulting database

2001-03-23 Thread Steve Ruby

Joo Folha wrote:
 
 Hi there.
 
 In my very simple web application where i consult a ms access database  db.mdb. 
Somehow a new file is created db.ldb.
  Why this happen can i control that?
 
 jfolha

That is just microsofts external lock file so other programs
accessing the file do so in a friendly way.  Since access
has no database server the locks have to be shared somewhere.

The file should be small and you don't want to control it.



Re: Apache/Tomcat sendRedirect rpoblem

2001-03-23 Thread David Wall

 I've also had similar problems. I found that in nested if statements and
 if...else iterations, if you don't put a return after the sendredirect
 or forward it tries to execute the rest of the code...
 Matt Goss

As far as I know, servlet containers are not supposed to break the rules of
Java programming.  A sendredirect sends a redirect response to a client, but
it's not a return from a method call.  If you want to return after it, then
return.  Otherwise the correct thing a program should do is continue to the
next statement in the code.  Don't you think? wink

David




RE: iPlanet How To = Netscape How-To ???

2001-03-23 Thread Dianne Cree
Title: "iPlanet How To" = "Netscape How-To" ???



Doesn't the 
latest iPlanet support jsp and servlets by itself. I think it does. 
Why would you need Tomcat if that's the case?

  -Original Message-From: Hawkins, Keith (Keith) 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, March 22, 2001 12:47 
  PMTo: tomcat-userSubject: "iPlanet How To" = "Netscape 
  How-To" ???
  If I want to set up iPlanet4.0 to redirect 
  JSP/Servlet requests to Tomcat do I follow 
  the instructions provided in Netscape How-To document or are there other instructions that must be followed?? 
  
  Anyone who actually has Tomcat running as the 
  servlet engine for iPlanet please feel free 
  to respond. Yes that means you. Don't just sit there. 
  Send a reply. 
  Thanks, Keith 


RE: Tomcat-Startup in windows

2001-03-23 Thread Dianne Cree

I just have a shortcut to the startup.bat file in my C:\Documents and
Settings\shlomi\Start Menu\Programs\Startup.  It works fine for me. I don't
have it running as an nt service.

-Original Message-
From: Elizabeth Riley [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 6:17 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Tomcat-Startup in windows


Does this mean that if I have started tomcat using the bat file and I have
started the service, then I have tomcat running twice?

-Original Message-
From: shlomi sarfati [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 22, 2000 4:11 AM
To: [EMAIL PROTECTED]
Subject: RE: Tomcat-Startup in windows


look there are couple of options
1. make the tomcat as nt service (NT-Service-howto , i am attaching this
document)
in this way the tomcat will run as nt service , it will be loaded every time
after the the computer starts before the  login process
2. put your bat files in your startup directory (i am usint win 2000 :
C:\Documents and Settings\shlomi\Start Menu\Programs\Startup) you can right
click on your start menu button then choose open \ programs \ startup .
in this way the server will start after the user log in .

hope i can help


-Original Message-
From: venkatesan [mailto:[EMAIL PROTECTED]]
Sent: Thu, March 22, 2001 10:54 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Tomcat-Startup in windows


Hi shlomi sarfati,
I tried but server is not starting while i started the system. Can you
give the directory hierarchy so that i will past my *.bat files...

Regards
venkatesh...

shlomi sarfati wrote:

 put tomcat as nt service

 -Original Message-
 From: venkatesan [mailto:[EMAIL PROTECTED]]
 Sent: Thu, March 22, 2001 10:36 AM
 To: tomcat
 Subject: Tomcat-Startup in windows

 Hi All,
I have a tomcat server working fine with Apache in Windows-NT. I
 have a script which starts tomcat before Apache. Can anybody tell that
 where i have to put these script so that tomcat would be started
 automatically while my system restarts

 Thanks in advance
 Regards
 Venkatesh






RE: oracle JDBC doesn't work

2001-03-23 Thread William Kaufman

Note that this probably isn't a Tomcat question.  Can you create the
connection outside Tomcat, in your own application?  If not, you've got a
JDBC problem that JDBC people could help you with.  (Or really, Oracle
people: Do a search on Deja in comp.databases.oracle.* for "Connection
refused" to see how common this problem is,...)


-- Bill K.


 -Original Message-
 From: Jack Li [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 23, 2001 7:32 AM
 To: [EMAIL PROTECTED]
 Subject: oracle JDBC doesn't work
 
 
 
 I got message "Connection refused: no further information". 
 Here are the
 settings:
 
 1. We are using Oracle 7.3. The database server name is storedb.
 2. I downloaded oracle jdbc driver from Oracle.com. The 
 downloaded driver is
 Oracle 7 driver for NT. It has classes102.zip and 
 classes111.zip and two
 dlls.
 3. I put calsses111.zip into c:\jdk1.3\bin and add "c:\jdk1.3\bin" to
 CLASSPATH and PATH
 4. test the connection in jsp as:
 try{
   DriverManager.registerDriver(new 
 oracle.jdbc.driver.OracleDriver());
   Connection  con = 
 DriverManager.getConnection("jdbc:oracle:thin:storedb",
 "username", "password");
   }
   catch(SQLException e){
   out.println(e.getMessage());
   }
 
 The username and password are good. I can make connection 
 using jdbc-odbc
 bridge.
 What's the problem do I have with oracle JDBC?
 
 Thanks,
 Jack Li
 
 -Original Message-
 From: Bryant, William [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 9:21 AM
 To: [EMAIL PROTECTED]
 Subject: RE: JDBC driver for oracle
 
 
 
 
 You can get the JDBC drivers from Oracle.com.  Select 
 download, then choose
 'JDBC drivers' from teh drop down list.  You will need a free 
 oracle technet
 login.
 
 ... Mike
 
 -Original Message-
 From: Jack Li [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 9:11 AM
 To: [EMAIL PROTECTED]
 Subject: JDBC driver for oracle
 
 
 Hi,
 
 Where can I have a free JDBC driver for oracle?
 
 Thanks,
 Jack
 
 



Running my first servlet...doesn't display

2001-03-23 Thread Joel R. Cochran

Hello again from Super Newbie...

I (finally) got Tomcat installed on my Win98 machine:
1.  I have Tomcat started.
2.  I have my CLASSPATH set to include servlet.jar and jasper.jar
3.  I have a compiled class called MyFirstServlet.class in
c:/jsp/tomcat/webapps/ROOT/INF-WEB/classes
(This is just a typical "Hello World" file)
4.  In my browser I have entered http://localhost/servlet/MyFirstServlet
5.  I get a response saying "The Page Cannot Be Displayed" (standard
unavailable script).

Anyone know why???  I also tried replacing the "/servlet" with the full
path, but to no avail. HELP!

Joel



RE: Why is my init method run twice?

2001-03-23 Thread Milt Epstein

On Fri, 23 Mar 2001, Pradeep Kumar wrote:

 The Servlet specification says that, that the container should
 guarantee only one instance of the servlet. However some of the
 container do maintain a small of pool of servlet instances and
 manage them. For example there are 3 instances of a servlet in the
 pool, and if there are 300 requests, each instance spawns off 100
 threads for 100 requests.  I don't know how far this is true with
 Tomcat. In general you should not make any assumptions about the
 number of instances of your servlet.

Actually, starting with the 2.2 spec, the spec is pretty specific
about the number of instances of each servlet that should be created.
Basically, if the servlet doesn't implement SingleThreadModel, it's
one instance per servlet definition; if it does implement
SingleThreadModel, then a pool of instances may be created to offset
the performance penalty (but there are many good reasons that you
shouldn't implement SingleThreadModel -- basically, it's misleading,
and doesn't necessarily guarantee thread safety, and it's not a clean
solution -- best is to design your servlet to be thread safe, adding
synchronization where needed -- this has been discussed extensively on
sun's servlet-interest mailing list).


  -Original Message-
 From: Milt Epstein [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, March 23, 2001 8:17 PM
 To:   'Tomcat'
 Subject:  Re: Why is my init method run twice?
 
 On Fri, 23 Mar 2001, [iso-8859-1] Helgesen  Hans Jørgen wrote:
 
  I'm new to this list, so please forgive me if this question has been raised
  before
  
  I'm running Tomcat 3.2.1, Apache 1.3.12, java 1.2.2 and Redhat 6.2.
  
  I have a servlet to which I want to pass a single parameter via the web.xml
  file (below). I'm obtaining the parameter value by calling
  config.getInitParameter() in the init method of the servlet.
  
  This seems to work fine, the init method is called and the value obtained
 OK
  when Tomcat is started.
  
  The problem is that when the first request for the servlet arrives, the
 init
  method is run A SECOND TIME. This time the init parameter IS NOT AVAILABLE.
  
  My theory is that Tomcat calls the init method once for each thread, but if
  that is true, I would expect Tomcat to pass the init parameters each time?
  
  What is wrong?
 
 How are you calling the servlet?  I.e., via what URL?
 
 Note that you can have different servlet definitions (servlet-name)
 for the same servlet (i.e. servlet-class), and they are considered
 different "instances", such that multiple instances of the servlet
 class will be created (meaning init() will be called multiple times),
 and only the parameters specified for each definition will be
 available to that instance.  It looks like you only have one servlet
 definition, but still, if you call the servlet via the class name
 directly, it will create a separate instance.  E.g., from what you
 have below, if you call /servlet/MyServlet and
 /servlet/no.fellesdata.MyServlet, two separate instances will be
 created.
 
 
  BTW, I can't get the servlet-mapping to work either. Any obvious errors?
 
 What exact URLs are you trying?  What happens when you try them?
 Perhaps you haven't specified the appropriate directives in your
 apache/tomcat conf file to tell apache to pass it to tomcat for that
 URL.
 
 
  Here is my web.xml file:
  
  !DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
  "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"
  
  web-app
display-nameMy test application/display-name
description
  Description of my test application
/description
  
servlet
  servlet-nameMyServlet/servlet-name
  description
Description of my servlet
  /description
  
  servlet-classno.fellesdata.MyServlet/servlet-class
  
  init-param
param-nameConfigFile/param-name
   
 
 param-value/usr/local/jakarta-tomcat/webapps/poes/WEB-INF/myservlet.config
  /param-value
  /init-param
  
 load-on-startup5/load-on-startup
/servlet
  
servlet-mapping
  servlet-nameMyServlet/servlet-name
  url-pattern/MyServlet/url-pattern
/servlet-mapping
  
  /web-app
  
  
  And here is part of my servlet code:
  
  public void init (ServletConfig config) throws ServletException
  {
  super.init(config);
  bla-bla-bla.
  // Load configfile if it exists.
  configfile = config.getInitParameter("ConfigFile");
  if (null == configfile) {
configfile = "default.value";
  }
  }
  
  
 
 Milt Epstein
 Research Programmer
 Software/Systems Development Group
 Computing and Communications Services Office (CCSO)
 University of Illinois at Urbana-Champaign (UIUC)
 [EMAIL PROTECTED]
 
 
 

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of 

Re: Possible bug: welcome files and parameters

2001-03-23 Thread Remy Maucherat

 Remy Maucherat wrote:
   Tomcat 4 will return a 302 (temporary redirect) pointing to
   /news/path_of_the_welcome_file.
   The thing is I don't know if I should include the query parameters in
the
   Location header (which is not something I'm doing right now).
 
  Ok, it's a bug. Fixing it now :)
 Is there a reason for Tomcat to use a 302 redirect? I think it would be
 better to rewrite the request internally, as other servers (i.e. Apache)
 do.
 Does the user really need to see what file actually answered the
 request?

No, but in the general case we have to do a HTTP redirect because the
servlet API allows welcome files like foo/index.html, in which case :
- the links would be broken
- the security constraints would be ignored

Eventually, we could add something smarter (which would look if the welcome
file is in the same directory), but I'll save that for the next release.

Remy




RE: oracle JDBC doesn't work

2001-03-23 Thread George McKInney

I think that (not being a DB guru):
   Connection  con = 
 DriverManager.getConnection("jdbc:oracle:thin:storedb",
 "username", "password");
   }

should be more like:

...
DriverManager.getConnection("jdbc:oracle:thin:@storedb",
...

note the '@' between "thin:" and "storedb" (and the colon is necessary)

Our setup uses (though the format above may work for you):

"jdbc:oracle:thin:@abc.def.com:1521:SID"

where:
abc.def.com is the machine name
1521 is the port to connect to
SID is the database identifier.

Hope this helps.

George McKinney, Developer
tantalus communications inc.
500-1122 Mainland Street
Vancouver, BC, Canada V6B 5L1
[EMAIL PROTECTED]

Direct  604.726.6753
Main604.609.0700
Fax 604.609.0705
www.tantalus.com
"When eBusiness experience counts."


 -Original Message-
 From: Jack Li [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 23, 2001 7:32 AM
 To: [EMAIL PROTECTED]
 Subject: oracle JDBC doesn't work
 
 
 
 I got message "Connection refused: no further information". 
 Here are the
 settings:
 
 1. We are using Oracle 7.3. The database server name is storedb.
 2. I downloaded oracle jdbc driver from Oracle.com. The 
 downloaded driver is
 Oracle 7 driver for NT. It has classes102.zip and 
 classes111.zip and two
 dlls.
 3. I put calsses111.zip into c:\jdk1.3\bin and add "c:\jdk1.3\bin" to
 CLASSPATH and PATH
 4. test the connection in jsp as:
 try{
   DriverManager.registerDriver(new 
 oracle.jdbc.driver.OracleDriver());
   Connection  con = 
 DriverManager.getConnection("jdbc:oracle:thin:storedb",
 "username", "password");
   }
   catch(SQLException e){
   out.println(e.getMessage());
   }
 
 The username and password are good. I can make connection 
 using jdbc-odbc
 bridge.
 What's the problem do I have with oracle JDBC?
 
 Thanks,
 Jack Li
 
 -Original Message-
 From: Bryant, William [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 9:21 AM
 To: [EMAIL PROTECTED]
 Subject: RE: JDBC driver for oracle
 
 
 
 
 You can get the JDBC drivers from Oracle.com.  Select 
 download, then choose
 'JDBC drivers' from teh drop down list.  You will need a free 
 oracle technet
 login.
 
 ... Mike
 
 -Original Message-
 From: Jack Li [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 9:11 AM
 To: [EMAIL PROTECTED]
 Subject: JDBC driver for oracle
 
 
 Hi,
 
 Where can I have a free JDBC driver for oracle?
 
 Thanks,
 Jack
 
 
 



RE: running tomcat on Visual age

2001-03-23 Thread Kirill Vasiliev

Hi!

Did you import _resources_ (org.apache.tomcat.resources) too? They
aren't classes, they are .properties and .dtd.
This may be done in import window in VA. You also need to copy "conf"
directory from Tomcat installation to
VA_install_dir/ide/project_resources/name_of_Tomcat_project. You
also need to setup property "tomcat.home" for Tomcat project in VA -
this may be done by right click on org.apache.tomcat.startup.Tomcat
class, select Properties - the Properties window appears. Select Program
tab, in "Properties" textarea enter:
tomcat.home=VA_install_dir/ide/project_resources/name_of_Tomcat_proje
ct. Note that path must be whithout quotes even it contains spaces.
Next you'll need some classpath tuning in same window on Class Path tab.

I did it all and I have Tomcat 3.2.1 working in VA 3.5. Next my step
will be Tomcat's JSP compiling within VA...

Cheers,
Kirill Vasiljev

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 23, 2001 5:42 PM
 To: [EMAIL PROTECTED]
 Subject: running tomcat on Visual age
 
 
 I'can't run tomcat on VA.
 I've imported all the tomcat ressources (servlet.jar, jasper.jar,
 parser.jar, webserver.jar,.) in VA.
 When i'm trying to run the tomcat.class in the webserver 
 package i receive
 an error
 someone could help me
 
 PP
 
 



Re: Compatibility with different flavors of UNIX

2001-03-23 Thread John P. Dodge

I don't know about AIX but building mod_jk on HPUX is problematic to the
point of being unworkable. On HPUX apache, mod_ssl, tomcat build fine. As
a side note HP is bundling Apache-mod_ssl-mod_jserv-Tomcat with
HPUX11.11.

On Fri, 23 Mar 2001, Simon McMenzie wrote:

 Will the components above ALL run on HP and AIX? More specifically, when
 building mod_jk on Solaris, one runs
 
 


"Mon aeroglisseur est plein d'anguilles"

John P. Dodge
Boeing Shared Services Group





Re: context for home directories?

2001-03-23 Thread Shun-Luoi Daniel Fong

I want to do the same thing Jon wants to do. When I type in my url,
http://agent.eng.uiowa.edu/~sdfong/rubyfong/gamezone/testex.jsp
I get a 404 File not Found.

I also get this message in my jasper.log

2001-03-23 11:47:09 - JspEngine -- /~sdfong/rubyfong/gamezone/testex.jsp
2001-03-23 11:47:09 -ServletPath: /~sdfong/rubyfong/gamezone/testex.jsp
2001-03-23 11:47:09 -   PathInfo: null
2001-03-23 11:47:09 -   RealPath: 
/usr/java/jakarta-tomcat-3.2.1/webapps/ROOT/~sdfong/rubyfong/gamezone/testex.jsp
2001-03-23 11:47:09 - RequestURI: /~sdfong/rubyfong/gamezone/testex.jsp
2001-03-23 11:47:09 -QueryString: null
2001-03-23 11:47:09 - Request Params:
2001-03-23 11:47:09 - Classpath according to the Servlet Engine is: 
/usr/java/jakarta-tomcat-3.2.1/webapps/ROOT/WEB-INF/classes

I'm not sure how to fix it. 

Baumans, you say to us an Alias. That may be a really simple thing to do,
but I don't know how to. I'm pretty new to this stuff and have read
through the manuals, but haven't gotten anywhere with it. I've been
struggling with this problem for almost two weeks now, so if you could
give me directions on how to fix it so that it can find .jsp files in my
home directory, I would really appreciate it.

thanks,
Luoi




On Fri, 23 Mar 2001, baumans pascal wrote:

 
 You can use an Alias ...
 
 ps: how to declare an alias with tomcat :) ?
 
 From: Jon August [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: context for home directories?
 Date: Fri, 23 Mar 2001 08:35:38 -0500 (EST)
 
 
 How do I allow users to run jsp or servlets out of their home directories?
 
 For example:
 
 http://www.domain.com/~user/junk.jsp
 
 or
 
 http://www.domain.com/~user/servlet/junkServlet
 
  Thanks,
  -Jon
 
 
 
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
 
 

-- 
D. Shun-Luoi Fong
821 Melrose Avenue
Iowa City, IA 52246
email: [EMAIL PROTECTED]

---
Colossions 2:8 See to it that no one takes you captive through philosophy
or empty deception, according to the traditions of men, according to the
elementary principles of the world, rather than according to Christ.
---





Re: Possible bug: welcome files and parameters

2001-03-23 Thread S. Schmidt

  That way the image data gets corrupted. Isn't this information supposed
  to be in the HTTP Headers, and not in my output?
 
 This corruption is produced by an HTTP/1.1 transfer encoding called
 chunking. Its support is mandatory in HTTP/1.1. Which HTTP client are you
 using ?
 If you're directly talking on the socket or using a client without real
 support for HTTP/1.1, you may want to make a request using HTTP/1.0 (which
 doesn't have chunking), or set the content length of the response (in which
 case chunking will not be used).

I'm using Netscape 4.76 and Konqueror 2.1, and I tried Mozilla Seamonkey
on Windows. They all don't display the images correctly, and when I save
them to disk the files contain these "chunking" lines at start.

I also tried to set the content length, as you said, but that didn't
help: This is what's in the file before the jpeg data when I save it to
disk:
--- snip ---
HTTP/1.1 200 OK
Content-Type: image/jpeg
 
Content-Length: 108381
Date: Fri, 23 Mar 2001 17:44:30 GMT
Server: Apache Tomcat/4.0-b1 (HTTP/1.1 Connector)
--- snap ---
 

My code looks like this now (it worked with Resin, so I think it is all
right):
--- snip ---
// now, did we get the data? if yes, copy it
// to the response:
if ((blob != null)  (contentType != null)) {

response.setContentType (contentType);
response.setContentLength ((int) blob.length ());

ServletOutputStream out = 
response.getOutputStream ();

byte b[];
long toRead = blob.length ();
long read = 0;
while (toRead  0) {
b = blob.getBytes (read, 
(toRead  1024) ? 1024 : (int)toRead);
toRead -= b.length;
read += b.length;
out.write (b);
}

out.flush ();
out.close ();
--- snap ---



Please have a look at this problem.

with kind regards,
Stefan Schmidt



RE: Tomcat-Startup in windows

2001-03-23 Thread Darrell Porter

The only way I have gotten this to successfully work is to install TweakUI
on the NT/2000 box and set it to login automatically as a non-Administrator
user that has appropriate rights.

On startup, NT/2000 logs in and the Startup folder contains the script which
starts Tomcat, pauses for stabilization, checks to insure Tomcat is running,
and then starts Apache.

Darrell


-Original Message-
From: venkatesan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 12:36 AM
To: tomcat
Subject: Tomcat-Startup in windows


Hi All,
   I have a tomcat server working fine with Apache in Windows-NT. I
have a script which starts tomcat before Apache. Can anybody tell that
where i have to put these script so that tomcat would be started
automatically while my system restarts

Thanks in advance
Regards
Venkatesh



Re: Linux IBM JDK + Tomcat + SMP hangs

2001-03-23 Thread Bill Graham

hi Edward,

I've been having similar problems doing load testing
with standalone Tomcat 3.2.1 with the 2.2.16 kernal
with glibc2.1.3-15.

I downloaded the most recent build of IBM's VM,
cx130-20010207 and have been having much better
results as far as VM stability is concerned. I ran my
test on a uniprocessor kernal and got great results.
Changing to the SMP kernel, the VM's still stable, but
I'm getting a lot of NullPointerExceptions. I'm
looking into that now, I think it could be a Tomcat
problem though.

bill

--- Chong Yu Meng [EMAIL PROTECTED] wrote:
 Hello Edward :
 
 I believe your glibc version is causing the problems
 you are seeing. I never
 had any luck with glibc2.2 on my Caldera OpenLinux
 eDesktop 2.4 box. On the
 IBM Java on Linux newsgroup, someone claims to be
 successful using the i386
 version of glibc instead of i686, and I seem to
 remember someone on the same
 newsgroup saying that Red Hat has issued a fix for
 it.
 Hope this helps. For myself, I am still using
 glibc-2.1.3.
 
 Regards,
 Pascal Chong
 
 
 
 - Original Message -
 From: "Edward MacGillivray" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, March 23, 2001 8:35 AM
 Subject: Re: Linux IBM JDK + Tomcat + SMP hangs
 
 
  On Sun, 7 Jan 2001 22:42:18 -0500
   "brien" [EMAIL PROTECTED] wrote:
   Hi,
  
   I've been having a really tough time to say the
 least
   trying to get the
   IBM JDK 1.3 to work on an SMP machine under
 linux.  I
   don't think my
   problem is unique.  The JDK hangs, consuming 99%
 of the
   CPU.
  
   From what I can tell, this problem is specific
 to the
   IBM JDK 1.3 on SMP
   machines.  I've read just about every message on
 the ibm
   linux java
   newsgroup, and the typical solution offered is
 always to
   install
   glibc 2.1.3-21.  Without doing this I had
 instant hangs
   as soon as I ran
   tomcat.  After updating glibc, the hangs take a
 little
   while to occur, but
   they are still present and persistent.
  
   Unfortunately, I'm also bound to using DB2 on
 the
   database side, and
   IBM tech support has stated that they do not
 support
   sun's jdk.
  
   If anyone can help me out I'd greatly appreciate
 it.
  
   my environment is:
   dual p3/866 + 512mb (dell poweredge 2450)
   redhat linux 6.2
   kernel 2.2.16 SMP
   glibc-2.1.3-21
   apache tomcat 3.2.1 (also tried 3.1.1)
  
   IBM JDK:
   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))
  
   brien
 
  Has anyone else had this problem? because it
 appears as
  though I am having it too.  I have search my
 archive of
  Tomcat-User posts and the web for information on
 Tomcat
  hanging under linux SMP.  I found the above post
 but no
  replies to it.
 
  I have successfully installed the webapp I have to
 three
  different single processor computers but the one I
 want it
  on is multi proc and does not want to work.  I
 have been
  working with Tomcat 3.1 on all of the single proc
 boxes and
  initially used 3.1 on the multi proc.  The
 application was
  able to function just as it had on the other boxes
 but
  within a few minutes the application had hung and
 was not
  responding to jsp or servlet requests.  When the
 application
  got to this state though the Tomcat program was
 unable to
  stop itself, so I had to start killing processes.
 
  I then figured that possibly it was 3.1 that had a
 problem,
  so I went and got Tomcat 3.2.1.  However, this was
 pretty
  much a step backward, because with 3.2.1 the
 webapp is never
  able to work.  What's worse is that running the
 Tomcat
  shutdown script, even immediately after running
 the startup
  script, Tomcat is unable to stop itself.
 
  I can't say that I have much experience with
 Tomcat 3.2.1,
  however the mod_jk.log file indicates that it is
 finding a
  worker and the web browser accessing the webapp
 spins until
  apache times out.  I am confident that Apache is
 configured
  properly.
 
  The box's environ is
  3 * p-pro/200 + 256Mb
  Redhat Linux 6.2, kernel 2.2.14smp
  Apache 1.2.19
  Tomcat 3.2.1 using mod_jk (also happens with 3.1
 using
  mod_jserv)
  glibc 2.2.2
 
  thanks
  mac
 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



Win service logout problem

2001-03-23 Thread Peterson, Lance
Title: Win service logout problem





Has anyone heard whether/when Sun will release an update to JDK 1.3 that will keep jk_nt_service.exe from dying at logout? Or is this something to be fixed in tomcat?

Thanks,
Lance Peterson
Verticore Technologies Inc.
(801) 453 9111
www.verticore.com





Re: Running my first servlet...doesn't display

2001-03-23 Thread T. Park


have you tried:
http://localhost:8080/servlet/MyFirstServlet


"Joel R. Cochran" wrote:
Hello again from Super Newbie...
I (finally) got Tomcat installed on my Win98 machine:
1. I have Tomcat started.
2. I have my CLASSPATH set to include servlet.jar and jasper.jar
3. I have a compiled class called MyFirstServlet.class in
c:/jsp/tomcat/webapps/ROOT/INF-WEB/classes
 (This is just a typical
"Hello World" file)
4. In my browser I have entered http://localhost/servlet/MyFirstServlet
5. I get a response saying "The Page Cannot Be Displayed" (standard
unavailable script).
Anyone know why??? I also tried replacing the "/servlet" with
the full
path, but to no avail. HELP!
Joel

--
http://www.borland.com/newsgroups
http://www.borland.com/devsupport/disclaim.html



Tomcat and Jsp files

2001-03-23 Thread Chris Andreou

Hi I am using Tomcat 3.2.1 and Apache on an Nt platform. My confusion is
this: 
In http.conf file I have :

JkMount /*.jsp ajp12
JkMount /servlet/* ajp12

Should all the .jsp files be under the webapps directory? I have a jsp file
under my webroot Apache directory but Tomcat does not see it? 

Thanks

Chris



RE: oracle JDBC doesn't work

2001-03-23 Thread Jack Li

George McKinney,
Thank you. Your reply realy helped me. Now the jdbc works fine.

Thanks again,
Jack Li

-Original Message-
From: George McKInney [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 12:28 PM
To: [EMAIL PROTECTED]
Subject: RE: oracle JDBC doesn't work


I think that (not being a DB guru):
   Connection  con = 
 DriverManager.getConnection("jdbc:oracle:thin:storedb",
 "username", "password");
   }

should be more like:

...
DriverManager.getConnection("jdbc:oracle:thin:@storedb",
...

note the '@' between "thin:" and "storedb" (and the colon is necessary)

Our setup uses (though the format above may work for you):

"jdbc:oracle:thin:@abc.def.com:1521:SID"

where:
abc.def.com is the machine name
1521 is the port to connect to
SID is the database identifier.

Hope this helps.

George McKinney, Developer
tantalus communications inc.
500-1122 Mainland Street
Vancouver, BC, Canada V6B 5L1
[EMAIL PROTECTED]

Direct  604.726.6753
Main604.609.0700
Fax 604.609.0705
www.tantalus.com
"When eBusiness experience counts."


 -Original Message-
 From: Jack Li [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 23, 2001 7:32 AM
 To: [EMAIL PROTECTED]
 Subject: oracle JDBC doesn't work
 
 
 
 I got message "Connection refused: no further information". 
 Here are the
 settings:
 
 1. We are using Oracle 7.3. The database server name is storedb.
 2. I downloaded oracle jdbc driver from Oracle.com. The 
 downloaded driver is
 Oracle 7 driver for NT. It has classes102.zip and 
 classes111.zip and two
 dlls.
 3. I put calsses111.zip into c:\jdk1.3\bin and add "c:\jdk1.3\bin" to
 CLASSPATH and PATH
 4. test the connection in jsp as:
 try{
   DriverManager.registerDriver(new 
 oracle.jdbc.driver.OracleDriver());
   Connection  con = 
 DriverManager.getConnection("jdbc:oracle:thin:storedb",
 "username", "password");
   }
   catch(SQLException e){
   out.println(e.getMessage());
   }
 
 The username and password are good. I can make connection 
 using jdbc-odbc
 bridge.
 What's the problem do I have with oracle JDBC?
 
 Thanks,
 Jack Li
 
 -Original Message-
 From: Bryant, William [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 9:21 AM
 To: [EMAIL PROTECTED]
 Subject: RE: JDBC driver for oracle
 
 
 
 
 You can get the JDBC drivers from Oracle.com.  Select 
 download, then choose
 'JDBC drivers' from teh drop down list.  You will need a free 
 oracle technet
 login.
 
 ... Mike
 
 -Original Message-
 From: Jack Li [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 9:11 AM
 To: [EMAIL PROTECTED]
 Subject: JDBC driver for oracle
 
 
 Hi,
 
 Where can I have a free JDBC driver for oracle?
 
 Thanks,
 Jack
 
 
 




Re: Compatibility with different flavors of UNIX

2001-03-23 Thread DONNIE HALE

Simon,

I've had to build mod_jserv for AIX (haven't tried mod_jk). As "shipped", it wouldn't 
build. As I recall, the link step failed miserably. I was able to find instructions 
(the actual linker command line) by doing some strange search in Google. I did put the 
command line in a shell script, so if you need it, I can post it.

Donnie


 [EMAIL PROTECTED] 03/23/01 04:47AM 
Hi all,

I have successfully installed the following on Solaris 2.6

apache
mod_ssl
tomcat
mod_jk

I also need to implement this on HPUX and on AIX.

Will the components above ALL run on HP and AIX? More specifically, when
building mod_jk on Solaris, one runs

apxs -o mod_jk.so -DSOLARIS -I../jk -I/usr...etc

so what switch needs to be passed for HP and AIX?

Thanks in advance for any help you can provide.

Simon McMenzie
Senior Developer/Engineer
Interlink Software Services Ltd
_
mailto: [EMAIL PROTECTED] 
Office: (044) 1625 521 222
Mobile   : 07931 772 139
Fax   : (044) 1625 521 333






RE: Compatibility with different flavors of UNIX

2001-03-23 Thread Mike Braden

mod_jk in TC3.2 has most of the build stuff for Linux, Win, and sort of
Solaris.
The scripts are not written for easy support of multiple platforms.

You may want to look at TC3.3m2 or get the mod_jk from the TC3.3 nightly
builds.

Much has been added for better support of mod_jk in TC3.3, including new
build
files and instructions for HP-UX.

mod_jk is not dependent on the version of TC that you are running, so you
can
build the mod_jk that comes with TC3.3m2 and use it on TC3.2.

mod_jk is improving and will continue to do so.

Mike.

-Original Message-
From: John P. Dodge [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 12:40 PM
To: [EMAIL PROTECTED]
Subject: Re: Compatibility with different flavors of UNIX


I don't know about AIX but building mod_jk on HPUX is problematic to the
point of being unworkable. On HPUX apache, mod_ssl, tomcat build fine. As
a side note HP is bundling Apache-mod_ssl-mod_jserv-Tomcat with
HPUX11.11.

On Fri, 23 Mar 2001, Simon McMenzie wrote:

 Will the components above ALL run on HP and AIX? More specifically, when
 building mod_jk on Solaris, one runs
 
 


"Mon aeroglisseur est plein d'anguilles"

John P. Dodge
Boeing Shared Services Group




RE: Running my first servlet...doesn't display

2001-03-23 Thread Joel R. Cochran

Hey! I get to answer my own question!

I found the problem (although I didn't see anything in the doc or the CORE
Servlets book about this)...I had to specify the port on my localhost, like
so: http://localhost:8080/servlet/MyFirstServlet and it worked fine.

Now I'm trying to field test my first .jsp.  I wrote a very small .jsp with
one expression in it and saved it in my Tomcat directory. When I try to
execute the .jsp (also on my local machine), everything displays except the
expression, and the source code contains the expression code (I think it
should contain the expression results instead, right?)

Thanks again,

Joel

-Original Message-
From: Joel R. Cochran [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 12:23 PM
To: '[EMAIL PROTECTED]'
Subject: Running my first servlet...doesn't display


Hello again from Super Newbie...

I (finally) got Tomcat installed on my Win98 machine:
1.  I have Tomcat started.
2.  I have my CLASSPATH set to include servlet.jar and jasper.jar
3.  I have a compiled class called MyFirstServlet.class in
c:/jsp/tomcat/webapps/ROOT/INF-WEB/classes
(This is just a typical "Hello World" file)
4.  In my browser I have entered http://localhost/servlet/MyFirstServlet
5.  I get a response saying "The Page Cannot Be Displayed" (standard
unavailable script).

Anyone know why???  I also tried replacing the "/servlet" with the full
path, but to no avail. HELP!

Joel



Compiler Options

2001-03-23 Thread Sergio Tauffer Padilha

Please, help me.
Where can I change TomCat's  compiler's command line?
Thanks.

Sergio.



Problem running jsp files

2001-03-23 Thread MARobertson

I'm running JBoss with embedded Tomcat on NT 4.0.  I'm having a problem
running the sample jsp's provided with Tomcat.  When I try to select one,
the response that comes back indicates an exception(
java.lang.NoClassDefFoundError: sun/tools/javac/Main ) was thrown.  My
first thought was that the classpath was not correct.  I determined that I
needed to have tools.jar in the class path.  In order to make sure that
happened, I created a batch file with these commands:

set classpath=%classpath%;f:\jdk1.3\lib\tools.jar;
cd \jboss-tomcat-2.1-beta\jboss-2.1\bin
java -jar run.jar

Yet when I attempt to access a jsp, here's what I get in the jasper.log:

2001-03-23 01:41:01 - JspEngine -- /jsp/num/numguess.jsp
2001-03-23 01:41:01 - ServletPath: /jsp/num/numguess.jsp
2001-03-23 01:41:01 -PathInfo: null
2001-03-23 01:41:01 -RealPath: F:
\jboss-tomcat-2.1-beta\jakarta-tomcat-3.2.1\webapps\examples\jsp\num\numguess.jsp
2001-03-23 01:41:01 -  RequestURI: /examples/jsp/num/numguess.jsp
2001-03-23 01:41:01 - QueryString: null
2001-03-23 01:41:01 -  Request Params:
2001-03-23 01:41:01 - Classpath according to the Servlet Engine is: F:
\jboss-tomcat-2.1-beta\jakarta-tomcat-3.2.1\webapps\examples\WEB-INF\classes

When I try to get to the class from the command prompt after ending JBoss,
with:
java sun.tools.javac.Main
It works, I get the java compiler started with no parms.  It seems like
Tomcat is getting the classpath from somewhere else, but I can't figure out
where!

Any and all help is appreciated

Marc Robertson
DST Systems, Inc.




Login Servlet?

2001-03-23 Thread Mick Sullivan

Does anyone know where I could find code for a login servlet using JDBC.
I have a login tested, it checks the database and it outputs whether the 
username and password are correct to the jsp page, but I need to use a 
servlet for redirecting the user.
Here is the code i have for the login procedure

public void applyChanges() throws Exception
{
Statement statement = connection.createStatement();
 try{
ResultSet rs = statement.executeQuery("SELECT * from 
Registration 
WHERE (Username ='"
  + theUsername
  + "' AND Password = '"
  + thePassword + "');");

boolean found = rs.next();
System.out.println(found);
rs.close();
statement.close();

if(found == true)
{

System.out.println("THAT IS THE CORRECT 
USERNAME AN PASSWORD!!");
//request.setAttribute ("servletName", 
"servletToJsp");
rs.close();
statement.close();
//response.sendRedirect ("/login.jsp");
}
else
{
System.out.println("YOU ARE NOT IN OUR DB 
:-(");
rs.close();
statement.close();
}
}
catch (Exception e)
{

}

}
}

ANY help at all would be much appreciated. Thanks in advance, Mick
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Session doesn't work with IIS/Tomcat

2001-03-23 Thread Jack Li

Hello,
I still have the problem to make IIS 5.0/Tomcat 3.2.1 passing session
variables. Even I can't pass the form input to next page. I guess something
wrong with my settings, but I don't know where it is. I tried following:

1. I tried to use two simple jsp pages to pass session variables. it didn't
work.
2. I tried to use a bean. But scope of application worked and scope of
session didn't work.
3. I tried to accept the input from previous page using request object and
didn't work.

Then what is wrong?

Thanks,
Jack




MIME Types

2001-03-23 Thread Olaf Petersen

Hi there

I'm developing a JSP page that shall be able to show wbmp files. But
whatever i try to dog, i wont get anything else but the "alt" text. I need
to add a mimetype to the server or to the JSP file.

The mime type has the following indication : image/vnd.wap.wbmp

I hope that you can help me with this problem, or guide me to a site where I
can find additional information about this issue.

yours faithfully

Olaf Petersen
Denmark




RE: Running my first servlet...doesn't display

2001-03-23 Thread Joel R. Cochran



Thanks 
T. Park! That was exactly what I did...wonder why there is such a lag in 
the list mail delivery today?

Joel [jrc]
-Original Message-From: T. 
Park [mailto:[EMAIL PROTECTED]]Sent: Friday, March 23, 2001 1:59 
PMTo: [EMAIL PROTECTED]Subject: Re: Running 
my first servlet...doesn't display
have you tried: http://localhost:8080/servlet/MyFirstServlet 

  "Joel R. Cochran" wrote: 
  Hello again from Super Newbie... 
I (finally) got Tomcat installed on my Win98 machine: 1. I have 
Tomcat started. 2. I have my CLASSPATH set to include servlet.jar 
and jasper.jar 3. I have a compiled class called 
MyFirstServlet.class in c:/jsp/tomcat/webapps/ROOT/INF-WEB/classes 
 (This is just a typical 
"Hello World" file) 4. In my browser I have entered http://localhost/servlet/MyFirstServlet 
5. I get a response saying "The Page Cannot Be Displayed" 
(standard unavailable script). 
Anyone know why??? I also tried replacing the "/servlet" with the 
full path, but to no avail. HELP! 
Joel
  -- http://www.borland.com/newsgroups 
  http://www.borland.com/devsupport/disclaim.html 
   


tomcat apache Internal Server Error

2001-03-23 Thread Florian Richter



Hi,
I have a Problem with Tomcat and mod_jk. I have 
installed Tomcat with an RPM and all works fine when I call
the examples servlets at server:8080. After this I 
have installed tomcat-mod-3.2.1-1.i386.rpm. The Problem is
whenn I call now a .jsp page the server request me 
an Internal Server Error. In the mod_jk.log file stand
[jk_connect.c (143)]: jk_open_socket, connect() 
failed errno = 101[jk_ajp12_worker.c (152)]: In jk_endpoint_t::service, 
Error sd = -1

I have checked several times the configuration 
files and have also set the java_home directory etc.
maybe someone can help me with this 
problem.

Florian Ríchter



RE: Win service logout problem

2001-03-23 Thread Randy Layman


It will be fixed in the next release of java (1.3.1) as listed here
http://developer.java.sun.com/developer/bugParade/bugs/4323062.html.  I
don't know when the final release will be, but Sun has a beta version for
Solaris and NT available on the Developer Connection section (see Early
Access page at
http://developer.java.sun.com/developer/earlyAccess/j2sdk131/).  It lists
the release date at 2/23/2001, so Beta 2 or an RC 1 might be coming really
soon now.

Randy

-Original Message-
From: Peterson, Lance [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 1:49 PM
To: '[EMAIL PROTECTED]'
Subject: Win service logout problem


Has anyone heard whether/when Sun will release an update to JDK 1.3 that
will keep jk_nt_service.exe from dying at logout?  Or is this something to
be fixed in tomcat?
Thanks, 
Lance Peterson 
Verticore Technologies Inc. 
(801) 453 9111 
www.verticore.com 



Re: Win service logout problem

2001-03-23 Thread Nick Holloway

[EMAIL PROTECTED] (Peterson, Lance) writes:
 Has anyone heard whether/when Sun will release an update to JDK 1.3 that
 will keep jk_nt_service.exe from dying at logout?  Or is this something to
 be fixed in tomcat?

The bug is claimed to be fixed in JDK 1.3.1, of which there is a beta
available from the Early Access section of the Java Developer Connection.

http://developer.java.sun.com/developer/bugParade/bugs/4323062.html

http://developer.java.sun.com/developer/earlyAccess/j2sdk131/fixed_bugs/runtime.html

-- 
 `O O'  | [EMAIL PROTECTED]
// ^ \\ | http://www.pyrites.org.uk/



RE: Running my first servlet...doesn't display

2001-03-23 Thread Batsheva Raviv

Hello Joel,
if I may ask for your help. Did you try "ShowMessage Servlet"?
I couldn't make it read the web.xml page and I wonder if you had the same
problem and how did
you solve it?
Batsheva

-Original Message-
From: Joel R. Cochran [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 11:33 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Running my first servlet...doesn't display


Hey! I get to answer my own question!

I found the problem (although I didn't see anything in the doc or the CORE
Servlets book about this)...I had to specify the port on my localhost, like
so: http://localhost:8080/servlet/MyFirstServlet and it worked fine.

Now I'm trying to field test my first .jsp.  I wrote a very small .jsp with
one expression in it and saved it in my Tomcat directory. When I try to
execute the .jsp (also on my local machine), everything displays except the
expression, and the source code contains the expression code (I think it
should contain the expression results instead, right?)

Thanks again,

Joel

-Original Message-
From: Joel R. Cochran [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 12:23 PM
To: '[EMAIL PROTECTED]'
Subject: Running my first servlet...doesn't display


Hello again from Super Newbie...

I (finally) got Tomcat installed on my Win98 machine:
1.  I have Tomcat started.
2.  I have my CLASSPATH set to include servlet.jar and jasper.jar
3.  I have a compiled class called MyFirstServlet.class in
c:/jsp/tomcat/webapps/ROOT/INF-WEB/classes
(This is just a typical "Hello World" file)
4.  In my browser I have entered http://localhost/servlet/MyFirstServlet
5.  I get a response saying "The Page Cannot Be Displayed" (standard
unavailable script).

Anyone know why???  I also tried replacing the "/servlet" with the full
path, but to no avail. HELP!

Joel





Servlet question

2001-03-23 Thread c cw288

Hi,

When a client make a request to a server and a servlet get call,
the servlet then create an instance for that client.
My question is, how many clients can a servlet handle.

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




Re: Running my first servlet...doesn't display

2001-03-23 Thread T. Park


Joel,
It may have been my mail server - I'm having lots of problems with newsgroup
submissions
I recently ended up submitting the same request twice because my mail
server reported a "Couldn't deliver" message
when it actually did.
bummer.
glad you got it working on your own! The port # hasn't got anything
to do with the servlet spec. It's to do with the
configured port number of your container. Normally a web-server is
listening on port 80, and your browser will,
by default actually translate http:localhost/... to http:/localhost:80.
Of course it doesn't /actually/ change the request, just tries to talk
to a server on that port.
You can change that behavior by altering port parameter of the HttpConnectionHandler
Connector
in server.xml e.g. in the following example I've changed it to 80.

 !-- Normal HTTP -->
 Connector className="org.apache.tomcat.service.PoolTcpConnector">

Parameter name="handler"

value="org.apache.tomcat.service.http.HttpConnectionHandler"/>

Parameter name="port"

value="80"/>
 /Connector>
Now, provided that you haven't got a web server (e.g. Apache, IIS, Personal
Webserver whatever) listening on that
port, you can now just use your original URL to get to the web-container.
-Thom
p.s. If you have for a web server, then you'll get a 'port already in
use' error or somesuch.
"Joel R. Cochran" wrote:
Thanks
T. Park! That was exactly what I did...wonder why there is such a
lag in the list mail delivery today?Joel
[jrc]
-Original Message-
From: T. Park [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: Re: Running my first servlet...doesn't
display

have you tried:
http://localhost:8080/servlet/MyFirstServlet


"Joel R. Cochran" wrote:
Hello again from Super Newbie...
I (finally) got Tomcat installed on my Win98 machine:
1. I have Tomcat started.
2. I have my CLASSPATH set to include servlet.jar and jasper.jar
3. I have a compiled class called MyFirstServlet.class in
c:/jsp/tomcat/webapps/ROOT/INF-WEB/classes
 (This is just a typical
"Hello World" file)
4. In my browser I have entered http://localhost/servlet/MyFirstServlet
5. I get a response saying "The Page Cannot Be Displayed" (standard
unavailable script).
Anyone know why??? I also tried replacing the "/servlet" with
the full
path, but to no avail. HELP!
Joel
--
http://www.borland.com/newsgroups
http://www.borland.com/devsupport/disclaim.html



--
http://www.borland.com/newsgroups
http://www.borland.com/devsupport/disclaim.html



Re: AW: java.lang.OutOfMemoryError

2001-03-23 Thread brian luk

Hi,
there is no session for each client. It's only HTTP
POST request/response, then it's over. 

--- Ralph Einfeldt [EMAIL PROTECTED]
wrote:
 Are you working with cookies or url rewriting?
 
 You have to keep some facts in mind:
   - each session needs some memory
   - each session will be alive some time after the
 last
 request to the session (default: 30 Minutes)
   - each request without a cookie or an encoded Url
 that
 matches an active session will create a new
 session.
   - It's quite easy to create memory leaks
 (especialy with a database)
 
 So your memory requirement is something like
   ("number of sessions created per minute" * 
   "session timeout in minutes" * 
   "memory usage per session") +
   ("number of requests" * "leaked bytes per
 request")
 
 Maybe increasing the heap size for the VM may help.
 Maybe decreasing the session timeout helps you to
 find
 out where your problems are.
 
  -Ursprüngliche Nachricht-
  Von: brian luk [mailto:[EMAIL PROTECTED]]
  Gesendet: Freitag, 23. März 2001 01:19
  An: [EMAIL PROTECTED]
  Betreff: java.lang.OutOfMemoryError
  
  
  Hi,
  I have a servlet listens for HTTP POST request. 
 then
  query the oracle database and response -- request
 /
  response are XML.  
  
  I had 10 Load Test client keep sending HTTP
 request to
  servlet as fast as they can -- for 10 hours
  
  But within 10 hours, all the response are OK,
 except i
  got a couple of servlet internal error says "Out
 of
  Memory" for some of the client.
  
  Error: 500
  Location: /test/server
  Internal Servlet Error:
  java.lang.OutOfMemoryError 
  
  Do I have a memory leak?  or that means too
 servlet is
  overLoad?  or Any thing cause this error? Is this
 a
  common error? I believe my servlet's memeory
  requirement is not that big. but i had at least
 100
  String object in it.
  
  thanks.
  
  P.S, my Config is:
  oracle 8.1.6
  tomcat 3.2
  apache 1.3.17
  Sun OS 5.6
  use HTTP / XML for request / response
  average run time / request = 500 milli - second
  # of client = 10
  
  
  
  __
  Do You Yahoo!?
  Get email at your own domain with Yahoo! Mail. 
  http://personal.mail.yahoo.com/
  


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



Transparent restarts

2001-03-23 Thread Jan Ploski

Hello,

At

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

I found the following joke:

 Q. Whenever I restart Tomcat, Apache locks up!
 
 A. The Ajp13 protocol keeps an open socket between Tomcat and Apache.
When you restart Tomcat, you need to restart Apache as well. 

What use is there of replication, if you have to restart the load balancer
when one of the workers goes away?? BTW, I tried restarting Tomcat without
restarting Apache and luckily it worked fine. So what is this scary Q/A
all about?

However, this is not the primary issue I would like to query about.
What concerns me more is how to restart the servlet engine in a way
that is transparent to users. If I am injecting new code, I would like
the user to perhaps see a short delay between requests, but definitely
not an "Internal server error" message (I assume having persistent
sessions, so these are not a problem). I guess this task of delaying
a request until a servlet engine becomes ready -- instead of spitting
out an error -- should be up to mod_jk. Does anyone know whether it
can be turned on somehow or whether it would be a big deal to implement
something like that myself? I admit to have little experience with
C network programming...

With some more support from mod_jk, application upgrades could be done
even more transparently. If I have 2 Tomcat instances, I could set up
mod_jk to do load balancing and then 1) stop one instance -- mod_jk
transparently fails over to the second one 2) upgrade this now stopped
instance 3) restart it with the updated code, mod_jk starts feeding
it with requests again 4) stop the second instance -- mod_jk now fails
over to the first, already updated one 5) upgrade then restart the
second instance. A user should not notice any delay -- there is always
one instance running.

Is this setup possible now? In particular, will mod_jk transparently
fail over and will it notice the instance once it comes back after
upgrade?

Thanks in advance -
JPL




Re: Servlet question

2001-03-23 Thread Craig R. McClanahan



On Fri, 23 Mar 2001, c cw288 wrote:

 Hi,
 
 When a client make a request to a server and a servlet get call,
 the servlet then create an instance for that client.

That is not what really happens.  Instead, a single instance of your
servlet is called multiple times simultaneously, on multiple processing
threads.

 My question is, how many clients can a servlet handle.
 

The maximum is determined by how many threads you configure in the
container's setup configuration, and is ultimately limited by how many
threads your JDK and operating system can support.

 Thanks,
 Kathy.

Craig McClanahan




Handler Thread Problem

2001-03-23 Thread Ben Sifuentes

Anybody know why I'm getting this?

The access thru Apache works fine. but, when trying to access directly thru
Tomcat
I get th following exception on the server side:

Redirecting to /recruiting/jsp/Login.jsp...
Redirecting to /recruiting/jsp/Login.jsp?showLoginError=true...
HANDLER THREAD PROBLEM: java.io.IOException: Stream broken
java.io.IOException: Stream broken
at
org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp1
2ConnectionHandler.java:386)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:134)
at
org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
at java.lang.Thread.run(Thread.java:484)


From what I understand about Tomcat I shouldn't have to have Apache up and
running to access the application directly with Tomcat.


Thanks,
-Ben




Re: Login Servlet

2001-03-23 Thread Andrew Robson

Hi,

Tomcat has authentication via database built in which means you should be
able to accomplish everything without need to write any code.
Read http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/JDBCRealm.howto 
Look at server.xml for the examples of setting up a JDBCRealm with various
databases. Look in the web.xml in the examples/WEB-INF dir for an example of
setting up a login form and set of protected resources. 

Note the (very good) model that tomcat uses is 
1) Allow you to define a set of protected resources (html, servlets whatever)
2) when your user attempts to access one of those resources they get redirected
to your login form
3) Succesful login - they get sent to the original page they requested
4) Unsuccessful login - they get sent to your error page.

A common mistake in using JDBCRealm is to provide a link to your login form
rather than have it invoked automatically when they try to access a protected 
resource. This won't work - on posting from the login page you'll get 
a 404. 

Let me know if you need any help with any of this

andrew
 
ps I'm surprised "boolean found = rs.next()" works if result set is empty.
I'd kind of expect a null pointer exception. I always do
if (rs != null  rs.next()) {
  // assign something
}
if i'm expecting a single row.


Does anyone know where I could find code for a login servlet using JDBC.
I have a login tested, it checks the database and it outputs whether the 
username and password are correct to the jsp page, but I need to use a 
servlet for redirecting the user.
Here is the code i have for the login procedure

public void applyChanges() throws Exception
{
  Statement statement = connection.createStatement();
  try{
 ResultSet rs = statement.executeQuery("SELECT * from Registration 
WHERE (Username ='"
   + theUsername
   + "' AND Password = '"
   + thePassword + "');");

 boolean found = rs.next();
 System.out.println(found);
 rs.close();
 statement.close();

 if(found == true)
 {

 System.out.println("THAT IS THE CORRECT USERNAME AN PASSWORD!!");
 //request.setAttribute ("servletName", "servletToJsp");
 rs.close();
 statement.close();
 //response.sendRedirect ("/login.jsp");
 }
 else
 {
 System.out.println("YOU ARE NOT IN OUR DB :-(");
 rs.close();
 statement.close();
 }
 }
 catch (Exception e)
 {

 }

}
}

ANY help at all would be much appreciated. Thanks in advance, Mick
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.








HTTP redirection with tomcat and apache?

2001-03-23 Thread Nael Mohammad

How do you setup host redirection from http to https site? (Tomcat 4 and
apache 2.0)



Is Apache web server 1.3.x multithreaded

2001-03-23 Thread brian luk

Hi,
Is Apache web server 1.3.x multithreaded?  that's each
request and handle by a thread. OR each request is
handle by a child process fork by parent?

thanks.

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



jsp - servlet - jsp

2001-03-23 Thread Stijn Geukens

Hi all,

I have a jsp (testservlet.jsp) in following directory:
C:\JAKARTA-TOMCAT\webapps\examples\jsp
and it contains:

FORM action="/examples/servlet/jsp.Servlet1" method=POST
INPUT TYPE="text" size=5 name=test value="pleasework"
INPUT TYPE="submit"
/FORM

and a servlet (Servlet1.class) in following directory:
C:\JAKARTA-TOMCAT\webapps\examples\WEB-INF\classes\jsp
which contains:

package jsp;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class Servlet1 extends HttpServlet
{
public void doGet(HttpServletRequest request,
  HttpServletResponse response)
throws IOException, ServletException
{
  response.setContentType("text/html");
  PrintWriter out = response.getWriter();
  String temp = (String) request.getParameter("test");
  ...
  HttpSession userSession = request.getSession(true);
  RequestDispatcher rd =
   getServletContext().getRequestDispatcher("/jsp/testservlet.jsp");

  if (rd != null)  rd.forward(request,response);
}
}

I can go from the servlet to the jsp and also the other way if a use a 
forward in stead of a submit. If I do it like this I get error 404 (not 
found) although the path in the location-field is correct!
If anyone knows what I'm doing wrong or forgot to do please tell me,

thanks in advance  have a nice weekend,

Stijn
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




RE: IF UR ON APACHE + WINNT + TOMCAT...LISTEN UP!

2001-03-23 Thread Shun-Luoi Daniel Fong

Hi,
I'm using Tomcat 3.2, Apache 1.3 on Linux
and i followed your directions.
Here is what i put in my server.xml

 Context path=""
  docBase="/home/sdfong/public_html/rubyfong/gamezone/"
  crossContext="false"
  debug="0"
  reloadable="true" 
 /Context

but got these errors as follows:

1. In Netscape browser

Not Found(404)

Original request: /~sdfong/rubyfong/gamezone/testex.jsp

Not found request: /~sdfong/rubyfong/gamezone/testex.jsp


2. In the Terminal at the command prompt

2001-03-23 04:25:00 - Ctx(  ): 404 R(  + /~sdfong/rubyfong/gamezone/testex.jsp + null) 
JSP file not found


3. In jasper.log in $TOMCAT_HOME/logs/

2001-03-23 04:23:53 - Scratch dir for the JSP engine is: 
/usr/java/jakarta-tomcat-3.2.1/work/localhost_8080%2Fexamples
2001-03-23 04:23:53 - IMPORTANT: Do not modify the generated servlets
2001-03-23 04:25:00 - JspEngine -- /~sdfong/rubyfong/gamezone/testex.jsp
2001-03-23 04:25:00 -ServletPath: /~sdfong/rubyfong/gamezone/testex.jsp
2001-03-23 04:25:00 -   PathInfo: null
2001-03-23 04:25:00 -   RealPath: 
/home/sdfong/public_html/rubyfong/gamezone/~sdfong/rubyfong/gamezone/testex.jsp
2001-03-23 04:25:00 - RequestURI: /~sdfong/rubyfong/gamezone/testex.jsp
2001-03-23 04:25:00 -QueryString: null
2001-03-23 04:25:00 - Request Params:
2001-03-23 04:25:00 - Classpath according to the init parameter is:


Do you know what I did wrong and how to fix it?

Thanks in advance for your help,
Luoi



On Wed, 21 Mar 2001, Arif Tayebali wrote:

 I apologize for making the directions high-leve.
  
 Good catch!
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 21, 2001 1:41 PM
 To: [EMAIL PROTECTED]
 Subject: RE: IF UR ON APACHE + WINNT + TOMCAT...LISTEN UP!
 
 
 
 You missed a critical step.  You need to add "index.jsp" as an allowable
 default page to the DirectoryIndex entry in httpd.conf.
 
 -Original Message- 
 From: Arif Tayebali [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 ] 
 Sent: Wednesday, March 21, 2001 2:27 PM 
 To: '[EMAIL PROTECTED]' 
 Subject: IF UR ON APACHE + WINNT + TOMCAT...LISTEN UP! 
 Importance: High 
 
 
 Hey all u jsp types..whats up? 
 
 If u were woundering how sites use jsp files as their index page like this: 
 
 www.urtheman.com (takes u to index.jsp) 
 
 listen up. 
 
 
 1. make sure u turn off tomcat and apache 
 1a. create index.jsp like so: 
 html 
   body 
   % 
 out.println("Let me know"); 
   % 
   /body 
  /html 
 
 2. make sure u add contect like this: 
 
  Context path="" 
  docBase="location to ur jsp, html, css files on the same 
 network drive as Tomcat and Apache" 
  crossContext="false" 
  debug="0" 
  reloadable="true"  
 /Context 
 
 3. make sure u configure Apache to point to that location as well 
 4. config mod_jk.conf-auto so that Tomcat and Apache can communicate swiftly
 
 
 5. Start Tomcat 
 6. Start Apache 
 7. U can know punch in www.whatever.com (and itll take u to a index.jsp 
 file) 
 
 Lemme know if u r stuck! 
 
 software used: 
 
 WinNT4, Apache1.3 + Tomcat3.2 (as services), mod_jk (using ajpv1.3) 
 
 happy programming 
 
 

-- 
D. Shun-Luoi Fong
821 Melrose Avenue
Iowa City, IA 52246
email: [EMAIL PROTECTED]

---
Colossions 2:8 See to it that no one takes you captive through philosophy
or empty deception, according to the traditions of men, according to the
elementary principles of the world, rather than according to Christ.
---






Re: Login Servlet

2001-03-23 Thread Vladimir Grishchenko

 
 ps I'm surprised "boolean found = rs.next()" works if result set is empty.
 I'd kind of expect a null pointer exception. I always do
 if (rs != null  rs.next()) {
   // assign something
 }
 if i'm expecting a single row.

I guess there's a difference between an empty ResultSet and no ResultSet :)

--V.



limit servlet access to user

2001-03-23 Thread brian luk

Hi,
I have a web application running on tomcat. there are
2 httpServlet in that web app.  how can i limit user
access to one of the httpServlet?

I read the example application in tomcat under
\tomcat\webapps\examples\jsp\security which demo form
base authentication.  I looked through all the
property files but can't find where it defines the
directory restrict access. 

OR the defualt dir is \protected on the same directory
as JSP? i really not quite sure how it works.

thanks.

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



Double Request received.

2001-03-23 Thread Reto Badertscher


When generating and sending a rtf file from a servlet, the browser ask for
- display from current location
- saving the document

When "display from current location" is chosen by the user, the servlet
receives a second request (that means the file will be generated a second
time), when "saving the document" no additional request is sent to the
servlet.
The following parameters are set for sending the rtf document:
  aRes.setContentType("application/rtf");
  aRes.setHeader("Content-disposition","attachement;filename =
myDocument.doc");

I appreciate any hint/idea to avoid the additional request.

Thanks in advance

Reto Badertscher

---
i[net-systems
i-netsystems GmbH
Seestr. 325, CH-8038 Zrich

phone: +41 (0)79 644 37 94
http: www.i-netsystems.com




Re: Is Apache web server 1.3.x multithreaded

2001-03-23 Thread Craig R. McClanahan



On Fri, 23 Mar 2001, brian luk wrote:

 Hi,
 Is Apache web server 1.3.x multithreaded?  that's each
 request and handle by a thread. OR each request is
 handle by a child process fork by parent?
 

Depends on the platform.  On Unix systems, 1.3.x runs as multiple
processes, while on Windows it's a single process.  My understanding is
that 2.0 will let you run either way on Unix.

Even in separate process mode, there is not a fork per process -- the
existing processes are kept around to minimize the setup cost for each
request.  There is a rich set of configuration parameters that manages how
and when the pool of existing processes can grow (or shrink).

 thanks.
 

Craig McClanahan




Configuring mod_jk

2001-03-23 Thread A Yang

Hello Everyone,

I was just wondering if anyone could help make sure
I've got mod_jk configured properly.

Assuming my host name is www.myhost.com and I have a
servlet context called /tomcat.

In my httpd.conf, I have my DocumentRoot set to the
/tomcat document root (for the sake of testing). I
also have:

DirectoryIndex index.html index.jsp

In my mod_jk.conf, I have the following excerpt:

JkMount .*.jsp ajp13
JkMount /servlet/* ajp13

JkMount /tomcat/*.jsp ajp13
JkMount /tomcat/servlet/* ajp13

So, what this means is that the following work:

www.myhost.com/tomcat/index.jsp
  and 
www.myhost.com/tomcat/myservlet

I'm pretty sure that if I just specify
www.myhost.co/tomcat - then index.jsp gets picked up
automatically. Which is good.

Similarly, www.myhost.com/tomcat/something.htm works.

However, when I try something like:

www.myhost.com
  or
www.myhost.com/something.htm

I get the dreaded infinite-CPU-looping java process
because it's trying to resolve a context and is unable
to.

So, my hypothesis is that Apache is NOT serving up the
html documents, because otherwise, Tomcat via mod_jk
should never have to resolve html files.

Any insight would be appreciated.


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



Re: Login Servlet

2001-03-23 Thread Stijn Geukens


 
  ps I'm surprised "boolean found = rs.next()" works if result set is 
empty.
  I'd kind of expect a null pointer exception. I always do
  if (rs != null  rs.next()) {
// assign something
  }
  if i'm expecting a single row.

I guess there's a difference between an empty ResultSet and no ResultSet :)

--V.

sorry V but i'm pretty sure that it isn't necessary:

resultset.next() is a method that tries to put the pointer at the first 
element of the resultset. If succesful it returns true, else false. So
found = rs.next() works fine.

TheStijn
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




Checking for timed-out sessions

2001-03-23 Thread A Yang

Hi,

Can anyone tell me what the proper convention for
checking for invalidated sessions is? Do people really
write code checking for whether the session is valid
EVERY time they are about to refer to one? And if so,
do they just examine the LastAccessedTime and create a
new session accordingly?

If this is the case, then you'd think that part of the
base class functionality would be a method that
automatically compares it to the MaxInactiveInterval -
instead of making me subclass HttpSession myself8)

Also, is the behaviour of a timed-out session defined
if I try to access one? Does Tomcat automatically
invalidate the session after it exceeds the
session-timeout value?

Thanks,

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



  1   2   >