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 JSP and the fly likes how to add templete text in jsp 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 » Java » JSP
Bookmark "how to add templete text in jsp" Watch "how to add templete text in jsp" New topic
Author

how to add templete text in jsp

mehulb patel
Greenhorn

Joined: Oct 03, 2013
Posts: 6
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

Joined: Jan 10, 2002
Posts: 60789
    
  65

${whatever}


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
mehulb patel
Greenhorn

Joined: Oct 03, 2013
Posts: 6
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

Joined: Jan 10, 2002
Posts: 60789
    
  65

Use $ not #.
mehulb patel
Greenhorn

Joined: Oct 03, 2013
Posts: 6
but in that not display title and message only blank notification display not give any text
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41132
    
  45
"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.


Ping & DNS - my free Android networking tools app
mehulb patel
Greenhorn

Joined: Oct 03, 2013
Posts: 6
its not working jsp scriptlet tag so other way to solve this problem
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41132
    
  45
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

Joined: Oct 03, 2013
Posts: 6
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
 
subject: how to add templete text in jsp
 
Similar Threads
JSP XML Compliant does not display loop results
Alignment of text in JTextPane
Help with displaying data properly
Insert html
Unable to display the Applet in jsp display tomcat