Hi,
i have a
JSP that has an a href tag :
and in My javascript i am encoding the ID and then submitting the form :-
'
In
Servlet, i am getting the ID value as :
String id = request.getParameter("id");
and then decoding the value within the servlets.
Now , my problem is whenever i am hitting the direct link within the servlets using the encoded id that i had passed within the javascript , then the request is again processed.
I need to stop the request from processing if user copies the encoded id and hit the servlet directly .
Example Scenario :-
Suppose id encoded in the javascript and the URL formed is :
http://localhost:8080/MyServlets/abc.do?id=QQWWEEEggie66573== (encoded).
URL formed and submitted via javacript onclicking a link
In controller :-
Id decoded and form processed.
Problem :- Need to stop if the user copies the URL and directly hits from the brower without clicking the link
example :-
http://localhost:8080/MyServlets/abc.do?id=QQWWEEEggie66573==
How can i stop that and determine whether the a href is clicked or user is directly hitting the url.
Thanks