Why in Servlet 2.4 specification SingleThreadModel has been deprecated?
Tere is no practical implementation to have such model. Whether you set isThreadSafe to true or false, you should take care of concurrent client requests to the JSP page by synchronizing access to any shared objects defined at the page level.Reply
What is a output comment?
A comment that is sent to the client in the viewable page source. The JSP engine handles an output comment as uninterpreted HTML text, returning the comment in the HTML output sent to the client. You can see the comment by viewing the page
source from your Web browser.
<!-- comment [ <%= expression %> ] -->
<!-- This is a commnet sent to client on
<%= (new java.util.Date()).toLocaleString() %>
Why should we go for inter servlet communication?
Due ot the following reason need inter servlet communication :
* Two servlet want to communicate to complete the shopping cart.
* One servlet handles the client request and forward it to another servlet to do some calculation or add some information to complete the view.
* One servlet want to reuse the some methods of another servlet.Reply
How can a servlet refresh automatically?
We can Refresh Servlet Page by two ways : one through client side and another through Server Push.
Client Side Refresh :
< META HTTP-EQUIV="Refresh" CONTENT="5; URL=/servlet/MyServlet/">
Server Side Refresh :
This will update the browser after every 5 seconds
What is session?
A session refers to all the connections that a single client might make to a server in the course of viewing any pages associated with a given application. Sessions are specific to both the individual user and the application. As a result, every user of an application has a separate session and has access to a separate set of session variables. A session keeps all of the state that you build up bundled up so that actions you take within your session do not affect any other users connected to other sessions.Reply
What is a servlet ?
Servlets are the server side programs that runs on the server allow developer to add dynamic content and hand it to the web server and web server sent back to the client. Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by Web servers. For such applications, Java Servlet technology defines HTTP-specific servlet classes. Servlets provide component-based, platform-independent methods for building Web-based applications, without the performance limitations of CGI programs.
The javax.servlet and javax.servlet.http packages provide interfaces and classes for writing servlets. All servlets must implement the Servlet interface, which defines life-cycle methods.
Typical uses for HTTP Servlets include :
* Processing and/or storing data submitted by an HTML form.
* Providing dynamic content, e.g. returning the results of a database query to the client.
* Managing state information on top of the stateless HTTP, e.g. for an online shopping cart system which manages shopping carts for many concurrent customers and maps every request to the right customer.
Why we use RSS Reader?
We use RSS Reader to read RSS Feeds.Their are many RSS Reader are available for different devices and Operating System.
Their are many RSS Reader are available.
What the role of publish in RSS feed?
Suppose that you made an RSS document and not publish them.Than their is no mean of this RSS document because other people can't reach that document. So, you have to publish RSS document to make this document reachable by other people.I have given you some steps that explain you how to upload an RSS document.Step1: Your RSS file should have .xml extension.Step2: You should validate your RSS file using an validator.Step3: Now, you upload an RSS file into your web directory on your web server.Step4: Than you have to copy the orange color RSS or XML button into your web directory.Step5: Than now put an RSS button into your Home page.Thanlink that button to the RSS file.Write i have given you code to perform that task.Example:<a href="www.r4r.co.in/rss/rssexample.xml"?phpMyAdmin=70ac9566533a2665b6597346aab7f985&phpMyAdmin=f43d4e0b88acea2d2a393515f6bf38f2>< img src="www.r4r.co.in/rss/rssimage.gif" width="45" height="22"></a>.Step6: Now, submit your RSS feed to the RSS feed directry.Url that you use not define your home page it is used to define your RSS feed.Example:"http://www.r4r.co.in/rss/rssexample.xml"Step7: Than you register your RSS feed with search engines.I have given you name of some major search engines.Like: yahoo,Google,MSN.Step8:Now, at last update content of your RSS feed. Because you have registered your RSS feed with search engines Like: Google,Yahoo and MSN etc.
Why we use pubDate, source and title element in RSS?
We use also <pubdate>, <source> and <title> elements with in <item> child element.
<pubDate> element is used to define the last publication date of an item.
<source> element is used to define the third-party source of an item.
<title> element is used to define the title of an item.
In above elements <pubDate> and <source> are optional where as <title> is compulsory when we define RSS document.Reply
How to define enclosure element in RSS?
Using <enclosure> element we can include an media file with an item.
To define <enclosure> element in RSS you have required to define thes three elements.
1.url: This is use to define URL of media file.
2.length: Using this we define the lenth of media file in bytes.
3.type: This is use to define the type of media file.
Example: This show you how to use <encloser> element in RSS.
length="4500" type="audio/mp3" />