Servlet

Java Servlet Projects

Servlet Project 3

Servlet Interview Questions And Answers


Totel:56 Click: 1 2 3 4 5 6 7 8 9 10 11 12
Servlet Interview Questions And Answers

Page 1

Web Resource is bassically a Static or dynamic object, Which is contained in a Web application that can be referenced by a URL. 

Web server is type of Software, Its use for the providing to the many type of services like access the Internet, an intranet, or an extranet. A Web server hosts Web sites, provides support for HTTP and other protocols, and executes server-side programs that perform certain functions.

We must ensure that the version of Apache Xalan we download from the Apache Web site is compatible with Apache Xerces version 1.3.1. Because we can't plug in a different version of Apache Xerces , the only version of Apache Xerces that is compatible with WebLogic Server 6.1 is 1.3.1. The built-in parser and transformer have been modified by BEA to be compatible with each other.

A filter dynamically intercepts requests and responses to transform or use the information contained in the requests or responses. Filters typically do not themselves create responses, but instead provide universal functions that can be "attached" to any type of servlet or JSP page. Filters provide the ability to encapsulate recurring tasks in reusable units and can be used to transform the response from a servlet or a JSP page. Filters can perform many different types of functions:

  * Authentication

  * Logging and auditing

  * Data compression

  * Localization


The filter API is defined by the Filter, FilterChain, and FilterConfig interfaces in the javax.servlet package. You define a filter by implementing the Filter interface. A filter chain, passed to a filter by the container, provides a mechanism for invoking a series of filters. Filters must be configured in the deployment descriptor :


<!--Servlet Filter that handles site authorization.-->

<filter>

     <filter-name>AuthorizationFilter</filter-name>

     <filter-class>examples.AuthorizationFilter</filter-class>

     <description>This Filter authorizes user access to application components based upon request URI.</description>

     <init-param>

        <param-name>error_page</param-name>

        <param-value>../../error.jsp</param-value>

     </init-param>

</filter>


<filter-mapping>

     <filter-name>AuthorizationFilter</filter-name>

     <url-pattern>/restricted/*</url-pattern>

</filter-mapping>


A Web archive (WAR) file is a packaged Web application. WAR files can be used to import a Web application into a Web server. The WAR file also includes a Web deployment descriptor file. There are special files and directories within a WAR file. The /WEB-INF directory in the WAR file contains a file named web.xml which defines the structure of the web application. If the web application is only serving JSP files, the web.xml file is not strictly necessary. If the web application uses servlets, then the servlet container uses web.xml to ascertain to which servlet a URL request is to be routed. One disadvantage of web deployment using WAR files in very dynamic environments is that minor changes cannot be made during runtime. WAR file is created using the standard Java jar tool. For example:


    cd /home/alex/webapps/mywebapp 

    jar cf ../mywebapp.war * 


Goto Page:

1 2 3 4 5 6 7 8 9 10 11 12
Servlet Objective Questions And Answers

Servlet Objective Questions And Answers

Servlet Interview Questions And Answers

Servlet Subjective Questions And Answers


R4R,Servlet Objective fresher and experienced, Servlet Subjective fresher and experienced ,Servlet Interview Questions And Answers,Servlet fresher and experienced,Servlet Interview fresher and experienced ,Servlet Questions fresher and experienced,Servlet Answers fresher and experienced