• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Class is not recognizing

 
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic