Re: Importing classes

2002-01-15 Thread Ramaswamy, Rathnapriya (CORP, GTS, L531741)

Why don't you jar the package and add it to the classpath

-Original Message-
From: panos periorellis [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 9:29 PM
To: [EMAIL PROTECTED]
Subject: Importing classes


I have developed some java classes which i want to import in my JSP code..

can somebody tell me how do i do this.

i have a list of classes in a package called travel

but

this %@ page import=travel.* % produces errors. In fact it says that the
package cannot be found?
Anyone with similar problems?
thanks
P

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com


THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.
If you have received this message by error, please notify us
immediately, return the original mail to the sender and delete the
message from your system.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: A java question.

2002-01-15 Thread Ramaswamy, Rathnapriya (CORP, GTS, L531741)

Whenever you have to write a statement block within if or else, use {
and } to wrap the statement block. Ur way only works for a single statement.
Try this code :

class test {
static boolean check;
public static void main(String args[]) {
int i;
if(check == true)
i=1;
else
i=2;

if (check == false)
{
i=2;
i=i+2;
}

else
i = i + 4;

System.out.println(i);
 }
}

-Original Message-
From: Miao, Franco CAWS:EX [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 4:05 AM
To: [EMAIL PROTECTED]
Subject: A java question.


class test {
static boolean check;
public static void main(String args[]) {
int i;
if(check == true)
i=1;
else
i=2;

if (check == false)
i=2; i=i+2;

else
i = i + 4;

System.out.println(i);
 }
}


C:\javac test.java
test.java:13: 'else' without 'if'
else
^

I know this is cause by  i=2; i=i+2;
if just i=2, then everthing will be fine, how to make  i=2; i=i+2; as a
block, so compiler will not consider it should need another if ?

Franco

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com


THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.
If you have received this message by error, please notify us
immediately, return the original mail to the sender and delete the
message from your system.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Problem while writting the response to an Excel file.

2002-01-15 Thread rajac




Hi, I am writting the response of a 
servlet/jsp page to an Excel file. I am setting the 
response.setContentType("text/xls"); But the output is written to a text file in 
plain text format.

 How to write the response to an excel 
file. 

Actually my application is like this. I am having 
an JSP page, where i have an "download Result" link. By clicking on the link, 
the results can either be saved on to the hard disk as an Excel file or can be 
displayed on the same window by opening an excel sheet. Your help will really be 
appreciated.
Thanks,

Regards,Raja


Re: Problem with IBM Websphere Application Server 4

2002-01-15 Thread Christian Feard

Hi,

You have to look at the log files in as_root/logs to see why your
appserver is not starting (stderr + stdout). The Adminconsole will just
start if you appserver is running. So it's normal if you can't get it if
your appserver is down.
The fact that you sometimes got it is a hint that your http server is
correctly configured.

To access a database from Websphere, you have to configure a jdbc driver
and a DataSource from the adminconsole and let your application point to
that DataSource.

regards

Chris



|+---
||  Debopam Ghoshal  |
||  [EMAIL PROTECTED]|
||  Sent by: A   |
||  mailing list |
||  about Java Server|
||  Pages|
||  specification and|
||  reference|
||  JSP-INTEREST@JAV|
||  A.SUN.COM   |
||   |
||   |
||  14/01/2002 20:11 |
||  Please respond to|
||  A mailing list   |
||  about Java Server|
||  Pages|
||  specification and|
||  reference|
||   |
|+---
  
|
  |
|
  |  To: [EMAIL PROTECTED] 
|
  |  cc:   
|
  |  Subject: Problem with IBM Websphere Application Server 4  
|
  
|




Dear All,
I recently installed IBM Websphere Application Server 4 along with IBM HTTP
Server. The HTTP server starts automatically when my machine starts(OS:
Windows 2000 Server). But when I start my Application Server, sometime it
starts and most of the times it does not start. The administrator's console
page (http://localhost:9090/admin) does not show up most of the times. Can
someone help me configure my Appserver as well as HTTP Server so that they
run smoothly. Moreover I would like to know how to connect my appserver to
Oracle 8i server running on my machine, since i do not have DB2 installed.

thanx a lot in advance,
regards,
Debopam.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



signoff JSP-INTEREST

2002-01-15 Thread Vadlmudi Harischandra


signoff JSP-INTEREST
 


==To 
unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Problem while writting the response to an Excel file.

2002-01-15 Thread Geert Van Damme



instead of "text/xls"
use 
"application/vnd.ms-excel"

Geert 
Van Damme

  -Original Message-From: A mailing list about Java 
  Server Pages specification and reference 
  [mailto:[EMAIL PROTECTED]]On Behalf Of rajacSent: 
  dinsdag 15 januari 2002 2:14To: 
  [EMAIL PROTECTED]Subject: Problem while writting the 
  response to an Excel file.
  
  Hi, I am writting the response of 
  a servlet/jsp page to an Excel file. I am setting the 
  response.setContentType("text/xls"); But the output is written to a text file 
  in plain text format.
  
   How to write the response to an 
  excel file. 
  
  Actually my application is like this. I am having 
  an JSP page, where i have an "download Result" link. By clicking on the link, 
  the results can either be saved on to the hard disk as an Excel file or can be 
  displayed on the same window by opening an excel sheet. Your help will really 
  be appreciated.
  Thanks,
  
  Regards,Raja


JSP and MS Acces97

2002-01-15 Thread Wilson E. Lozano R.

Hi panos,
thanks for your help.

Hi everybody, i'm running tomcat4.0 with jdk1.3.1_02 in win 98.
Bun now i need know how can i do to make a connection win a data base in
Microsoft acces 97 trought any web page into my web site soported with
tomcat 4.0.

thanks in advanced.
---
Wilson Ernesto Lozano RolOn
Ingeniero de Sistemas
Universidad Industrial de Santander
---

On Mon, 14 Jan 2002, panos periorellis wrote:

 If you're doing this from DOS it should work

 Note that one of the directories inside the set
 catalina_home=c:\tcat\jakarta-tomcat-4.0\ should be bin lib etc

 in other words our directory should point to those
 so if there is another directory inside jakarta-tomcat-4.0 before the bin
 and lib directories then set the path to that 

 the other thing i thought of is that the jakarta-tomcat-4.0 directory name
 is a bit long...I remember i had to shorten mine  I have renamed it as
 jak..

 take care
 panos

 - Original Message -
 From: Wilson E. Lozano R. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, January 14, 2002 09:38
 Subject: Re: TOMCAT4.0 + win98 help!!!


  Hi Panos,
  Thanks but i was do it, however i don't use jrun
  in this version of tomcat the variable isn't tomcat_home, is
  catalina_home, and i does set catalina_home=c:\tcat\jakarta-tomcat-4.0\
  and i use jsdk and java_home=c:\jsdk1.3.1_02\ and my problem don't stop.
  ??
  Thanks in advanced.
  ---
  Wilson Ernesto Lozano RolOn
  Ingeniero de Sistemas
  Universidad Industrial de Santander
  ---
 
  On Mon, 14 Jan 2002, panos periorellis wrote:
 
   you have to set the variables from DOS.
  
   i.e.
  
   set TOMCAT_HOME=c:\tomcat\jak\jak (this is on my machine ...replace with
 the
   direcotyr on yours.
  
   set JAVA_HOME=c:\jbuilder\jdk1.3 (if you rin jbuilder that is)
  
  
 ===
   To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
   For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
   Some relevant FAQs on JSP/Servlets can be found at:
  
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com
  
 
 
 ===
  To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
 
   http://archives.java.sun.com/jsp-interest.html
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.jsp
   http://www.jguru.com/faq/index.jsp
   http://www.jspinsider.com
 

 ===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: JSP and MS Acces97

2002-01-15 Thread Panagiotis Konstantinidis

  First of all you need to load the drivers. To do that you need:

Class.forName(the whole path of the drivers here);

  After that the only thing you have to do is to open a connection with the speciffic 
DB server

Connection con = DriverManager.getConnection(url of your database server,  
username- optional, password - optional);

  After that you can communicate with the server by just sending SQL statements.



15/01/2002 04:26:17, Wilson E. Lozano R. [EMAIL PROTECTED] wrote:

Hi panos,
thanks for your help.

Hi everybody, i'm running tomcat4.0 with jdk1.3.1_02 in win 98.
Bun now i need know how can i do to make a connection win a data base in
Microsoft acces 97 trought any web page into my web site soported with
tomcat 4.0.

thanks in advanced.
---
Wilson Ernesto Lozano RolOn
Ingeniero de Sistemas
Universidad Industrial de Santander
---

On Mon, 14 Jan 2002, panos periorellis wrote:

 If you're doing this from DOS it should work

 Note that one of the directories inside the set
 catalina_home=c:\tcat\jakarta-tomcat-4.0\ should be bin lib etc

 in other words our directory should point to those
 so if there is another directory inside jakarta-tomcat-4.0 before the bin
 and lib directories then set the path to that 

 the other thing i thought of is that the jakarta-tomcat-4.0 directory name
 is a bit long...I remember i had to shorten mine  I have renamed it as
 jak..

 take care
 panos

 - Original Message -
 From: Wilson E. Lozano R. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, January 14, 2002 09:38
 Subject: Re: TOMCAT4.0 + win98 help!!!


  Hi Panos,
  Thanks but i was do it, however i don't use jrun
  in this version of tomcat the variable isn't tomcat_home, is
  catalina_home, and i does set catalina_home=c:\tcat\jakarta-tomcat-4.0\
  and i use jsdk and java_home=c:\jsdk1.3.1_02\ and my problem don't stop.
  ??
  Thanks in advanced.
  ---
  Wilson Ernesto Lozano RolOn
  Ingeniero de Sistemas
  Universidad Industrial de Santander
  ---
 
  On Mon, 14 Jan 2002, panos periorellis wrote:
 
   you have to set the variables from DOS.
  
   i.e.
  
   set TOMCAT_HOME=c:\tomcat\jak\jak (this is on my machine ...replace with
 the
   direcotyr on yours.
  
   set JAVA_HOME=c:\jbuilder\jdk1.3 (if you rin jbuilder that is)
  
  
 ===
   To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
   For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
   Some relevant FAQs on JSP/Servlets can be found at:
  
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com
  
 
 
 ===
  To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
 
   http://archives.java.sun.com/jsp-interest.html
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.jsp
   http://www.jguru.com/faq/index.jsp
   http://www.jspinsider.com
 

 ===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

__
It can only be attributed to human error
2001 A Space Odyssey

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Problem while writing the response to an Excel file

2002-01-15 Thread rajac




Hi, I am writting the response of a 
servlet/jsp page to an Excel file. I am setting the 
response.setContentType("text/xls"); But the output is written to a text file in 
plain text format.

 How to write the response to an excel 
file. 

Actually my application is like this. I am having 
an JSP page, where i have an "download Result" link. By clicking on the link, 
the results can either be saved on to the hard disk as an Excel file or can be 
displayed on the same window by opening an excel sheet. Your help will really be 
appreciated.
Thanks,

Regards,Raja


Re: JSP and MS Acces97

2002-01-15 Thread Wilson E. Lozano R.

Hi Panagiostis, thanks for your help,
Well but where can i find o how can i load the drivers?
i don't understod when you write class.forName(the whole path of the
drivers here); an the data base is host in the same PC, remembre ithe
plataform is win98.
Can you send me an example please?

---
Wilson Ernesto Lozano RolOn
Ingeniero de Sistemas
---

On Tue, 15 Jan 2002, Panagiotis Konstantinidis wrote:

   First of all you need to load the drivers. To do that you need:

 Class.forName(the whole path of the drivers here);

   After that the only thing you have to do is to open a connection with the 
speciffic DB server

 Connection con = DriverManager.getConnection(url of your database server,  
username- optional, password - optional);

   After that you can communicate with the server by just sending SQL statements.



 15/01/2002 04:26:17, Wilson E. Lozano R. [EMAIL PROTECTED] wrote:

 Hi panos,
 thanks for your help.
 
 Hi everybody, i'm running tomcat4.0 with jdk1.3.1_02 in win 98.
 Bun now i need know how can i do to make a connection win a data base in
 Microsoft acces 97 trought any web page into my web site soported with
 tomcat 4.0.
 
 thanks in advanced.
 ---
 Wilson Ernesto Lozano RolOn
 Ingeniero de Sistemas
 Universidad Industrial de Santander
 ---
 
 On Mon, 14 Jan 2002, panos periorellis wrote:
 
  If you're doing this from DOS it should work
 
  Note that one of the directories inside the set
  catalina_home=c:\tcat\jakarta-tomcat-4.0\ should be bin lib etc
 
  in other words our directory should point to those
  so if there is another directory inside jakarta-tomcat-4.0 before the bin
  and lib directories then set the path to that 
 
  the other thing i thought of is that the jakarta-tomcat-4.0 directory name
  is a bit long...I remember i had to shorten mine  I have renamed it as
  jak..
 
  take care
  panos
 
  - Original Message -
  From: Wilson E. Lozano R. [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, January 14, 2002 09:38
  Subject: Re: TOMCAT4.0 + win98 help!!!
 
 
   Hi Panos,
   Thanks but i was do it, however i don't use jrun
   in this version of tomcat the variable isn't tomcat_home, is
   catalina_home, and i does set catalina_home=c:\tcat\jakarta-tomcat-4.0\
   and i use jsdk and java_home=c:\jsdk1.3.1_02\ and my problem don't stop.
   ??
   Thanks in advanced.
   ---
   Wilson Ernesto Lozano RolOn
   Ingeniero de Sistemas
   Universidad Industrial de Santander
   ---
  
   On Mon, 14 Jan 2002, panos periorellis wrote:
  
you have to set the variables from DOS.
   
i.e.
   
set TOMCAT_HOME=c:\tomcat\jak\jak (this is on my machine ...replace with
  the
direcotyr on yours.
   
set JAVA_HOME=c:\jbuilder\jdk1.3 (if you rin jbuilder that is)
   
   
  ===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
  JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
  DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:
   
 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com
   
  
  
  ===
   To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
  JSP-INTEREST.
   For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
  DIGEST.
   Some relevant FAQs on JSP/Servlets can be found at:
  
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com
  
 
  ===
  To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
 
   http://archives.java.sun.com/jsp-interest.html
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.jsp
   http://www.jguru.com/faq/index.jsp
   http://www.jspinsider.com
 
 
 ===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:
 
  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com
 
 

Re: Problem while writting the response to an Excel file.

2002-01-15 Thread Dmitry Namiot

See also Excel taglib from Coldtags suite:
http://www.servletsuite.com/jsp.htm

-Original Message-
  From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of rajac
  Sent: dinsdag 15 januari 2002 2:14
  To: [EMAIL PROTECTED]
  Subject: Problem while writting the response to an Excel file.


  Hi,
 I am writting the response of a servlet/jsp page to an Excel file. I am
setting the response.setContentType(text/xls); But the output is written
to a text file in plain text format.

 How to write the response to an excel file.


--
Coldbeans Software - server-side Java (tm) components
http://www.servletsuite.com



__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: JSP and MS Acces97

2002-01-15 Thread Carlos

i know the rmijdbc driver.
this is a little slow but it runs well

- Original Message -
From: Wilson E. Lozano R. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 5:59 AM
Subject: Re: JSP and MS Acces97


 Hi Panagiostis, thanks for your help,
 Well but where can i find o how can i load the drivers?
 i don't understod when you write class.forName(the whole path of the
 drivers here); an the data base is host in the same PC, remembre ithe
 plataform is win98.
 Can you send me an example please?

 ---
 Wilson Ernesto Lozano RolOn
 Ingeniero de Sistemas
 ---

 On Tue, 15 Jan 2002, Panagiotis Konstantinidis wrote:

First of all you need to load the drivers. To do that you need:
 
  Class.forName(the whole path of the drivers here);
 
After that the only thing you have to do is to open a connection with
the speciffic DB server
 
  Connection con = DriverManager.getConnection(url of your database
server,  username- optional, password - optional);
 
After that you can communicate with the server by just sending SQL
statements.
 
 
 
  15/01/2002 04:26:17, Wilson E. Lozano R. [EMAIL PROTECTED] wrote:
 
  Hi panos,
  thanks for your help.
  
  Hi everybody, i'm running tomcat4.0 with jdk1.3.1_02 in win 98.
  Bun now i need know how can i do to make a connection win a data base
in
  Microsoft acces 97 trought any web page into my web site soported with
  tomcat 4.0.
  
  thanks in advanced.
  ---
  Wilson Ernesto Lozano RolOn
  Ingeniero de Sistemas
  Universidad Industrial de Santander
  ---
  
  On Mon, 14 Jan 2002, panos periorellis wrote:
  
   If you're doing this from DOS it should work
  
   Note that one of the directories inside the set
   catalina_home=c:\tcat\jakarta-tomcat-4.0\ should be bin lib etc
  
   in other words our directory should point to those
   so if there is another directory inside jakarta-tomcat-4.0 before the
bin
   and lib directories then set the path to that 
  
   the other thing i thought of is that the jakarta-tomcat-4.0 directory
name
   is a bit long...I remember i had to shorten mine  I have renamed
it as
   jak..
  
   take care
   panos
  
   - Original Message -
   From: Wilson E. Lozano R. [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, January 14, 2002 09:38
   Subject: Re: TOMCAT4.0 + win98 help!!!
  
  
Hi Panos,
Thanks but i was do it, however i don't use jrun
in this version of tomcat the variable isn't tomcat_home, is
catalina_home, and i does set
catalina_home=c:\tcat\jakarta-tomcat-4.0\
and i use jsdk and java_home=c:\jsdk1.3.1_02\ and my problem don't
stop.
??
Thanks in advanced.
---
Wilson Ernesto Lozano RolOn
Ingeniero de Sistemas
Universidad Industrial de Santander
---
   
On Mon, 14 Jan 2002, panos periorellis wrote:
   
 you have to set the variables from DOS.

 i.e.

 set TOMCAT_HOME=c:\tomcat\jak\jak (this is on my machine
...replace with
   the
 direcotyr on yours.

 set JAVA_HOME=c:\jbuilder\jdk1.3 (if you rin jbuilder that is)


  
===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
   JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set
JSP-INTEREST
   DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

   
   
  
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
   JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set
JSP-INTEREST
   DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:
   
 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com
   
  
  
===
   To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
   For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
   Some relevant FAQs on JSP/Servlets can be found at:
  
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com
  
  
 
===
  To unsubscribe: mailto [EMAIL PROTECTED] with 

Re: JSP and MS Acces97

2002-01-15 Thread Wilson E. Lozano R.

thanks Carlos, but, where find it? (the rmijdb) how install it? or how
config it?

---
Wilson Ernesto Lozano RolOn
Ingeniero de Sistemas
---

On Tue, 15 Jan 2002, Carlos wrote:

 i know the rmijdbc driver.
 this is a little slow but it runs well

 - Original Message -
 From: Wilson E. Lozano R. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, January 15, 2002 5:59 AM
 Subject: Re: JSP and MS Acces97


  Hi Panagiostis, thanks for your help,
  Well but where can i find o how can i load the drivers?
  i don't understod when you write class.forName(the whole path of the
  drivers here); an the data base is host in the same PC, remembre ithe
  plataform is win98.
  Can you send me an example please?
 
  ---
  Wilson Ernesto Lozano RolOn
  Ingeniero de Sistemas
  ---
 
  On Tue, 15 Jan 2002, Panagiotis Konstantinidis wrote:
 
 First of all you need to load the drivers. To do that you need:
  
   Class.forName(the whole path of the drivers here);
  
 After that the only thing you have to do is to open a connection with
 the speciffic DB server
  
   Connection con = DriverManager.getConnection(url of your database
 server,  username- optional, password - optional);
  
 After that you can communicate with the server by just sending SQL
 statements.
  
  
  
   15/01/2002 04:26:17, Wilson E. Lozano R. [EMAIL PROTECTED] wrote:
  
   Hi panos,
   thanks for your help.
   
   Hi everybody, i'm running tomcat4.0 with jdk1.3.1_02 in win 98.
   Bun now i need know how can i do to make a connection win a data base
 in
   Microsoft acces 97 trought any web page into my web site soported with
   tomcat 4.0.
   
   thanks in advanced.
   ---
   Wilson Ernesto Lozano RolOn
   Ingeniero de Sistemas
   Universidad Industrial de Santander
   ---
   
   On Mon, 14 Jan 2002, panos periorellis wrote:
   
If you're doing this from DOS it should work
   
Note that one of the directories inside the set
catalina_home=c:\tcat\jakarta-tomcat-4.0\ should be bin lib etc
   
in other words our directory should point to those
so if there is another directory inside jakarta-tomcat-4.0 before the
 bin
and lib directories then set the path to that 
   
the other thing i thought of is that the jakarta-tomcat-4.0 directory
 name
is a bit long...I remember i had to shorten mine  I have renamed
 it as
jak..
   
take care
panos
   
- Original Message -
From: Wilson E. Lozano R. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 14, 2002 09:38
Subject: Re: TOMCAT4.0 + win98 help!!!
   
   
 Hi Panos,
 Thanks but i was do it, however i don't use jrun
 in this version of tomcat the variable isn't tomcat_home, is
 catalina_home, and i does set
 catalina_home=c:\tcat\jakarta-tomcat-4.0\
 and i use jsdk and java_home=c:\jsdk1.3.1_02\ and my problem don't
 stop.
 ??
 Thanks in advanced.
 ---
 Wilson Ernesto Lozano RolOn
 Ingeniero de Sistemas
 Universidad Industrial de Santander
 ---

 On Mon, 14 Jan 2002, panos periorellis wrote:

  you have to set the variables from DOS.
 
  i.e.
 
  set TOMCAT_HOME=c:\tomcat\jak\jak (this is on my machine
 ...replace with
the
  direcotyr on yours.
 
  set JAVA_HOME=c:\jbuilder\jdk1.3 (if you rin jbuilder that is)
 
 
   
 ===
  To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set
 JSP-INTEREST
DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
 
   http://archives.java.sun.com/jsp-interest.html
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.jsp
   http://www.jguru.com/faq/index.jsp
   http://www.jspinsider.com
 


   
 ===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set
 JSP-INTEREST
DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

   
   
 ===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
Some 

Re: JSP and MS Acces97

2002-01-15 Thread Carlos

http://www.objectweb.org/rmijdbc/
put in the java (jsp, web) server
- Original Message -
From: Wilson E. Lozano R. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 6:40 AM
Subject: Re: JSP and MS Acces97


 thanks Carlos, but, where find it? (the rmijdb) how install it? or how
 config it?

 ---
 Wilson Ernesto Lozano RolOn
 Ingeniero de Sistemas
 ---

 On Tue, 15 Jan 2002, Carlos wrote:

  i know the rmijdbc driver.
  this is a little slow but it runs well
 
  - Original Message -
  From: Wilson E. Lozano R. [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, January 15, 2002 5:59 AM
  Subject: Re: JSP and MS Acces97
 
 
   Hi Panagiostis, thanks for your help,
   Well but where can i find o how can i load the drivers?
   i don't understod when you write class.forName(the whole path of the
   drivers here); an the data base is host in the same PC, remembre ithe
   plataform is win98.
   Can you send me an example please?
  
   ---
   Wilson Ernesto Lozano RolOn
   Ingeniero de Sistemas
   ---
  
   On Tue, 15 Jan 2002, Panagiotis Konstantinidis wrote:
  
  First of all you need to load the drivers. To do that you need:
   
Class.forName(the whole path of the drivers here);
   
  After that the only thing you have to do is to open a connection
with
  the speciffic DB server
   
Connection con = DriverManager.getConnection(url of your database
  server,  username- optional, password - optional);
   
  After that you can communicate with the server by just sending SQL
  statements.
   
   
   
15/01/2002 04:26:17, Wilson E. Lozano R. [EMAIL PROTECTED]
wrote:
   
Hi panos,
thanks for your help.

Hi everybody, i'm running tomcat4.0 with jdk1.3.1_02 in win 98.
Bun now i need know how can i do to make a connection win a data
base
  in
Microsoft acces 97 trought any web page into my web site soported
with
tomcat 4.0.

thanks in advanced.
---
Wilson Ernesto Lozano RolOn
Ingeniero de Sistemas
Universidad Industrial de Santander
---

On Mon, 14 Jan 2002, panos periorellis wrote:

 If you're doing this from DOS it should work

 Note that one of the directories inside the set
 catalina_home=c:\tcat\jakarta-tomcat-4.0\ should be bin lib
etc

 in other words our directory should point to those
 so if there is another directory inside jakarta-tomcat-4.0 before
the
  bin
 and lib directories then set the path to that 

 the other thing i thought of is that the jakarta-tomcat-4.0
directory
  name
 is a bit long...I remember i had to shorten mine  I have
renamed
  it as
 jak..

 take care
 panos

 - Original Message -
 From: Wilson E. Lozano R. [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, January 14, 2002 09:38
 Subject: Re: TOMCAT4.0 + win98 help!!!


  Hi Panos,
  Thanks but i was do it, however i don't use jrun
  in this version of tomcat the variable isn't tomcat_home, is
  catalina_home, and i does set
  catalina_home=c:\tcat\jakarta-tomcat-4.0\
  and i use jsdk and java_home=c:\jsdk1.3.1_02\ and my problem
don't
  stop.
  ??
  Thanks in advanced.
  ---
  Wilson Ernesto Lozano RolOn
  Ingeniero de Sistemas
  Universidad Industrial de Santander
  ---
 
  On Mon, 14 Jan 2002, panos periorellis wrote:
 
   you have to set the variables from DOS.
  
   i.e.
  
   set TOMCAT_HOME=c:\tomcat\jak\jak (this is on my machine
  ...replace with
 the
   direcotyr on yours.
  
   set JAVA_HOME=c:\jbuilder\jdk1.3 (if you rin jbuilder that
is)
  
  

 
===
   To unsubscribe: mailto [EMAIL PROTECTED] with body:
signoff
 JSP-INTEREST.
   For digest: mailto [EMAIL PROTECTED] with body: set
  JSP-INTEREST
 DIGEST.
   Some relevant FAQs on JSP/Servlets can be found at:
  
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com
  
 
 

 
===
  To unsubscribe: mailto [EMAIL PROTECTED] with body:
signoff
 JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set
  JSP-INTEREST
 DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
 
   http://archives.java.sun.com/jsp-interest.html
   

Re: JSP and MS Acces97

2002-01-15 Thread Panagiotis Konstantinidis

  It depends on what kind of drivers you want to use. You can use one of the four 
types available, but the easiest for you (for the beginning) would be to use type 1 
drives (jdbc:odbc bridge). After you make it work and run I would recommend
to migrate to either type 3 or four drivers, according to how large and scalable your 
application should be... I have to add here that you might have to pay some money in 
order to obtain any other drivers apart from the odbc:jdbc ones...

  In order to use the jdbc:odbc drivers you have to do: 
Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); This will load the drivers. In orde to 
conenct to the database you can use: Connection con = 
DriverManager.getConnection(jdbc:odbc:
database source name, username, password);

  The database source name is the name of your ODBC data source. You have to 
define one by doing (on Windows 2000) Start...Settings... Control 
Panel...Administrative Tools...Data Sources(ODBC)Add...  and so on...

  By using type 4 drivers you conenct straight to a specific database. I would 
recommend this approach as it is faster (with ODBC you have to translate each call to 
ODBC specific commands) and easier (with ODBC you have to configure the
ODBC bridge for every machine you want to use). The only drawback istaht you have to 
find some kind of drivers. I am using the TDS drivers by I-net software 
(unfortunatelly there do not come for free) and all I am doing to conenct is a
Class.forName(com.inet.tds.TdsDriver); to just load the drivers. Then Connection 
connection = DriverManager.getConnection(jdbc:inetdae:my server, e.g. 
localhost:1433?database=my database name, i.e. Access name,
username, password);

  Hope this helps...


15/01/2002 04:59:57, Wilson E. Lozano R. [EMAIL PROTECTED] wrote:

Hi Panagiostis, thanks for your help,
Well but where can i find o how can i load the drivers?
i don't understod when you write class.forName(the whole path of the
drivers here); an the data base is host in the same PC, remembre ithe
plataform is win98.
Can you send me an example please?

---
Wilson Ernesto Lozano RolOn
Ingeniero de Sistemas
---

On Tue, 15 Jan 2002, Panagiotis Konstantinidis wrote:

   First of all you need to load the drivers. To do that you need:

 Class.forName(the whole path of the drivers here);

   After that the only thing you have to do is to open a connection with the 
speciffic DB server

 Connection con = DriverManager.getConnection(url of your database server,  
username- optional, password - optional);

   After that you can communicate with the server by just sending SQL statements.



 15/01/2002 04:26:17, Wilson E. Lozano R. [EMAIL PROTECTED] wrote:

 Hi panos,
 thanks for your help.
 
 Hi everybody, i'm running tomcat4.0 with jdk1.3.1_02 in win 98.
 Bun now i need know how can i do to make a connection win a data base in
 Microsoft acces 97 trought any web page into my web site soported with
 tomcat 4.0.
 
 thanks in advanced.
 ---
 Wilson Ernesto Lozano RolOn
 Ingeniero de Sistemas
 Universidad Industrial de Santander
 ---
 
 On Mon, 14 Jan 2002, panos periorellis wrote:
 
  If you're doing this from DOS it should work
 
  Note that one of the directories inside the set
  catalina_home=c:\tcat\jakarta-tomcat-4.0\ should be bin lib etc
 
  in other words our directory should point to those
  so if there is another directory inside jakarta-tomcat-4.0 before the bin
  and lib directories then set the path to that 
 
  the other thing i thought of is that the jakarta-tomcat-4.0 directory name
  is a bit long...I remember i had to shorten mine  I have renamed it as
  jak..
 
  take care
  panos
 
  - Original Message -
  From: Wilson E. Lozano R. [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, January 14, 2002 09:38
  Subject: Re: TOMCAT4.0 + win98 help!!!
 
 
   Hi Panos,
   Thanks but i was do it, however i don't use jrun
   in this version of tomcat the variable isn't tomcat_home, is
   catalina_home, and i does set catalina_home=c:\tcat\jakarta-tomcat-4.0\
   and i use jsdk and java_home=c:\jsdk1.3.1_02\ and my problem don't stop.
   ??
   Thanks in advanced.
   ---
   Wilson Ernesto Lozano RolOn
   Ingeniero de Sistemas
   Universidad Industrial de Santander
   ---
  
   On Mon, 14 Jan 2002, panos periorellis wrote:
  
you have to set the variables from DOS.
   
i.e.
   
set TOMCAT_HOME=c:\tomcat\jak\jak (this is on my machine ...replace with
  the
direcotyr on yours.
   
set JAVA_HOME=c:\jbuilder\jdk1.3 (if you rin jbuilder that is)
   
   
  ===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
  JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
  DIGEST.
   

Utilizing EVAL_BODY_AGAIN in A Tag class from Forte for JAVA 3.0 Community Ed.

2002-01-15 Thread Paul Idusogie

Please could some on offer assistance to 
executing the following code within the environment

import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

public class myTagClass extends TagSupport {

String name = ;

public void setName() {
 
}

public String getName() {
 return name;
}

public int doStartTag throws JspException {


return EVAL_BODY_INCLUDE;
}

public int doAfterBody throws JspException {

try {
JspWriter out = pageContext.getOut();
out.print();
} catch(Exception ioex) {
throw new JspExcetion(ioex.getMessage());
}

rtnValue = SKIP_BODY;

if (!isComplete) {
rtnValue = EVAL_BODY_AGAIN;
}

return rtnValue;
}
}


When I attempt to compile the code in forte4j 3.0 I receive a
compilation error
stating that it can not resolve EVAL_BODY_AGAIN.

Incidentally, this option does not appear when you attampt a code look
up using CNTRL + SPACEBAR
Do I need to attach tomcat 4.0? to the IDE Howo do I acheive this.?

Any clues?



Thanks,

Paul Idusogie 
Technical Architect 
Consulting Services
Stellent Inc.
 Golden Triangle Drive
Eden Prairie, MN 55104
Desk: 952.656.2755
Fax: 952.903.2115
Email: [EMAIL PROTECTED]
website: http://www.stellent.com

==To 
unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Utilizing EVAL_BODY_AGAIN in A Tag class from Forte for JAVA 3.0 Community Ed.

2002-01-15 Thread Hans Bergsten

Paul Idusogie wrote:

 Please could some on offer assistance to
 executing the following code within the environment
 [...]
 if (!isComplete) {
 rtnValue = EVAL_BODY_AGAIN;
 }

  [...]


 When I attempt to compile the code in forte4j 3.0 I receive a
 compilation error
 stating that it can not resolve EVAL_BODY_AGAIN.

 Incidentally, this option does not appear when you attampt a code look
 up using CNTRL + SPACEBAR
 Do I need to attach tomcat 4.0? to the IDE Howo do I acheive this.?

 Any clues?


The EVAL_BODY_AGAIN constant was added in JSP 1.2. You can either
upgrade your environment to JSP 1.2 (e.g. using Tomcat 4) or use
stick to JSP 1.1 and use the corresponding constant available in
JSP 1.1: EVAL_BODY_TAG.

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Importing my Own class

2002-01-15 Thread Gardner Monte

I rent space on a commercial Tomcat JSP-Enabled server.
I have a JSP page in the directory
/usr50/home/mgardne/public_html/jsp/pictures.jsp

I have a Class file in the directory

/usr50/home/mgardne/public_html/servlets/ScrapBook.class

The ScrapBook class is not part of any package.

I would like to import the ScrapBook class into my JSP code
so that I can instantiate objects of that type.  In the
Archives someone stated that you could import a class file
by using the actual path like this
%@ page import=/usr50/home/mgardne/public_html/servlets/ScrapBook %

but when I tried to run that code I got an error.

My web host provider generally doesn't let me change class path settings,
or put my own classes in the class path, so I was wondering if there
was a direct way of telling the JSP engine where my class file is located.

--Monte Glenn Gardner

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Downloading files with jsp/servlets...

2002-01-15 Thread Zvika Markfeld

but why does the synchronousity prevent simultaneous download? The output
stream gets declared and obtained inside service() method, doesn't it? and
if so, as any other local variable/object, it gets duplicated for each and
every one of the threads that invokes that servlet instance, so there isn't
a common monitor that locks other requests/ Am I missing something here?
Could you please explain that matter?
zm.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Brian Bohnet
Sent: Tuesday, January 15, 2002 12:40 AM
To: [EMAIL PROTECTED]
Subject: Re: Downloading files with jsp/servlets...


Joe Cheng wrote:

 Can you post the servlet code?  What servlet container are you using
 (WebLogic, Tomcat...?)

 The servlet should absolutely be able to handle two simultaneous requests,
 unless your service method is synchronized.


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

Well we have figured out a solution. Since the BufferedOutputStream is
synchronized, only one request had access to the file object at one time
so, we wrote a new class that is very similar to BufferedOutputStream.
This new class relies on the operating system to delegate bandwidth and
thread the simultaneous processes for the same file, allowing
asynchronous downloads from the same servlet.
The servlet passes the responsibility on to the new class to handle the
reading/writing of the file contents. Also, during testing we had 5
requests for the same file occur, and all five began and ended
downloading a 56M file within seconds of each other and all with equally
balanced bandwidth on Dell servers running linux7.1 using Apache/Tomcat
configuration.

Thanks for your response.
Brian

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Importing my Own class

2002-01-15 Thread Andrew E. Young

I love you.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Importing my Own class

2002-01-15 Thread Zvika Markfeld

1. place the class file insode your WEB-INF/clasess directory, not
public_html
2. import statements refer to a fully qualified class name, not a file name
with path and everything.
3. there should be a compliance between a package name and directory
structure.
For example, if your class is a part of a package called mypackage, then it
should reside inside directory WEB-INF/clases/mypackage, and you should use
import=mypackage.ScrapBook.
Besides, Weblogic 5.1 does not allow using JavaBeans from within a JSP that
belong to the default package. This might be a bug or a spec dictation
(stranger things have been recorded), so you may consider using a package
for your class.
zm.


-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Gardner Monte
Sent: Tuesday, January 15, 2002 9:59 PM
To: [EMAIL PROTECTED]
Subject: Importing my Own class


I rent space on a commercial Tomcat JSP-Enabled server.
I have a JSP page in the directory
/usr50/home/mgardne/public_html/jsp/pictures.jsp

I have a Class file in the directory

/usr50/home/mgardne/public_html/servlets/ScrapBook.class

The ScrapBook class is not part of any package.

I would like to import the ScrapBook class into my JSP code
so that I can instantiate objects of that type.  In the
Archives someone stated that you could import a class file
by using the actual path like this
%@ page import=/usr50/home/mgardne/public_html/servlets/ScrapBook %

but when I tried to run that code I got an error.

My web host provider generally doesn't let me change class path settings,
or put my own classes in the class path, so I was wondering if there
was a direct way of telling the JSP engine where my class file is located.

--Monte Glenn Gardner

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Downloading files with jsp/servlets...

2002-01-15 Thread Joe Cheng

Zvika,

The default behavior for servlets is to have a *single* servlet instance
serve all incoming requests for that servlet, simultaneously.  In other
words, it's not that each incoming request instantiates your servlet; on the
contrary, the servlet only gets instantiated once in the lifetime of your
webserver (well, more or less).

That's why it's a bad idea to declare member data fields for servlets; you
may as well be declaring static fields, because that's effectively what
you're doing.  Same thing with declaring variables in %! % blocks in JSP.

The exception is if you implement SingleThreadModel, which guarantees that a
single instance of a servlet will not be serving two requests
simultaneously; the spec doesn't make it clear whether that happens via
synchronization, or whether multiple instance get created.

http://java.sun.com/docs/books/tutorial/servlets/client-interaction/threads.
html

Hope that helps clear it up a little.

-jmc

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Downloading files with jsp/servlets...

2002-01-15 Thread Brian Bohnet

Well, Zvika,
according to my team, the file requested for download was being locked
by using BufferedOutputStream(being synchronized by default), so any
other requests for that file were not allowed until the previous request
was finished reading/writing to buffer.
Hope that helps,
Brian
Zvika Markfeld wrote:

 but why does the synchronousity prevent simultaneous download? The output
 stream gets declared and obtained inside service() method, doesn't it? and
 if so, as any other local variable/object, it gets duplicated for each and
 every one of the threads that invokes that servlet instance, so there isn't
 a common monitor that locks other requests/ Am I missing something here?
 Could you please explain that matter?
 zm.

 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Brian Bohnet
 Sent: Tuesday, January 15, 2002 12:40 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Downloading files with jsp/servlets...

 Joe Cheng wrote:
 
  Can you post the servlet code?  What servlet container are you using
  (WebLogic, Tomcat...?)
 
  The servlet should absolutely be able to handle two simultaneous requests,
  unless your service method is synchronized.
 
 
 ===
  To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
 
   http://archives.java.sun.com/jsp-interest.html
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.jsp
   http://www.jguru.com/faq/index.jsp
   http://www.jspinsider.com

 Well we have figured out a solution. Since the BufferedOutputStream is
 synchronized, only one request had access to the file object at one time
 so, we wrote a new class that is very similar to BufferedOutputStream.
 This new class relies on the operating system to delegate bandwidth and
 thread the simultaneous processes for the same file, allowing
 asynchronous downloads from the same servlet.
 The servlet passes the responsibility on to the new class to handle the
 reading/writing of the file contents. Also, during testing we had 5
 requests for the same file occur, and all five began and ended
 downloading a 56M file within seconds of each other and all with equally
 balanced bandwidth on Dell servers running linux7.1 using Apache/Tomcat
 configuration.

 Thanks for your response.
 Brian

 ===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

 ===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Downloading files with jsp/servlets...

2002-01-15 Thread Haseltine, Celeste

Joe,

Isn't the default behavior for servlets determined by the webserver you are
using?  Some servers do have a single servlet instance per all users, but I
know the previous version of JRUN server (3.01) instantiated a new copy of
the servlet for every new/unique session id.  I don't know about the new
version of JRUN server (3.1). I did look at the Sun page you reference
below, but it did not reference the page where the Sun standard for servlet
behavior is spelled out.

Celete

-Original Message-
From: Joe Cheng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: Re: Downloading files with jsp/servlets...


Zvika,

The default behavior for servlets is to have a *single* servlet instance
serve all incoming requests for that servlet, simultaneously.  In other
words, it's not that each incoming request instantiates your servlet; on the
contrary, the servlet only gets instantiated once in the lifetime of your
webserver (well, more or less).

That's why it's a bad idea to declare member data fields for servlets; you
may as well be declaring static fields, because that's effectively what
you're doing.  Same thing with declaring variables in %! % blocks in JSP.

The exception is if you implement SingleThreadModel, which guarantees that a
single instance of a servlet will not be serving two requests
simultaneously; the spec doesn't make it clear whether that happens via
synchronization, or whether multiple instance get created.

http://java.sun.com/docs/books/tutorial/servlets/client-interaction/threads.
html

Hope that helps clear it up a little.

-jmc

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



execute java code with out command view and another thing!!!

2002-01-15 Thread Christian Hamann L

Hi All
Well ... i have two big problems...
First, i need execute some java code.. which will be used like a
screensaver, but i would like that commander view doesnt appear, because it
looks very bad... how can i do that?
Second, this screensaver appears by times, so when the screensaver appears,
this wont dissapear until the estimated time finished. how can i do for
banned that user cant close the window or the screensaver.. it screensaver
can be developed by applet or application.
thanks for all
atte
Christian

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Downloading files with jsp/servlets...

2002-01-15 Thread Zvika Markfeld

to Brian:
okay, I think I see what you mean: The BufferedOutputStream is able to read
a file only when the file is not being read by any other
BufferedOutputStream object at the same time. Generally speaking, when
saying an object is synchronized, it usually means that when two threads are
trying to invoke this object's methods simultaneously, one thread has to
wait untill the other is done - which is not the case here, as two different
BufferedOutputStream objects or more are used simultaneously. It is the file
itself which is synchronized. get my drift?

to Joe:
I'm afraid we're having somewhat of deaf people's conversation here. Read
Brian's original post and his response and see what I mean. Thanks for the
through explanation anyway...
zm.


-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Brian Bohnet
Sent: Tuesday, January 15, 2002 11:38 PM
To: [EMAIL PROTECTED]
Subject: Re: Downloading files with jsp/servlets...


Well, Zvika,
according to my team, the file requested for download was being locked
by using BufferedOutputStream(being synchronized by default), so any
other requests for that file were not allowed until the previous request
was finished reading/writing to buffer.
Hope that helps,
Brian
Zvika Markfeld wrote:

 but why does the synchronousity prevent simultaneous download? The output
 stream gets declared and obtained inside service() method, doesn't it? and
 if so, as any other local variable/object, it gets duplicated for each and
 every one of the threads that invokes that servlet instance, so there
isn't
 a common monitor that locks other requests/ Am I missing something here?
 Could you please explain that matter?
 zm.

 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Brian Bohnet
 Sent: Tuesday, January 15, 2002 12:40 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Downloading files with jsp/servlets...

 Joe Cheng wrote:
 
  Can you post the servlet code?  What servlet container are you using
  (WebLogic, Tomcat...?)
 
  The servlet should absolutely be able to handle two simultaneous
requests,
  unless your service method is synchronized.
 
 

===
  To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
 
   http://archives.java.sun.com/jsp-interest.html
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.jsp
   http://www.jguru.com/faq/index.jsp
   http://www.jspinsider.com

 Well we have figured out a solution. Since the BufferedOutputStream is
 synchronized, only one request had access to the file object at one time
 so, we wrote a new class that is very similar to BufferedOutputStream.
 This new class relies on the operating system to delegate bandwidth and
 thread the simultaneous processes for the same file, allowing
 asynchronous downloads from the same servlet.
 The servlet passes the responsibility on to the new class to handle the
 reading/writing of the file contents. Also, during testing we had 5
 requests for the same file occur, and all five began and ended
 downloading a 56M file within seconds of each other and all with equally
 balanced bandwidth on Dell servers running linux7.1 using Apache/Tomcat
 configuration.

 Thanks for your response.
 Brian


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 

Re: Downloading files with jsp/servlets...

2002-01-15 Thread Zvika Markfeld

That would be a no: The servlet spec. specifically dictates that a servlet
container instantiates _only_ one instance of a given servlet, unless the
servlet implements the SingleThreadModel interface, as Joe suggested. In
that case, the servlet container can either queue incoming requests or
create multiple servlet instances. This decision is left to the servlet
container's manufacturer. Some Web servers have problems keeping the spec.
Orion, for example, had (may still have) this bug where multiple instances
of a servlet were created when the servlet's first invocation was made by a
numerous clients, as in when bombing the servlet with some stress test tool
(which is what we did). I don't know of anything about JRUN.
zm.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Haseltine, Celeste
Sent: Wednesday, January 16, 2002 12:03 AM
To: [EMAIL PROTECTED]
Subject: Re: Downloading files with jsp/servlets...


Joe,

Isn't the default behavior for servlets determined by the webserver you are
using?  Some servers do have a single servlet instance per all users, but I
know the previous version of JRUN server (3.01) instantiated a new copy of
the servlet for every new/unique session id.  I don't know about the new
version of JRUN server (3.1). I did look at the Sun page you reference
below, but it did not reference the page where the Sun standard for servlet
behavior is spelled out.

Celete

-Original Message-
From: Joe Cheng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: Re: Downloading files with jsp/servlets...


Zvika,

The default behavior for servlets is to have a *single* servlet instance
serve all incoming requests for that servlet, simultaneously.  In other
words, it's not that each incoming request instantiates your servlet; on the
contrary, the servlet only gets instantiated once in the lifetime of your
webserver (well, more or less).

That's why it's a bad idea to declare member data fields for servlets; you
may as well be declaring static fields, because that's effectively what
you're doing.  Same thing with declaring variables in %! % blocks in JSP.

The exception is if you implement SingleThreadModel, which guarantees that a
single instance of a servlet will not be serving two requests
simultaneously; the spec doesn't make it clear whether that happens via
synchronization, or whether multiple instance get created.

http://java.sun.com/docs/books/tutorial/servlets/client-interaction/threads.
html

Hope that helps clear it up a little.

-jmc

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Downloading files with jsp/servlets...

2002-01-15 Thread Haseltine, Celeste

Zvika,

OK, so the spec does dictate how many instances of a given servlet is
instantiated.  This may be why JRUN 3.1 is now Sun certified as a
compliant JSP/EJB container, where as the previous version (3.01) was not.


Thanks for the clarification.

Celeste
-Original Message-
From: Zvika Markfeld [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 4:10 PM
To: [EMAIL PROTECTED]
Subject: Re: Downloading files with jsp/servlets...


That would be a no: The servlet spec. specifically dictates that a servlet
container instantiates _only_ one instance of a given servlet, unless the
servlet implements the SingleThreadModel interface, as Joe suggested. In
that case, the servlet container can either queue incoming requests or
create multiple servlet instances. This decision is left to the servlet
container's manufacturer. Some Web servers have problems keeping the spec.
Orion, for example, had (may still have) this bug where multiple instances
of a servlet were created when the servlet's first invocation was made by a
numerous clients, as in when bombing the servlet with some stress test tool
(which is what we did). I don't know of anything about JRUN.
zm.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Haseltine, Celeste
Sent: Wednesday, January 16, 2002 12:03 AM
To: [EMAIL PROTECTED]
Subject: Re: Downloading files with jsp/servlets...


Joe,

Isn't the default behavior for servlets determined by the webserver you are
using?  Some servers do have a single servlet instance per all users, but I
know the previous version of JRUN server (3.01) instantiated a new copy of
the servlet for every new/unique session id.  I don't know about the new
version of JRUN server (3.1). I did look at the Sun page you reference
below, but it did not reference the page where the Sun standard for servlet
behavior is spelled out.

Celete

-Original Message-
From: Joe Cheng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: Re: Downloading files with jsp/servlets...


Zvika,

The default behavior for servlets is to have a *single* servlet instance
serve all incoming requests for that servlet, simultaneously.  In other
words, it's not that each incoming request instantiates your servlet; on the
contrary, the servlet only gets instantiated once in the lifetime of your
webserver (well, more or less).

That's why it's a bad idea to declare member data fields for servlets; you
may as well be declaring static fields, because that's effectively what
you're doing.  Same thing with declaring variables in %! % blocks in JSP.

The exception is if you implement SingleThreadModel, which guarantees that a
single instance of a servlet will not be serving two requests
simultaneously; the spec doesn't make it clear whether that happens via
synchronization, or whether multiple instance get created.

http://java.sun.com/docs/books/tutorial/servlets/client-interaction/threads.
html

Hope that helps clear it up a little.

-jmc

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



MSACCESS JSP SOLUTION

2002-01-15 Thread panos periorellis

OK fellas for once and for all

if you have a an access database and you want to connect it with JAVA or JSP
you do the following

go to control panel and open ODBC data sourceclick on tab user DSN
click on MS access and click on Add
Select MS access again Click Finish...i will aks for a datasource name
Give it a name...such as 'phonedirectory' and then Click on Select button
and select your msaccess database in your directory example phonebook.mdb

NOW you have a data source connected to your access database ...

NOw in your JSP or JAVA program write the follogin code..

try {
  Class.forName( sun.jdbc.odbc.JdbcOdbcDriver );
  Connection con =
DriverManager.getConnection(jdbc:odbc:phonedirectory);

  String sql = SELECT * FROM phonenumbers;; // this is an example of a
table inside the phonebook ms access database
  System.out.println( set the SQL);

  Statement stmt= con.createStatement();
  System.out.println( SET THE STATEMENT );

  ResultSet rs=stmt.executeQuery(sql);

  System.out.println( Executing SELECT query );
  while (rs.next()) {

  String s = rs.getString(name);

  String n = rs.getString(number);

}
con.close( );

  } catch( Exception e ) {
System.out.println(e);
System.exit( -1 );
}


HOPE this helps
panos

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: MSACCESS JSP SOLUTION

2002-01-15 Thread Wilson E. Lozano R.

ok Panos.. thanks, but, then i don't need to download any jdbc:odbc drver?
??
Thanks in advanced.
---
Wilson Ernesto Lozano RolOn
Ingeniero de Sistemas
---

On Tue, 15 Jan 2002, panos periorellis wrote:

 OK fellas for once and for all

 if you have a an access database and you want to connect it with JAVA or JSP
 you do the following

 go to control panel and open ODBC data sourceclick on tab user DSN
 click on MS access and click on Add
 Select MS access again Click Finish...i will aks for a datasource name
 Give it a name...such as 'phonedirectory' and then Click on Select button
 and select your msaccess database in your directory example phonebook.mdb

 NOW you have a data source connected to your access database ...

 NOw in your JSP or JAVA program write the follogin code..

 try {
   Class.forName( sun.jdbc.odbc.JdbcOdbcDriver );
   Connection con =
 DriverManager.getConnection(jdbc:odbc:phonedirectory);

   String sql = SELECT * FROM phonenumbers;; // this is an example of a
 table inside the phonebook ms access database
   System.out.println( set the SQL);

   Statement stmt= con.createStatement();
   System.out.println( SET THE STATEMENT );

   ResultSet rs=stmt.executeQuery(sql);

   System.out.println( Executing SELECT query );
   while (rs.next()) {

   String s = rs.getString(name);

   String n = rs.getString(number);

 }
 con.close( );

   } catch( Exception e ) {
 System.out.println(e);
 System.exit( -1 );
 }


 HOPE this helps
 panos

 ===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Downloading files with jsp/servlets...

2002-01-15 Thread Joe Cheng

 I'm afraid we're having somewhat of deaf people's conversation here. Read
Brian's original post and his response and see what I mean. 

Zvika, I thought you were replying to my message, not Brian's response... my
apologies.

FWIW, I haven't looked into it but it sounds like JDK 1.4's java.nio.*
package (offering non-blocking I/O operations) might resolve this issue.

-jmc

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: MSACCESS JSP SOLUTION

2002-01-15 Thread panos periorellis

no the driver comes with the JDK...

you dont need to download anything...do as i said and it will work..i
promise you

panos
- Original Message -
From: Wilson E. Lozano R. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 12:41
Subject: Re: MSACCESS JSP SOLUTION


 ok Panos.. thanks, but, then i don't need to download any jdbc:odbc drver?
 ??
 Thanks in advanced.
 ---
 Wilson Ernesto Lozano RolOn
 Ingeniero de Sistemas
 ---

 On Tue, 15 Jan 2002, panos periorellis wrote:

  OK fellas for once and for all
 
  if you have a an access database and you want to connect it with JAVA or
JSP
  you do the following
 
  go to control panel and open ODBC data sourceclick on tab user DSN
  click on MS access and click on Add
  Select MS access again Click Finish...i will aks for a datasource name
  Give it a name...such as 'phonedirectory' and then Click on Select
button
  and select your msaccess database in your directory example
phonebook.mdb
 
  NOW you have a data source connected to your access database ...
 
  NOw in your JSP or JAVA program write the follogin code..
 
  try {
Class.forName( sun.jdbc.odbc.JdbcOdbcDriver );
Connection con =
  DriverManager.getConnection(jdbc:odbc:phonedirectory);
 
String sql = SELECT * FROM phonenumbers;; // this is an example
of a
  table inside the phonebook ms access database
System.out.println( set the SQL);
 
Statement stmt= con.createStatement();
System.out.println( SET THE STATEMENT );
 
ResultSet rs=stmt.executeQuery(sql);
 
System.out.println( Executing SELECT query );
while (rs.next()) {
 
String s = rs.getString(name);
 
String n = rs.getString(number);
 
  }
  con.close( );
 
} catch( Exception e ) {
  System.out.println(e);
  System.exit( -1 );
  }
 
 
  HOPE this helps
  panos
 
 
===
  To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
 
   http://archives.java.sun.com/jsp-interest.html
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.jsp
   http://www.jguru.com/faq/index.jsp
   http://www.jspinsider.com
 


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Using JNDI in a JSP/Servlet

2002-01-15 Thread Haseltine, Celeste

I'm attempting to use JNDI with a third party JDBC driver inside of a
servlet.  When I attempt to call the servlet, my catch block catches the
following error message:

Error .   Cannot instantiate class:
com.sun.jndi.fscontext.RefFSContextFactory

I moved the code into a pure Java class for debugging.  The line that the
error message occurs on is as follows:

   ctx = new InitialContext(env);

Does anyone have a guess as to why I am unable to instantiate a new Context
class?  I suspect it may have to do with setting permissions for jndi, but I
am not certain.  I do have the JNDI.jar file in my server jvm jre\lib\ext
subdirectory, and I moved it into my jdk jre\lib\ext subdirectory for
debugging the class code.  Just for grins I included the jdk jre\lib\ext
path in  my dev box classpath for testing the class code.  The class code is
as follows:

import java.sql.*;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import  net.avenir.jdbcPool.*;
import java.util.Hashtable;

public class DataSourceTest{

public static void main(String[] argv){
System.out.println(got to beginning);
Context ctx =null;
System.out.println(got to 1);
try{
JDBCConnectionPoolDataSource cpds1 = new
JDBCConnectionPoolDataSource();
System.out.println(got to 2);
//cpds1.setServerName();
cpds1.setDatabaseName(Northwind);
cpds1.setPort(1433);
Hashtable  env = new Hashtable(11);
System.out.println(got to 3);
env.put
(Context.INITIAL_CONTEXT_FACTORY,com.sun.jndi.fscontext.RefFSContextFactory
);
   System.out.println(got to 4);
   env.put(Context.PROVIDER_URL,file:/);
   System.out.println(got to 5);
   ctx = new InitialContext(env); //THIS IS THE LINE THE
ERROR OCCURS ON
   System.out.println(got to 6);
   ctx.rebind(jdbc:pool:poolDS,cpds1);
   System.out.println(got to 7);
   JDBCDataSource ds1=new JDBCDataSource();
   ds1.setDataSourceName(jdbc:pool:poolDS);
   env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,com.sun.jndi.fscontext.RefFSContext
Factory);
   env.put(Context.PROVIDER_URL,file:/);
   ctx = new InitialContext(env);
   ctx.rebind(jdbc:datasource,ds1);
  } catch(Exception e) {
   System.out.println(Error .  +e.getMessage());
  }
}//end main
}//end class definition


Thanks in advance for any advice/suggestions.

Celeste

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Downloading files with jsp/servlets...

2002-01-15 Thread Christopher K. St. John

Brian Bohnet wrote:

 one of our developers decided to investigate the source
 of the BufferInputStream class instead. Finding everything to be
 synchronized gave him the idea to write his own class removing
 synchronization, and allowing the server to handle the bandwidth and
 threading, instead of relying on the single instance of the servlet.


 Wait a second, there's something wrong here. Serving static
files from a servlet is a very common thing to do. Generally
the code looks something like:

 public void doGet() {
   ...
   InputStream istr =
 new BufferedInputStream(new FileInputStream(some_file.txt));
   ... loop around writing istr to rsp output stream ...
 }

 Is that what you're talking about? If not, then never mind,
I've misunderstood your situation.

 If so, then synchronization on BufferedInputStream is not
your problem. It can't be, since each servlet thread gets its
own BufferedInputStream. Besides, the code works fine for
everybody else.

 Are you trying to share the BufferedInputStream? or the
FileInputStream? Do you have a synchronized block in some
of your servlet code? Have you accidently set your servlet
container to allow only a very few simultaneous threads?
Etc, etc.

--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Using JNDI in a JSP/Servlet

2002-01-15 Thread Zvika Markfeld

the exception means that the nitialContextFactory object specified in your
env cannot be located. This might be due to the fact that your jndi.jar
contains only the interfaces that are related to jndi (that is, package
javax.naming and related packages) but not the JNDI provider classes. you
need to add to your classpath these classes, that are usually bundled with
the Naming Manager you are trying to access.
zm.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Haseltine, Celeste
Sent: Wednesday, January 16, 2002 1:07 AM
To: [EMAIL PROTECTED]
Subject: Using JNDI in a JSP/Servlet


I'm attempting to use JNDI with a third party JDBC driver inside of a
servlet.  When I attempt to call the servlet, my catch block catches the
following error message:

Error .   Cannot instantiate class:
com.sun.jndi.fscontext.RefFSContextFactory

I moved the code into a pure Java class for debugging.  The line that the
error message occurs on is as follows:

   ctx = new InitialContext(env);

Does anyone have a guess as to why I am unable to instantiate a new Context
class?  I suspect it may have to do with setting permissions for jndi, but I
am not certain.  I do have the JNDI.jar file in my server jvm jre\lib\ext
subdirectory, and I moved it into my jdk jre\lib\ext subdirectory for
debugging the class code.  Just for grins I included the jdk jre\lib\ext
path in  my dev box classpath for testing the class code.  The class code is
as follows:

import java.sql.*;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import  net.avenir.jdbcPool.*;
import java.util.Hashtable;

public class DataSourceTest{

public static void main(String[] argv){
System.out.println(got to beginning);
Context ctx =null;
System.out.println(got to 1);
try{
JDBCConnectionPoolDataSource cpds1 = new
JDBCConnectionPoolDataSource();
System.out.println(got to 2);
//cpds1.setServerName();
cpds1.setDatabaseName(Northwind);
cpds1.setPort(1433);
Hashtable  env = new Hashtable(11);
System.out.println(got to 3);
env.put
(Context.INITIAL_CONTEXT_FACTORY,com.sun.jndi.fscontext.RefFSContextFactory
);
   System.out.println(got to 4);
   env.put(Context.PROVIDER_URL,file:/);
   System.out.println(got to 5);
   ctx = new InitialContext(env); //THIS IS THE LINE THE
ERROR OCCURS ON
   System.out.println(got to 6);
   ctx.rebind(jdbc:pool:poolDS,cpds1);
   System.out.println(got to 7);
   JDBCDataSource ds1=new JDBCDataSource();
   ds1.setDataSourceName(jdbc:pool:poolDS);
   env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,com.sun.jndi.fscontext.RefFSContext
Factory);
   env.put(Context.PROVIDER_URL,file:/);
   ctx = new InitialContext(env);
   ctx.rebind(jdbc:datasource,ds1);
  } catch(Exception e) {
   System.out.println(Error .  +e.getMessage());
  }
}//end main
}//end class definition


Thanks in advance for any advice/suggestions.

Celeste

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Downloading files with jsp/servlets...

2002-01-15 Thread Zvika Markfeld

that's exactly what I thought, but apparently Brian meant that two
BufferedInputStream objects cannot access the same file simultaneously.
Meaning, it is the file that is actually synched, not the Stream object...
zm.


-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Christopher K. St. John
Sent: Wednesday, January 16, 2002 2:26 AM
To: [EMAIL PROTECTED]
Subject: Re: Downloading files with jsp/servlets...


Brian Bohnet wrote:

 one of our developers decided to investigate the source
 of the BufferInputStream class instead. Finding everything to be
 synchronized gave him the idea to write his own class removing
 synchronization, and allowing the server to handle the bandwidth and
 threading, instead of relying on the single instance of the servlet.


 Wait a second, there's something wrong here. Serving static
files from a servlet is a very common thing to do. Generally
the code looks something like:

 public void doGet() {
   ...
   InputStream istr =
 new BufferedInputStream(new FileInputStream(some_file.txt));
   ... loop around writing istr to rsp output stream ...
 }

 Is that what you're talking about? If not, then never mind,
I've misunderstood your situation.

 If so, then synchronization on BufferedInputStream is not
your problem. It can't be, since each servlet thread gets its
own BufferedInputStream. Besides, the code works fine for
everybody else.

 Are you trying to share the BufferedInputStream? or the
FileInputStream? Do you have a synchronized block in some
of your servlet code? Have you accidently set your servlet
container to allow only a very few simultaneous threads?
Etc, etc.

--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Downloading files with jsp/servlets...

2002-01-15 Thread Christopher K. St. John

Zvika Markfeld wrote:

 apparently Brian meant that two
 BufferedInputStream objects cannot access the same file simultaneously.
 Meaning, it is the file that is actually synched, not the Stream object...


 I'd have to re-read the whole thread in detail to be
sure, but I don't think that makes sense. I mean, if
that were true, then there would be no way to fix it
by using a non-synchronized BufferedInputStream, right?

 And anyway, he said he was using Linux on a x86 box.
I use Linux as one of my dev platforms, and unless he's
using some really bizarre JVM, then I can guarantee you
it doesn't work that way.

 I suspect he was hitting random variations in how his
threads were getting scheduled, resulting in one thread
briefly getting most of the bandwidth. Or maybe they
were running one set of tests with native threads, and
another with green threads. There's not really enough
data to draw a conclusion.

 But it wasn't a problem with BufferedInputStream.


--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Importing my Own class

2002-01-15 Thread panos periorellis

I read your message about importing classes and copied all my classes in th
WEB-INF directory..

MY JSP compiles now and i can make instances of my classes...

However when i try to reference attributes in those classes it produces an
error

why do you think that may be? this is my code

html

head

titleResults/title
/head


body


%@ page import=travel_agent.*; % // this is a directory with classes
which exists in WEB-INF so I guess this line is fine

% Accomodation ac= new Accomodation; % // this is a class in the
travel_agent directory

%!  ac.HotelName=one;   % // this line produces an error it says that is
cannot be referenced.

input type=text name=T2 size=20 value=%= ac.HotelName % 

/body
/html

- Original Message -
From: Zvika Markfeld [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 20:16
Subject: Re: Importing my Own class


 1. place the class file insode your WEB-INF/clasess directory, not
 public_html
 2. import statements refer to a fully qualified class name, not a file
name
 with path and everything.
 3. there should be a compliance between a package name and directory
 structure.
 For example, if your class is a part of a package called mypackage, then
it
 should reside inside directory WEB-INF/clases/mypackage, and you should
use
 import=mypackage.ScrapBook.
 Besides, Weblogic 5.1 does not allow using JavaBeans from within a JSP
that
 belong to the default package. This might be a bug or a spec dictation
 (stranger things have been recorded), so you may consider using a package
 for your class.
 zm.


 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Gardner Monte
 Sent: Tuesday, January 15, 2002 9:59 PM
 To: [EMAIL PROTECTED]
 Subject: Importing my Own class


 I rent space on a commercial Tomcat JSP-Enabled server.
 I have a JSP page in the directory
 /usr50/home/mgardne/public_html/jsp/pictures.jsp

 I have a Class file in the directory

 /usr50/home/mgardne/public_html/servlets/ScrapBook.class

 The ScrapBook class is not part of any package.

 I would like to import the ScrapBook class into my JSP code
 so that I can instantiate objects of that type.  In the
 Archives someone stated that you could import a class file
 by using the actual path like this
 %@ page import=/usr50/home/mgardne/public_html/servlets/ScrapBook %

 but when I tried to run that code I got an error.

 My web host provider generally doesn't let me change class path settings,
 or put my own classes in the class path, so I was wondering if there
 was a direct way of telling the JSP engine where my class file is located.

 --Monte Glenn Gardner


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Importing my Own class

2002-01-15 Thread Zvika Markfeld

It seems like you are declaring your Accomodation object in a scriptlet (%
... %) and trying to assign values to it in a declaration(%! ... %) .
Which means you should probably change the declaration to a scriptlet as
well.
Keep in mind that scriptlets are inserted into the service() method and
declarations are inserted into the generated servlet's class but outside the
service method.
zm.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of panos periorellis
Sent: Wednesday, January 16, 2002 2:00 AM
To: [EMAIL PROTECTED]
Subject: Re: Importing my Own class


I read your message about importing classes and copied all my classes in th
WEB-INF directory..

MY JSP compiles now and i can make instances of my classes...

However when i try to reference attributes in those classes it produces an
error

why do you think that may be? this is my code

html

head

titleResults/title
/head


body


%@ page import=travel_agent.*; % // this is a directory with classes
which exists in WEB-INF so I guess this line is fine

% Accomodation ac= new Accomodation; % // this is a class in the
travel_agent directory

%!  ac.HotelName=one;   % // this line produces an error it says that is
cannot be referenced.

input type=text name=T2 size=20 value=%= ac.HotelName % 

/body
/html

- Original Message -
From: Zvika Markfeld [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 20:16
Subject: Re: Importing my Own class


 1. place the class file insode your WEB-INF/clasess directory, not
 public_html
 2. import statements refer to a fully qualified class name, not a file
name
 with path and everything.
 3. there should be a compliance between a package name and directory
 structure.
 For example, if your class is a part of a package called mypackage, then
it
 should reside inside directory WEB-INF/clases/mypackage, and you should
use
 import=mypackage.ScrapBook.
 Besides, Weblogic 5.1 does not allow using JavaBeans from within a JSP
that
 belong to the default package. This might be a bug or a spec dictation
 (stranger things have been recorded), so you may consider using a package
 for your class.
 zm.


 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Gardner Monte
 Sent: Tuesday, January 15, 2002 9:59 PM
 To: [EMAIL PROTECTED]
 Subject: Importing my Own class


 I rent space on a commercial Tomcat JSP-Enabled server.
 I have a JSP page in the directory
 /usr50/home/mgardne/public_html/jsp/pictures.jsp

 I have a Class file in the directory

 /usr50/home/mgardne/public_html/servlets/ScrapBook.class

 The ScrapBook class is not part of any package.

 I would like to import the ScrapBook class into my JSP code
 so that I can instantiate objects of that type.  In the
 Archives someone stated that you could import a class file
 by using the actual path like this
 %@ page import=/usr50/home/mgardne/public_html/servlets/ScrapBook %

 but when I tried to run that code I got an error.

 My web host provider generally doesn't let me change class path settings,
 or put my own classes in the class path, so I was wondering if there
 was a direct way of telling the JSP engine where my class file is located.

 --Monte Glenn Gardner


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with 

Re: Using JNDI in a JSP/Servlet

2002-01-15 Thread Haseltine, Celeste

Zvika,

When you mention Java provider classes, are you referring to classes that
should be in my third party driver's jar file?  The only jndi jar file I
have in my classpath is the one included in the JDK from Sun.  The test
servlet I was using came out of the vendors examples files that they ship
with the driver.  They are pretty much incomplete, so if this is an error
being thrown from the vendors jar file, I'll post this with their tech
support group.  Or are you referring to something else?

Celeste

-Original Message-
From: Zvika Markfeld [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 5:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Using JNDI in a JSP/Servlet


the exception means that the nitialContextFactory object specified in your
env cannot be located. This might be due to the fact that your jndi.jar
contains only the interfaces that are related to jndi (that is, package
javax.naming and related packages) but not the JNDI provider classes. you
need to add to your classpath these classes, that are usually bundled with
the Naming Manager you are trying to access.
zm.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Haseltine, Celeste
Sent: Wednesday, January 16, 2002 1:07 AM
To: [EMAIL PROTECTED]
Subject: Using JNDI in a JSP/Servlet


I'm attempting to use JNDI with a third party JDBC driver inside of a
servlet.  When I attempt to call the servlet, my catch block catches the
following error message:

Error .   Cannot instantiate class:
com.sun.jndi.fscontext.RefFSContextFactory

I moved the code into a pure Java class for debugging.  The line that the
error message occurs on is as follows:

   ctx = new InitialContext(env);

Does anyone have a guess as to why I am unable to instantiate a new Context
class?  I suspect it may have to do with setting permissions for jndi, but I
am not certain.  I do have the JNDI.jar file in my server jvm jre\lib\ext
subdirectory, and I moved it into my jdk jre\lib\ext subdirectory for
debugging the class code.  Just for grins I included the jdk jre\lib\ext
path in  my dev box classpath for testing the class code.  The class code is
as follows:

import java.sql.*;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import  net.avenir.jdbcPool.*;
import java.util.Hashtable;

public class DataSourceTest{

public static void main(String[] argv){
System.out.println(got to beginning);
Context ctx =null;
System.out.println(got to 1);
try{
JDBCConnectionPoolDataSource cpds1 = new
JDBCConnectionPoolDataSource();
System.out.println(got to 2);
//cpds1.setServerName();
cpds1.setDatabaseName(Northwind);
cpds1.setPort(1433);
Hashtable  env = new Hashtable(11);
System.out.println(got to 3);
env.put
(Context.INITIAL_CONTEXT_FACTORY,com.sun.jndi.fscontext.RefFSContextFactory
);
   System.out.println(got to 4);
   env.put(Context.PROVIDER_URL,file:/);
   System.out.println(got to 5);
   ctx = new InitialContext(env); //THIS IS THE LINE THE
ERROR OCCURS ON
   System.out.println(got to 6);
   ctx.rebind(jdbc:pool:poolDS,cpds1);
   System.out.println(got to 7);
   JDBCDataSource ds1=new JDBCDataSource();
   ds1.setDataSourceName(jdbc:pool:poolDS);
   env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,com.sun.jndi.fscontext.RefFSContext
Factory);
   env.put(Context.PROVIDER_URL,file:/);
   ctx = new InitialContext(env);
   ctx.rebind(jdbc:datasource,ds1);
  } catch(Exception e) {
   System.out.println(Error .  +e.getMessage());
  }
}//end main
}//end class definition


Thanks in advance for any advice/suggestions.

Celeste

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 

Re: Downloading files with jsp/servlets...

2002-01-15 Thread Zvika Markfeld

gotcha. that does sound strange. I just wrote a little program to test that
and found out that's also true for Windowz. no probs reading same file
simultaneously using two BufferedInputStream objects. strange, huh?
zm.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Christopher K. St. John
Sent: Wednesday, January 16, 2002 2:50 AM
To: [EMAIL PROTECTED]
Subject: Re: Downloading files with jsp/servlets...


Zvika Markfeld wrote:

 apparently Brian meant that two
 BufferedInputStream objects cannot access the same file simultaneously.
 Meaning, it is the file that is actually synched, not the Stream object...


 I'd have to re-read the whole thread in detail to be
sure, but I don't think that makes sense. I mean, if
that were true, then there would be no way to fix it
by using a non-synchronized BufferedInputStream, right?

 And anyway, he said he was using Linux on a x86 box.
I use Linux as one of my dev platforms, and unless he's
using some really bizarre JVM, then I can guarantee you
it doesn't work that way.

 I suspect he was hitting random variations in how his
threads were getting scheduled, resulting in one thread
briefly getting most of the bandwidth. Or maybe they
were running one set of tests with native threads, and
another with green threads. There's not really enough
data to draw a conclusion.

 But it wasn't a problem with BufferedInputStream.


--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Importing my Own class

2002-01-15 Thread Chris Pratt

Unfortunately, your syntax is a bit off.  Try this:

html
  head
titleResults/title
%@ page import=travel_agent.* %
  /head
  body
% Accomodation ac= new Accomodation(); %
% ac.HotelName = one; %
input type=text name=T2 size=20 value=%= ac.HotelName %
  /body
/html

  (*Chris*)

- Original Message -
From: panos periorellis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 3:59 PM
Subject: Re: [JSP-INTEREST] Importing my Own class


 I read your message about importing classes and copied all my classes in
th
 WEB-INF directory..

 MY JSP compiles now and i can make instances of my classes...

 However when i try to reference attributes in those classes it produces an
 error

 why do you think that may be? this is my code

 html

 head

 titleResults/title
 /head


 body


 %@ page import=travel_agent.*; % // this is a directory with classes
 which exists in WEB-INF so I guess this line is fine

 % Accomodation ac= new Accomodation; % // this is a class in the
 travel_agent directory

 %!  ac.HotelName=one;   % // this line produces an error it says that
is
 cannot be referenced.

 input type=text name=T2 size=20 value=%= ac.HotelName % 

 /body
 /html

 - Original Message -
 From: Zvika Markfeld [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, January 15, 2002 20:16
 Subject: Re: Importing my Own class


  1. place the class file insode your WEB-INF/clasess directory, not
  public_html
  2. import statements refer to a fully qualified class name, not a file
 name
  with path and everything.
  3. there should be a compliance between a package name and directory
  structure.
  For example, if your class is a part of a package called mypackage, then
 it
  should reside inside directory WEB-INF/clases/mypackage, and you should
 use
  import=mypackage.ScrapBook.
  Besides, Weblogic 5.1 does not allow using JavaBeans from within a JSP
 that
  belong to the default package. This might be a bug or a spec dictation
  (stranger things have been recorded), so you may consider using a
package
  for your class.
  zm.
 
 
  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of Gardner Monte
  Sent: Tuesday, January 15, 2002 9:59 PM
  To: [EMAIL PROTECTED]
  Subject: Importing my Own class
 
 
  I rent space on a commercial Tomcat JSP-Enabled server.
  I have a JSP page in the directory
  /usr50/home/mgardne/public_html/jsp/pictures.jsp
 
  I have a Class file in the directory
 
  /usr50/home/mgardne/public_html/servlets/ScrapBook.class
 
  The ScrapBook class is not part of any package.
 
  I would like to import the ScrapBook class into my JSP code
  so that I can instantiate objects of that type.  In the
  Archives someone stated that you could import a class file
  by using the actual path like this
  %@ page import=/usr50/home/mgardne/public_html/servlets/ScrapBook %
 
  but when I tried to run that code I got an error.
 
  My web host provider generally doesn't let me change class path
settings,
  or put my own classes in the class path, so I was wondering if there
  was a direct way of telling the JSP engine where my class file is
located.
 
  --Monte Glenn Gardner
 
 

===
  To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
  JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
  DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
 
   http://archives.java.sun.com/jsp-interest.html
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.jsp
   http://www.jguru.com/faq/index.jsp
   http://www.jspinsider.com
 
 

===
  To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
 
   http://archives.java.sun.com/jsp-interest.html
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.jsp
   http://www.jguru.com/faq/index.jsp
   http://www.jspinsider.com
 


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


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


===
To unsubscribe: mailto [EMAIL 

Re: Importing classes

2002-01-15 Thread A B

It is not important to jar the package.
What is important is that the classes should be
located in WEB-INF\classes\PackageName folder.

Just put all your classes over there and things will
work.

--- Ramaswamy, Rathnapriya (CORP, GTS, L531741)
[EMAIL PROTECTED] wrote:
 Why don't you jar the package and add it to the
 classpath

 -Original Message-
 From: panos periorellis
 [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 14, 2002 9:29 PM
 To: [EMAIL PROTECTED]
 Subject: Importing classes


 I have developed some java classes which i want to
 import in my JSP code..

 can somebody tell me how do i do this.

 i have a list of classes in a package called travel

 but

 this %@ page import=travel.* % produces errors.
 In fact it says that the
 package cannot be found?
 Anyone with similar problems?
 thanks
 P


===
 To unsubscribe: mailto [EMAIL PROTECTED] with
 body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body:
 set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


 THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS
 INTENDED ONLY FOR THE
 ADDRESSEE and may contain confidential and
 privileged information.
 If the reader of this message is not the intended
 recipient,
 you are notified that any dissemination,
 distribution or copy of this
 communication is strictly Prohibited.
 If you have received this message by error, please
 notify us
 immediately, return the original mail to the sender
 and delete the
 message from your system.


===
 To unsubscribe: mailto [EMAIL PROTECTED] with
 body: signoff JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body:
 set JSP-INTEREST DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Problem with IBM Websphere Application Server 4

2002-01-15 Thread A B

There could be two reasons for this:

1. Access/Security permissions - Check if you are
member of the group having permission to run the
server etc.

2. Some other web server/application server may be
running and listening on the same port. So, the port
is not free for the server to listen to and thus start
properly.

le

--- Debopam Ghoshal [EMAIL PROTECTED] wrote:
 Dear All,
 I recently installed IBM Websphere Application
 Server 4 along with IBM HTTP
 Server. The HTTP server starts automatically when my
 machine starts(OS:
 Windows 2000 Server). But when I start my
 Application Server, sometime it
 starts and most of the times it does not start. The
 administrator's console
 page (http://localhost:9090/admin) does not show up
 most of the times. Can
 someone help me configure my Appserver as well as
 HTTP Server so that they
 run smoothly. Moreover I would like to know how to
 connect my appserver to
 Oracle 8i server running on my machine, since i do
 not have DB2 installed.

 thanx a lot in advance,
 regards,
 Debopam.


===
 To unsubscribe: mailto [EMAIL PROTECTED] with
 body: signoff JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body:
 set JSP-INTEREST DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com


__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Importing classes

2002-01-15 Thread Ramaswamy, Rathnapriya (CORP, GTS, L531741)

U can set the classpath in autoexec.batOn windows system, control panel
- system - environment tab

Look for CLASSPATH variable under user variables. If it is not there, enter
CLASSPATH in the variable text field and enter the path to the jar file of
ur package, eg: if it is in c:\myJars\myPackage.jar, enter this full path
including the jar file name in the value field and click on set button.
the value u have to enter in the value field is : %CLASSPATH%;
c:\myJars\myPackage.jar
i.e., the reference to previous classpaths (if any set), the path to ur jar
file.

Now u start ur tomcat server and run ur application.

I have never worked with tomcat, but went thru some docs, regarding setting
classpath. Also I am sending a URL for ur reference.

http://www.moreservlets.com/Using-Tomcat-4.html#Set-CLASSPATH

Hope this helps.
Priya.

-Original Message-
From: Ramaswamy, Rathnapriya (CORP, GTS, L531741)
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 1:28 PM
To: [EMAIL PROTECTED]
Subject: Re: Importing classes


Why don't you jar the package and add it to the classpath

-Original Message-
From: panos periorellis [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 9:29 PM
To: [EMAIL PROTECTED]
Subject: Importing classes


I have developed some java classes which i want to import in my JSP code..

can somebody tell me how do i do this.

i have a list of classes in a package called travel

but

this %@ page import=travel.* % produces errors. In fact it says that the
package cannot be found?
Anyone with similar problems?
thanks
P

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com


THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.
If you have received this message by error, please notify us
immediately, return the original mail to the sender and delete the
message from your system.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com


THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.
If you have received this message by error, please notify us
immediately, return the original mail to the sender and delete the
message from your system.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



How to use Different Fonts

2002-01-15 Thread Debopam Ghoshal

Dear All,
Can anyone suggest on how I can use different fonts(multilingual) in my
JSPs, especially when there is a chance that those fonts may not be present on
the client's machine.
Thanx in advance,
Debopam

--
Sent through GMX FreeMail - http://www.gmx.net

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Problem while writting the response to an Excel file.

2002-01-15 Thread rajac

Hi Dmitry Namiot,
Thanks a lot.
Now it is working fine, ie after using application/vnd.ms-excel.

Regards
Raja

- Original Message -
From: Dmitry Namiot [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 8:41 PM
Subject: Re: Problem while writting the response to an Excel file.


 See also Excel taglib from Coldtags suite:
 http://www.servletsuite.com/jsp.htm

 -Original Message-
   From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of rajac
   Sent: dinsdag 15 januari 2002 2:14
   To: [EMAIL PROTECTED]
   Subject: Problem while writting the response to an Excel file.


   Hi,
  I am writting the response of a servlet/jsp page to an Excel file. I
am
 setting the response.setContentType(text/xls); But the output is written
 to a text file in plain text format.

  How to write the response to an excel file.


 --
 Coldbeans Software - server-side Java (tm) components
 http://www.servletsuite.com



 __
 Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/

 Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Offbeat.........A Java question.

2002-01-15 Thread ShriKant Vashishtha

Hi,

Is there any API existing which can trap the standard errors and can
display on demand. I am using an IBM API which sends the errors to
stderr which I want to trap and show to the client on demand.

Many Thanks,
-ShriKant

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Using JNDI in a JSP/Servlet

2002-01-15 Thread Zvika Markfeld

Hi Celeste,
JNDI is a spec provided by Sun for Naming Managers. Various 3rd Party
Vendors offer their Naming manager implementations, some of which support
the JNDI spec. When including jndi.jar from your JDK files, you are
including the spec but not any concrete implementation. Since you _are_
trying to connect to a real naming manager, there should be a another
jar/library containing those real implementation classes.
The INITIAL_CONTEXT_FACTORY param that you are using, however, is the one
used for Sun's reference implementation of a naming manager utilizing a file
system (which is a valid naming server) - so you would probably want to dig
some more into your documentation and find a real example. btw are you using
a connection pool on iPlanet?
zvika.


When saying JNDI provider classes I am refering to those classes that were
supplied by the JNDI service implementor, such as
com.sun.jndi.fscontext.RefFSContextFactory. BTW how come you're using

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Haseltine, Celeste
Sent: Wednesday, January 16, 2002 2:16 AM
To: [EMAIL PROTECTED]
Subject: Re: Using JNDI in a JSP/Servlet


Zvika,

When you mention Java provider classes, are you referring to classes that
should be in my third party driver's jar file?  The only jndi jar file I
have in my classpath is the one included in the JDK from Sun.  The test
servlet I was using came out of the vendors examples files that they ship
with the driver.  They are pretty much incomplete, so if this is an error
being thrown from the vendors jar file, I'll post this with their tech
support group.  Or are you referring to something else?

Celeste

-Original Message-
From: Zvika Markfeld [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 15, 2002 5:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Using JNDI in a JSP/Servlet


the exception means that the nitialContextFactory object specified in your
env cannot be located. This might be due to the fact that your jndi.jar
contains only the interfaces that are related to jndi (that is, package
javax.naming and related packages) but not the JNDI provider classes. you
need to add to your classpath these classes, that are usually bundled with
the Naming Manager you are trying to access.
zm.

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Haseltine, Celeste
Sent: Wednesday, January 16, 2002 1:07 AM
To: [EMAIL PROTECTED]
Subject: Using JNDI in a JSP/Servlet


I'm attempting to use JNDI with a third party JDBC driver inside of a
servlet.  When I attempt to call the servlet, my catch block catches the
following error message:

Error .   Cannot instantiate class:
com.sun.jndi.fscontext.RefFSContextFactory

I moved the code into a pure Java class for debugging.  The line that the
error message occurs on is as follows:

   ctx = new InitialContext(env);

Does anyone have a guess as to why I am unable to instantiate a new Context
class?  I suspect it may have to do with setting permissions for jndi, but I
am not certain.  I do have the JNDI.jar file in my server jvm jre\lib\ext
subdirectory, and I moved it into my jdk jre\lib\ext subdirectory for
debugging the class code.  Just for grins I included the jdk jre\lib\ext
path in  my dev box classpath for testing the class code.  The class code is
as follows:

import java.sql.*;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import  net.avenir.jdbcPool.*;
import java.util.Hashtable;

public class DataSourceTest{

public static void main(String[] argv){
System.out.println(got to beginning);
Context ctx =null;
System.out.println(got to 1);
try{
JDBCConnectionPoolDataSource cpds1 = new
JDBCConnectionPoolDataSource();
System.out.println(got to 2);
//cpds1.setServerName();
cpds1.setDatabaseName(Northwind);
cpds1.setPort(1433);
Hashtable  env = new Hashtable(11);
System.out.println(got to 3);
env.put
(Context.INITIAL_CONTEXT_FACTORY,com.sun.jndi.fscontext.RefFSContextFactory
);
   System.out.println(got to 4);
   env.put(Context.PROVIDER_URL,file:/);
   System.out.println(got to 5);
   ctx = new InitialContext(env); //THIS IS THE LINE THE
ERROR OCCURS ON
   System.out.println(got to 6);
   ctx.rebind(jdbc:pool:poolDS,cpds1);
   System.out.println(got to 7);
   JDBCDataSource ds1=new JDBCDataSource();
   ds1.setDataSourceName(jdbc:pool:poolDS);
   env = new Hashtable();


offtopic transaction !!

2002-01-15 Thread Sandhu, Rajinder

Hi All,

I am running a transaction, and I want it to run wiht in a time
frame i.e. if it exceeds more than 1 min, transaction   should be rolled
back. (Transaction is supposed to succeed in 1 min).

Is there any way i can do it like doing it in a running thread which
destroys it self after 1 min etc.
If some body knows better way of achieving it.

Replys will be appriciated.


Cheers!!
Raj

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com