This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes configure tomcat to accept embedded java in .JS file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Reply locked New topic
Author

configure tomcat to accept embedded java in .JS file

Michael Stitch
Greenhorn

Joined: Nov 09, 2011
Posts: 4
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.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60799
    
  65

Please do not post the same question more than once.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: configure tomcat to accept embedded java in .JS file
 
Similar Threads
Radio button
Java embedded in .JS file not working
interpret java code <% ..%> in .js file
external javascript file
embedding Java inside html/,js file not working