Philip Pross

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

Recent posts by Philip Pross

Hello to all,
I have a swing applet that requires the jre1.3.1, normally when all the broswers are close the java runtime should close and the icon in the taskbar should disappear as well. On my pc it does that, but for some others all is close, and the java is still running in the background ........ is this a bug with the plugin, or the computer.
Can anyone help me ???
20 years ago
I'm very new to xml, what I'm asking is if any one can suggest good books to do with java xml and servlets, on a unix platform.
I did find two books from Wrox (Professional Java XML , Java XML Programmer's Reference ), what I hope to complete with this project is to create, rewrite and read the xml files.
Thanks alot to everyone. I'm looking into all of the suggusted links.
Howdy, I was wondering if someone can help me out. I'm working with java 1.2.2 on a unix server, with all the tutorals around I'm feeling pretty confused. I found most examples use swing, how do I get around this. I want to keep the same java version ...........
I'm learning javamail, and I came to this code I found.

public class SmtpClientExample {
public static void main (String args[])
throws Exception {
String host = args[0];
String from = args[1];
String to = args[2];
SmtpClient smtp = new SmtpClient(host);
PrintStream msg = smtp.startMessage();
msg.println("To: " + to);
msg.println("Subject: Hello SmtpClient");

msg.println("This is a test message.1");
msg.println("This is a test message.2");
msg.println("This is a test message.3");
msg.println("This is a test message.4");
msg.println("This is a test message.5");
msg.println("This is a test message.6");
I'm wondering if its possible to also send to a "CC", or do I send it twice
For now, I want to learn how to send maill without the javamail api, just to learn the basics.
20 years ago
To call your second applet from the first, all you have to do is call another web page that contains your second applet.
in your eventHandle(ActionPerformed)
(new URL(""),"_self");
catch (Exception ex) {System.out.println(ex}
20 years ago
Very simple answer to a simple question, try using servlets to connect to your database. In your applet call the servlet by ...
url = new URL ("http://yourServer:8080/examples/servlet/yourServlet?para="+para2 +);
catch(MalformedURLException e)
System.out.println("error url " + e.getMessage());
catch (IOException e)
System.out.println("error io " + e.getMessage());
then in your servlet connect to the database by ...
String url = "jdbc dbc:vigie";
String nom="JAVA";
String pw="JAVA";
c = DriverManager.getConnection(url, nom, pw);
catch (ClassNotFoundException e)
System.out.println(e.getMessage() );
catch (Exception ee)
System.out.println(ee.getMessage() );
I hope this help .... just check out JDBC tutorials on, it helped alot when I started
20 years ago
The problem isn't what version ..... yes thats what I'm trying to avoid (for the teachers to download the plugin)
Then again, I just came across another way ....
once the login I can open a new web page with the parameters for that user in the address.
ex : Then in my applet I can read the userid.
20 years ago
Hello to all, I have a programe for two types of users, one (teachers) where I want to use jdk1.1.8, and the other 1.3. My question is depending on the login it will determine what frame is displayed. My principal applet is compiled in 1.1.8 and so is my teachers interface, but for my other users (students) I want to use swing.
I've try this, but not advanced.
This is basically what I'm trying to do ...
Applet --> Frame -> another Frame (teachers)
-> or JFrame (students)
20 years ago
Hello to all, I'm in need of help towards JMF, I have a applet that that user can view a trailer, but I want to be able to show more then one film on the same applet(not at the same time). I have a class that needs the user to start the film, that works .....but if I'm in the middle, I want to start the second by pressing on the other button, nothing happens. Here a snippet .....

Is it possible for what I want to achive !!!
(edited to put formatting tags in)
[ August 23, 2002: Message edited by: Cindy Glass ]
20 years ago
Thanks alot Syam, it worked great !!
This is what I did with your sample code

for(int i=0; i< iTemp.length ; i++)
if(iTemp[i] == 0)
sOutput += " ~";
rs1 = preStatSuc.executeQuery();

while( )
sOutput += rs1.getString("COSU_NOM") +" ~";
System.out.println("sOut " +sOutput);
I even tryed like this
SELECT * FROM SUCCURSALE WHERE COSU_SUC=?,?,?,?,?,?,?,?,?,?,?,?,?,?,?";
and it then gives me this error ->
pos: 43 ' ... COSU_SUC=?^ ,?,?,?,?,?,?,... - syntax error
I need help with this snippet of code, in one table (QUANTITE) I need the quantities for a certain product, also I need to know the name of the client, but it is a number that is index in another table (SUCCURSALE ). Its crashs on the the line that has: preStatSuc.setInt(2, iTemp2);
Connection c = null;
PreparedStatement preStatQte = null;
PreparedStatement preStatSuc = null;

preStatQte = c.prepareStatement(sqlQte);
preStatSuc = c.prepareStatement(sqlSuc);
preStatQte.setInt(1, Integer.parseInt(productnumber) );

rs = preStatQte.executeQuery();
while( )
sOutput = "";
sOutput += rs.getInt("COPQ_DISP#1%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#2%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#3%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#4%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#5%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#6%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#7%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#8%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#9%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#10%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#11%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#12%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#13%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#14%") + "~" ;
sOutput += rs.getInt("COPQ_DISP#15%") + "~" ;
int iTemp1 = rs.getInt("COPQ_SUC#1%");
int iTemp2 = rs.getInt("COPQ_SUC#2%");
int iTemp3 = rs.getInt("COPQ_SUC#3%");
int iTemp4 = rs.getInt("COPQ_SUC#4%");
int iTemp5 = rs.getInt("COPQ_SUC#5%");
int iTemp6 = rs.getInt("COPQ_SUC#6%");
int iTemp7 = rs.getInt("COPQ_SUC#7%");
int iTemp8 = rs.getInt("COPQ_SUC#8%");
int iTemp9 = rs.getInt("COPQ_SUC#9%");
int iTemp10 = rs.getInt("COPQ_SUC#10%");
int iTemp11 = rs.getInt("COPQ_SUC#11%");
int iTemp12 = rs.getInt("COPQ_SUC#12%");
int iTemp13 = rs.getInt("COPQ_SUC#13%");
int iTemp14 = rs.getInt("COPQ_SUC#14%");
int iTemp15 = rs.getInt("COPQ_SUC#15%");

preStatSuc.setInt(1, iTemp1);
preStatSuc.setInt(2, iTemp2); //CRASHS HERE
preStatSuc.setInt(3, iTemp3);
preStatSuc.setInt(4, iTemp4);
preStatSuc.setInt(5, iTemp5);
preStatSuc.setInt(6, iTemp6);
preStatSuc.setInt(7, iTemp7);
preStatSuc.setInt(8, iTemp8);
preStatSuc.setInt(9, iTemp9);
preStatSuc.setInt(10, iTemp10);
preStatSuc.setInt(11, iTemp11);
preStatSuc.setInt(12, iTemp12);
preStatSuc.setInt(13, iTemp13);
preStatSuc.setInt(14, iTemp14);
preStatSuc.setInt(15, iTemp15);
rs1 = preStatSuc.executeQuery();
while( )
sOutput += rs1.getString("COSU_NOM") +"~";
this is the error I get
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setInt(Unknown Source)
at ViDetail.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.tomcat.core.ServletWrapper.handleRequest(
at org.apache.tomcat.core.ServletWrapper.handleRequest(
at org.apache.tomcat.servlets.InvokerServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.tomcat.core.ServletWrapper.handleRequest(
at org.apache.tomcat.core.ContextManager.service(
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(
at Source)
help please .... Phil
Hello Ranchers,
I have a question towards sql, I have a search engine with 4 params. Meaning the using can do a search on 1 thing, 2 or even all 4 things, the search contains a first name, last name, city, and country. And with this, there is a number id for each person, so in theory is a user looks for a person with the last name WOOD (returns id 2, 4, 9), and location is CANADA ( returns 1, 2, 11), there should be only one result id number 2.
thanks Phil
I think I can answer all the question simple by saying what I'm using. Its Tomcat 3, so if I want access to my servlets I must execute my servletrunner. And when I know the connection is lost is when I want to login, I send the params to the driver, but when I get the response, its null. Also, if my servletrunner is not connected at all, I get a connection error. I hope this may help you.
20 years ago