Title: 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

Reply via email to