Hi, Initially I thought something along the following lines would do the trick:
-----8<----- (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" " " "-cp" " " (if (getenv "CLASSPATH") (concat (getenv "CLASSPATH") ";") "") (file-name-directory buffer-file-name) " " "weblogic.jspc" " " (file-name-nondirectory buffer-file-name)))))) (add-hook 'html-helper-mode-hook 'my-jsp-mode-stuff) -----8<----- 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. Cheers, Karel -----Original Message----- From: Glen Cordrey [mailto:[EMAIL PROTECTED]] 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 www.convera.com fax: (410) 740-8810