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 72310 - web.xml is not updated
Summary: web.xml is not updated
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: DD Editor (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords: REGRESSION
Depends on:
Blocks: 82594
  Show dependency tree
 
Reported: 2006-02-06 16:29 UTC by Lukas Jungmann
Modified: 2006-09-13 09:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
cannot synchronize visual and xml editors (4.53 KB, text/plain)
2006-02-07 15:34 UTC, Pavel Buzek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2006-02-06 16:29:53 UTC
[200602052300 w/ ent_pack]

-have web project
-create new index.html in it
-open web.xml MV editor
-go to pages view
-put index.html into welcome files, close web.xml => Save file dialog will not
appear, anyway if you change view to xml you see modified welcome-file-list element
-build app
-open dist/webapp.war/WEB-INF/web.xml

=> new welcome-file is not updated

This is regression against 5.0 => P1
Comment 1 Pavel Buzek 2006-02-07 14:09:04 UTC
The problem is that the file is never saved. If you close it and open it again
in netbeans you see the modified contents (with index.jsp added in pages
section), but if you open it outside you see the original file. No error is
reported anywhere.
Comment 2 Petr Jiricka 2006-02-07 14:55:17 UTC
Pavle, can you please investigate? QE, does this happen also without the
enterprise pack? Do we know when this regression was introduced? Thanks.
Comment 3 Pavel Buzek 2006-02-07 15:33:39 UTC
Ok, after a short investigation I can reproduce in javaee5 build w/o any other
packs.
What I see is that when I first open web.xml (2_5) and change data in the pages
tab (or any other tab, actually!) the files is not marked as modified. After a
while (just changing things for a while, changing tabs, etc.) the file DOES get
modified. Occasionally while I am clicking around I get an exception from the
famous "XML Multiview Synchronization Framework".
Comment 4 Pavel Buzek 2006-02-07 15:34:57 UTC
Created attachment 28781 [details]
cannot synchronize visual and xml editors
Comment 5 Lukas Jungmann 2006-02-07 15:58:38 UTC
yes, it happens in standalone NB build (for 2_4 webapp too).
Comment 6 Petr Jiricka 2006-03-08 14:00:50 UTC
Could this be related to issue 72991 ?

Comment 7 Petr Jiricka 2006-03-09 10:31:58 UTC
Erno agreed to look at this.
Comment 8 Erno Mononen 2006-03-09 10:50:07 UTC
This seems to be the same problem that I had with persistence.xml, probably
caused by #73380.   
Comment 9 Erno Mononen 2006-03-09 12:46:05 UTC
Actually, this should be fixed in current build already since yesterday I 
registered web.xml (2.5) with xml navigator which invokes 
ClonableEditorSupport#openDocument (see http://www.netbeans.org/source/browse/
xml/text-edit/src/org/netbeans/modules/xml/text/resources/mf-layer.xml?
only_with_tag=release55). This is of course just a workaround for the actual 
problem, #73380, but should do for now. I'd rather not introduce any changes in 
xml multiview framework just before Q-build. 
Comment 10 Petr Jiricka 2006-03-09 15:32:47 UTC
Setting TM to 5.5.
Comment 11 Lukas Jungmann 2006-08-09 21:48:07 UTC
Erno, can you, please, double check this? Here's feedback from Michael Goodell:

"What I discovered is in fact the file access / modification time does not
get updated when it is edited in graphical mode. if you manually edit the
file in XML mode the time stamp gets updated and the new web.xml file is
included in the .war file."

I was not able to verify this in latest build because of issue 81719.
Comment 12 Erno Mononen 2006-08-14 09:48:17 UTC
I'm not able to reproduce this with the given steps with sources from today 
morning (I have a temporary workaround for issue 81719 on my local machine). 
What I tried was:

1. created a new wep app   
2. created index.html
3. opened MV editor
3. added index.html to welcome pages
4. closed editor tab (at this point I did get the confirmation dialog)
5. built project
6. checked dist/webapp.war/WEB-INF/web.xml => file is updated

Works for me.. 
Comment 13 Erno Mononen 2006-08-14 10:05:58 UTC
Regarding the time stamp thing, I can't reproduce that either - once I save the 
file, the time stamp gets updated regardless whether I modified the file in 
graphical or XML mode. Marking as incomplete for now.
Comment 14 Lukas Jungmann 2006-08-16 13:54:06 UTC
erno, how did you "add index.html to welcome pages"? Using "Browse" button?
If so, can you try to just rewrite the suffix in index.jsp to html manually and
then switch to eg. xml view, save file, build app and check
dist/webapp.war/WEB-INF/web.xml?
Comment 15 Erno Mononen 2006-08-16 14:54:30 UTC
I tried both ways, i.e. adding using browse action and changing suffix 
manually. I tested changing suffix manually once again now, but still can't 
reproduce.
Comment 16 Lukas Jungmann 2006-08-16 15:01:05 UTC
Neither me, so let's close this. Anyone is free to reopen this (w/ steps to
reproduce)
Comment 17 Jindrich Sedek 2006-09-13 09:56:22 UTC
Verified.