incubator-adffaces-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeanne Waldman (JIRA)" <adffaces-iss...@incubator.apache.org>
Subject [jira] Commented: (ADFFACES-478) unknown agent yields ServletException
Date Tue, 01 May 2007 17:00:15 GMT

    [ https://issues.apache.org/jira/browse/ADFFACES-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492910
] 

Jeanne Waldman commented on ADFFACES-478:
-----------------------------------------

Date: Tue May  1 09:55:08 2007
New Revision: 534154

I submitted a change for this problem in Trunk. I need it in the latest 1.2 branch as well.

> unknown agent yields ServletException
> -------------------------------------
>
>                 Key: ADFFACES-478
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-478
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>    Affects Versions: 1.0.1-incubating-core-SNAPSHOT
>            Reporter: Jeanne Waldman
>         Assigned To: Jeanne Waldman
>             Fix For: 1.0.1-incubating-core-SNAPSHOT
>
>         Attachments: ADFFACES-478-unknown-agent.diff
>
>
> Set your browser to an unknown agent to test this.
> This can also be reproduced by using Mozilla:
> To spoof the user agent in Mozilla firefox:
> 1: open the advanced config settings (type about:config in the address bar)
> 2: add a property with key "general.useragent.override" and value an empty
>    string or anything you like
> 3: access any jspx demo page and you get this:
> javax.faces.FacesException: javax.servlet.ServletException
> 	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:429)
> 	at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:43)
> 	at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:258)
> 	at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
> 	at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:181)
> 	at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
> 	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:208)
> 	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:165)
> 	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
> 	at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
> 	at org.apache.myfaces.trinidaddemo.webapp.RedirectFilter.doFilter(RedirectFilter.java:97)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:652)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:401)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:880)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
> 	at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
> 	at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
> 	at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
> 	at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.servlet.ServletException
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:780)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:727)
> 	at _index_jspx._jspService(_index_jspx.java:295)
> 	[/index.jspx]
> 	at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)
> 	at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:662)
> 	at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:370)
> 	at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
> 	at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:744)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:401)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:323)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:50)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:230)
> 	at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
> 	at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:234)
> 	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
> 	... 27 more
> Debugging into it I found the problem really occurs at:
> CoreRenderer's
>   static public boolean isIE(RenderingContext arc)
>   {
>     return (arc.getAgent().getAgentName().equals(Agent.AGENT_IE));
>   }
> because the AgentName for an unknown agent is null.
> Agent's API says that getAgentName returns null for unknown agents.
>    * @return return the canonical name of the agent (browser application).
>    * Returns <code>null</code> if not available.
>    * <br>E.g. gecko, ie, opera, pocketie
>    */
>   public String getAgentName();
> And if I fix this, then there are other problems, like in TreeRenderer:
>     boolean isMacOS = rc.getAgent().getPlatformName().equals(Agent.PLATFORM_MACOS);
> We need a solution where if the agent is unknown, all the properties are unknown so we
don't get the null pointer exceptions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message