Sie sind auf Seite 1von 62

2010 Marty Hall

Template de pginas com Facelets


Vincius Mota Originals of Slides and Source Code for Examples: http://www.coreservlets.com/JSF-Tutorial/jsf2/
Customized Java EE Training: http://courses.coreservlets.com/
Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.

Agenda

Motivao JSF 1.x vs JSF 2.0 Mecanismo Bsico


Arquivo de Template Arquivo Cliente

Template com includes Manipulando URLs Relativas

2010 Marty Hall

Introduo

Customized Java EE Training: http://courses.coreservlets.com/


Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.

Necessidade de Templating

Evitar repeties em pginas facelets


POO prov um bom reuso do cdigo Java. Mas e as pginas JSF/facelet?

bom evitar repetio de cdigo idntico aqui tambm

Uso inadequado do jsp:include


JSF normalemte evita JSP tags Mesmo se usar o jsp:include, haver problemas

Sem templates reais ou sees nomeadas No pode passar dados fcil para as pginas includasCant easily pass data to included pages

Need for complex composite components

The JSF 1.x model for making custom components was ridiculously complicated. Facelets in JSF 2.0 provide a relatively simple way to make many of those components.

This is discussed in next tutorial section.

This section is page templating only.

Vantagens do Facelet

Templating Real

Arquivos template definem um layout e sees Arquivos Clientes usam o template e substituem as sees Pode passar dados do JSF para pginas includas Sintaxe XML ajuda no desenvolvimento xhtml syntax checking for result Pode usar #{blah} ou ${blah} em qualquer lugar @taglib e f:view no necessrio

Paginas desenvolvidas em xhtml


JSP 2.1 EL

Sucinta

JSF 1.x vs JSF 2.0

JSF 1.x h necessidade de instalar as bibliotecas do Facelet JSF 2.0 j vem como padro Necessidade para criao de componentes complexos

No JSF 1.x era extremamente complicado a criao de componente. Facelets no JSF 2.0 prov um modo simples de criar tais componentes

No o objetivo desta aula!!!

Instalando no JSF 1.x

Necessrio 3 JARs no WEB-INF/lib


jsf-facelets.jar, el-api.jar, el-ri.jar Download em http://facelets.dev.java.net/ Obrigatrio: javax.faces.DEFAULT_SUFFIX Opcional mas que ajuda

Criar parametros de contexto no web.xml


facelets.REFRESH_PERIOD facelets.DEVELOPMENT

Criar uma declarao de view-handler no facesconfig.xml

com.sun.facelets.FaceletViewHandler

Web.xml
<web-app ...> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param>
Qual frequencia checar por mudanas Extenso dos arquivos facelets E.x., foo.xhtml ser acessado como foo.faces.

<context-param> <param-name>facelets.REFRESH_PERIOD</param-name> <param-value>2</param-value> </context-param> <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>true</param-value> </context-param> ... </web-app>

Usar sada debug/development .

faces-config.xml
<faces-config> <application> <view-handler> com.sun.facelets.FaceletViewHandler </view-handler> </application> ... </faces-config>

Instalando no JSF 2.0

Simplesmente crie o projeto usando o JSF2.0 Padro j XHTML

Passos Bsicos

Definir um arquivo de template


Contedo que aparece para todos os clientes pode ser colocado diretamente no template Contedo que ser substitudo por arquivos clientes marcado com ui:insert (com um valor default em caso do cliente no inserir algum contedo)

Definir um arquivo cliente que usa o template


Usar ui:composition para especificar qual template usado Usar ui:define para sobrescrever o contedo de cada seo no template (marcado no template com ui:insert) http://host/app/clientfile.jsf

Acessar o cliente no browser

Usurios nunca acessam templates

Exemplo Simplificado

...

/templates/template-1.xhtml

<h:body>Content shared by all client files <h2><ui:insert name="title">Default Title</ui:insert></h2> More content shared by all clients <ui:insert name="body">Default Body</ui:insert> </h:body> ...

<ui:composition template="/templates/template-1.xhtml"> <ui:define name="title">Title text</ui:define> <ui:define name="body"> Content to go in "body" section of template </ui:define></ui:composition>
Substitui o contedo padro do title do template. Se omitido o do template assume.

client-file-1.xhtml

Arquivo Template

Namespaces

<!DOCTYPE ... (standard xhtml) >

Minimo: schemas para xhtml, facelets h: e ui:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> </html> Se usar outra bibliotecas de tags (f, c, etc.), lista elas tambm <html xmlns="http://www.w3.org/1999/xhtml"

xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"> ...

Arquivo Template

Inserir o contedo compartilhado

Se tem algum HTML ou JSF que ser usado por todos os clientes, coloque-o diretamente no template

Marque as sees a serem substitudas com ui:insert


D um nome a seo (cliente referenciar o nome) Coloque um valor default <ui:insert...> and </ui:insert> Ou use <h:outputText value="#{blah}" /> se precisar de alguma das opes do h:outputText

Sada de valores dinmicos com #{blah}

E.g., escape="false" or rendered="false"

Ponhas os arquivos template em uma pasta separada

Template: Exemplo

(/templates/sample-template.xhtml)
<!DOCTYPE ...> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <title> <ui:insert name="title">Default Title</ui:insert> </title> <link rel="stylesheet" type="text/css" href="./css/styles.css"/> Essas sees As partes no marcadas com podem ser </h:head> ui:insert iro aparecer em todos os substitudas no arquivos clientes carquivo cliente <h:body> <table border="5" align="center"><tr><th class="title"> <ui:insert name="title">Default Title</ui:insert> </th></tr></table> <h2>A random number: #{numGenerator.randomNum}</h2> <ui:insert name="content">Default Content</ui:insert> </h:body></html>

Bean
package coreservlets; import javax.faces.bean.*; @ManagedBean public class NumGenerator { public double getRandomNum() { return(Math.random()); } }

Arquivo Cliente: detalhes

Usar ui:composition com referencia ao schema

<ui:composition xmlns="" xmlns:ui="" >

Textos fora do ui:composition so ignorados

Usar atributo template referenciando o arquivo template

<ui:composition xmlns="" xmlns:ui="" template="/templates/some-template.xhtml"> <ui:define name="section-name-from-template-file"> Content to be inserted into section. XHTML tags, JSF tags, EL expressions, etc. </ui:define> Precisa ser acessvel

Usar ui:define para prover contedo as sees

Arquivo na mesma pasta dos JSF normais

Client : Exemplo
(/sample-page.xhtml)
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" template="/templates/sample-template.xhtml"> <ui:define name="title"> This is the new title </ui:define> <ui:define name="content"> This is the new content. <p/> Blah, blah, blah. Yadda, yadda, yadda. </ui:define> </ui:composition>

Cliente Resultado

2010 Marty Hall

Incluindo arquivos no Templates

Customized Java EE Training: http://courses.coreservlets.com/


Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.

Motivao

Contedo compartilhado por todos os clientes

Colocar diretamente no arquivo de template Coloque no cliente no corpo ui:define

Contedo que especifico para cada cliente

Contedo compartilhado por alguns clientes?

E talvez inserido em lugares diferentes em cada cliente

Problemas No pode ser inserido diretamente no template Usado por mais de um cliente ento dificil e repetitivo usar o ui:define no arquivo cliente Soluo Colocar contedo reusavel em arquivos separados

Usando ui:include

No ltimo exemplo, contedo era sempre compartilhado no arquivo template

Opes

E quando s compartilhado as vezes?


Por em arquivos separados

Carregar o arquivo cliente usando ui:include no corpo do ui:define

Load it in client file by using ui:include in the body of ui:define

Template

Mesmas regras de antes


Inserir contedo compartilhado Marcar sees a serem substitudas com o ui:insert Sadas dinmicas com #{blah} Colocar em uma pasta separada

Arquivos a serem includos (Snippet File)

Contedo no ui:composition

Com as referencias, como antes Evitar confuso com os arquivos clientes e templates Contedo fora do ui:composition ser ignorado Mas a tag no topo top-level no arquivo de template ser <ui:composition>, no <html>

Por snippets em uma pasta separada

Seguir a sintaxe XML

Snippets podem usar templates

Cliente

Usar ui:composition como antes

Referenciando o schema e o atributo template

<ui:composition xmlns="" xmlns:ui="" template="/templates/some-template.xhtml"> Usar ui:define com ui:include para por snippets

<ui:define name="section-name1-from-template-file"> <ui:include src="/snippets/some-snippet.xhtml"/> </ui:define> <ui:define name="section-name2-from-template-file"> Client-specific content </ui:define>

Cliente fica no mesmo local do JSF

Exemplo: Uma loja de barcos

Comum para todas as paginas

DOCTYPE; head, title, and body tags; style sheet; border em volta do cabealho

Vai diretamente no template

Comum para algumas pginas


Header Search box Footer

Contedo vai em diferentes arquivos via ui:include dentro ui:define

