Saturday, August 22, 2009

Why Use JSP for GWT RPC Server-side Service

Continued from GWT RPC - How Server-side JSP Service Works

Because, you can produce json response this way.

<%@ page
contentType="text/html; charset=utf-8"
MrBean mrBean = SessionSilo.initSessionBean(session.getId());
TableEntry entry = mrBean.getTableEntry();
Data data = entry.getData();
 int i=0;
 for (Column col : data.getColumns())

Because, that is why programmers prefer to use PHP, Perl or Scala to produce dynamic web pages rather than using a non-JSP servlet.

Because this is ugly and unfriendly, ugly to copy n'pasting (excerpted from
if (user != null){
  if (user.is_facebook_user()){
    html += "<div id=\"header-profilepic\">";
    html += user.getProfilePic(true);
    html += "</div>\n";

  html += "<div id=\"header-account\">";
  html += "<b>Welcome, " + user.getName() + "</b>";
  html += "<div class=\"account_links\">";
  html += "<a href=\"account.jsp\">Account Settings</a> | ";
  if (user.is_facebook_user()){
    html += "<a href=\"#\" onclick=\"FB.Connect.logout(
    )\">" +
    "Logout of Facebook" +
    //.'<img src="images/fbconnect_logout.png">'
    html += "<a href=\"logout.jsp\">Logout</a>";
  html += "<br /></div>";
  html += "</div>\n";
  html += "<div class=\"account\">";
  html += "Hello Guest | ";
  html += "<a href=\"./register.jsp\">Register for an account</a>";
  html += "</div>\n";

html += "</div></div>\n"; // header & header_content
html += "<div class=\"body_content\">\n";

Because, you can use my text custom tag ( to subject large blocks of unbroken text to conditional output.

Continue next Using memcache for Session Beans in GAE

1 comment:

  1. Do not put the clothes on the folding table until you are sure. If the table is clean you can put clothes on it without worry or fear, and be careful to keep your laundry in bags until you get home.

    At Pest Control Company in Makkah, we have trained workers who are fully prepared to eliminate insects.افضل شركة مكافحة حشرات
    شركة مكافحة النمل الابيض براس تنوره
    شركة مكافحة حشرات براس تنوره