jsp - How to change url in address bar through java -


How can I change the URL in the address bar via java code in the browser (via JavaScript or any front end languages Not from)?

I have a URL in the address bar, such as "" but I have to change that URL to "Java code". I am using JSP to watch.

Can anyone help?

If the URL with request parameters comes from the page on which you have no control (or if This is a link), you can do the following:

  • Use the servlet at that URL
  • If it finds the request parameters in the query string, And stores them in the session, then a query does not redirect itself with the string
  • if any If there is no query string, get the parameters from the session, remove them from the session accidentally to avoid reusing and process the query

If the parameters If the query is present in the string, then change the form to post the method to pass the parameter in the request body instead of the query string due to the form using the GET method.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -