Re: Why doesn't my classes see the oracle driver?

2002-07-11 Thread Arshad Mahmood

It's probably a class loader issue. As a test pack your classes into a jar
and put it in the common\lib directory where classes12.zip is (remove it
from classes) and try your app again.

Regards.

- Original Message -
From: Christian J. Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 11, 2002 5:16 PM
Subject: Re: Why doesn't my classes see the oracle driver?


Yes I did... but that's not the point... I've even tried unpacking it... it
doesn't work...

.:| Christian J. Dechery
.:| FINEP - Depto. de Sistemas
.:| [EMAIL PROTECTED]
.:| (21) 2555-0332

 [EMAIL PROTECTED] 11/07/02 12:33 
Did you rename the file to classes12.jar from the original
classes12.zip?

I know there were some issues with that some time ago...

 [EMAIL PROTECTED] 07/11/02 09:10 AM 
I had a webapp working ok...

I had it set like this:
$TOMCAT_HOME\webapps\fap\WEB-INF\classes\[ all my classes unpackaged
here]
$TOMCAT_HOME\webapps\fap\WEB-INF\lib\classes12.jar -- this is the
Oracle Driver

now I want this:
$TOMCAT_HOME\common\classes\[all my classes unpackaged here]
$TOMCAT_HOME\common\lib\classes12.jar -OR-
$TOMCAT_HOME\common\classes\[oracle driver unpackaged]

why can't this work??? When a JSP accessing one of my classes, the class
is found but it gives me an error saying it didn't find the oracle
drivers...


--
To unsubscribe, e-mail:  mailto:[EMAIL PROTECTED]

For additional commands, e-mail: 
mailto:[EMAIL PROTECTED] 






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




Re: Need Ideas... big problem! (long)

2002-07-10 Thread Arshad Mahmood

You can still do this (by using 4.1.7 at least) by declaring all the
resources under global resources with different names and then providing a
ResourceLink in each context with the generic name you are using to each
the appropriate resource.

Regards.
- Original Message -
From: Christian J. Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 12:57 PM
Subject: RE: Need Ideas... big problem! (long)


ok... but remember that all the classes will reside in the common\classes
dir...

So how will the class know which context accessed it? That's what I can't
figure out... I tought about config files... but I don't know inside the
dispatcher class how to identify the context... or to read the proper config
file...


.:| Christian J. Dechery
.:| FINEP - Depto. de Sistemas
.:| [EMAIL PROTECTED]
.:| (21) 2555-0332

 [EMAIL PROTECTED] 09/07/02 17:24 

If you don't want to go the JNDI route, you could also do something like set
init params in each application's web.xml file with the db connection info
or
create a .properties file for each application and read in the db connection
info from that.

HTH,
-Jeff




Kranson, Bob
Bob_Kranson@comp To: 'Tomcat Users List'  [EMAIL PROTECTED]

uware.com cc:
Subject: RE: Need Ideas... big problem! (long)
07/09/02 02:41 PM
Please respond to
Tomcat Users
List






Why don't you store the JDBC URL in JNDI and have DAO look it up
dynamically

Bob Kranson
Software Technical Support Analyst
UNIFACE and Optimal Products Technical Support
U.S. Support Center 888-551-0404
New Calls: [EMAIL PROTECTED]
31440 Northwestern Hwy, Farmington Hills, MI 48334-2564
(248)737-7300 x12702 Fax:(248)737-7574


 -Original Message-
 From: Christian J. Dechery [ mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 09, 2002 2:38 PM
 To: [EMAIL PROTECTED]
 Subject: Need Ideas... big problem! (long)


 I have a huge problem here... and I can't think of a simple
 solution for it, I'm hoping u guys can give some light. :)

 Let me first describe the environment here, then the problem.

 We have here a webapp called FAP (c:\tomcat\fap). It is
 composed of: /fap/*.jsp (like a hundred of them)
 /fap/WEB-INF/classes/finep (this package finep has a lot of
 subpackages) /fap/WEB-INF/classes/finep/DAO.class -- here
 the problem resides... /fab/lib/OracleDrivers.jar

 the class DAO provides the Connection to an Oracle database...

 so far, everything is fine... but here's the thing... this
 webapp gets replicated... the whole dir, because there are
 other instances of this system with small changes, and we
 didn't have the time to create a self-configuring app to
 allow that... so we copy the whole dir and make the necessary
 changes... BUT... the classes never change... only the
 JSPs... AND another thing that may change is the database
 (and of course DAO)... so how it is done?

 we have /fap with DAO.class pointing to a specific db URL
 and; we have (for example) /fap2 with a few JSPs changes and
 DAO.class pointing to another URL.

 this of course sux! If we wanna change the database of a
 specific webapp we have to re-compile DAO and place it
 there... and if we change a class (any class) we have to
 update it in ALL the contexts...

 What I want:
 I would like to place the package finep and the
 OracleDrivers in the global context
 (c:\tomcat\common\classes, \lib), so all would be pretty and
 centralized; and create something like a Connection
 Dispatcher (also in the global context) that would receive
 requests from the JSPs and provide a Connection to the
 specific URL based in which context that JSP was when the
 request was made. I don't know if that's possible... I'm just
 guessing... of course I want do this as painless as
 possible... cuz we have like 80 classes and more than 150 JSPs...

 to confuse??? My english also sux... sorry!


 .:| Christian J. Dechery
 .:| FINEP - Depto. de Sistemas
 .:| [EMAIL PROTECTED]
 .:| (21) 2555-0332





The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.


--
To unsubscribe, e-mail:  mailto:[EMAIL PROTECTED]

For additional commands, e-mail: 
mailto:[EMAIL PROTECTED] 






--
To unsubscribe, e-mail:  mailto:[EMAIL PROTECTED]

For additional commands, e-mail: 
mailto:[EMAIL PROTECTED] 






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




Re: Need Ideas... big problem! (long)

2002-07-10 Thread Arshad Mahmood

There must me a servlet called somewhere which then hands control over to
the helper classes to do the work ?

Regards.

- Original Message -
From: Christian J. Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 1:10 PM
Subject: Re: Need Ideas... big problem! (long)


well... first one thing... the class that provides the connection (DAO) is
not a Servlet... would I have to make a Servlet (the mentioned Connection
Dispatcher) in order for that to work???

.:| Christian J. Dechery
.:| FINEP - Depto. de Sistemas
.:| [EMAIL PROTECTED]
.:| (21) 2555-0332

 [EMAIL PROTECTED] 09/07/02 17:41 
Or even simpler why not store it as a parameter in the server.xml. You will
need to add the parameter to each of your contexts in the server.xml as
follows:-

Context path=/examples docBase=examples 
..
Parameter name=db.url value=jdbc:postgres://localhost/mydb
override=false/
/Context

And then in your servlet code you use the following to retrieve it (from
your servlet):-

getServletContext().getInitParameter(db.url)

Regards.
- Original Message -
From: Christian J. Dechery  [EMAIL PROTECTED] 
To:  [EMAIL PROTECTED] 
Sent: Tuesday, July 09, 2002 8:47 PM
Subject: RE: Need Ideas... big problem! (long)


Sorry... but could u explain this a little furhter? I'm not familiar with
JNDI.

thanks

.:| Christian J. Dechery
.:| FINEP - Depto. de Sistemas
.:| [EMAIL PROTECTED]
.:| (21) 2555-0332

 [EMAIL PROTECTED] 09/07/02 16:41 
Why don't you store the JDBC URL in JNDI and have DAO look it up
dynamically

Bob Kranson
Software Technical Support Analyst
UNIFACE and Optimal Products Technical Support
U.S. Support Center 888-551-0404
New Calls: [EMAIL PROTECTED]
31440 Northwestern Hwy, Farmington Hills, MI 48334-2564
(248)737-7300 x12702 Fax:(248)737-7574


 -Original Message-
 From: Christian J. Dechery [ mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 09, 2002 2:38 PM
 To: [EMAIL PROTECTED]
 Subject: Need Ideas... big problem! (long)


 I have a huge problem here... and I can't think of a simple
 solution for it, I'm hoping u guys can give some light. :)

 Let me first describe the environment here, then the problem.

 We have here a webapp called FAP (c:\tomcat\fap). It is
 composed of: /fap/*.jsp (like a hundred of them)
 /fap/WEB-INF/classes/finep (this package finep has a lot of
 subpackages) /fap/WEB-INF/classes/finep/DAO.class -- here
 the problem resides... /fab/lib/OracleDrivers.jar

 the class DAO provides the Connection to an Oracle database...

 so far, everything is fine... but here's the thing... this
 webapp gets replicated... the whole dir, because there are
 other instances of this system with small changes, and we
 didn't have the time to create a self-configuring app to
 allow that... so we copy the whole dir and make the necessary
 changes... BUT... the classes never change... only the
 JSPs... AND another thing that may change is the database
 (and of course DAO)... so how it is done?

 we have /fap with DAO.class pointing to a specific db URL
 and; we have (for example) /fap2 with a few JSPs changes and
 DAO.class pointing to another URL.

 this of course sux! If we wanna change the database of a
 specific webapp we have to re-compile DAO and place it
 there... and if we change a class (any class) we have to
 update it in ALL the contexts...

 What I want:
 I would like to place the package finep and the
 OracleDrivers in the global context
 (c:\tomcat\common\classes, \lib), so all would be pretty and
 centralized; and create something like a Connection
 Dispatcher (also in the global context) that would receive
 requests from the JSPs and provide a Connection to the
 specific URL based in which context that JSP was when the
 request was made. I don't know if that's possible... I'm just
 guessing... of course I want do this as painless as
 possible... cuz we have like 80 classes and more than 150 JSPs...

 to confuse??? My english also sux... sorry!


 .:| Christian J. Dechery
 .:| FINEP - Depto. de Sistemas
 .:| [EMAIL PROTECTED]
 .:| (21) 2555-0332





The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.


--
To unsubscribe, e-mail:  mailto:[EMAIL PROTECTED]

For additional commands, e-mail: 
mailto:[EMAIL PROTECTED] 






--
To unsubscribe, e-mail:  mailto:[EMAIL PROTECTED]

For additional commands, e-mail: 
mailto:[EMAIL PROTECTED] 






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




Re: Need Ideas... big problem! (long)

2002-07-10 Thread Arshad Mahmood

A JSP is a servlet, so you shouldn't need to create another class derived
from servlet to do the job.

If your call is directly to a servlet, that servlet can use the code for
parameter lookup itself as is.

Regards.
- Original Message -
From: Christian J. Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 2:33 PM
Subject: Re: Need Ideas... big problem! (long)


didn't work... I did a test here to see if this thing worked before
implementing the Connection Dispatcher...
the Servlet can't find the context in which the JSP that called it is...

here's what I did:

* created two classes TesteDispatcher and TesteCallDispatcher.
TesteDispatcher is the Servlet, and TesteCallDispatcher is just a dummy
class to make a call to this servlet...

* I then placed both classes in $tomcat_home\common\classes

* created a context called \teste1
 Context path=/teste1 docBase=teste1 debug=0 reloadable=true
 Parameter name=url value=URL do Contexto teste1 override=false/
 /Context

* created a JSP called teste.jsp
%@page import=dispatch.TesteCallDispatcher%

%
 TesteCallDispatcher tcd = new TesteCallDispatcher();
 out.println(A URL para esse contexto é \+tcd.myContextURL()+\.);
%

when I execute it, nothing happens... there is a call in TesteDispatcher
like this:
ServletConfig sConf = getServletConfig(); -- this is returning NULL

what did I do wrong? Or was it that I missunderstood ur solution, or even, u
missunderstood my problem. :)

thanks


.:| Christian J. Dechery
.:| FINEP - Depto. de Sistemas
.:| [EMAIL PROTECTED]
.:| (21) 2555-0332

 [EMAIL PROTECTED] 09/07/02 17:41 
Or even simpler why not store it as a parameter in the server.xml. You will
need to add the parameter to each of your contexts in the server.xml as
follows:-

Context path=/examples docBase=examples 
..
Parameter name=db.url value=jdbc:postgres://localhost/mydb
override=false/
/Context

And then in your servlet code you use the following to retrieve it (from
your servlet):-

getServletContext().getInitParameter(db.url)

Regards.
- Original Message -
From: Christian J. Dechery  [EMAIL PROTECTED] 
To:  [EMAIL PROTECTED] 
Sent: Tuesday, July 09, 2002 8:47 PM
Subject: RE: Need Ideas... big problem! (long)


Sorry... but could u explain this a little furhter? I'm not familiar with
JNDI.

thanks

.:| Christian J. Dechery
.:| FINEP - Depto. de Sistemas
.:| [EMAIL PROTECTED]
.:| (21) 2555-0332

 [EMAIL PROTECTED] 09/07/02 16:41 
Why don't you store the JDBC URL in JNDI and have DAO look it up
dynamically

Bob Kranson
Software Technical Support Analyst
UNIFACE and Optimal Products Technical Support
U.S. Support Center 888-551-0404
New Calls: [EMAIL PROTECTED]
31440 Northwestern Hwy, Farmington Hills, MI 48334-2564
(248)737-7300 x12702 Fax:(248)737-7574


 -Original Message-
 From: Christian J. Dechery [ mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 09, 2002 2:38 PM
 To: [EMAIL PROTECTED]
 Subject: Need Ideas... big problem! (long)


 I have a huge problem here... and I can't think of a simple
 solution for it, I'm hoping u guys can give some light. :)

 Let me first describe the environment here, then the problem.

 We have here a webapp called FAP (c:\tomcat\fap). It is
 composed of: /fap/*.jsp (like a hundred of them)
 /fap/WEB-INF/classes/finep (this package finep has a lot of
 subpackages) /fap/WEB-INF/classes/finep/DAO.class -- here
 the problem resides... /fab/lib/OracleDrivers.jar

 the class DAO provides the Connection to an Oracle database...

 so far, everything is fine... but here's the thing... this
 webapp gets replicated... the whole dir, because there are
 other instances of this system with small changes, and we
 didn't have the time to create a self-configuring app to
 allow that... so we copy the whole dir and make the necessary
 changes... BUT... the classes never change... only the
 JSPs... AND another thing that may change is the database
 (and of course DAO)... so how it is done?

 we have /fap with DAO.class pointing to a specific db URL
 and; we have (for example) /fap2 with a few JSPs changes and
 DAO.class pointing to another URL.

 this of course sux! If we wanna change the database of a
 specific webapp we have to re-compile DAO and place it
 there... and if we change a class (any class) we have to
 update it in ALL the contexts...

 What I want:
 I would like to place the package finep and the
 OracleDrivers in the global context
 (c:\tomcat\common\classes, \lib), so all would be pretty and
 centralized; and create something like a Connection
 Dispatcher (also in the global context) that would receive
 requests from the JSPs and provide a Connection to the
 specific URL based in which context that JSP was when the
 request was made. I don't know if that's possible... I'm just
 guessing... of course I want do this as painless as
 possible... cuz we have like 80 classes and more than 150 JSPs...

 to confuse??? My english also sux... sorry!


 .:| Christian 

Re: Need Ideas... big problem! (long)

2002-07-10 Thread Arshad Mahmood


- Original Message -
From: Arshad Mahmood [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 4:12 PM
Subject: Re: Need Ideas... big problem! (long)


 A JSP is a servlet, so you shouldn't need to create another class derived
 from servlet to do the job.

 If your call is directly to a servlet, that servlet can use the code for
 parameter lookup itself as is.

Oops!! I meant if your call is directly to a JSP then you can do the
parameter lookup as is in a scriptlet.

Regards.

 Regards.
 - Original Message -
 From: Christian J. Dechery [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, July 10, 2002 2:33 PM
 Subject: Re: Need Ideas... big problem! (long)


 didn't work... I did a test here to see if this thing worked before
 implementing the Connection Dispatcher...
 the Servlet can't find the context in which the JSP that called it is...

 here's what I did:

 * created two classes TesteDispatcher and TesteCallDispatcher.
 TesteDispatcher is the Servlet, and TesteCallDispatcher is just a dummy
 class to make a call to this servlet...

 * I then placed both classes in $tomcat_home\common\classes

 * created a context called \teste1
  Context path=/teste1 docBase=teste1 debug=0 reloadable=true
  Parameter name=url value=URL do Contexto teste1
override=false/
  /Context

 * created a JSP called teste.jsp
 %@page import=dispatch.TesteCallDispatcher%

 %
  TesteCallDispatcher tcd = new TesteCallDispatcher();
  out.println(A URL para esse contexto é \+tcd.myContextURL()+\.);
 %

 when I execute it, nothing happens... there is a call in TesteDispatcher
 like this:
 ServletConfig sConf = getServletConfig(); -- this is returning NULL

 what did I do wrong? Or was it that I missunderstood ur solution, or even,
u
 missunderstood my problem. :)

 thanks


 .:| Christian J. Dechery
 .:| FINEP - Depto. de Sistemas
 .:| [EMAIL PROTECTED]
 .:| (21) 2555-0332

  [EMAIL PROTECTED] 09/07/02 17:41 
 Or even simpler why not store it as a parameter in the server.xml. You
will
 need to add the parameter to each of your contexts in the server.xml as
 follows:-

 Context path=/examples docBase=examples 
 ..
 Parameter name=db.url value=jdbc:postgres://localhost/mydb
 override=false/
 /Context

 And then in your servlet code you use the following to retrieve it (from
 your servlet):-

 getServletContext().getInitParameter(db.url)

 Regards.
 - Original Message -
 From: Christian J. Dechery  [EMAIL PROTECTED] 
 To:  [EMAIL PROTECTED] 
 Sent: Tuesday, July 09, 2002 8:47 PM
 Subject: RE: Need Ideas... big problem! (long)


 Sorry... but could u explain this a little furhter? I'm not familiar with
 JNDI.

 thanks

 .:| Christian J. Dechery
 .:| FINEP - Depto. de Sistemas
 .:| [EMAIL PROTECTED]
 .:| (21) 2555-0332

  [EMAIL PROTECTED] 09/07/02 16:41 
 Why don't you store the JDBC URL in JNDI and have DAO look it up
 dynamically

 Bob Kranson
 Software Technical Support Analyst
 UNIFACE and Optimal Products Technical Support
 U.S. Support Center 888-551-0404
 New Calls: [EMAIL PROTECTED]
 31440 Northwestern Hwy, Farmington Hills, MI 48334-2564
 (248)737-7300 x12702 Fax:(248)737-7574


  -Original Message-
  From: Christian J. Dechery [ mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 09, 2002 2:38 PM
  To: [EMAIL PROTECTED]
  Subject: Need Ideas... big problem! (long)
 
 
  I have a huge problem here... and I can't think of a simple
  solution for it, I'm hoping u guys can give some light. :)
 
  Let me first describe the environment here, then the problem.
 
  We have here a webapp called FAP (c:\tomcat\fap). It is
  composed of: /fap/*.jsp (like a hundred of them)
  /fap/WEB-INF/classes/finep (this package finep has a lot of
  subpackages) /fap/WEB-INF/classes/finep/DAO.class -- here
  the problem resides... /fab/lib/OracleDrivers.jar
 
  the class DAO provides the Connection to an Oracle database...
 
  so far, everything is fine... but here's the thing... this
  webapp gets replicated... the whole dir, because there are
  other instances of this system with small changes, and we
  didn't have the time to create a self-configuring app to
  allow that... so we copy the whole dir and make the necessary
  changes... BUT... the classes never change... only the
  JSPs... AND another thing that may change is the database
  (and of course DAO)... so how it is done?
 
  we have /fap with DAO.class pointing to a specific db URL
  and; we have (for example) /fap2 with a few JSPs changes and
  DAO.class pointing to another URL.
 
  this of course sux! If we wanna change the database of a
  specific webapp we have to re-compile DAO and place it
  there... and if we change a class (any class) we have to
  update it in ALL the contexts...
 
  What I want:
  I would like to place the package finep and the
  OracleDrivers in the global context
  (c:\tomcat\common\classes, \lib), so all would be pretty and
  centralized; and create something like

Re: Need Ideas... big problem! (long)

2002-07-10 Thread Arshad Mahmood

From: Christian J. Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 6:56 PM
Subject: RE: Need Ideas... big problem! (long)


But that's exactly what I'm talking about...
if doSomething() has to receive parameters, then the answer to my question
(like 10 posts ago) is NO - there is no WAY a class/Servlet can know in
which context its method was called. This can only be done if the something
is passed to this class: the Context itself or the Request and Response
objects... right?

 know little of the Servlet spec, but my question was so simple... I guess
I didn't make myself clear.

Sorry to bother you all... I now know that my problem has no solution. :((

Come now, there is always a solution. It may not be pretty but there is
always a way.

Why does doSomething() need to be called?

For a servlet there are three methods that you can use to perform processing
service(), doPost() and doGet. Normally, you would not deal with
service() but simply define an appropriate doPost or doGet method to
do your processing. Both of these take as parameters the request and
response objects. You should be aware of this as you have a working app.

How does your webapp work? Do the users access a JSP and then that JSP
performs all processing and displayes the results or is a servlet called
when a user accesses a url and that servlet performs all the processing and
forwards to a JSP to display the results?

These are the two most common models. If you can let us know how your app
works then we can help you.

I can assure you that what you are trying to do is not outrageous. I have a
very similar setup, I have the same webapp in development, test, prod, etc.
My development/test box has a single instance of tomcat serving several
virtual hosts with the same webapp connecting to different databases, etc.

Regards.



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




Re: Big problem 2, the Mission!

2002-07-10 Thread Arshad Mahmood

Hi,

Let me see if I understand your problem. You have a JSP that creates
business objects, the business object internally used some DAO objects,
each DAO object when it performs it's processing calls DAO.getConnection
(this happens to take some parameters which I assume are hardwired into
DAOMain).

Because you have a lot of JSP's your easiest (but not the simplest!)
solution is to use JNDI. You could use parameters but then you would have to
modify every single JSP.

To each context add an environment entry of the following type:
Context ...
..
Environment name=db.url type=java.lang.String
value=jdbc:postgres://localhost/mydb /
/Context

To read this value you need code of the following form (courtesy Will
Hartung), you can add it anywhere, in your DAOMain, business object, etc.
You probably want to add it to the function that initialises your database
parameters.

import javax.naming.*;

InitialContext ctx = new InitialContext();
String dbUrl= (String)ctx.lookup(java:comp/env/db.url);

I have tested this Tomcat 4.1.7.

Regards.

- Original Message -
From: Christian J. Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 10, 2002 8:16 PM
Subject: Big problem 2, the Mission!


First I would like to thank all of you for ur patience with me...

my problem is I HATE reading documentation and references. I'm a
trial-and-error developer... sometimes that's good, and sometimes (like
today) it is not.

I will now try to explain my problem with some code to be sure I won't get
missunderstood.

But before anything... I don't have ANY Servlets here... I was totally
tripping... I tought a Servlet was the solution, but it is not.

I only have JSPs (which I know are Servlets) and Beans.

let's go:

I have a webapp with lots of JSPs and classes... in my JSPs I have something
like this:
%@page import=SomeBusinessObject%

%
SomeBusinessObject sbo = new SomeBusinessObject();
sbo.setParameters( request.getParameter(id1),
request.getParameter(id2) );

sbo.getSomeAttribute();
sbo.setSomeAttribute();
sbo.update(); sbo.delete()... etc.. etc...

... lots of other code...
%

this SomeBusinessObject will have a reference to a DAOSomeBusinessObject
where all the queries (insert, delete, update, select) resides... and that
setParameters() method is only for it to know which row of the database
we're handling with, the parameters match with the table keys of course. But
that is irrelevant here.
I have also a class called DAO which provides all of the other DAO*s with a
Connection... this is done internally within each DAO*.

the method bellow is in DAO, which all the other DAO*s call to get the
Connection.

public static synchronized Connection getConnection(String usr, String pwd,
String url, String driver) {
 Connection con  = null;

// some code here to make some checks... irrelevant

  try {
   Class.forName( driver );
  con = DriverManager.getConnection(url, usr, pwd);
 } catch(ClassNotFoundException cnf) {
  System.out.println (*** Erro: driver nao encontrado!
+cnf.getMessage());
 } catch(SQLException sql) {
   String detalhes = URL = +url+\nUSER = +usr+\nPWD = +pwd;
  System.out.println(*** Erro ao obter conexão!
+sql.getMessage()+\n+detalhes );
 }

// a little bit more code

  return con;
 }

now the problem - I'll try to be very clear (my english SUX, please be
patient with me).

the webapp points to a specific db URL... this URL is in the DAOMain... if I
want to change the db, I'll have to change DAOMain, recompile it, and
overwrite it... nothing weird so far. Right?

The big thing is: this webapp gets replicated... so I copy the ENTIRE dir...
classes, JSPs, jars... everything... and I know how stupid this is... and
that's the problem...

- in each of these webapps, the only thing that changes is the JSPs, and
maybe the DB url...

WHAT I WANT IS: I want to put our classes, jars and the oracle driver in the
$TOMCAT_HOME\common dir, because they don't change from one webapp to
another BUT since DAOMain holds the URL this is not possible (each
webapp must have its own DAOMain)... I wanna create a CLASS that will
receive a request from DAO or DAOMain (residing in \common) and provide a
Connection based on the Context of the JSP that used SomeBusinessObject -
DAOSomeBusinessObject - DAO.

or maybe DAO could do that... let's say I would write some code in
getConnection() to find out where (Context) it is (well... actually DAO is
always in the same place.. but the JSP that uses it, and calls it, is not)
to provide the right Connection... BUT without ANY change of parameters to
getConnection(), since that would snowball into a mega change of method's
signatures that would end in the JSPs...

(I'm tired...)

well... that's it... I don't think I can be clearer than that... my english
stops here... :)




.:| Christian J. Dechery
.:| FINEP - Depto. de Sistemas
.:| [EMAIL PROTECTED]
.:| (21) 2555-0332




--
To unsubscribe, e-mail:   

Re: missing return statement error?!??!

2002-07-09 Thread Arshad Mahmood

The compiler is correct, what happens if an exception is raised. It goes to
your catch block and writes the debug but then there is no return after
that. Maybe you should be re-raising the exception again.

Regards.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, July 09, 2002 1:45 PM
Subject: missing return statement error?!??!


 Hi,
 This is not a tomcat's question. I've made a class with a find method.
 When I compile it with ANT, I 've a missing return statement error whereas
 i've specified  return type.
 Here is the code :


 public String [] find(String mail) {
 String system= qs44a6005;
 String collectionName=JC;
 String Table=T_Client;
 String[] Tab=null;

 // Obtenir les paramètres de la requête.
 Connection connection=null;


   try{
 // Chargement du driver JDBC pour AS/400.

 DriverManager.registerDriver(
 new com.ibm.as400.access.AS400JDBCDriver());

 // Obtient une connection à la database.
 connection = DriverManager.getConnection (jdbc:as400:// +
 system+ / + collectionName,PCS,PCS);
 Statement lireTable = connection.createStatement ();
 ResultSet rs1= lireTable.executeQuery(SELECT
 NOM,CODE,TEL,PORT,PASS FROM +collectionName+.+Table+ WHERE MAIL='
 +mail+');
 if(rs1.next()){
   // on récupére les membres du resultSet
   Tab[0]=rs1.getString(NOM);
   Tab[1]=rs1.getString(CODE);
   Tab[2]=rs1.getString(TEL);
   Tab[3]=rs1.getString(PORT);
   Tab[4]=rs1.getString(PSWD);

 }

 System.out.println(fin test existe);
 lireTable.close();
 connection.close ();
 return Tab;

   }
   catch(Exception e){
 System.out.println ();
 System.out.println (ERROR:  + e.getMessage());
   }


 }


 Thanks.

 garsJC


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




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




Re: Need Ideas... big problem! (long)

2002-07-09 Thread Arshad Mahmood

Or even simpler why not store it as a parameter in the server.xml. You will
need to add the parameter to each of your contexts in the server.xml as
follows:-

Context path=/examples docBase=examples 
..
Parameter name=db.url value=jdbc:postgres://localhost/mydb
 override=false/
/Context

And then in your servlet code you use the following to retrieve it (from
your servlet):-

getServletContext().getInitParameter(db.url)

Regards.
- Original Message -
From: Christian J. Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 09, 2002 8:47 PM
Subject: RE: Need Ideas... big problem! (long)


Sorry... but could u explain this a little furhter? I'm not familiar with
JNDI.

thanks

.:| Christian J. Dechery
.:| FINEP - Depto. de Sistemas
.:| [EMAIL PROTECTED]
.:| (21) 2555-0332

 [EMAIL PROTECTED] 09/07/02 16:41 
Why don't you store the JDBC URL in JNDI and have DAO look it up
dynamically

Bob Kranson
Software Technical Support Analyst
UNIFACE and Optimal Products Technical Support
U.S. Support Center 888-551-0404
New Calls: [EMAIL PROTECTED]
31440 Northwestern Hwy, Farmington Hills, MI 48334-2564
(248)737-7300 x12702 Fax:(248)737-7574


 -Original Message-
 From: Christian J. Dechery [ mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 09, 2002 2:38 PM
 To: [EMAIL PROTECTED]
 Subject: Need Ideas... big problem! (long)


 I have a huge problem here... and I can't think of a simple
 solution for it, I'm hoping u guys can give some light. :)

 Let me first describe the environment here, then the problem.

 We have here a webapp called FAP (c:\tomcat\fap). It is
 composed of: /fap/*.jsp (like a hundred of them)
 /fap/WEB-INF/classes/finep (this package finep has a lot of
 subpackages) /fap/WEB-INF/classes/finep/DAO.class -- here
 the problem resides... /fab/lib/OracleDrivers.jar

 the class DAO provides the Connection to an Oracle database...

 so far, everything is fine... but here's the thing... this
 webapp gets replicated... the whole dir, because there are
 other instances of this system with small changes, and we
 didn't have the time to create a self-configuring app to
 allow that... so we copy the whole dir and make the necessary
 changes... BUT... the classes never change... only the
 JSPs... AND another thing that may change is the database
 (and of course DAO)... so how it is done?

 we have /fap with DAO.class pointing to a specific db URL
 and; we have (for example) /fap2 with a few JSPs changes and
 DAO.class pointing to another URL.

 this of course sux! If we wanna change the database of a
 specific webapp we have to re-compile DAO and place it
 there... and if we change a class (any class) we have to
 update it in ALL the contexts...

 What I want:
 I would like to place the package finep and the
 OracleDrivers in the global context
 (c:\tomcat\common\classes, \lib), so all would be pretty and
 centralized; and create something like a Connection
 Dispatcher (also in the global context) that would receive
 requests from the JSPs and provide a Connection to the
 specific URL based in which context that JSP was when the
 request was made. I don't know if that's possible... I'm just
 guessing... of course I want do this as painless as
 possible... cuz we have like 80 classes and more than 150 JSPs...

 to confuse??? My english also sux... sorry!


 .:| Christian J. Dechery
 .:| FINEP - Depto. de Sistemas
 .:| [EMAIL PROTECTED]
 .:| (21) 2555-0332





The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.


--
To unsubscribe, e-mail:  mailto:[EMAIL PROTECTED]

For additional commands, e-mail: 
mailto:[EMAIL PROTECTED] 






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




Re: Tomcat 4.0.3-HTTP Status 500-Internal Server Error

2002-07-06 Thread Arshad Mahmood

Can you attach the JSP you are using. And the precise location you have put
FormBean.class (you should have compiled it already).

Regards.
- Original Message -
From: John and Alicia Scott [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 05, 2002 10:58 PM
Subject: Fw: Tomcat 4.0.3-HTTP Status 500-Internal Server Error


 Thanks for the suggestion.  I did have the wrong path in the jsp:useBean.
I
 corrected this, but now I get the same error with the correct path.  The
 error is below.   Now what?

 John

 java.lang.ClassNotFoundException: examples.WEB-INF.classes.forms.FormBean
 at

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
 a:1394)
 at

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
 a:1243)
 at

org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:18
 1)
 at

org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerato
 r.java:102)
 at

org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(J
 spParseEventListener.java:834)
 at

org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventLi
 stener.java:241)
 at

org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseE
 ventListener.java:197)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:215)
 at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
 at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
 rvlet.java:177)
 at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
 va:189)


 - Original Message -
 From: Arshad Mahmood [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, July 05, 2002 2:22 PM
 Subject: Re: Tomcat 4.0.3-HTTP Status 500-Internal Server Error


  Because you have put your bean in com.jguru, you need to duplicate
this
  under WEB-INF/classes. Your bean should then reside as
  WEB-INF/classes/com/jguru/FormBean.class.
 
  Regards.
 
  - Original Message -
  From: John and Alicia Scott [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, July 05, 2002 8:19 PM
  Subject: Tomcat 4.0.3-HTTP Status 500-Internal Server Error
 
 
  Hi,
 
  I've just started to use Tomcat 4.0.3.  All of the applications in the
  \webapps\examples file that came with Tomcat run correctly.  I added a
new
  folder, \webapps\examples\jsp\forms, that contains form.jsp.  This file
  sends/receives data from a javabean that I put in the
  \webapps\examples\WEB_INF\classes\forms folder.  The bean is named
  FormBean.java.  When I try to run the jps page from my browser, I get
the
  following error message: Tomcat 4.0.3-HTTP Status 500-Internal Server
 Error.
  I copies part of the long root cause output below.
  java.lang.ClassNotFoundException: com.jguru.FormBean
  at
 

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
  a:1394)
  at
 

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
  a:1243)
  at
 

org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:18
  1)
  at
 

org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerato
  r.java:102)
  at
 

org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(J
  spParseEventListener.java:834)
  at
 

org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventLi
  stener.java:241)
  at
 

org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseE
  ventListener.java:197)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:215)
  at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
  at
 

org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
  rvlet.java:177)
  at
 

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
  va:189)
  at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  This appears to be a classpath problem, but I can't identify what is
wrong
  with my configuration, if anything.  Do you have suggestions
  on how to correct this problem?
  Thanks,
  John
 
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 


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




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




Re: RequestWrapper question

2002-07-05 Thread Arshad Mahmood


- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, July 05, 2002 7:30 PM
Subject: Re: RequestWrapper question


 Redisplay of pages with input errors is one of the things that application
 frameworks like Struts deal with http://jakarta.apache.org/struts.  You
 might want to take a look at that, instead of rolling your own for every
 single form.

 Craig


 On Fri, 5 Jul 2002, Kevin HaleBoyes wrote:

  Date: Fri, 5 Jul 2002 15:21:22 +0100 (BST)
  From: Kevin HaleBoyes [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: RequestWrapper question
 
  It is a common problem that I'm tying to solve.
  Consider the following simple fill-in form: fif.jsp
  This doesn't work because c:out will call
  PageContext.findAttribute() which looks for attributes and
  not parameters.
  Section 3.2 of the JSTL spec says of identifiers:
searches for the named attribute in page, request,
session (if valid), and application scope(s) in order
and returns the value associated or null
 
  I don't think I should set the attribute at the application or
  the session levels as they don't seem to belong there.
  I dont' know how to set attributes in the
  page context so I had a look at the request level.
 
  I need to add attributes to the request before I forward it but
  the setAttribute() method isn't defined for HttpServletRequest.

These methods are inherited from ServletRequest, they're not
HttpServletRequest specific.
So you can use request.setAttribute and then use pageContext.findAttribute
as you
intended.

Struts would provide much of this and more. But that depends on how you want
to structure your application.

Regards.




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




Re: Tomcat 4.0.3-HTTP Status 500-Internal Server Error

2002-07-05 Thread Arshad Mahmood

Because you have put your bean in com.jguru, you need to duplicate this
under WEB-INF/classes. Your bean should then reside as
WEB-INF/classes/com/jguru/FormBean.class.

Regards.

- Original Message -
From: John and Alicia Scott [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 05, 2002 8:19 PM
Subject: Tomcat 4.0.3-HTTP Status 500-Internal Server Error


Hi,

I've just started to use Tomcat 4.0.3.  All of the applications in the
\webapps\examples file that came with Tomcat run correctly.  I added a new
folder, \webapps\examples\jsp\forms, that contains form.jsp.  This file
sends/receives data from a javabean that I put in the
\webapps\examples\WEB_INF\classes\forms folder.  The bean is named
FormBean.java.  When I try to run the jps page from my browser, I get the
following error message: Tomcat 4.0.3-HTTP Status 500-Internal Server Error.
I copies part of the long root cause output below.
java.lang.ClassNotFoundException: com.jguru.FormBean
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1394)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1243)
at
org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:18
1)
at
org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerato
r.java:102)
at
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(J
spParseEventListener.java:834)
at
org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventLi
stener.java:241)
at
org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseE
ventListener.java:197)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:215)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:177)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:189)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
This appears to be a classpath problem, but I can't identify what is wrong
with my configuration, if anything.  Do you have suggestions
on how to correct this problem?
Thanks,
John




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




Re: Problems with jsp:setProperty

2002-07-03 Thread Arshad Mahmood

I assume you have set a value in your code but you haven't pasted into the
message ?

- Original Message -
From: Mats Palats [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 03, 2002 11:16 AM
Subject: Problems with jsp:setProperty


 I'm unable to use setProperty with any of my beans with tomcat, it worked
 under jserv so I know my beans have the correct mutators.

 jsp:useBean id=conn class=wiBeans.ConnectionBean scope=session /
 jsp:setProperty name=conn property=username /
 jsp:setProperty name=conn property=password /

 generates this error message:
 org.apache.jasper.JasperException: Can't find a method to write property
 'username' in a bean of type 'wiBeans.ConnectionBean'

 but in my ConnectionBean class I have the method:
 public void setUsername(String str) {
 username = str;
 }

 the ConnectionBean.class file is placed in
 webapps/wi/WEB-INF/classes/wiBeans

 this error is really annoying and have been bugging me for a few days now,
I
 would really appreciate any ideas to what I might be doing wrong.



 _
 Skicka snabbmeddelanden till dina vänner online med MSN Messenger:
 http://messenger.msn.se


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




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




Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Arshad Mahmood

Hi,

I notice that you are doing the JDBC lookup in the init function. This
doesn't appear to work properly (at least on 4.1.6), move the initialisation
code to the doGet/doPost and see if that helps. This cured my JNDI/JDBC
problems.

Regards.

- Original Message -
From: Przemyslaw Kowalczyk [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, July 02, 2002 11:08 AM
Subject: Tomcat 4.0.4, jndi, jdbc and postgresql [long]


 Hi

 I've just started to write servlets. Servlets that only do processing,
without
 connecting to database work fine, but I have some problems to get the
 connection with postgresql via jdbc work.

 Tomcat: 4.0.4 (on linux)
 Postgresql: 7.2.1 (on linux)
 Jdbc: pgjdbc2.jar (from jdbc.postgresql.org)

 The servlet is quite simple:

 import java.io.*;
 import java.util.*;
 import java.sql.*;
 import javax.sql.*;
 import javax.naming.*;
 import javax.servlet.*;
 import javax.servlet.http.*;

 public class InfoServlet extends HttpServlet {

 Connection con;
 private boolean conFree = true;

 public void init() throws ServletException {
 try  {
 Context initCtx = new InitialContext();
 Context envCtx =
 (Context)initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource)
 envCtx.lookup(jdbc/BookDB);
 Connection con = ds.getConnection();
 } catch (Exception ex) {
 throw new ServletException(Couldn't open
connection
 to database:  + ex.getMessage());
 }
 }

 public void destroy() {
 try {
 con.close();
 } catch (SQLException ex) {
 System.out.println(ex.getMessage());
 }
 }

 public void doGet (HttpServletRequest request, HttpServletResponse
 response) throws ServletException, IOException {

 HttpSession session = request.getSession();

 // set content-type header before accessing the Writer
 response.setContentType(text/html);
 response.setBufferSize(8192);
 PrintWriter out = response.getWriter();

 // then write the data of the response
 out.println(html +
 headtitleDuke's Bookstore/title/head);
 }
 }

 in web/WEB-INF/web.xml I defined:


 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
 display-nameCurrency Converter Application/display-name
 description
 Test servlet
 /description
 servlet
 servlet-nameinfo/servlet-name
 display-nameinfo/display-name
 descriptionno description/description
 servlet-classInfoServlet/servlet-class
 /servlet
 servlet-mapping
 servlet-nameinfo/servlet-name
 url-pattern/info/url-pattern
 /servlet-mapping
 session-config
 session-timeout30/session-timeout
 /session-config
 resource-ref
 res-ref-namejdbc/BookDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainter/res-auth
 /resource-ref
 /web-app

 And in server.xml in the contex of the application:

Context path=/bookstore docBase=bookstore debug=0
  reloadable=true crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
  prefix=localhost_bookstore_log. suffix=.txt
   timestamp=true/
   Resource name=jdbc/BookDB auth=Container
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/BookDB
 parameter
   nameuser/name
   valuejava/value
 /parameter
 parameter
   namepassword/name
   valuejava/value
 /parameter
 parameter
   namedriverClassName/name
   valueorg.postgresql.Driver/value
 /parameter
 parameter
   namedriverName/name
   valuejdbc:postgresql:public/value
 /parameter
   /ResourceParams
 /Context

 I've tried a few different driverName parameters: (restarting Tomcat after
 each change)
 jdbc:postgresql://localhost/public
 jdbc:postgresql://full.server.name/public
 jdbc:postgresql:public
 jdbc:postgresql://localhost/

 But, despite the parameters, I always get the following error:

 exception
 javax.servlet.ServletException: Couldn't open connection to database:
 Exception creating DataSource: org.hsql.jdbcDriver
 at InfoServlet.init(Unknown Source)
 at 

Re: newbie question urgent plz

2002-06-11 Thread Arshad Mahmood

The role needs to be manager not tomcat to use the manager application.

Regards,
Arshad

- Original Message -
From: Vikramjit Singh [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, June 11, 2002 1:22 PM
Subject: RE: newbie question urgent plz


 yeah i opened my tomcat-users and changed the existing file. now the file
 contains this

 !--
   NOTE:  By default, no user is included in the manager role required
   to operate the /manager web application.  If you wish to use this app,
   you must define such a user - the username and password are arbitrary.
 --
 tomcat-users
   user name=vikram password=vikram roles=tomcat /
   user name=role1  password=tomcat roles=role1  /
   user name=both   password=tomcat roles=tomcat,role1 /
 /tomcat-users

 in the url i am writing http://localhost/manager

 username is vikram
 password is vikram

 It is giving

 type Status report

 message Access to the requested resource has been denied

 description Access to the specified resource (Access to the requested
 resource has been denied) has been forbidden.


 Regards,
 Vikramjit Singh,
 Systems Engineer,
 GTL Ltd.
 Ph. 7612929-1031


 -Original Message-
 From: Markus Kirsten [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 11, 2002 4:43 AM
 To: Tomcat Users List
 Subject: Re: newbie question urgent plz


 Hi,
 Check your tomcat-users file located in /conf/ and add an account with
 the role manager or change an existing one.

 Good luck!


 Markus


 On tisdag, juni 11, 2002, at 01:32 , Vikramjit Singh wrote:

  yeah the directory structure is exactly the same.
  how do i check the mananger list i am typing
  http://localhost:8080/manager
  its asking for password.
 
 
  Regards,
  Vikramjit Singh,
  Systems Engineer,
  GTL Ltd.
  Ph. 7612929-1031
 
 
  -Original Message-
  From: Chris Campbell [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, June 11, 2002 4:35 AM
  To: 'Tomcat Users List'
  Subject: RE: newbie question urgent plz
 
 
 
  What files are in the context? Do you have a
  webapps/CorpMIS/WEB-INF/web.xml? Does CorpMIS show up in the manager
  list,
  and if so what is its status?
 
  -Original Message-
  From: Vikramjit Singh [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, June 11, 2002 8:20 PM
  To: '[EMAIL PROTECTED]'
  Subject: newbie question urgent plz
 
 
 
  hi all,
 
  i am sending this mail again. plz somebody cud solve my problem.
 
  i have installed tomcat 4.0.3 and have been breaking my
  head since 15
  days. I am trying to add a context CorpMIS, but its not
  getting added. I
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe, e-mail:   mailto:tomcat-user-
  [EMAIL PROTECTED]
  For additional commands, e-mail: mailto:tomcat-user-
  [EMAIL PROTECTED]
 


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

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



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




Re: newbie question urgent plz

2002-06-11 Thread Arshad Mahmood

Checkout the documentation for the manager application. You need to specify
a command on the url (e.g. list), there is no GUI access (i.e. index page
with any options/commands).

Regards,
Arshad

- Original Message -
From: Vikramjit Singh [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, June 11, 2002 1:48 PM
Subject: RE: newbie question urgent plz


 ok changed the role to manager, now i didnt get that error, but this line

 FAIL - Unknown command




 -Original Message-
 From: Arshad Mahmood [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 11, 2002 5:47 AM
 To: Tomcat Users List
 Subject: Re: newbie question urgent plz


 The role needs to be manager not tomcat to use the manager
application.

 Regards,
 Arshad

 - Original Message -
 From: Vikramjit Singh [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Tuesday, June 11, 2002 1:22 PM
 Subject: RE: newbie question urgent plz


  yeah i opened my tomcat-users and changed the existing file. now the
file
  contains this
 
  !--
NOTE:  By default, no user is included in the manager role required
to operate the /manager web application.  If you wish to use this
app,
you must define such a user - the username and password are arbitrary.
  --
  tomcat-users
user name=vikram password=vikram roles=tomcat /
user name=role1  password=tomcat roles=role1  /
user name=both   password=tomcat roles=tomcat,role1 /
  /tomcat-users
 
  in the url i am writing http://localhost/manager
 
  username is vikram
  password is vikram
 
  It is giving
 
  type Status report
 
  message Access to the requested resource has been denied
 
  description Access to the specified resource (Access to the requested
  resource has been denied) has been forbidden.
 
 
  Regards,
  Vikramjit Singh,
  Systems Engineer,
  GTL Ltd.
  Ph. 7612929-1031
 
 
  -Original Message-
  From: Markus Kirsten [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, June 11, 2002 4:43 AM
  To: Tomcat Users List
  Subject: Re: newbie question urgent plz
 
 
  Hi,
  Check your tomcat-users file located in /conf/ and add an account with
  the role manager or change an existing one.
 
  Good luck!
 
 
  Markus
 
 
  On tisdag, juni 11, 2002, at 01:32 , Vikramjit Singh wrote:
 
   yeah the directory structure is exactly the same.
   how do i check the mananger list i am typing
   http://localhost:8080/manager
   its asking for password.
  
  
   Regards,
   Vikramjit Singh,
   Systems Engineer,
   GTL Ltd.
   Ph. 7612929-1031
  
  
   -Original Message-
   From: Chris Campbell [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, June 11, 2002 4:35 AM
   To: 'Tomcat Users List'
   Subject: RE: newbie question urgent plz
  
  
  
   What files are in the context? Do you have a
   webapps/CorpMIS/WEB-INF/web.xml? Does CorpMIS show up in the manager
   list,
   and if so what is its status?
  
   -Original Message-
   From: Vikramjit Singh [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, June 11, 2002 8:20 PM
   To: '[EMAIL PROTECTED]'
   Subject: newbie question urgent plz
  
  
  
   hi all,
  
   i am sending this mail again. plz somebody cud solve my problem.
  
   i have installed tomcat 4.0.3 and have been breaking my
   head since 15
   days. I am trying to add a context CorpMIS, but its not
   getting added. I
  
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
   --
   To unsubscribe, e-mail:   mailto:tomcat-user-
   [EMAIL PROTECTED]
   For additional commands, e-mail: mailto:tomcat-user-
   [EMAIL PROTECTED]
  
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


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

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



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




Re: LoadModule Error

2002-06-10 Thread Arshad Mahmood

Hi,

Are you sure your version of apache supports dynamic libraries. If you have
built it yourself then ensure that you
have enabled module 'so'.

Regards,
Arshad

- Original Message -
From: P.V.Sankar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 10, 2002 12:52 PM
Subject: LoadModule Error





 
  Hi,
   I am new to this group as well as to this package.
   I posted this mail once,but nobody has responded to my problem,that's
 why i am posting the same message again.If somebody knows the bug please
 reply to me .

 Regards,
 Sankar


I have installed tomcat 4.0.3 on my solaris system,and copied the
binary
  mod_webapp.so to $APACHE_HOME/libexec.I updated the neccessary
  parameters in httpd.conf like:
 
  LoadModule webapp_module libexec/mod_webapp.so
  AddModule mod_webapp.c
 
  IfModule mod_webapp.c
   WebAppConnection conn  warp  localhost:8008
   WebAppDeploy examplesconn  /examples
   WebAppInfo /webapp-info
  /IfModule
 
  But when i tested httpd.conf by typing
  $APACHE_HOME/bin apachectl configtest
  it is giving the following error message
 
  Syntax error on line 202 of /usr/local/apache/conf/httpd.conf:
  Invalid command 'LoadModule' , perhaps mis-spelled or defined by a
module
  not included in the server configuration.
 
  I have followed the same  instructions given  in INSTALL.txt and
  README.txt files in the tomcat package.
 
  Can somebody  help me in solving this problem.
 
  Thanks  Regards,
  Sankar
 
 
 
 
 
 
 
  --
  To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 


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



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




Re: Please help me improve my question skills (number of tomcat a pps)

2002-06-10 Thread Arshad Mahmood

Hi,

So the question reduces to:-
1. What are the extra memory requirements for a virtual host/context?
2. How much longer does it take to decide on a servlet/jsp to invoke for
an extra virtual host/context?

From my (limited) understanding of Tomcat, I would say the answer to both of
these questions is negligible compared to the memory/overhead of processing
a typical request. So your question reduces to how many requests can be
processed by your instance, and that depends very much on your application.
The distribution of the requests amongst the applications shouldm't matter.

Can somebody more knowledgeable confirm the extra resource requirements for
virtual hosts/contexts.

Regards,
Arshad


- Original Message -
From: Knutsen Jeffrey S [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, June 10, 2002 4:37 PM
Subject: RE: Please help me improve my question skills (number of tomcat a
pps)


 Thanks very much for the help.

 I do understand that there are many variables that will affect the answer
to
 this question.  At this time, all I am really after is what is the best
 that anyone has done, in any configuration.  I am interested in
real-world
 successes.

 Thanks again!




 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 10, 2002 10:33 AM
 To: Tomcat Users List
 Subject: Re: Please help me improve my question skills (number of tomcat
 apps)




 On Mon, 10 Jun 2002, Knutsen Jeffrey S wrote:

  Date: Mon, 10 Jun 2002 08:48:39 -0500
  From: Knutsen Jeffrey S [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
  Subject: Please help me improve my question skills (number of tomcat
apps)
 
  I have submitted the following question and received no response.  I
know
  this isn't a technical problem, but I was hoping for responses from real
  developers.  I thought it was a simple question, and have always
received
  excellent and quick responses from the tomcat mail list in the past, so
 the
  problem must be with me or the way I am asking.
 
  Can someone please help me improve myself?  Is this a stupid question?
 Have
  I perhaps asked it incorrectly?  I am open and receptive to any
 constructive
  criticism available (I can take it, but maybe you could send a direct
  response if you want to be extremely brutal?!)
 
  All I really want to know is how many applications real developers are
  putting on one machine in the real world. I am just looking for an
 abstract
  number, and I am not worried about system configurations at this time.
 

 The problem is that there is no generally useful answer to your question
 as stated.  It depends even more on the nature of the applications you are
 talking about (when the answer might even be zero for a particular server
 configuration) as the size of the server (an answer based on a 64-CPU
 mega-server with 4 gigabytes of main memory isn't going to help you on a
 small single-CPU Linux box with 64 megs).

 There are no architectural limits on the number of webapps a single Tomcat
 instance can support, or the number of Tomcat instances on a single
 server.  It all comes down to what resource bottlenecks you run into first
 in your application environment.  In many webapp environments, the first
 bottleneck encountered is often database access, followed by the number of
 simultenaous requests being processed.  Neither of those bottlenecks has
 much directly to do with how many different webapps you are talking
 about.


  Thanks!
 

 Craig


 
  ORIGINAL QUESTION:
 
  I am doing some Tomcat cost/benefit projections for my company.  I need
to
  determine the maximum number of applications that will run on Tomcat and
  still provide stable performance.  I am not interested in a theoretical
  number at this time, just seeking information about what real developers
 are
  actually doing with real applications.
 
  At this time, I am not interested in what machine types, OSs,
  configurations, versions, are being used.  I understand the answer to my
  questions will depend heavily on these issues as well as on the
 applications
  themselves.  I just need to come up with a realistic number of
  instances/apps which are being run on a single machine by real users. I
am
  seeking an answer to the following two questions:
 
  Number of Tomcat instances I am running on one machine:
 
  Number of individual applications I am running in all instances of
Tomcat
 on
  one machine:
 
  Please feel free to respond to the mail list, or to me directly at
  [EMAIL PROTECTED] (if we don't want to clog the list with
  answers to this question).  I will post a final resolution message to
the
  mail list when I have come to some sort of conclusion.
 
  Thanks in advance for your help!
 
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 
  --
  To unsubscribe, 

Help with JNDI Catalina 4 (May 30 build)

2002-06-09 Thread Arshad Mahmood

Hi,

I am trying to use JNDI to access some resources.I wonder if someone knows how to use 
the GlobalNamingResources.

Here is a snippet from my server.xml

  GlobalNamingResources

!-- the file based cache for all web applications --
Resource name=rohas/filecache auth=Container type=com.rohas.cache.FileCache 
/
ResourceParams name=rohas/filecache
parameter
namefactory/name
valuecom.rohas.cache.FileCacheFactory/value
/parameter
parameter
namecacheDir/name
value/tmp/cache/value
/parameter
/ResourceParams

.

I have then defined a link to this in my context as follows :-

Context path= docBase=www.compuvision.co.uk debug=0 reloadable=true
 crossContext=false cookies=true 
ResourceLink name=rohas/filecache global=rohas/filecache
type=com.rohas.cache.FileCache /


The code to load the resource is defined as follows ::-

/* Get the file cache from the context via JNDI */
initCtx = new InitialContext();
envCtx = (Context)initCtx.lookup(java:comp/env);

/* retrieve the file cache */
fileCache = (FileCache)envCtx.lookup(rohas/filecache);

The resource is loaded as part of the startup for my servlet. When I start catalina I 
get the following error:-

javax.naming.NameNotFoundException: Name rohas is not bound in this Context
at org.apache.naming.NamingContext.lookup(Unknown Source)
at org.apache.naming.NamingContext.lookup(Unknown Source)
at com.rohas.util.MasterServlet.init(MasterServlet.java:76)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at org.apache.catalina.core.StandardWrapper.loadServlet(Unknown Source)
at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
at org.apache.catalina.core.StandardContext.loadOnStartup(Unknown Source)
at org.apache.catalina.core.StandardContext.start(Unknown Source)

One answer could be to define the resources in each context, but this is a pain as I 
am probably going to have about 6/7 contexts each of which use this shared resource.

Can anybody help ? Am I using the global resources in completely the wrong way ???

Regards,
Arshad




Re: problem..plz help me out

2002-06-09 Thread Arshad Mahmood

Hi,

What is in your server.xml. Have you defined a virtual host for puneet, and
how have you defined the
Context. Send yout server.xml as an attachment and we should be able to see
what the problem is.

Do you get a response by trying
http://localhost:8080/yourcontext/servlet/abc (replace yourcontext with
the name of your context).

