aspose file tools
The moose likes Java in General and the fly likes Reusing Java GUI web Component and it´s controller in more than one WAR Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Reusing Java GUI web Component and it´s controller in more than one WAR" Watch "Reusing Java GUI web Component and it´s controller in more than one WAR" New topic
Author

Reusing Java GUI web Component and it´s controller in more than one WAR

marcos villalba
Greenhorn

Joined: Jan 03, 2013
Posts: 1
Hello! Here is my first message into this forum. Thanks for the reading and congrats for a great site!

Under a Java EE enviroment, I have a web page built including several JSP files. Lets say one of the included JSP is header.jsp. Can be very similar to the one used by Stackoverflow, showing info about the user, links etc. This JSP is linked to a java controller to fetch user info, and is part of my WAR file including all the web application.

To develop it I used Eclipse and to build and package it I use Maven.

Now I need to build a new webApplication (so a new war) and I want to reuse the header.

What I pretend is:

not to duplicate code
both wars use one version of the header code
So the question is:

There is way to avoid copy & pasting both files (header.jsp & controller.java) from old project to the new one?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Reusing Java GUI web Component and it´s controller in more than one WAR
 
Similar Threads
HELP! Weird Include problem!
A jsp deployment problem
HFSJ P408 jsp Include tag example
Eclipse 3.1 and jsp
Struts1 - Create Action and Form for a JSP used in Tiles