On Aug 29, 8:49 am, "tes...@hotmail.com" <tes...@hotmail.com> wrote:
> I have this scriptlet working in a JSP and was wondering how I can put
> it in a class file and call it in my JSP.
[quoted text clipped - 32 lines]
> I dont have JSTL or Struts on this Tomcat 4.1.27 container that I am
> working on.
You'd have to pass a PageInfo object to "mymethod". I would suggest
having mymethod return a string, rather than call out.println. that
way you can call it like:
<%= MyUtilsClass.mymethod(pageinfo) %>
public class MyUtilsClass {
public static String mymethod(PageInfo pageinfo) {
if (pageinfo != null && pageinfo.isFirst()) {
return "<a href=\"first.jsp\">first</a>
}
return "";
}
}