简体   繁体   English

Grails导入NetBeans错误

[英]Grails import NetBeans error

I have this code in the top of my main.gsp file 我的main.gsp文件顶部有此代码

<%@ page import="com.somethingToImport"%>

NetBeans is giving me an error: expecting EOF, found 'import' @ line 1, column 20 I think this is causing my app to crash in IE. NetBeans给我一个错误: expecting EOF, found 'import' @ line 1, column 20我认为这导致我的应用程序在IE中崩溃。 What can I do to fix this? 我该怎么做才能解决此问题?

This should help the IE issue but won't fix NetBeans complaining. 这应该可以解决IE问题,但不能解决NetBeans抱怨的问题。 Try including the DOCTYPE in the first line of the GSP. 尝试在GSP的第一行中包含DOCTYPE

Example: 例:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <%@ page import="com.somethingToImport" %> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 

Note: I added a space between the import and the '%' 注意:我在导入和'%'之间添加了一个空格

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM