*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
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?
 
wood burning stoves
 
subject: Reusing Java GUI web Component and it´s controller in more than one WAR
 
Similar Threads
HFSJ P408 jsp Include tag example
A jsp deployment problem
HELP! Weird Include problem!
Struts1 - Create Action and Form for a JSP used in Tiles
Eclipse 3.1 and jsp