You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by kw...@dietzk.de on 2003/03/03 09:36:16 UTC

Re: include a class

Thanx a lot. 

i using the tomcat and for a perl-man, like me, it is very confusing. but know 
it works. i took your 2. exp. Thanx

Kris

Am 28 Feb 2003 um 10:49 hat Lindomar geschrieben:

> Kris, first, does your webapp started fine?
> If yes, we can have some situations for one class works in jsp files using
> tomcat:
> 1- webapp
>             |_WEB-INF
>                 |_classes
>                     |_yourclass -> if your class doesn't have a package
> 2- webapp
>             |_WEB-INF
>                 |_classes
>                     |_pack
>                         |_subpk1
>                             |_subpk2
>                                 |_yourclass ->if your class is in
> package(s), in this case: pack.subpk1.subpk2.yourclass
> 
> 3- if your class is any jar, this jar file must be in /WEB-INF/lib(your
> class is shared only in especific webapp) or %CATALINA_HOME%/common/lib(your
> class is shared in webapp'S' and tomcat) or
> %CATALINA_HOME%/shared/lib(your class is shared in webapp'S').
> 
> After this cases, if your class is in package(s), in you jsp file you have
> to use the "import" directive, for example:
> <%@ page import="pack.subpk1.subpk2.*" %> or if import only  a especific
> class <%@ page import="pack.subpk1.subpk2.yourclass" %>
> 
> Well, i think that's.
> 
> ----- Original Message -----
> From: <kw...@dietzk.de>
> To: <to...@jakarta.apache.org>
> Sent: Friday, February 28, 2003 08:46
> Subject: include a class
> 
> 
> > E-mail Premium BOL
> > Antivírus, anti-spam e até 100 MB de espaço. Assine já!
> > http://email.bol.com.br/
> > Hi all,
> >
> > i am new to JSP and have a beginner question. I can't fix to include a
> class. hmm I have
> > class wrtitten that do all i need and it works fine on the shell.
> > Now i want to handle this class in a jsp script, so that i get back the
> string..
> >
> > that is what i want to do in my jsp:
> >
> > Class a = new Class;
> > out.println(a.Function());
> >
> >
> > But how to include my class, can anyone give me a short example, i can't
> get throw and my
> > books are not very well.
> >
> > Thanx a lot.
> >
> > Kris Wolff
> > Application Developer
> > dietzk. Interactive OHG
> > An der Schindhohl 7
> > D-65843 Sulzbach am Taunus
> > Fon +49 (0) 6196 4939-95
> > Fax +49 (0) 6196 758830
> > kwolff@dietzk.de
> > http://www.dietzk.de
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


Kris Wolff
Application Developer
dietzk. Interactive OHG
An der Schindhohl 7
D-65843 Sulzbach am Taunus
Fon +49 (0) 6196 4939-95
Fax +49 (0) 6196 758830
kwolff@dietzk.de
http://www.dietzk.de

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: include a class

Posted by Andy Eastham <an...@gliant.com>.
If you can understand perl, surely nothing can be confusing ;-)

Andy

> -----Original Message-----
> From: kwolff@dietzk.de [mailto:kwolff@dietzk.de]
> Sent: 03 March 2003 08:36
> To: Tomcat Users List
> Subject: Re: include a class
>
>
> Thanx a lot.
>
> i using the tomcat and for a perl-man, like me, it is very
> confusing. but know
> it works. i took your 2. exp. Thanx
>
> Kris
>
> Am 28 Feb 2003 um 10:49 hat Lindomar geschrieben:
>
> > Kris, first, does your webapp started fine?
> > If yes, we can have some situations for one class works in jsp
> files using
> > tomcat:
> > 1- webapp
> >             |_WEB-INF
> >                 |_classes
> >                     |_yourclass -> if your class doesn't have a package
> > 2- webapp
> >             |_WEB-INF
> >                 |_classes
> >                     |_pack
> >                         |_subpk1
> >                             |_subpk2
> >                                 |_yourclass ->if your class is in
> > package(s), in this case: pack.subpk1.subpk2.yourclass
> >
> > 3- if your class is any jar, this jar file must be in /WEB-INF/lib(your
> > class is shared only in especific webapp) or
> %CATALINA_HOME%/common/lib(your
> > class is shared in webapp'S' and tomcat) or
> > %CATALINA_HOME%/shared/lib(your class is shared in webapp'S').
> >
> > After this cases, if your class is in package(s), in you jsp
> file you have
> > to use the "import" directive, for example:
> > <%@ page import="pack.subpk1.subpk2.*" %> or if import only  a especific
> > class <%@ page import="pack.subpk1.subpk2.yourclass" %>
> >
> > Well, i think that's.
> >
> > ----- Original Message -----
> > From: <kw...@dietzk.de>
> > To: <to...@jakarta.apache.org>
> > Sent: Friday, February 28, 2003 08:46
> > Subject: include a class
> >
> >
> > > E-mail Premium BOL
> > > Antivírus, anti-spam e até 100 MB de espaço. Assine já!
> > > http://email.bol.com.br/
> > > Hi all,
> > >
> > > i am new to JSP and have a beginner question. I can't fix to include a
> > class. hmm I have
> > > class wrtitten that do all i need and it works fine on the shell.
> > > Now i want to handle this class in a jsp script, so that i
> get back the
> > string..
> > >
> > > that is what i want to do in my jsp:
> > >
> > > Class a = new Class;
> > > out.println(a.Function());
> > >
> > >
> > > But how to include my class, can anyone give me a short
> example, i can't
> > get throw and my
> > > books are not very well.
> > >
> > > Thanx a lot.
> > >
> > > Kris Wolff
> > > Application Developer
> > > dietzk. Interactive OHG
> > > An der Schindhohl 7
> > > D-65843 Sulzbach am Taunus
> > > Fon +49 (0) 6196 4939-95
> > > Fax +49 (0) 6196 758830
> > > kwolff@dietzk.de
> > > http://www.dietzk.de
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
>
>
> Kris Wolff
> Application Developer
> dietzk. Interactive OHG
> An der Schindhohl 7
> D-65843 Sulzbach am Taunus
> Fon +49 (0) 6196 4939-95
> Fax +49 (0) 6196 758830
> kwolff@dietzk.de
> http://www.dietzk.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org