tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: jsp in packages
Date Tue, 13 Aug 2002 13:08:33 GMT
Time-saver: I don't have an answer to your questions in this message.

>Q2. I have written a static method in one jsp page. I want to call
>method in another jsp page. How to do it? I do not want to take this
>out from the jsp and put into a class (.java) and use it in both the

Why not put in a Java file?  JSPs are not meant for programming.  When
you start getting into static methods containing reusable functionality,
it sounds like you're stepping out of pure JSP development and into the
world of bean libraries if not servlets.  The right approach for Q2
above seems to be to package the common method in a bean called by both
JSP pages, or a servlet (maybe a filter?) connected to both, depending
on what the common code does.

Just my $0.02, IMHO...

Yoav Shapira
Millennium ChemInformatics

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message