Can't answer the first, but I would suggest for the second that you try the
<%= %> tag, which is to my understanding, used to declare class-wide
objects, so could probably be used as:

<%=
public void runMe()
{
    // Do something
}
%>

    Although I have never tried this, and I'm not sure that the spec
specifically allows this.

Dave



-----Original Message-----
From: Mike McElligott [mailto:[EMAIL PROTECTED]]
Sent: 03 September 1999 18:36
To: [EMAIL PROTECTED]
Subject: Two questions



1.  Last night I was attempting to use a RequestDispatcher object to forward
to another page.  That didn't work (I think it may be a configuration
issue).  When I used the <jsp:forward page='blah'> syntax instead things
worked great.  I wondered what that tag got translated into so I looked at
the generated source and found that the servlet actually uses
PageContext.forward(String url).  Anyone know why that is the case vs.
ServletContext.getRequestDispatcher(String resource).foward(request,
response)?

2.  Can I define a function in jsp?  I don't see any reference to doing so
in the spec.  I'm aware that this is the 'wrong' way to do stuff and that I
should do my logic in a bean, but I want to know if it's possible.  It seems
like something that, even if it isn't in the spec, will probably be
implemented by vendors who want to compete with the versatility of...ahh..
other scripting environments.


Michael McElligott
DevTeam - StreetFusion(tm)
c-call.com, Inc.
60 Spear Street, 3rd Floor
San Francisco, CA  94105
Phone:  415-365-4136
http://www.streetfusion.com <http://www.streetfusion.com>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to