• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Executing Jsp with JavaScript.

 
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ulf , did you go through my earlier post ??

and session is part of container know.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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



I never meant this .


 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic