Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Java Web Application programmatically

I am thinking of using a Java web application to create a customised website, 1. so a user can specify the background image, css, etc 2. user can specify other options 2. and at the end of the process, the user can download the WAR file, ready to be deployed wherever they wish.

So, what is the easiest way to programmatically create a Java web application to be deployed into Tomcat ?

Is there a framework that I can use or should I start from scratch ?

The following screenshots are taken from ArcGIS Server 10, where a user can create a new web application on the fly.

Create a web app 1 Create a web app 2 Create a web app 3

like image 241
Lydon Ch Avatar asked Apr 12 '26 09:04

Lydon Ch


2 Answers

so a user can specify the background image, css, etc

For all these there is no need of new war . it can be configured with the same web app.

All the things that you want to customized can come from DB

like image 198
jmj Avatar answered Apr 13 '26 22:04

jmj


I think a .war file is nothing but a renamed .zip file which is following some conventions on the folder and file structure it contains.

So the easiest way to do this i think is geneate a filestructure, packing it into a .zip file and rename it. You could first create a "template" file structure by hand, copy it and modify the contents you want.

I think any framework would be overkill here.

like image 30
Chris Avatar answered Apr 13 '26 21:04

Chris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!