Error Package Javax.servlet.jsp Does Not Exist
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn
Package Javax.servlet.jsp Does Not Exist Maven
more about Stack Overflow the company Business Learn more about hiring developers or java: package javax.servlet does not exist posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Package Javax.servlet Does Not Exist Netbeans
Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Compile error: package javax.servlet does not exist up vote package javax.servlet.http does not exist maven 36 down vote favorite 6 I have a package in which I import javax.servlet.* and javax.servlet.http.* When I try to compile it in command prompt I get the error package javax.servlet does not exist I use JDK 1.7.0 and Tomcat 6.0. java servlets compilation compiler-errors share|improve this question edited Feb 8 '12 at 12:27 BalusC 683k20824782695 asked Feb 8 '12 at 12:22 Karadous 55821436 add a comment| 8 package javax.servlet.http does not exist ant build Answers 8 active oldest votes up vote 46 down vote accepted You need to add the path to Tomcat 6's /lib/servlet-api.jar file to the compile time classpath. javac -cp .;/path/to/Tomcat/lib/servlet-api.jar com/example/MyServletClass.java The classpath is where Java needs to look for imported dependencies. It will otherwise default to the current folder which is included as . in the above example. The ; is the path separator for Windows; if you're using an Unix based OS, then you need to use : instead. share|improve this answer answered Feb 8 '12 at 12:26 BalusC 683k20824782695 1 true, but in the future consider using maven to solve this kind of problems for you –Kris Feb 8 '12 at 12:44 5 Or just an IDE like Eclipse. I'd however recommend continuing learning the hard way until you can almost dream it. Otherwise it will be hard to understand how IDEs work under the covers. –BalusC Feb 8 '12 at 12:46 thanks BalusC. it solved the problem. –Karadous Feb 8 '12 at 12:55 add a comment| up vote 5 down vote In a linux environment the soft link apparently does not work. you must use the physical path. for instance on my ma
here for a quick overview of the site Help Center
Package Javax.servlet Does Not Exist Eclipse
Detailed answers to any questions you might have Meta Discuss package javax.servlet does not exist in ubuntu the workings and policies of this site About Us Learn more about Stack Overflow
Package Javax.servlet Does Not Exist Intellij
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x http://stackoverflow.com/questions/9193228/compile-error-package-javax-servlet-does-not-exist Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ANT Build Fail : package javax.servlet.jsp does not exist [closed] up vote 2 down vote favorite I am trying http://stackoverflow.com/questions/8061027/ant-build-fail-package-javax-servlet-jsp-does-not-exist to build a sample application using ANT build. But i am getting an exception : package javax.servlet.jsp does not exist. Here is my sample build.xml file. Application doesn't has any problem, but only in build there appears to be some problem. Please explain me whats the problem. I am new to ANT build.
not exist Summary: package javax.servlet.jsp does not exist Status: https://netbeans.org/bugzilla/show_bug.cgi?id=191023 RESOLVED INVALID Product: javaee Classification: Unclassified Component: JSP Version: 7.0 Hardware: PC Linux Priority: P3 (vote) TargetMilestone: 7.0 Assigned To: Petr Hejl QA Contact: issues@javaee URL: Whiteboard: Keywords: Depends on: Blocks: Show dependency tree /graph Reported: 2010-10-15 10:19 UTC by Tomas Mysik Modified: 2015-08-26 07:09 UTC (History) CC List: 0 users See does not Also: Issue Type: DEFECT Exception Report : Attachments Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description Tomas Mysik 2010-10-15 10:19:05 UTC I tried to follow a tutorial on [1], so I downloaded sources [2]. Maven resolved all does not exist missing dependencies correctly, however, if one opens EmployeeViewer.jsp, it is marked with an error on the 1st line (package javax.servlet.jsp does not exist). I tried to specify a server (Tomcat 6.x) and also to build the application - buid is OK but the error remains. Thanks a lot. Product Version: NetBeans IDE Dev (Build 101014-aba4df6c138d) Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01 System: Linux version 2.6.32-25-generic running on amd64; UTF-8; cs_CZ (nb) [1] http://www.podolinsky.cz/2010/09/jak-vytvorit-java-web-aplikaci-s-podporou-spring-a-jpa/ [2] http://www.podolinsky.cz/wp-content/uploads/2010/09/spring-helloworld-src.zip Comment 1 everflux 2011-01-07 20:51:46 UTC (In reply to comment #0) > I tried to follow a tutorial on [1], so I downloaded sources [2]. Maven > resolved all missing dependencies correctly, however, if one opens I assume that you have a missing dependency on the JSP api. Please try adding this to the pom.xml and "clean and build" your project. Reload the JSP file afterwards and check if this resolves your problem.