Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > JAVA Technologies
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 27-11-06, 01:22 PM   #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 abhijeet_pcl has disabled reputation
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 symbol
symbol : class JspWriter
location: class ExampleTag
JspWriter out=pageContext.getOut();
^
ExampleTag.java cannot find symbol
symbol : 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???
abhijeet_pcl is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 27-11-06, 02:28 PM   #2 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
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 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Re: compiler is not detecting packages..

What is your class path? please cross verify it once again...
sk_kireeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 27-11-06, 03:25 PM   #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 abhijeet_pcl has disabled reputation
Re: compiler is not detecting packages..

My class path is:
"C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar"
abhijeet_pcl is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 27-11-06, 04:08 PM   #4 (permalink)
Moderator
 
t_mohan's Avatar
 
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 t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold
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
t_mohan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT +6.5. The time now is 03:01 PM.





Search Engine Optimization by vBSEO 3.1.0