nico as paginas
texto corpo

Template (Top)

(/templates/eboats-template.xhtml)
<!DOCTYPE ...> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <title><ui:insert name="title">Title</ui:insert></title> <link rel="stylesheet" type="text/css" href="./css/styles.css"/> </h:head> <h:body> <ui:insert name="header">Header</ui:insert> <p/>

Template

(/templates/eboats-template.xhtml)
<table border="5" align="center"> <tr><th class="title"> <ui:insert name="title">Title</ui:insert> </th></tr> </table> <p/> <table width="75" align="left" cellspacing="5"> <tr><td><ui:insert name="menu">Menu</ui:insert></td></tr> </table> <p/> <ui:insert name="body">Body</ui:insert> <br clear="all"/> <hr/> <ui:insert name="footer">Footer</ui:insert> </h:body></html>

Header File

(/snippets/header.xhtml)
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"> <table width="100%" class="dark"> <tr><th align="left"> <a href="welcome.jsf" class="white">Home</a> &#160;&#160;&#160; <a href="products.jsf" class="white">Products</a> &#160;&#160;&#160; <a href="services.jsf" class="white">Services</a> &#160;&#160;&#160; <a href="contact.jsf" class="white">Contact Us</a> </th><th align="right"> <a href="cart.jsf" class="white">My Cart</a> &#160;&#160;&#160; <a href="logout.jsf" class="white">Logout</a> &#160;&#160;&#160; <a href="help.jsf" class="white">Help</a> </th></tr></table> </ui:composition>

Footer arquivo 1

(/snippets/footer-full.xhtml)
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"> <div align="center"> <a href="welcome.jsf">Home</a> | <a href="contact.jsf">Contact</a> | <a href="privacy.jsf">Privacy</a> </div> </ui:composition>
Este rodap incluido em quase todas as pginas que usam o templateeboats-template.xhtml. A pginas welcome usa um foote abreviado que no inclui a propria welcome.

Footer 2

(/snippets/footer-no-home.xhtml)
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"> <div align="center"> <a href="contact.jsf">Contact</a> | <a href="privacy.jsf">Privacy</a> </div> </ui:composition>

Snippets para caixas de busca

Objetivo

Ter varios buscadores de diferentes empresas(Google, Bing, Yahoo, etc.) Evitar repetir a caixa de busca loca e a maioria da formatao Fazer um template de busca geral Usar esse template para cada servio de busca Esse no um xhtml completo, no deve conterDOCTYPE, <html>, <head>, <body>, etc.

Soluo

Diferena dos outros exemplos

Use o snippet dentro de ui:composition

Search Box Template (Top)

(/templates/search-box-template.xhtml)
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"> <div align="center" > <table border="1"><tr bgcolor="black"><th> <font color="white">Search Site</font> </th></tr><tr><th> <form action="siteSearch"> <input type="text" name="query"/><br/> <input type="submit" value="Search"/> </form> </th></tr></table> Embora isso seja um template.

O arquivo cliente o usar como um snippet, ento a tag no nvel mais alto deve ser a <ui:composition>, e no <html>

Search Box Template (Bottom)


(/templates/search-box-template.xhtml)
<p/> <table border="1"><tr bgcolor="black"><th> <font color="white">Search Web</font> </th></tr><tr><th> <ui:insert name="search-form"> <h1>Missing search form</h1> </ui:insert> </th></tr></table></div> </ui:composition>

Google Search Box

(/snippets/google-search-box.xhtml)
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" template="/templates/search-box-template.xhtml"> <ui:define name="search-form"> <form action="http://google.com/search"> <input type="text" name="q"/><br/> <input type="submit" value="Google Search"/> </form> </ui:define> </ui:composition>

Este tambm um snippet que usa o layou criado anteriormente e ser usado em outro cliente

Bing Search Box

(/snippets/bing-search-box.xhtml)
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" template="/templates/search-box-template.xhtml"> <ui:define name="search-form"> <form action="http://bing.com/search"> <input type="text" name="q"/><br/> <input type="submit" value="Bing Search"/> </form> </ui:define> </ui:composition>

Yahoo Search Box

(/snippets/bing-search-box.xhtml)
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" template="/templates/search-box-template.xhtml"> <ui:define name="search-form"> <form action="http://search.yahoo.com/search"> <input type="text" name="p"/><br/> <input type="submit" value="Yahoo Search"/> </form> </ui:define> </ui:composition>

Colocando tudo junto: Cliente


