Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

about compiling servlet files in packages

 
Neha Aggarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey plzzzzzz temme how to compile servlet files i have already specified -classpath and -d options in javac

but still its giving errors regarding javax.servlet and all associated keywords

thanks in advance

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65534
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"plzzzzzz"? "temme"?

Please use real words when posting to the forums. Nonsense words only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Java Ranch!

Servlets are intended to run within a "container", like an application server. Examples are Tomcat, JBoss AS, GlassFish, etc.
The servlet container provides the jar file(s) which contain the classes you need to reference. These jar files will need to be added to your build classpath. The specific jar you need depends on the particular container you choose. Whatever that is, there are going to be lots of tutorials available that show how to get started. Just Google for those if they're not readily available at the provider's web site.

If you still have questions about how to get going, a forum dedicated to that particular container would be the right place to ask.

Good luck!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark E Hansen wrote:The specific jar you need depends on the particular container you choose.

Not really; you just need the API to compile. You *could* use an API library provided by the container, but don't *need* to.
 
Neha Aggarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using tomcat i think i didnt explain the problem properly
i included everything necessary but stil i dnt knw y the servlet-api.jar included in the classpath is nt being used nd thats y javax.servlet is prompting errors
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseRealWords as you were asked to previously.

Most likely you're not doing it right.
 
Neha Aggarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok i got your point.
thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!