• Post Reply Bookmark Topic Watch Topic
  • New Topic

Class is not recognizing  RSS feed

 
Bal Sharma
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everybody:
I do not know what I am doing wrong? Please give me some light. I have package name bkservletpkg. I have public LongCookie class that extends Cookie and complies. I am trying to use that class from another class CustomSearchEngine. CustomSearchEngine is inside same package and public class. It does not recognize LongCookie public class. I am getting following errror.

C:\tomcat4\webapps\mydev\WEB-INF\classes\bkservletpkg>javac CustomSearchEngine.java
CustomSearchEngine.java:26: cannot resolve symbol
symbol : class LongCookie
location: class bkservletpkg.CustomSearchEngine
Cookie searchStringCookie = new LongCookie("searchString", searchString);
^
CustomSearchEngine.java:35: cannot resolve symbol
symbol : class LongCookie
location: class bkservletpkg.CustomSearchEngine
Cookie numResultCookie = new LongCookie("searchString", numResult);
^
2 errors
I will appriciate any response. Thanks BK
 
Dorj Galaa
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
you must create bkservletpkg subdirectory in WEB-INF/classes
create CustomSearchEngine sub directory in bkservletpkg
put class file in to CustomSearchEngine directory.
run your servlet http://localhost/alias/bkservletpkg.CustomSearchEngine.yorservlet
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!