How can I convert .jsp to .ftl (freemarker)?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How can I convert .jsp to .ftl (freemarker)?

ssmtpmailtesting ssmtpmailtesting
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I convert .jsp to .ftl (freemarker)?

Christoph Nenning
> From: ssmtpmailtesting ssmtpmailtesting <[hidden email]>
> To: [hidden email],
> 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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I convert .jsp to .ftl (freemarker)?

Lukasz Lenart
2017-06-23 13:19 GMT+02:00 Christoph Nenning <[hidden email]>:
> One thing that catches my eye: in freemarker you have to replace colons
> with dots:
>
> <@s.form action="Welcome" method="post">

Exactly, that's a case
https://struts.apache.org/docs/freemarker-tags.html


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I convert .jsp to .ftl (freemarker)?

ssmtpmailtesting ssmtpmailtesting
I tried this:


<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>

still it's not outputting html form.

On Fri, Jun 23, 2017 at 6:33 PM, Lukasz Lenart <[hidden email]> wrote:

> 2017-06-23 13:19 GMT+02:00 Christoph Nenning <[hidden email]>:
>> One thing that catches my eye: in freemarker you have to replace colons
>> with dots:
>>
>> <@s.form action="Welcome" method="post">
>
> Exactly, that's a case
> https://struts.apache.org/docs/freemarker-tags.html
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I convert .jsp to .ftl (freemarker)?

Christoph Nenning
> From: ssmtpmailtesting ssmtpmailtesting <[hidden email]>
> To: Struts Users Mailing List <[hidden email]>,
> [hidden email],
> Date: 23.06.2017 14:54
> Subject: Re: How can I convert .jsp to .ftl (freemarker)?
>
> I tried this:
>
>
> <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>
>
> still it's not outputting html form.


Any errors in logs?


regards,
Christoph


>
> On Fri, Jun 23, 2017 at 6:33 PM, Lukasz Lenart
> <[hidden email]> wrote:
> > 2017-06-23 13:19 GMT+02:00 Christoph Nenning
> <[hidden email]>:
> >> One thing that catches my eye: in freemarker you have to replace
colons

> >> with dots:
> >>
> >> <@s.form action="Welcome" method="post">
> >
> > Exactly, that's a case
> > https://struts.apache.org/docs/freemarker-tags.html
> >
> >
> > Regards
> > --
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

This Email was scanned by Sophos Anti Virus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I convert .jsp to .ftl (freemarker)?

Lukasz Lenart
Did you change a result type?

W dniu pt., 23.06.2017 o 16:45 Christoph Nenning <
[hidden email]> napisał(a):

> > From: ssmtpmailtesting ssmtpmailtesting <[hidden email]>
> > To: Struts Users Mailing List <[hidden email]>,
> > [hidden email],
> > Date: 23.06.2017 14:54
> > Subject: Re: How can I convert .jsp to .ftl (freemarker)?
> >
> > I tried this:
> >
> >
> > <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>
> >
> > still it's not outputting html form.
>
>
> Any errors in logs?
>
>
> regards,
> Christoph
>
>
> >
> > On Fri, Jun 23, 2017 at 6:33 PM, Lukasz Lenart
> > <[hidden email]> wrote:
> > > 2017-06-23 13:19 GMT+02:00 Christoph Nenning
> > <[hidden email]>:
> > >> One thing that catches my eye: in freemarker you have to replace
> colons
> > >> with dots:
> > >>
> > >> <@s.form action="Welcome" method="post">
> > >
> > > Exactly, that's a case
> > > https://struts.apache.org/docs/freemarker-tags.html
> > >
> > >
> > > Regards
> > > --
> > > Łukasz
> > > + 48 606 323 122 http://www.lenart.org.pl/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
> This Email was scanned by Sophos Anti Virus
>
--
(mobile)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I convert .jsp to .ftl (freemarker)?

ssmtpmailtesting ssmtpmailtesting
Thank you Lukasz Lenart

On Fri, Jun 23, 2017 at 9:44 PM, Lukasz Lenart <[hidden email]> wrote:

> Did you change a result type?
>
> W dniu pt., 23.06.2017 o 16:45 Christoph Nenning <
> [hidden email]> napisał(a):
>
>> > From: ssmtpmailtesting ssmtpmailtesting <[hidden email]>
>> > To: Struts Users Mailing List <[hidden email]>,
>> > [hidden email],
>> > Date: 23.06.2017 14:54
>> > Subject: Re: How can I convert .jsp to .ftl (freemarker)?
>> >
>> > I tried this:
>> >
>> >
>> > <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>
>> >
>> > still it's not outputting html form.
>>
>>
>> Any errors in logs?
>>
>>
>> regards,
>> Christoph
>>
>>
>> >
>> > On Fri, Jun 23, 2017 at 6:33 PM, Lukasz Lenart
>> > <[hidden email]> wrote:
>> > > 2017-06-23 13:19 GMT+02:00 Christoph Nenning
>> > <[hidden email]>:
>> > >> One thing that catches my eye: in freemarker you have to replace
>> colons
>> > >> with dots:
>> > >>
>> > >> <@s.form action="Welcome" method="post">
>> > >
>> > > Exactly, that's a case
>> > > https://struts.apache.org/docs/freemarker-tags.html
>> > >
>> > >
>> > > Regards
>> > > --
>> > > Łukasz
>> > > + 48 606 323 122 http://www.lenart.org.pl/
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: [hidden email]
>> > > For additional commands, e-mail: [hidden email]
>> > >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden email]
>> > For additional commands, e-mail: [hidden email]
>> >
>>
>> This Email was scanned by Sophos Anti Virus
>>
> --
> (mobile)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I convert .jsp to .ftl (freemarker)?

