| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|
#1 (permalink) |
|
Junior Member
Join Date: Apr 2006
Location: India
Posts: 25
Thanks: 3 Thanked 1 Times in 1 Posts Thanks: 3
Thanked 1 Time in 1 Post
Rep Power: 3
|
compiler is not detecting packages..
My file is-
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\TagTest\WEB-INF\classes\ExamplTag.java: import java.io.*; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; public class ExampleTag extends TagSupport { public int doStartTag() { try { JspWriter out=pageContext.getOut(); out.print("Custom tag example "+" (ExampleTag) "); }catch(IOException ioe) { System.out.println("Error in ExampleTag: "+ ioe); } return(SKIP_BODY); } } ------------------------------------------------------ On compiling: C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\TagTest\WEB- INF\classes>javac ExampleTag.java following errors are: ExampleTag.java:2: package javax.servlet.jsp does not exist import javax.servlet.jsp.*; ^ ExampleTag.java:3: package javax.servlet.jsp.tagext does not exist import javax.servlet.jsp.tagext.*; ^ ExampleTag.java:6: cannot find symbol symbol: class TagSupport public class ExampleTag extends TagSupport ^ ExampleTag.java cannot find symbolsymbol : class JspWriter location: class ExampleTag JspWriter out=pageContext.getOut(); ^ ExampleTag.java cannot find symbolsymbol : variable pageContext location: class ExampleTag JspWriter out=pageContext.getOut(); ^ ExampleTag.java:16: cannot find symbol symbol : variable SKIP_BODY location: class ExampleTag return(SKIP_BODY); ^ ExampleTag.java:16: illegal start of type return(SKIP_BODY); ^ 7 errors Whats wrong in that??? |
|
|
|
|
|
#2 (permalink) |
|
Super Moderator
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117 Thanked 241 Times in 198 Posts Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51
|
Re: compiler is not detecting packages..
What is your class path? please cross verify it once again...
|
|
|
|
|
|
#3 (permalink) |
|
Junior Member
Join Date: Apr 2006
Location: India
Posts: 25
Thanks: 3 Thanked 1 Times in 1 Posts Thanks: 3
Thanked 1 Time in 1 Post
Rep Power: 3
|
Re: compiler is not detecting packages..
My class path is:
"C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar" |
|
|
|
|
|
#4 (permalink) |
|
Moderator
Join Date: Apr 2006
Location: India
Posts: 636
Thanks: 57 Thanked 78 Times in 63 Posts Thanks: 57
Thanked 78 Times in 63 Posts
Rep Power: 17
|
Re: compiler is not detecting packages..
Hi Abhijeet,
Please remove you testApplication from the ROOT folder and place it in the webapps folder, i,e one level up. And also check in you application's classes folder for the servlet-api.jar , if found remove it from your application's classes folder, there should be only one servlet-api.jar in the tomcat folder only.The servlet specification fails over here. Please try these steps and let me know , if u still get the error pls give me a full stack trace, i'll let u know Thank You
__________________
M0h@n |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help me for Interview question | ajutipu | EMBEDED SYSTEMS & VLSI | 4 | 31-08-06 08:04 PM |
| Java Compiler doubt | wizkid | JAVA Technologies | 0 | 02-08-06 01:15 PM |
| A UNIQUE JAVA COMPILER | wizkid | JAVA Technologies | 0 | 26-07-06 05:55 PM |
| urgent help required in Compiler Design | coolguyrahul | DATA STRUCTURES, C, C++, VC ++ | 2 | 18-04-06 09:23 AM |
| Some Industry standard packages of repute | HELP | Companies Info & Recruitment Process | 1 | 21-02-06 01:27 AM |