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

embedding Java inside html/,js file not working

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi:
In my .jsp file I included a JS file 'abc.js'. This .js file has embedded java code to retrieve data value from a java class. For some reason Tomcat does not like the embedded java code. I was told that I have to change the Tomcat configuraiton to allow pasrsing Java inside the JSP .js file. Can someone tell me how do I configure Tomcat to do that?

abc.js -

function displaySession(){
document.getElementById("update_field" ).style.display = "<%=student.getUpdateField()%>";

Thanks.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not post the same question more than once.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic