title: How to add success message and failure messages in Liferay?
body: <p>I have requirement that: </p>
  
  <ul>
  <li>After submitting the request, Liferay displays the message </li>
  </ul>
  
  <blockquote>
    <p>Your    request processed successfully</p>
  </blockquote>
  
  <ul>
  <li>Instead of that I have to add custom messages and display them like course created
  successfully, course deleted successfully, course modified successfully etc.. </li>
  </ul>
  
  <p>Is it possible? Is there any way to display the success or failure message?</p>
  
  <pre><code>&lt;%@page import ="javax.portlet.PortletURL" %&gt;
  &lt;%@ page import="javax.portlet.RenderResponse" %&gt;
  &lt;%@ page import="javax.portlet.ActionRequest" %&gt;
  &lt;%@ page import="com.liferay.portal.kernel.util.Validator" %&gt;
  &lt;% 
  
  PortletURL searchCourseURL=renderResponse.createActionURL(); 
  
  searchCourseURL.setParameter(ActionRequest.ACTION_NAME,"findCourses"); 
  
  %&gt;
  &lt;script type="text/javascript" src="/html/js/jquery/jquery.js"&gt;&lt;/script&gt;
  
  &lt;form action="&lt;%=searchCourseURL%&gt;" method="post"&gt;
  &lt;div class="label1"&gt;Enter Course Name&lt;/div&gt;&lt;input type="text" id="cname" name="cname" value=" "/&gt;
  &lt;input type="submit" name="submit" value="Submit"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In the above example, after submitting the request it displays like request process successfully instead I have to display the message: </p>
  
  <blockquote>
    <p>search is completed</p>
  </blockquote>