Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cracking Question

 
Mahendar Reddy
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends...Please help me out regarding this question...


Generally we can authenticate a servlet while accessing directly..but...

How can we protect our servlet being accessed from other programs within the same appl...

As I know there is a tag in DD to do this, but I am unable to get it...

Thanks in advance....
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

As I know there is a tag in DD to do this, but I am unable to get it...


I don't think there is a tag like that. But why do want to protect your servlet from being accessed with your application?
 
Mahendar Reddy
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vishnu Prakash:


But why do want to protect your servlet from being accessed with your application?


first of all thanks for ur quick reply Vishnu...Here is some expl...

Some times I may want to protect some of my appl servlets(not all) from unauthorized persons.

Assume that my home page is having hyperlinks to
5 servlets, in which 3 of them deal with confidential matters...and other two are not. So I don't want to protect other two, so that anybody can access them. Now I want to authenticate/authorize the users who will try to access my 3 confidential servlets. What should I do?...



 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't you just check within your applicatoin if the user is authorized before allowing access?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!