users@glassfish.java.net

RE: Not able to compile JSPS with Galssfish v3.1.2.4

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Sat, 23 Feb 2013 20:58:42 -0500

if your servlet-spec is 3.0 you would need to locate a JSP 2.2 JspC compiler..you can acquire the jar from here

http://grepcode.com/snapshot/repo1.maven.org/maven2/org.glassfish.web/jsp-impl/2.2.1/

or you can use a mavenized I am attaching a mavenized jspc compiler the charateristics
<build>
<plugins>
<plugin>
 <groupId>org.glassfish.web</groupId>
 <artifactId>jsp-impl</artifactId>
 <version>2.2</version>
 <configuration>
  <args>PlaceAllYourJSPCArgumentsHere</args>
 </configuration>
</plugin>
</plugins>
</build>

there is only one goal for the plugin called compile to call invoke maven with these command line parameters

mvn org.glassfish.web:jsp-impl:2.2:compile -Dargs=package="my.package";uriroot="${webapps.dir}/${webapp.name}";webXmlFragment="${build.dir}/generated_web.xml"
;outputDir="${webapp.dir}/${webapp.name}/WEB-INF/src/my/package"

Partial List of args:
  private static final String SWITCH_VERBOSE = "-v";
    private static final String SWITCH_HELP = "-help";
    private static final String SWITCH_QUIET = "-q";
    private static final String SWITCH_OUTPUT_DIR = "-d";
    private static final String SWITCH_IE_CLASS_ID = "-ieplugin";
    private static final String SWITCH_PACKAGE_NAME = "-p";
    private static final String SWITCH_CLASS_NAME = "-c";
    private static final String SWITCH_FULL_STOP = "--";
    private static final String SWITCH_COMPILE = "-compile";
    private static final String SWITCH_SOURCE = "-compilerSourceVM";
    private static final String SWITCH_TARGET = "-compilerTargetVM";
    private static final String SWITCH_URI_BASE = "-uribase";
    private static final String SWITCH_URI_ROOT = "-uriroot";
    private static final String SWITCH_FILE_WEBAPP = "-webapp";
    private static final String SWITCH_WEBAPP_INC = "-webinc";
    private static final String SWITCH_WEBAPP_XML = "-webxml";
    private static final String SWITCH_MAPPED = "-mapped";
    private static final String SWITCH_XPOWERED_BY = "-xpoweredBy";
    private static final String SWITCH_TRIM_SPACES = "-trimSpaces";
    private static final String SWITCH_CLASSPATH = "-classpath";
    private static final String SWITCH_SYSCLASSPATH = "-sysClasspath";
    private static final String SWITCH_DIE = "-die";
    private static final String SWITCH_SMAP = "-smap";
    private static final String SWITCH_DUMP_SMAP = "-dumpsmap";
    // START PWC 6386258
    private static final String SWITCH_SCHEMAS_PREFIX = "-schemas";
    private static final String SWITCH_DTDS_PREFIX = "-dtds";
    // END PWC 6386258
    // START IASRI 4660687
    private static final String SWITCH_GENERATE_CLASSES = "-genclass";
    // END IASRI 4660687
    // START PWC 6385018
    private static final String SWITCH_VALIDATE = "-validate";
    // END PWC 6385018
    // START SJSAS 6393940
    private static final String SWITCH_IGNORE_JSP_FRAGMENTS
        = "-ignoreJspFragmentErrors";
    // END SJSAS 6393940
    private static final String SWITCH_DISABLE_POOLING = "-disablePooling";
    private static final String SHOW_SUCCESS ="-s";
    private static final String LIST_ERRORS = "-l";

supported JDKs
    private static final String JAVA_1_0 = "1.0";
    private static final String JAVA_1_1 = "1.1";
    private static final String JAVA_1_2 = "1.2";
    private static final String JAVA_1_3 = "1.3";
    private static final String JAVA_1_4 = "1.4";
    private static final String JAVA_1_5 = "1.5";
    private static final String JAVA_1_6 = "1.6";
    private static final String JAVA_5 = "5";
    private static final String JAVA_6 = "6";

Martin Gainty
______________________________________________
do not alter or disrupt this transmission.

----------------------------------------
> To: users_at_glassfish.java.net
> Subject: Re: Not able to compile JSPS with Galssfish v3.1.2.4
> From: forums_at_java.net
> Date: Fri, 22 Feb 2013 12:16:32 -0600
>
> Glassfish 3.1.2.4? Where did you get that?
>
> --
>
> [Message sent by forum member 'kovica']
>
> View Post: http://forums.java.net/node/894760
>
>