Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to deploy the development structure?

 
Karim Kiswarday
Ranch Hand
Posts: 50
Eclipse IDE Java PHP
  • 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
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • 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 Java PHP
  • 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
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic