Cannot Find Symbol Error In Servlet
Contents |
New Topic programming forums Java Java JSRs Mobile Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other cannot find symbol error in java all forums Forum: Servlets cannot find symbol : class HttpServletResquest cannot find symbol error in java compile Pradeep Kumar Devar Greenhorn Posts: 7 posted 7 years ago Hello everyone, I am new to Servlets cannot find symbol error in java interface and i am trying to run a simple servlet program through command prompt. But no idea what is the reason, i am getting compiler error as cannot find
Error Cannot Find Symbol Javac
symbol : class HttpServletResquest. Error is very clear that its classpath problem. i tried to compile the below servlet as mentioned below. I have tried to set servlet-api.jar to classpath using javac -classpath option. F:\Sample>javac -classpath ".;F:\Sample\lib\servlet-api.jar" -d classes src/TestServlet.java Error: src\TestServlet.java:7: cannot find symbol symbol : class HttpServletResquest location: class TestServlet public void doGet(HttpServletResquest request,HttpServletResponse error cannot find symbol class response) throws IOException ^ 1 error I know its problem with the classpath. I have also tried echo %classpath% which returned nothing.. Whats wrong with my classpath? JAVA_HOME = C:\Java\jdk1.6.0_13 Path = C:\Program Files\PC Connectivity Solution\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%JAVA_HOME%\bin\; Can someone please help me. Thanks a lot in advance. Pradeep. Here is my Servlet. FYI import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class TestServlet extends HttpServlet { public void doGet(HttpServletResquest request,HttpServletResponse response) throws IOException { String userName = ""; String passWord = ""; if(request.getParameter("userName")!=null && request.getParameter("userName")!="") { userName = request.getParameter("userName"); } if(request.getParameter("passWord")!=null && request.getParameter("passWord")!="") { passWord = request.getParameter("passWord"); } PrintWriter out = response.getWriter(); out.println("User Name enter was:"+userName); out.println("Password enter was:"+passWord); out.close(); } } Vijitha Kumara Bartender Posts: 3918 10 I like... posted 7 years ago Pradeep Kumar Devar wrote:I have tried to set servlet-api.jar to classpath using javac -classpath option. F:\Sample>javac -classpath ".;F:\Sample\lib\servlet-api.jar" -d classes src/TestServlet.java Remove the quotes(" ") from the path entry for the -classpath. I know its problem with the classpath. I have also tried ec
here for a quick overview of the site Help Center Detailed answers to any questions you error cannot find symbol maven might have Meta Discuss the workings and policies of this
Error Cannot Find Symbol Variable
site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or
Error Cannot Find Symbol Class Builder
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community https://coderanch.com/t/453035/Servlets/java/find-symbol-class-HttpServletResquest of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Please indicate shit, so we could be able to do further shit later.Welcome to SHIT