RE: JDBCReal / MySql /server.xml problem

2002-09-05 Thread khozaima shakir

Hi Howard,
I am writing this direct since, its little of topic. I too had similar 
problems, what i did was that in the jdbc realm howto document, there is 
connectionPassword and connectionNAme attributes so I removed the attributes 
from connectionURL and had the atributes separately (in server.xml). 
Anyways, I still could get the thing done, since after that I got error a 
can't set auto-commit off I wrote this couple of times in user list but 
didn't get any response... is it that in mysql there is no such option to 
turn off auto-commit? If you don't mind, would you please let me know if it 
worked for you? and how. I am using Tomcat 4.0.4, MySQL3.23, the driver 
mm.mysql.2.14.jar..
I am quite a beginner in all this..(am student) and would appriciate your 
feed back,
Thanks,
Khozaima


From: Howard Miller [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: RE: JDBCReal / MySql /server.xml problem
Date: Thu, 5 Sep 2002 11:44:42 +0100

Ahh, logical -  thanks... I'm not too hot on XML sorry!

So, does somebody want to update the example in the Tomcat docs then? 
Wasted
half a day because of that!

Cheers,

Howard

-Original Message-
From: Barney Hamish [mailto:[EMAIL PROTECTED]]
Sent: 05 September 2002 11:38
To: 'Tomcat Users List'
Subject: RE: JDBCReal / MySql /server.xml problem


In xml you can't just write  because it has special meaning. It's used to
escape special characters. To get an  you'll have to write
amp;password=foo
Hamish

  -Original Message-
  From: Howard Miller [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 05, 2002 12:39 PM
  To: '[EMAIL PROTECTED]'
  Subject: JDBCReal / MySql /server.xml problem
 
 
  Hi,
 
  I am trying to set up a JDBCRealm using MySql. I have pretty
  much followed
  the documentation to the letter.
 
  However my Realm...  tag declaration, generates the
  following parse error
 
  The reference to entity password must end with the ; delimter.
 
  This points to the password=mypassword bit of the
  connectionURL attribute.
  Removing the password bit of the string gets rid of the error, but of
  couurse it then won't connect to the database. As there is no DTD for
  server.xml I am somewhat stumped. I don't think I have done anything
  different from the documentation
 
  BTW I am using Tomcat version 4.1.9.
 
  Any help appreciated.
 
  Howard
 
  --
  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]







_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: Tomcat Installation on Linux SuSe

2002-08-28 Thread khozaima shakir

Hi all,
Tomcat crashes on linux Suse when I set JAVA_HOME env variable to jdk1.3.1 
directory. However it doesn't crash when I set the variable to j2sdk1.4.1... 
works fine with it. This just for information
Any comments why so ?
Thanks
Shakir




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Tomcat installation on Linux Suse

2002-08-27 Thread khozaima shakir

Hi Randall, Peter,
I tried out the suggestions,
sh -x ./shutdown.sh  shutdown.txt
but the output doesn't say anything, infact I noticed by ps -ef|grep java , 
there is no process, ie tomcat didn't even start. Somewhere I read , 
jdk1.3.X doesn't work for tomcat on Linux Suse 7.2, is that true? Can you 
give me a link for complete installation how to for linux and unix?
Thanks
Shakir



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: Tomcat Installation on linux

2002-08-26 Thread khozaima shakir

Hi Jhair,
yes, I am running tomcat from shell.
About shoutdown, I shutdown tomcat by :  shutdown.sh
Thanks
Shakir


From: Jhair Tocancipa Triana [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Tomcat Installation on linux
Date: 26 Aug 2002 09:49:07 +0200

  - == khozaima shakir [EMAIL PROTECTED] writes:

 - Should a startup window open? It didn't open.

No, if you are  running tomcat from a shell. Or did  you run it from a
Windows emulator?

 - When I try to shutdown the tomcat, it gives segmentation fault.

How do you shutdown the tomcat?

--
--Jhair


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




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: Tomcat Installation on linux

2002-08-26 Thread khozaima shakir

Hi Randall,
Sorry, guess the way i typed was misleading, i typed just
shutdown.sh at command prompt.
The directory that I was in when I type in startup.sh or shutdown.sh is 
user/userName/jakarta-tomcat-4.0.4/bin
The output i get on shutdown is --  Segmentation fault
Shakir


From: Randall R Schulz [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Tomcat Installation on linux
Date: Mon, 26 Aug 2002 07:18:58 -0700

Shakir,

Where did you get that command from?

Here's what you did: You truncated your shutdown.sh script. The : is 
the no-op command that is used when one wants to use side-effects (such as 
I/O redirection) without running a command. The  is similar to that of 
the DOS/CMD.exe/Command.com in Windows, it redirects output to the file 
whose name follows. So you ran the null command (which produces no output) 
and redirected it to the shutdown.sh script, thus truncating it. Had you 
used the append output redirection, , all would be OK, since adding 0 
bytes to the end of shutdown.sh would not do any damage (it would only 
alter the last modification time of that file, which you could see with ls 
-l shutdown.sh).

So you'll have to retrieve the shutdown.sh script from your Tomcat 
distribution.

Then to use it, just invoke it. Since it usually does not run indefinitely 
and does not produce a lot of output or usually any particularly 
interesting output, there's no need to redirect its output.


I recommend that people recently switching from Windows to Linux or another 
Unix-like system get some tutorial materials on these basics. There are 
some vague similarities with Windows, but a lot is different and groping 
around in the dark is not really advisable.

Good luck.

Randall Schulz
Mountain View, CA USA


At 04:21 2002-08-26, khozaima shakir wrote:
Hi Jhair,
yes, I am running tomcat from shell.
About shoutdown, I shutdown tomcat by :  shutdown.sh
Thanks
Shakir


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





_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




Tomcat Installation on linux

2002-08-25 Thread khozaima shakir

Hi all,
I am trying to setup tomcat 4.0.4 on linux.
I have installed the tomcat  direcory as : 
/users/userName/jakarta-tomcat-4.0.4
Then from /jarakarta-tomact-4.0.4/bin, it set JAVA_HOME to 
/usr/local/jdk1.3.1_01
Next I ran the startup.sh comand, I get message as
Using Catalina_home, base, tomact temp,  (tomcat home directory)
JAVA_HOME as /usr/local/1.3.1_01
Should a startup window open? It didn't open.
Next In the netscape browser, the servlet classes installed in 
WEB_INF/classes are not detected , . (earlier i had setup tomcat with 
similar directory structure in tomcat on win2k it worked fine)
When I try to shutdown the tomcat, it gives segmentation fault,
Can anyone please throw some light on what could be going wrong?
Thanks
Shakir

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




JDBC Realm Error --Cant access database

2002-08-12 Thread khozaima shakir

Hi all, need help, please!
I am trying to set up JDBCRealm. I edit server.xml as:-
Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
 driverName=org.gjt.mm.mysql.Driver
  
connectionURL=jdbc:mysql://mysql.wpi.edu/EMSDATA?user=skhuzema;password=pPqrAb
  userTable=USERS userNameCol=USER_NAME
userCredCol=USER_PASS
  userRoleTable=USER_ROLES roleNameCol=ROLE_NAME /
When i restart the tomcat after this, i get error message as
Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
Catalina.start: LifecycleException:  Exception opening database connection:
java.sql.SQLException: Invalid authorization specification: Access denied 
for user:'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
LifecycleException:  Exception opening database connection:
java.sql.SQLException: Invalid authorization specification: Access denied 
for user: 'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
  at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

The mysql database server is not on my local host (for tomcat). Does it look 
like the connection URL is not being parsed correctly? ( I tried changing 
the connectionURL string in server.xml and those were reflected in the error 
message and still got error as (Using Password: NO) Without setting up 
JDBCRealm, I can start the tomcat sucessfully and the servlet also access 
the database using the same url username and password
can't figure out the fault... please help???
What other configs, do I need to do in addition to the one in server.xml, 
just to get tomcat started?
Khozaima





_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




RE: JDBC Realm Error --Cant access database

2002-08-12 Thread khozaima shakir

Try removing your username and password info from your connection string
and using the 'connectionName' and 'connectionPassword'
_
Hi, I did that , this time I got following error, sorry  this question is 
off topic ! but can you suggest a fix for that please?
Thanks
Khozaima.
Error Message:
Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
Catalina.start: LifecycleException:  Exception opening database connection:  
jav
a.sql.SQLException: Cannot disable AUTO_COMMIT
LifecycleException:  Exception opening database connection:  
java.sql.SQLExcepti
on: Cannot disable AUTO_COMMIT
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)

at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343
)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:3
88)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:506
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
- Andrew

  -Original Message-
  From: khozaima shakir [mailto:[EMAIL PROTECTED]]
  Sent: Monday, August 12, 2002 10:42 AM
  To: [EMAIL PROTECTED]
  Subject: JDBC Realm Error --Cant access database
 
 
  Hi all, need help, please!
  I am trying to set up JDBCRealm. I edit server.xml as:-
  Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
   driverName=org.gjt.mm.mysql.Driver
 
  connectionURL=jdbc:mysql://mysql.wpi.edu/EMSDATA?user=skhuzem
  a;password=pPqrAb
userTable=USERS userNameCol=USER_NAME
  userCredCol=USER_PASS
userRoleTable=USER_ROLES roleNameCol=ROLE_NAME
  / When i restart the tomcat after this, i get error message
  as Starting service Tomcat-Standalone Apache Tomcat/4.0.4
  Catalina.start: LifecycleException:  Exception opening
  database connection:
  java.sql.SQLException: Invalid authorization specification:
  Access denied
  for user:'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
  LifecycleException:  Exception opening database connection:
  java.sql.SQLException: Invalid authorization specification:
  Access denied
  for user: 'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
  at
  org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
  at
  org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
  at
  org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
  at
  org.apache.catalina.core.StandardService.start(StandardService
  .java:388)
  at
  org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
  at
  org.apache.catalina.startup.Catalina.start(Catalina.java:781)
  at
  org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at
  org.apache.catalina.startup.Catalina.process(Catalina.java:179)
  at java.lang.reflect.Method.invoke(Native Method)
 at
  org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
 
  The mysql database server is not on my local host (for
  tomcat). Does it look
  like the connection URL is not being parsed correctly? ( I
  tried changing
  the connectionURL string in server.xml and those were
  reflected in the error
  message and still got error as (Using Password: NO) Without
  setting up
  JDBCRealm, I can start the tomcat sucessfully and the servlet
  also access
  the database using the same url username and password
  can't figure out the fault... please help???
  What other configs, do I need to do in addition to the one in
  server.xml,
  just to get tomcat started?
  Khozaima
 
 
 
 
 
  _
  Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 
  --
  To unsubscribe, e-mail:
  mailto:tomcat-user- [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]




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Reading from files in servlet from Tomcat-4.0.4

2002-08-10 Thread khozaima shakir

Hi all,
I am trying to read from a file : filename
Where should i put this file in tomcat 4.0.4 directory structure?
I tried putting the file in directories:
webapps/ROOT, webapps/ROOT/WEB-INF, webapps/ROOT/WEB-INF/classes  in each 
instance i get the error message
The system cannot find the file specified

I used following statement in servlet code.
bufferin = new BufferedReader(new InputStreamReader(new 
FileInputStream(fileName)));

Thanks
Khozaima


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




JDBC Realm - Can't start TC4.0.4 !!

2002-08-09 Thread khozaima shakir

I am trying to configure JDBCRealm. I can't understand the error, since the 
same username and password was successfully used to access the database 
using servlet-jdbc in my webapp, without configuring JDBCrealm. Can anyone 
please advise?
Thanks,
skhuzema

I have edited server.xml realm as under:
Realm  className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=org.gjt.mm.mysql.Driver
connectionURL=jdbc:mysql://myql.wpi.edu/dbaseName?user=skhuzema;dbpasswd=dbpasswd
userTable=users userNameCol=user_name userCredCol=user_pass
userRoleTable=user_roles roleNameCol=role_name /
-- Names of columns same as above in database
(I have installed tomcat on mapped drive on windowsNT)
Error Message on tomcat startup:
Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
Catalina.start: LifecycleException:  Exception opening database connection:  
java.sql.SQLException: Invalid authorization specification: Access denied 
for user:
'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
LifecycleException:  Exception opening database connection:  
java.sql.SQLException: Invalid authorization specification: Access denied 
for user: 'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343
)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:3
88)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:506
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
- Root Cause -
java.sql.SQLException: Invalid authorization specification: Access denied 
for user: 'skhuzema;[EMAIL PROTECTED]' (Using password: NO)
at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:278)
at org.gjt.mm.mysql.Connection.init(Connection.java:230)
at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:548)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108)