(/welcome.xhtml)
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" template="/templates/eboats-template.xhtml"> <ui:define name="title"> Welcome to eboats! </ui:define> <ui:define name="header"> <ui:include src="/snippets/header.xhtml"/> </ui:define> <ui:define name="menu"> <ui:include src="/snippets/google-search-box.xhtml"/> </ui:define>

Cliente

(/welcome.xhtml)
<ui:define name="body"> <p/> <img src="./images/yacht.jpg" width="240" height="367" align="right" alt="Base-model yacht"/> Looking for a hole in the water into which to pour your money? You've come to the right place! We offer a wide selection of reasonably priced boats for everyday use. <h2>Yachts</h2> ... (more body content) </ui:define> <ui:define name="footer"> <ui:include src="/snippets/footer-no-home.xhtml"/> </ui:define> </ui:composition>

Cliente

Cliente

(/tankers.xhtml)
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" template="/templates/eboats-template.xhtml"> <ui:define name="title"> Eboats Oil Tankers! </ui:define> <ui:define name="header"> <ui:include src="/snippets/header.xhtml"/> </ui:define> <ui:define name="menu"> <ui:include src="/snippets/yahoo-search-box.xhtml"/> </ui:define>

Cliente 2

(/tankers.xhtml)
<ui:define name="body"> <img src="./images/yacht.jpg" alt="Yacht" align="right"/> <p/> Luxurious models for the <s>wasteful</s> wealthy buyer. <h2>Available Models</h2> Choose a model to see a picture along with price and availability information. ... (more body content) </ui:define> <ui:define name="footer"> <ui:include src="/snippets/footer-full.xhtml"/> </ui:define> </ui:composition>

Cliente 2

Cliente 3 e 4

Abordagem praticamente identica

2010 Marty Hall

Manipulando URLs relativas nos Templates

Customized Java EE Training: http://courses.coreservlets.com/


Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.

Problemas com exemplos anteriores

Questo

Templates e snippets usados com URLs relativas Suponha arquivo cliente esteja em subdir/client.xhtml, acessado com http://host/context-root/subdir/client.jsf

Exemplo

Todas as URLs devem referenciar a subpasta <a href="welcome.jsf"> dever referenciar a http://host/context-root/subdir/welcome.jsf <img src="./images/yacht.jpg">imagens a http://host/context-root/subdir/images/yacht.jpg <link href="./css/styles.css"/> deve referenciar a http://host/context-root/subdir/css/styles.css

Hypertext links

Imagens

Style sheets

Soluo

Hypertext links

Usar <a href="#{request.contextPath}/blah.jsf">

Ou <h:outputLink value="#{request.contextPath}/blah.jsf"/>

Images

Colocar as imagens em uma pasta chamada resources e usar <h:graphicImage name="blah.jpg" library="images"/>

Pode tambm <h:graphicImage url="/images/blah.jpg"/>

Style sheets

Colocar a pasta de css na pasta resources e usar <h:outputStylesheet name="blah.css" library="css"/> Colocar os scripts dentro de resources and use <h:outputScript name="blah.js" library="scripts"/>

JavaScript

Soluo no JSF 1.x

Usar expresso de linguagens$ {facesContext.externalContext.requestCont extPath} Exemplo

<img src="$ {facesContext.externalContext.requestContextPath}/pic.jpg"/>

Aplicvel a:

Images Style sheets Regular hypertext links Qualquer TAG que use URL

Lembrete h:head and h:body

Pensando a frente: Sempre use h:head e h:body

Nunca somente <head> e <body> (ento jSF pode achar regies) f:ajax

Razes

Esta tag insere scripts automaticamente,e pode no achar o local de inserir quando no usado oh:head e h:body <h:outputStylesheet> no precisa ser no cabealhom ento JSF tem que ser capaz de localizar o cabealho para inserir o link que carrega o style sheet.

h:outputStylesheet

Hypertext Links: URLs relativas

Usar #{request.contextPath}

Diferente de imagens, style sheets, e scripts, JSF no tem um jeito interno para lidar com links relativos Pode ser resolvido facilmente <a href="#{request.contextPath}/blah.jsf"> <h:outputLink value="#{request.contextPath}/blah.jsf"/>

Exemplos

Assume that your context root is /my-context. Then, both of the above build <a href="/my-context/blah.jsf">

Imagens: Relative URLs

Usar h:graphicImage com name e library

JSF 2.0 adicionou o conceito de diretrios de recursos (resource folders). Cria um diretrio chamado resources, e cria subpastas dentro.

