Thursday, February 27, 2014

Comparison of application servers


Comparison of application servers



The most popular HTTP server Apache and web develop tool Mono

Apache

The Number One HTTP Server On The Internet

  • The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
    Apache httpd has been the most popular web server on the Internet since April 1996, and celebrated its 17th birthday as a project this February.
    The Apache HTTP Server ("httpd") is a project of The Apache Software Foundation.

Mono (software)

Mono is a free and open source project led by Xamarin (formerly by Novell and originally by Ximian) to create an Ecma standard-compliant, .NET Framework-compatible set of tools including, among others, a C# compiler and a Common Language Runtime.The stated purpose of Mono is not only to be able to run Microsoft .NET applications cross-platform, but also to bring better development tools to Linux developers.[3] Mono can be run on many software systems including Android, most Linux distributions,BSDOS XWindowsSolaris, and even some game consoles such as PlayStation 3Wii, and Xbox 360.The logo of Mono is a stylized monkey's face, mono being Spanish for monkey.[4][5]

Sunday, February 23, 2014

SQL Server - Server Roles

Sometimes your can find your answer in the old version of software like SQL Server Server Roles:


Monday, February 17, 2014

Things you should know using eclipse and Tomcat


  1. You should stop Tomcat service when you want to test your jsp within eclipse as you will run Tomcat within eclipse.
  2. Eclipse doesn't always display everything. It should copy all files from the project folder to a Tomcat work directory, but it doesn't! It tends to “lose” CSS files and images. This means that, except for a quick check of simple features, you might do what I do and use Tomcat externally. To see the output of the test project outside Eclipse, first of all, stop the “internal” Tomcat by rightclicking it under the Servers tab of the Workbench and selecting Stop. Then, start the Tomcat service in Windows. Right-click the test-project folder as you did to launch it within Eclipse, but this time select Export WAR File. When the WAR Export screen appears, the only thing you have to do is browse to select the destination, which should be %CATALINA_HOME%\webapps\test.war, and click Finish. In a browser, type http://localhost:8080/test to see the output of the project. This works because, as I showed to you at the end of the previous section, Tomcat automatically expands all WAR files it discovers in its webapps folder, without any need to restart it. And because by default Tomcat looks for index.html, index.htm, and index.jsp. If you want, you can change the default by adding the following element to the body of the web-app element of web.xml: <welcome-file-list>
                           <welcome-file>whatever.jsp</welcome-file>
                  </welcome-file-list>
  3. You can export WAR file to Tomcat folder, you also can import WAR file to eclipse workplace.

Wednesday, February 12, 2014

Deploy eclipse web project to Tomcat


1. Export web project to WAR file.






















2. Go to Tomcat Manager page, select WAR file and click "Deploy" button.














Tuesday, February 11, 2014

How to display all the session variables in an HTML page?

The session implicit object is an instance of javax.servlet.http.HttpSession. This variable is only valid for Http protocols. The session is one of the JSP built-in variables (like request) that is available in the service body of a JSP. 
There's no way you can do it directly from plain HTML since HTML is static and the session object really "lives" in the dynamic environment of the web container. The following example JSP shows you how to generate HTML that shows the objects in the session attribute collection.
<%@ page language="java" import="java.util.*" %>
<html>
<body>
Session attributes:
<%
  session.setAttribute("test.name", "Test Attribute List");
  session.setAttribute("test.float", new Float(5.0));
  session.setAttribute("test.int", new Integer(10));
  session.setAttribute("test.Object", new StringBuffer("StringBuffer"));
  session.setAttribute("test.boolean", new Boolean(true));
  session.setAttribute("test.double", new Double(343.1));
  for (Enumeration e = session.getAttributeNames(); e.hasMoreElements(); ) {     
    String attribName = (String) e.nextElement();
    Object attribValue = session.getAttribute(attribName);
%>
<BR><%= attribName %> - <%= attribValue %>

<%
}
%>
</body>
</html>

Original link: 
http://www.xyzws.com/JSPfaq/how-to-display-all-the-session-variables-in-an-html-page/33

Monday, February 10, 2014

How to use HttpSession




HttpSession getSession()  

          Returns the current session associated with this request, or if the request does not have a session, creates one.  
   
  
HttpSession getSession(boolean create)  
          Returns the current HttpSession associated with this request or, if if there is no current session and create is true, returns a new session.