Skip to main content

changing web.xml gives null pointer exception

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
abubakargurnah
Offline
Joined: 2011-06-07

Hi Good Team,

i have a problem, when i change my web descriptor (web.xml) in glassfish I get an error;

[#|2011-10-28T18:32:39.031+0300|SEVERE|glassfish3.1|javax.enterprise.resource.webcontainer.jsf.application|_ThreadID=121;_ThreadName=Thread-1;|Error Rendering View[/index.xhtml]
javax.el.ELException: /index.xhtml @14,66 value="#{userManager.user}": java.lang.NullPointerException

and

[#|2011-10-28T18:32:39.031+0300|WARNING|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=121;_ThreadName=Thread-1;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException

This is my part of web.xml

<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
<error-page>
<error-code>403</error-code>
<location>/ErrorPages/Page_403.xhtml</location>
</error-page>
<security-constraint>
<display-name>AdminConstraint</display-name>
<web-resource-collection>
<web-resource-name>resCon1</web-resource-name>
<description>Administrator Access</description>
<url-pattern>/customer/*</url-pattern> <---- This is the error part, if I change it to /* it work fine...
</web-resource-collection>
<auth-constraint>
<description>protected areas</description>
<role-name>ADMIN</role-name>
</auth-constraint>
</security-constraint>

Please help me

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
abubakargurnah
Offline
Joined: 2011-06-07

on more thing,

I have a folder like this

|-Web pages
|--WEB-INF
|--customer

what i want to do is secure the customer folder only for administrator access