Hi,
All you have to do is import your class at the begining, like:
<%@ import="my_package.MyClass"%>
And then create an instance of it in your scriptlet( request scope) or
<script runat=server> (servlet scope);
example:
<script runat="server">
MyClass myclass= new MyClass();
// And use it anywhere in this .jsp, this instance is created when the
servlet is loaded
</script>
or
<%
{
MyClass myclass= new MyClass();
// And use it only here, this instance is created when each request is
processed
}
%>
Walter Jerusalinsky
Buenos Aires, Argentina
[EMAIL PROTECTED]
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Luc Saint-Elie
> Sent: Sunday, April 18, 1999 1:26 PM
> To: [EMAIL PROTECTED]
> Subject: [BEGINNER] Calling a Java Class from JSP
>
>
> Hello,
>
> Its probably a trivial (stupid ?) question but how to call a
> classical Java
> class (not a bean) from a JSP page ?
>
> In fact i'd like to use BDConnectionManager
> (http://webdevelopersjournal.com/columns/connection_pool.html)
> from a JSP page.
>
> Thanks in advance
>
>
> +------------------------------------------------+
> | Luc Saint-Elie |
> | 53, rue Caulaincourt |
> | 75018 Paris France |
> | Tel: 01 42 52 09 62 / 06 12 90 19 65 |
> | email : [EMAIL PROTECTED] |
> +------------------------------------------------+
> | Servlet Taverne a site devoted to servlets |
> | ..and Java server side technologies |
> | ATTENTION NEW URL !!! |
> | url : http://www.interpasnet.com/JSS |
> +------------------------------------------------+
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff JSP-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".