k3ati

Untitled

Mar 9th, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. file index.xhtml:
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml"
  6. xmlns:ui="http://java.sun.com/jsf/facelets"
  7. xmlns:ui="http://java.sun.com/jsf/html"
  8. xmlns:ui="http://java.sun.com/jsp/jstl/core"
  9. xmlns:ui="http://java.sun.com/jsf/core"
  10. xmlns:p="http://primefaces.org/ui"
  11. xmlns:h="http://java.sun.com/jsf/html"
  12. xmlns:f="http://java.sun.com/jsf/core">
  13.  
  14. <p:inputText value="Ola Mundo"/>
  15. </html>
  16.  
  17.  
  18. file web.xml:
  19.  
  20. <?xml version="1.0" encoding="UTF-8"?>
  21. <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  22. xmlns="http://java.sun.com/xml/ns/javaee"
  23. xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  24. xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  25. http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  26. id="WebApp_ID" version="2.5">
  27.  
  28. <display-name>MyFaces</display-name>
  29.  
  30. <!-- Change to "Production" when you are ready to deploy -->
  31. <context-param>
  32. <param-name>javax.faces.PROJECT_STAGE</param-name>
  33. <param-value>Development</param-value>
  34. </context-param>
  35.  
  36. <!-- Welcome page -->
  37. <welcome-file-list>
  38. <welcome-file>faces/hello.xhtml</welcome-file>
  39. </welcome-file-list>
  40.  
  41. <!-- JSF mapping -->
  42. <servlet>
  43. <servlet-name>Faces Servlet</servlet-name>
  44. <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  45. <load-on-startup>1</load-on-startup>
  46. </servlet>
  47.  
  48. <!-- Map these files with JSF -->
  49. <servlet-mapping>
  50. <servlet-name>Faces Servlet</servlet-name>
  51. <url-pattern>/faces/*</url-pattern>
  52. </servlet-mapping>
  53. <servlet-mapping>
  54. <servlet-name>Faces Servlet</servlet-name>
  55. <url-pattern>*.jsf</url-pattern>
  56. </servlet-mapping>
  57. <servlet-mapping>
  58. <servlet-name>Faces Servlet</servlet-name>
  59. <url-pattern>*.faces</url-pattern>
  60. </servlet-mapping>
  61. <servlet-mapping>
  62. <servlet-name>Faces Servlet</servlet-name>
  63. <url-pattern>*.xhtml</url-pattern>
  64. </servlet-mapping>
  65.  
  66. </web-app>
Advertisement
Add Comment
Please, Sign In to add comment