aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Posting to a JSP/Servlet" Watch "Posting to a JSP/Servlet" New topic
Author

Posting to a JSP/Servlet

Derika Francis
Greenhorn

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.

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

HMMM!!
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30762
    
156

Derika,
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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Posting to a JSP/Servlet