Bonjour,

This has never worked (or only with old tomcats)

To use a bean in the default package, you have to import it or it is
searched in org.apache.jsp:

Generated servlet error:
F:\ApacheTomcat404\work\Standalone\localhost\ecomm\DevOffer$jsp.java:215:
Class org.apache.jsp.DevOffer not found.
                DevOffer handler =
(DevOffer)session.getAttribute("DevOffer");

<%@ page import="DevOffer"%> worked with Tomcat 4.0.4 but does not anymore
with 4.1.9...

Does someonr know why?

Cordialement,

Nicolas Silberzahn

Digital Airways
Everywhere <Internet>Technologies</Internet>
www.DigitalAirways.com


>-----Message d'origine-----
>De : A mailing list for discussion about Sun Microsystem's Java Servlet
>API Technology. [mailto:[EMAIL PROTECTED]]De la part de
>Sanjeev Verma
>Envoy� : mercredi 28 ao�t 2002 11:12
>� : [EMAIL PROTECTED]
>Objet : Re: How to import a bean in a JSP
>
>
>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
>
>

___________________________________________________________________________
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