Am using a HTML form like this,
<form action="/myservlet?userid=12345" method="post" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" value="Submit">
</form>
And the path of this HTML form is say for example, http://www.mywebapp.com/sample.html
In my servlet when i use the String url = req.getRequestURL().toString();
and printout the string it prints the form action URL http://www.mywebapp.com/myservlet?userid=12345 and not the HTML URL.
The expected HTML URL : http://www.mywebapp.com/sample.html (from here only i request and i need this URL)
Can anyone suggest me how to get the HTML url path in the servlet.