File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes I didn't understood the term javascript Engine, What does it mean. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "I didn Watch "I didn New topic

I didn't understood the term javascript Engine, What does it mean.

Rahul Shivsharan
Ranch Hand

Joined: Jun 17, 2009
Posts: 83
I searched on Wikipedia , but i didn't understood the explanation.

Many article says that Javascript engine is used for "Javascript Web server",

But how come web server ?

I have worked on Tomcat server and having knowledge of J2EE framwork,
here a browser send request using a url, now this request hits the web container(Tomcat),
now web container creates req. and res. object and passes it to servlets deployed in webcontainer.

Now from my above knowledge of Web container can you please explain how come javascript be
a web container, and how does it helps us in client-side javascript

Does javascript engine has anything to do with auto-refresh of web-pages

Waiting for the reply
Karthik Shiraly

Joined: Apr 04, 2009
Posts: 875

Javascript is a programming language, like any other language. Like any language, it is capable of doing anything that its compiler/interpreter/runtime allows.
Historically, it's associated with client side web browser interaction, but that is only because the first javascript engines were browser centric.
New engines like Node.js give it capabilities like threads and sockets, which means it can run like any server side language.

In fact, it's possible to serve HTTP requests using Javascript even from a regular JavaEE environment, using JavaSE6 scripting API and with a little help from regular servlets. Trythis servlet which gets all HTTP HTML responses from javascript code by loading and executing an appropriate JS file based on path in HTTP request:

//sayHello.js - invoke with http://localhost:8080/JavaScriptServlet/sayHello

//table.js - invoke with http://localhost:8080/JavaScriptServlet/table?header=Title

In this example, javascript code is piggybacking on JRE for sockets and other system resources. In pure javascript servers like Node.js, the Node runtime provides sockets and other system resources.

I agree. Here's the link:
subject: I didn't understood the term javascript Engine, What does it mean.
It's not a secret anymore!