Shripad Bokil

Greenhorn
+ Follow
since Jan 30, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shripad Bokil

Hi
Please make sure that you have an import statement ...
import ONLINESHOP.BOOKSdEATILS at the start of your code.
The error you are getting is nothing but the compiler is not getting that perticular class.If you have imported it already then set the classpath properly.
This should solve your problem.
23 years ago
Hi
Pls first insure that the field 'material_qty' is an integer or String.If it is string field than use rs.getString otherwise try giving the column no.for the field 'material_qty' instead of its name. like...rs.getInt(1)...remember column index starts from 1 & not from 0.
Hope it works.
Hi
What you can do is when you open a file, read it & store in a String variable & while writing in that file just write the same string with appending it by what you want to add in that string.
Hope it works.
23 years ago
Hi
One solution for this problem is to use a properties file.
Create one simple text file like....
ipaddress = //the address
Seve it with " .properties" extension
& use java.util.ResourceBundle to access this ipaddress.
write these lines in your code ....like....
ResourseBundle r = ResourseBundle.getBundle("propertyfilename");
This will solve your problem...i.e whenever u want to connect to any server/machine...just change the respective address in properties file...so u dont have to compile your program at all.
Hope this will solve your problem.
Shripad

Hi
I think the problem is you haven't defined the methods isIsosceles (A, B, C), isScalene (A, B, C) , isRight (A, B, C) , & isEquilateral (A, B, C) in your code at all.
As per my knowledge these are not predefined methods of any java package.So the answer could be that you should define these method before you give a call to them.
If you define these methods ...your code should look something like this..........
//import java.awt.container;
import java.awt.*;
import java.util.*;
public class Check{
public int isIsosceles (A, B, C){
// method implementation here
return //return value here
}
public int isScalene (A, B, C){
// method implementation here
return //return value here
}
public int isRight (A, B, C){
// method implementation here
return //return value here
}
public int isEquilateral (A, B, C){
// method implementation here
return //return value here
}
public static void main (String[] args){
int A, B, C, isosceles, scalene, right, equilateral;
System.out.println ("This program will help determine"
+ "what kind of triangle you have.");
A=3;
B=4;
C=5;
isosceles = isIsosceles (A, B, C);
scalene = isScalene (A, B, C);
right = isRight (A, B, C);
equilateral = isEquilateral (A, B, C);

System.out.println ("The triangle is: ");
if (right == 1)
System.out.println ("Right");
if (scalene == 1)
System.out.println ("Scalene");
if (isosceles == 1)
System.out.println ("Isosceles");
if (equilateral == 1)
System.out.println ("Equilateral");
}
}

23 years ago
Hi,
Abstract class is the class which can not be instentiated.
i.e. you can not create a new object of an abstract class.Abstract class can only be extended.
Anonymes class is the class within another class(i.e. Inner Class) with no class name specified.
23 years ago
Hi John,
The code you have written will not work....instead modify your code like this...I have tested it & it works perfectly.
import java.io.*;
public class TestIO{
private static int a;
public static void main(String[] args){
try{
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Whats your name?");
String n=reader.readLine();
System.out.println("Hello "+n);
}catch(IOException e){
System.out.println("\n Error in reading " + e);
}
}
}
23 years ago
Hi,
Regarding calling the servlet...
If your servlet 'A' has a html code embeded in out.println("....")...then you can specify the servlet "b" in the action part of the form...i.e....
<form method = get or post action ="Your servlet path here">
</form>
otherwise....
you can use sendRedirect(servlet path here)...to call servlet"b"
In case of EJB you can call another EJB by specifying the correct JNDI name in lookup for the second EJB.
23 years ago
Hi,
I think this is the problem with your classpath setting.
Classpath is always set to " lib " directory.(not bin directory)
And "path" is set to bin directory.
Set classpath & path correctly I hope this should solve your problem
Shripad
23 years ago
Hi,
The advantage of prepared statement is you can use prepared statement repeatedly in your program as you are specifying the values to be intered by question mark & those question marks are replaced by the values which you get somewhere in the program.
In other case i.e. in simple statements the values have to be hardcoded.
Shripad
Hi
Try to get it from www.j-netdirect.com
select type 4 driver suitable for MySql database.
Otherwise you can get list of all available drivers st sun.java.com/products.jdbc
Search there for type 4 drivers & from there you can go to netdirect site(if above link dosen't work)
Shripad
Hi,
Try this....
String query="select count(*) from tablename";
ReaultSet ra=st.executeQuery(query);
while(rs.next()){
String count=rs.getString(1);
}
Hope this should work out for you,
Shripad
Hi Venu
Try this.............
Put your .class file of servlet in weblogic/myserver/servletclasses &
remove the comment of the property file line........
weblogic.httpd.register.servlets=weblogic.servlet.ServletServlet
& save the property file
after this start your weblogic server and access your servlet with.....
http://localhost:7001/servlets/yourservletname
I hope this should solve your problem
Regards,
Shripad
23 years ago