File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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: 61218
    
  66

${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: 61218
    
  66

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: 41863
    
  63
"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: 41863
    
  63
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