Ausschüsse
<%@ page language="java" contentType="text/html; charset=ISO-8859-15"
pageEncoding="ISO-8859-15"%>
<%@ page buffer="26kb"%>
<%@ page import="org.apache.struts.Globals" %>
<%@ page import="java.util.Locale" %>
<%
pageContext.setAttribute(Globals.XHTML_KEY, "true",
PageContext.PAGE_SCOPE);
%>
<%
pageContext.setAttribute(Globals.LOCALE_KEY, Locale.GERMAN,
PageContext.SESSION_SCOPE);
%>
<%
System.out.println("============================================================================");
System.out.println("============================================================================");
System.out.println("============================================================================");
System.out.println("============================================================================");
System.out.println("============================================================================");
String thisLocale = "";
if (session.getAttribute("org.apache.struts.action.LOCALE")!=null) {
thisLocale = session.getAttribute("org.apache.struts.action.LOCALE").toString();
}
if (thisLocale.equals("en")) {
System.out.println("Lade englische Ressourcen");
session.setAttribute("formular", "English");
%> <%
} else if (thisLocale.equals("fr")) {
System.out.println("Lade franz. Ressourcen");
session.setAttribute("formular", "Française");
%> <%
} else {
System.out.println("Lade deutsche Ressourcen");
session.setAttribute("formular", "Deutsch");
%> <%
};
System.out.println("putting parameters into request");
request.setAttribute("isEmailSend", new Boolean(false));
if (request.getAttribute("email")==null) {
request.setAttribute("isEmailChangeable", new Boolean(true));
} else {
request.setAttribute("isEmailChangeable", new Boolean(false));
}
if (request.getAttribute("subject")==null) {
request.setAttribute("isSubjectChangeable", new Boolean(true));
} else {
request.setAttribute("isSubjectChangeable", new Boolean(false));
}
if (request.getParameter("receiver")==null) {
session.setAttribute("isReceiverChangeable", new Boolean(true));
} else {
session.setAttribute("isReceiverChangeable", new Boolean(false));
}
if (request.getAttribute("encrypted")!=null) {
request.setAttribute("encrypted", (Boolean) request.getAttribute("encrypted"));
}
System.out.println("Redirecting to showForm.do");
System.out.println("============================================================================");
try {
out.clearBuffer();
} catch (Exception e) {
System.out.println("Fehler: ");
} finally {
String mailReceiver = request.getParameter("mailReceiver");
if (mailReceiver != null) {
request.setAttribute("mailReceiver", mailReceiver);
}
String receiver = request.getParameter("receiver");
if (receiver != null) {
request.setAttribute("receiver", receiver);
}%>
<%
}
%>
Quelle: http://www.bundestag.de/ausschuesse/a13/kiko/kiko_k/link_briefkasten