On Sep 18, 1:15 pm, adamcr...@gmail.com wrote:
> I have a servlet with a mapping like /myServlet/* which serves content
> based on the URL. It works great when it gets called alone. However,
[quoted text clipped - 3 lines]
> know to serve up "stuff". Is there a way to do this purely using the
> URL, without passing it parameters?
Instead of basing the actions on the URL, you might want to consider
using query-strings. So, myServlet can still be there, but instead of /
myServlet/getMeCoffee, the request URL will be more like /myServlet/
getMe?item=coffee.
This way, you an use include tag and pass parameters.
<jsp:include page="/myServlet/getMe">
<jsp:param name="item" value="coffee"/>
</jsp:include>
-cheers,
Manish
adamcrume@gmail.com - 18 Sep 2007 22:27 GMT
> On Sep 18, 1:15 pm, adamcr...@gmail.com wrote:
>
[quoted text clipped - 19 lines]
> -cheers,
> Manish
I had though about that, and it works, but it just feels like a hack
to me, rather than a solution. If it can't be done, perhaps it should
be chalked up to a limitation of the J2EE spec.
Thanks for your input, though.