Re: importing multiple packages

2001-03-28 Thread William Brogden



Kris Gonzalez wrote:
 
 tej...
 
 you have to use multiple import items, one for each class or package you're
 importing
 
 such as:
 
 %@ page language="java" import="java.util.*" import="java.io.*" %

According to the spec, you import multiple items as a comma separated
list.
%@ page language="java" import="java.util.*,java.io.*" %

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






importing multiple packages

2001-03-27 Thread teh j

Hello

I was wondering if I could get some help on something?

Is it possible to use a bean in a JSP and at the same
time, import another class (that I have created) for
use in the page?

I am trying to do this with the tag
%@ page language = "java" import = "java.util.Vector,
onSaleCalendar.onSaleCalendar"%

however my JSP gives me Error 500 and tells me that it
cannot find the class
onSaleCalendar (Vector works fine)

the bean tag I am using is 

jsp:useBean id = "selectBean" scope ="page" class =
"selectexamples.eventsOnday"/


I have place my bean on the directory 

jakarta-tomcat-3.2.1/webapps/test/WEB-INF/classes/selectexamples
and called it eventsOnday

I have placed my class onSaleCalendar under 
jakarta-tomcat-3.2.1/webapps/test/WEB-INF/classes/onSaleCalendar

thanks
J



_
http://my.yahoo.com.au - My Yahoo!
- Have news, stocks, weather, sports and more in one place.



RE: importing multiple packages

2001-03-27 Thread Mike Braden

Have you tried using:

%@ page language = "java" import = "java.util.Vector,
onSaleCalendar"%

Instead of:

%@ page language = "java" import = "java.util.Vector,
onSaleCalendar.onSaleCalendar"%

Does this also produce an error?

I usually use:

%@ page language="java" contentType="text/html" %
%@ page import="java.util.Vector" %
%@ page import="onSaleCalendar" %

To make it easier to read.  (Note: Import is the only attribute of page
that can be listed multiple times)

Mike.
--
Mike Braden
[EMAIL PROTECTED]
[EMAIL PROTECTED]

-Original Message-
From: teh j [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 11:36 PM
To: [EMAIL PROTECTED]
Subject: importing multiple packages


Hello

I was wondering if I could get some help on something?

Is it possible to use a bean in a JSP and at the same
time, import another class (that I have created) for
use in the page?

I am trying to do this with the tag
%@ page language = "java" import = "java.util.Vector,
onSaleCalendar.onSaleCalendar"%

however my JSP gives me Error 500 and tells me that it
cannot find the class
onSaleCalendar (Vector works fine)

the bean tag I am using is

jsp:useBean id = "selectBean" scope ="page" class =
"selectexamples.eventsOnday"/


I have place my bean on the directory

jakarta-tomcat-3.2.1/webapps/test/WEB-INF/classes/selectexamples
and called it eventsOnday

I have placed my class onSaleCalendar under
jakarta-tomcat-3.2.1/webapps/test/WEB-INF/classes/onSaleCalendar

thanks
J




_
http://my.yahoo.com.au - My Yahoo!
- Have news, stocks, weather, sports and more in one place.




Re: importing multiple packages

2001-03-27 Thread Kris Gonzalez

tej...

you have to use multiple import items, one for each class or package you're
importing

such as:

%@ page language="java" import="java.util.*" import="java.io.*" %

however, i sometimes get a compilation error if i use more than one inline like
this, so the preferable way is:

%@ page language="java" %
%@ page import="java.util.*" %
%@ page import="java.io.*" %

et cetera

hope this helps

-kg


teh j wrote:

 Hello

 I was wondering if I could get some help on something?

 Is it possible to use a bean in a JSP and at the same
 time, import another class (that I have created) for
 use in the page?

 I am trying to do this with the tag
 %@ page language = "java" import = "java.util.Vector,
 onSaleCalendar.onSaleCalendar"%

 however my JSP gives me Error 500 and tells me that it
 cannot find the class
 onSaleCalendar (Vector works fine)

 the bean tag I am using is

 jsp:useBean id = "selectBean" scope ="page" class =
 "selectexamples.eventsOnday"/

 I have place my bean on the directory

 jakarta-tomcat-3.2.1/webapps/test/WEB-INF/classes/selectexamples
 and called it eventsOnday

 I have placed my class onSaleCalendar under
 jakarta-tomcat-3.2.1/webapps/test/WEB-INF/classes/onSaleCalendar

 thanks
 J

 _
 http://my.yahoo.com.au - My Yahoo!
 - Have news, stocks, weather, sports and more in one place.