Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate sun-web.xml for a Java Web Application using NetBeans?

The title says it all.
Is there any plugin for NetBeans 7.0 to generate sun-web.xml in a web project?

If yes, please let me know.

like image 558
Jobless Programmer Avatar asked Apr 06 '26 02:04

Jobless Programmer


1 Answers

Yo do not need to install any plugin:

  1. Go to File > New Files > XML > XML Document from menu.
  2. In the first wizard form enter "sun-xml" as file name.
  3. In Document Type wizard form select DTD-Constrained Document radio button
  4. in the DTD Options wizard enter following information:

    DTD Public ID: -//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Servlet//EN

    DTD System ID: http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd

    Document Root: sun-web-app

  5. Finally click on the finish button.

You have to know that glassfish-web.xml is the new name for sun-web.xml and for GlassFish server versions older than 3.1, this file is called sun-web.xml. You can create glassfish-web.xml using:

File > New Files > GlassFish > GlassFish Descriptor
like image 129
Saeed Zarinfam Avatar answered Apr 08 '26 15:04

Saeed Zarinfam