Q. Do you support Java on all your web servers?
Ans. We do support JSP pages and Java scripts on our Linux Hosting as well as Windows Hosting servers. We also support Servlet / JSP Tomcat on our Linux Hosting servers. Apache Tomcat version 5.5 implements the Servlet 2.4 and Java Server Pages 2.0 specifications from the Java Community Process, and includes many additional features that make it a useful platform for developing and deploying web applications and web services.
In addition to our standard Java Hosting plans, we also offer high performance Java hosting solutions for clients requiring Enterprise level load balancing and server redundancy. We can setup two or more Enterprise series dedicated servers and load balance between them in a redundant fashion. Load Balanced servers for Java include features such as :
* All The Standard Java Hosting Features
* Load Balancing
* Server Level Redundancy
Q. What is tomcat?
Ans. Tomcat is a Java Servlet container and web server originated from Jakarta project of the Apache software foundation. A web server dishes out web pages in response to requests from a user sitting at a web browser. But web servers are unlimited in serving up static HTML pages. Tomcat can also run programs in response to user requests and return the dynamic results to the user’s browser. And tomcat is very good in running programs as it provides both Java servlet and Java Server Pages (JSP) technologies (in addition to traditional static pages and external CGI programming). In short we can say that Tomcat is a good choice to be used as a web server for various applications and also if you want a free servlet and JSP engine. It can be used standalone or can be used behind traditional web servers such as Apache httpd, with the traditional server serving static pages and Tomcat serving dynamic servlet and JSP requests.
Q. Which version of Tomcat do you use on your Java-enabled hosting accounts?
Ans : For our Java-enabled hosting accounts we currently use either Apache Tomcat/5.5.28 or Tomcat/5.5.30 along with cPanel compatibility
Using CATALINA_BASE: /usr/local/jakarta/tomcat
Using CATALINA_HOME: /usr/local/jakarta/tomcat
Using CATALINA_TMPDIR: /usr/local/jakarta/tomcat/temp
Using JRE_HOME: /usr/local/jdk
Using CLASSPATH: /usr/local/jakarta/tomcat/bin/bootstrap.jar
Server version: Apache Tomcat/5.5.28
Server number: 188.8.131.52
JVM Version: 1.6.0_21-b06
JVM Vendor: Sun Microsystems Inc.
Q .What is java ?
Ans. Java is a programming language and computing platform which was first released by Sun Microsystems in 1995. It enables programmers to write computer instructions in easier way by replacing numeric codes with English based commands. It is known to be a “high-level” language because it can be read as well written easily by humans. Like English, Java has a set of rules that determine how the instructions should be written. These rules are known as “syntax”. Once a program has been written, the high-level instructions are translated into numeric codes that computers can understand and execute.
Q. Which version of JAVA do you use on your Java-enabled hosting accounts?
Ans : We are currently using JAVA “1.6.0_21″ along with the cpanel compatibility for our Java-enabled hosting accounts.
java version “1.6.0_21″
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode)
Q. What file extensions does Apache pass to Tomcat?
Ans : Files processed by Apache are affected by .htaccess settings, whereas files passed to and processed by Tomcat bypass these settings. Below are the list of file extensions for which Apache is responsible. Files not appearing in this list are processed by Tomcat.
* .pl * .gz * .au * .wm * .rm * .js * .rb * .py * .php * .php4 * .php5 * .inc * .htm * .jpg * .gif * .png * .tif * .swf * .ogg * .zip * .tar * .jar * .exe * .css * .xml * .rar * .wma * .asf * .rmi * .wmv * .3gp * .avi * .mp3 * .mpg * .wav * .snd * .mid * .pdf * .cgi * .html * .jpeg * .tiff * .midi * .mpeg * .3gpp * .perl * .xls
Q. What is JSP?
Ans : Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic web pages and applications. This is accomplished by embedding Java code into HTML, XML, DHTML, or any other document types. When client access the web browser which makes a request to the Java application container, which is typically a web server, the static page is converted behind the scenes, and is displayed as dynamic content to the viewer.
Q. What is appbase and docbase ?
The Application Base directory for virtual host. It is a path-name of a directory that may contain web applications to be deployed on this virtual host. You may specify either an absolute path name for this directory, or a path name that is relative to the $CATALINA_BASE directory. You can refer Automatic Application Deployment for more information regarding automatic recognition and deployment of web applications that needs to be deployed automatically. If not specified, the default of webapps will be used.
The Document Base which is also known as the Context Root is a directory for web application,
or the path name to the web application archive file (if web application is being executed directly from the WAR file).
You may specify either an absolute path name for this directory or WAR file, or even a path name that is relative to the appBase directory of the owning Host.
If a symbolic link is used for docBase then changes to the symbolic link will be effective only after a Tomcat restart or by un-deploying and redeploying the context as the context reload is not sufficient.
Always make sure not to choose a docBase that starts with your Host’s appBase string. The default appBase is “webapps” so do not choose any docBase like “webapps-foo.” Doing so will lead to deployment errors: you can refer Bugzilla for more details.
The value of this field must not be set when the Context is configured using a META-INF/context.xml file as it will be created by the automatic deployment process.
For Ex. :
If the document root for your domain.com is “/home/username/public_html” then the AppBase and DocBase for this domain will also be “/home/username/public_html”
Q.What is a WAR file and how do I create one?
Ans: A WAR file has a special folder structure and contains special files in addition to JSP pages, Java servlets, Java classes, HTML pages etc. which when combined forms a Web Application. A WAR (or “web archive”) file is simply a packaged webapp directory. It is created using the standard Java jar tool.
jar cf ../mywebapp.war *
Q. How do I deploy a WAR file in Tomcat?
Ans: If your account is hosted on Linux server then you need to upload your war files in the document root of your domain then the .war file will be automatically deployed in the few seconds with its self directory. If you already have a directory by that name, you must remove it for the WAR file to deploy correctly.
Q. How do I update the WAR file ?
Ans : If you want to update your old .war file then you first need to remove the deployed directory for the existing war file; then add the updated war file and it will be automatically deployed in few seconds.
Q. How can I access .jsp pages in tomcat server ?
Ans: To access .jsp pages in tomcat server you just need to upload your .jsp pages under your account and once it is done you can access it directly by using any of the browser.
Q. What is Servlets ?
Ans : Servlets are small program that runs on the server. The term usually refers to a Java applet that runs within a Web server environment. This is analogous to Java applet that runs within a Web browser environment. Servlets are server side components that provide a powerful mechanism for developing server side programs. It provides component-based, platform-independent methods for building Web-based applications, without the performance limitations of CGI programs. Java Servlet technology provides Web developers with a simple, consistent mechanism for extending the functionality of a Web server and also for accessing existing business systems. Servlets are Java technology’s answer to CGI programming. These are the programs that run on a Web server and build Web pages. Building Web pages on the fly is useful
Q. What is WEB-INF directory ?
Ans :The WEB-INF directory is used for your default Web application and is located under your home directory. You can also create other Web applications by creating sub-directories under your home directory and create a WEB-INF directory under it, or you can upload a war file in the home directory. The war file automatically expands into a sub-folder of the same name under the home directory.
Web Applications use a standard directory structure defined in the Servlet specification.
Q. What is structure of WEB-INF directory ?
Ans : The root directory of the application is also called as document root. Root directory is mapped to the context path. Root directory contains a directory named WEB-INF. Anything under the root directory excepting the WEB-INF directory is publicly available, and can be accessed by URL from any browser. WEB-INF directory is a private area of the web application, any files under WEB-INF directory cannot be accessed directly from browser by specifying the URL like http://somesite/WEB-INF/someresource.html. Web container will not serve the content of this directory. However the content of the WEB-INF directory is accessible by the classes within the application. So if there are any resources such as JSPs or HTML document that you don’t wish to be accessible directly from any web browser, you should place it under WEB-INF directory.
WEB-INF directory structure
* WEB-INF/web.xml deployment descriptor
* WEB-INF/classes directory
* WEB-INF/lib directory
web.xml is called as web application deployment descriptor. It is a XML file that defines servlets, servlet mappings, listeners, filters, welcome files etc. Deployment descriptor is a heart of any J2EE web application, so every web application must have a web.xml deployment descriptor directly under WEB-INF folder.
The classes directory is used to store compiled servlet and other classes of the application. If your classes are organized into packages, the directory structure must be reflected directly under WEB-INF/classes directory. The classes directory is automatically included in CLASSPATH.
Lib directory is usually used to store the jar files. If application has any bundled jar files, or if application is using any third party libraries such as log4j or JDBC drivers which are packaged in jar file, than these jar files should be placed in lib directory.
All unpacked classes and resources in the /WEB-INF/classes directory, as well as classes and resources in JAR files under the /WEB-INF/lib directory are included in class path and made visible for containing web application.
Q. What is Hibernate ?
Ans : Hibernate is a solution for object relational mapping and a persistence management solution or persistent layer. This is probably not understandable for anybody learning Hibernate. Hibernate is an object relational mapping (ORM) tool for Java. It maps objects to an underling database creating a persistence layer. Hibernate is supported by all of our Java Web Hosting plans. That said, Hibernate uses cache so an allowance should be made when calculating resources needed.
Q. Do you support Hibernate?
Ans: Yes all of our java hosting server plans do support Hibernate ORM.
Q Do you support Struts?
Ans: Yes all of our java hosting server plans support Struts
Q. Do you support Spring?
Ans: Yes all of our java hosting server plans support Spring.
Q .Can I restart the Tomcat service on my Linux shared hosting account?
Ans : No, on a shared hosting account, you are not authorized to restart the Tomcat service. If ever you want to restart the tomcat service then you can contact technical support team and they will restart it for you.
Q. Can I use .php pages in java hosting account.
Ans : Yes, A Java-enabled account supports both .php and .jsp pages.