File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to add templete text in jsp

 
mehulb patel
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to this two line add in jsp page because i get error in that '#{...} is not allowed in template text'

<h1>#{title}</h1>

#{text}




so any one please help me
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64183
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
${whatever}
 
mehulb patel
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
like that

<script type="text/javascript">

function create( template, vars, opts ){
return $container.notify("create", template, vars, opts);
}

$(function(){
$container = $("#container").notify();

$("#default").click(function(){
create("default", { title:'Project Notification', text:'Your data Saved Successfully.'});
});

});
</script>

<div id="container" style="display:none">
<div id="default">
<h1>#{title}</h1>

#{text}



</div>
</div>
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64183
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use $ not #.
 
mehulb patel
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but in that not display title and message only blank notification display not give any text
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"text" would need to be a request (or other kind of) attributes in order to use "${text}". Generally, the servlet/action that uses this JSP would put it there.
 
mehulb patel
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its not working jsp scriptlet tag so other way to solve this problem
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you putting those attributes in the page (or request, or session) context? Saying "it doesn't work" doesn't give us anything to even begin to speculate what might be going wrong.
 
mehulb patel
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok i understood but in that its display notification message in a jsp website ok i use html,javascript,css, and jquery and i already session create but above code write in for notification purpose so it cannot work so please any suggesttion what i'm doing in that
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic