Jump to content

java help plz


ramgopal varma

Recommended Posts

i have downloade d tomcat server 5.5 and installed on windows 7
classpath=C:\Program Files\Apache Software Foundatio n\Tomcat 5.5\common\lib
path=C:\Program Files\Java\jdk1.7.0\bin
java_home=C:\Program Files\Java\jdk1.7.0
set chesanu tomcat server is running
but when iam compiling the program(below) there are errors like package javax servlet.h ttp does not exists
import 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(?,?,?)");
      }
}

Link to comment
Share on other sites

[quote author=ramgopal varma link=topic=221216.msg2728137#msg2728137 date=1312648860]
i have downloade d tomcat server 5.5 and installed on windows 7
classpath=C:\Program Files\Apache Software Foundatio n\Tomcat 5.5\common\lib
path=C:\Program Files\Java\jdk1.7.0\bin
java_home=C:\Program Files\Java\jdk1.7.0
set chesanu tomcat server is running
but when iam compiling the program(below) there are errors like package javax servlet.h ttp does not exists
import 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]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...