• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

the foward at the bottom

 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 %>"/>
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know this is old, but I am curious what server you are using. I think there was a bug with Tomcat 5, which might have been fixed in Tomcat 5.0.19, that the server does not evaluate scriptlets and scriplets expressions in the page attribute of a jsp:include action. Could the same be true for forwards? I wonder.
 
reply
    Bookmark Topic Watch Topic
  • New Topic