Will wrote:
> I have a servlet called Register
> that extends a base servlet
> called BaseServlet (which is an
> EJB I think).
It is very unlikely that your servlet is also an EJB.
> Then in the Register
> servlet I can use methods from
> BaseServlet easily - because it
> extends it. My boss told
> me to use JSP and not servlets.
Is your boss a technical boss or a manager? If he or she is a manager,
you should explain which technology is right for the job. If he or she
is a technical boss, then ask him or her to explain how to accomplish it.
> But then my JSP cannot 'extend'
> BaseServlet.
There is a page attribute in JSP for specifying the base class, although
its use is frowned upon.
> Neither can I use
> <jsp:useBean id="BaseServlet" class="common.servlet.BaseServlet" />
> because it returns an error.
> So how can I use BaseServlets methods
> if I cannot 'extend' it
> in the normal way.
> I can do <jsp:useBean id="myBean" class="java.lang.String"
> scope="session" /> OK but when I try my BaseServlet bean it returns 500
> Server error.
> Is it that one can't 'extend' other servlets from a jsp?
>
HTH,
Ray
--
XML is the programmer's duct tape.
|