<%@ page language="java" import="edu.psu.geovista.web.NewsItem" %> <%@ page import="java.util.Hashtable" %> <%@ page import="java.util.StringTokenizer" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Calendar" %> <%@ page import="java.text.SimpleDateFormat" %> <%@ page import="java.io.File" %> <%@ page errorPage="../../exception.jsp" %> <% //String query = request.getQueryString(); //System.out.println("query="+query); //Hashtable qt = HttpUtils.parseQueryString(query); String newsIdString = request.getParameter("newsid"); //String newsIdString = ((String[])qt.get("newsid"))[0]; //System.out.println("newsIDStr: " + newsIdString); int newsId = Integer.parseInt(newsIdString); //System.out.println("newsID: " + newsId); NewsItem myStory = newsBean.getNews(newsId); SimpleDateFormat sdf = new SimpleDateFormat("EEEE, dd MMMM yyyy"); Date startingDate = myStory.getStartDate(); String startDate = sdf.format(startingDate); Date endingDate = myStory.getEndDate(); String endDate = sdf.format(endingDate); String link = myStory.getUrl() + ""; String imageLocation = myStory.getImageLocation() + ""; File imageFile = new File(imageLocation); String fileName = "../images/" + imageFile.getName(); %> <%=myStory.getTitle()%> | GeoVISTA News

<%=myStory.getTitle()%>

<%=myStory.getBody()%>

For more information, contact <%=myStory.getContactName()%> at <%=myStory.getContactEmail()%>

<% //System.out.println("URL is:"+link); if(!link.equalsIgnoreCase("null")) { %>

Visit <%=link%> to learn more.

<% } if (!imageLocation.equalsIgnoreCase("null") && !imageLocation.equalsIgnoreCase("")) { %>

<% } %>