java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config As the package name hints, the mentioned class is part of JSTL. The exception is clearly telling that the class definition file of the mentioned class cannot be found in the runtime classpath. I.e. the Config.class file or at least the JAR file containing that class is missing in webapp’s runtime classpath. JSTL … Read more

How to upload file using JSF 2.2 ? Where is the saved File?

JSF won’t save the file in any predefined location. It will basically just offer you the uploaded file in flavor of a javax.servlet.http.Part instance which is behind the scenes temporarily stored in server’s memory and/or temporary disk storage location which you shouldn’t worry about. Important is that you need to read the Part as soon … Read more

Trying to understand immediate=”true” skipping inputs when it shouldn’t

With immediate=”true” on the button, the action is indeed invoked during apply request values phase and all the remaining phases are skipped. That’s also the sole point of this attribute: process (decode, validate, update and invoke) the component immediately during apply request values phase. All inputs which do not have immediate=”true” are ignored anyway. Only … Read more

JSF implementations and component libraries [closed]

What is the difference between JSF Implementations and Component Libraries? JSF implementations implement the JSF API Specification. They contains at least the standard components to display any of the available basic (“plain vanilla”) HTML elements. JSF component libraries just adds that extra on top of the basic implementation, often with more skinnability, ajaxability, enhanceability, etcetera, … Read more

Obtaining Facelets templates/files from an external filesystem or database

If you’re already on JSF 2.2, you can do this by providing a custom ResourceHandler wherein you return the desired view resource in createViewResource(). public class FaceletsResourceHandler extends ResourceHandlerWrapper { private ResourceHandler wrapped; public FaceletsResourceHandler(ResourceHandler wrapped) { this.wrapped = wrapped; } @Override public ViewResource createViewResource(FacesContext context, final String name) { ViewResource resource = super.createViewResource(context, name); … Read more

How to show details of current row from p:dataTable in a p:dialog and update after save

The button should be an ajax button which sets the currently iterated entity in the bean, and then updates the dialog’s content, and finally shows it. The dialog should just reference that entity in the bean and update the list and table on save. It’s very important that dialog is placed outside the main form … Read more

Unicode input retrieved via PrimeFaces input components become corrupted

Introduction Normally, JSF/Facelets will set the request parameter character encoding to UTF-8 by default already when the view is created/restored. But if any request parameter is been requested before the view is been created/restored, then it’s too late to set the proper character encoding. The request parameters will namely be parsed only once. PrimeFaces encoding … Read more