[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] RE: Compiling JSP

From: Sprenger, Karel
Subject: [h-e-w] RE: Compiling JSP
Date: Mon, 9 Dec 2002 13:18:34 +0100


Initially I thought something along the following lines would do the trick:

(defun my-jsp-mode-stuff()
  (unless (local-variable-p 'compile-command)
    (if (string= (file-name-extension buffer-file-name) "jsp")
        (set (make-local-variable 'compile-command)
             (concat "java"
                     " "
                     " "
                     (if (getenv "CLASSPATH")
                         (concat (getenv "CLASSPATH") ";")
                     (file-name-directory buffer-file-name)
                     " "
                     " "
                     (file-name-nondirectory buffer-file-name))))))
(add-hook 'html-helper-mode-hook 'my-jsp-mode-stuff)

But... I'm using mmm-mode to automatically switch from jsp-html-helper-mode to 
JDE mode when inside the Java parts of a JSP file.  In that case, 
my-jsp-mode-stuff gets called twice, first normally through the code handling 
auto-mode-alist and then from inside mmm-mode. On the second invocation 
buffer-file-name returns nil and the whole scheme collapses.  I can't figure 
out how to tackle this problem (major-mode isn't set either).

Any help would be much appreciated.  Also what I really would like to have here 
is access to JDE's classpath variables.


-----Original Message-----
From: Glen Cordrey [mailto:address@hidden
Sent: Friday, December 06, 2002 21:43
To: JDE (E-mail)
Subject: Compiling JSP

Is there a way, using html-helper-mode with mmm mode configured for JDE 
support, to compile a jsp?
First I'm assuming I'd need to identify a JSP compiler to use, and I don't see 
a way to do so I suspect
the capability doesn't exist. If it does could someone point me to it, and if 
not has anyone written any
elisp to do this?

As a fallback I'm going to try using the ant jspc target, but then I'll have to 
include my target in each build.xml
I create.

Glen Cordrey                  Convera              
voice: (410) 740-8800 x1150
fax:    (410) 740-8810

reply via email to

[Prev in Thread] Current Thread [Next in Thread]