Posts
Showing posts with the label jsf
CASifying your web application
- Get link
- X
- Other Apps
CAS used for Single Sign On Download required jar files for CAS integration. Configuration in web.xml <!--CAS Integration--> <filter> <filter-name>CAS Authentication Filter</filter-name> <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class> <init-param> <param-name>casServerLoginUrl</param-name> <param-value>https://li419-10.members.linode.com:8443/cas/login</param-value> </init-param> <init-param> <param-name>serverName<...
Display Images From a Non-Project Directory in JSF
- Get link
- X
- Other Apps
<h:graphicImage value="/headerimage/?img=logo.jpg"/> Create Servlet : @WebServlet(name = "DynamicImageServlet", urlPatterns = "/headerimage/*"}) public class DynamicImageServlet extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try { //Get image file String img = request.getParameter("img"); BufferedInputStream in = new BufferedInputStream(new Fil...
Adding row data dynamically in datatable in JSF
- Get link
- X
- Other Apps
This code is useful when making order bill dynamically. default.xhtml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <h:head> <h:outputStylesheet library="css" name="table-style.css" /> </h:head> <h:body> <h:form> <h:dataTable value="#{order.orderList}" var="o" ...