You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Soloschenko, Tobias" <To...@rewe-group.com> on 2014/09/01 08:20:51 UTC

AW: Partially include JSP files into Wicket-HTML-Pages via Custom Tag

Hi Martin,

I build up a JUnit-Test for the project. I couldn't use the WicketTester, because I need a full working, JSP supporting container. So I used jetty for tests only:

https://github.com/klopfdreh/wicket.jsp/blob/master/wicket.jsp/src/test/java/wicket/jsp/WicketServletAndJSPResolverTest.java

Any other idea how to handle this otherwise?

kind regards

Tobias

-----Ursprüngliche Nachricht-----
Von: Martin Grigorov [mailto:mgrigorov@apache.org] 
Gesendet: Freitag, 29. August 2014 11:36
An: users@wicket.apache.org
Betreff: Re: Partially include JSP files into Wicket-HTML-Pages via Custom Tag [UNSIGNIERT]

Hi Tobias,

The code looks good to me!
There is no support for this in Wicket out of the box.

You can contribute it to WicketStuff Minis project. With a test case we can make sure it will work for the future versions too! ;-)

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Fri, Aug 29, 2014 at 11:53 AM, Soloschenko, Tobias < Tobias.Soloschenko@rewe-group.com> wrote:

> Hello everyone,
>
> because of some migrations I had to partially include JSP files into 
> Wicket HTML Pages. I found a documentation for the prior 1.4 version 
> of Wicket and some Stack Overflow posts about newer implementations 
> (mentioned at the readme of the git repository).
>
> I modified and improved it a little bit and made it work for wicket 6.16.0.
>
> https://github.com/klopfdreh/wicket.jsp
>
> Is there any other way to do this out of the box in Wicket 6.16.0?
>
> kind regards,
>
> Tobias
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


AW: Partially include JSP files into Wicket-HTML-Pages via Custom Tag

Posted by "Soloschenko, Tobias" <To...@rewe-group.com>.
Hallo Martin,

thanks for your help. I changed the unit test and also will continue working on some tag libraries to be used in JSP files rendered into wicket pages.

kind regards,

Tobias

-----Ursprüngliche Nachricht-----
Von: Martin Grigorov [mailto:mgrigorov@apache.org] 
Gesendet: Montag, 1. September 2014 08:43
An: users@wicket.apache.org
Betreff: Re: Partially include JSP files into Wicket-HTML-Pages via Custom Tag [UNSIGNIERT]

I think it is OK to work with a mock response.
Jasper (the most used JSP compiler) has to have its own unit tests.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Mon, Sep 1, 2014 at 9:32 AM, Soloschenko, Tobias < Tobias.Soloschenko@rewe-group.com> wrote:

> Yep, but this will not check if the Servlets / JSPs content is 
> translated by the tags, or do you think it is not required here?
>
> kind regards
>
> Tobias
>
> -----Ursprüngliche Nachricht-----
> Von: Martin Grigorov [mailto:mgrigorov@apache.org]
> Gesendet: Montag, 1. September 2014 08:26
> An: users@wicket.apache.org
> Betreff: Re: Partially include JSP files into Wicket-HTML-Pages via 
> Custom Tag [UNSIGNIERT]
>
> I think it should be possible to use mocked MockServletContext that 
> returns a mock of RequestDispatcher that will return a hardcoded (JSP) 
> response.
> See
> org.apache.wicket.util.tester.WicketTester#WicketTester(org.apache.wic
> ket.protocol.http.WebApplication,
> javax.servlet.ServletContext)
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Mon, Sep 1, 2014 at 9:20 AM, Soloschenko, Tobias < 
> Tobias.Soloschenko@rewe-group.com> wrote:
>
> > Hi Martin,
> >
> > I build up a JUnit-Test for the project. I couldn't use the 
> > WicketTester, because I need a full working, JSP supporting container.
> > So I used jetty for tests only:
> >
> >
> > https://github.com/klopfdreh/wicket.jsp/blob/master/wicket.jsp/src/t
> > es t/java/wicket/jsp/WicketServletAndJSPResolverTest.java
> >
> > Any other idea how to handle this otherwise?
> >
> > kind regards
> >
> > Tobias
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Martin Grigorov [mailto:mgrigorov@apache.org]
> > Gesendet: Freitag, 29. August 2014 11:36
> > An: users@wicket.apache.org
> > Betreff: Re: Partially include JSP files into Wicket-HTML-Pages via 
> > Custom Tag [UNSIGNIERT]
> >
> > Hi Tobias,
> >
> > The code looks good to me!
> > There is no support for this in Wicket out of the box.
> >
> > You can contribute it to WicketStuff Minis project. With a test case 
> > we can make sure it will work for the future versions too! ;-)
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> >
> > On Fri, Aug 29, 2014 at 11:53 AM, Soloschenko, Tobias < 
> > Tobias.Soloschenko@rewe-group.com> wrote:
> >
> > > Hello everyone,
> > >
> > > because of some migrations I had to partially include JSP files 
> > > into Wicket HTML Pages. I found a documentation for the prior 1.4 
> > > version of Wicket and some Stack Overflow posts about newer 
> > > implementations (mentioned at the readme of the git repository).
> > >
> > > I modified and improved it a little bit and made it work for 
> > > wicket
> > 6.16.0.
> > >
> > > https://github.com/klopfdreh/wicket.jsp
> > >
> > > Is there any other way to do this out of the box in Wicket 6.16.0?
> > >
> > > kind regards,
> > >
> > > Tobias
> > >
> > >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Partially include JSP files into Wicket-HTML-Pages via Custom Tag

Posted by Martin Grigorov <mg...@apache.org>.
I think it is OK to work with a mock response.
Jasper (the most used JSP compiler) has to have its own unit tests.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Mon, Sep 1, 2014 at 9:32 AM, Soloschenko, Tobias <
Tobias.Soloschenko@rewe-group.com> wrote:

> Yep, but this will not check if the Servlets / JSPs content is translated
> by the tags, or do you think it is not required here?
>
> kind regards
>
> Tobias
>
> -----Ursprüngliche Nachricht-----
> Von: Martin Grigorov [mailto:mgrigorov@apache.org]
> Gesendet: Montag, 1. September 2014 08:26
> An: users@wicket.apache.org
> Betreff: Re: Partially include JSP files into Wicket-HTML-Pages via Custom
> Tag [UNSIGNIERT]
>
> I think it should be possible to use mocked MockServletContext that
> returns a mock of RequestDispatcher that will return a hardcoded (JSP)
> response.
> See
> org.apache.wicket.util.tester.WicketTester#WicketTester(org.apache.wicket.protocol.http.WebApplication,
> javax.servlet.ServletContext)
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Mon, Sep 1, 2014 at 9:20 AM, Soloschenko, Tobias <
> Tobias.Soloschenko@rewe-group.com> wrote:
>
> > Hi Martin,
> >
> > I build up a JUnit-Test for the project. I couldn't use the
> > WicketTester, because I need a full working, JSP supporting container.
> > So I used jetty for tests only:
> >
> >
> > https://github.com/klopfdreh/wicket.jsp/blob/master/wicket.jsp/src/tes
> > t/java/wicket/jsp/WicketServletAndJSPResolverTest.java
> >
> > Any other idea how to handle this otherwise?
> >
> > kind regards
> >
> > Tobias
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Martin Grigorov [mailto:mgrigorov@apache.org]
> > Gesendet: Freitag, 29. August 2014 11:36
> > An: users@wicket.apache.org
> > Betreff: Re: Partially include JSP files into Wicket-HTML-Pages via
> > Custom Tag [UNSIGNIERT]
> >
> > Hi Tobias,
> >
> > The code looks good to me!
> > There is no support for this in Wicket out of the box.
> >
> > You can contribute it to WicketStuff Minis project. With a test case
> > we can make sure it will work for the future versions too! ;-)
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> >
> > On Fri, Aug 29, 2014 at 11:53 AM, Soloschenko, Tobias <
> > Tobias.Soloschenko@rewe-group.com> wrote:
> >
> > > Hello everyone,
> > >
> > > because of some migrations I had to partially include JSP files into
> > > Wicket HTML Pages. I found a documentation for the prior 1.4 version
> > > of Wicket and some Stack Overflow posts about newer implementations
> > > (mentioned at the readme of the git repository).
> > >
> > > I modified and improved it a little bit and made it work for wicket
> > 6.16.0.
> > >
> > > https://github.com/klopfdreh/wicket.jsp
> > >
> > > Is there any other way to do this out of the box in Wicket 6.16.0?
> > >
> > > kind regards,
> > >
> > > Tobias
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

AW: Partially include JSP files into Wicket-HTML-Pages via Custom Tag

Posted by "Soloschenko, Tobias" <To...@rewe-group.com>.
Yep, but this will not check if the Servlets / JSPs content is translated by the tags, or do you think it is not required here?

kind regards

Tobias

-----Ursprüngliche Nachricht-----
Von: Martin Grigorov [mailto:mgrigorov@apache.org] 
Gesendet: Montag, 1. September 2014 08:26
An: users@wicket.apache.org
Betreff: Re: Partially include JSP files into Wicket-HTML-Pages via Custom Tag [UNSIGNIERT]

I think it should be possible to use mocked MockServletContext that returns a mock of RequestDispatcher that will return a hardcoded (JSP) response.
See org.apache.wicket.util.tester.WicketTester#WicketTester(org.apache.wicket.protocol.http.WebApplication,
javax.servlet.ServletContext)

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Mon, Sep 1, 2014 at 9:20 AM, Soloschenko, Tobias < Tobias.Soloschenko@rewe-group.com> wrote:

> Hi Martin,
>
> I build up a JUnit-Test for the project. I couldn't use the 
> WicketTester, because I need a full working, JSP supporting container. 
> So I used jetty for tests only:
>
>
> https://github.com/klopfdreh/wicket.jsp/blob/master/wicket.jsp/src/tes
> t/java/wicket/jsp/WicketServletAndJSPResolverTest.java
>
> Any other idea how to handle this otherwise?
>
> kind regards
>
> Tobias
>
> -----Ursprüngliche Nachricht-----
> Von: Martin Grigorov [mailto:mgrigorov@apache.org]
> Gesendet: Freitag, 29. August 2014 11:36
> An: users@wicket.apache.org
> Betreff: Re: Partially include JSP files into Wicket-HTML-Pages via 
> Custom Tag [UNSIGNIERT]
>
> Hi Tobias,
>
> The code looks good to me!
> There is no support for this in Wicket out of the box.
>
> You can contribute it to WicketStuff Minis project. With a test case 
> we can make sure it will work for the future versions too! ;-)
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Fri, Aug 29, 2014 at 11:53 AM, Soloschenko, Tobias < 
> Tobias.Soloschenko@rewe-group.com> wrote:
>
> > Hello everyone,
> >
> > because of some migrations I had to partially include JSP files into 
> > Wicket HTML Pages. I found a documentation for the prior 1.4 version 
> > of Wicket and some Stack Overflow posts about newer implementations 
> > (mentioned at the readme of the git repository).
> >
> > I modified and improved it a little bit and made it work for wicket
> 6.16.0.
> >
> > https://github.com/klopfdreh/wicket.jsp
> >
> > Is there any other way to do this out of the box in Wicket 6.16.0?
> >
> > kind regards,
> >
> > Tobias
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Partially include JSP files into Wicket-HTML-Pages via Custom Tag

Posted by Martin Grigorov <mg...@apache.org>.
I think it should be possible to use mocked MockServletContext that returns
a mock of RequestDispatcher that will return a hardcoded (JSP) response.
See org.apache.wicket.util.tester.WicketTester#WicketTester(org.apache.wicket.protocol.http.WebApplication,
javax.servlet.ServletContext)

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Mon, Sep 1, 2014 at 9:20 AM, Soloschenko, Tobias <
Tobias.Soloschenko@rewe-group.com> wrote:

> Hi Martin,
>
> I build up a JUnit-Test for the project. I couldn't use the WicketTester,
> because I need a full working, JSP supporting container. So I used jetty
> for tests only:
>
>
> https://github.com/klopfdreh/wicket.jsp/blob/master/wicket.jsp/src/test/java/wicket/jsp/WicketServletAndJSPResolverTest.java
>
> Any other idea how to handle this otherwise?
>
> kind regards
>
> Tobias
>
> -----Ursprüngliche Nachricht-----
> Von: Martin Grigorov [mailto:mgrigorov@apache.org]
> Gesendet: Freitag, 29. August 2014 11:36
> An: users@wicket.apache.org
> Betreff: Re: Partially include JSP files into Wicket-HTML-Pages via Custom
> Tag [UNSIGNIERT]
>
> Hi Tobias,
>
> The code looks good to me!
> There is no support for this in Wicket out of the box.
>
> You can contribute it to WicketStuff Minis project. With a test case we
> can make sure it will work for the future versions too! ;-)
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
>
> On Fri, Aug 29, 2014 at 11:53 AM, Soloschenko, Tobias <
> Tobias.Soloschenko@rewe-group.com> wrote:
>
> > Hello everyone,
> >
> > because of some migrations I had to partially include JSP files into
> > Wicket HTML Pages. I found a documentation for the prior 1.4 version
> > of Wicket and some Stack Overflow posts about newer implementations
> > (mentioned at the readme of the git repository).
> >
> > I modified and improved it a little bit and made it work for wicket
> 6.16.0.
> >
> > https://github.com/klopfdreh/wicket.jsp
> >
> > Is there any other way to do this out of the box in Wicket 6.16.0?
> >
> > kind regards,
> >
> > Tobias
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>