at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343
)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:3
88)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:506
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




Database access through JDBC-SERVLET

2002-08-02 Thread khozaima shakir

I am a student and new user of tomcat, and am working on a project that 
involves accessing database through servlet. The code that i have written 
compiles and when i run it on tomcat 4.0.4, the statment till the try{... 
gets executed, but the connection to the database is not made. I would 
really appriciate if anyone could help me. Thanks,
-Khozaima.
PS: code and web.xml (I haven't done any editing in /conf/server.xml)
the application is stored in /webapps/ROOT/WEB-INF/classes/
web.xml:
?xml version=1.0 encoding=ISO-8859-1 ?
  !DOCTYPE web-app (View Source for full doctype...)
web-app
servlet
  servlet-nameServe/servlet-name
  servlet-classServlet_JDBC/servlet-class
  /servlet
servlet-mapping
  servlet-nameServe/servlet-name
  url-pattern/Serve/url-pattern
  /servlet-mapping
  /web-app

Servlet code:
public class Servlet_JDBC extends HttpServlet{
Connection conn;
private ServletConfig config;
public void init(ServletConfig config)
throws ServletException{
this.config=config;
}
public void service (HttpServletRequest req, HttpServletResponse res)
  throws ServletException, IOException {
  HttpSession session = req.getSession(true);
  res.setContentType(text/html);
  PrintWriter out = res.getWriter();
  out.println(HTMLHEADTITLE QUERY RESULTS/TITLE/HEAD);
  out.println(BODY bgColor=green text=#008000 );
  out.println(TABLE align=center border=1 width=\75%\);
  out.println(TRTDRESCFG/TD/TR);
try{
   Class.forName(org.gjt.mm.mysql.Driver);
   conn = DriverManager.getConnection 
(jdbc:mysql://dbServerURL/DBNAME, myUserName, pw);
   Statement stmt=conn.createStatement();
   ResultSet rs=stmt.executeQuery(SELECT PARAMETER, VALUE FROM 
RESTABLE);
while(rs.next()){
out.println(TRTD + rs.getString(1) + /TD);
out.println(TD + rs.getString(2) + /TD/TR);
 }
rs.close();stmt.close();conn.close();
 }catch(Exception e){out.println(e.getMessage());}
 out.println(/TABLE/P);
 out.println(Pnbsp;/P/FONT/BODY/HTML);
}
public void destroy(){}
}





_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Connecting to JDBC mysql database in a servlet

2002-08-01 Thread khozaima shakir

Hi all!
I am trying to connect to JDBC in a servlet, the html page gets displayed 
the try statement and i find that the connection is not made. I am using 
tomact 4.0.4 and have deployed the class file in 
\webapps\ROOT\WEB-INF\classes directory. Can anyone please suggest a path 
forward? In case i need to map the servlet in web.xml, i don't know how to !
Thanks in advance!
Khozaima
my code:
public class Servlet_JDBC extends HttpServlet{
Connection conn;
private ServletConfig config;
public void init(ServletConfig config)
throws ServletException{
this.config=config;
}
public void service (HttpServletRequest req, HttpServletResponse res)
  throws ServletException, IOException {
  HttpSession session = req.getSession(true);
  res.setContentType(text/html);
  PrintWriter out = res.getWriter();
  out.println(HTMLHEADTITLEQuery Results/TITLE);
  out.println(/HEAD);
  out.println(BODY bgColor=blanchedalmond text=#008000 topMargin=0);
out.println(P align=centerFONT face=HelveticaFONT 
color=fuchsia style=\BACKGROUND COLOR
:white\BIGBIGList/BIG/BIG/FONT/P);
  out.println(P align=center);
out.println(TABLE align=center border=1 cellPadding=1 
cellSpacing=1 width=\75%\);

out.println(TR);
out.println(TDPARAMETER/TD);
out.println(TDVALUE/TD);
out.println(/TR);
try{
Class.forName(org.gjt.mm.mysql.Driver);
conn = 
DriverManager.getConnection(jdbc:mysql://databaseURL/dataBaseName, 
userName, password);
Statement stmt=conn.createStatement();
  ResultSet rs=stmt.executeQuery(SELECT PARAMETER, VALUE FROM 
MYTABLE);
while(rs.next()){
out.println(TR);
out.println(TD + rs.getString(1) + /TD);
out.println(TD + rs.getString(2) + /TD);
out.println(/TR);
}
   rs.close();stmt.close();conn.close();
 }catch(Exception e){out.println(e.getMessage());}
   out.println(/TABLE/P);
   out.println(Pnbsp;/P/FONT/BODY/HTML);
}
public void destroy(){}
}




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




servlet class deployment

2002-07-11 Thread khozaima shakir

I have installed Tomcat version 4.0.4 and have set Java_home, to my 
jdk1.3.1_02 directory. To run my servlet, where do i have to load the 
classes. i am confused since there are 2 web_inf directories,
structures as
1) webapps/ROOT/WEB_INF  ( there is no classes directory, do i have to 
make it?)
2)webapps/examples
From: Shapira, Yoav [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: RE: Environment Variable
Date: Thu, 11 Jul 2002 11:02:09 -0400

Howdy,
If you have a different web.xml for each environment, you can put a
param there indicating which environment it is.  If you have a different
tomcat startup script for each environment, you can add an option
(CATALINA_OPTS or JAVA_OPTS), e.g. -Dcom.mycompany.env=production and
then use System.getProperty(com.mycompany.env) to retrieve the value.

Maybe one of those will work for you ;)

Yoav Shapira
Millennium ChemInformatics


 -Original Message-
 From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, July 11, 2002 10:54 AM
 To: 'Tomcat Users List'
 Subject: Environment Variable
 
 Hi,
 I have a quick question. I would like my application to know what kind
of
 environment (DEV, QA, PROD) it's in by looking at Tomcat. Does anyone
know
 how to do that?
 
 Thanks,
 
 Dean Chen
 
 --
 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]




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




servlet class deployment

2002-07-11 Thread khozaima shakir

I have installed Tomcat version 4.0.4 and have set Java_home, to my 
jdk1.3.1_02 directory. To run my servlet, where do i have to load the 
classes. i am confused since there are 2 web_inf directories,
structures as
1) webapps/ROOT/WEB_INF  ( there is no classes directory, do i have to 
make it?)
2)webapps/examples/wWEB_INF/classes



thanks
shakir






_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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