• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp scriplet in javascript  RSS feed

 
satheesh subramani
Greenhorn
Posts: 29
Fedora Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi this coding is not working please help me

code=java]<%@page import="java.util.*" %>
<html>
<head></head>
<script>
var str =<%= "dfdf"%>;
document.write(str);
</script>

</html>[[/code]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aside from the fact that you should no longer be using scriptlets, the next step to take is to look at the HTML that is sent to the browser.

Is the syntax correct?






Hint: it's not.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!