Question

I've written a Bank application in java , the server side uses Mysql & JSP pages .

When I pass queries from the client side to the server side , the inputs that I entered are shown in the URL address .

For example :

enter image description here enter image description here enter image description here

As you can see , the username and password are shown in the address bar .

I want to avoid that .

What would be the best approach to accomplish that ?

FYI : The screen shots are from inside Eclipse J2EE.

This project is pretty big , so if some code is needed , please say which is needed and I'd attach it.

Était-ce utile?

La solution

Probably you are passing data using the GET HTTP method.

In order to avoid viewing form parameters in the URL's querystring, make sure to set the attribute method="post" inside the form tag, in this way:

<form action="Bank/loginPage" method="post">
    <!-- form input fields -->
</form>

Autres conseils

Use POST Use SSL (https) Familiarize yourself with cookies, session, etc. Look here: Spring Security Authentication using RestTemplate

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top