Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet --> JSP

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two servlet classes: one is CatalogPage.java and the other is ITBooksPage.java.
The CatalogPage.java is an abstract class and the first line of code after "package" and "import" is
public abstract class CatalogPage extends HttpServlet {}
The ITBooksPage.java extends the CatalogPage.java, and the first line of code after "package" is
public class ITBooksPage extends CatalogPage {}
First: When I convert CatalogPage.java to JSP, what do I have to do with public abstract class CatalogPage extends HttpServlet {} ? Can I simply leave it out in CatalogPage.jsp?
Second: Do I write <%@ page extends="CatalogPage" %> in ITBooksPage.jsp to replace
public class ITBooksPage extends CatalogPage {} in ITBooksPage.java?
Thank you in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic