• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to deploy the development structure?

 
Ranch Hand
Posts: 50
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
I'm studying jsp and servlet on head first book.

I have completed the 3rd chapter and I have seen that the development and the deployment structures are different.
I have attached two screenshots FYR.

[development]


[deployment]


The development structure used is very good because:
1) I divide the src files from the compiled files (good for versioning)
2) I have a web directory where I can create my structure (picture, css and other files)
3) a lot of other good reason

But now I am studying the deployment chapter and I don't understand how I can deploy my development structure.
So far I have copied the files manually (I used a script ad-hoc), but if I want to deploy them by a .war file?
I have create a .war file but it is stuck with the development structure.

Maybe if I use Ant I avoid this problem (I don't know), but whether I want to do it manually?
Do you know whether this structure is not good?
Do you have suggestions?

Thanks
Karim
 
Creator of Enthuware JWS+ V6
Posts: 3346
303
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Karim,

So far I have copied the files manually (I used a script ad-hoc), but if I want to deploy them by a .war file?


If you want to deploy them as a .war file you can do it either manually (see HowToCreateWebApplicationWithoutAnIDE ), or automatically by using Tomcat (it will do it for you). You can also use ant scripts or maven but it involves learning something new which will cost you some preparation time.

Regards,
Frits
 
Karim Kiswarday
Ranch Hand
Posts: 50
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Frits,
I have read your document.

Now I have thought the better development structure could be the same of the deployment, with the src directory out of the context root.
In this manner it is very easy to create a .war archive with all files and deploy on the server.

I also think that the Head First book's development structure is mislead and not very good whether you need to deploy a .war file.

What do you think?

KK
 
Frits Walraven
Creator of Enthuware JWS+ V6
Posts: 3346
303
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Now I have thought the better development structure could be the same of the deployment, with the src directory out of the context root.
In this manner it is very easy to create a .war archive with all files and deploy on the server.


Yes, that is a good idea! and that is how it is done in most IDEs like Eclipse (just create a Dynamic Web Project)

or automatically by using Tomcat (it will do it for you).


did I write that , I meant Eclipse here ...

I also think that the Head First book's development structure is mislead and not very good whether you need to deploy a .war file.


I also agree that they could have made it easier...

Regards,
Frits
 
I can't take it! You are too smart for me! Here is the tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic