The foward does nto work, I get a blank page and no errors in the logs. What is the problem?
<%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %>
<%@ page import="gsptech.portal.beans.*"%>
<%@ page import="gsptech.portal.biz.*"%>
<
jsp:useBean id="userBean" class="gsptech.portal.beans.UserBean"/>
<jsp:useBean id="linkBean" class="gsptech.portal.beans.LinkBean"/>
<%
userBean = (UserBean)application.getAttribute("gsptech.portal.beans.UserBean");
Activity login_activity = (Activity)session.getAttribute("LOGIN_STATISTICS");
try
{
if( login_activity == null || !userBean.isSessionValid(login_activity) )
{
String error = "/jsp/notloggedin2.jsp?message=You are not allowed to view this link because you are not logged into the portal";
System.out.println("--Attempted Link when not logged in--");
%><jsp:forward page="<%= error %>"/><%
}
}
catch (Exception e)
{ System.out.println("OOPS, Problem checking the status of the User in Display: " + e); }
User user = (User)session.getAttribute("user");
linkBean = (LinkBean)application.getAttribute("gsptech.portal.beans.LinkBean");
Link link = new Link();
link = linkBean.getLink(Integer.parseInt(request.getParameter("linkid")));
String description = link.getSubtitle();
String next_url = link.getURL();
//System.out.println(description);
if (description!=null)
{
if (description.equals("FedExBrand"))
{
next_url = link.getURL() + "?subscriber=" + user.getLoginName();
}
}
Activity activity = new Activity();
activity.setStartTime(new java.sql.Timestamp(System.currentTimeMillis()));
activity.setEndTime(new java.sql.Timestamp(System.currentTimeMillis()));
activity.setLoginName(user.getLoginName());
activity.setLinkId(Integer.parseInt(request.getParameter("linkid")));
userBean.logActivity(activity);
System.out.println(next_url);
%>
<jsp:forward page="<%= next_url %>"/>