You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "kohaeri@gmail.com" <ko...@gmail.com> on 2011/09/26 21:00:24 UTC

Servlet and Wicket

We have significant Servlet JSP investment in our major development efforts.
Now, we want to switch from JSP to Wicket. Because of request dispatching
and current investment from http to servlet connectivity we want to reuse
the servlet components and swap out just the JSP with Wicket.

Is there a way to make this work? The investment in Servlet development is
significant. Therefore we want to reuse them. If cannot, we may have to
continue with JSP. If someone know how we can integrate Servlet and Wicket
in the presentation layer please let me know. Your response is very much
appreciated.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3844944.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Servlet and Wicket

Posted by "kohaeri@gmail.com" <ko...@gmail.com>.
In my implementation I have in the presentation layer I have:
Interfacing with Http web Server (with IIS and apache http server)

Dispatcher Servlet
(awaiting incoming httpservletRequest)
                      |
        Wicket Components

On the Application Service layer, I have

                       EJB Beans

And then on the Data Layer I have
             JPA/Entity

My question is what should I be concerned about in accessing Wicket
Components from the Servlets since the URL would be connecting
directly to servlets.

I know how this works with JSP but I don't know how to access Wicket
apps from Servlets. Any examples you have would be helpful. We have to
have the Servlet in from due to current connection from IIS and
Apache. Your help or best practices on this would be appreciated.








On Mon, Sep 26, 2011 at 6:34 PM, Igor Vaynberg-2 [via Apache Wicket]
<ml...@n4.nabble.com> wrote:
> On Mon, Sep 26, 2011 at 3:06 PM, [hidden email] <[hidden email]> wrote:
>> I am asking this question because I have reviewed all the books published
>> on
>> Wicket including the recent Wicket Cookbook, I have not seen any examples
>> of
>> how you can replace JSP with Wicket. I want to use Wicket in my current
>> project but it would be cost prohibitive if I have to discard all the
>> Servlet implementation.
>
> wicket and servlets can live side-by-side. wicket doesnt take over the
> url space so servlets and jsps can still be accessed like they used to
> be.
>
>> Now, my question is, how easy would it be to replace
>> the JSP code with Wicket code. Or to ask it another way. Is it possible to
>> reuse my current Servlet code and integrate it with Wicket for the UI. It
>> would help to see examples of how to integrate Servlet code with Wicket.
>
> define "integrate"
>
> -igor
>
>
>>
>> I hope this helps clearify things a bit.
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3845548.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> 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]
>
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3845612.html
> To unsubscribe from Servlet and Wicket, click here.


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3846073.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Servlet and Wicket

Posted by Igor Vaynberg <ig...@gmail.com>.
On Mon, Sep 26, 2011 at 3:06 PM, kohaeri@gmail.com <ko...@gmail.com> wrote:
> I am asking this question because I have reviewed all the books published on
> Wicket including the recent Wicket Cookbook, I have not seen any examples of
> how you can replace JSP with Wicket. I want to use Wicket in my current
> project but it would be cost prohibitive if I have to discard all the
> Servlet implementation.

wicket and servlets can live side-by-side. wicket doesnt take over the
url space so servlets and jsps can still be accessed like they used to
be.

> Now, my question is, how easy would it be to replace
> the JSP code with Wicket code. Or to ask it another way. Is it possible to
> reuse my current Servlet code and integrate it with Wicket for the UI. It
> would help to see examples of how to integrate Servlet code with Wicket.

define "integrate"

-igor


>
> I hope this helps clearify things a bit.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3845548.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: Servlet and Wicket

Posted by "kohaeri@gmail.com" <ko...@gmail.com>.
Thank you for all of you who responded. See here the architecture we are
trying to implement:


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3846041.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Servlet and Wicket

Posted by manuelbarzi <ma...@gmail.com>.
i would suggest you, hohaeri, to do the migration progressively, by
keeping your servlet-application living with your new
wicket-application, while translating one by one your pages from the
first to the latter, til finally have all your application fully
migrated. if you have correctly done SoC in your current application
(business objects, integration layer, components...) then moving from
your servlet-app to the new wicket-app wouldn't be so painful. if this
is not the case, then "just re-do it" all... probably it may worth it
;-)
.



On Tue, Sep 27, 2011 at 12:37 AM,  <no...@yahoo.com> wrote:
> Hi..
> I understood what your issue is. Just want to share my experience here.
> I used to convert my struts application to wicket. I found there were no easy way to solve this matter. Since wicket is component based, not rely on servlet to do an action.
> Finally, I ended this matter by recreating all the jsp page to wicket page one by one.
> The html dan css structure were still usable. Just need reform the page with wicket style.
> Other things like form action servlet, link, etc are not much usable except the business logic.
> The way jsp do page templating (e.g. tiles or sitemesh) was also not usable. In wicket we do inheritance or border to do page templating.
> My conclusion, this is not an easy thing to do. But if you really want to, you really need to spent time to reform your presentation. It can be a pain if your project is huge size.
>
> I know I didn't share any solution here, just shared my thoughts.
> Hope others have solution for you.
>
> Cheers,
> Noven
> Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung Teruuusss...!
>
> -----Original Message-----
> From: "kohaeri@gmail.com" <ko...@gmail.com>
> Date: Mon, 26 Sep 2011 15:06:42
> To: <us...@wicket.apache.org>
> Reply-To: users@wicket.apache.org
> Subject: Re: Servlet and Wicket
>
> I am asking this question because I have reviewed all the books published on
> Wicket including the recent Wicket Cookbook, I have not seen any examples of
> how you can replace JSP with Wicket. I want to use Wicket in my current
> project but it would be cost prohibitive if I have to discard all the
> Servlet implementation. Now, my question is, how easy would it be to replace
> the JSP code with Wicket code. Or to ask it another way. Is it possible to
> reuse my current Servlet code and integrate it with Wicket for the UI. It
> would help to see examples of how to integrate Servlet code with Wicket.
>
> I hope this helps clearify things a bit.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3845548.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: Servlet and Wicket

Posted by Pointbreak <po...@ml1.net>.
No that was not was I was saying. I am just advising you to let Wicket
manage complete pages, instead of parts of pages composed within another
servlet architecture. I would give you the same advise if you were using
JSF instead.

On Tuesday, September 27, 2011 11:58 AM, "kohaeri@gmail.com"
<ko...@gmail.com> wrote:
> Are you saying that I can either use Wicket without Servlet or use
> Servlet
> with JSP/JSF just like our previous implementation?
> 
> I thought Wicket components would work under a Servlet environment. If
> Wicket cannot run under Servlet then, I would like to know now so that we
> can consider JSF instead. Your response is appreciated.
> 
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3848610.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> 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: Servlet and Wicket

Posted by "kohaeri@gmail.com" <ko...@gmail.com>.
Are you saying that I can either use Wicket without Servlet or use Servlet
with JSP/JSF just like our previous implementation?

I thought Wicket components would work under a Servlet environment. If
Wicket cannot run under Servlet then, I would like to know now so that we
can consider JSF instead. Your response is appreciated.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3848610.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Servlet and Wicket

Posted by Pointbreak <po...@ml1.net>.
On Monday, September 26, 2011 8:39 PM, "kohaeri@gmail.com"
<ko...@gmail.com> wrote:
> We have to have the
> Servlets in front due to current connection from IIS and Apache.

That doesn't make any sense. For IIS and Apache it really doesn't matter
at all.

> Here is what the architecture of my implementation looks like:
> 
> Dispatcher Servlet
> (awaiting incoming httpservletRequest)
>                       |
>         Wicket Components
> 
> On the Application Service layer, I have 
> 
>                        EJB Beans
> 
> And then on the Data Layer I have 
>              JPA/Entity
> 
> My question is what should I be concerned about in accessing Wicket
> Components from the Servlets since the URL would be connecting directly
> to servlets.

I would never advice to do it this way. If you want to keep your
application in a request-based dispatcher kind of architecture, than
don't use wicket. If your reason for moving to wicket is to have better
maintainable software, then by all means, don't rebuild everything
exactly the same in wicket.

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


Re: Servlet and Wicket

Posted by "kohaeri@gmail.com" <ko...@gmail.com>.
Here is what the architecture of my implementation looks like:

Dispatcher Servlet
(awaiting incoming httpservletRequest)
                      |
        Wicket Components

On the Application Service layer, I have 

                       EJB Beans

And then on the Data Layer I have 
             JPA/Entity

My question is what should I be concerned about in accessing Wicket
Components from the Servlets since the URL would be connecting directly to
servlets.

I know how this works with JSP but I don't know how to access Wicket apps
from Servlets. Any examples you have would be helpful. We have to have the
Servlets in front due to current connection from IIS and Apache. Your help
or best practices on this would be appreciated.






--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3846081.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Servlet and Wicket

Posted by no...@yahoo.com.
Hi.. 
I understood what your issue is. Just want to share my experience here. 
I used to convert my struts application to wicket. I found there were no easy way to solve this matter. Since wicket is component based, not rely on servlet to do an action. 
Finally, I ended this matter by recreating all the jsp page to wicket page one by one. 
The html dan css structure were still usable. Just need reform the page with wicket style. 
Other things like form action servlet, link, etc are not much usable except the business logic.  
The way jsp do page templating (e.g. tiles or sitemesh) was also not usable. In wicket we do inheritance or border to do page templating.
My conclusion, this is not an easy thing to do. But if you really want to, you really need to spent time to reform your presentation. It can be a pain if your project is huge size. 

I know I didn't share any solution here, just shared my thoughts. 
Hope others have solution for you.

Cheers,
Noven
Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung Teruuusss...!

-----Original Message-----
From: "kohaeri@gmail.com" <ko...@gmail.com>
Date: Mon, 26 Sep 2011 15:06:42 
To: <us...@wicket.apache.org>
Reply-To: users@wicket.apache.org
Subject: Re: Servlet and Wicket

I am asking this question because I have reviewed all the books published on
Wicket including the recent Wicket Cookbook, I have not seen any examples of
how you can replace JSP with Wicket. I want to use Wicket in my current
project but it would be cost prohibitive if I have to discard all the
Servlet implementation. Now, my question is, how easy would it be to replace
the JSP code with Wicket code. Or to ask it another way. Is it possible to
reuse my current Servlet code and integrate it with Wicket for the UI. It
would help to see examples of how to integrate Servlet code with Wicket.

I hope this helps clearify things a bit.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3845548.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Servlet and Wicket

Posted by "kohaeri@gmail.com" <ko...@gmail.com>.
I am asking this question because I have reviewed all the books published on
Wicket including the recent Wicket Cookbook, I have not seen any examples of
how you can replace JSP with Wicket. I want to use Wicket in my current
project but it would be cost prohibitive if I have to discard all the
Servlet implementation. Now, my question is, how easy would it be to replace
the JSP code with Wicket code. Or to ask it another way. Is it possible to
reuse my current Servlet code and integrate it with Wicket for the UI. It
would help to see examples of how to integrate Servlet code with Wicket.

I hope this helps clearify things a bit.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3845548.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Servlet and Wicket

Posted by Igor Vaynberg <ig...@gmail.com>.
you did not ask a specific enough question...

-igor


On Mon, Sep 26, 2011 at 12:00 PM, kohaeri@gmail.com <ko...@gmail.com> wrote:
> We have significant Servlet JSP investment in our major development efforts.
> Now, we want to switch from JSP to Wicket. Because of request dispatching
> and current investment from http to servlet connectivity we want to reuse
> the servlet components and swap out just the JSP with Wicket.
>
> Is there a way to make this work? The investment in Servlet development is
> significant. Therefore we want to reuse them. If cannot, we may have to
> continue with JSP. If someone know how we can integrate Servlet and Wicket
> in the presentation layer please let me know. Your response is very much
> appreciated.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Servlet-and-Wicket-tp3844944p3844944.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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