question for kennethxu

Posted on 2003-02-27
Medium Priority
Last Modified: 2010-04-01
Hi Kenneth!
I still feel daft for not giving you the points last time (applet / servlet communication) and since I have another problem, I thought I ask you personally this time as compensation :-) (I only have 20 points left though...)

I have written a servlet which tries to utilise other classes, for example the QueryHandler class (see below).

public class DatabaseHelper extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{
        String qryparm = request.getParameter("id");
        int in = Integer.parseInt(qryparm);
        Vector myVec;
        QueryHandler myHandler = new QueryHandler();
        myVec = myHandler.idnumberQuery(in);

When I try to compile, the compiler tells me that it cannot find QueryHandler. QueryHandler's .class and .java files are in the same directory as DatabaseHelper.
What am I doing wrong?

Kind Regards
Sven Henry
Question by:SvenHJohansson
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 14

Accepted Solution

kennethxu earned 80 total points
ID: 8036209
thanks for your trust.

try to add the dir to classpath when you compile:

javac -classpath %classpath%;c:\dir\to\classfiles ....

if you still have problem, please let me know:
1. do you use package?
2. where are you files( .java, .class ) located?
3. how do you compile? (full command you used)


Author Comment

ID: 8039160
Thanks Kenneth,
adding the dir to javac did it.

Kind regards
Sven Henry
LVL 14

Expert Comment

ID: 8039192
glad to know that and thanks for the points :)

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hey fellow admins! This time, I have a little fairy tale for you. As many tales do, it starts boring and then gets pretty gory. I hope you like it. TL;DR: It is about an important security matter, you should read it if you run or administer Windows …
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question