PrettyFaces in EAR Applications

Splash Forums PrettyFaces Users PrettyFaces in EAR Applications

Tagged: 

This topic contains 16 replies, has 2 voices, and was last updated by  rafaeltc 3 years, 11 months ago.

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #17732

    rafaeltc
    Participant

    Hello everyone,

    I have an EAR App that includes 2 web-applications and a EJB module. The pretty-faces is being used only in one of those applications which is newer. When I try to access the application which uses the pretty-faces, everything is ok. However, if I try to access the other web-app, i get a nullPointerException. I think it is because this app does not uses the pretty faces.

    My question is: can I use pretty-faces in only one of those applications? or i need to use it in both. If so, is there a way to configure the other app not to goes through the pretty filter?

    above is the stack trace:

    java.lang.NullPointerException

    at com.ocpsoft.pretty.PrettyContext.isPrettyRequest(PrettyContext.java:219)

    at com.ocpsoft.pretty.application.PrettyViewHandler.getActionURL(PrettyViewHandler.java:64)

    at com.sun.facelets.FaceletViewHandler.getActionURL(FaceletViewHandler.java:803)

    at org.ajax4jsf.application.ViewHandlerWrapper.getActionURL(ViewHandlerWrapper.java:86)

    at org.ajax4jsf.renderkit.RendererUtils.getActionUrl(RendererUtils.java:957)

    at org.ajax4jsf.renderkit.html.AjaxFormRenderer.encodeSubmitAction(AjaxFormRenderer.java:153)

    at org.ajax4jsf.renderkit.html.AjaxFormRenderer.doEncodeBegin(AjaxFormRenderer.java:139)

    at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:100)

    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)

    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)

    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)

    at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)

    at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)

    at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)

    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)

    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)

    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)

    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)

    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)

    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

    at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

    at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)

    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)

    at br.com.dynavideo.itvp.view.filter.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:69)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)

    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)

    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)

    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)

    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)

    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)

    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)

    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)

    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)

    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)

    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)

    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)

    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)

    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)

    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)

    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)

    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)

    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)

    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)

    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)

    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)

    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)

    #19858

    I assume you are using version 1.2.6 (I think I remember you posting on the list earlier.)

    Where are you bundling the prettyfaces.jar file? Is it in the EAR or in one of the WARs? If it’s in the EAR, I suggest moving it to the WAR, locally.

    It sounds like a bug in PrettyFaces, because it should not be throwing a nullpointer if there’s no configuration.

    As a temporary workaround, I’d suggest adding the PrettyFilter mapping to the other WARs, and possibly also add blank pretty-config.xml files if the filter mapping is not enough. That should ensure the nullpointer does not occur.

    Until then, could you submit at issue here?

    http://code.google.com/p/prettyfaces/issues/entry

    Thanks,

    Lincoln

    #19859

    rafaeltc
    Participant

    yeah, I am using 1.2.6, and the prety-faces.jar is located in the internal war file. I will do what you said and post the results here. Also, I will report it as an issue.

    #19860

    It also sounds like a potential web-container issue, because resources should not be leaking between WARs.

    #19861

    rafaeltc
    Participant

    yeah.. thats an option.. I am using GlassFish v2

    #19862

    rafaeltc
    Participant

    BTW, i put the pretty-faces.jar, the prett-config.xml, and the filter map into the other app war file to get it working.

    #19863

    Ok, good — I’ll try to get it fixed for you asap.

    #19864

    rafaeltc
    Participant

    Alright.. I was just saying I did what you said and it worked. I’ll keep it like that ’til there.

    Thanx

    #19865

    rafaeltc
    Participant

    Hey,

    does pretty-faces have something with prime-faces?

    I was looking to the error screen and found this:

    ajaxContext org.ajax4jsf.context.AjaxContextImpl@57d37013

    facesTraceData org.primefaces.facestrace.TraceData@7a631c70

    msg org.ajax4jsf.component.ResourceBundleMap@1785f0d

    prettyContext com.ocpsoft.pretty.PrettyContext@5a84f3c

    also, I was trying to access the application that does not use prettyFaces. I think prettyContext should not be there.

    #19866

    rafaeltc
    Participant

    those are Request Attributes

    #19867

    rafaeltc
    Participant

    Another question: do you think there is a problem with the filter-mapping url-pattern?

    I’ve set it to *

    It might be causing a problem. What should be the indicated pattern?

    #19868

    It bothers me that your configuration would be leaking between WARs in the EAR. ‘/*’ is the default pattern, but if that’s too general, you can try narrowing it down.

    I checked, and GlassFish is not supposed to leak classpath information.

    Could you send me an EAR that reproduces this? Should be pretty straightforward, but I want to make sure I get this right :) It’s still possible that it’s just a configuration issue, so I want to see what you did.

    #19869

    rafaeltc
    Participant

    I’ve created new (simple) projects, and did not get this problem.

    Now I’m sure it is a configuration issue. But I do not know what configuration setting is causing the problem.

    WEB.XML of the application that does not uses pretty-faces ===============

    <?xml version=”1.0″ encoding=”UTF-8″?>

    <web-app version=”2.5″ xmlns=”http://java.sun.com/xml/ns/javaee&#8221;

    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd“>

    <display-name>Application1</display-name>

    <context-param>

    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

    <param-value>.xhtml</param-value>

    </context-param>

    <context-param>

    <param-name>facelets.SKIP_COMMENTS</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>facelets.REFRESH_PERIOD</param-name>

    <param-value>2</param-value>

    </context-param>

    <context-param>

    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

    <param-value>server</param-value>

    </context-param>

    <context-param>

    <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>

    <param-value>80</param-value>

    </context-param>

    <context-param>

    <param-name>facelets.DEVELOPMENT</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>com.sun.faces.validateXml</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>com.sun.faces.verifyObjects</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>com.sun.faces.expressionFactory</param-name>

    <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>

    </context-param>

    <context-param>

    <param-name>org.richfaces.SKIN</param-name>

    <param-value>blueSky</param-value>

    </context-param>

    <context-param>

    <param-name>org.richfaces.CONTROL_SKINNING</param-name>

    <param-value>disable</param-value>

    </context-param>

    <context-param>

    <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>

    <param-value>enable</param-value>

    </context-param>

    <context-param>

    <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>

    <param-value>com.sun.facelets.FaceletViewHandler</param-value>

    </context-param>

    <filter>

    <display-name>RichFaces Filter</display-name>

    <filter-name>richfaces</filter-name>

    <filter-class>org.ajax4jsf.Filter</filter-class>

    <init-param>

    <param-name>createTempFiles</param-name>

    <param-value>true</param-value>

    </init-param>

    <init-param>

    <param-name>maxRequestSize</param-name>

    <param-value>1999999999</param-value>

    </init-param>

    </filter>

    <filter>

    <filter-name>ExtensionsFilter</filter-name>

    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>

    <init-param>

    <param-name>uploadMaxFileSize</param-name>

    <param-value>10m</param-value>

    </init-param>

    <init-param>

    <param-name>uploadThresholdSize</param-name>

    <param-value>100k</param-value>

    </init-param>

    </filter>

    <filter>

    <filter-name>SessionTimeoutFilter</filter-name>

    <filter-class>br.com.filter.SessionTimeoutFilter</filter-class>

    </filter>

    <!– Pretty Filter is here just because it asked for it –>

    <filter>

    <filter-name>Pretty Filter</filter-name>

    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>

    </filter>

    <filter-mapping>

    <filter-name>Pretty Filter</filter-name>

    <url-pattern>/*</url-pattern>

    <dispatcher>REQUEST</dispatcher>

    <dispatcher>FORWARD</dispatcher>

    <dispatcher>ERROR</dispatcher>

    </filter-mapping>

    <filter-mapping>

    <filter-name>richfaces</filter-name>

    <servlet-name>Faces Servlet</servlet-name>

    <dispatcher>REQUEST</dispatcher>

    <dispatcher>FORWARD</dispatcher>

    <dispatcher>INCLUDE</dispatcher>

    </filter-mapping>

    <filter-mapping>

    <filter-name>ExtensionsFilter</filter-name>

    <servlet-name>Faces Servlet</servlet-name>

    </filter-mapping>

    <filter-mapping>

    <filter-name>ExtensionsFilter</filter-name>

    <servlet-name>*.jsf</servlet-name>

    </filter-mapping>

    <filter-mapping>

    <filter-name>SessionTimeoutFilter</filter-name>

    <url-pattern>*.jsf</url-pattern>

    </filter-mapping>

    <listener>

    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>

    </listener>

    <listener>

    <listener-class>br.com.listener.ContextListener</listener-class>

    </listener>

    <listener>

    <listener-class>br.com.listener.SessionListener</listener-class>

    </listener>

    <servlet>

    <servlet-name>Faces Servlet</servlet-name>

    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

    </servlet>

    <servlet>

    <display-name>PlayerServlet</display-name>

    <servlet-name>PlayerServlet</servlet-name>

    <servlet-class>br.com.servlet.PlayerServlet</servlet-class>

    </servlet>

    <servlet>

    <display-name>FeedWriterServlet</display-name>

    <servlet-name>FeedWriterServlet</servlet-name>

    <servlet-class>br.com.servlet.FeedWriterServlet</servlet-class>

    </servlet>

    <servlet>

    <display-name>ThumbServlet</display-name>

    <servlet-name>ThumbServlet</servlet-name>

    <servlet-class>br.com.servlet.ThumbServlet</servlet-class>

    </servlet>

    <servlet>

    <display-name>ContentViewServlet</display-name>

    <servlet-name>ContentViewServlet</servlet-name>

    <servlet-class>br.com.servlet.ContentViewServlet</servlet-class>

    </servlet>

    <servlet>

    <display-name>HelpServlet</display-name>

    <servlet-name>HelpServlet</servlet-name>

    <servlet-class>br.com.HelpServlet</servlet-class>

    </servlet>

    <servlet>

    <display-name>DownloadServlet</display-name>

    <servlet-name>DownloadServlet</servlet-name>

    <servlet-class>br.com.servlet.DownloadServlet</servlet-class>

    </servlet>

    <servlet>

    <display-name>UploaderServlet</display-name>

    <servlet-name>UploaderServlet</servlet-name>

    <servlet-class>br.com.servlet.UploaderServlet</servlet-class>

    </servlet>

    <servlet>

    <servlet-name>UserService</servlet-name>

    <servlet-class>br.com.services.UserService</servlet-class>

    </servlet>

    <servlet>

    <servlet-name>DisplayUsers</servlet-name>

    <servlet-class>br.com.services.DisplayUsers</servlet-class>

    </servlet>

    <servlet>

    <servlet-name>ErroServlet</servlet-name>

    <servlet-class>br.com.servlet.ErroServlet</servlet-class>

    </servlet>

    <servlet>

    <display-name>multipleUploaderServlet</display-name>

    <servlet-name>multipleUploaderServlet</servlet-name>

    <servlet-class>br.com.servlet.MultipleUploaderServlet</servlet-class>

    </servlet>

    <servlet>

    <display-name>ExportServlet</display-name>

    <servlet-name>ExportServlet</servlet-name>

    <servlet-class>br.com.servlet.ExportServlet</servlet-class>

    </servlet>

    <servlet-mapping>

    <servlet-name>Faces Servlet</servlet-name>

    <url-pattern>*.jsf</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>PlayerServlet</servlet-name>

    <url-pattern>/player</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>FeedWriterServlet</servlet-name>

    <url-pattern>/feed</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>ThumbServlet</servlet-name>

    <url-pattern>/thumb</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>ContentViewServlet</servlet-name>

    <url-pattern>/content</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>DownloadServlet</servlet-name>

    <url-pattern>/download</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>UploaderServlet</servlet-name>

    <url-pattern>/UploaderServlet</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>HelpServlet</servlet-name>

    <url-pattern>/help</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>UserService</servlet-name>

    <url-pattern>/UserService/*</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>DisplayUsers</servlet-name>

    <url-pattern>/DisplayUsers/*</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>ErroServlet</servlet-name>

    <url-pattern>/erro</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>multipleUploaderServlet</servlet-name>

    <url-pattern>/multipleUploaderServlet</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>ExportServlet</servlet-name>

    <url-pattern>/export</url-pattern>

    </servlet-mapping>

    <session-config>

    <session-timeout>30</session-timeout>

    </session-config>

    <error-page>

    <exception-type>javax.faces.application.ViewExpiredException</exception-type>

    <location>/erro?cod=1</location>

    </error-page>

    <error-page>

    <error-code>500</error-code>

    <location>/erro?cod=500</location>

    </error-page>

    <error-page>

    <exception-type>java.lang.SecurityException</exception-type>

    <location>/login.jsf</location>

    </error-page>

    <error-page>

    <exception-type>br.com.accesscontrol.PermissionException</exception-type>

    <location>/erro?cod=2</location>

    </error-page>

    <error-page>

    <exception-type>java.lang.NullPointerException</exception-type>

    <location>/erro?cod=500</location>

    </error-page>

    <security-constraint>

    <web-resource-collection>

    <web-resource-name>Proteger Paginas XHTML</web-resource-name>

    <url-pattern>*.xhtml</url-pattern>

    <http-method>POST</http-method>

    </web-resource-collection>

    <auth-constraint>

    <role-name>developer</role-name>

    </auth-constraint>

    <user-data-constraint>

    <description>SSL required</description>

    <transport-guarantee>CONFIDENTIAL</transport-guarantee>

    </user-data-constraint>

    </security-constraint>

    <login-config>

    <auth-method>BASIC</auth-method>

    </login-config>

    <security-role>

    <role-name>developer</role-name>

    </security-role>

    </web-app>

    WEB.XML of the application which uses the pretty faces ==========

    <?xml version=”1.0″?>

    <web-app version=”2.5″ xmlns=”http://java.sun.com/xml/ns/javaee&#8221;

    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd“>

    <display-name>app2</display-name>

    <context-param>

    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

    <param-value>.xhtml</param-value>

    </context-param>

    <context-param>

    <param-name>org.richfaces.SKIN</param-name>

    <param-value>blueSky</param-value>

    </context-param>

    <context-param>

    <param-name>org.richfaces.CONTROL_SKINNING</param-name>

    <param-value>enable</param-value>

    </context-param>

    <context-param>

    <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>

    <param-value>true</param-value>

    </context-param>

    <context-param>

    <param-name>facelets.DEVELOPMENT</param-name>

    <param-value>true</param-value>

    </context-param>

    <filter>

    <display-name>Ajax4jsf Filter</display-name>

    <filter-name>ajax4jsf</filter-name>

    <filter-class>org.ajax4jsf.Filter</filter-class>

    <init-param>

    <param-name>createTempFiles</param-name>

    <param-value>true</param-value>

    </init-param>

    <init-param>

    <param-name>maxRequestSize</param-name>

    <param-value>2147483647</param-value>

    </init-param>

    </filter>

    <filter-mapping>

    <filter-name>ajax4jsf</filter-name>

    <servlet-name>Faces Servlet</servlet-name>

    <dispatcher>REQUEST</dispatcher>

    <dispatcher>FORWARD</dispatcher>

    <dispatcher>INCLUDE</dispatcher>

    <dispatcher>ERROR</dispatcher>

    </filter-mapping>

    <filter>

    <filter-name>Pretty Filter</filter-name>

    <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>

    </filter>

    <filter-mapping>

    <filter-name>Pretty Filter</filter-name>

    <url-pattern>/*</url-pattern>

    <dispatcher>REQUEST</dispatcher>

    <dispatcher>FORWARD</dispatcher>

    <dispatcher>ERROR</dispatcher>

    </filter-mapping>

    <listener>

    <listener-class>br.com.app2.listener.SessionListener</listener-class>

    </listener>

    <servlet>

    <servlet-name>Faces Servlet</servlet-name>

    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

    </servlet>

    <servlet-mapping>

    <servlet-name>Faces Servlet</servlet-name>

    <url-pattern>*.jsf</url-pattern>

    </servlet-mapping>

    <session-config>

    <session-timeout>30</session-timeout>

    </session-config>

    <welcome-file-list>

    <welcome-file>/</welcome-file>

    </welcome-file-list>

    <error-page>

    <error-code>404</error-code>

    <location>/404.jsf</location>

    </error-page>

    <security-constraint>

    <web-resource-collection>

    <web-resource-name>Proteger Paginas XHTML</web-resource-name>

    <url-pattern>*.xhtml</url-pattern>

    <http-method>POST</http-method>

    </web-resource-collection>

    <auth-constraint>

    <role-name>developer</role-name>

    </auth-constraint>

    <user-data-constraint>

    <description>SSL required</description>

    <transport-guarantee>CONFIDENTIAL</transport-guarantee>

    </user-data-constraint>

    </security-constraint>

    <login-config>

    <auth-method>BASIC</auth-method>

    </login-config>

    <security-role>

    <role-name>developer</role-name>

    </security-role>

    </web-app>

    #19870

    Interesting — It doesn’t look like there’s any configuration in web.xml that would cause this behavior. Do you have any other configuration files? Perhaps glassfish is configured to behave differently?

    What does your application.xml look like? <it’s the EAR descriptor.>

    #19871

    rafaeltc
    Participant

    application.xml is as below:

    <?xml version=”1.0″ encoding=”UTF-8″?>

    <application xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns=”http://java.sun.com/xml/ns/javaee&#8221; xmlns:application=”http://java.sun.com/xml/ns/javaee/application_5.xsd&#8221; xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd” id=”Application_ID” version=”5″>

    <display-name>EARTest</display-name>

    <module>

    <web>

    <web-uri>app1.war</web-uri>

    <context-root>app1</context-root>

    </web>

    </module>

    <module>

    <ejb>EJB.jar</ejb>

    </module>

    <module>

    <web>

    <web-uri>app2.war</web-uri>

    <context-root>app2</context-root>

    </web>

    </module>

    </application>

    there is also a sun-web.xml of the app1:

    <?xml version=”1.0″ encoding=”UTF-8″?>

    <!DOCTYPE sun-web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN” “http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd”&gt;

    <sun-web-app error-url=”">

    <context-root>/app1</context-root>

    <security-role-mapping>

    <role-name>developer</role-name>

    <principal-name>mainUser</principal-name>

    <group-name>admin</group-name>

    </security-role-mapping>

    <session-config>

    <session-manager persistence-type=”memory”>

    <manager-properties>

    <property name=”sessionFilename” value=”"/>

    </manager-properties>

    </session-manager>

    </session-config>

    <class-loader delegate=”true” />

    </sun-web-app>

    I’m not sure about how to configure glasfish behavior.

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.

Comments are closed.