Changeset 74:48066e753dd6
- Timestamp:
- 01/27/10 21:24:33 (15 years ago)
- Branch:
- default
- Files:
-
- 2 added
- 7 modified
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
html/formulář.html
r34 r74 5 5 <meta http-equiv="content-language" content="cs"/> 6 6 <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 7 <link href="styl.css" type="text/css" rel="StyleSheet"/> 8 <script type="text/javaScript" src="hlavni.js"></script> 9 <title>SQL: tenhle jazyk tě bude bavit!</title> 7 <title>Objednávka</title> 10 8 </head> 11 9 <body> 12 <div id="zahlavi"><h1>SQL: tenhle jazyk tě bude bavit!</h1></div> 13 14 <div id="bloky"> 15 <div class ="blok" id="napoveda"> 16 <h2>Nápověda</h2> 17 <div class="vnitrekBloku"> 18 <p id="napovedniPole">lorem ipsum, nějaký text, něco jako latina, ale jiné…</p> 19 20 </div> 21 <div id="navigace"> 22 <form action="###"> 23 <button class="predchozi" title="Předchozí lekce"> </button> 24 <button class="zpet" title="Zpět v historii"> </button> 25 <button class="pruvodce" title="Průvodce"> </button> 26 <button class="model" title="Mode databáze"> </button> 27 <button class="vpred" title="Vpřed v historii"> </button> 28 <button class="nasledujici" title="Následující lekce"> </button> 29 </form> 30 31 </div> 32 </div> 33 34 35 <div id="io"> 36 37 <div class ="blok" id="vstup"> 38 <h2>Zadávání SQL příkazů</h2> 39 <div class="vnitrekBloku"> 40 <form action="#"> 41 <fieldset> 42 <textarea id="vstupniPole" rows="100" cols="1000">SELECT * FROM tabulka;</textarea> 43 <button class="zobrazitHistorii" 44 name="zobrazitHistorii" 45 title="Vypíše historii SQL příkazů." 46 type="button" 47 onclick="javascript:ajaxZobrazitHistorii();"> </button> 48 <button class="vykonatSQL" 49 name="vykonatSQL" 50 title="Vykoná zadaný SQL příkaz." 51 type="button" 52 onclick="javascript:ajaxVykonatSQL();"> </button> 53 </fieldset> 54 </form> 55 </div> 56 </div> 57 58 59 60 61 62 <div class ="blok" id="vystup"> 63 <h2>Výsledek</h2> 64 <div class="vnitrekBloku" id="vystupniPole"> 65 <p> 66 lorem ipsum, nějaký text, něco jako latina, ale jiné… 67 lorem ipsum, nějaký text, něco jako latina, ale jiné… 68 lorem ipsum, nějaký text, něco jako latina, ale jiné… 69 lorem ipsum, nějaký text, něco jako latina, ale jiné… 70 lorem ipsum, nějaký text, něco jako latina, ale jiné… 71 lorem ipsum, nějaký text, něco jako latina, ale jiné… 72 lorem ipsum, nějaký text, něco jako latina, ale jiné… 73 lorem ipsum, nějaký text, něco jako latina, ale jiné… 74 lorem ipsum, nějaký text, něco jako latina, ale jiné… 75 lorem ipsum, nějaký text, něco jako latina, ale jiné… 76 lorem ipsum, nějaký text, něco jako latina, ale jiné… 77 lorem ipsum, nějaký text, něco jako latina, ale jiné… 78 lorem ipsum, nějaký text, něco jako latina, ale jiné… 79 lorem ipsum, nějaký text, něco jako latina, ale jiné… 80 lorem ipsum, nějaký text, něco jako latina, ale jiné… 81 lorem ipsum, nějaký text, něco jako latina, ale jiné… 82 lorem ipsum, nějaký text, něco jako latina, ale jiné… 83 lorem ipsum, nějaký text, něco jako latina, ale jiné… 84 lorem ipsum, nějaký text, něco jako latina, ale jiné… 85 lorem ipsum, nějaký text, něco jako latina, ale jiné… 86 lorem ipsum, nějaký text, něco jako latina, ale jiné… 87 lorem ipsum, nějaký text, něco jako latina, ale jiné… 88 lorem ipsum, nějaký text, něco jako latina, ale jiné… 89 lorem ipsum, nějaký text, něco jako latina, ale jiné… 90 lorem ipsum, nějaký text, něco jako latina, ale jiné… 91 lorem ipsum, nějaký text, něco jako latina, ale jiné… 92 lorem ipsum, nějaký text, něco jako latina, ale jiné… 93 lorem ipsum, nějaký text, něco jako latina, ale jiné… 94 lorem ipsum, nějaký text, něco jako latina, ale jiné… 95 lorem ipsum, nějaký text, něco jako latina, ale jiné… 96 </p> 97 </div> 98 </div> 99 </div> 100 101 </div> 102 10 <h1>Objednávka</h1> 11 <form action="/objednavka/" method="post" class="objednavka"> 12 <fieldset class="radio"> 13 <legend>Zvolte variantu</legend><br /> 14 <label><input name="varianta" value="licence" type="radio" />Licence: 1 000 Kč</label><br /> 15 <label><input name="varianta" value="licence-instalace" type="radio" />Licence + odborná instalace: 1 500 Kč</label><br /> 16 <label><input name="varianta" value="hosting" type="radio" />Hostovaný provoz: 300 Kč za měsíc</label><br /> 17 </fieldset> 18 <fieldset> 19 <legend>Zákazník</legend><br /> 20 <label>Název školy: <input name="nazev" maxlength="64" type="text" /></label><br /> 21 <label>Ulice: <input name="ulice" maxlength="64" type="text" /></label><br /> 22 <label>Město: <input name="mesto" maxlength="64" type="text" /></label><br /> 23 <label>PSČ: <input name="psc" maxlength="16" type="text" /></label><br /> 24 <label>IČO: <input name="ico" maxlength="64" type="text" /></label><br /> 25 </fieldset><br /> 26 <fieldset> 27 <legend>Kontaktní údaje</legend><br /> 28 <label>Komtaktní osoba: <input name="osoba" maxlength="128" type="text" /></label><br /> 29 <label>E-mail: <input name="email" maxlength="128" type="text" /></label><br /> 30 <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 /> 31 </fieldset> 32 <fieldset> 33 <legend>Doplňkové údaje</legend><br /> 34 <label>Předpokládaný počet uživatelů: <input name="pocetUzivatelu" maxlength="128" type="text" /></label><br /> 35 <textarea name="komentar" cols="100" rows="10">komentář (pokud nějaký máte)</textarea> 36 </fieldset> 37 <fieldset class="tlacitka"> 38 <legend>Zadat objednávku</legend><br /> 39 <button type="submit">Odeslat objednávku</button><br /> 40 </fieldset> 41 </form> 103 42 </body> 104 43 </html> -
java/sql-vyuka/nbproject/ant-deploy.xml
r8 r74 5 5 <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/> 6 6 <available file="${deploy.ant.resource.dir}" property="has.setup"/> 7 <tempfile prefix=" sjsas" property="sjsas.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->8 <echo message="AS_ADMIN_PASSWORD=${ sjsas.password}" file="${sjsas.password.file}"/>7 <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> 8 <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/> 9 9 </target> 10 10 11 11 <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present"> 12 <tempfile prefix=" sjsas" property="temp.sun.web" destdir="${java.io.tmpdir}"/>12 <tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/> 13 13 <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/> 14 14 <!-- The doctype triggers resolution which can fail --> … … 24 24 </xmlproperty> 25 25 <delete file="${temp.sun.web}"/> 26 <property name="deploy.ant.client.url" value="${sjsas.url}${sun-web-app.context-root}"/> 26 <property name="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}"/> 27 <property name="deploy.context.root.argument" value="?contextroot=${sun-web-app.context-root}"/> 28 </target> 29 <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present"> 30 <property name="deploy.context.root.argument" value=""/> 27 31 </target> 28 32 <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup"> 29 <tempfile prefix=" sjsas" property="sjsas.resources.dir" destdir="${java.io.tmpdir}"/>30 <mkdir dir="${ sjsas.resources.dir}"/>31 <mkdir dir="${ sjsas.resources.dir}/META-INF"/>32 <property name=" sjsas.resources.file" value="${sjsas.resources.dir}/META-INF/sun-resources.xml"/>33 <copy todir="${ sjsas.resources.dir}/META-INF">33 <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/> 34 <mkdir dir="${gfv3.resources.dir}"/> 35 <mkdir dir="${gfv3.resources.dir}/META-INF"/> 36 <property name="gfv3.resources.file" value="${gfv3.resources.dir}/META-INF/sun-resources.xml"/> 37 <copy todir="${gfv3.resources.dir}/META-INF"> 34 38 <fileset dir="${deploy.ant.resource.dir}"/> 35 39 </copy> 36 40 <jar destfile="${deploy.ant.archive}" update="true"> 37 <fileset dir="${ sjsas.resources.dir}"/>41 <fileset dir="${gfv3.resources.dir}"/> 38 42 </jar> 39 <delete dir="${ sjsas.resources.dir}"/>43 <delete dir="${gfv3.resources.dir}"/> 40 44 </target> 41 <target name="-deploy-ant" depends="-parse-sun-web,- add-resources" if="deploy.ant.enabled">45 <target name="-deploy-ant" depends="-parse-sun-web,-no-parse-sun-web,-add-resources" if="deploy.ant.enabled"> 42 46 <echo message="Deploying ${deploy.ant.archive}"/> 43 <taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask" 44 classpath="${sjsas.root}/lib/sun-appserv-ant.jar" /> 45 <sun-appserv-deploy user="${sjsas.username}" 46 passwordfile="${sjsas.password.file}" 47 host="${sjsas.host}" port="${sjsas.port}" 48 file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/> 49 <delete file="${sjsas.password.file}"/> 47 <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> 48 <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/> 49 <get src="${gfv3.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}?force=true?name=${ant.project.name}" 50 dest="${gfv3.results.file}"/> 51 <delete file="${gfv3.results.file}"/> 50 52 </target> 51 53 <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled"> 52 <taskdef name="sun-appserv-undeploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.UndeployTask" 53 classpath="${sjsas.root}/lib/sun-appserv-ant.jar" /> 54 <sun-appserv-undeploy user="${sjsas.username}" 55 passwordfile="${sjsas.password.file}" 56 host="${sjsas.host}" port="${sjsas.port}" 57 file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"/> 58 <delete file="${sjsas.password.file}"/> 54 <echo message="Undeploying ${deploy.ant.archive}"/> 55 <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> 56 <get src="${gfv3.url}/__asadmin/undeploy?name=${ant.project.name}" 57 dest="${gfv3.results.file}"/> 58 <delete file="${gfv3.results.file}"/> 59 59 </target> 60 60 </project> -
java/sql-vyuka/nbproject/build-impl.xml
r46 r74 127 127 <and> 128 128 <isset property="has.custom.manifest"/> 129 <isfalse value="${directory.deployment.supported}"/> 129 <or> 130 <isfalse value="${directory.deployment.supported}"/> 131 <isset property="dist.ear.dir"/> 132 </or> 130 133 </and> 131 134 </condition> … … 135 138 <isset property="has.custom.manifest"/> 136 139 </not> 140 <or> 141 <isfalse value="${directory.deployment.supported}"/> 142 <isset property="dist.ear.dir"/> 143 </or> 144 </and> 145 </condition> 146 <condition property="do.tmp.war.package"> 147 <or> 137 148 <isfalse value="${directory.deployment.supported}"/> 138 </and> 139 </condition> 140 <condition property="do.tmp.war.package"> 141 <isfalse value="${directory.deployment.supported}"/> 149 <isset property="dist.ear.dir"/> 150 </or> 142 151 </condition> 143 152 <property name="build.meta.inf.dir" value="${build.web.dir}/META-INF"/> … … 162 171 <property name="includes" value="**"/> 163 172 <property name="excludes" value=""/> 164 <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">165 <and>166 <isset property="jaxws.endorsed.dir"/>167 <available file="nbproject/jaxws-build.xml"/>168 </and>169 </condition>170 173 <property name="runmain.jvmargs" value=""/> 174 <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> 175 <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> 176 <length length="0" string="${endorsed.classpath}" when="greater"/> 177 </condition> 171 178 </target> 172 179 <target depends="init" name="-init-cos" unless="deploy.on.save"> … … 231 238 <path path="@{classpath}"/> 232 239 </classpath> 233 <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/> 240 <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> 241 <compilerarg line="${javac.compilerargs}"/> 234 242 <customize/> 235 243 </javac> … … 243 251 <attribute default="**" name="testincludes"/> 244 252 <sequential> 245 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" >253 <junit dir="${basedir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true" tempdir="${java.io.tmpdir}"> 246 254 <batchtest todir="${build.test.results.dir}"> 247 255 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> … … 250 258 </batchtest> 251 259 <classpath> 252 <path path="${run.test.classpath}:${j2ee.platform.classpath} "/>260 <path path="${run.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}"/> 253 261 </classpath> 254 262 <syspropertyset> … … 258 266 <formatter type="brief" usefile="false"/> 259 267 <formatter type="xml"/> 268 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 260 269 <jvmarg line="${runmain.jvmargs}"/> 261 270 </junit> … … 270 279 <sequential> 271 280 <java classname="@{classname}" fork="true"> 281 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 272 282 <jvmarg line="${runmain.jvmargs}"/> 273 283 <classpath> … … 347 357 <sequential> 348 358 <java classname="@{classname}" fork="true"> 359 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> 349 360 <jvmarg line="${debug-args-line}"/> 350 361 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> … … 525 536 <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/> 526 537 <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest"> 527 <copyfiles files="${reference.SuperDAO.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.reference.SuperDAO.jar" todir="${dist.ear.dir}"/>538 <copyfiles files="${reference.SuperDAO.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> 528 539 <mkdir dir="${build.web.dir}/META-INF"/> 529 <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"> 530 <attribute name="Class-Path" value="${manifest.reference.SuperDAO.jar} "/> 531 </manifest> 540 <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/> 532 541 </target> 533 542 <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir"> 534 543 <copyfiles files="${reference.SuperDAO.jar}" todir="${build.web.dir}/WEB-INF/lib"/> 535 544 </target> 536 <target depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist"> 545 <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib"> 546 <delete dir="${build.web.dir}/WEB-INF/lib"/> 547 </target> 548 <target depends="init,-clean-webinf-lib,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" if="do.tmp.war.package" name="do-ear-dist"> 537 549 <dirname file="${dist.ear.war}" property="dist.jar.dir"/> 538 550 <mkdir dir="${dist.jar.dir}"/> … … 546 558 </target> 547 559 <target depends="init,compile,-pre-dist,do-dist,-post-dist" description="Build distribution (WAR)." name="dist"/> 548 <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"/>560 <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"/> 549 561 <!-- 550 562 EXECUTION SECTION … … 661 673 DEBUGGING SECTION 662 674 --> 663 <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">675 <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"> 664 676 <nbstartserver debugmode="true"/> 665 677 <antcall target="connect-debugger"/> … … 736 748 <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> 737 749 <mkdir dir="${build.test.classes.dir}"/> 750 <property name="j2ee.platform.embeddableejb.classpath" value=""/> 738 751 </target> 739 752 <target name="-pre-compile-test"> … … 742 755 </target> 743 756 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test" if="have.tests" name="-do-compile-test"> 744 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath} " debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>757 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath}:${j2ee.platform.embeddableejb.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> 745 758 <copy todir="${build.test.classes.dir}"> 746 759 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> … … 758 771 <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> 759 772 <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> 760 <webproject2:javac classpath="${javac.test.classpath}:${j2ee.platform.classpath} " debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" srcdir="${test.src.dir}"/>773 <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}"/> 761 774 <copy todir="${build.test.classes.dir}"> 762 775 <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> … … 805 818 <!-- must exist, otherwise the XML formatter would fail --> 806 819 <mkdir dir="${build.test.results.dir}"/> 807 <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} ">820 <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}"> 808 821 <customize> 809 822 <arg value="showoutput=true"/> -
java/sql-vyuka/nbproject/genfiles.properties
r46 r74 4 4 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 5 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 nbproject/build-impl.xml.data.CRC32= eb6453d47 nbproject/build-impl.xml.script.CRC32= 857df3c08 nbproject/build-impl.xml.stylesheet.CRC32= 8ab4467e@1.15.1.16 nbproject/build-impl.xml.data.CRC32=3f9299bb 7 nbproject/build-impl.xml.script.CRC32=1628db8a 8 nbproject/build-impl.xml.stylesheet.CRC32=b139b33b@1.21.1.1 -
java/sql-vyuka/nbproject/project.properties
r49 r74 19 19 dist.javadoc.dir=${dist.dir}/javadoc 20 20 dist.war=${dist.dir}/${war.name} 21 endorsed.classpath= 21 22 excludes= 22 23 includes=** 23 24 j2ee.deploy.on.save=false 24 25 j2ee.platform=1.5 25 j2ee.server.type= J2EE26 j2ee.server.type=gfv3ee6 26 27 jar.compress=false 27 28 javac.classpath=\ … … 48 49 javadoc.version=false 49 50 javadoc.windowtitle= 51 jaxbwiz.endorsed.dirs="${netbeans.home}/../ide12/modules/ext/jaxb/api" 50 52 jspcompilation.classpath=${jspc.classpath}:${javac.classpath} 51 53 lib.dir=${web.docbase.dir}/WEB-INF/lib -
java/sql-vyuka/nbproject/project.xml
r15 r74 7 7 <minimum-ant-version>1.6.5</minimum-ant-version> 8 8 <web-module-libraries> 9 <library >9 <library dirs="200"> 10 10 <file>${reference.SuperDAO.jar}</file> 11 11 <path-in-war>WEB-INF/lib</path-in-war> -
java/sql-vyuka/src/java/cz/frantovo/sql/vyuka/web/Ajax.java
r37 r74 26 26 */ 27 27 public void setKlient(String ipAdresa, String ipPresmerovano, String idSezeni) { 28 if ("127.0.0.1".equals(ipAdresa) && ipPresmerovano != null) {29 30 31 32 33 28 if (("127.0.0.1".equals(ipAdresa) || "10.0.0.31".equals(ipAdresa)) && ipPresmerovano != null) { 29 uzivatel.setIpAdresa(ipPresmerovano); 30 } else { 31 uzivatel.setIpAdresa(ipAdresa); 32 } 33 uzivatel.setIdSezeni(idSezeni); 34 34 } 35 35 36 36 public void setSqlPrikaz(String sqlPrikaz) { 37 37 this.sqlPrikaz = sqlPrikaz; 38 38 } 39 39 40 40 public void setIdPruvodce(long idPruvodce) { 41 41 this.idPruvodce = idPruvodce; 42 42 } 43 43 44 44 public void setKodPruvodce(String kodPruvodce) { 45 45 this.kodPruvodce = kodPruvodce; 46 46 } 47 47 … … 50 50 */ 51 51 public VysledekSQL getHistorie() { 52 53 52 HistorieDAO h = new HistorieDAO(); 53 return h.nactiHistorii(uzivatel); 54 54 } 55 55 … … 59 59 */ 60 60 public VysledekSQL getSQLVysledek() { 61 62 61 PiskovisteDAO p = new PiskovisteDAO(); 62 return p.vykonejSQL(sqlPrikaz, uzivatel); 63 63 } 64 64 … … 68 68 */ 69 69 public Pruvodce getPruvodcePodleId() { 70 71 72 70 PruvodceDAO dao = new PruvodceDAO(); 71 Pruvodce p = dao.getPruvodce(idPruvodce); 72 return osetriChybuPruvodce(p); 73 73 } 74 74 … … 79 79 */ 80 80 public Pruvodce getPruvodcePodleKodu() { 81 82 83 81 PruvodceDAO dao = new PruvodceDAO(); 82 Pruvodce p = dao.getPruvodce(kodPruvodce); 83 return osetriChybuPruvodce(p); 84 84 } 85 85 … … 90 90 */ 91 91 public Pruvodce getPruvodcePredchozi() { 92 93 94 92 PruvodceDAO dao = new PruvodceDAO(); 93 Pruvodce p = dao.getPruvodcePredchozi(idPruvodce); 94 return osetriChybuPruvodce(p); 95 95 } 96 96 … … 101 101 */ 102 102 public Pruvodce getPruvodceNasledujici() { 103 104 105 103 PruvodceDAO dao = new PruvodceDAO(); 104 Pruvodce p = dao.getPruvodceNasledujici(idPruvodce); 105 return osetriChybuPruvodce(p); 106 106 } 107 107 … … 111 111 */ 112 112 private static Pruvodce osetriChybuPruvodce(Pruvodce p) { 113 114 115 116 117 118 119 120 113 if (p == null) { 114 p = new Pruvodce(); 115 p.setKod("chyba"); 116 p.setNadpis("pruvodce.chyba.nadpis"); 117 p.setObsah("pruvodce.chyba.obsah"); 118 p.setLokalizovat(true); 119 } 120 return p; 121 121 } 122 122 } -
java/sql-vyuka/web/WEB-INF/web.xml
r32 r74 9 9 <welcome-file>index.jsp</welcome-file> 10 10 </welcome-file-list> 11 <error-page> 12 <error-code>404</error-code> 13 <location>/WEB-INF/chyby/404.jsp</location> 14 </error-page> 15 <error-page> 16 <error-code>500</error-code> 17 <location>/WEB-INF/chyby/500.jsp</location> 18 </error-page> 11 19 </web-app>