I am having bunch of warning messages for "g:" | "asset:" etc, in my GSP files. Also, the content assist is not working in the editor. But if I manually type the code, the file executes properly while running in server. But it is very tedious to code without the content assist for the grails taglib elements and also warning messages are annoying.
Ex Warning in editor: "Unknown Tag (asset:image)"
My configuration is as below:
1. Grails 2.4.0
2. GGTS 3.6.2
I have the grails.tld, with all the grails tags mentioned in the tld, in webapp/web-inf/tld folder but seems GGTS is not able to recognize the tld. I read in various similar questions that we do not have to explicitly specify the taglibs at the top of each GSP page.
Need suggestions on what can be done to resolve the warnings and make the content assist work properly in the editor.
Related
I created a trivial Grails 3.0.1 application and loaded it into IntelliJ IDEA by importing the build.gradle file. The recommended way to run the app through IDEA is to execute the Application.groovy class in the init folder.
Doing that started the app, and I was able to browse to the "Welcome to Grails" page, but when I tried to access any of the controllers I get:
This page contains the following errors:
error on line 7 at column 12: Opening and ending tag mismatch: meta line 0 and head
Below is a rendering of the page up to the first error.
default.list.label
in the browser. I have two domain classes and generated the controllers and views using generate-all.
I think something is failing in the <gsp> tags, but I don't know what.
If I start the application using grails run-app, the views work properly, so this is specifically an issue with Application.groovy.
I'm using grails for my project and I'm facing a little trouble.
I have an Internationalization system and I use messages.properties files to list all strings that needs to be internationalized.
I've created one as follows:
<g:message code='logged.in.as'/>
in my messages.properties file I have the following:
logged.in.as=Logged in as\:
but, when I load the browser, I see the following
logged.in.as
Why this strange behaviour?Notice that I use the <g:message> tag for a lot of other strings and everything works well...
I've a custom ecss file in my RichFaces 4 application. This ecss file has some warnings but I'm O.K. with them and don't want to fix this warnings.
I include this ecss file in my pages using;
<h:outputStylesheet name="myTheme.ecss" library="css" />
Everything works well but richfaces generates some warnings in the server log about ecss file.
WARNING: Problem parsing 'css/sws/workstationTheme.ecss' resource: Ignoring the whole rule.
16-Jul-2012 10:26:59 org.richfaces.resource.CompiledCSSResource$ErrorHandlerImpl logException
WARNING: Problem parsing 'css/myTheme.ecss' resource: Error in attribute >selector. >Invalid token "*". Was expecting one of: , "=", "]", "~=", "|=".
Is there a way to turn off this warnings, they appear every time when I access a JSF page so my server log is pretty full with them.
Server: Tomcat 7
JSF Ver. : javax.faces-2.1.8
Rich Faces Ver: 4.2.2
Do you get the warnings when you restart your server? That issue was a JIRA related to hot deployments that was supposedly fixed in 4.2.2.Final. If you set javax.faces.PROJECT_STAGE to Development in web.xml it's supposed to prevent generation of that exception.
I am using Grails 2.0.1 in my website. Everything was fine until I installed grails ui-performance plugin into my website.
When I am deploying war with this new plugin the css files cannot be accessed. The web pages are rendered without the css and when I "view source" the page and try to access the generated url (versioned) of the css files I get the following error in firefox
"The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."
After installing this plugin I have only changed the way I call the css to my page.
Like this:
<p:css name='main'/>
<p:css name='style'/>
Am I missing something. Please help
Uninstall one of them. Either don't use UI Performance, or remove resources by deleting the line in BuildConfig.groovy that declares the dependency. Note that there are plugins that work with resources and add in functionality like what UI Performance has, so one option is to keep resources and uninstall ui-performance, and add one or more of these to BuildConfig.groovy
runtime ":zipped-resources:1.0"
runtime ":cached-resources:1.0"
runtime ":yui-minify-resources:0.1.4"
I have a plugin with domain, controller and view pages. (Using grails 1.3.6)
I run the plugin as standalone, the views work fine. URL: http://localhost:8080/sample-plugin/gp/list. I am able to view the list page.
I installed the plugin into a main application i.e. plugin-test. Start as run-app within STS and browse to http://localhost:8080/plugin-test/gp/list. I am able to view the list page.
I bundle the application as war i.e. plugin-test.war and deploy to tomcat. When I browse to http://localhost:8181/plugin-test/gp/list I get a 404 error! I am not sure what I am doing wrong.
I have been trying to resolve it for quite sometime now and still no luck. The same main application works fine in STS but not in tomcat.
HTTP Status 404 - /plugin-test/WEB-INF/grails-app/views/gp/list.jsp
type Status report
message /plugin-test/WEB-INF/grails-app/views/gp/list.jsp
description The requested resource (/plugin-test/WEB-INF/grails-app/views/gp/list.jsp) is not available.
Please help.
Thank you.
Jay Chandran.
This sounds worryingly familiar, as I spent a while figuring out this (or a very similar) issue. I ended up raising this Grails bug report:
Plugin layout not found in war when installed from BuildConfig.groovy
Have you installed the plugin as using the new BuidConfig dependency technique? The JIRA documents my workaround.
Sharing some of my lessons learned after experiencing the same exact issue (1.3.7):
Double check your HTML source to make sure that your template really isn't being included. Mine was being included, but my CSS/image URLs were wrong (only while running as a war)...so I wrongly assumed that my template wasn't there.
Don't use the ui performance tags for referencing your static content...doesn't appear to work, even if the plugin attribute is specified.
Don't name your layout main.gsp. You're guaranteed to have conflicts.
Don't use absolute=true on your g:resource tags. This doesn't appear to append the pluginContextPath to the absolute url, even if you specify dir="${pluginContextPath}"
Don't use pluginContextPath, as it's no longer required: http://grails.org/doc/latest/guide/single.html#6.3%20Tag%20Libraries (search "Plugin Paths")
In your g:resource tags in your plugin layout, make sure you specify the plugin attribute. Set it to the name of your plugin.
Move your static images/css from your plugin to a web server. If each application using your plugin has its own copy, your users aren't going to benefit from caching when bouncing between apps.
Note that all of the above applies to the layout gsp in your plugin project, not your consuming application.