> Hello to all Java programmers out there.
>
> The task I am trying to do here is to serve or access files which
> belong to my web application (i.e. present in the WEB-INF/xml
> directory) in a servlet. I could have hardcoded the path but what I am
> looking for is a solution which employs relative paths.
On Sep 29, 12:09 am, "Mike Schilling" <mscottschill...@hotmail.com>
wrote:
> getsanjay.sha...@gmail.com wrote:
> > Hello to all Java programmers out there.
[quoted text clipped - 6 lines]
> Look at the ServletContext class, in particular ServletContext
> .getResource().
That did the trick, thanks a lot, I really appreciate your timely
help.
So my next question is:
Would it be a good programming / design practice to format the data at
the server and then serve the client, relieving the client of knowing
what attributes it should be looking for in the response in case of an
Ajax XML response or to send raw data in the form of XML to the client
and let it figure out how the data should be displayed?