|
|
|
|
|
What is 1000Projects
'1000projects.com' is an educational content website dedicated to finding and realizing Final Year Projects, IEEE Projects, Engineering Projects, Science Fair Projects, Project Topics, Project Ideas, Major Projects, Mini Projects, Paper Presentations, Presentation Topics, IEEE Topics, .Net Projects, Java Projects, PHP Projects, VB Projects, SQL Projects, C & DS Projects, C++ Projects, Perl Projects, ASP Projects, Delphi Projects, HTML Projects, Cold Fusion Projects, Java Script Projects, Btech Projects, BE Projects, MCA Projects, Mtech Projects, MBA Projects, Project on Software, CBSE Projects, Testing Projects, Embedded Projects, Chemistry Projects, Electronics Projects, Electrical Projects, Science Projects, Mechanical Projects, Mba project Reports, Placement papers, Sample Resumes, Entrance Exams, Technical Faq's, Puzzles, etc
how it works?
Everything on this site is submitted by the students in this professional community. You Can submit your Projects, Project Topics & Ideas to info.1000projects{at}gmail.com after you submit your project/project Idea/Abstract/Seminar Topics, These are being verified and approved by our administrator. after approval of this project/project Idea/Abstract/Seminar Topics, It can be shown on 1000projects.com so that other users can read/discuss it.The entire content on this website is Only For Educational Purpose, Non Commercial use!
Please help us/Other Users by sending projects/project Ideas/Abstracts/Seminar Topics. Thanking You!!!!!
Category Articles
What method used to add a jsp to the servlet
Added on Sun, Dec 27, 2009
The RequestDispatcher.include(req, resp) is used to add a jsp to the servlet. Read More
Can we write destroy() method in the init() method of a Servelt.
Added on Sun, Dec 27, 2009
Question : Can we write destroy() method in the init() method of a Servelt. if we can, what will happen? if we cant , why we cant? Answers: we cannot write destroy() method in the init() method.... Read More
Can we override the service method?
Added on Sun, Dec 27, 2009
Question : Can we override the service method? if we can do that then why do we override only doGET() and doPost() methods if the servlet is of protocol specific? Answers: Yes the servlets service method can be... Read More
Difference between single thread and multi thread model servlet
Added on Sun, Dec 27, 2009
A servlet that implements SingleThreadModel means that for every request, a single servlet instance is created. This is not a very scalable solution as most web servers handle multitudes of requests. A multi-threaded servlet means that one servlet is... Read More
What is the difference between GenericServlet and HttpServlet?
Added on Sun, Dec 27, 2009
GenericServlet is for servlets that might not use HTTP, like for instance FTP service.As of only Http is implemented completely in HttpServlet. The GenericServlet has a service() method that gets called when a client request is made. This means that... Read More
What is the difference between ServletContext and ServletConfig?
Added on Sun, Dec 27, 2009
Both are interfaces. The servlet engine implements the ServletConfig interface in order to pass configuration information to a servlet. The server passes an object that implements the ServletConfig interface to the servlet's init() method. ... Read More
Whats the difference between using invalidate() & sessionDestroyed for sessionclosing.
Added on Sun, Dec 27, 2009
Session's invalidate method is used when the session will no longer exist or when for a particular client is leaving the session Eg:during the logout. sessiondestroyed is a method of HttpSessionListener ,and this is called when the session is... Read More
How we can check in particular page the session will be alive or not?
Added on Sun, Dec 27, 2009
U can use request.getSession(false); method in HttpServletRequest interface.It returns the HttpSession associated with this request or null if the request has no valid session. Read More
What is the difference between Apache struts and Jakarta Struts?? why there are 2 names??
Added on Sun, Dec 27, 2009
Both apache struts and jakarta struts ar e one and the same.Struts was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000.However after gaining prominence in the J2EE community through its evolution as a Jakarta... Read More
What is the difference between servlet context and servlet config
Added on Sun, Dec 27, 2009
ServletConfig is a servlet configuration object used by a servlet container used to pass information to a servlet during initialization. All of its initialization parameters can ONLY be set in deployment descriptor. The ServletContext object is... Read More
Why is the action class is singleton in nature? Isn't this creates a bottleneck for the requests?
Added on Sun, Dec 27, 2009
No it won't create a bottleneck as each request will be processed in separate thread. If would have created bottleneck it create separate instance for each request. We just have to make sure that we are not using any instance variable in... Read More
What is a Singleton class. How do you write it ?
Added on Sun, Dec 27, 2009
SingleTon class : is a special class which provides only one instance. Ex:Container Developers are using this class. Code is like this: //This is Single ton class public class SingleTon { private static SingleTon ton = null; public static... Read More
Difference between application server and web sever?
Added on Sun, Dec 27, 2009
Web server serves pages for viewing the web browser( i.e HTML, JSP,ASP etc.)using http protocol. While application server handles business logic,such as transaction processing,messaging ,resource pooling, security and messaging etc.Both are... Read More
How can a web container know whether cookies are accepted or not accepted by the browser
Added on Sun, Dec 27, 2009
The only way to know for sure is to set a cookie on a response, and see if it comes back on the following request. You have absolutely no clue from looking just at the current request. Just as an example, I run Netscape 6, configured to warn me... Read More
What is meant by preintialization?
Added on Sun, Dec 27, 2009
Initialization of servlet by server on startup prior to getting the request for that servlet is know as preintialization.It is really accomplished by specifying the postive value in load-on-startup tag in the web.xml. Read More
How can we refresh the servlet for every 2 minutes automatically?
Added on Sun, Dec 27, 2009
We can Refresh Servlet Page by two ways..one through client side and another through server side. Through Client Side : We use Meta http refresh < META HTTP-EQUIV="Refresh" CONTENT="5; URL=/servlet/MyServlet/"> Through Server Side :... Read More
When we don't write any constructor for the servlet, how does container create an instance of servlet?
Added on Sun, Dec 27, 2009
Container creates instance of servlet by calling Class. forName(className).newInstance(). Read More
How will u pass the argument from one servlet to another servlet?
Added on Sun, Dec 27, 2009
We can use forward and include of requset dispatcher and the arguments would be request and response for these methods Read More
What is the difference between JSP and SERVLETS
Added on Sun, Dec 27, 2009
Servlet : it is a webcomponet which will handle the request as well as it will give the response in particular display format.i.e it will perform developers tasks and designer's tasks. JSP: : it is purely for display purpose.it wil internally... Read More
What is difference between cgi and servlet in interview point
Added on Sun, Dec 27, 2009
CGI creates a new process for each request,Whereas Servlet creates a thread for each request and services the request in that thread. 2.For each process created by CGI,the process is assinged seperate address space.SO there is memory overload on the... Read More
Apart from context param , is there any other way to set/declare the global variable to access over the application?
Added on Sun, Dec 27, 2009
yes i think we canuse some variable is session for accessing it in applicarion by making session attribute of application level; i.e session="application" Read More
What is the difference between GET and POST
Added on Sun, Dec 27, 2009
In GET your entire form submission can be encapsulated in one URL, like a hyperlink. query length is limited to 260 characters, not secure, faster, quick and easy. In POST Your name/value pairs inside the body of the HTTP request, which makes for... Read More
Difference between single thread and multi thread model serv
Added on Sun, Dec 27, 2009
Typically, a servlet class is instantiated the first time it is invoked. The same instance will be used over several client requests, so all members that are declared in that servlet are shared accross clients. That is what is meant by multi... Read More
Why init is used and not constructor for servlets initialization?
Added on Sun, Dec 27, 2009
The original reason for init() was that ancient versions of Java couldn?t dynamically invoke constructors with arguments, so there was no way to give the constructur a ServletConfig. That no longer applies, but servlet containers still will only call... Read More
how do you compile servlet program?
Added on Sun, Dec 27, 2009
servlet program is compiled by java compiler Read More
What is session?
Added on Sun, Dec 27, 2009
The session is an object used by a servlet to track a user's interaction with a Web application across multiple HTTP requests. Read More
How differ servlets from its peer technology?
Added on Sun, Dec 27, 2009
It will be clear if know the peer technology. If the technology is CGI , it create a process for each client request but servlet technology just creates a thread. Read More
What is the importance of deployment descriptor in servlet?
Added on Sun, Dec 27, 2009
The deployment descriptor is not confined to servlets. It belongs to the application. The deployment descriptor basically tell the container where to look out for the resources, which patterns to follow, how are the resources mapped etc Read More
What is difference between sendRedirect() and forward()..? Which one is faster then other and which works on server
Added on Sun, Dec 27, 2009
When you invoke a forward request, the request is sent to another resource on the server, without the client being informed that a different resource is going to process the request. This process occurs completely with in the web container. When a... Read More
How to build struts in java?
Added on Sun, Dec 27, 2009
To build struts in Java, we need the struts taglib. They provide many of the inbuilt tags that provide the many activities like loop,tiles(to beautify the page) etc. For this the struts. jar file has to be in the classpath. Any jsp engine will... Read More
What is pure servlet?
Added on Sun, Dec 27, 2009
Pure servlet means we create any java objets that is implemented from javax.servler.Servlet interface. Read More
What is differents between forword(),include() and sendRedirect()? In which circumtances all are used? Give Proper Examles
Added on Sun, Dec 27, 2009
Using forward(request,response) u are forwarding the current to page to another page so that the response will results in forwarded page Using include(request,response) u are including one page result to the current page so that the response... Read More
Do we have a constructor in servlet ?Can we explicitly provide a constructor in servlet program?
Added on Sun, Dec 27, 2009
Certainly , we can have a constructor in servlet class, but only default constructor. We can not have parametrized constructor in servlet, because the servlet gets instantiated by the container dynamically, and java does not allow to call... Read More
How to count how many times aprticular link has been clicked using jsp and javascript
Added on Sun, Dec 27, 2009
Just use the following code in jsp // instance variable declaration // incrementing the counter when ever jsp clicked then print the counter value where ever you required Read More
What is the Servlet Interface?
Added on Sun, Dec 27, 2009
The central abstraction in the Servlet API is the Servlet interface. All servlets implement this interface, either directly or, more commonly, by extending a class that implements it such as HttpServlet. Servlets-->Generic Servlet-->... Read More
Explain about servletConfig and servletContext in applications?
Added on Sun, Dec 27, 2009
Servletcontext is used to obtain application level information and only one servletcontext can be present in one application. ServletConfig object is present for every servlet and it provides initialization parameters for every servlet. Read More
Suppose there are 15 links on the homepage of a site and each link creates a new request, how your servlet controller would handle it? (Assuming you are using MVC-2)
Added on Sun, Dec 27, 2009
Can we do one thing,that for all those 15 links(call them action)we can have different action ids,now on click of those links we will submit a unique action id related to that particular action and in servlet controller we will make different switch... Read More
Can we write bussiness methods in servlets? if yes, then how can u access that from out side of the servlets?
Added on Sun, Dec 27, 2009
No we can't write business methods inside a servlet..only we can write BL inside service() ..if u write bus methods inside a servlet, client can not call because GenericServlet or HS doesn't implements Remote interface..So u can't call... Read More
What is the difference between the getRequestDispatcher(String path) method of javax.servlet.ServletRequest interface and javax.servlet.ServletContext interface?
Added on Sun, Dec 27, 2009
The getRequestDispatcher(String path) method of javax.servlet.ServletRequest interface accepts parameter the path to the resource to be included or forwarded to, which can be relative to the request of the calling servlet. If the path begins with a "... Read More
If you want a servlet to take the same action for both GET and POST request, what should you do?
Added on Sun, Dec 27, 2009
Simply have doGet call doPost, or vice versa. u can call doGet Method in doPost method and vice versa i.e public void doGet(HttpServletRequest req,HttpServletResponse resp) throws ServetException,IOException { doPost(req,resp); } public... Read More
What is the difference between ServetConfig and ServletContext..?
Added on Sun, Dec 27, 2009
Servlet Config as the name suggests, provides Servlet specific configuration information to a particular servlet. For Example :- the information that u specify in the web.xml file like this ... Read More
Consider a scenario where 2 instances of an appserver are running in a machine. And one application has been deployed in the two servers. Does these two applications deployed in two servers use the same JVM or different?
Added on Sun, Dec 27, 2009
The straight forward answer is no. If they are on two different servers (i.e. machines) then the answer is obviously no. If the two app servers are running on the same machine, they each fire up their own environment to handle requests which will be... Read More
What is the servlet life cycle?
Added on Sun, Dec 27, 2009
Each servlet has the same life cycle: A server loads and initializes the servlet (init()) The servlet handles zero or more client requests (service()) The server removes the servlet ( destroy()) (some servers do this step only when they shut... Read More
What is the difference between servlets and applets?
Added on Sun, Dec 27, 2009
Servlets are to servers. Applets are to browsers. Unlike applets, however, servlets have no graphical user interface. Read More
What is the diff b/w doGet() and service() method?
Added on Sun, Dec 27, 2009
Well the service method tries to determine which of the doXXX method needs to be called.Appropriately either doGet, doPost, doDelete, doPut etc etc are called, Read More
How to Access Session Variables in Servlets & JSp
Added on Sun, Dec 27, 2009
Use can store variables in session, but u can store it in object form only.if it is primitive type u can use wrapper classes to convert it into object. session.setAttribute("test","xyzp"); String str=(String)session.getAttribute("test"); ... Read More
We have two applications in that we have two servlets each.How they(servlets) communicate with each other
Added on Sun, Dec 27, 2009
Connect both application with same data base 1. 2. update the data close the connection 3 call the II app to Read More
What is session ?how to manage the session?
Added on Sun, Dec 27, 2009
Session is an object of method maintaining state which is act of preserving the information from one page to another page. we can manage sessions in two ways using cookies using URL rewriting Read More
What is filter? Can filter be used as request or response?
Added on Sun, Dec 27, 2009
A filter is a reusable piece of code that can transform the content of HTTP requests,responses, and header information. Filters do not generally create a response or respond to a request as servlets do, rather they modify or adapt the requests for... Read More
Explain StringBuffers and StringTokenizers?
Added on Sun, Dec 27, 2009
The string tokenizer class allows an application to break a string into tokens. The token value or delimiter can be specified as an argument in the constructor. Default value of the delimiter is space. This is a legacy class whose use in not... Read More
How do we prevent user to read secured page.. after logout
Added on Sun, Dec 27, 2009
Programatically invalidate the session by calling the method session.invalidate() Read More
In which pattern does all the action classes in the struts are organized
Added on Sun, Dec 27, 2009
All the action classes the design pattern used is the Command Design Pattern. Read More
What are the uses of Servlets?
Added on Sun, Dec 27, 2009
A servlet can handle multiple requests concurrently, and can synchronize requests. This allows servlets to support systems such as on-line conferencing. Servlets can forward requests to other servers and servlets. Thus servlets can be used to balance... Read More
Can I just abort processing a JSP?
Added on Sun, Dec 27, 2009
Yes. Because your JSP is just a servlet method, you can just put (whereever necessary) a < % return; % > Read More
When a servlet accepts a call from a client, it receives two objects. What are they?
Added on Sun, Dec 27, 2009
ServeltRequest: which encapsulates the communication from the client to the server. ServletResponse: which encapsulates the communication from the servlet back to the client. ServletRequest and ServletResponse are interfaces defined by the javax... Read More
In servlets, what is the use of sendredirect(),include( ), forward() ?and in applecation level at what scnario they will be used
Added on Sun, Dec 27, 2009
When you invoke a forward request, the request is sent to another resource on the server, without the client being informed that a different resource is going to process the request. This process occurs completly with in the web container. When a... Read More
What is super class of Action and ActionForm?
Added on Sun, Dec 27, 2009
Object is the super class for Action and ActionForm. Action is a class and ActionForm is an abstract class. Read More
What is the use of findbyprimarykey()?
Added on Sun, Dec 27, 2009
The findByPrimaryKey() method works like the read() method, except that the findByPrimaryKey() method retrieves a single TxObject directly from the database using a primary key without going through a TxCursor. The primary key can be any primary key.... Read More
Explain the life cycle of Servlet.
Added on Sun, Dec 27, 2009
Loaded(by the container for first request or on start up if config file suggests load-on-startup), initialized( using init()), service(service() or doGet() or doPost()..), destroy(destroy()) and unloaded. Read More
What is the difference between callling a RequestDispatcher using ServletRequest and ServletContext?
Added on Sun, Dec 27, 2009
We can give relative URL when we use ServletRequest and not while using ServletContext. Read More
What is default capacity of connection pool objects in pool of app-server Weblogic and Tomcat webserver?
Added on Sun, Dec 27, 2009
Connection pool is an env provided in app server that keeps connections objects ready(db connections) before actually being requested by the clients. we can mention the size of this in vendor specific deployment descriptor using max pool size and... Read More
How can a servlet automatically updated by its data without refreshing?
Added on Sun, Dec 27, 2009
Question : How can a servlet automatically updated by its data without refreshing? take one example of one sensex site. the corresponding data are shown in a scrolling manner. how they can automatically be refreshed after some time. without... Read More
Types of Servlets?
Added on Sun, Dec 27, 2009
Servlets must implement the interface javax.servlet.Servlet. There are two main types of servlets: Generic servlets extend javax.servlet.GenericServlet. Generic servlets are protocol independent, meaning that they contain no inherent support... Read More
What is difference between servlet and ASP
Added on Sun, Dec 27, 2009
Platform and Server IndependenceJSP technology adheres to the Write Once, Run AnywhereTM philosophy of the JavaTM architecture. Instead of being tied to a single platform or vendor, JSP technology can run on any Web server and is supported by a... Read More
Is servlet is used to create a dynamic webpage or Static webpage or both?
Added on Sun, Dec 27, 2009
Yes both servlet is used to create a static and dynamic webpage,it also create a static webpage using serverside include it is .shtml extension,and so servlet is flexible character. Read More
How HTTP Servlet handles client requests
Added on Sun, Dec 27, 2009
An HTTP Servlet handles client requests through its service method. The service method supports standard HTTP client requests by dispatching each request to a method designed to handle that request. Read More
What is difference between Design Pattern and FrameWork.
Added on Sun, Dec 27, 2009
A Framework is a skeleton of code used for developing an application with ease.It could have used several design patterns to implement the skeleton upon which we generally build applications.Eg. Struts Framework uses MVC2 architecture, various design... Read More
Why we use static method in Business Logic?
Added on Sun, Dec 27, 2009
Its a good design practice to implement the business logic in static methods.1. static method access is faster, you don't have to create, initialize the instance. 2. you perform some action/manipulaton on the input data and return the result, so... Read More
I have linux OS.I installed Tomcat 4. in Linux.
Added on Sun, Dec 27, 2009
Question : I have linux OS.I installed Tomcat 4. in Linux. Now, i have to deploy My web application into that using WAR file. Please tell me steps....and also steps for the creating the WAR file too. Answers: You should... Read More
Suppose number of servlets/jsps from various web applications want to access shared data, what is the mechanism to achieve the same?
Added on Sun, Dec 27, 2009
The above comments are not the solution for this question... The question is "servlets/jsps from various web applications want to access shared data". Servlets/jsps from various web applications... If you put any thing in servlet context. It will... Read More
Can we use any other technology than JSP to construct a view ?
Added on Sun, Dec 27, 2009
Yes , I think all u r knowing about the Macromedia latest technology "Flex" , It can be Integrated with almost all servers , So Try It !!!!!!!! It's really Rocking Read More
What is servlet container?
Added on Sun, Dec 27, 2009
The servlet container is a part of a Web server or application server that provides the network services over which requests and responses are sent, decodes MIME-based requests, and formats MIME-based responses. A servlet container also contains and... Read More
Explain about Http specific servlets?
Added on Sun, Dec 27, 2009
Servlets using Http protocol support Http methods which includes GET, HEAD, POST, etc. Request and response data are always provided in an MIME format. Data type is specified by the servlet and data is also written in that format which gives... Read More
Explain about the security features of Servlets?
Added on Sun, Dec 27, 2009
Servlets cannot be trusted they have information about the clients. They have access to HTTP specific authentication data and peer identities can be determined. Strong security policy support is present in Java servlets. Access to network files and... Read More
What will happen when we call the destroy method in the init method? will the servlet exist?
Added on Sun, Dec 27, 2009
The destroy method is not called as it is considered unsuccessful initialization. During initialization, the servlet instance can throw an UnavailableException or a ServletException. In this case, the servlet must not be placed into active service... Read More
What is the difference betweem getRequestDispatcher() available as part of ServletContext and ServletRequest
Added on Sun, Dec 27, 2009
You can get a RequestDispatcher object from either a request or the web context; however, the two methods have slightly different behavior. The method takes the path to the requested resource as an argument. A request can take a relative path (that... Read More
In normal javabean, bean object is serailizable,and Connectuin object is transient object.Then How we using javabean for communnication between Servlet and JSP for data Transfer?
Added on Sun, Dec 27, 2009
Bean components are the data transfer objects betwen Servletsand JSPs which are goign to travel and hence they have to be serialized. Connection object is just to make a physical connection to the database specified and no need to serialize hence... Read More
Consider a scenario in which 4 users are accessing a servlet instance. Among which one user called destroy() method. What happens to the rest 3 users?
Added on Sun, Dec 27, 2009
We know that by default servlet is multithreaded, for every client request a new thread will be created and assigned to that to perform the service. so if one thread initiates destroy() only itself will be terminated but other threads not terminates.... Read More
What is default Session time out in the servers like Tomcat, Weblogic, JBoss,..etc?
Added on Sun, Dec 27, 2009
According to Servlet Specifications one can add following lines in web.xml. <servlet-config> </servlet-config> Read More
What methods will be called in which order?
Added on Sun, Dec 27, 2009
Mainly we are talking about servlets life cycle.Here first init() ->service() ->wthin servlets we use these method accordingly. ->destry(). Read More
How the server will know (i.e) when it can invoke init, service,destroy methods of servlet life cycle?
Added on Sun, Dec 27, 2009
When a request for a servlet is made the container will check for the servlet instance 1. If an instance of the servlet does not exist, the web container 1. Loads the servlet class. 2. Creates an instance of the servlet class. 3. Initializes the... Read More
What is servlet context and what it takes actually as parameters
Added on Sun, Dec 27, 2009
Servlet context is an object which is created as soon as the Servlet gets initialized.Servlet context object is contained in Servlet Config. With the context object u can get access to specific resource (like file) in the server and pass it as a... Read More
What is the request processor in struts? how it works?
Added on Sun, Dec 27, 2009
The RequestProcessor Class is the actual place where the request processing takes place in a Struts controller environment.When the request object first reaches the actionservlet class then it invokes the process method of the underlying... Read More
What is ActionMapping ?
Added on Sun, Dec 27, 2009
In action mapping we specify action class for particular url ie path and diffrent target view ie forwards on to which request response will be forwarded. We also specify to which page control should go if there is validation error for ex input... Read More
When we are saving form bean ,What is the difference between session scope and request scope.
Added on Sun, Dec 27, 2009
If you are using request scope the ActionForm is available only until the end of the request/response cycle.one the response has been returned to the client the actionform and the data within it are no langer accessible.if u want to keep the form... Read More
What is the servlet?
Added on Sun, Dec 27, 2009
Servlets are modules that extend request/response-oriented servers, such as Java-enabled web servers. For example, a servlet may be responsible for taking data in an HTML order-entry form and applying the business logic used to update a company'... Read More
What is the difference between servlets and jsp?
Added on Sun, Dec 27, 2009
In servlet,java will be used to generate dynamic HTML pages,but in JSP,java will be reduced and we can use our custom tags to generate HTML pages. Read More
What information that the ServletResponse interface gives the servlet methods for replying to the client
Added on Sun, Dec 27, 2009
It Allows the servlet to set the content length and MIME type of the reply. Provides an output stream, ServletOutputStream and a Writer through which the servlet can send the reply data. Read More
What is the actual difference between MVC and MVC Model2
Added on Sun, Dec 27, 2009
MVC1, is architecture which does not include struts frame work in it, whereas in case of MVC2 it includes struts frame work.MVC1 is called model1 and MVC2 is called model2. Read More
What is a better approach for enabling thread-safe servlets and JSPs? SingleThreadModel Interface or Synchronization
Added on Sun, Dec 27, 2009
Although the SingleThreadModel technique is easy to use, and works well for low volume sites, it does not scale well. If you anticipate your users to increase in the future, you may be better off implementing explicit synchronization for your... Read More
Explain Struts Framework flow? and How JSP file can be processed?
Added on Sun, Dec 27, 2009
Struts follows MVC architecture and has many design patterns which it uses inside(ex Frontcontroller,Value Objects).First it maps incoming path with path attribute of ActionMapping in struts-config. xml file and finds appropriate Action class for... Read More
When we have the servlets/struts what is the perpose of EJB
Added on Sun, Dec 27, 2009
EJBs have totally different purpose than Servlets/Struts. EJBs are used for business components which require some basic set of features like transaction/persistance etc. and EJBs are hosted in Application servers.Serlvets are used for handling HTTP... Read More
What are the differences between GET and POST service methods?
Added on Sun, Dec 27, 2009
A GET request is a request to get a resource from the server. Choosing GET as the "method" will append all of the data to the URL and it will show up in the URL bar of your browser. The amount of information you can send back using a GET is... Read More
What information that the ServletRequest interface allows the servlet access to?
Added on Sun, Dec 27, 2009
Information such as the names of the parameters passed in by the client, the protocol (scheme) being used by the client, and the names of the remote host that made the request and the server that received it. The input stream, ServletInputStream... Read More
Can I invoke a JSP error page from a servlet?
Added on Sun, Dec 27, 2009
Yes, you can invoke the JSP error page and pass the exception object to it from within a servlet. The trick is to create a request dispatcher for the JSP error page, and pass the exception object as a javax.servlet.jsp.jspException request... Read More
What is servlet ,what is the use of it?
Added on Sun, Dec 27, 2009
servlet is a technology implemented based on a different servers according to different protocals. servlets are used to implentent dynamic webapplications. Read More
What are the advantages using servlets than using CGI?
Added on Sun, Dec 27, 2009
Servlets provide a way to generate dynamic documents that is both easier to write and faster to run. It is efficient, convenient, powerful, portable, secure and inexpensive. Servlets also address the problem of doing server-side programming with... Read More
What is the super class of All servlets?
Added on Sun, Dec 27, 2009
The Class GenericServlet is the super class of all known servlets. This class is extended by other classes like HttpServlet. The GenericServlet class is protocol independent. Read More
Why is that we deploy servlets in a webserver.What exactly is a webserver
Added on Sun, Dec 27, 2009
Web server This is nothing but Program written in Java etc.Ex: Tomcat 5.0 The webserver is exactly running in the JVM.so,whataver the program is written for Tomcat is running in JVM and displaying. Read More
I can do every thing using jsp itself,then what is the need of using servlet?
Added on Sun, Dec 27, 2009
Question : I can do every thing using jsp itself,then what is the need of using servlet? in which situation ,we must use servlet with jsp? Answers: We cann't implements interface in Jsp but it is in the... Read More
What is servlet mapping?
Added on Sun, Dec 27, 2009
The servlet mapping defines an association between a URL pattern and a servlet. The mapping is used to map requests to servlets. Read More
Which code line must be set before any of the lines that use the PrintWriter
Added on Sun, Dec 27, 2009
setContentType() method must be set before transmitting the actual document. Read More
Why is Servlet so popular?
Added on Sun, Dec 27, 2009
Because servlets are platform-independent Java classes that are compiled to platform-neutral byte code that can be loaded dynamically into and run by a Java technology-enabled Web server. Read More
When a client request is sent to the servlet container, how does the container choose which servlet to invoke
Added on Sun, Dec 27, 2009
The servlet container determines which servlet to invoke based on the configuration of its servlets, and calls it with objects representing the request and response. Read More
If a servlet is not properly initialized, what exception may be thrown?
Added on Sun, Dec 27, 2009
During initialization or service of a request, the servlet instance can throw an UnavailableException or a ServletException. Read More
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
Added on Sun, Dec 27, 2009
All major browsers ignore it even though the HTML 3.2 and 4.0 specifications require it. But building a DOCTYPE line tells HTML validators which version of HTML you are using so they know which specification to check your document against. These... Read More
Explain in detail about a servlet
Added on Sun, Dec 27, 2009
A Java servlet can be thought as an Applet but this runs on the server without the front side. This is used in applications where there is need for functionality of the web server and it is also used to access the existing business applications. It... Read More
Request parameter How to find whether a parameter exists in the request object?
Added on Sun, Dec 27, 2009
1.boolean hasFoo = !(request.getParameter("foo") == null || request.getParameter("foo").equals("")); 2. boolean hasParameter = request.getParameterMap().contains(theParameter); (which works in Servlet 2.3+) Read More
State some of the uses of Java servlet?
Added on Sun, Dec 27, 2009
Java servlet is used for many purposes. Being platform and server independent it is used for wide variety of purposes. They can provide secured access to web based data. Type safety and RAD based features help in productivity. It can be used to... Read More
How can I send user authentication information while making URL Connection?
Added on Sun, Dec 27, 2009
You'll want to use HttpURLConnection.setRequestProperty and set all the appropriate headers to HTTP authorization. Read More
What services can be obtained by implementing Java Servlets?
Added on Sun, Dec 27, 2009
These are the following services which can be obtained by using Java servlets they are: - ? Multi user services can be provided by organization using Java servlets to their clients. ? They can also serve static web pages by making use of HTTP/ (s... Read More
Can we use the constructor, instead of init(), to initialize servlet?
Added on Sun, Dec 27, 2009
Yes , of course you can use the constructor instead of init(). There's nothing to stop you. But you shouldn't. The original reason for init() was that ancient versions of Java couldn't dynamically invoke constructors with arguments, so... Read More
Should the user or client be in the same software language in their applications?
Added on Sun, Dec 27, 2009
Servlets are programmed in Java and the user need not be in the same language to access or implement the features of Servlets. They are used in middle tier which provides them a flexibility to be clients for other applications and the client who is... Read More
Is load balancing possible with a servlet?
Added on Sun, Dec 27, 2009
Load balancing is possible with the use of servlets. A servlet can forward requests to other servers which can drastically reduce load. This technique can reduce load by mirroring the same content among several servers. A single logical service can... Read More
Explain about the service method?
Added on Sun, Dec 27, 2009
Request and Response parameters are provided with the service methods. These parameters implement encapsulation; they also give access to parameters which allows them to report errors and status reports. Contrarily servlets retrieve parameters... Read More
Explain about the different usage modes present in Java servlet?
Added on Sun, Dec 27, 2009
Servlets can be used in many different modes they are: - 1) Filter chains can be used to chain servlets together. 2) They can be used to support HTTP protocols. 3) They are the best replacement for CGI based applications 4) Dynamic generation of... Read More
What is servlet context ?
Added on Sun, Dec 27, 2009
The servlet context is an object that contains a servlet's view of the Web application within which the servlet is running. Using the context, a servlet can log events, obtain URL references to resources, and set and store attributes that... Read More
State the different ways of loading a servlet?
Added on Sun, Dec 27, 2009
The different ways in which a servlet can be loaded are as follows: - 1) Dynamic loading of servlet is always possible. 2) Servers do provide an administrative option through which force loading and initialization is possible. 3) Servlets can also... Read More
Explain about servlet container?
Added on Sun, Dec 27, 2009
Servlet container supports servlet execution. Basic functionality of a web server and IDE of Java can be used for better performance. Specific URL`s can be translated into servlet requests. Individual servlets get them selves registered with the... Read More
When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
Added on Sun, Dec 27, 2009
An instance of servlet is created when the servlet is loaded for the first time in the container. Init() method is used to configure this servlet instance. This method is called only once in the life time of a servlet, hence it makes sense to write... Read More
Why don't we write a constructor in a servlet?
Added on Sun, Dec 27, 2009
Container writes a no argument constructor for our servlet. Read More
Explain about performance features of servlets?
Added on Sun, Dec 27, 2009
Creation of a new process for each and every request can be avoided and this is deemed to be the biggest performance feature of servlets. Servlets run in parallel and in hand with the same process in the server. It provides greater flexibility and... Read More
Explain about JVM and Java servlets?
Added on Sun, Dec 27, 2009
Java servlets give greater performance for leveraging Java and related internet technologies. Throughput and response time can be improved by using Java servlets. With help from JVM Java servlet programs take advantage of additional processors... Read More
How does servlets handle data and give some examples of this feature
Added on Sun, Dec 27, 2009
Servlets with precoded logic process data and they return reports in an appropriate format. Some of the examples of such formats are historical graphs and tables, web data, automated forecasts, etc. Administrative data such as addition, deletion of... Read More
What are the two different kinds of servlets used by collecting sites?
Added on Sun, Dec 27, 2009
There are two kinds of servlets used by collecting sites they are used to push and pull data. One kind of servlet is used to push data to the collecting site and the other is used to pull data from the appropriate format. These formats can be clubbed... Read More
What are the various different input parameters which servlets accept?
Added on Sun, Dec 27, 2009
There are various different iinput parameters which servlets accept they are 1) Request or an input stream from an applet or so. 2) Request of the URL 3) From different servlets or networks. 4) Parameters passed from an HTML form. Read More
When destroy method get call, will it call for each user please give the ans in detail?
Added on Sun, Dec 27, 2009
Difference between Service() method and doget() method,, if Request will come then Servlet Container take the request and call to by default service( )method if there doget() or dopost() method available,, In any situation service method call... Read More
How you can activate or call one another servlet method?
Added on Sun, Dec 27, 2009
To call the service method of the another servlet from other servlet 1)if both servlets are part of the same web application user ServletContext application=config.getServletContext(); RequestDispatcher rd=application.getRequestDispatcher(... Read More
Which method is more advantageous doGET() or doPOST()? in which situation does we use doGET() then?
Added on Sun, Dec 27, 2009
Both are are advantageous..Both are having some differences..That are You can send only 256 characters data via GET() method.But these Datas are appear on the URL. So it is not a secure one. If u want to send a bulk of data, Definitely u should use... Read More
How to integare struts and hibernate
Added on Sun, Dec 27, 2009
If you have the better answer, then send it to us. We will display your answer after the approval. Read More
What are the types of refrences available in java. How they work
Added on Sun, Dec 27, 2009
Threre are two types of References available in Java. 1.Interface references. 2.Class references. Interface references:The interface references are used to implement runtime polymorphism. These references can be used to defer the... Read More
How many ways we can destroy the servlet in ur program
Added on Sun, Dec 27, 2009
we can create a temparory servlet which can destroy after every resuest fulfillment,i just forgeted the method to write it.there is no way to distroy the servlet. Read More
How can I retrive only IntegerObjects from a vector in which I stored all types of objects
Added on Sun, Dec 27, 2009
The example code may help you out. Vector v = getDataVector(); //getDataVector() may be some method where you will put all your objects into vector. int size = v.size(); for(int i = 0 ; i<size ; i++){ Object obj = v.elementAt(i); ... Read More
What is the disadvantage of the ServerSideIncludes?
Added on Sun, Dec 27, 2009
Disadvantage of SSI There is one down side of Server-Side Includes. They are very processor intensive. If you don't have a high-powered computer running your web server and you expect to have a lot of traffic, you might want to limit the number... Read More
What is session tracking ?
Added on Sun, Dec 27, 2009
Question : What is session tracking ? state the uses of GET and POST request to handle Http request ? Answers: Session tracking is done to maintain the state, as HTTP is an stateless protocol. Session tracking can be done in... Read More
How do to prevent user by viewing secured page by clicking back button when session expired..:)
Added on Sun, Dec 27, 2009
You will need to set the appropriate HTTP header attributes to prevent the dynamic content output by the JSP page from being cached by the browser. Just execute the following scriptlet at the beginning of your JSP pages to prevent them from being... Read More
What is difault http method in http servlet?
Added on Sun, Dec 27, 2009
Actually the Http methods are Get, Post, Head, Put, Destroy etc.. These methods are called as Http Methods. The default method is Get. For Instance, If u pass the data from Form, by default it is passed via URL. Read More
What is send redirect method? and when it is used?
Added on Sun, Dec 27, 2009
Send redirect method is to send the control to a new page(URL) from the current working web page.this is done when the browser wants the user to send the control to another page when some event is performed. Read More
How to get initialization time (init () method)values in servlet?
Added on Sun, Dec 27, 2009
This can be done by using the getInitParameter(String name ) method of the ServletConfig interface. Here name is the init parameter name Read More
How to get value from init() method in servlet? or
Added on Sun, Dec 27, 2009
U can use getInitParameter(java.lang.String name) method of HttpServlet class to get the value of named parameter or getInitParameterNames() to get the names of the servlet's initialization parameters as an Enumeration of string objects. Read More
In which conditions we have to use the ServletContext
Added on Sun, Dec 27, 2009
When we want to deal with the web application we use servlet context Read More
Suppose in web.xml file we are given 30 and in the servlet program we are given setSessionInActiveInterval(40).when that session will be terminated ? After 30 sec or 40 sec?
Added on Sun, Dec 27, 2009
Session will be terminated depending upon the later updation means it depend upon the xml file and it will take 40 sec because after compiling it will update xml file into 40 sec Read More
How much amount of information will be stored within a session
Added on Sun, Dec 27, 2009
In a session wee can store large amount of data as much as possible. Initially session is used to store information by the client while transaction is made. Read More
What are the JSP atrributes?
Added on Sun, Dec 27, 2009
There are three directives are used in the jsp. one of them is page directive. and the page directive have 11 attributes, which is used to give the information about that page. the 11 attributes are following:- language, buffer, isThreadSafe,... Read More
Can a init(ServletConfig config) method be overrided in servlets
Added on Sun, Dec 27, 2009
The init() method of servlet can be overridden. Remember the init() method is overloaded in the GenericServlet class. But the difference lies in which init method are u calling.. if you override the init(ServletConfig config) method, then you will... Read More
When you have action=get?
Added on Sun, Dec 27, 2009
When we are sure that we are going to send certain amount of bytes or characters upto 400 bytes , we can use GET. If it exceeds that limit we can go for POST. Any number of bytes can be sent over the net as name and value pair and bundled with HTTP. ... Read More
What is the need of super.init(config) in servlets
Added on Sun, Dec 27, 2009
Basically super.init() method should be used whenever u are overriding the init method....else i dont think there is any necessity..... Read More
What is difference between Servelt and Applet
Added on Sun, Dec 27, 2009
Servlet is the server side component and the applet is the client side component.applet makes the request to the servlet and servlet is the server which responed that request Read More
How many ServletConfig and servlet context objects are present in one application?
Added on Sun, Dec 27, 2009
There is one ServletConfig object per servlet. So if there are 10 servlets in an application, there would be 10 ServletConfig objects. And there is only one ServletContext object per aplication. Read More
Servlet is Java class. Then why there is no constructor in Servlet ? Can we write the constructor in Servlet
Added on Sun, Dec 27, 2009
For Instatiating a class we are using constructors. But in servlet init() method itself acts as constructor,here initialisation of servlet will takes place Read More
How to know whether we have to use jsp or servlet in our project
Added on Sun, Dec 27, 2009
Servlet is controller and jsp is of more a view so when the project needs more on view oart we can add JSP other wise both can do the sane thing but in larger projects the servlet code becomes cluttred Read More
How to get one Servlet's Context Information in another Servlet
Added on Sun, Dec 27, 2009
ServletContext context = getServletContext(); // set the Sttribute for this context context.setAttribute("name","veeru"); //get the context in another servlet/resorce by context.getAttibute("name"); Read More
operations performed on vector are either posing a value into the vector (or) retriving a value from
Added on Sun, Dec 27, 2009
Vectot is a legacy class and its synchronized, which means whatever operations performed on Vector is synchronized Read More
When we increase the buffer size in our project using page directive attribute 'buffer' what changes
Added on Sun, Dec 27, 2009
When you increase the buffer size in jsp using the buffer tag then it means that you are increasing the data holding capacity of the buffer. When you access the jsp(incresed buffer size) then the user will observe that the page is loaded with data... Read More
How to communicate between two servlets
Added on Sun, Dec 27, 2009
Two ways: 1. Forward or redirect from one Servlet to another. 2. Load the Servlet from ServletContext and access methods. Read More
How Servlet Applet communication achieved?
Added on Sun, Dec 27, 2009
Use URLConnection class and call URLConnect. openConnection & URLConnection.connect method Read More
What is the use of ServletConfig and ServletContext..?
Added on Sun, Dec 27, 2009
An interface that describes the configuration parameters for a servlet. This is passed to the servlet when the web server calls its init() method. Note that the servlet should save the reference to the ServletConfig object, and define a... Read More
Can we call destroy() method on servlets from service method?
Added on Sun, Dec 27, 2009
Destroy() is a servlet life-cycle method called by servlet container to kill the instance of the servlet. The answer to your question is "Yes". You can call destroy() from within the service(). It will do whatever logic you have in destroy() ... Read More
In struts why we use jsp as view( presentation)? what happen if we use servlet as view?
Added on Sun, Dec 27, 2009
There is no specific reason for that, using JSP we can create presenatation part easily & effectively there r no complication like in Servlet...& JSP is also converted to servlet at last so no probs.... hope answer is usefullNitin Read More
What is the action mapping
Added on Sun, Dec 27, 2009
An ActionMapping represents the information that the controller, RequestProcessor, knows about the mapping of a particular request to an instance of a particular Action class. The instance of ActionMapping is used to select a particular Action is... Read More
type="com.test.LoginForm"/>
Added on Sun, Dec 27, 2009
Question : type="com.test.LoginForm"/> path="/login" type="com.test.user.login.LoginAction" name="loginForm" validate="false"> Question: Assuming the class LoginForm contains a String property named " ... Read More
What is the diff between perform() and execute() method?
Added on Sun, Dec 27, 2009
As per my understanding, both perform() and execute() is the same method with different names. The prior version of struts supported "validate() and Perform()" for your action class whereas the present versions supprots "validate() and Execute()" for... Read More
Can we make Action class,DAOclass without Formclass
Added on Sun, Dec 27, 2009
We can make Action class with out form class and DAO class as well provided no form property is being used in action. cpublic class A extendes Action{ public ActionForward execute(.......){ // no actionform required unless you want to... Read More
What is the diffrence between Apache struts and jakarta struts ?
Added on Sun, Dec 27, 2009
Jakarta is a sub project of Apache. Struts used to be a Jakarta sub project. Struts is now a Apache top level project. To answer the question Jakarta Struts and Apache Struts are the same. Read More
Can we go one page to other page using java script or action Mapping
Added on Sun, Dec 27, 2009
No, because we donot use both , because the struts does not support both togther otherwise browser incomptable problem come arise Read More
Is there any way to define a default method for every in the action mapping of Struts-Config.XML file? If yes then how? Give a piece of code demonstrating the same.
Added on Sun, Dec 27, 2009
As far as my knowledge and experience is concern there is no way to have default method for all the Action Mappings. But what i can suggest you is try to define one interface with the default method declaration and implement in all the Action Forms... Read More
Whats meant by struts?how to use struts in IBM websphere appli. ?
Added on Sun, Dec 27, 2009
Question : Whats meant by struts?how to use struts in IBM websphere appli. ? and how to managed with struts?(plz answer simply just an intro. don't go very deep) Read More
How can i pass info from dyna form bean to Entity Bean(CMP)
Added on Sun, Dec 27, 2009
We can access dynaform bean information in action class after that calls ejb entity beans in execute method .use that entity beans and pass the information of form beans in create or findByprimarykey methods after use if u require. Read More
|
| ©2007, 1000projects.com, Only For Educational Purpose, Non Commercial use! |
|
 |
 |