Frage

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.

War es hilfreich?

Lösung

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>

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top