• Post Reply Bookmark Topic Watch Topic
  • New Topic

New to Servlets-- how to get .ear file

 
Sunidhi Garg
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am learning servlet programming. I have 2 problems
1) when i compile i get errors that HttpServlet, HttpServletRequest, HttpServletResponse etc are not resolved.
2) However i earlier copiled my java file in Jbuilder and have a .class file from there. I tried to put the .java, .class and a .html file in one directory and wanted to use the deploy tool. But I do not know how to get a .ear file.

Can u pls tell me why my file doesnt compile and how to get a .ear file
 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For web applications, you normally create a .war file instead of a .ear file. The directory structure of your war should look like this:

myFile.war
  jsps, html pages, etc
  WEB-INF
    web.xml
    classes (servlets and any other java classes)
    lib (contains libraries your code depends on)
[ September 01, 2004: Message edited by: Anthony Watson ]
 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JBuilder also has wizards that will create the .war file for you. You can start by clicking File, New, Web Application.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!