answersLogoWhite

0

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

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Can you insert a cookie using javascript?

modify document.cookie


How to Tetris?

Go learn C++ and python and javascript coding languages and change the scripts and go from there


How do you insert an image in javascript?

<script type="text/javascript"> var image = new Image; image.src = "imageurl.png"; document.body.appendChild(image); </script>


How to hack Tetris?

Go learn C++ and python and javascript coding languages and change the scripts and go from there


Would you recommend Khan academy to learn coding?

The coding is limited to JavaScript, HTML/CSS and SQL and is really nothing more than an introduction to web-based programming.


Insert date on a webpage using javascript?

Just use new Date(); to get the current date and then use document.getElementById to insert it on the webpage. <div id="example"></div> <script type="text/javascript"> document.getElementById('example') = new Date(); </script>


Which of the following occupations requires knowledge of HTML or JavaScript to produce a website?

web designer


Does java script coding mean using it for Java programs only Can you use it for Unity or Game-maker?

Java and JavaScript are different, and quite unrelated, languages. JavaScript is not "for Java"; basically you use JavaScript to create special effects on Web pages (HTML pages).


The most widely used coding scheme used to represent data?

Binary is the base for all coding in a PC.


What are types of servlet?

Http servlet and Generic servlet


What is different between jsp and servlets?

A JSP is typically oriented more towards displaying information, and a servlet is more oriented towards processing information. For example, a JSP might display a report, while a servlet would process a user submitted form. These uses are not exclusive, but they are optimized more for performing tasks in this manner. It is much easier to incorporate HTML coding into a JSP than a Servlet. It is also easier to write more complex Java code in a 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 get the image file from the database with JSP?

You can retrieve an image file from a database in JSP by writing a servlet that fetches the image from the database and streams it to the JSP page. The servlet will set the content type to "image/jpeg" or the appropriate image format and write the image data to the response output stream. In the JSP page, you can then display the image by setting the source attribute of the img tag to the servlet URL.


Java projects which does not use database?

JavaScript is a computer language that is mostly used in web browsers. An example of JavaScript project without a database is called a login session, this requires a lot of hard coding and requires a lot of multiple ID comparison.


What is the correct JavaScript syntax to insert a comment that has more than one line?

The proper syntax to insert a multi-line comment into JavaScript is to surround the comment with /* and */ function useless() { /* This function doesn't do anything We should come back to it. Soon. */ }


What are disadvantages of javascript?

In short: disabling JavaScript (and similar coding) in your browser will break the internet. A good section of the web uses JavaScript, either to enhance the experience of its users or to manage security (for instance, session control.) Some sites will have been built in a manner that "degrades gracefully" while others that rely on JavaScript simply won't function.


What kind of knowledge you need to make best websites?

You should learn basic coding languages such as HTML, CSS, and JavaScript. It also helps to know PHP.


What coding is used on Neopets?

User-created web pages use HTML and CSS, and TNT pages (owned by Neopets) use HTML, CSS, and JavaScript.


How to insert an auto update table a website?

For a full guide on how to insert an auto update table on a website visit codingforums.com/javascript-programming/208733-need-create-automatic-updating-league-table.html


What is HTML-only?

All websites use HTML, but some sites use HTML in conjunction with one or more other coding languages like Javascript or CSS. HTML-only means it uses just the basic coding.