KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > jforum > view > forum > JSAction


1 /*
2  * Created on 27/06/2005 00:20:38
3  */

4 package net.jforum.view.forum;
5
6 import net.jforum.Command;
7 import net.jforum.JForumExecutionContext;
8 /**
9  * Loads and parse javascript files with FTL statements.
10  *
11  * @author Rafael Steil
12  * @version $Id: JSAction.java,v 1.4 2006/01/29 15:06:56 rafaelsteil Exp $
13  */

14 public class JSAction extends Command
15 {
16     /**
17      * Loads and parses a javascript file.
18      * The filename should be into the "js" directory and should
19      * have the extension ".js".
20      * @see net.jforum.Command#list()
21      */

22     public void list() throws Exception JavaDoc
23     {
24         JForumExecutionContext.setContentType("text/javascript");
25         
26         String JavaDoc filename = this.request.getParameter("js");
27         
28         this.templateName = "js/" + filename + ".js";
29     }
30 }
31
Popular Tags