Em library, Pe o nome do diretorio de imagens Em name, passa o nome do arquivo sada <img src="/my-context/foo/bar.jgp"/>.

Ou, use <h:graphicImage url="/foo/bar.jpg"/>

Exemplo

<h:graphicImage name="blah.gif" library="images"/>

Sada <img src=""/>,

Style Sheets: Relative URLs

Usar h:outputStylesheet com name & library


Mesma forma de imagens <h:outputStylesheet> pode estar fora do cabealho

JSF se encarrega de coloca-lo no lugar certo em tempo de execuo

Exemplo

<h:outputStylesheet name="blah.css" library="css"/>

Sada <link type="text/css" rel="stylesheet" href="" /> onde href referencia aplicaao onde est a pagina /my-context/resources/css/blah.css

Scripts: Relative URLs

Use h:outputScript com name & library Exemplo

<h:outputScript name="blah.js" library="scripts"/>

Sada <script type="text/javascript" src="" />

Exemplo: Referenciando arquivos do Templates ou em Includes


<h:graphicImage url="/images/someimage-1.jpg"/>

<h:outputStylesheet name="somestylesheet.css library="css"/> <h:graphicImage name="someimage-2.jpg" library="images"/> <h:outputScript name="somescript.js" library="scripts"/>

<a href="#{request.contextPath/somefile.jsf"/>

Example: yacht-template.xhtml (Top)


<!DOCTYPE > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <title><ui:insert name="title">Default Title</ui:insert></title> <h:outputStylesheet name="styles.css" library="css"/> <h:outputScript name="jquery.js" library="scripts"/> <h:outputScript name="jquery-setup.js" library="scripts"/> The pushbutton on the next slide uses jQuery to </h:head> highlight bullets. jQuery is explained in a separate tutorial at coreservlets.com, but the point is that this <h:body> page needs a context-path-relative way to load the JavaScript files and the stylesheet. <div align="center"> <table border="5" align="center"> <tr><th class="title"> <ui:insert name="title">Title</ui:insert> </th></tr> </table>

Example: yacht-template.xhtml (Continued)


<table> <tr><th>Small Yacht</th><th>Medium Yacht</th></tr> <tr><td> <h:graphicImage name="small-yacht.jpg" library="images"/> </td><td> <h:graphicImage url="/images/medium-yacht.jpg"/> bottom The top form is better for new apps, but the form is supported for backward compatibility with </td></tr></table> facelets in JSF 1.x. <h2>Benefits</h2> <div id="benefits"> <ui:insert name="benefits"> List of benefits of our yachts goes here. <ul><li>Benefit 1</li><li>...</li></ul> </ui:insert> </div> <input type="button" id="highlight-button"

Example: yacht-template.xhtml (Continued)


<div align="center"> <a href="#{request.contextPath}/welcome.jsf">Home</a> | <a href="#{request.contextPath}/contact.jsf">Contact</a> | <a href="#{request.contextPath}/privacy.jsf">Privacy</a> </div> </div></h:body></html>

Example: yacht-client1.xhtml (in dir1 subfolder)


<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" template="/templates/yacht-template.xhtml"> <ui:define name="title">Yacht Page 1</ui:define> <ui:define name="benefits"> <ul> <li><b>Inexpensive.</b> At least half our yachts sell for under $200 million.</li> <li><b>Easy to operate.</b> Base models require only a dozen well-trained crew members.</li> <li><b>Convenient terms.</b> We take cash, credit cards, or precious gems. No inconvenient IRS reporting for those paying in cash.</li> </ul> </ui:define>

Result: yacht-client1.jsf

Example: yacht-client2.xhtml (in dir1/dir2 subfolder)


<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" template="/templates/yacht-template.xhtml"> <ui:define name="title">Yacht Page 2</ui:define> <ui:define name="benefits"> <p>Let's be honest about why you <i>really</i> want a yacht. We have yachts that are:</p> <ul> <li>Bigger than Tiger Woods' yacht. Haha.</li> <li>Fancier than Tom Cruise's yacht. Haha.</li> <li>More expensive than Britney Spears' yacht. Haha.</li> <li>More ostentatious that Larry Ellison's yacht. Err, maybe not.</li> </ul> </ui:define> </ui:composition>

Result: yacht-client2.jsf

2010 Marty Hall

Perguntas?

Customized Java EE Training: http://courses.coreservlets.com/


Servlets, JSP, JSF 2.0, Struts, Ajax, GWT 2.0, Spring, Hibernate, SOAP & RESTful Web Services, Java 6.

Das könnte Ihnen auch gefallen