Web Hosting Java, JSP, Tomcat 6, J2EE, Servlets, Struts, Jboss
JavaSercer Pages Appendix B. JSP API Reference Besides (Paypal hosting)
January 31, 2007 on 8:13 pm | In Java | JavaSercer Pages Appendix B. JSP API Reference Besides the JSP elements described in Appendix A, the JSP specification also defines a number of Java classes and interfaces. Instances of some of these classes are assigned to the implicit variables available to scripting elements in a JSP page. Others are used for development of custom actions and to allow JSP container vendors to encapsulate internal implementations. This appendix describes the classes and interfaces in all these categories. B.1 Implicit Variables The JSP specification defines a number of implicit variables. Most of the implicit variables have types defined by classes and interfaces in the servlet specification’s javax.servlet.http package, but two are part of the JSP javax.servlet.jsp package and one is part of the Java core API. Scripting elements in a JSP page can use these objects to access request and response information as well as objects saved in one of the JSP scopes: page, request, session, and application. application Synopsis Variable Name: application Interface Name: javax.servlet.ServletContext Extends: None Implemented by: Internal container-dependent class JSP Page Type: Available in both regular JSP pages and error pages Description The ServletContext provides resources shared within a web application. It holds attribute values representing the JSP application scope. An attribute value can be an instance of any valid Java class. It also defines a set of methods that a JSP page or a servlet uses to communicate with its container, for example, to get the MIME type of a file, dispatch requests, or write to a log file. The web container is responsible for providing an implementation of the ServletContext interface. A ServletContext is assigned a specific URI path prefix within a web server. For example, a context could be responsible for all resources under http://www.mycorp.com/catalog. All requests that start with the /catalog request path, which is known as the context path, are routed to this servlet context. Only one instance of a ServletContext may be available to the servlets and JSP pages in a web application. If the web application indicates that it is distributable, there must be only one instance of the ServletContext object in use per application per Java Virtual Machine. Interface Declaration public interface ServletContext { public Object getAttribute(String name); public Enumeration getAttributeNames( ); public ServletContext getContext(String uripath); public String getInitParameter(String name); public Enumeration getInitParameterNames( ); public int getMajorVersion( ); public String getMimeType(String filename); public int getMinorVersion( ); public RequestDispatcher getNamedDispatcher(String name); public String getRealPath(String path); public RequestDispatcher getRequestDispatcher(String path); public URL getResource(String path) throws MalformedURLException; page 270
Note: If you are looking for reliable and quality webspace company to host and run your servlet application check professional servlet hosting services
No Comments yet
Sorry, the comment form is closed at this time.
...I
just wanted to take the time to say "Thank you!" for our new webmail
system. It's great! Thanks for taking such good care of us.
Thanks
for helping me out. Just for the record, Webhostingjava.net has been a great
web host! So far your support and handling of questions has far
exceeded that of a "larger web hosting company".
I
would like to thank you for helping me with my domain...You have
shown me great patience and professionalism. I would not hesitate to
recommend you to my clients.