Nicholas

In my understanding, I think the JSP Compiler is expecting an import
statement that contains a ".". Anyways, if your class lies in the "default"
package (which effectively means that it has no package definition), just
remove the <%@ page import="DevOffer"%> statement, and it should work, even
for Tomcat 4.0.4.

Regards
Sanjeev

-----Original Message-----
From: Nicolas S i l b e r z a h n [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 2:17 PM
To: [EMAIL PROTECTED]
Subject: How to import a bean in a JSP


Bonjour,

This has worked with Tomcat 4.0.4 to use a bean:

<%@ page import="DevOffer"%><%
DevOffer handler = (DevOffer)session.getAttribute("DevOffer");
if(handler==null) {
        handler = new DevOffer();

        }

%>

With tomcat 4.1.9, it g�n�rates an error:

2002-08-27 19:38:07 Error compiling file: F:\Tomcat
4.1.9\work\Standalone\localhost\ecomm\/DevOffer_jsp.java     [javac]
Compiling 1 source file
F:\Tomcat 4.1.9\work\Standalone\localhost\ecomm\DevOffer_jsp.java:11: '.'
expected


Help!


N i c o l a s   S i l b e r z a h n

<100% Java, Mobile, Offline aware>Wapaka Browser for mobile development
(XHTML, WML)</100% Java, Mobile, Offline aware> www.Wapaka.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to