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: 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: 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: 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  
   
 
   
   
   
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







tomcat/apache/solaris - redirecting stdout/stderr

2001-03-23 Thread Anuj Agrawal

Tomcat archives surprisingly didn't answer this clearly. 8((  (Or maybe i'm
blind cos i was sure this would have been addressed somewhere.)

Using tomcat 3.2.1 with apache on solaris 8, starting tomcat using
bin/startup.sh, how do i specify which files (rather than the console) the
stdout and stderr should be redirected to?

On Windows, it is straight-forward when running as a service - just modify the
wrapper.properties file.

Thanks.
Anuj.




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  element, it will work fine.

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

writer.print(");

> Davd
> 
> 

Craig McClanahan






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.




Fwd: uriworkermap.properties for remote tomcat

2001-03-23 Thread Mark Mynsted

Could somebody just help me with this a little?  Please?  :-)  I have read the 
tomcat-iis howto, and the tomcat workers howto...

I set-up the two servers, A and B.
A has IIS and tomcat, B has only tomcat.
I defined two workers that start ok so far as the log says.
One is ajp12 the other ajp12remote.  The definition for ajp12remote seems ok.
# ajp12remote definition
worker.ajp12remote.port=8007
worker.ajp12remote.host=DevelopmentServerHost
worker.ajp12remote.type=ajp12

A has a context under tomcat webapps for "Test".  I defined Test in server.xml.  B has 
a context called "Development".

