473,495 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

cannot find symbol

1 New Member
Thanks to Gannon11 and ro351988- Moderator.
I give below the complete Java file and pls help me to rectify the errors.

package com.wrox.proj2ee.ch10.app;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.wrox.proj2ee.ch12.*// The requesthandlers interface in this package.
public class ShowRecordRequesthandler implements RequestHandler
{
private DataStore dataStore;

public ShowRecordRequestHandler()
{
dataStore = new DataStore();
}
public String handleRequest(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException
{
String name = request.getParameter("name");
if (name == null)
{
return "enterName.jsp";
}
else
{
DataBean dataBean = dataStore.getInfo(name);
if (dataBean == null)
{
return "sorryNotFound.jsp";
}
else
{
request.setAttribute("dataBean", dataBean);
return "showInfo.jsp";
}

}
}
}
I am getting the following errors:


C:\Program Files\Java\jdk1.5.0_11\bin>ShowRecordRequesthandle r.java

C:\Program Files\Java\jdk1.5.0_11\bin>javac ShowRecordRequesthandler.java
ShowRecordRequesthandler.java:6: cannot find symbol
symbol : class ch10
location: package com.wrox.proj2ee
import com.wrox.proj2ee.ch10;
^
ShowRecordRequesthandler.java:7: cannot find symbol
symbol: class RequestHandler
public class ShowRecordRequesthandler implements RequestHandler
^
ShowRecordRequesthandler.java:9: cannot find symbol
symbol : class DataStore
location: class com.wrox.proj2ee.ch10.app.ShowRecordRequesthandler
private DataStore dataStore;
^
ShowRecordRequesthandler.java:13: cannot find symbol
symbol : class DataStore
location: class com.wrox.proj2ee.ch10.app.ShowRecordRequesthandler
dataStore = new DataStore();
^
ShowRecordRequesthandler.java:24: cannot find symbol
symbol : class DataBean
location: class com.wrox.proj2ee.ch10.app.ShowRecordRequesthandler
DataBean dataBean = dataStore.getInfo(name);
^
5 errors

C:\Program Files\Java\jdk1.5.0_11\bin>
Feb 14 '07 #1
1 4890
r035198x
13,262 MVP
Thanks to Gannon11 and ro351988- Moderator.
I give below the complete Java file and pls help me to rectify the errors.

package com.wrox.proj2ee.ch10.app;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.wrox.proj2ee.ch12.*// The requesthandlers interface in this package.
public class ShowRecordRequesthandler implements RequestHandler
{
private DataStore dataStore;

public ShowRecordRequestHandler()
{
dataStore = new DataStore();
}
public String handleRequest(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException
{
String name = request.getParameter("name");
if (name == null)
{
return "enterName.jsp";
}
else
{
DataBean dataBean = dataStore.getInfo(name);
if (dataBean == null)
{
return "sorryNotFound.jsp";
}
else
{
request.setAttribute("dataBean", dataBean);
return "showInfo.jsp";
}

}
}
}
I am getting the following errors:


C:\Program Files\Java\jdk1.5.0_11\bin>ShowRecordRequesthandle r.java

C:\Program Files\Java\jdk1.5.0_11\bin>javac ShowRecordRequesthandler.java
ShowRecordRequesthandler.java:6: cannot find symbol
symbol : class ch10
location: package com.wrox.proj2ee
import com.wrox.proj2ee.ch10;
^
ShowRecordRequesthandler.java:7: cannot find symbol
symbol: class RequestHandler
public class ShowRecordRequesthandler implements RequestHandler
^
ShowRecordRequesthandler.java:9: cannot find symbol
symbol : class DataStore
location: class com.wrox.proj2ee.ch10.app.ShowRecordRequesthandler
private DataStore dataStore;
^
ShowRecordRequesthandler.java:13: cannot find symbol
symbol : class DataStore
location: class com.wrox.proj2ee.ch10.app.ShowRecordRequesthandler
dataStore = new DataStore();
^
ShowRecordRequesthandler.java:24: cannot find symbol
symbol : class DataBean
location: class com.wrox.proj2ee.ch10.app.ShowRecordRequesthandler
DataBean dataBean = dataStore.getInfo(name);
^
5 errors

C:\Program Files\Java\jdk1.5.0_11\bin>
Well the classes are not being found.
try using
Expand|Select|Wrap|Line Numbers
  1.  import com.wrox.proj2ee.*;
instead
Feb 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

15
28785
by: Bjorn Jensen | last post by:
Hi! An beginner question: Pleas help me with this (-: Error (the arrow points on the s in sqrt) ===== tal.java:6: cannot find symbol symbol : method sqrt(int) location: class tal...
1
4607
by: vsp15584 | last post by:
Hii..i use the coding as below :- import java.applet.applet; import java.awt.*; import com.sun.j3d.utils.applet.mainframe; import com.sun.j3d.utils.universe.*; import...
1
3573
by: jank | last post by:
hi, I wrote sending mass email program in java. If i try to compile using ant compiler, i am getting this error. c:\mail\src\com\mail\action\SendMail.java:125: cannot find symbol ...
4
5090
by: jingchua | last post by:
Hi, can anyone help out here???? I have the below error after compling the file. Any idea what is wrong in the declaration that was done in the above code??? Appreciate any help on shedding some...
2
2960
by: jazzyme2 | last post by:
New to Java. Working on this and ran into this problem. Any clues? java:42: cannot find symbol symbol : constructor Pay() location: class Pay Pay Emp1 = new Pay(); ^ 43:...
2
6637
by: karinmorena | last post by:
I'm having 4 errors, I'm very new at this and I would appreciate your input. The error I get is: Week5MortgageGUI.java:151:cannot find symbol symbol: method allInterest(double,double,double)...
10
13050
by: CodeNoob | last post by:
please help been working on a project got it down to 5 errors from 100 now i have no idea what to do. Errors: init: deps-jar: Created dir: C:\Users\Tommy\Desktop\build\classes Compiling 306...
3
3156
by: Sindhu Rani | last post by:
i hav created 3 classes in 3 different files. am gettin an error durin compilation. wat shud i do??? C:\s\source>javac -d ..\classes devtestdrive.java devtestdrive.java:5: cannot resolve symbol...
2
2853
suzee_q00
by: suzee_q00 | last post by:
Compiler seems to be hanging up on "new" but I know it isn't but I can't seem to figure out what it is that it doesn't like. Been chasing my tail for the last couple of days. Any help would be...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6991
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7196
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7373
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.