You'll need to explain what you are trying to do better. For example:
Adrian Airmil wrote:I have a jsp which will submit an image to a php script.
has no meaning.
You don't "submit" images. What do you mean by this? Are you submitting the URL of an image to the php script? Are you using an input of type image to trigger the request? Are you specifying the URL of the php script in an image tag? What?
As it's central to the discussion, not understanding what this means makes the question impossible to address.