Below command is useful to connect remote machine or server in Unix.
SSH <user>@<host name>
Example:
SSH anand@mymachine
SSH <user>@<host name>
Example:
SSH anand@mymachine
ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in
phase RESTORE_VIEW 1
javax.faces.application.ViewExpiredException:
viewId:/oracle/webcenter/portalapp/pages/home.jspx - ADF_FACES-30108:The view
state of the page has expired because of inactivity. Reload the page.
|
package portal;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class MyFilter implements Filter {
private FilterConfig fc =
null;
public MyFilter() {
super();
}
public void
init(FilterConfig filterConfig) throws ServletException {
fc = filterConfig;
}
public void
doFilter(ServletRequest servletRequest,
ServletResponse servletResponse,
FilterChain filterChain) throws IOException,
ServletException {
String reqSessionID =
((HttpServletRequest)servletRequest).getreqSessionIDId();
String currentSessionID
=
((HttpServletRequest)servletRequest).getSession().getId();
String requestURI =
((HttpServletRequest)servletRequest).getRequestURI();
boolean sameSession =
currentSessionID.equalsIgnoreCase(reqSessionID);
System.out.println("currentSessionID == reqSessionID? : " +
sameSession);
if (!sameSession
&& reqSessionID != null) {
//((HttpServletResponse)servletResponse).sendRedirect(requestURI);
System.out.println("Session is null");
} else {
filterChain.doFilter(servletRequest,
servletResponse);
System.out.println("Continue to servlet.");
}
}
public void destroy() {
fc = null;
}
}
|
<filter>
<filter-name>AppSessionFilter</filter-name>
<filter-class>portal.MyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AppSessionFilter</filter-name>
<servlet-name>Faces
Servlet</servlet-name>
</filter-mapping>
|