myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "MigrateFromJspToFacelets" by PalmerEldritch
Date Tue, 16 Apr 2013 15:03:59 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The "MigrateFromJspToFacelets" page has been changed by PalmerEldritch:
http://wiki.apache.org/myfaces/MigrateFromJspToFacelets?action=diff&rev1=5&rev2=6

Comment:
formatting

  
  == Converting from JSP to facelets ==
  
-  1. Backup everything
+  A. Backup everything
  
-  2. Download and Install facelets
+  A. Download and Install facelets
     [[https://facelets.dev.java.net]]
  
-  3. For each .jsp file:
+  A. For each .jsp file:
  
    a. rename file xxx.jsp to xxx.xhtml
  
-   b. insert the xhtml doctype tag at the very top
+   a. insert the xhtml doctype tag at the very top
- {{{
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- }}}
  
+     {{{
+     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+     }}}
-   c. add namespaces to the root level xml element
- {{{
- <f:view>
- }}}
- becomes
- {{{
- <f:view
-    xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:ui="http://java.sun.com/jsf/facelets">
- }}}
  
- or
+   a. add namespaces to the root level xml element
+ 	{{{
+ 	<f:view>
+ 	}}}
+ 	becomes
+ 	{{{
+ 	<f:view
+ 	   xmlns="http://www.w3.org/1999/xhtml"
+ 	   xmlns:ui="http://java.sun.com/jsf/facelets">
+ 	}}}
  
+ 	or
- {{{
- <html>
- }}}
- becomes
- {{{
- <html
-    xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:ui="http://java.sun.com/jsf/facelets">
- }}}
  
+ 	{{{
+ 	<html>
+ 	}}}
+ 	becomes
+ 	{{{
+ 	<html
+ 	   xmlns="http://www.w3.org/1999/xhtml"
+ 	   xmlns:ui="http://java.sun.com/jsf/facelets">
+ 	}}}
+ 
-   d. remove jsp directives, change
+   a. remove jsp directives, change
- {{{
+ 	{{{
- <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+ 	<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
- <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+ 	<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
- }}}
+ 	}}}
-    to
+ 	   to
- {{{ ...
+ 	{{{
  	xmlns:h="http://java.sun.com/jsf/html"
  	xmlns:f="http://java.sun.com/jsf/core"
- }}}
+ 	}}}
- after the other xmlns: attributes in 3.c. above
+ 	after the other xmlns: attributes in 3.c. above
  
-   e. add the xmlns: of any other jsf libs (tomahawk, tobago, htmlib, ...) to the end, after
3.d above
+   a. add the xmlns: of any other jsf libs (tomahawk, tobago, htmlib, ...) to the end, after
C.d above
  
-   f. for each jsf lib you add, you must put the corresponding taglib.xml file under .../WEB-INF/
+   a. for each jsf lib you add, you must put the corresponding taglib.xml file under .../WEB-INF/
  
-   g. convert other jsp tags, e.g.
+   a. convert other jsp tags, e.g.
- {{{
+ 	{{{
- <% /* my comment */ %>
+ 	<% /* my comment */ %>
- }}}
+ 	}}}
- becomes
+ 	becomes
- {{{
+ 	{{{
- <!-- my comment -->
+ 	<!-- my comment -->
- }}}
+ 	}}}
- Note that you will probably want to use the following instead of <!-- my comment -->
as standard html comments are stripped by default and treated as literal text block components
if re-enabled.
+ 	Note that you will probably want to use the following instead of <!-- my comment -->
as standard html comments are stripped by default and treated as literal text block components
if re-enabled.
- {{{
+ 	{{{
- <ui:remove>my comment</ui:remove>
+ 	<ui:remove>my comment</ui:remove>
- }}}
+ 	}}}
  
-   h. change all xml entities to numerical form, e.g. 
+   a. change all xml entities to numerical form, e.g. 
- {{{
+ 	{{{
- &nbsp;
+ 	&nbsp;
- }}}
+ 	}}}
- becomes
+ 	becomes
- {{{
+ 	{{{
- &#160;
+ 	&#160;
- }}}
+ 	}}}
  
    i. change xml special characters in javascript and el expressions, ''&'' becomes ''&amp;'',
''<'' becomes ''&lt;''
  

Mime
View raw message