Tag Archives: web.xml

Configurations in the web.xml file to maximize ADF Application Performance


Disable Automation

<context-param>
<param-name>oracle.adf.view.rich.automation.ENABLED</param-name>
<param-value>false</param-value>
</context-param>

Disable Assertion

<context-param>
<param-name>oracle.adf.view.rich.ASSERT_ENABLED</param-name>
<param-value>false</param-value>
</context-param>

Disable Javascript Profiler

<context-param>
<param-name>oracle.adf.view.rich.profiler.ENABLED</param-name>
<param-value>false</param-value>
</context-param>

Disable Debug Mode

<context-param>
<param-name>org.apache.myfaces.trinidad.resource.DEBUG</param-name>
<param-value>false</param-value>
</context-param>

Disable Javascript Debugging

<context-param>
<param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</param-name>
 <param-value>false</param-value>
</context-param>

Disable File Modification

<context-param>
<param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
<param-value>false</param-value>
</context-param>

Enable partitioning

<context-param>
<param-name>oracle.adf.view.rich.libraryPartitioning.DISABLED</param-name>
<param-value>false</param-value>
</context-param>

Enable compression

<context-param>
 <param-name>org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION</param-name>
 <param-value>false</param-value>
</context-param>

All are explained in the documentation.
http://docs.oracle.com/cd/E17904_01/core.1111/e10108/adf.htm#BDCBIJAB
Only web.xml related parameters are added here

Advertisements

Solving Java code in jsp source files is not allowed in ojsp.next mode


Java code in jsp source files is not allowed in ojsp.next mode

when I got this error searched over the net and found this link

http://fmwtips.wordpress.com/2011/05/22/error-java-code-in-jsp-source-files-is-not-allowed-in-ojsp-next-mode/

but this changes didn’t help me much. Finally removed all the entries from web.xml to resolve this.

oracle.mds.exception.MDSRuntimeException: MDS-00168


Target URL -- http://127.0.0.1:7101/[Application_Name]-[Project_Name]-context-root/faces/[page_name].jspx
<22-03-2010 09:57:51 AM CLT>    <[ServletContext@27112686[app:[Application_Name] module:[Application_Name]-[Project_Name]-context-root path:/[Application_Name]-[Project_Name]-context-root spec-version:2.5]] Servlet failed with Exception
oracle.mds.exception.MDSRuntimeException: MDS-00168: MDS object oracle.mds.core.MDSInstance@160bf69 is being used after it or its MDSInstance or PManager has been released.
at oracle.mds.core.MDSInstance.checkNotReleased(MDSInstance.java:1078)
at oracle.mds.core.MDSInstance.getPersistenceManager(MDSInstance.java:638)
at oracle.mds.core.MDSSession.getPersistenceManager(MDSSession.java:1992)
at oracle.mds.core.MDSSession.getBaseMO(MDSSession.java:2769)
at oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1188)
Truncated. see log file for complete stacktrace

The above mentioned error is due to a known issue for JDeveloper and ADF 11g.

This is related to the initialization of the ADFShare components in a web environment. the oracle.adf.share.http.ServletADFContext must be initialized per request. Normally, this is achieved because the jdev design time adds the ADFBindingFilter to the project web.xml when certain actions are taken

The ServletADFFilter must be used for correct use of ADFContext. ServletADFFilter specifically setup ServletADFContext properly at the start of the request.

<filter>
 <filter-name>ServletADFContextFilter</filter-name>
 <filter-class>oracle.adf.share.http.ServletADFFilter</filter-class>
 </filter>
 <filter-mapping>
 <filter-name>ServletADFContextFilter</filter-name>
 <url-pattern>/*</url-pattern>
 <dispatcher>REQUEST</dispatcher>
 <dispatcher>FORWARD</dispatcher>
 </filter-mapping>

oracle.jbo.InvalidObjNameException: JBO-25005


oracle.jbo.InvalidObjNameException: JBO-25005: Object name oracle_jbo_uicli_binding_JUIteratorBinding_281 of type Iterator Binding Definition is invalid.
 

the issue is with the filter order in the web.xml as explained in the bug 9880967

the correct order of the JspFilter and ApplSessionFilter in the web.xml is as follows

 <filter-mapping>
 <filter-name>JpsFilter</filter-name>
 <servlet-name>Faces Servlet</servlet-name>
 <dispatcher>FORWARD</dispatcher>
 <dispatcher>REQUEST</dispatcher>
 <dispatcher>INCLUDE</dispatcher>
 </filter-mapping>
 <filter-mapping>
 <filter-name>ApplSessionFilter</filter-name>
 <servlet-name>Faces Servlet</servlet-name>
 <dispatcher>FORWARD</dispatcher>
 <dispatcher>REQUEST</dispatcher>
 </filter-mapping>
 

closer look at the FacesServlet instance


This is always ignored as a default servlet that gets generated in the web.xml, but do we know the actual usage of this servlet?

All the JSF applications should include a mapping to this servlet in the deployment Descriptor. The usage of this servlet is that it

  • accepts all the incoming request
  • passes them to the lifecycle for processing
  • intializes the resources

it is usually defined in the web.xml file as

<servlet>
 <display-name>FacesServlet</display-name>
 <servlet-name>FacesServlet</servlet-name>
 <servlet-class>javax.faces.webapp.FacesServlet
 </servlet-class>
 <load-on-startup>1</load-on-startup>
 </servlet>

with corresponding mapping as well

<servlet-mapping>
 <servlet-name>FacesServlet</servlet-name>
 <url-pattern>/faces/*</url-pattern>
 </servlet-mapping>

the servlet includes servlet lifecycle methods to initialize and process the request

init(ServletConfig)FacesContextFactory,LifeCycleFactory is identified and the lifeCycle reference is obtained with the default lifecycle id
service()the pathInfo is manipulated from WEB-INF and META-INF folder from the request, FacesContext is obtained, lifecycle is executed and rendered, later the context is released
destroy()all the instances are destroyed.. technically speaking nullified