Posted on August 29, 2006 by sharat
You cannot override the _jspService() method within a JSP page. You can however, override the jspInit() and jspDestroy() methods within a JSP page. jspInit() can be useful for allocating resources like database connections, network connections, and so forth for the JSP page. It is good programming practice to free any allocated resources within jspDestroy().The jspInit() [...]
Filed under: JSP | 1 Comment »
Posted on August 29, 2006 by sharat
servlet life cycle methods:
init();
service();
destroy();
jsp lifecycle methods:
init();
_service();
destroy();
remember starting any method with _ means we cannot override this method.
Filed under: JSP | 5 Comments »
Posted on August 29, 2006 by sharat
In an HttpServletResponse class:
Response.sendRedirect () This function is used, when we want to redirect
the client request to some other site (i.e out of our context) or
when ever we want to redirect errors. If you are using sendRedirect (), then it will be visible to the client that means the URL which you have been redirected [...]
Filed under: JSP | 3 Comments »
Posted on August 29, 2006 by sharat
DoGet
DoPost
In doGet Method the parameters are appended to the URL and sent along with header information
In doPost, parameters are sent in separate line in the body
Maximum size of data that can be sent using doget is 240 bytes
There is no maximum size for data
Parameters are not encrypted
Parameters are encrypted
DoGet method generally is used to query [...]
Filed under: JSP | 56 Comments »
Posted on August 29, 2006 by sharat
Every Servlet contains a doGet or doPost method.
When we deploy a servlet the init method of the servlet is called. And after it has been deployed on each request of the servlet a separate thread is created to process the doGet/doPost method of the servlet.
So all the instance variables of the servlet are not thread [...]
Filed under: JSP | 5 Comments »
Posted on August 29, 2006 by sharat
Page -
Filed under: JSP | 1 Comment »
Posted on August 29, 2006 by sharat
Implicit objects let developers access container-provided services and resources. These objects are defined as implicit because you do not have to explicitly declare them. They are defined in every JSP page and used behind the scenes by the container whether you declare them or not — although you cannot redeclare them. Because implicit objects are [...]
Filed under: JSP | 2 Comments »
Posted on August 29, 2006 by sharat
A PageContext instance provides access to all the namespaces associated with a JSP page, provides access to several page attributes, as well as a layer above the implementation details. Implicit objects are added to the pageContext automatically.
The PageContext class is an abstract class, designed to be extended to provide implementation dependent implementations thereof, by conformant [...]
Filed under: JSP | 1 Comment »
Posted on August 28, 2006 by sharat
A JSP page can include page fragments from other files to form the complete response. You can use this, for instance, to keep header, footer, and navigation bar content in separate files and include them in all other pages. There are two include mechanisms: the include directive and the include action. It’s not always obvious [...]
Filed under: JSP | 13 Comments »
Posted on August 28, 2006 by sharat
extends=”package.class”
The fully qualified name of the superclass of the Java class file this JSP file will be compiled to. Use this attribute cautiously, as it can limit the JSP container’s ability to provide a specialized superclass that improves the quality of the compiled file.
import=”{package.class | package.* }, …”
A comma-separated list of Java packages that the [...]
Filed under: JSP | Leave a Comment »
Posted on August 28, 2006 by sharat
Declaring a variable in JSP means it will have a scope of page while declaring it in jspInit() means its scope gets end with init() method only.
Filed under: JSP | Leave a Comment »
Posted on August 28, 2006 by sharat
Appropriate HTTP header attributes have to be set to prevent the dynamic content output by the JSP page from being cached by the browser. The following jsp code has to be included at the beginning of your JSP pages to prevent caching :
Execute the following scriptlet at the beginning of your JSP pages to prevent [...]
Filed under: JSP | Leave a Comment »
Posted on August 28, 2006 by sharat
SetContentType() is used to intimate the browser that which type of content is coming as response,Depending upon the contentType browser treats with the response.
* ContentType is also called as MIME(MultipurposeInternetMailExtension)type
* Using this type we can set the response to the client or browser or useragent
* it will give the response based upon the ContentType
* default MIME [...]
Filed under: Uncategorized | 1 Comment »
Posted on August 28, 2006 by sharat
A J2EE application contains J2EE modules, which could be web applications, EJBs and application clients. It also contains meta-information about the application as well as shared libraries. You can also say that a J2EE application is a set of J2EE modules with some added glue that binds them together into a complete integrated application. The [...]
Filed under: JSP | 2 Comments »
Posted on August 27, 2006 by sharat
I guess, if you reading this article means you have some interest in preparing for PMP certification. Acquiring PMP certification is a really challenging one and will change some one life at least by 10 percent in all aspects of project management wisdom. Here you go with few more details about PMP certification. Studying for [...]
Filed under: PMP | 10 Comments »
Posted on August 27, 2006 by sharat
Implicit objects are a set of Java objects that the JSP Container makes available to developers in each page. These objects may be accessed as built-in variables via scripting elements and can also be accessed programmatically by JavaBeans and Servlets.
These objects will be automatically instantiated under specific variable names hence the name implicit.
Object
Class or Interface
Description
page
jsp.HttpJspPage
Page’s [...]
Filed under: JSP | 2 Comments »
Posted on August 27, 2006 by sharat
Tomcat uses the /tomcat/bin/jspc.bat file to make java servlets out of
the JSPs. Run this program without parameters to view the help screen.
It’s pretty simple and easy to use. You can set up another bat file
to call it with parameters. Make sure to include the param “-p
org.apache.jsp” to create all servlets in the standard tomcat package
(package [...]
Filed under: JSP | 1 Comment »
Posted on August 27, 2006 by sharat
Extending a JSP from another servlet or JSP can be a very tricky task. However it is not recommended by sun, because in doing so you restrict the capability of the JSP Engine.
The JSP super class and sub-class need to satisfy certain requirements.
Requirements for the Super Class
Filed under: JSP | Leave a Comment »
Posted on August 27, 2006 by sharat
Welcome to Thinktank blog. All blogs are not same. I will try to make this blog as having a cup of cofee in the morning. Little ideas, greate thoughts, expert talks, professional lessons and many more. so not just another wordpress blog.
Filed under: General | 4 Comments »