Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Saving changes made to web.xml via
Saving changes made to web.xml via [message #308381] Thu, 21 September 2006 08:22
Eclipse UserFriend
Originally posted by: mlh.kapowtech.com

I am developing a WebApplication Facet, and is trying to register a
servlet in the web.xml of the project. I am not sure if I do this
correct, because I seem to loose the changes made to web.xml. First time
I dont see any changes. If I have web.xml open in the editor, I dont see
the changes, but the file is left unsaved.

How do I make sure my changes to WebApp is saved into web.xml?

My code looks like this...


WebArtifactEdit edit = WebArtifactEdit.getWebArtifactForRead(project);
WebApp root = edit.getWebApp();

WebapplicationFactory appFactory = WebapplicationFactory.eINSTANCE;
Servlet servlet = appFactory.createServlet();
ServletType servletType = appFactory.createServletType();
servletType.setClassName(servletClass);
servlet.setWebType(servletType);
servlet.setServletName(servletName);
root.getServlets().add(servlet);

project.refreshLocal(IProject.DEPTH_INFINITE, monitor);


any help is helpful :-)

Mads
Previous Topic:Excluding files from search
Next Topic:Adding ComboBox to toolbar via 3.2 menu trim?
Goto Forum:
  


Current Time: Thu May 08 23:09:09 EDT 2025

Powered by FUDForum. Page generated in 0.02976 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top