struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ssmtpmailtesting ssmtpmailtesting <ssmtpmailtest...@gmail.com>
Subject How can I convert .jsp to .ftl (freemarker)?
Date Fri, 23 Jun 2017 08:12:36 GMT
login.jsp =

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page contentType="text/html; charset=UTF-8"%>

<html>
<head>
    <title>Login Form</title>
</head>
<body>
    <h1>Struts 2 Hello World Example</h1>

    <s:form action="Welcome" method="post">
        <s:textfield name="username" label="Username" />
        <s:textfield name="description" label="Description" />
        <s:password name="password" label="Password" />
        <s:submit />
    </s:form>

</body>
</html>


I tried this: login.ftl =

<#assign s=JspTaglibs["struts-tags.tld"] />
<html>
<head>
    <title>Login Form</title>
</head>
<body>
    <h1>Struts 2 Hello World Example</h1>

    <@s:form action="Welcome" method="post">
        <@s:textfield name="username" label="Username" />
        <@s:textfield name="description" label="Description" />
        <@s:password name="password" label="Password" />
        <@s:submit />
    </@s:form>

</body>
</html>

But it didn't output html form.

How can I convert from .jsp to .ftl?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message