KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > project > ant > JspC


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.web.project.ant;
21
22 import java.io.File JavaDoc;
23 import java.io.IOException JavaDoc;
24 import java.io.PrintWriter JavaDoc;
25 import java.util.LinkedList JavaDoc;
26 import java.util.StringTokenizer JavaDoc;
27 import java.util.ArrayList JavaDoc;
28 import org.apache.jasper.JasperException;
29 import org.apache.jasper.compiler.Localizer;
30
31 /**
32  * Ant task that extends org.apache.jasper.JspC and dumps smap for easier error reporting.
33  *
34  * @author Petr Jiricka
35  */

36 public class JspC extends org.apache.jasper.JspC {
37
38     public static void main(String JavaDoc arg[]) {
39         if (arg.length == 0) {
40            System.out.println(Localizer.getMessage("jspc.usage"));
41         } else {
42             try {
43                 JspC jspc = new JspC();
44                 jspc.setArgs(arg);
45                 jspc.execute();
46             } catch (JasperException je) {
47                 System.err.println(je);
48                 //System.err.println(je.getMessage());
49
System.exit(1);
50             }
51         }
52     }
53     
54     public boolean isSmapSuppressed(){
55         return false;
56     }
57
58     public boolean isSmapDumped(){
59         return true;
60     }
61     
62     public boolean getMappedFile() {
63         return true;
64     }
65     
66 }
67
Popular Tags