sending request to a servlet from remote HTML -
is possible send request java servlet html file not in project?
that is, possible
<form action="http://example.com/myapp/savedetails.do" method="post"> // other fields </form> from remote html file.
note: trying send html formatted mail, , allow users fill forms through email , submit in email itself..
you don't call java servlet.
a servlet class servlet container uses handle requests.
your http client, browser, serializes form , sends http request whatever specified in form's action attribute. servlet container receives request, uses servlet handle it, , sends http response.
so browser sending request. if specify url server listening , can respond request, response. client has no knowledge servlet handled it.
what think happen if did this
<form action="http://www.google.com" method="post"> // other fields </form> can not send request google because google isn't in project? specify in action url.
servlets
No comments:
Post a Comment