p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

pro_jsp thread: Problems Extending Class in JSP

Message #1 by "Dima" <difrad76@y...> on Sat, 23 Feb 2002 15:33:39
hi=0A=0Awhen extending a class you need not mention the extension ".class" 
in the extends attribute.=0Asimply say=0A=0A<%@ page extends=3D"Ok"%>=0A=0A
cheers=0Aniko=0A=0AOn Sat, 23 Feb 2002 Dima wrote :=0A> Hello I am trying t
o extend class into JSP file=0A> =0A> Here is the class:=0A> =0A> public cl
ass Ok{=0A> 	public static void main (String args[])=0A> 	 {=0A> 	 	String 
ok=3D "Ok parsing in to JSP file";=0A> 	 }=0A> } =0A> =0A> This is  the JSP
 file:=0A> =0A> <%@ page extends=3D"Ok.class"%>=0A> =0A> <%=0A> out.print("
Class extended");=0A> %>=0A> =0A> This is the errors that I receive:=0A> 
=0A> Internal Servlet Error:=0A> =0A> org.apache.jasper.JasperException: Un
able to compile =0A> class for =0A> JSPF:\jakarta-tomcat\work\localhost_808
0=0A> \_0002fok_0002ejspok_jsp_0.java:15: Identifier expected.=0A> public c
lass _0002fok_0002ejspok_jsp_0 extends Ok.class =0A> {=0A>                 
                                  ^=0A> F:\jakarta-tomcat\work\localhost_80
80\_0002fok_0002ejspo-=0A> k_jsp_0.java:15: =0A> Identifier expected.=0A> p
ublic class _0002fok_0002ejspok_jsp_0 extends Ok.class =0A> {=0A>          
                                              ^=0A> 2 errors=0A> =0A> Pleas
e help. I have no idea why I get this errors=0A> =0A> Thank you=0A> Dima=0A
> ---=0A> Change your mail options at http://p2p.wrox.com/manager.-=0A> asp
 or =0A> to unsubscribe send a blank email to =0A> leave-pro_jsp-669060I@p...
p.wrox.com.=0A =0A

  Return to Index