[nbj2ee] No autocomplete or syntax checking in JSPs in web fragment project

  • From: "twinfeats" < >
  • To:
  • Subject: [nbj2ee] No autocomplete or syntax checking in JSPs in web fragment project
  • Date: Mon, 01 Oct 2012 21:14:31 -0400

I've come up with a temporary workaround, but hopefully someone can come up 
with a better solution. What I've done is to create a normal web project for 
my web fragment development and coupled that with a custom ant build script 
to build the jar file that my real web project can reference. Here is the 
build script, feel free to modify this for your use if you're stuck like I 
am. Notice also that this copies the web.xml to web-fragment.xml and then 
modifies it to make it valid. Also review what sorts of files this is pulling 
from the web project to build into the jar, you might need to make 
adjustments:


<?xml version="1.0" encoding="UTF-8"?>
<project name="TwinFeats CMS Web" default="all" basedir=".">
        <target name="-post-dist">
                <copy file="src/conf/persistence.xml" 
tofile="build/web/WEB-INF/classes/META-INF/persistence.xml"/>
                <copy file="web/WEB-INF/web.xml" 
tofile="build/web/WEB-INF/classes/META-INF/web-fragment.xml"/>
                <replace 
file="build/web/WEB-INF/classes/META-INF/web-fragment.xml">
                        <replacefilter>
                                <replacetoken>web-app </replacetoken>
                                <replacevalue>web-fragment </replacevalue>
                        </replacefilter>
                        <replacefilter>
                                <replacetoken>/web-app</replacetoken>
                                <replacevalue>/web-fragment</replacevalue>
                        </replacefilter>
                        <replacefilter>
                                
<replacetoken>http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd</replacetoken>
                                
<replacevalue>http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd</replacevalue>
                        </replacefilter>
                </replace>
                <copy todir="build/web/WEB-INF/classes/META-INF/resources">
                        <fileset dir="web">
                                <include name="**/*.jsp"/>
                                <include name="**/*.js"/>
                                <include name="**/*.css"/>
                                <include name="**/*.jpg"/>
                                <include name="**/*.gif"/>
                                <include name="**/*.png"/>
                        </fileset>
                </copy>
                <jar jarfile="dist/TwinFeats_CMS.jar" 
basedir="build/web/WEB-INF/classes" compress="false">
                        <include name="**/*.class"/>    
                        <include name="**/*.jsp"/>    
                        <include name="**/*.css"/>    
                        <include name="**/*.jpg"/>    
                        <include name="**/*.gif"/>
                        <include name="**/*.png"/>
                        <include name="**/*.xml"/>
                </jar>
        </target>
</project>






[nbj2ee] No autocomplete or syntax checking in JSPs in web fragment project

twinfeats 10/01/2012

[nbj2ee] No autocomplete or syntax checking in JSPs in web fragment project

twinfeats 10/02/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close