aspose file tools *
The moose likes Struts and the fly likes Restict GET method access for an action url - Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Restict GET method access for an action url - Struts" Watch "Restict GET method access for an action url - Struts" New topic
Author

Restict GET method access for an action url - Struts

MohanKumar Soundararajan
Greenhorn

Joined: Nov 22, 2008
Posts: 3
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

Joined: Jan 02, 2007
Posts: 2
One way is to check the HTTP method in your action class's execute()

Something like...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61794
    
  67

"Michael", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61794
    
  67

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

Joined: Nov 22, 2008
Posts: 3
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Restict GET method access for an action url - Struts