Regards,
Arshad

- Original Message -
From: puneet sachar [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, June 09, 2002 6:51 PM
Subject: Re: problem..plz help me out


 I'm on win me platform ..

 and i don't understand one thing if a servlet works
 fine with this url
 http://localhost:8080/examples/servlet/abc

 then whatz worng with

 http://puneet:8080/servlet/abc
 or
 http://puneet:8080/sachar/servlet/abc

 i have done what exactly written in server.xml

 if u can help me out plz do that..this is my 4th day
 without work

 Puneet


 --- puneet sachar [EMAIL PROTECTED] wrote:
 
  --- Markus Kirsten [EMAIL PROTECTED]
  wrote:
   Does the example servlets and JSP work?
  
   Which platform do you use?
  
  
   Markus
  
  
   On lördag, juni 8, 2002, at 09:22 , puneet sachar
   wrote:
  
Hi friends, this is my 4th mail regarding my
   single
complain..
   
I have install the tomcat 4.0.3 and its doing
  fine
   as
far .html files are concern but no .class and
  .jsp
files are running on it
   
I have asked 9-10 times abt same question again
   and
again and I got nothing from u guys there
   
Plz help meÖI really stuck ..
   
With this mail Iím sending my server.xml file
  and
web.xml file which is in my virtualhost/WEB-INF/
   
I know it is very tough for u to go in these
  files
   and
see for errors but plz..iím in need badly and
   afater
spending so much time here I some time feel like
crying Ö and Iím in such a place and in such a
   part of
India..where I canít get ant local computer guy
   with
whom I can discuss ..plz do me a little favour
   
Here are my problems
1) no .class and .jsp working only html is
  working
2) I have done all changes which were to made in
server.xmlÖ)I have send the file also plz check
  it
   and
tell me any mistake if u find)
3) Iím getting 404 error ..no servlet found
4) And Iím able to excess the .class file vis
http://localhost:80/examples/servlet/abc.class
 But not by making my own virtual host aand not
   even
the default root directory
   
   
what i have is my own context named sachar
and when i go
   
  .http://puneet:80/sachar/servlet/HelloworldServlet
   
error -- 404
   
See friends ..if u can help me Iíll be very
   grateful
to u
   
Puneet
   
   
   
  __
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
?xml version=1.0 encoding=ISO-8859-1?
   
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web
   Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
   
web-app
servlet
servlet-nameMyExample/servlet-name
servlet-classHelloWorldExample/servlet-class
run-as
descriptionSecurity role for anonymous
   access/description
role-nametomcat/role-name
/run-as
/servlet
   
servlet-mapping
servlet-nameMyExample/servlet-name
url-pattern/sachar/servlet/snoop/url-pattern
url-pattern/servlet/*/url-pattern
/servlet-mapping
   
   
/web-app
!-- Example Server Configuration File --
!-- Note that component elements are nested
   corresponding to their
 parent-child relationships with each other
   --
   
!-- A Server is a singleton element that
   represents the entire JVM,
 which may contain one or more Service
   instances.  The Server
 listens for a shutdown command on the
   indicated port.
   
 Note:  A Server is not itself a
   Container, so you may not
 define subcomponents such as Valves or
   Loggers at this level.
 --
   
Server port=8005 shutdown=SHUTDOWN
  debug=0
   
   
  !-- A Service is a collection of one or
  more
   Connectors that
share
   a single Container (and therefore the
  web
   applications visible
   within that Container).  Normally, that
   Container is an Engine,
   but this is not required.
   
   Note:  A Service is not itself a
   Container, so you may not
   define subcomponents such as Valves or
   Loggers at this level.
   --
   
  !-- Define the Tomcat Stand-Alone Service --
  Service name=Tomcat-Standalone
   
!-- A Connector represents an endpoint by
   which requests are
received
 and responses are returned.  Each
   Connector passes requests on
to the
 associated Container (normally an
   Engine) for processing.
   
 By default, a non-SSL HTTP/1.1
  Connector
   is established 

Re: How can I redirect only JSP pages to Tomcat?

2002-05-18 Thread Arshad Mahmood

Ooops, should have read more carefully. The Tomcat-IIS howto contains the
appropriate instructions on how to setup IIS to redirect a url to Tomcat.
You need to look for this document under Tomcat 3.2.4 (should still be
applicable to Tomcat 4 as you are using ajp12)..

Regards.

- Original Message -
From: Arshad Mahmood [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]; tomcat-user
[EMAIL PROTECTED]
Sent: Friday, May 17, 2002 10:30 AM
Subject: Re: How can I redirect only JSP pages to Tomcat?


 Which connector are you using, with mod_jk you can simply issue a
 JkMount /mysite/* ajp13 to forward all requests under
 /mysite to Tomcat.

 Regards.

 - Original Message -
 From: Luca Ventura [EMAIL PROTECTED]
 To: tomcat-user [EMAIL PROTECTED]; tomcat-dev
 [EMAIL PROTECTED]
 Sent: Friday, May 17, 2002 7:44 AM
 Subject: How can I redirect only JSP pages to Tomcat?


  Hello everybody!
 
  I have installed Tomcat 4 as servlet/JSP container fo IIS 5 but  I
haven't
  understood
  how to redirect to Tomcat only requests for JSP pages or servlets. I
have
  found only the way
  to redirect entire sites  but I would like to redirect only
  JSP pages and servlets and not html pages for example.
 
  Is it possible to redirect only a specified directory of a Web site? For
  example
  if I defined a site in /mysite folder is it possible to redirect to
Tomcat
  only the
  request for the code present in /mysite/jsp ???
 
  Thanks everybody in advance!
 
  Luca
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


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



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




Re: How can I redirect only JSP pages to Tomcat?

2002-05-18 Thread Arshad Mahmood

Which connector are you using, with mod_jk you can simply issue a
JkMount /mysite/* ajp13 to forward all requests under
/mysite to Tomcat.

Regards.

- Original Message -
From: Luca Ventura [EMAIL PROTECTED]
To: tomcat-user [EMAIL PROTECTED]; tomcat-dev
[EMAIL PROTECTED]
Sent: Friday, May 17, 2002 7:44 AM
Subject: How can I redirect only JSP pages to Tomcat?


 Hello everybody!

 I have installed Tomcat 4 as servlet/JSP container fo IIS 5 but  I haven't
 understood
 how to redirect to Tomcat only requests for JSP pages or servlets. I have
 found only the way
 to redirect entire sites  but I would like to redirect only
 JSP pages and servlets and not html pages for example.

 Is it possible to redirect only a specified directory of a Web site? For
 example
 if I defined a site in /mysite folder is it possible to redirect to Tomcat
 only the
 request for the code present in /mysite/jsp ???

 Thanks everybody in advance!

 Luca


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



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




Help JDBC

2001-09-16 Thread arshad mahmood

Help,
I keep getting oracle.jdbc.driver.OracleDriver not found error from a JSP
when runing under NT oracle 8.0.5. I have compled and run the java code It
works O.K. Is ther a path setting missing ?? I have copied all oracle driver
classes to the lib directory.