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 package a web project

 
tennic xie
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a web project containing servlets. I also set up tomcat server in the eclipse.
There is no "main" in the project.

I did not know how to package these servlets and tomcat server into a jar to run WITHOUT the eclipse IDE(like a executable jar).

Thanks.

--------------
Jerry
 
Rob Spoor
Sheriff
Pie
Posts: 20751
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out what WAR files are.

Moving to Servlets.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A web project is not supposed to have a main. You can use the export functionality to pack it into a WAR or if you like ant you can write a build.xml. You can also use maven do package the files into a WAR.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Javaranch
 
Smitesh Shinde
Ranch Hand
Posts: 45
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Follow this link
Packaging Web Components
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic