This J2EE tip demonstrates the difference in use of between encodeURL and sendRiderct. Further it also demonstrates the neccesiaty for encodeURL. In order for the URL’s to be in universal specificied format it must be specified in the return type of encodeURL which is then passed on to the sendRedirect.
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class EncodeURL extends HttpServlet {
public void doGet(HttpServletRequest request ,
HttpServletResponse response)
throws ServletException , IOException {
response.setContentType(“text/plain”);
PrintWriter out = response.getWriter();
String encode = response.encodeURL(“http://www.google.com”);
response.sendRedirect(encode);
}
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException , IOException {
doGet(request , response);
}
}
The cute Java applet is an addictive Puzzle Bubble clone of the Perl/SDL Frozen Bubble game.
Play Game;
>
This popular game was one of the first computer games ever. Test your skills and see if you can beat the computer in this Java version of the game!
Welcome to this little, very popular game, which was one of the first computer games ever. You can move your paddle by moving your mouse, the goal of the game is to get a goal. The first player, who has 10 goals wins the game. The computer has the blue paddle, your color is red. Well, I know, the computer is a …
The object of the game for you is to create a red line which goes from the one side of the board to the other before the computer completes a blue line from the top to the bottom. Click on a blank space to add a bridge to your line or to block the computer’s progress.
Play Game;
Having started the game, you’ll see a playing field, consisting of 12×12 squares on the screen. When you click “New game”, 36 squares will appear at once in the middle of the field and a new square will continue to appear on the screen after set periods of time, depending on the speed value. Your aim is to gain a maximum possible number of scores. You’ll have to compile closed contours from these patterns and do this as soon as possible. You must click on the squares to revolve them.
Play …
The Shannon Switching Game implementation is a two-player game. The first player marks edges of the graph trying to connect two highlighted nodes while the second player removes unmarked edges. Choose to play against the computer or with your friend.
Play Game;