answersLogoWhite

0


Best Answer

"script" is an HTML tag used to include JavaScript on a web page.

Example:

<HTML>

<body>

<script type="text/javascript">

document.write("hi there"); // javascript interpreted by the browser

</script>

</body>

</HTML>

"Scriptlet" is a JSP construct used to include Java in a JSP page.

Example:

<HTML>

<body>

<% // this is a scriptlet

response.getWriter().write("hi there"); // Java executed on the server

%>

</body>

</HTML>

Here the result (an HTML document with the text "hi there") is the same in both cases, but the mechanisms are different - Javascript runs in the browser (any browser), while the JSP scriptlet is executed on the server and needs a server with JSP support.

See related links.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between script and scriptlet?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between a prescription and a script?

Nothing.


What are differences between play script and drama?

the difference between play script and drama are the play script has couching and drama is no couchingbow Myra 18 "{P?"{::"""


How do you explain What is a Scriptlet?

In JavaServer Pages (JSP) technology, a scriptlet is a piece of Java-code embedded in the HTML-like JSP code. The scriptlet is everything inside the &lt;% %&gt; tags. Between these the user can add any valid Scriplet i.e. any valid Java Code. Scriptlets are executed at request time, when the JSP engine processes the client request. If the scriptlet produces output, the output is stored in the out object, from which you can display it.


Can you write method in JSP scriptlet?

Yes, you can.


What is difference between subscript and superscript in ms word?

"Super"script raises the letter above the line "Sub"script lowers the letter below


Can variable declared in one scriplet access in another scriplet?

No. Variables declared inside a scriptlet are like method local variables which are not accessible outside the scriptlet/method.


What is the difference between VB-Script and JavaScript?

vbscript is used for server side as well as client side where as java script is used for client side only.


Difference between ASP and JSP?

The main difference between ASP and JSP is that JSP is more script like and includes Java, whereas ASP does not. Both of these are server side languages.


What is difference between vb script and java script?

JavaScript is just like VB Script, but VB Script is what windows made to try to get rid of JavaScript, but as you can see im sure JavaSript is the winner. They are the same thing pretty much just a little alterations in the code.


Difference between java script and xml?

It would be harder to describe the similarity between JavaScript and XML. These two languages are for entirely different purposes.


What is the difference between play script and story?

The difference between a play, a script, and a story is that a script is the words written out for the actors. The script will have words and direction written on it. A play is acted out on a stage. Actors in play use their bodies and voice to tell a story. A story can be in a book, or on television. It is the telling of a certain event.


What is the Difference between c and shell program execution?

The shell interprets the script, while the C-compiler generates a binary executable.