Wicket in other application

classic Classic list List threaded Threaded
4 messages Options
Gim
Reply | Threaded
Open this post in threaded view
|

Wicket in other application

Gim
Hello! Currently, I have two applications: one wicket and one in struts jsp.

Both need to interact. I keep the same HttpServletRequest and HttpSession in both apliacaiones.

The solution I thought is to unify the wicket application in another application.

How do I?
Reply | Threaded
Open this post in threaded view
|

Re: Wicket in other application

aksarben
What do you mean by "unify"? Do you want to merge them into a single
application with only one code base? Or do you mean something else?

If you intend to keep them as two separate applications, there are number
of techniques for inter-process communication.




From:   Alis <[hidden email]>
To:     [hidden email]
Date:   05/16/2013 08:55 AM
Subject:        Wicket in other application



Hello! Currently, I have two applications: one wicket and one in struts
jsp.

Both need to interact. I keep the same HttpServletRequest and HttpSession
in
both apliacaiones.

The solution I thought is to unify the wicket application in another
application.

How do I?



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Wicket-in-other-application-tp4658859.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]




**

This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient.  Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law.  If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**
Reply | Threaded
Open this post in threaded view
|

Re: Wicket in other application

Jan Riehn
Hello Alis,

the Wicket programming model is based on the typical web application
request scenario - one thread typically processes one HTTP request using
the org.apache.wicket.protocol.http.WicketFilter. This filter sets the
application context using a thread-local, many wicket internals and also
analogous many wicket applications use this thread-local over a static
method by Application.get().

For the case that code for different application instances or even
outside of the WicketFilter contexts request must be executed, you can
use the following template. It works similar to the WicketFilter.


     public ApplicationContextTemplate(Application application) {
         final ThreadContext previousThreadContext = ThreadContext.detach();
         try {
             ThreadContext.setApplication(application);
             execute();
         } finally {
             ThreadContext.restore(previousThreadContext);
         }
     }

     protected abstract void execute();


Best regards,

Jan


On 05/16/2013 04:04 PM, Richard W. Adams wrote:

> What do you mean by "unify"? Do you want to merge them into a single
> application with only one code base? Or do you mean something else?
>
> If you intend to keep them as two separate applications, there are number
> of techniques for inter-process communication.
>
>
>
>
> From:   Alis <[hidden email]>
> To:     [hidden email]
> Date:   05/16/2013 08:55 AM
> Subject:        Wicket in other application
>
>
>
> Hello! Currently, I have two applications: one wicket and one in struts
> jsp.
>
> Both need to interact. I keep the same HttpServletRequest and HttpSession
> in
> both apliacaiones.
>
> The solution I thought is to unify the wicket application in another
> application.
>
> How do I?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-in-other-application-tp4658859.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]
>
>
>
>
> **
>
> This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient.  Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law.  If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
> **
>


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

Gim
Reply | Threaded
Open this post in threaded view
|

Re: Wicket in other application

Gim
This post was updated on .
In reply to this post by aksarben
Yes, i want to merge them into a single application with only one code base.

I'm bringing in other wicket application.


I began by:

web.xml

<?xml version="1.0" encoding="UTF-8"?>
"">

<web-app id="WebApp_173">

   

   
</web-app>