users@glassfish.java.net

Re: Set a Cookie with JSP

From: <glassfish_at_javadesktop.org>
Date: Thu, 17 Jan 2008 09:45:16 PST

This is the code but I don't know where I should enter the code for the cookie. I have tested a lot but it doesn't work.

<?xml version="1.0" encoding="UTF-8"?>
<!--
    Document : Page1
    Created on : 09.01.2008, 22:44:34
    Author :
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <webuijsf:page binding="#{Login.page1}" id="page1">
            <webuijsf:html binding="#{Login.html1}" id="html1">
                <webuijsf:head binding="#{Login.head1}" id="head1">
                    <webuijsf:link binding="#{Login.link1}" id="link1" url="/resources/stylesheet.css"/>
                </webuijsf:head>
                <webuijsf:body binding="#{Login.body1}" id="body1" style="-rave-layout: grid">
                    <webuijsf:form binding="#{Login.form1}" id="form1">
                        <webuijsf:panelLayout binding="#{Login.layoutPanel1}" id="layoutPanel1" style="border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0); height: 550px; left: 24px; top: 24px; position: absolute; width: 910px; -rave-layout: grid">
                            <webuijsf:panelLayout binding="#{Login.layoutPanel2}" id="layoutPanel2" style="border-width: 1px; border-style: solid; border-color: rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0) rgb(0, 0, 0); height: 189px; left: 288px; top: 168px; position: absolute; width: 333px; -rave-layout: grid">
                                <webuijsf:label binding="#{Login.label2}" id="label2" style="left: 24px; top: 24px; position: absolute" text="Kundennummer:"/>
                                <webuijsf:label binding="#{Login.label3}" id="label3"
                                    style="height: 24px; left: 24px; top: 48px; position: absolute; width: 93px" text="Passwort:"/>
                                <webuijsf:pageSeparator binding="#{Login.pageSeparator1}" id="pageSeparator1" style="height: 24px; left: 0px; top: 72px; position: absolute; width: 336px"/>
                                <webuijsf:button actionExpression="#{Login.btnLogin_action}" binding="#{Login.btnLogin}" id="btnLogin"
                                    style="height: 24px; left: 24px; top: 72px; position: absolute; width: 142px" text="Login"/>
                                <webuijsf:button actionExpression="#{Login.btnAbbrechen_action}" binding="#{Login.btnAbbrechen}" id="btnAbbrechen"
                                    style="height: 24px; left: 167px; top: 72px; position: absolute; width: 142px" text="Abbrechen"/>
                                <webuijsf:label binding="#{Login.label4}" id="label4"
                                    style="height: 24px; left: 24px; top: 120px; position: absolute; width: 165px" text="Kundennummer vergessen:"/>
                                <webuijsf:label binding="#{Login.label5}" id="label5"
                                    style="position: absolute; left: 24px; top: 144px; width: 168px; height: 24px" text="Passwort vergessen:"/>
                                <webuijsf:hyperlink actionExpression="#{Login.hyperlink1_action}" binding="#{Login.hyperlink1}" id="hyperlink1"
                                    style="position: absolute; left: 216px; top: 120px; width: 96px; height: 24px" text="Hier klicken!"/>
                                <webuijsf:hyperlink actionExpression="#{Login.hyperlink2_action}" binding="#{Login.hyperlink2}" id="hyperlink2"
                                    style="height: 24px; left: 216px; top: 144px; position: absolute; width: 96px" text="Hier klicken!"/>
                                <webuijsf:label binding="#{Login.label1}" for="txtKundennummer" id="label1"
                                    style="height: 24px; left: 24px; top: 0px; position: absolute; text-align: center; text-decoration: underline; width: 285px" text=""/>
                                <webuijsf:passwordField binding="#{Login.txtPasswort}" id="txtPasswort" style="height: 24px; left: 144px; top: 48px; position: absolute; width: 168px"/>
                                <webuijsf:textField binding="#{Login.txtKundennummer}" id="txtKundennummer" style="height: 24px; left: 144px; top: 24px; position: absolute; width: 168px"/>
                            </webuijsf:panelLayout>
                        </webuijsf:panelLayout>
                    </webuijsf:form>
                </webuijsf:body>
            </webuijsf:html>
        </webuijsf:page>
    </f:view>
</jsp:root>
[Message sent by forum member 'choernchen' (choernchen)]

http://forums.java.net/jive/thread.jspa?messageID=254472