We started using Grails in our current project for one of the internal web-applications. Grails uses GroovyServer Pages (gsp) for web pages and layout templates (you can also use JSP instead). As I don’t like to use Eclipse for web-design tasks, I figured out how to add gsp support to Dreamweaver (CS3).
Step 1: Add .gsp file extension
Edit the Extensions.txt file, which can be found here:
Windows: \Documents and Settings\username\Application Data\Adobe\Dreamweaver 9\Configuration
Mac OS X: /Users/username/Library/Application Support/Adobe/Dreamweaver 9/Configuration
Add a new line with
GSP:Groovy Server Pages and add the gsp extension to the first line. Restart Dreamweaver, which will now recognize the .gsp files and open them in the editor.
Next, add the following code to configuration/DocumentTypes/MMDocumentTypes.xml
<documenttype id="GSP" internaltype="Dynamic" winfileextension="gsp" macfileextension="gsp" file="Default.gsp" writebyteordermark="false">
<MMString:loadString id="mmdocumenttypes_70" />
<MMString:loadString id="mmdocumenttypes_71" />
Adjust the id values if necessary. In the folder NewDocuments create a Default.gsp file. Gsp files are not being shown as option in the new files dialog yet, so the Default file is not being used. If someone knows how to do this, please let me know.
It takes adobe a couple of pages to explain it all in detail: http://www.adobe.com/go/16410
Step 2: Add the gsp tag library
Download the GspTagLibrary for Dreamweaver, unpack it and copy the gsp folder to the TagLibraries folder within the configuration folder. Add the text of gspTagLibrary.vtm to the existing TagLibraries.vtm file.
Step 3: Enable code coloring
Next step could be to add a special color schema for gsp tags and groovy when using scriptlets and maybe one day I will have time to learn how to write Dreamweaver Extensions, which would hopefully make it possible to do all of this automatically.