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 236293 - old version of HTML file deployed
Summary: old version of HTML file deployed
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Project (show other bugs)
Version: 7.4
Hardware: All All
: P1 normal (vote)
Assignee: David Konecny
URL:
Keywords: 7.4_HR_FIX
Depends on:
Blocks:
 
Reported: 2013-09-23 20:04 UTC by John Jullion-ceccarelli
Modified: 2013-09-26 11:31 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Jullion-ceccarelli 2013-09-23 20:04:11 UTC
I have two versions of the KnowYourStars project, one which is the beginning state and one which is the finished state. If I open one, run the index.html, then open the other and run the index.html, it just keeps opening the index.html from the first project, not the second one. Closing Chrome doesn't help, only restarting NB.
Comment 1 David Konecny 2013-09-23 20:12:05 UTC
I will look into that now. Short term workaround could be to change web context root under which your second version deploys. eg. localhost/KnowYourStars versus localhost/KnowYourStars2
Comment 2 David Konecny 2013-09-23 21:46:55 UTC
Fixed and tests added: 9572d406d81b

The problem was that each project deployment is recorded as a pair of information [Project Site Folder, Web Content URL]. In John's case the result is something like:
  [/some/path/KnowYourStarsOLD, localhost/stars]
  [/some/path/KnowYourStarsNEW, localhost/stars]

And when WebServer is asked to serve localhost/stars/index.html it does not know which project to pick and it picks the last pair. Redeploying first project has no impact on the list and hence files from second project are always served.

The fix I implemented is that Web Content URLs must be unique and no two records pointing to the same Web Content URL can exist at the same time. The fix is safe and verified by unit tests.
Comment 3 David Konecny 2013-09-23 21:53:34 UTC
Tomas, could you review please? Thanks.
Comment 4 Tomas Mysik 2013-09-24 05:09:56 UTC
I have reviewed [1] and it does what David wrote.

Thanks.
[1] http://hg.netbeans.org/web-main/rev/9572d406d81b
Comment 5 Vladimir Riha 2013-09-24 13:17:44 UTC
Verified in web-main build, proper project's file is opened even when 2 projects have same name and same web root


Product Version: NetBeans IDE Dev (Build web-main-11665-on-20130924)
Java: 1.8.0-ea; Java HotSpot(TM) Client VM 25.0-b50
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b108
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 6 David Konecny 2013-09-24 20:06:56 UTC
Transplanted into release74 as 5378f681814e
Comment 7 Quality Engineering 2013-09-26 00:00:26 UTC
Integrated into 'releases/release74', will be available in build *201309252201* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/5378f681814e
User: David Konecny <dkonecny@netbeans.org>
Log: #236293 - old version of HTML file deployed
(transplanted from 9572d406d81bef40625964c029c1ee68d89d369f)
Comment 8 Vladimir Riha 2013-09-26 11:31:57 UTC
Verified

Product Version: NetBeans IDE 7.4 RC2 (Build 201309252201)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b13
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)