hello everyone,
Greetings !!
i am working with a web application where i have written a
servlet to validate the request data.
here is the scenario.
i have servlet on my localhost,which generates the request page with all the neccessory data, and the task of this servlet is just this means to create html page with some values in it,or later they can be entered.when i submit the details then it goes to another server
e.g like i am using
tomcat ,so my server is
http://localhost:8080/requestGenrator.html and this servlet will create an html page with many details.
now i have hardcoded the server details in my requestGenerator servlet like "http://otherserverdetails :8020/ValidateServlet"
on other server i have a ValidateServlet which will validate the servlet and send the response to Me.
everything working fine, but when i click the submit button from my requestGenertor.html then url becomes "http://otherserverdetails:8020/ValidateServlet" which i think is fine because that is where the request has to be validated, but when i get the response from server the url remain the same. which i guess should be "http://myserverdetails:myPort/responseMessage" .
how can i achieve this ,or am i right on understanding . that ValidatorServlet is written by me and i have deployed the code in another tomcate server in some other machine and now i am sending request from my machine to that server. i am getting the response but my browser still showing me the server url and details...is it something like, that i have moved to server. if yes how can receive the response from server.
i have used simple out.println() to send the response from server. no forwards and dispatchers are being used.
Please share your suggestions.
Thanks in advance.