Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Executing Jsp with JavaScript.

 
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This is in reference to my earlier post "https://coderanch.com/t/437140/JSP/java/setting-session-data-with-javascript"

where i was said it was not possible to do server side work with Javascript , which i wrong .



which is possible.

 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's this got to do with the server? HTML and embedded JavaScript are used and executed in the browser.

"Server-side JavaScript" means that the script is executed on the server; that is possible only if you use a library like Rhino in the web app.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ulf , did you go through my earlier post ??

and session is part of container know.
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't. If by "do server side work with Javascript" you mean that the JavaScript is generated on the server, then you are correct. But everything that's served to a browser is generated by the server, so that's kind of a trivial statement. Of course you can use whatever means a Java web app provides to generate that script code, including customizations based on a user's session. But in terms of execution, JSPs and JavaScript are completely separate from one another.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

JavaScript is generated on the server, then you are correct.



I never meant this .


 
reply
    Bookmark Topic Watch Topic
  • New Topic