Vlastní (stručné) chybové hlášky (404 a 500), IP adresa pro reverzní proxy (provizorně).
authorFrantišek Kučera <franta-hg@frantovo.cz>
Wed Jan 27 21:24:33 2010 +0100 (2010-01-27)
changeset 7448066e753dd6
parent 73 7252f80b39de
child 75 e0c23170f359
Vlastní (stručné) chybové hlášky (404 a 500), IP adresa pro reverzní proxy (provizorně).
html/formulář.html
java/sql-vyuka/nbproject/ant-deploy.xml
java/sql-vyuka/nbproject/build-impl.xml
java/sql-vyuka/nbproject/genfiles.properties
java/sql-vyuka/nbproject/project.properties
java/sql-vyuka/nbproject/project.xml
java/sql-vyuka/src/java/cz/frantovo/sql/vyuka/web/Ajax.java
java/sql-vyuka/web/WEB-INF/chyby/404.jsp
java/sql-vyuka/web/WEB-INF/chyby/500.jsp
java/sql-vyuka/web/WEB-INF/web.xml
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/html/formulář.html	Wed Jan 27 21:24:33 2010 +0100
     1.3 @@ -0,0 +1,43 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
     1.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
     1.7 +    <head>
     1.8 +        <meta http-equiv="content-language" content="cs"/>
     1.9 +        <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    1.10 +        <title>Objednávka</title>
    1.11 +    </head>
    1.12 +    <body>
    1.13 +        <h1>Objednávka</h1>
    1.14 +        <form action="/objednavka/" method="post" class="objednavka">
    1.15 +            <fieldset class="radio">
    1.16 +                <legend>Zvolte variantu</legend><br />
    1.17 +                <label><input name="varianta" value="licence" type="radio" />Licence: 1&#160;000 Kč</label><br />
    1.18 +                <label><input name="varianta" value="licence-instalace" type="radio" />Licence + odborná instalace: 1&#160;500 Kč</label><br />
    1.19 +                <label><input name="varianta" value="hosting" type="radio" />Hostovaný provoz: 300 Kč za měsíc</label><br />
    1.20 +            </fieldset>
    1.21 +            <fieldset>
    1.22 +                <legend>Zákazník</legend><br />
    1.23 +                <label>Název školy: <input name="nazev" maxlength="64" type="text" /></label><br />
    1.24 +                <label>Ulice: <input name="ulice" maxlength="64" type="text" /></label><br />
    1.25 +                <label>Město: <input name="mesto" maxlength="64" type="text" /></label><br />
    1.26 +                <label>PSČ: <input name="psc" maxlength="16" type="text" /></label><br />
    1.27 +                <label>IČO: <input name="ico" maxlength="64" type="text" /></label><br />
    1.28 +            </fieldset><br />
    1.29 +            <fieldset>
    1.30 +                <legend>Kontaktní údaje</legend><br />
    1.31 +                <label>Komtaktní osoba: <input name="osoba" maxlength="128" type="text" /></label><br />
    1.32 +                <label>E-mail: <input name="email" maxlength="128" type="text" /></label><br />
    1.33 +                <textarea name="klic" cols="100" rows="10">pokud chcete šifrovat e-maily, vložte sem svůj veřejný klíč (PGP/GPG nebo X509)</textarea><br />
    1.34 +            </fieldset>
    1.35 +            <fieldset>
    1.36 +                <legend>Doplňkové údaje</legend><br />
    1.37 +                <label>Předpokládaný počet uživatelů: <input name="pocetUzivatelu" maxlength="128" type="text" /></label><br />
    1.38 +                <textarea name="komentar" cols="100" rows="10">komentář (pokud nějaký máte)</textarea>
    1.39 +            </fieldset>
    1.40 +            <fieldset class="tlacitka">
    1.41 +                <legend>Zadat objednávku</legend><br />
    1.42 +                <button type="submit">Odeslat objednávku</button><br />
    1.43 +            </fieldset>
    1.44 +        </form>
    1.45 +    </body>
    1.46 +</html>
     2.1 --- a/java/sql-vyuka/nbproject/ant-deploy.xml	Sun Dec 20 01:14:28 2009 +0100
     2.2 +++ b/java/sql-vyuka/nbproject/ant-deploy.xml	Wed Jan 27 21:24:33 2010 +0100
     2.3 @@ -4,12 +4,12 @@
     2.4          <property file="${deploy.ant.properties.file}" />
     2.5          <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
     2.6          <available file="${deploy.ant.resource.dir}" property="has.setup"/>
     2.7 -        <tempfile prefix="sjsas" property="sjsas.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
     2.8 -        <echo message="AS_ADMIN_PASSWORD=${sjsas.password}" file="${sjsas.password.file}"/>
     2.9 +        <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
    2.10 +        <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
    2.11      </target>
    2.12      
    2.13      <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
    2.14 -        <tempfile prefix="sjsas" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
    2.15 +        <tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
    2.16          <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
    2.17          <!-- The doctype triggers resolution which can fail -->
    2.18          <replace file="${temp.sun.web}">
    2.19 @@ -23,38 +23,38 @@
    2.20          <xmlproperty file="${temp.sun.web}" validate="false">
    2.21          </xmlproperty>    
    2.22          <delete file="${temp.sun.web}"/>
    2.23 -        <property name="deploy.ant.client.url" value="${sjsas.url}${sun-web-app.context-root}"/>
    2.24 +        <property name="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}"/>
    2.25 +        <property name="deploy.context.root.argument" value="?contextroot=${sun-web-app.context-root}"/>
    2.26 +    </target>
    2.27 +    <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
    2.28 +        <property name="deploy.context.root.argument" value=""/>
    2.29      </target>
    2.30      <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
    2.31 -        <tempfile prefix="sjsas" property="sjsas.resources.dir" destdir="${java.io.tmpdir}"/>
    2.32 -        <mkdir dir="${sjsas.resources.dir}"/>
    2.33 -        <mkdir dir="${sjsas.resources.dir}/META-INF"/>
    2.34 -        <property name="sjsas.resources.file" value="${sjsas.resources.dir}/META-INF/sun-resources.xml"/>
    2.35 -        <copy todir="${sjsas.resources.dir}/META-INF">
    2.36 +        <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
    2.37 +        <mkdir dir="${gfv3.resources.dir}"/>
    2.38 +        <mkdir dir="${gfv3.resources.dir}/META-INF"/>
    2.39 +        <property name="gfv3.resources.file" value="${gfv3.resources.dir}/META-INF/sun-resources.xml"/>
    2.40 +        <copy todir="${gfv3.resources.dir}/META-INF">
    2.41              <fileset dir="${deploy.ant.resource.dir}"/>
    2.42          </copy>
    2.43          <jar destfile="${deploy.ant.archive}" update="true">
    2.44 -            <fileset dir="${sjsas.resources.dir}"/>
    2.45 +            <fileset dir="${gfv3.resources.dir}"/>
    2.46          </jar>
    2.47 -        <delete dir="${sjsas.resources.dir}"/>
    2.48 +        <delete dir="${gfv3.resources.dir}"/>
    2.49      </target>
    2.50 -    <target name="-deploy-ant" depends="-parse-sun-web,-add-resources" if="deploy.ant.enabled">
    2.51 +    <target name="-deploy-ant" depends="-parse-sun-web,-no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
    2.52          <echo message="Deploying ${deploy.ant.archive}"/>
    2.53 -        <taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask"
    2.54 -                 classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
    2.55 -        <sun-appserv-deploy user="${sjsas.username}"
    2.56 -                passwordfile="${sjsas.password.file}"
    2.57 -                host="${sjsas.host}" port="${sjsas.port}"
    2.58 -                file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/>
    2.59 -        <delete file="${sjsas.password.file}"/>
    2.60 +        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
    2.61 +        <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
    2.62 +        <get src="${gfv3.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}?force=true?name=${ant.project.name}"
    2.63 +            dest="${gfv3.results.file}"/>
    2.64 +        <delete file="${gfv3.results.file}"/>    
    2.65      </target>
    2.66      <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
    2.67 -        <taskdef name="sun-appserv-undeploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.UndeployTask"
    2.68 -                 classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
    2.69 -        <sun-appserv-undeploy user="${sjsas.username}"
    2.70 -                passwordfile="${sjsas.password.file}"
    2.71 -                host="${sjsas.host}" port="${sjsas.port}"
    2.72 -                file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/>
    2.73 -        <delete file="${sjsas.password.file}"/>
    2.74 +        <echo message="Undeploying ${deploy.ant.archive}"/>
    2.75 +        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
    2.76 +        <get src="${gfv3.url}/__asadmin/undeploy?name=${ant.project.name}"
    2.77 +            dest="${gfv3.results.file}"/>
    2.78 +        <delete file="${gfv3.results.file}"/>    
    2.79      </target>
    2.80  </project>
     3.1 --- a/java/sql-vyuka/nbproject/build-impl.xml	Sun Dec 20 01:14:28 2009 +0100
     3.2 +++ b/java/sql-vyuka/nbproject/build-impl.xml	Wed Jan 27 21:24:33 2010 +0100
     3.3 @@ -126,7 +126,10 @@
     3.4          <condition property="do.tmp.war.package.with.custom.manifest">
     3.5              <and>
     3.6                  <isset property="has.custom.manifest"/>
     3.7 -                <isfalse value="${directory.deployment.supported}"/>
     3.8 +                <or>
     3.9 +                    <isfalse value="${directory.deployment.supported}"/>
    3.10 +                    <isset property="dist.ear.dir"/>
    3.11 +                </or>
    3.12              </and>
    3.13          </condition>
    3.14          <condition property="do.tmp.war.package.without.custom.manifest">
    3.15 @@ -134,11 +137,17 @@
    3.16                  <not>
    3.17                      <isset property="has.custom.manifest"/>
    3.18                  </not>
    3.19 -                <isfalse value="${directory.deployment.supported}"/>
    3.20 +                <or>
    3.21 +                    <isfalse value="${directory.deployment.supported}"/>
    3.22 +                    <isset property="dist.ear.dir"/>
    3.23 +                </or>
    3.24              </and>
    3.25          </condition>
    3.26          <condition property="do.tmp.war.package">
    3.27 -            <isfalse value="${directory.deployment.supported}"/>
    3.28 +            <or>
    3.29 +                <isfalse value="${directory.deployment.supported}"/>
    3.30 +                <isset property="dist.ear.dir"/>
    3.31 +            </or>
    3.32          </condition>
    3.33          <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/>
    3.34          <condition else="" property="application.args.param" value="${application.args}">
    3.35 @@ -161,13 +170,11 @@
    3.36          <property name="javadoc.encoding.used" value="${source.encoding}"/>
    3.37          <property name="includes" value="**"/>
    3.38          <property name="excludes" value=""/>
    3.39 -        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
    3.40 -            <and>
    3.41 -                <isset property="jaxws.endorsed.dir"/>
    3.42 -                <available file="nbproject/jaxws-build.xml"/>
    3.43 -            </and>
    3.44 +        <property name="runmain.jvmargs" value=""/>
    3.45 +        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
    3.46 +        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
    3.47 +            <length length="0" string="${endorsed.classpath}" when="greater"/>
    3.48          </condition>
    3.49 -        <property name="runmain.jvmargs" value=""/>
    3.50      </target>
    3.51      <target depends="init" name="-init-cos" unless="deploy.on.save">
    3.52          <condition property="deploy.on.save" value="true">
    3.53 @@ -230,7 +237,8 @@
    3.54                      <classpath>
    3.55                          <path path="@{classpath}"/>
    3.56                      </classpath>
    3.57 -                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
    3.58 +                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
    3.59 +                    <compilerarg line="${javac.compilerargs}"/>
    3.60                      <customize/>
    3.61                  </javac>
    3.62              </sequential>
    3.63 @@ -242,14 +250,14 @@
    3.64              <attribute default="${excludes}" name="excludes"/>
    3.65              <attribute default="**" name="testincludes"/>
    3.66              <sequential>
    3.67 -                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
    3.68 +                <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}">
    3.69                      <batchtest todir="${build.test.results.dir}">
    3.70                          <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
    3.71                              <filename name="@{testincludes}"/>
    3.72                          </fileset>
    3.73                      </batchtest>
    3.74                      <classpath>
    3.75 -                        <path path="${run.test.classpath}:${j2ee.platform.classpath}"/>
    3.76 +                        <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/>
    3.77                      </classpath>
    3.78                      <syspropertyset>
    3.79                          <propertyref prefix="test-sys-prop."/>
    3.80 @@ -257,6 +265,7 @@
    3.81                      </syspropertyset>
    3.82                      <formatter type="brief" usefile="false"/>
    3.83                      <formatter type="xml"/>
    3.84 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
    3.85                      <jvmarg line="${runmain.jvmargs}"/>
    3.86                  </junit>
    3.87              </sequential>
    3.88 @@ -269,6 +278,7 @@
    3.89              <element name="customize" optional="true"/>
    3.90              <sequential>
    3.91                  <java classname="@{classname}" fork="true">
    3.92 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
    3.93                      <jvmarg line="${runmain.jvmargs}"/>
    3.94                      <classpath>
    3.95                          <path path="@{classpath}:${j2ee.platform.classpath}"/>
    3.96 @@ -346,6 +356,7 @@
    3.97              <element name="customize" optional="true"/>
    3.98              <sequential>
    3.99                  <java classname="@{classname}" fork="true">
   3.100 +                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   3.101                      <jvmarg line="${debug-args-line}"/>
   3.102                      <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
   3.103                      <jvmarg line="${runmain.jvmargs}"/>
   3.104 @@ -524,16 +535,17 @@
   3.105      </target>
   3.106      <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
   3.107      <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
   3.108 -        <copyfiles files="${reference.SuperDAO.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.reference.SuperDAO.jar" todir="${dist.ear.dir}"/>
   3.109 +        <copyfiles files="${reference.SuperDAO.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
   3.110          <mkdir dir="${build.web.dir}/META-INF"/>
   3.111 -        <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update">
   3.112 -            <attribute name="Class-Path" value="${manifest.reference.SuperDAO.jar} "/>
   3.113 -        </manifest>
   3.114 +        <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
   3.115      </target>
   3.116      <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
   3.117          <copyfiles files="${reference.SuperDAO.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
   3.118      </target>
   3.119 -    <target depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
   3.120 +    <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
   3.121 +        <delete dir="${build.web.dir}/WEB-INF/lib"/>
   3.122 +    </target>
   3.123 +    <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist">
   3.124          <dirname file="${dist.ear.war}" property="dist.jar.dir"/>
   3.125          <mkdir dir="${dist.jar.dir}"/>
   3.126          <jar compress="${jar.compress}" jarfile="${dist.ear.war}" manifest="${build.web.dir}/META-INF/MANIFEST.MF">
   3.127 @@ -545,7 +557,7 @@
   3.128          <!-- You can override this target in the ../build.xml file. -->
   3.129      </target>
   3.130      <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/>
   3.131 -    <target depends="init,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
   3.132 +    <target depends="init,-clean-webinf-lib,-init-cos,compile,-pre-dist,do-ear-dist,-post-dist" description="Build distribution (WAR) to be packaged into an EAR." name="dist-ear"/>
   3.133      <!--
   3.134                  EXECUTION SECTION
   3.135              -->
   3.136 @@ -660,7 +672,7 @@
   3.137      <!--
   3.138                  DEBUGGING SECTION
   3.139              -->
   3.140 -    <target depends="init,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
   3.141 +    <target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest" description="Debug project in IDE." if="netbeans.home" name="debug">
   3.142          <nbstartserver debugmode="true"/>
   3.143          <antcall target="connect-debugger"/>
   3.144          <nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="true"/>
   3.145 @@ -735,13 +747,14 @@
   3.146              -->
   3.147      <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
   3.148          <mkdir dir="${build.test.classes.dir}"/>
   3.149 +        <property name="j2ee.platform.embeddableejb.classpath" value=""/>
   3.150      </target>
   3.151      <target name="-pre-compile-test">
   3.152          <!-- Empty placeholder for easier customization. -->
   3.153          <!-- You can override this target in the ../build.xml file. -->
   3.154      </target>
   3.155      <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test">
   3.156 -        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   3.157 +        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
   3.158          <copy todir="${build.test.classes.dir}">
   3.159              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   3.160          </copy>
   3.161 @@ -757,7 +770,7 @@
   3.162      </target>
   3.163      <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
   3.164          <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
   3.165 -        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
   3.166 +        <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>
   3.167          <copy todir="${build.test.classes.dir}">
   3.168              <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
   3.169          </copy>
   3.170 @@ -804,7 +817,7 @@
   3.171          <delete file="${test.report.file}"/>
   3.172          <!-- must exist, otherwise the XML formatter would fail -->
   3.173          <mkdir dir="${build.test.results.dir}"/>
   3.174 -        <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
   3.175 +        <webproject1:debug args="${test.class}" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}:${j2ee.platform.embeddableejb.classpath}">
   3.176              <customize>
   3.177                  <arg value="showoutput=true"/>
   3.178                  <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
     4.1 --- a/java/sql-vyuka/nbproject/genfiles.properties	Sun Dec 20 01:14:28 2009 +0100
     4.2 +++ b/java/sql-vyuka/nbproject/genfiles.properties	Wed Jan 27 21:24:33 2010 +0100
     4.3 @@ -3,6 +3,6 @@
     4.4  build.xml.stylesheet.CRC32=c0ebde35
     4.5  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
     4.6  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
     4.7 -nbproject/build-impl.xml.data.CRC32=eb6453d4
     4.8 -nbproject/build-impl.xml.script.CRC32=857df3c0
     4.9 -nbproject/build-impl.xml.stylesheet.CRC32=8ab4467e@1.15.1.1
    4.10 +nbproject/build-impl.xml.data.CRC32=3f9299bb
    4.11 +nbproject/build-impl.xml.script.CRC32=1628db8a
    4.12 +nbproject/build-impl.xml.stylesheet.CRC32=b139b33b@1.21.1.1
     5.1 --- a/java/sql-vyuka/nbproject/project.properties	Sun Dec 20 01:14:28 2009 +0100
     5.2 +++ b/java/sql-vyuka/nbproject/project.properties	Wed Jan 27 21:24:33 2010 +0100
     5.3 @@ -18,11 +18,12 @@
     5.4  dist.ear.war=${dist.dir}/${war.ear.name}
     5.5  dist.javadoc.dir=${dist.dir}/javadoc
     5.6  dist.war=${dist.dir}/${war.name}
     5.7 +endorsed.classpath=
     5.8  excludes=
     5.9  includes=**
    5.10  j2ee.deploy.on.save=false
    5.11  j2ee.platform=1.5
    5.12 -j2ee.server.type=J2EE
    5.13 +j2ee.server.type=gfv3ee6
    5.14  jar.compress=false
    5.15  javac.classpath=\
    5.16      ${reference.SuperDAO.jar}
    5.17 @@ -47,6 +48,7 @@
    5.18  javadoc.use=true
    5.19  javadoc.version=false
    5.20  javadoc.windowtitle=
    5.21 +jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api"
    5.22  jspcompilation.classpath=${jspc.classpath}:${javac.classpath}
    5.23  lib.dir=${web.docbase.dir}/WEB-INF/lib
    5.24  persistence.xml.dir=${conf.dir}
     6.1 --- a/java/sql-vyuka/nbproject/project.xml	Sun Dec 20 01:14:28 2009 +0100
     6.2 +++ b/java/sql-vyuka/nbproject/project.xml	Wed Jan 27 21:24:33 2010 +0100
     6.3 @@ -6,7 +6,7 @@
     6.4              <name>sql-vyuka</name>
     6.5              <minimum-ant-version>1.6.5</minimum-ant-version>
     6.6              <web-module-libraries>
     6.7 -                <library>
     6.8 +                <library dirs="200">
     6.9                      <file>${reference.SuperDAO.jar}</file>
    6.10                      <path-in-war>WEB-INF/lib</path-in-war>
    6.11                  </library>
     7.1 --- a/java/sql-vyuka/src/java/cz/frantovo/sql/vyuka/web/Ajax.java	Sun Dec 20 01:14:28 2009 +0100
     7.2 +++ b/java/sql-vyuka/src/java/cz/frantovo/sql/vyuka/web/Ajax.java	Wed Jan 27 21:24:33 2010 +0100
     7.3 @@ -25,32 +25,32 @@
     7.4       * @param idSezeni javovská HTTP relace
     7.5       */
     7.6      public void setKlient(String ipAdresa, String ipPresmerovano, String idSezeni) {
     7.7 -        if ("127.0.0.1".equals(ipAdresa) && ipPresmerovano != null) {
     7.8 -            uzivatel.setIpAdresa(ipPresmerovano);
     7.9 -        } else {
    7.10 -            uzivatel.setIpAdresa(ipAdresa);
    7.11 -        }
    7.12 -        uzivatel.setIdSezeni(idSezeni);
    7.13 +	if (("127.0.0.1".equals(ipAdresa) || "10.0.0.31".equals(ipAdresa)) && ipPresmerovano != null) {
    7.14 +	    uzivatel.setIpAdresa(ipPresmerovano);
    7.15 +	} else {
    7.16 +	    uzivatel.setIpAdresa(ipAdresa);
    7.17 +	}
    7.18 +	uzivatel.setIdSezeni(idSezeni);
    7.19      }
    7.20  
    7.21      public void setSqlPrikaz(String sqlPrikaz) {
    7.22 -        this.sqlPrikaz = sqlPrikaz;
    7.23 +	this.sqlPrikaz = sqlPrikaz;
    7.24      }
    7.25  
    7.26      public void setIdPruvodce(long idPruvodce) {
    7.27 -        this.idPruvodce = idPruvodce;
    7.28 +	this.idPruvodce = idPruvodce;
    7.29      }
    7.30  
    7.31      public void setKodPruvodce(String kodPruvodce) {
    7.32 -        this.kodPruvodce = kodPruvodce;
    7.33 +	this.kodPruvodce = kodPruvodce;
    7.34      }
    7.35  
    7.36      /**
    7.37       * @return Historie SQL příkazů daného uživatele.
    7.38       */
    7.39      public VysledekSQL getHistorie() {
    7.40 -        HistorieDAO h = new HistorieDAO();
    7.41 -        return h.nactiHistorii(uzivatel);
    7.42 +	HistorieDAO h = new HistorieDAO();
    7.43 +	return h.nactiHistorii(uzivatel);
    7.44      }
    7.45  
    7.46      /**
    7.47 @@ -58,8 +58,8 @@
    7.48       * @return Výsledek dotazu – tabulka, hláška nebo chyba.
    7.49       */
    7.50      public VysledekSQL getSQLVysledek() {
    7.51 -        PiskovisteDAO p = new PiskovisteDAO();
    7.52 -        return p.vykonejSQL(sqlPrikaz, uzivatel);
    7.53 +	PiskovisteDAO p = new PiskovisteDAO();
    7.54 +	return p.vykonejSQL(sqlPrikaz, uzivatel);
    7.55      }
    7.56  
    7.57      /**
    7.58 @@ -67,9 +67,9 @@
    7.59       * @return průvodce nebo chybová hláška.
    7.60       */
    7.61      public Pruvodce getPruvodcePodleId() {
    7.62 -        PruvodceDAO dao = new PruvodceDAO();
    7.63 -        Pruvodce p = dao.getPruvodce(idPruvodce);
    7.64 -        return osetriChybuPruvodce(p);
    7.65 +	PruvodceDAO dao = new PruvodceDAO();
    7.66 +	Pruvodce p = dao.getPruvodce(idPruvodce);
    7.67 +	return osetriChybuPruvodce(p);
    7.68      }
    7.69  
    7.70      /**
    7.71 @@ -78,9 +78,9 @@
    7.72       * @return průvodce nebo chybová hláška.
    7.73       */
    7.74      public Pruvodce getPruvodcePodleKodu() {
    7.75 -        PruvodceDAO dao = new PruvodceDAO();
    7.76 -        Pruvodce p = dao.getPruvodce(kodPruvodce);
    7.77 -        return osetriChybuPruvodce(p);
    7.78 +	PruvodceDAO dao = new PruvodceDAO();
    7.79 +	Pruvodce p = dao.getPruvodce(kodPruvodce);
    7.80 +	return osetriChybuPruvodce(p);
    7.81      }
    7.82  
    7.83      /**
    7.84 @@ -89,9 +89,9 @@
    7.85       * @return průvodce nebo chybová hláška.
    7.86       */
    7.87      public Pruvodce getPruvodcePredchozi() {
    7.88 -        PruvodceDAO dao = new PruvodceDAO();
    7.89 -        Pruvodce p = dao.getPruvodcePredchozi(idPruvodce);
    7.90 -        return osetriChybuPruvodce(p);
    7.91 +	PruvodceDAO dao = new PruvodceDAO();
    7.92 +	Pruvodce p = dao.getPruvodcePredchozi(idPruvodce);
    7.93 +	return osetriChybuPruvodce(p);
    7.94      }
    7.95  
    7.96      /**
    7.97 @@ -100,9 +100,9 @@
    7.98       * @return průvodce nebo chybová hláška.
    7.99       */
   7.100      public Pruvodce getPruvodceNasledujici() {
   7.101 -        PruvodceDAO dao = new PruvodceDAO();
   7.102 -        Pruvodce p = dao.getPruvodceNasledujici(idPruvodce);
   7.103 -        return osetriChybuPruvodce(p);
   7.104 +	PruvodceDAO dao = new PruvodceDAO();
   7.105 +	Pruvodce p = dao.getPruvodceNasledujici(idPruvodce);
   7.106 +	return osetriChybuPruvodce(p);
   7.107      }
   7.108  
   7.109      /**
   7.110 @@ -110,13 +110,13 @@
   7.111       * @return zadaná stránka, nebo chybová hláška, pokud bylo načteno „null“
   7.112       */
   7.113      private static Pruvodce osetriChybuPruvodce(Pruvodce p) {
   7.114 -        if (p == null) {
   7.115 -            p = new Pruvodce();
   7.116 -            p.setKod("chyba");
   7.117 -            p.setNadpis("pruvodce.chyba.nadpis");
   7.118 -            p.setObsah("pruvodce.chyba.obsah");
   7.119 -            p.setLokalizovat(true);
   7.120 -        }
   7.121 -        return p;
   7.122 +	if (p == null) {
   7.123 +	    p = new Pruvodce();
   7.124 +	    p.setKod("chyba");
   7.125 +	    p.setNadpis("pruvodce.chyba.nadpis");
   7.126 +	    p.setObsah("pruvodce.chyba.obsah");
   7.127 +	    p.setLokalizovat(true);
   7.128 +	}
   7.129 +	return p;
   7.130      }
   7.131  }
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/java/sql-vyuka/web/WEB-INF/chyby/404.jsp	Wed Jan 27 21:24:33 2010 +0100
     8.3 @@ -0,0 +1,20 @@
     8.4 +<?xml version="1.0" encoding="UTF-8"?>
     8.5 +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
     8.6 +	  xmlns:c="http://java.sun.com/jsp/jstl/core"
     8.7 +	  version="2.0">
     8.8 +    <jsp:directive.page contentType="application/xhtml+xml" isErrorPage="true"/>
     8.9 +    <jsp:output doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
    8.10 +		doctype-root-element="html"
    8.11 +		omit-xml-declaration="false"/>
    8.12 +
    8.13 +    <html xmlns="http://www.w3.org/1999/xhtml">
    8.14 +	<head>
    8.15 +	    <title>404 Stránka nenalezena</title>
    8.16 +	</head>
    8.17 +	<body>
    8.18 +	    <h1>404 Stránka nenalezena</h1>
    8.19 +	    <p>Takovou stránku tu bohužel nemáme.</p>
    8.20 +	</body>
    8.21 +    </html>
    8.22 +
    8.23 +</jsp:root>
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/java/sql-vyuka/web/WEB-INF/chyby/500.jsp	Wed Jan 27 21:24:33 2010 +0100
     9.3 @@ -0,0 +1,20 @@
     9.4 +<?xml version="1.0" encoding="UTF-8"?>
     9.5 +<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
     9.6 +	  xmlns:c="http://java.sun.com/jsp/jstl/core"
     9.7 +	  version="2.0">
     9.8 +    <jsp:directive.page contentType="application/xhtml+xml" isErrorPage="true"/>
     9.9 +    <jsp:output doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
    9.10 +		doctype-root-element="html"
    9.11 +		omit-xml-declaration="false"/>
    9.12 +
    9.13 +    <html xmlns="http://www.w3.org/1999/xhtml">
    9.14 +	<head>
    9.15 +	    <title>500 Interní chyba serveru</title>
    9.16 +	</head>
    9.17 +	<body>
    9.18 +	    <h1>500 Interní chyba serveru</h1>
    9.19 +	    <p>Něco se nám nepovedlo.</p>
    9.20 +	</body>
    9.21 +    </html>
    9.22 +
    9.23 +</jsp:root>
    10.1 --- a/java/sql-vyuka/web/WEB-INF/web.xml	Sun Dec 20 01:14:28 2009 +0100
    10.2 +++ b/java/sql-vyuka/web/WEB-INF/web.xml	Wed Jan 27 21:24:33 2010 +0100
    10.3 @@ -8,4 +8,12 @@
    10.4      <welcome-file-list>
    10.5          <welcome-file>index.jsp</welcome-file>
    10.6      </welcome-file-list>
    10.7 +    <error-page>
    10.8 +        <error-code>404</error-code>
    10.9 +        <location>/WEB-INF/chyby/404.jsp</location>
   10.10 +    </error-page>
   10.11 +    <error-page>
   10.12 +        <error-code>500</error-code>
   10.13 +        <location>/WEB-INF/chyby/500.jsp</location>
   10.14 +    </error-page>
   10.15  </web-app>