aspose file tools*
The moose likes Servlets and the fly likes doubt on servlet compilation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "doubt on servlet compilation" Watch "doubt on servlet compilation" New topic
Author

doubt on servlet compilation

Yusuf Muhammed
Greenhorn

Joined: Dec 29, 2012
Posts: 4

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...


yuvi
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
Actually, you don't need that folder and file. It may get added when a war file is created, but it is not necessary.


Ping & DNS - my free Android networking tools app
Yusuf Muhammed
Greenhorn

Joined: Dec 29, 2012
Posts: 4

Thank you so much but what cmd to pass to create a war file ? ? ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
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

Joined: Dec 29, 2012
Posts: 4

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
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
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

Joined: Dec 29, 2012
Posts: 4

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. . .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt on servlet compilation