Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Life after greenpages sample(What are the next steps to create a modular web app)
Life after greenpages sample [message #1032874] Wed, 03 April 2013 14:51 Go to next message
Fernando Kerko is currently offline Fernando KerkoFriend
Messages: 1
Registered: April 2013
Junior Member
Hello guys,

I am new to Virgo development. Nevertheless, I have some experience with OSGi, both with and without SpringDM.

However, my experience with web frameworks is quite limited.

My idea is now to create a Modular Web application, but the modules has to provide not only services, but also Web Pages, Controllers, etc.

The idea is to divide the application in bundles but not only in horizontal layers (services layers, infrastructure, etc.) But also in vertical layers (features).

So for instance, we would like to have a Web App that shows different menu entries depending on the available services. But when we click on those menu entries, we should be redirected to a Web Page contained in another bundle (which has a spring MVC architecture).

My questions are:

Am I missing the point with this architecture?

Is it possible to divide the web layer in different bundles but still using Spring MVC, spring Security and so on?
If yes, are those bundles a WAR or a JAR?
Is there sample code like Greenpages but showing a modular web GUI?

Thanks a lot folks!

Re: Life after greenpages sample [message #1033090 is a reply to message #1032874] Wed, 03 April 2013 21:02 Go to previous messageGo to next message
Daniel McGreal is currently offline Daniel McGrealFriend
Messages: 27
Registered: April 2012
Junior Member
Hi Fernando,
You might like http://www.eclipse.org/virgo/documentation/virgo-documentation-3.6.0.RELEASE/docs/snaps-guide/htmlsingle/virgo-snaps-guide.html which is a framework for modularising your web layer. I've had difficulty using it with Spring though, something about it not creating spring contexts for the snap bundles, if I remember correctly.
Best, Dan.
Re: Life after greenpages sample [message #1034667 is a reply to message #1033090] Fri, 05 April 2013 18:47 Go to previous messageGo to next message
Nayyab Naqvi is currently offline Nayyab NaqviFriend
Messages: 1
Registered: April 2013
Junior Member
HI, I am also new to Virgo Tomcat server and trying to deploy a simple bundle as a web app but getting a lot of error. Is there any good way to learn how to deploy a web app a bundles and other services in the form of bundles too. I tried to deploy Greenpages sample with the guide provided but couldn't do so. My virgo server is not showing the hosted webpage even though a bundle is deployed but with version 0.0.0. How do we actually create template.mf?? Can someone please help me pointing in right direction?? I have to use Spring framework as I want to deploy this app in Cloud Foundry. PFA. the image.
Thanks.
Re: Life after greenpages sample [message #1035466 is a reply to message #1032874] Sat, 06 April 2013 23:35 Go to previous messageGo to next message
Daniel McGreal is currently offline Daniel McGrealFriend
Messages: 27
Registered: April 2012
Junior Member
Hi, It looks like it was deployed to /greenpages.web?
Re: Life after greenpages sample [message #1064536 is a reply to message #1032874] Wed, 19 June 2013 18:28 Go to previous message
Mark Peters is currently offline Mark PetersFriend
Messages: 1
Registered: July 2009
Junior Member
I'm in the exact same boat, and would love some input from somebody who has gone down this road before.

Snaps does seem to introduce modularity, but at the cost of simply adding new DispatcherServlets at each of its sub context paths. In the sample application, they add a DispatcherServlet to /cat in the cat snap.

Is there any clean way to have one DispatcherServlet route requests to Spring services declared in another bundle?

Here's the specific scenario I have. I have a web client that uses ExtJS's RPC mechanism "ExtDirect" for async calls. I've worked out the modularity of the client side with Snaps, so that UI features can be added dynamically. It looks like this

/index.jsp (the snap host at / embeds script tags point to...)
/featureA/featureA.js (a snap at context path /featureA)
/featureB/featureB.js (a snap at context path /featureB)

However the way ExtDirect works is it sends all requests to one URL with post data. ExtDirectSpring works by putting a controller at "/router" and then scanning Spring services with certain annotations. I want those services to be able to be in their corresponding feature bundle. I can get that to work, but then those bundles' application contexts need to be web aware (to the same context as the snap host) to support things like session scoping. That's where I get lost.

Is the Snaps approach the only recommended way of modularizing by feature? Even if I take the snaps approach, does the snap actually share the web context at all with the parent, so that the Spring Web fundamentals can be shared?

Thanks.
Previous Topic:What is the correct location for defining "filterChainProxy"?
Next Topic:VTS with context.xml valve class not found exception
Goto Forum:
  


Current Time: Thu Apr 25 12:56:35 GMT 2024

Powered by FUDForum. Page generated in 0.03951 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top