I mount Development as follows:
/Development/*=ajp12remote

I think part of my problem may be in the server.xml of server A.  I have the context 
defined for Development as follows:

  



On server B a worker is set for port 8007, called ajp12.  The isap_redirect.dll is not 
functional (as IIS is not installed, I have PWS, but could never get it to work...).

Please help me.





Hello,

I am attempting to set-up the following worker configuration but do not know how to 
approach it.  Here is what I would like to do:

- I have a server, e.g. "A", with IIS and Tomcat 3.2.
- A different server, e.g. "B" with Tomcat 3.2
- I want IIS on server "A" to serve to different versions of an application, a "Test" 
version and a "Development" version.
- I would like to have the Test content to reside on server A and have the JSPs and 
Servlets served by server A's local copy of Tomcat.  The gifs, html, etc would be 
served by A's IIS.
- The Development content exists on server B.  I am trying to get server B's Tomcat to 
serve its content.  (I still want the gifs, html, etc. located on server B to be 
served by server A's IIS).

Is this possible?  Is this sane?  What is the easiest way to do this?

As an example, the tomcat-iss-howto shows a fail-over configuration with an "Examples" 
context served on one Tomcat and "Webpages" served on a different tomcat (on a 
different server).  That is great but where is the content located for context 
"Webpages"?  Is it on the first server in the webapps directory or on the second 
server in its webapps directory.  What do the context elements look like in the 
tomcat's server.xml?  Is there an entry for both contexts only in the first server's 
server.xml, in both server's server.xml?

Any help would be appreciated.






Re: Session tracking not working - POSTing FORMs

2001-03-23 Thread David Wall

> 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: Checking for timed-out sessions

2001-03-23 Thread William Brogden



A Yang wrote:
> 
> 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 a session gets invalidated, you can't get at it any
more. A call to getSession() will create a new one.
You can examine a session with isNew() to see if it
was just created.

> 
> 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?

Yes there is a Thread that does session upkeep.

Look into the HttpSessionBindingListener for a way
to be notified when a session is invalidated.

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




RE: help: Tomcat & JDBC

2001-03-23 Thread Ciot, Thierry

Also, take a look at the jdbc tag library.  You can probably get most of
your database access without doing any scriplet or beans programming.

Thierry

-Original Message-
From: Rob Tanner [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 8:18 PM
To: [EMAIL PROTECTED]
Subject: Re: help: Tomcat & JDBC


1. You will need to create a context for your application in server.xml.
2. You can put the database anywhere you want
3. You will need an MS Access driver, JDBC is just the API
4. You will need to put the servlet path in web.xml

You also need to read the Tomcat documentation on server.xml as well as 
examine the example.  You should also go to the Java Sunsite and download
the Servlet2.2 specification and read it.  web.xml is a part of that
specification and it's contents are thoroughly in the documenmt.

-- Rob

--On Thursday, March 22, 2001 06:37:48 PM + João Folha
<[EMAIL PROTECTED]> wrote:

> Hi there.
> I am new in servlets, jsp, tomcat and java.
> I am trying to build a simple application that consults a very small
> database in ms access.
> So, I Have a few questions:
> What a need to write in server.xml configuration file?
> Where i put my database?
> Do I need to download any driver, i already have jdbc?
> What i need to write in web.xml file?
>
> see you
>
>




   _ _ _ _   __ _ _ _ _
  /\_\_\_\_\/\_\ /\_\_\_\_\_\
 /\/_/_/_/_/   /\/_/ \/_/_/_/_/_/  QUIDQUID LATINE DICTUM SIT,
/\/_/__\/_/ __/\/_//\/_/  PROFUNDUM VIDITUR
   /\/_/_/_/_/ /\_\  /\/_//\/_/
  /\/_/ \/_/  /\/_/_/\/_//\/_/ (Whatever is said in Latin
  \/_/  \/_/  \/_/_/_/_/ \/_/  appears profound)

  Rob Tanner
  McMinnville, Oregon
  [EMAIL PROTECTED]



Re: Configuring mod_jk

2001-03-23 Thread nmlaney


It may just be a typo, but in the first JkMount directive, it should be:

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

whereas, you have:

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

this might explain why you are not getting a root context

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



   
   
A Yang 
   
   [EMAIL PROTECTED]
   
 cc:   
   
03/23/2001   Subject: Configuring mod_jk   
   
06:43 PM   
   
Please 
   
respond to 
   
tomcat-user
   
   
   
   
   




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: help: Tomcat & JDBC

2001-03-23 Thread Rob Tanner

1. You will need to create a context for your application in server.xml.
2. You can put the database anywhere you want
3. You will need an MS Access driver, JDBC is just the API
4. You will need to put the servlet path in web.xml

You also need to read the Tomcat documentation on server.xml as well as 
examine the example.  You should also go to the Java Sunsite and download the 
Servlet2.2 specification and read it.  web.xml is a part of that specification and 
it's contents are thoroughly in the documenmt.

-- Rob

--On Thursday, March 22, 2001 06:37:48 PM + João Folha 
<[EMAIL PROTECTED]> wrote:

> Hi there.
> I am new in servlets, jsp, tomcat and java.
> I am trying to build a simple application that consults a very small
> database in ms access.
> So, I Have a few questions:
> What a need to write in server.xml configuration file?
> Where i put my database?
> Do I need to download any driver, i already have jdbc?
> What i need to write in web.xml file?
>
> see you
>
>




   _ _ _ _   __ _ _ _ _
  /\_\_\_\_\/\_\ /\_\_\_\_\_\
 /\/_/_/_/_/   /\/_/ \/_/_/_/_/_/  QUIDQUID LATINE DICTUM SIT,
/\/_/__\/_/ __/\/_//\/_/  PROFUNDUM VIDITUR
   /\/_/_/_/_/ /\_\  /\/_//\/_/
  /\/_/ \/_/  /\/_/_/\/_//\/_/ (Whatever is said in Latin
  \/_/  \/_/  \/_/_/_/_/ \/_/  appears profound)

  Rob Tanner
  McMinnville, Oregon
  [EMAIL PROTECTED]




Re: Tomcat startup problem

2001-03-23 Thread Vladimir Grishchenko

It might be that you don't set $TOMCAT_HOME.
The following script works on Linux, set vars to your values:

#!/bin/sh

TOMCAT_HOME=/usr/local/tomcat
export TOMCAT_HOME

JAVA_HOME=/opt/IBMJava2-13
export JAVA_HOME

case "$1" in
  start)
echo -n "Starting Tomcat: "
$TOMCAT_HOME/bin/startup.sh
echo
;;
  stop)
echo -n "Shutting down Tomcat: "
$TOMCAT_HOME/bin/shutdown.sh
echo
;;
  *)
echo "Usage: $0 {start|stop}"
exit 1
esac

exit 0


> Jon Small wrote:
> 
> O/S: HP-UX 11.0
> Apache: 1.3.12
> Tomcat: 3.1
> 
> Anyone have/had the same problem? I can start Tomcat manually just fine, but
> not successfully with an init script. It seems that the "java" process
> starts initially, but at some point dies. I think that it dies when the init
> script exits. We have it running fine with Linux, but it uses a "daemon"
> command to make the "java" process a daemon. Any clues?
> 
> I use the standard SystemV init script:
> 
> case "$1" in
>start)
>  echo -n "Starting tomcat: "
>  /usr/local/tomcat/bin/startup.sh
>  ;;
>stop)
>  echo -n "Shutting down tomcat: "
>  /usr/local/tomcat/bin/shutdown.sh
>  ;;
>*)
>  echo "Usage: $0 {start|stop}"
>  exit 1
> esac
> 
> exit 0



Tomcat startup problem

2001-03-23 Thread Jon Small



O/S: HP-UX 11.0Apache: 1.3.12Tomcat: 
3.1Anyone have/had the same problem? I can start Tomcat manually just 
fine, butnot successfully with an init script. It seems that the "java" 
processstarts initially, but at some point dies. I think that it dies when 
the initscript exits. We have it running fine with Linux, but it uses a 
"daemon"command to make the "java" process a daemon. Any clues?I use 
the standard SystemV init script:case "$1" in   
start) echo -n "Starting 
tomcat: " 
/usr/local/tomcat/bin/startup.sh 
;;   stop) 
echo -n "Shutting down tomcat: 
" 
/usr/local/tomcat/bin/shutdown.sh 
;;   *) echo 
"Usage: $0 {start|stop}" 
exit 1esacexit 0


Re: Session tracking not working

2001-03-23 Thread Craig R. McClanahan



On Fri, 23 Mar 2001, Neil Aggarwal wrote:

> Hello:
> 
> I have tried tomcat 3.2.1 and 3.2.2 (4.0 bombed so I could not
> try it) and I am getting this problem:
> 
> I am creating a member-based site.  Each tiem a member
> logs in, I create a User object for them and store it
> as a session attribute.
> 
> Each page (In its header) checks for the presence of
> of that session attribute before showing the page.
> 
> For some reason, the member pages are coming up in a
> different session and the user is taken to a page
> that they are not logged it.
> 
> Is there a bug with the session tracking in Tomcat?
> 

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.

> Thanks,
>   Neil.
> 

Craig McClanahan




Re: JSP Interaction Problem - Access Denied

2001-03-23 Thread Craig R. McClanahan



On Fri, 23 Mar 2001, Darrell Porter wrote:

> 
> ---
> |  A  |
> ---
> |   | |
> | B |C|
> |   | |
> ---
> 
> I have an application in which within one browser window I wish to display,
> within 3 frames, 3 separate JSPs.
> 
> Frames A and B are JSPs sourced from server 1
> Frame C is a JSP sourced from Server 2
> 
> When the JSP from Frame C attempt to obtain session information from the JSP
> in Frame B, the JSP in Frame C generates an ACCESS DENIED error.
> 

This is a standard security feature in your browser, and doesn't directly
have anything to do with JSPs.  The browser sees that the two frames came
from different hosts, so it prevents cross-host access in order to avoid
malicious scripts from one host interfering with the operation of an
application from another host.

> How do I fix this, if it is fixable?  Have I provided sufficient
> information?
> 

You can check through the config settings for your browser, but I'm not
sure that any of them will allow you to turn this off -- it's pretty
dangerous.

>   Darrell Porter

Craig McClanahan




Session tracking not working

2001-03-23 Thread Neil Aggarwal

Hello:

I have tried tomcat 3.2.1 and 3.2.2 (4.0 bombed so I could not
try it) and I am getting this problem:

I am creating a member-based site.  Each tiem a member
logs in, I create a User object for them and store it
as a session attribute.

Each page (In its header) checks for the presence of
of that session attribute before showing the page.

For some reason, the member pages are coming up in a
different session and the user is taken to a page
that they are not logged it.

Is there a bug with the session tracking in Tomcat?

Thanks,
Neil.

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



RE: Tomcat + IPv6

2001-03-23 Thread Nael Mohammad

Apache 2.0 does, so if you use that in conjunction with tomcat then yes. 

-Original Message-
From: Ibrahim Haddad (LMC) [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 3:53 PM
To: '[EMAIL PROTECTED]'
Subject: Tomcat + IPv6


Hello,

My name is Ibrahim Haddad and I work for the Systems Research 
Department at Ericsson. I have a question regarding Tomcat: 
"Does Tomcat support IPv6?"

If so then that's great news! we can test our clusters with it!
If not, is there any plan to support IPv6? 

I would really appreciate your reply.
Thank you.

-- 
Ibrahim Haddad
Ericsson Research - Corporate Unit
Open Architecture Research
8400 Decarie Blvd.
Town of Mont Royal, Quebec H4P 2N2
P: (514) 345.7900 x5484
F: (514) 345.6105 




Servlet problems

2001-03-23 Thread ntran

Need help in getting servlets to work reliably... I get it to run once, and
then when I need to make a change to the servlet, I shut down tomcat,
compile, and start tomcat back up and get this error message :

Internal Servlet Error:

java.lang.NullPointerException
at java.lang.ClassLoader.resolveClass0(Native Method)
at java.lang.ClassLoader.resolveClass(ClassLoader.java:588)
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j
ava:430)
at
org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad
er.java:174)
at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:265)
at
org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
at org.apache.tomcat.core.Handler.service(Handler.java:254)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)


Thanks for any help,
Scott



JSP Interaction Problem - Access Denied

2001-03-23 Thread Darrell Porter


---
|  A  |
---
|   | |
| B |C|
|   | |
---

I have an application in which within one browser window I wish to display,
within 3 frames, 3 separate JSPs.

Frames A and B are JSPs sourced from server 1
Frame C is a JSP sourced from Server 2

When the JSP from Frame C attempt to obtain session information from the JSP
in Frame B, the JSP in Frame C generates an ACCESS DENIED error.

How do I fix this, if it is fixable?  Have I provided sufficient
information?

Thanks

_
Darrell Porter
Operations Manager
415.355.9990 x290
[EMAIL PROTECTED]

WiseConnect, Inc. 
"Powering the people behind stores"






Re: Tomcat + IPv6

2001-03-23 Thread Craig R. McClanahan



On Fri, 23 Mar 2001, Ibrahim Haddad (LMC) wrote:

> Hello,
> 
> My name is Ibrahim Haddad and I work for the Systems Research 
> Department at Ericsson. I have a question regarding Tomcat: 
> "Does Tomcat support IPv6?"
> 
> If so then that's great news! we can test our clusters with it!
> If not, is there any plan to support IPv6? 
> 

Hmm, as far as I know this is really an issue of whether the Java VM
supports IPv6 through the standard java.net APIs (and that of course
depends on whether the underlying OS supports it ...).  I don't know of
any case where the answers to those questions is "yes", but if and when
that happens I think it is safe to say Tomcat will do whatever is
necessary to run in an IPv6 environment.

> I would really appreciate your reply.
> Thank you.
> 
> -- 
> Ibrahim Haddad

Craig McClanahan




Tomcat + IPv6

2001-03-23 Thread Ibrahim Haddad (LMC)

Hello,

My name is Ibrahim Haddad and I work for the Systems Research 
Department at Ericsson. I have a question regarding Tomcat: 
"Does Tomcat support IPv6?"

If so then that's great news! we can test our clusters with it!
If not, is there any plan to support IPv6? 

I would really appreciate your reply.
Thank you.

-- 
Ibrahim Haddad
Ericsson Research - Corporate Unit
Open Architecture Research
8400 Decarie Blvd.
Town of Mont Royal, Quebec H4P 2N2
P: (514) 345.7900 x5484
F: (514) 345.6105 





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



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.




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: 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




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 Zürich

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




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/



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.



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

 
 

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] 
> ] 
> 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: 
>  
>
>   <% 
> out.println("Let me know"); 
>   %> 
>
>   
> 
> 2. make sure u add contect like this: 
> 
>docBase=" network drive as Tomcat and Apache>" 
>  crossContext="false" 
>  debug="0" 
>  reloadable="true" > 
>  
> 
> 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.
---






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:






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.




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/



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)



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.
>
>
>





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: 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




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: Running my first servlet...doesn't display

2001-03-23 Thread Joel R. Cochran

No, I'm not familiar with that...sorry :(

Joel 

-Original Message-
From: Batsheva Raviv [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 3:55 PM
To: [EMAIL PROTECTED]
Subject: RE: Running my first servlet...doesn't display


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




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/



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.
 
    
    
   
   
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
   
   
value="80"/>
    
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
 


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




ISS 5.0 doersn't pass form data

2001-03-23 Thread Jack Li

Hello,
Now I found out that my IIS 5.0 doesn't pass session variable. I wrote two
small asp pages to pass form data and it didn't work. I went into IIS
manager to check web site properties. Session time out is 30 second. Now
what is the problem?

Thanks,
Jack Li




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





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: 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 



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: 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 
    


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




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




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.




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.




Compiler Options

2001-03-23 Thread Sergio Tauffer Padilha

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

Sergio.



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



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: 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: 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
> 
> 
> 




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: 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
 


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: 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/



RE: Pay for a script

2001-03-23 Thread Darrell Porter

LDAP = light-weight directory access protocol.

LDAP defines a relatively simple protocol for updating and searching X.500
directories running over TCP/IP.

-Original Message-
From: Kulkarni, Narayana [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 5:44 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Pay for a script


What is it? A type of conversion from an Old System to a new system, which
implements writing ti the ldap database?
IS ldap a RDBMS or what? What is it really need to be done in brief?

Perl seems to be a good bet though!

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 6:31 PM
To: [EMAIL PROTECTED]
Subject: Pay for a script


Hi

We would like a single script writen, anyone interested
and if so please mail me for further info. (Its OK we expect to
pay)

We have here a central server which sets up NT and Redhat 7 linux
hosting accounts.

We have just had some new dell servers delivered with RH7 and an
Admin Interface from http://www.wirex.com (some of you will know this
software).

I have writen either a single perl or c++ script to set the hosting
accounts up however this needs to be re-writen as althogh the old
script sets the Vhostng account up it will not write to the ldap
database which the new wirex inteface supplied with the dells uses.

I could just dump the wirex front end but would prefer to keep this as
it adds extra functionality that our scipts were never intended to do.

So in short:

We need someone who could write one script which will write to the
ldap database. (and not break the licence agreement)

Anyone interested?

regards

Tony


 



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: Why is my init method run twice?

2001-03-23 Thread Craig R. McClanahan



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.
> 

Maintaining instance pools is *only* allowed for servlets that implement
the SingleThreadModel interface.  Otherwise, the container is required to
provide exactly one instance of the servlet per servlet definition
(i.e. either the  declaration in your web.xml file, or a
dynamically created definition when you call /servlet/{servletname}).

Tomcat does not currently implement instance pooling for SingleThreadModel
servlets, although it could legally do so.

> pradeep
> 

Craig McClanahan




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: 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.
---





oracle JDBC doesn't work

2001-03-23 Thread Brett Knights

We had to have a dburl like the following:

jdbc:oracle:thin:@server:port:owner

did it come with docs?

> 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.




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: 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
/ide/project_resources/. 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=/ide/project_resources/. 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: 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: 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: 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:
> > 
> >  > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> > 
> > 
> >   My test application
> >   
> > Description of my test application
> >   
> > 
> >   
> > MyServlet
> > 
> >   Description of my servlet
> > 
> > 
> > no.fellesdata.MyServlet
> > 
> > 
> >   ConfigFile
> >  
> >
> /usr/local/jakarta-tomcat/webapps/poes/WEB-INF/myservlet.config
> > 
> > 
> > 
> >5
> >   
> > 
> >   
> > MyServlet
> > /MyServlet
> >   
> > 
> > 
> > 
> > 
> > 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 Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]




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: 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
> 
> 



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: "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: Problem consulting database

2001-03-23 Thread William Kaufman

(Note that this is a JDBC question, or even a Microsoft Access question, not
a Tomcat question.  You should find an appropriate mailing list or
discussion group to ask these questions in.)

Any time you use Access, it creates an *.ldb file: it keeps track of locks
on database objects.  You can probably minimize it by committing more often,
or by turning on auto-commit (by calling Connection.setAutoCommit(true)).

-- Bill K.

-Original Message-
From: João Folha [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 7: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: 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? 

David




Re: Problem consulting database

2001-03-23 Thread Steve Ruby

João 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.



A very weird problem

2001-03-23 Thread Pradeep Kumar

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




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

&SA=GN&LNG=ENG
 
select your criteria as :
 
ACCESS
ldb

-Original Message-
From: João 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: Why is my init method run twice?

2001-03-23 Thread Pradeep Kumar

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.

pradeep

 -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:
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> 
> 
>   My test application
>   
> Description of my test application
>   
> 
>   
> MyServlet
> 
>   Description of my servlet
> 
> 
> no.fellesdata.MyServlet
> 
> 
>   ConfigFile
>  
>
/usr/local/jakarta-tomcat/webapps/poes/WEB-INF/myservlet.config
> 
> 
> 
>5
>   
> 
>   
> MyServlet
> /MyServlet
>   
> 
> 
> 
> 
> 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]






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





FW: Tomcat setup questions

2001-03-23 Thread Ben Sifuentes


I don't think this made the list trying the again.

-Ben
-Original Message-
From: Ben Sifuentes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 4:09 PM
To: Tomcat-User
Subject: Tomcat setup questions


Currently,

I have both Apache and Tomcat installed and have configured Tomcat to
utilize Virtual Hosts for each application with each running on it's own
Tomcat JVM
utilizing different port numbers.


I'm able to start and terminate the applications independantly of each other
which was the major goal.

But, I'm receiving a couple of  problems I didn't expect and would like to
know how to resolve these issue:

(Issue 1.)
Since I have created virtual hosts for the applications each running on
it's own Tomcat JVM and seperate port. I should be able to access the
process thru Web Server(ie. Apache) or thru the Servlet Engine (ie. Tomcat)
just by typing the following on the browser:

Apache
--
  http://hire.cysivedemo.com/recruiting/jsp/Login.jsp

  Note: Should access the application using the default port

OR

Tomcat
--
  http://hire.cysivedemo.com:8008/recruiting/jsp/Login.jsp


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.

(Issue 2.)
Since I pulled the applications apart and created a specific
server_.xml file for each application. Which contains the Logging,
Connector, Threads and Context definition needed by the applications.

The problem I'm seeing is that even though I only have one context defined
for the application it is loading other context that are not defined by the
file. This does not seem to be causing a problem but, was wondering why it
is doing this and will this cause problems. If so how do I fix it.

In the example below the Context Log: path="/airbank" should not have been
there.
Example:

Context log: path="/recruiting" Adding context path="/recruiting"
docBase="weba
pps/recruiting"
Starting tomcat. Check logs/tomcat.log for error messages
Starting tomcat install="c:\tomcat" home="C:\tomcat"
classPath="c:\tomcat\classe
s;c:\tomcat\lib\webserver.jar;c:\tomcat\lib\jasper.jar;c:\tomcat\lib\xml.jar
;c:\
tomcat\lib\servlet.jar;c:\jdk1.3\lib\tools.jar;.;c:\jdk1.3\lib;c:\jdk1.3\lib
\too
ls.jar;c:\jdk1.3\jre\lib\rt.jar;c:\tomcat\lib\servlet.jar;C:\WINNT\system32;
C:\W
INNT;C:\Progra~1\Dell\OpenManage\Resolu~1\Common\bin;C:\WINNT\Java\Classes\R
xAss
istant.zip;"
Context log: path="/airbank" Automatic context load
docBase="C:\tomcat\webapps\a
irbank"
...Initializing Raffle servlet.
30 10 5
Starting tcp endpoint on 8009 with
org.apache.tomcat.service.connector.Ajp12Conn
ectionHandler


(Issue 3.)
Another problem I noticed with the above example is that it seems to be
automatically executing the Raffle Application which is defined by a totally
seperate server_raffle.xml file.


In my system I have 4 seperate applications each being defined by it's own
server_xxx.xml file. The virtual hosts are all defined within
my-tomcat-apache.conf
which is the being loaded by Apache in it's  httpd.conf file

Verions & System Info:
Apache 1.3.14
Tomcat 1.0
Win32 System


Any help with this problem would be greatly appreciated!!
Thanks,
-Ben






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




Re: tomcat

2001-03-23 Thread Arnaud Vandyck

baumans pascal wrote:
> 
> 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... ???

Well, this file is only if you plan to run tomcat with Apache... this is
highly recommended and long discussions are in the archives! ;)

> 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 ?

Maybe you can create a new  entry? But I think, for static
pages, it's better to run Tomcat with Apache.

-- 
Arnaud Vandyck 



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: 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]




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: 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:
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> 
> 
>   My test application
>   
> Description of my test application
>   
> 
>   
> MyServlet
> 
>   Description of my servlet
> 
> 
> no.fellesdata.MyServlet
> 
> 
>   ConfigFile
>  
> /usr/local/jakarta-tomcat/webapps/poes/WEB-INF/myservlet.config
> 
> 
> 
>5
>   
> 
>   
> MyServlet
> /MyServlet
>   
> 
> 
> 
> 
> 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: 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
> 
> 





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




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/ROOT"Security 
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.(Compiled 
Code)    at 
java.lang.Exception.(Compiled 
Code)    at 
java.lang.RuntimeException.(RuntimeException.java:47)    
at 
java.lang.SecurityException.(SecurityException.java:39)    
at 
java.security.AccessControlException.(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.(ClassLoader.java:236)    
at 
org.apache.tomcat.loader.AdaptiveClassLoader.(AdaptiveClassLoader.java:213)    
at 
org.apache.tomcat.loader.AdaptiveServletLoader.(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)


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



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: 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: calling RequestDispatcher.forward() after RequestDispatcher.include()

2001-03-23 Thread William Au

This seems to be caused by a bug in Tomcat 3.2.1.  I looked at the java
code
generated for my JSP.  It call out.flush() at the end.  I think that's why
the
forward() failed.  I then converted example1.jsp from JSPs to servlets but
I am still getting the same Exception.  Moving my code below from a JSP
to a servlet did not help.  I check the Servlet 2.2 spec and it does not
mention
anything about flushing or committing the output when using
RequestDispatcher.include().  Anyone knows if this bug exists in later
version
of Tomcat also.

On a related note.  I noticed that Tomcat always call out.flush() in the
java
code it generates for JSP.  Isn't that a bug?

Bill

William Au wrote:

> I am running Tomcat 3.2.1.
>
> I am getting the following error.
>
> javax.servlet.ServletException: Cannot forward as OutputStream or Writer
> has already been obtained
>
> My code is quite simple.  The jsp that I am including, example1.jsp,
> does not write anything to the
> output buffer.
>
> <%
> RequestDispatcher rd1 =
>   request.getRequestDispatcher("example1.jsp");
> rd1.include(request, response);
>
> RequestDispatcher rd2 =
>   request.getRequestDispatcher("example2.jsp");
> rd2.forward(request, response);
> %>
>
> The Apache Bug Database, bug #250, said this is fixed in 3.2.  Is there
> something
> wrong with my code?
>
> Bill




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: Pay for a script

2001-03-23 Thread Kulkarni, Narayana

What is it? A type of conversion from an Old System to a new system, which
implements writing ti the ldap database?
IS ldap a RDBMS or what? What is it really need to be done in brief?

Perl seems to be a good bet though!

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 6:31 PM
To: [EMAIL PROTECTED]
Subject: Pay for a script


Hi

We would like a single script writen, anyone interested
and if so please mail me for further info. (Its OK we expect to
pay)

We have here a central server which sets up NT and Redhat 7 linux
hosting accounts.

We have just had some new dell servers delivered with RH7 and an
Admin Interface from http://www.wirex.com (some of you will know this
software).

I have writen either a single perl or c++ script to set the hosting
accounts up however this needs to be re-writen as althogh the old
script sets the Vhostng account up it will not write to the ldap
database which the new wirex inteface supplied with the dells uses.

I could just dump the wirex front end but would prefer to keep this as
it adds extra functionality that our scipts were never intended to do.

So in short:

We need someone who could write one script which will write to the
ldap database. (and not break the licence agreement)

Anyone interested?

regards

Tony


 



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
> 
> 



  1   2   >