Note: This blog has been abandoned, any future updates will be found here: https://phillipgreenii.github.io/primefaces-30-fileupload-component-on/
I was recently working on a project where I used JSF 2.0 and Primefaces 3.0 for an application deployed to Google App Engine (GAE). The particular problem was dealing with the fileUpload component. In the documentation for Primefaces, it describes the need to configure org.primefaces.webapp.filter.FileUploadFilter so that the multipart request will be handled correctly. Normally, JSF ignores them. The problem with FileUploadFilter is that it tries to write a temporary file which is not allowed on GAE. I got around this limit by creating my own filter based on FileUploadFilter.
Abandoned
Note: This blog has been abandoned, any future updates will be found here: https://phillipgreenii.github.io/
Tuesday, April 10, 2012
Tuesday, April 3, 2012
Specifying ProjectStage in JNDI with WebLogic
Note: This blog has been abandoned, any future updates will be found here: https://phillipgreenii.github.io/specifying-projectstage-in-jndi-with/
Starting in JSF 2.0 (JSR-314) a feature was added called ProjectStage. This is an attribute that signifies the stage where the project is running:
Starting in JSF 2.0 (JSR-314) a feature was added called ProjectStage. This is an attribute that signifies the stage where the project is running:
Development
, UnitTest
, SystemTest
, or Production
. The idea is that if the code knows where it is running, it can plan better. As an example, in a production environment certain optimizations could occur during startup that would cause better overal performance. However, these optimizations during start up is a problem during development because during development there is a lot more shutting down and starting up of the server.
There are two ways to specify the ProjectStage:
web.xml
and JNDI. The problem with using web.xml
is that you need to update or override it as you go move from one environment to the next. JNDI is configured on the application server, so it is the ideal place to configure ProjectStage.
In WebLogic (11g), you can not add custom resources to JNDI. So, out of the box, you can not specify ProjectStage in JNDI.
In a previous post, I described Weblogic JNDI Custom Resource Configuration, which is a project where I configure JNDI in WebLogic using Startup Classes.
Wednesday, March 28, 2012
WebLogic JNDI Custom Resource Configuration
Note: This blog has been abandoned, any future updates will be found here: https://phillipgreenii.github.io/specifying-projectstage-in-jndi-with/
I have been using WebLogic for a couple years now. While it is better than Oracle Application Server, it is missing some very important functionality. Today's complaint is the lacking of a way to add custom JNDI resources. This was discussed at stackoverflow: Custom resource in JNDI on different application servers. I am currently using Oracle WebLogic 10g (10.3.5), so my solution may not be relevant in future versions.
I have been using WebLogic for a couple years now. While it is better than Oracle Application Server, it is missing some very important functionality. Today's complaint is the lacking of a way to add custom JNDI resources. This was discussed at stackoverflow: Custom resource in JNDI on different application servers. I am currently using Oracle WebLogic 10g (10.3.5), so my solution may not be relevant in future versions.
Monday, March 5, 2012
Mapped Diagnostic Context (MDC) in Weblogic 10.3.5
Note: This blog has been abandoned, any future updates will be found here: https://phillipgreenii.github.io/mapped-diagnostic-context-mdc-in/
Problem: Mapped Diagnostic Context (MDC) values aren't available in Weblogic 10.3.5 Logs
I am developing a web application that is deployed on Weblogic 10.3.5 and I am using SLF4J for logging. I used the Mapped Diagnositc Context (MDC) feature of SLF4J to include the current user and the current remote IP for each log message.[2012-03-02 12:56:29,770] INFO ii.green.phillip.ImportantClass - IP[127.0.0.1] - UserName[pdgreen] - Info MessageI use a servlet filter to set the MDC values and everything worked just fine when I used log4j or logback as the SLF4J implementation. While the logs look fine with a file appender, they don't show up in the Weblogic logs when I use the console appender.
Subscribe to:
Posts (Atom)