aspose file tools*
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
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: 60056
    
  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: 60056
    
  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: 39548
    
  27
"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 - updated with new look and Ping home screen widget
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: 39548
    
  27
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
Unable to display the Applet in jsp display tomcat
Insert html
Help with displaying data properly
Alignment of text in JTextPane