Posts

GWT auto generated application with source

Image
While creating the GWT application GWT plugin will generate the "GWT Hello" auto generated source. That will gives you an idea about end-to-end GWT application. If you are new to GWT better first read about GWT and GWT plugin installation. In this page I am going to explain about the auto generated source with the source code. While creating the project you have to select the generate automatic application source in the options. After creating the project, project folder structure looks like below, In normal Java/JEE applications for UI we have used JSP's mostly. But, in GWT UI and Server source it should be in Java file only. The EntryPoint RootPanel loading will be happened by using an HTML/JSP file(Only one per module or project). The GWT plugin under the project package it auto generate 3 other directories which contains the Client, Server and Shared files. Client directory contains the EntryPoint class along with the Service and ServiceAsync files. S...

JSP interview questions and answers

This page contains the most frequently asking JSP interview questions and answers.This will helps for freshers as well as experienced. 1. What are the advantages of JSP over Servlet?                               OR By using Servlet we can do UI implementation, then why to use JSP in any of the applications? A: JSP is a server side technology to make content generation a simple appear.  The advantages of JSP is that they are document-centric. Servlet on the other hand, look and act like programs. A Java Server Page(JSP) can contain Java program fragments that instantiate and execute java classes, but these occurs inside an HTML template file and are primarily used to generate dynamic content. The power of JSP is that it is server-based and provides a framework for web application development. 2. What is the life cycle of JSP?                   ...

Java Networking Connection Refused: Connect

Java Networking “Connection Refused: Connect” problem will get in normal production environments. Here, we are mentioning our best to problem with answer and steps to solve the problem. In the below mentioned source code what it is running in the client and server instances. Server: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 import java.io.* ; import java.net.* ; public class Test { public static void main ( String [] args ) { final int PORT_NUMBER = 44574 ; while ( true ) { try { //Listen on port ServerSocket serverSock = new ServerSocket ( PORT_NUMBER ); System . out . println ( "Listening..." ); //Get connection Socket clientSock = serverSock . accept (); System . out . println ( "Connected client" ); //Get input BufferedReader br = new BufferedReader ( new InputStreamReader ( clientSock...