ramgopal varma Posted August 6, 2011 Report Share Posted August 6, 2011 i have downloade d tomcat server 5.5 and installed on windows 7classpath=C:\Program Files\Apache Software Foundatio n\Tomcat 5.5\common\libpath=C:\Program Files\Java\jdk1.7.0\binjava_home=C:\Program Files\Java\jdk1.7.0set chesanu tomcat server is runningbut when iam compiling the program(below) there are errors like package javax servlet.h ttp does not existsimport javax.ser vlet.http .*;import javax.ser vlet.*;import java.sql.*;public class Registrat ionServle t extends HttpServl et{ Connection con; PreparedStatement ps; public void init(ServletCo nfig config) { Class.for Name("oracle.jd bc.driver .OracleDr iver"); con=DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger"); ps=con.prepareStatement("insert into registati on values(?,?,?)"); }} Quote Link to comment Share on other sites More sharing options...
ennnna chata Posted August 6, 2011 Report Share Posted August 6, 2011 [quote author=ramgopal varma link=topic=221216.msg2728137#msg2728137 date=1312648860] i have downloade d tomcat server 5.5 and installed on windows 7classpath=C:\Program Files\Apache Software Foundatio n\Tomcat 5.5\common\libpath=C:\Program Files\Java\jdk1.7.0\binjava_home=C:\Program Files\Java\jdk1.7.0set chesanu tomcat server is runningbut when iam compiling the program(below) there are errors like package javax servlet.h ttp does not existsimport javax.ser vlet.http .*;import javax.ser vlet.*;import java.sql.*;public class Registrat ionServle t extends HttpServl et{ Connection con; PreparedStatement ps; public void init(ServletCo nfig config) { Class.for Name("oracle.jd bc.driver .OracleDr iver"); con=DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger"); ps=con.prepareStatement("insert into registati on values(?,?,?)"); }}[/quote]Baa indhaka nenu vesina post chadivava ? PATH and CLASSPATH ardham chesukoo mundhu , PATH la nuvvu run chese executables location ivali ...nuvvu bin ichavu kabati no issues compiling use chese javac executable akkada dorukutundhi ..next CLASSPATH dhiniloo nee java program use chesukune dependent classes location ivali by default java only rt.jar set chestam dhanilo nee lang package Object class ilanti stuff vuntundhi ...nee servlet classes anni servlet-api.jar ane jar la vuntai adhi classpath la vundho ledho chudu Look under System Variables, if CLASSPATH variable is already defined, select it and click edit, it will open Edit System Variable Window. Append semicolon (;) and then path of servlet-api.jar file at the end.If CLASSPATH environment variable is not defined, click on New button, it will open New System Variable window.In the New System Variable window, enter CLASSPATH as value of Variable Name and path to the servlet-api.jar as Variable Value (SET IT TO THIS JAR NOT TO GENERIC LIB)[b]CLass Not found vaste israi nuchi anni variables forum la post cheyadhu only CLASSPATH emi petavu adhe post chai [/b] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.