<%@ page import="java.text.*" %>
<%@ taglib uri="ejbtags" prefix="ejb" %>

<ejb:useHome id="home" type="com.evermind.ejb.NewsItemHome" location="java:comp/env/ejb/NewsItem" />
<ejb:useBean id="news" type="com.evermind.ejb.NewsItem" value="<%=home.findByPrimaryKey(Integer.parseInt(request.getParameter("id")))%>" />
<% DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.LONG, request.getLocale()); %>
<%
	news.setDate(dateFormat.parse(request.getParameter("date")));
	news.setSubject(request.getParameter("subject"));
	news.setText(request.getParameter("text"));
%>
<jsp:forward page="/news.jsp" />
