Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp scriplet in javascript  RSS feed

 
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]
 
Author and ninkuma
Marshal
Posts: 66678
167
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.
 
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!