• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp

 
ram shyam ravi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why in @page attribute if we have extends attribute value thread its throwing error.
ex:
<%@ page language="java" extends="thread" import="java.util.*,java.net.*" %>
bye
Rgds
Ravi.Vunnam.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ram
The JSP spec says the value of the extends attribute should be the fully qualified class name so it should be:
java.lang.Thread, not just 'thread' which is not even a class unless it one you created yourself.
The spec also says that you should be very carefull when specifying a class for your JSP to extend because it can severly limit the containers ability to create the appropriate implementation class. I would be especially carefull doing anything with Threads seeing as how servelts and JSPs are multithreaded by default and the container manages them you could seriously break something in trying to do it yourself.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!