This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

JSP/ Servlet Post Question  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some html clients created by some very old cgis posting data to a JSP/servlet. Now this JSP/servlet is open to the entire world, but I want only those certain cgis to be able to post to it. In other words, I don't want users to create their own forms and post my jsp/servlet. The clients can only be the clients that reside on machine. Its very important that this doesn't happen. Does anyone know if there is a way to identity to client in jsp or stop others from posting to your servlet in JSP.

Thanks in advance.
 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a simple filter to identify the clients and stop to access those jsps you want to protect

Regards
 
Derika Francis
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm lost. I know there is someway to filter. There has to be logically. But I guess I just don't know enough to do it. Thats why I came to the big guns for help. For instance http://myserver.com/test.jsp post to
http://myserver.com/test2Res.jsp. Logic distates for me to parse the string of the server veriable (if there is such a variable) to tell me the identity (http://myserver.com/test.jsp ) of the object posting to my response page to see if its a legal client. But does java provide me with a mechanism for doing this?

Help!!! said the kid.
 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is meant by filtering the request is you need to implement a ServletFilter and (through the web.xml file) force anything that calls that servlet to pass through it first. Also look in the request object for methods that will help you do this. You need to google ServletFilter to find out more about implementing these....
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!