Grails从1.3.7升级到2.0.1 - [英] Grails upgrade from 1.3.7 to 2.0.1 -

查看:104
本文介绍了Grails从1.3.7升级到2.0.1 - 的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Grails应用从1.3.7升级到2.0.1。 grails-app \\\\\\\\\\下使用标准布局的静态(gsp,但不使用任何控制器)页面。这些文件在升级之前工作正常。但升级后,我得到404错误。如果我给根路径即只有index.gsp工作。 HTTP://本地主机:8080 / MyApp的/。但是,如果我指定http:// localhost:8080 / myapp / index.gsp,则会收到404错误。

I have upgraded my grails app from 1.3.7 to 2.0.1. I had few static (gsp but not using any controllers) pages using standard layout under "grails-app\views\" . These files were working fine prior to upgrade. But after upgrade, I get 404 error. Only index.gsp is working if I give root path ie. "http://localhost:8080/myapp/". But if I specify "http://localhost:8080/myapp/index.gsp", I get 404 error.

我认为这是使用grails过滤器在2.0.1中。但我还没弄明白。有没有人遇到类似的问题?

I assume this is something to do with grails filters in 2.0.1. But i couldn't figure it out yet. DO anyone have experienced any similar issue?

推荐答案

这是一个安全风险,直接链接到GSP在2.0中被禁止 - a href =http://jira.grails.org/browse/GRAILS-7542 =noreferrer> http://jira.grails.org/browse/GRAILS-7542 和 http://grails.1312388.n4 .nabble.com / Direct-linking-to-gsp-in-Grails-2-0-td4228929.html 中有关如何使用URL映射链接到GSP的讨论和示例。

This was a security risk and directly linking to GSPs was disallowed in 2.0 - see http://jira.grails.org/browse/GRAILS-7542 and http://grails.1312388.n4.nabble.com/Direct-linking-to-gsp-in-Grails-2-0-td4228929.html for a discussion and examples of how to use URL mappings to link to GSPs.

这篇关于Grails从1.3.7升级到2.0.1 - 的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