| Author |
why?help me! : the import javax.servlet is never used
|
li java
Greenhorn
Joined: Mar 26, 2004
Posts: 1
|
|
package packagename; import javax.servlet.*; import javax.servlet.http.*; public class hello { public void test(){ String ls="" ; ls = "dxf"; System.out.println(ls+": is "+ls); } } then save the class,general error: the import javax.servlet is never used the import javax.servlet.http is never used why?
|
 |
eammon bannon
Ranch Hand
Joined: Mar 16, 2004
Posts: 140
|
|
|
These won't be errors, but warnings. There is nothing in your code which won't make it compile or run, but you are importing the packages javax.servlet and javax.servlet.http and not using any classes from either package, hence the warning. Just remove the import statements.
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
li java, Welcome to JavaRanch! We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy. Around a website focused on Java programming, we aren't too likely to believe that anybody's name is Java. Thanks Pardner! Hope to see you 'round the Ranch!
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
 |
|
|
subject: why?help me! : the import javax.servlet is never used
|
|
|