Lukasz Lenart
Did that help?

W dniu pt., 23.06.2017 o 17:55 ssmtpmailtesting ssmtpmailtesting <
[hidden email]> napisał(a):

> Thank you Lukasz Lenart
>
> On Fri, Jun 23, 2017 at 9:44 PM, Lukasz Lenart <[hidden email]>
> wrote:
> > Did you change a result type?
> >
> > W dniu pt., 23.06.2017 o 16:45 Christoph Nenning <
> > [hidden email]> napisał(a):
> >
> >> > From: ssmtpmailtesting ssmtpmailtesting <[hidden email]>
> >> > To: Struts Users Mailing List <[hidden email]>,
> >> > [hidden email],
> >> > Date: 23.06.2017 14:54
> >> > Subject: Re: How can I convert .jsp to .ftl (freemarker)?
> >> >
> >> > I tried this:
> >> >
> >> >
> >> > <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>
> >> >
> >> > still it's not outputting html form.
> >>
> >>
> >> Any errors in logs?
> >>
> >>
> >> regards,
> >> Christoph
> >>
> >>
> >> >
> >> > On Fri, Jun 23, 2017 at 6:33 PM, Lukasz Lenart
> >> > <[hidden email]> wrote:
> >> > > 2017-06-23 13:19 GMT+02:00 Christoph Nenning
> >> > <[hidden email]>:
> >> > >> One thing that catches my eye: in freemarker you have to replace
> >> colons
> >> > >> with dots:
> >> > >>
> >> > >> <@s.form action="Welcome" method="post">
> >> > >
> >> > > Exactly, that's a case
> >> > > https://struts.apache.org/docs/freemarker-tags.html
> >> > >
> >> > >
> >> > > Regards
> >> > > --
> >> > > Łukasz
> >> > > + 48 606 323 122 http://www.lenart.org.pl/
> >> > >
> >> > >
> ---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail: [hidden email]
> >> > > For additional commands, e-mail: [hidden email]
> >> > >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: [hidden email]
> >> > For additional commands, e-mail: [hidden email]
> >> >
> >>
> >> This Email was scanned by Sophos Anti Virus
> >>
> > --
> > (mobile)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
> --
(mobile)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can I convert .jsp to .ftl (freemarker)?

ssmtpmailtesting ssmtpmailtesting
Yes

On Sat, Jun 24, 2017 at 2:05 AM, Lukasz Lenart <[hidden email]> wrote:

> Did that help?
>
> W dniu pt., 23.06.2017 o 17:55 ssmtpmailtesting ssmtpmailtesting <
> [hidden email]> napisał(a):
>
>> Thank you Lukasz Lenart
>>
>> On Fri, Jun 23, 2017 at 9:44 PM, Lukasz Lenart <[hidden email]>
>> wrote:
>> > Did you change a result type?
>> >
>> > W dniu pt., 23.06.2017 o 16:45 Christoph Nenning <
>> > [hidden email]> napisał(a):
>> >
>> >> > From: ssmtpmailtesting ssmtpmailtesting <[hidden email]>
>> >> > To: Struts Users Mailing List <[hidden email]>,
>> >> > [hidden email],
>> >> > Date: 23.06.2017 14:54
>> >> > Subject: Re: How can I convert .jsp to .ftl (freemarker)?
>> >> >
>> >> > I tried this:
>> >> >
>> >> >
>> >> > <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>
>> >> >
>> >> > still it's not outputting html form.
>> >>
>> >>
>> >> Any errors in logs?
>> >>
>> >>
>> >> regards,
>> >> Christoph
>> >>
>> >>
>> >> >
>> >> > On Fri, Jun 23, 2017 at 6:33 PM, Lukasz Lenart
>> >> > <[hidden email]> wrote:
>> >> > > 2017-06-23 13:19 GMT+02:00 Christoph Nenning
>> >> > <[hidden email]>:
>> >> > >> One thing that catches my eye: in freemarker you have to replace
>> >> colons
>> >> > >> with dots:
>> >> > >>
>> >> > >> <@s.form action="Welcome" method="post">
>> >> > >
>> >> > > Exactly, that's a case
>> >> > > https://struts.apache.org/docs/freemarker-tags.html
>> >> > >
>> >> > >
>> >> > > Regards
>> >> > > --
>> >> > > Łukasz
>> >> > > + 48 606 323 122 http://www.lenart.org.pl/
>> >> > >
>> >> > >
>> ---------------------------------------------------------------------
>> >> > > To unsubscribe, e-mail: [hidden email]
>> >> > > For additional commands, e-mail: [hidden email]
>> >> > >
>> >> >
>> >> > ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: [hidden email]
>> >> > For additional commands, e-mail: [hidden email]
>> >> >
>> >>
>> >> This Email was scanned by Sophos Anti Virus
>> >>
>> > --
>> > (mobile)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>> --
> (mobile)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...