0

I am trying to setup security in my web application and following this tutorial

Under section "Configuring Server Deployment Descriptors"

when I following following instructions.

  1. In the Projects window, expand the project's Configuration Files node and double-click glassfish-web.xml. The glassfish-web.xml deployment descriptor opens in a special tabbed editor for GlassFish deployment descriptors.

  2. Select the Security tabto reveal the security roles.

enter image description here

When I double click, I only see xml file source instead GUI version as above. my glassfish-web.xml file looks like this.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD 
GlassFish Application Server 3.1 Servlet 3.0//EN" 
"http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
    <session-config>
        <session-manager/>
    </session-config>
    <resource-ref>
        <res-ref-name>mail/Session</res-ref-name>
        <jndi-name>mail/Session</jndi-name>
    </resource-ref>
    <jsp-config/>
</glassfish-web-app>

What should I change in my glassfish-web.xml file to get GUI version?

NOTE: My web.xml file is showing the GUI tabs fine. Its only glassfish-web.xml is not showing GUI tabs.

Developer
  • 25,073
  • 20
  • 81
  • 128

2 Answers2

0

Delete the glassfish-web.xml file and create it again using the netbean wizard by following below instructions and it will work.

Create it by right-clicking the project's node and 
going to New > Other > GlassFish > GlassFish Deployment Descriptor. 
Accept all the defaults. 

Reference

Developer
  • 25,073
  • 20
  • 81
  • 128
0

I don't know if you are using a stable build of Netbeans. The issue is that a the XML GUI Navigator is damaged or not installed or disabled on your Netbeans.

You have two solutions for this issue:

  1. The recommended : Try to totally remove Netbeans (don't forget to delete the hidden folders in your user account like .netbeans .nbi on MAC OSx & Linux, .nbi only for windows) and install the latest JDK and the latest Netbeans.
  2. You can delete and reinstall these plugins from your Netbeans:

    • Glassfish Server 3 - Common
    • IDE Platform
    • Java EE Base

I recommend the first solution, because we are not sure which component got crashed.

Jason Bourne
  • 756
  • 1
  • 14
  • 34