Richard Phen

Ranch Hand
+ Follow
since Apr 27, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Richard Phen

I am a java programmer with SCJP and SCJD certification. I attempt to go deep in J2EE. Some pioneers here suggest that I should go get IBM websphere certification instead of BEA weblogic. Since there are many websphere certifications that confuse me, Could you please tell me what kind of IBM websphere certification is suitable for me? Importantly, what kind of websphere certification is valuable for job market in the States? Thanks a lots!
22 years ago
kapil kumar,

Thank you for your kindly reply! I checked the IBM developerWorks web site and found there are several kind of certification for websphere. Could you tell me which one is better for job market?
22 years ago
Congrats karmegam!
Mark this post.
22 years ago
I just passed SCJD and attempted to go deeper for j2ee. I want to know how about weblogic certification? Is it valuable for job hunting in this stagnant period in the States? Which one is better certificate between Weblogic and Websphere?
Thanks a lot!
22 years ago
I have tried that way. It still doesn't work. I am using jswdk-1.0.1.
Why? Weird.
22 years ago
JSP
I used a JavaBean to read and write a txt file named count to record the amount of visiter. I compile and run this javaBean well at Command Prompt, but I encountered a error that shows cannot find method setCount() when I use it in jsp page. Why? Could you help me fix it?
code of javabean:
package Counter;
import java.io.*;
public class Count
{
private BufferedReader test;
private String tmp = null;
private int i =0;
private PrintWriter outf;
private File file;
public Count()
{
file = new File(".\\count.txt");
}
public void setCount()
{
try
{
test = new BufferedReader(new FileReader(file));
tmp = test.readLine();
}
catch(IOException e)
{
System.out.println("error");
}
if(tmp==null)
{
i=0;
}
else
{
i=Integer.parseInt(tmp)+1;
}
try
{
outf = new PrintWriter(new FileOutputStream(file));
outf.println(i);
outf.close();
test.close();
}
catch(IOException e)
{
System.out.println(e.getMessage());
}
}
/**public static void main(String[] args)
{
Count c = new Count();
c.doCount();
}*/
}
code in jsp:
<jsp:useBean id="MyCount" scope="session" class="Counter.Count"/>
<% MyCount.setCount();%>
Thanks a lot!!!
22 years ago
JSP
Thanks Sandeep and William! It works now!
I have a new question about counter. I modified the jsp counter to javaBean and use it in jsp web page, I compile and run this javaBean well at Command Prompt, but I encountered a error that shows cannot find method setCount() when I use it in jsp page. Why? Could you help me fix it?
code of javabean:
package Counter;
import java.io.*;
public class Count
{
private BufferedReader test;
private String tmp = null;
private int i =0;
private PrintWriter outf;
private File file;

public Count()
{
file = new File(".\\count.txt");
}
public void setCount()
{
try
{
test = new BufferedReader(new FileReader(file));
tmp = test.readLine();
}
catch(IOException e)
{
System.out.println("error");
}
if(tmp==null)
{
i=0;
}
else
{
i=Integer.parseInt(tmp)+1;
}
try
{
outf = new PrintWriter(new FileOutputStream(file));
outf.println(i);
outf.close();
test.close();
}
catch(IOException e)
{
System.out.println(e.getMessage());
}
}
/**public static void main(String[] args)
{
Count c = new Count();
c.doCount();
}*/
}
code in jsp:
<jsp:useBean id="MyCount" scope="session" class="Counter.Count"/>
<% MyCount.setCount();%>
Thanks a lot!!!
22 years ago
JSP
Question:

There is a counter in my index.jsp. It reads and writes count.txt to count the visiter. I test it successfully with placing the count.txt in the root directory of jswdk1.0.1(\jswdk1.0.1\count.txt). If I want to change the location of count.txt,for example, \jswdk1.0.1\examples\count.txt, how to modify the code below?
<%@ page import="java.io.*"%>
<%
BufferedReader test;
test = new BufferedReader(new FileReader("count.txt"));
//directory: \jswdk1.0.1\count.txt, works OK!
//test = new BufferedReader(new FileReader(".\\count.txt"));
//Error:cannot find .\count.txt!
String tmp = null;
int i =0;
try
{
tmp = test.readLine();
}
catch(IOException e)
{
out.println("Error");
}
if(tmp==null)
{
i=0;
}
else
{
i=Integer.parseInt(tmp)+1;
}
try
{
PrintWriter outf = new PrintWriter(new FileOutputStream("count.txt"));
outf.println(i);
outf.close();
}
catch(IOException e)
{
out.println(e.getMessage());
}
test.close();
%>
Thanks a lot!!!
22 years ago
JSP
To give a quotation, as from introduction of assignment:

The remote client code that you write must provide all the public methods of the suncertify.db.Data class.


So, interface is the best suitable solution you may take.
Thank you!
So, J2SE FCS is a kind of SDK, is the initial official release version of SDK, right?

FBN = Fly By Night


Aha, so it is!
About J2SE FCS, what does FCS mean? And what does FBN mean?
I passed with a score of 141! Many thanks to Mark Spritzler, Sai Prasad, friso dejonge, Robin Underwood, and Michael Morris, Adam Caldwell, Andre Mermegas, Eugene Kononov, Chiji Nwankwo, Eugene Kononov, Vishal Sinha, ZhengQi Huang and other Ranchers who ever focus on my question post! I could not have done this without the help of you all! Thank you all again!
22 years ago
I am a java programmer with MCSE/MCDBA/SCJP & SCJD certification, know JSP/Servlet and EJB/j2ee, and going to immigrate to the US later of this year. The 1st important thing for me will be to find a appropriate job in the States.
It said that the java job market is weak now. I am afraid my job hunting very much. Could you please give me some suggestions or let me know some information about it?
Thanks a lot!
22 years ago