Hi Mark,
Some thing like this i would think:
public class MyClassUsedByJsp {
public MyClassUsedByJsp(ServletContext servletContext) {
....
}
}
In your jsp...
<%
MyClassUsedByJsp bean = new MyClassUsedByJsp(this.getServletContext());
%>
Cheers,
Bruce
> JSP's are essentially servlets, so if you have a JSP, you have a
> ServletContext. Any intelligent person is going to create a couple of
> java classes to use in their JSP for business logic, etc.
>
> How do you get the ServletContext from within one of those non-servlet
> Java classes that are used by the JSP?
>
> I see that neither ServletContext, nor ServletConfig are concrete.
>
> Enlighten me.
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---