answersLogoWhite

0

You cannot attach a stylesheet with a servlet. Stylesheets are related to HTML and User Interface layer and hence can be attached to JSP pages.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What are types of servlet?

Http servlet and Generic servlet


What is java servlet chaining?

Servlet Chaining means the output of one servlet act as a input to another servlet. Servlet Aliasing allows us to invoke more than one servlet in sequence when the URL is opened with a common servlet alias. The output from first Servlet is sent as input to other Servlet and so on. The Output from the last Servlet is sent back to the browser. The entire process is called Servlet Chaining.


How do you attach a css file?

Attaching a CSS file is done in the <head> of your HTML document with a <link /> tag. Here's the formatting: <link type="text/css" rel="stylesheet" href="YOURFILE.css" />


How do you link to a stylesheet?

The short answer is to code it into your website: <link rel="stylesheet" type="text/css" href="style.css"/> where style.css is the style sheet.


How do you attach a css file to a a webpage?

The common way of attaching a CSS file to a web page, is to include a link inside the header section. This would look like <link rel="stylesheet" href="style.css" type="text/css" /> This allows you to attach an external CSS style sheet to a web page.


What is the correct xhtml for referring to an external style sheet?

<link href="basic.css" type="text/css" rel="stylesheet" media="screen"/> <link href="print.css" type="text/css" rel="stylesheet" media="print"/>


Can insert javascript coding in servlet?

No. Javascript code can be present inside a JSP but not inside a servlet. A Servlet is a pure java class.


What is servlet mapping?

A Servlet Mapping is a directive in the web.xml that tells the Servlet Container which class to use when a particular Servlet is called. A Servlet is a class within your Java Web Application. Let's say you have a servlet called MyServlet in the com.example.servlet package. You would need to have a Servlet Mapping pointing the path "/MyServlet" to the "com.example.servlet.MyServlet" class. Without the servlet mapping, you would not be able to invoke your servlet because the Servlet container would not know where it is. JSPs are different - they do not need mappings like this. JSPs exist within the WebRoot of the application, so they are always available. Servlets exist in the WEB-INF\Classes directory once your application is deployed.


What did Tituba look like?

Tituba was an Indian woman from the West Indies. She had tan skin and wore elaborate clothes. http://jefferson.village.virginia.edu:8090/saxon/servlet/SaxonServlet?source=salem/texts/pics.xml&style=salem/xsl/dynaxml.xsl&chunk.id=p11&clear-stylesheet-cache=yesTry this site for pictures!


How the pass value from the HTML pages to the servlet?

You need a form to pass value to a servlet. In the form tag, the action element passes the value into the servlet.


How does Apache httpd work?

Tomcat is a servlet container, and the following is how a servlet container works The init, service, and destroy methods are the servlet's lifecycle methods. The init method is called once by the servlet container after the servlet class has been instantiated to indicate to the servlet that it being placed into service. The init method must complete successfully before the servlet can receive any requests. A servlet programmer can override this method to write initialization code that needs to run only once, such as loading a database driver, initializing values, and so on. In other cases, this method is normally left blank. The service method is then called by the servlet container to allow the servlet to respond to a request. The servlet container passes a javax.servlet.ServletRequest object and a javax.servlet.ServletResponse object. The ServletRequest object contains the client's HTTP request information and the ServletResponse encapsulates the servlet's response. These two objects enable you to write custom code that determines how the servlet services the client request. The servlet container calls the destroy method before removing a servlet instance from service. This normally happens when the servlet container is shut down or when the servlet container needs some free memory. This method is called only after all threads within the servlet's service method have exited or after a timeout period has passed. After the servlet container calls destroy, it will not call the service method again on this servlet. The destroy method gives the servlet an opportunity to clean up any resources that are being held (for example, memory, file handles, and threads) and make sure that any persistent state is synchronized with the servlet's current state in memory. For Better Picture, Visit below article full of images to clear the concept : http://shivasoft.in/blog/java/servlet/how-container-handles-the-servlet-request/


What is the full form of XSL?

Extensible StyleSheet Language