Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt on servlet compilation

 
Yusuf Muhammed
Greenhorn
Posts: 4
Chrome Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai i'm new to this page nd beginner in servlet so i need your help guys..
i downloaded my servlet code i know why we are using META-INF/MANIFEST.MF file but my question is how to compile the code to create that folder and file...? ? ? ?
i placed my folder in tomcat.../webapps and tat folder name is DEMOSERVLET with in tat folder i'm having my all servlet files..(WEB_INF,login.html,META-INF).
Advance THANKS for helping...
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, you don't need that folder and file. It may get added when a war file is created, but it is not necessary.
 
Yusuf Muhammed
Greenhorn
Posts: 4
Chrome Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much but what cmd to pass to create a war file ? ? ?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A war file is nothing but a jar file with a different file extension, and a convention as to what its contents are. You can create it from the command line via the jar utility or -and this is what I advise you to do if you don't already- using the ant build tool's war task.

(And a jar file is nothing but a zip file with a different file extension, just in case you were wondering, so you can use any zip handling tool as well.)
 
Yusuf Muhammed
Greenhorn
Posts: 4
Chrome Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry but still am confused if my servlets folder is not in webapps means i ll use this cmd jar -cvf DEMOSERVLET.war * to create a war file nd i ll deploy it through tomcat but now i placed the full folder in tomcat webapps so can you tell the command to create war ? ? ?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what you're asking. It sounds if you are successfully creating a war file, but now you're asking how to create a war file? Maybe you can rephrase the question while also giving more detail on what you did and did not do successfully.
 
Yusuf Muhammed
Greenhorn
Posts: 4
Chrome Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorrry Ulf Dittmer i actually thought for every servlet we need to create META-INF/MANIFEST.mf file so oly asked whether it ll get created through cmd nd if so wat is tat cmd.... but now i get cleared servlet works cool with out that file... Thanks for your help. . .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic