File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Posting to a JSP/Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Posting to a JSP/Servlet" Watch "Posting to a JSP/Servlet" New topic

Posting to a JSP/Servlet

Derika Francis

Joined: Mar 18, 2005
Posts: 6
Hi guys,
I need a solution asap. I want to ensure that 1 & only 1 client can post to my jsp/servlet. Given Servlet A, Servlet B or any other client on the same machine as Servlet A can post to A. In others words, I need to be able to stop users from saving an html client to the desktop and posting to Servlet A. This is really important.

[ May 19, 2005: Message edited by: Bear Bibeault ]

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

You can check the IP address of the client to check whether servlet B is posting to servlet A.

It's a bit trickier to figure out whether the call to servlet A is coming from a client who is viewing something on your web site or dowloaded the page. The easiest way is to put a token in the session on rendering a page and checking it is still there when you get to Servlet A.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Posting to a JSP/Servlet
jQuery in Action, 3rd edition