• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic