Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Restict GET method access for an action url - Struts

 
MohanKumar Soundararajan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need an url should be served for POST method request only. How do i restict accesing this servlet (actually - Action class) for GET method requests.

Expect your help in this case.
 
Amol Katdare
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way is to check the HTTP method in your action class's execute()

Something like...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Michael", please check your private messages for an important administrative matter.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, I'm suspecting that English is not your primary language. You might want to be careful with phrases such as:
Originally posted by Mohankumar Soundararajan:
Expect your help in this case.

This comes across as very demanding and could be construed as rude. Which is not the best way to get people to volunteer their time to help you.
 
MohanKumar Soundararajan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amol Katdare : It's working fine. Thanks.

Bear Bibeault : Sorry for the mistakes. I have updated my profile. I will take care in my next posts.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic