使用JSP进行Ajax

I am doing a Ajax in JSP Application I am using 2.0.

My code:

<f:view>
    <h:form>

        <h:inputText id="name" value="#{ user.username }"></h:inputText>

        <h:commandButton value="Load" >
            <f:ajax execute="name" redner="outputname"/>
        </h:commandButton>

        <h:outputLabel id='outputname' value="#{ user.username }"></h:outputLabel>

    </h:form>
</f:view>

Some error happen and I dont know the reason.

The tag f:ajax is only available on facelets.

and

/index.jsp (line: 17, column: 3) No tag "ajax" defined in tag library imported with prefix "f"

You need something like

<h:head>
    <title>Page Title</title>
    <meta http-equiv="Content-Type"
        content="application/xhtml+xml; charset=UTF-8" />
</h:head>
<h:body>
<h:form>

        <h:inputText id="name" value="#{ user.username }"></h:inputText>

        <h:commandButton value="Load" >
            <f:ajax execute="name" redner="outputname"/>
        </h:commandButton>

        <h:outputLabel id='outputname' value="#{ user.username }"></h:outputLabel>

    </h:form>
</h:body>
</html>