tony Lary

Greenhorn
+ Follow
since Nov 07, 2014
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 tony Lary

I'm writing a basic codes in javaEE, when I added these codes to doGet()


PrintWriter out = response.getWriter();
out.println("<html><body><h1>The square root of 4.0 is: " + Math.sqrt(4.0) + "</h1></body></html>");


Eclipse will print out something, like "The square root of 4.0 is 2.0", but when I added these to doPost(), Eclipse print out nothing.
Please tell me why, and in what case we use doGet() or doPost()? As I know doGet() and doPost() is similar, but doGet() is not safe(password...) and very limited while doPost() is more powerful. Thank you very much!
9 years ago