This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 125110 - On build, redeploy updated jsp files of a WAR modules contained in the EAR project
Summary: On build, redeploy updated jsp files of a WAR modules contained in the EAR pr...
Status: RESOLVED INVALID
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-11 13:15 UTC by fragou
Modified: 2019-03-05 22:54 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fragou 2008-01-11 13:15:44 UTC
When you work with a WAR project, if you deploy the application on the server and then change a jsp file, save and
build, you can instantly see the results by reloading the page in the browser. The servlet container sees that the file
has changed and recompiles it.
If you add a WAR project as a module to an EAR project and then deploy the EAR, you don't get the same functionality,
because the WAR is deployed under the /dist directory of the EAR. If you edit a jsp file of the WAR, you have to
Undeploy and Deploy the EAR to see the changes, and this is time consuming and annoying when all you want is to check
the results of minor code changes.

I found a workaround for this issue, but it would be nice to have this be done automatically by NetBeans.

Here is what I've done:
Added the following target to the EAR's build.xml ant file:

    <target name="post-dist">        
        <exec dir=".\" executable="cmd">
            <arg value="/c"/>
            <arg value="copy_jsps.bat"/>
        </exec>
    </target>

The contents of the copy_jsps.bat batch file(located in the same directory with build.xml) :

    @echo off
    echo Copying JSP Files...
    cd WAR_PROJECT_NAME\build
    xcopy web\*.jsp ..\..\dist\gfdeploy\WAR_PROJECT_NAME_war\ /s /y /i

Where 'WAR_PROJECT_NAME' is the name of my WAR project(located inside the directory of the EAR project). I guess 'gf'
in 'gfdeploy' stands for "glassfish" so this batch will work only when you deploy the EAR on glassfish - and of course
it will only run on a Windows OS :)
Comment 1 Martin Balin 2016-07-07 08:54:33 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 2 ferolz 2019-03-05 22:54:05 UTC
Please see your file context.xml it must look like 

<Context antiResourceLocking="false" path=...>




And see  the link 

http://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Standard_Implementation


Please note that setting this to true has some side effects, including the disabling of JSP reloading in a running server