Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet packages in addition to J2SE  RSS feed

 
Patrick Smith
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i just implemented Tomcat and wanted to get my first servlet running (HeadFirst/1st chapter), but javac tells me that it can't find the servlet packages (Package javax.servlet.*; javax.servlet.http.*).
Does this mean i have to go to Enterprise edition?
Thanks for help, Patrick
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.
Just add tomcat/common/lib/servlet-api.jar to your classpath.
[ November 22, 2007: Message edited by: Ben Souther ]
 
Patrick Smith
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ben,
thanks for your reply, it's all fine now.
So Tomcat includes the Servlets spec. Can you tell me where i can find docs relating to "what includes what" (J2EE, EJB, container, etc.)?
Thanks again, Patrick
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat doesn't include the full J2EE (now JEE) spec.
It includes the servlet and JSP specs.
Both can be found in my signature.
 
Patrick Smith
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i'm sorry but i still can't get it working. I thought when having the variable set it would all be fine; i couldn't test as i had my files away (on an external HD).
First question: if you are naming the Tomcat directory, i guess it's the one that gets installed during Tomcat installation? I left mine at default value, and that's what it is:
"C:\Program Files\Apache Software Foundation\Tomcat 5.5"
So my environment variable should exactly be set like this, correct?
Thanks for your patience
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!