Eclipse takes long time to save web.xml

Viewed 6426

Well, I'm using Eclipse to build a dynamic web project(in Mac OS X). But there is something confused for me. When I start Eclipse and click the project explorer to expend the project folder, it takes long time to finish it. What's more, when I change the web.xml, it takes for at least 5 seconds to save it. I want to know why. Should I change something in the preference?


p.s

I just found that.If I restart Eclipse and don't click the project explorer, it would be fine to modify and save the web.xml. But if I click to open the folders in the project explorer, it will take a long time to say the changes in web.xml now. So why?


p.s again

Well, I just meet with this problem again. I'm using Ubuntu 11.04 with 4GB RAM. There are some other project similar but with lots of files. But it doesn't happen when I edit their web.xml . I'm confused again now.

I just find out that it maybe be related to the xml validation with remote DTD. If I close the net connection, everything will be ok.


Done!

I change xsi:schemaLocation's attr from "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" to "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd".

6 Answers

change the xsi:schemaLocation in the web.xml file as follow.

Open web.xml You will find it in

 2nd line of web.xml file: web-app xmlns:...

In that change the xsi:schemaLocation as

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"

Now save it. Do your work

Open eclipse.ini in your eclipse installation folder increase in -Xms and -Xmx

for my self : -Xms1024m -Xmx4096m

this worked for me

For me it seemed a bit silly but when applying the change as mentioned in another thread this solved the issue with Eclipse locking up for me. Just put a ';' between the two urls (2021.05.09).

https://stackoverflow.com/a/46161667

Related