Class DisplayMessage
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.beans.DisplayMessage
-
public class DisplayMessage extends Object
Store a message in the session, so it can be displayed on the page. Getting the message also removes it from the session, so the same message is not displayed repeatedly.
-
-
Constructor Summary
Constructors Constructor Description DisplayMessage()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetMessageAndClear(javax.servlet.http.HttpServletRequest request)Get the current message from the session, and remove it from the session so it won't be displayed again.static StringgetMessageAndClear(javax.servlet.http.HttpSession session)Get the current message from the session, and remove it from the session so it won't be displayed again.static voidsetMessage(javax.servlet.http.HttpServletRequest request, String message)Store this message on the session.static voidsetMessage(javax.servlet.http.HttpSession session, String message)Store this message on the session.
-
-
-
Method Detail
-
setMessage
public static void setMessage(javax.servlet.http.HttpServletRequest request, String message)Store this message on the session. This will overwrite any previously stored message.
-
setMessage
public static void setMessage(javax.servlet.http.HttpSession session, String message)Store this message on the session. This will overwrite any previously stored message.
-
getMessageAndClear
public static String getMessageAndClear(javax.servlet.http.HttpServletRequest request)
Get the current message from the session, and remove it from the session so it won't be displayed again. If there is no message, return the empty string.
-
getMessageAndClear
public static String getMessageAndClear(javax.servlet.http.HttpSession session)
Get the current message from the session, and remove it from the session so it won't be displayed again. If there is no message, return the empty string.
-
-