> From: ssmtpmailtesting ssmtpmailtesting <ssmtpmailtest...@gmail.com> > To: user@struts.apache.org, > Date: 23.06.2017 10:12 > Subject: How can I convert .jsp to .ftl (freemarker)? > > 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? >
One thing that catches my eye: in freemarker you have to replace colons with dots: <@s.form action="Welcome" method="post"> HTH Christoph This Email was scanned by Sophos Anti Virus