url-mapping

Grails spring-security static rules for rest resource seems not working properly

a 夏天 提交于 2019-11-30 21:29:35
I have an Grails (2.0.4) application using Spring Security plugin (version 1.2.7.3) and the secured annotation approach (the default one, more here ). Now, I have these URLs in UrlMapping.groovy with the resource key or the controller/action pair, like this: "/$controller/$action?/$id?" { constraints { // apply constraints here } } // other rules, all working properly "/api/item/$id?"(resource: 'itemRest') '/api/item/batch-delete'(controller: 'itemRest', action: 'batchDelete') The RESTful mapping works perfectly with ItemRestController: every method (show, update, save, delete) is correctly

Grails spring-security static rules for rest resource seems not working properly

ぃ、小莉子 提交于 2019-11-30 05:08:38
问题 I have an Grails (2.0.4) application using Spring Security plugin (version 1.2.7.3) and the secured annotation approach (the default one, more here). Now, I have these URLs in UrlMapping.groovy with the resource key or the controller/action pair, like this: "/$controller/$action?/$id?" { constraints { // apply constraints here } } // other rules, all working properly "/api/item/$id?"(resource: 'itemRest') '/api/item/batch-delete'(controller: 'itemRest', action: 'batchDelete') The RESTful

URL Pattern Restricting in SPRING MVC

半腔热情 提交于 2019-11-30 03:04:00
问题 My Spring Web MVC application has the following handler mapping in the Controller. @RequestMapping(method = RequestMethod.GET, value = "/something") When request is sent to http://www.someURL.com/something , it works fine and maps to correct controller but, http://www.someURL.com/something.bak or http://www.someURL.com/something.abc or http://www.someURL.com/something.abc.deff.xyz also works!! I want to restrict this to just http://www.someURL.com/something and not to others. web.xml defines

How to remove app name and port from url in grails?

纵然是瞬间 提交于 2019-11-27 15:48:08
问题 Instead of deploying my app to http://localhost:8080/myApp I want to deploy it to http://localhost 回答1: To change the run-app port, edit grails-app/conf/BuildConfig.groovy and add the line grails.server.port.http = 80 To remove the context (the 'myApp' part) edit application.properties and add the line app.context=/ 回答2: deploy your app to a tomcat server with the war name as ROOT.war. Because war names describe contexts... papa.war will be available through [root_domain]/papa 回答3: To remove

Jersey with Struts2 [duplicate]

房东的猫 提交于 2019-11-26 19:11:44
This question already has an answer here: Request is going to Struts Dispatcher 2 answers I am using jersey with Struts2. But by RestFul Service calls are not working. Below are my configurations files struts.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd"> <struts> <package name="default" namespace="/" extends="struts-default"> <result-types> <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" /> </result-types> <interceptors>

Jersey with Struts2 [duplicate]

ぐ巨炮叔叔 提交于 2019-11-26 06:49:43
问题 This question already has an answer here: Request is going to Struts Dispatcher 2 answers I am using jersey with Struts2. But by RestFul Service calls are not working. Below are my configurations files struts.xml <?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE struts PUBLIC \"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN\" \"http://struts.apache.org/dtds/struts-2.1.dtd\"> <struts> <package name=\"default\" namespace=\"/\" extends=\"struts-default\"> <result-types>