pfc-prolog-cvs Mailing List for pfc-prolix (Page 13)
Status: Beta
Brought to you by:
ivanfrade
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(77) |
Jun
(37) |
Jul
(152) |
Aug
(180) |
Sep
(45) |
Oct
|
Nov
|
Dec
|
---|
From: <iva...@us...> - 2003-07-15 16:06:46
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv18714 Modified Files: build.xml Log Message: FIXED 771494: Added undeploy target to clean all aplication from container Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** build.xml 15 Jul 2003 15:59:19 -0000 1.35 --- build.xml 15 Jul 2003 16:06:43 -0000 1.36 *************** *** 504,507 **** --- 504,510 ---- </target> + <target name="undeploy" depends="undeploy-client,undeploy-server"> + </target> + <!-- =================================================================== --> <!-- Creates the client binary --> |
From: <iva...@us...> - 2003-07-15 15:59:22
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv17175 Modified Files: build.xml Log Message: Created new targets to deploy and undeploy separated server and client. Corrected clean target. Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** build.xml 15 Jul 2003 15:04:37 -0000 1.34 --- build.xml 15 Jul 2003 15:59:19 -0000 1.35 *************** *** 448,470 **** </target> - <!-- =================================================================== --> - <!-- Used when only changes the web part (don't need to recompile server side) --> - <!-- =================================================================== --> - - <target name="compile-web" depends="xdoclet-generate"> - <jar jarfile="${dist.dir}/${war.file}"> - <fileset - dir="${src.web.dir}" - includes="**/**" - > - </fileset> - <fileset - dir="${client.generated}" - includes="**/*.xml" - > - </fileset> - </jar> - <copy file="${dist.dir}/${war.file}" todir="${jboss.deploy}" /> - </target> <!-- =================================================================== --> --- 448,451 ---- *************** *** 493,497 **** <!-- =================================================================== --> ! <!-- Deploys server binary --> <!-- =================================================================== --> --- 474,478 ---- <!-- =================================================================== --> ! <!-- Target to deploy and undeploy server and client binary --> <!-- =================================================================== --> *************** *** 499,515 **** <!-- FIXME Must copy interpreter and interpreter interfaces to to JBOSS_HOME/server/default/lib ? --> ! <target name="deploy-server" depends="jar"> ! <!-- FIXME VI commented while test struts --> ! <!-- <copy file="${dist.dir}/prolix-beans.jar" todir="${jboss.deploy}"/> ! --> <copy file="${dist.dir}/${war.file}" todir="${jboss.deploy}" /> ! </target> ! ! <!-- =================================================================== --> <!-- Creates the client binary --> <!-- =================================================================== --> ! <target name="create-client" depends="jar"> <!-- Convert the given paths to Windows --> <pathconvert targetos="windows" property="jboss.home.on.windows" > --- 480,512 ---- <!-- FIXME Must copy interpreter and interpreter interfaces to to JBOSS_HOME/server/default/lib ? --> ! <target name="deploy-server" depends="jar"> <copy file="${dist.dir}/prolix-beans.jar" todir="${jboss.deploy}"/> ! </target> ! ! <target name="deploy-client" depends="jar"> <copy file="${dist.dir}/${war.file}" todir="${jboss.deploy}" /> ! </target> ! ! <target name="undeploy-server" depends="jar"> ! <property name="jboss.tmp.dir" ! value="server/default/tmp/deploy/server/default" /> ! ! <delete file="${jboss.deploy}/prolix-beans.jar"/> ! <delete ! dir="${jboss.home}/${jboss.tmp.dir}/lib/prolix-dummy-interpreter.jar"/> ! <delete ! dir="${jboss.home}/${jboss.tmp.dir}/deploy/prolix-beans.jar"/> ! ! </target> ! ! <target name="undeploy-client" depends="jar"> ! <delete file="${jboss.deploy}/${war.file}"/> ! </target> ! ! <!-- =================================================================== --> <!-- Creates the client binary --> <!-- =================================================================== --> ! <target name="create-console-client" depends="jar"> <!-- Convert the given paths to Windows --> <pathconvert targetos="windows" property="jboss.home.on.windows" > *************** *** 554,578 **** <!-- =================================================================== --> ! <target name="main" depends="deploy-server,create-client"> ! </target> ! ! <!-- =================================================================== --> ! <!-- Cleans up the current build --> <!-- =================================================================== --> ! ! <target name="clean" depends="init"> ! <property name="jboss.tmp.dir" ! value="server/default/tmp/deploy/server/default" /> <delete dir="${build.dir}"/> ! <delete dir="${dist.dir}"/> <delete> <fileset dir="." includes="**/*~" defaultexcludes="no" /> </delete> ! <delete ! dir="${jboss.home}/${jboss.tmp.dir}/lib/prolix-dummy-interpreter.jar"/> ! <delete ! dir="${jboss.home}/${jboss.tmp.dir}/deploy/prolix-beans.jar"/> ! ! </target> --- 551,570 ---- <!-- =================================================================== --> ! <!-- FIXME: to a complete deploy, depends deploy-server too--> ! <target name="main" depends="deploy-client,create-console-client"> ! </target> ! <!-- =================================================================== --> ! <!-- Cleans up the current build --> ! <!-- =================================================================== --> ! ! <target name="clean" depends="init"> <delete dir="${build.dir}"/> ! <delete dir="${dist.dir}"/> <delete> <fileset dir="." includes="**/*~" defaultexcludes="no" /> </delete> ! ! </target> |
From: <iva...@us...> - 2003-07-15 15:04:40
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions In directory sc8-pr-cvs1:/tmp/cvs-serv7898/src/org/asturlinux/frade/prolix/web/actions Modified Files: LoadConsultAction.java LoadProgramAction.java SolutionAction.java Log Message: Activated validation in actions - renamed and relocated web-client-resources file Index: LoadConsultAction.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions/LoadConsultAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LoadConsultAction.java 14 Jul 2003 21:49:40 -0000 1.4 --- LoadConsultAction.java 15 Jul 2003 15:04:38 -0000 1.5 *************** *** 17,21 **** * scope="request" * input="/consult.jsp" ! * validate="false" * parameter="" * --- 17,21 ---- * scope="request" * input="/consult.jsp" ! * validate="true" * parameter="" * *************** *** 77,81 **** catch (ProgramNotLoadedException pnle) { ! errors.add("consult",new ActionError("program.not.loaded")); } --- 77,81 ---- catch (ProgramNotLoadedException pnle) { ! errors.add("consult",new ActionError("error.program.not.loaded")); } Index: LoadProgramAction.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions/LoadProgramAction.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** LoadProgramAction.java 14 Jul 2003 21:49:40 -0000 1.7 --- LoadProgramAction.java 15 Jul 2003 15:04:38 -0000 1.8 *************** *** 17,21 **** * scope="request" * input="/program.jsp" ! * validate="false" * parameter="" * --- 17,21 ---- * scope="request" * input="/program.jsp" ! * validate="true" * parameter="" * *************** *** 50,54 **** interpreter.loadProgram(program); else ! errors.add("program",new ActionError("no.interpreter")); } catch (SyntaxException se) --- 50,54 ---- interpreter.loadProgram(program); else ! errors.add("program",new ActionError("error.no.interpreter")); } catch (SyntaxException se) Index: SolutionAction.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions/SolutionAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SolutionAction.java 14 Jul 2003 17:16:47 -0000 1.1 --- SolutionAction.java 15 Jul 2003 15:04:38 -0000 1.2 *************** *** 17,21 **** * scope="request" * input="/consult.jsp" ! * validate="false" * parameter="" * --- 17,21 ---- * scope="request" * input="/consult.jsp" ! * validate="true" * parameter="" * |
From: <iva...@us...> - 2003-07-15 15:04:40
|
Update of /cvsroot/pfc-prolog/prolix/etc In directory sc8-pr-cvs1:/tmp/cvs-serv7898/etc Modified Files: servlets.xml Added Files: WebClientResources.properties Removed Files: web-client-resources.properties Log Message: Activated validation in actions - renamed and relocated web-client-resources file --- NEW FILE: WebClientResources.properties --- (This appears to be a binary file; contents omitted.) Index: servlets.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/etc/servlets.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** servlets.xml 13 Jul 2003 16:30:37 -0000 1.1 --- servlets.xml 15 Jul 2003 15:04:38 -0000 1.2 *************** *** 7,11 **** <init-param> <param-name>application</param-name> ! <param-value>/WEB-INF/classes/web-client-resources</param-value> </init-param> <init-param> --- 7,11 ---- <init-param> <param-name>application</param-name> ! <param-value>org.asturlinux.frade.prolix.web.WebClientResources</param-value> </init-param> <init-param> --- web-client-resources.properties DELETED --- |
From: <iva...@us...> - 2003-07-15 15:04:40
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv7898 Modified Files: build.xml Log Message: Activated validation in actions - renamed and relocated web-client-resources file Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** build.xml 14 Jul 2003 21:49:38 -0000 1.33 --- build.xml 15 Jul 2003 15:04:37 -0000 1.34 *************** *** 413,418 **** </copy> ! <copy file="${etc.dir}/web-client-resources.properties" ! todir="${build.dir}/WEB-INF/classes"/> <jar jarfile="${dist.dir}/${war.file}"> --- 413,418 ---- </copy> ! <copy file="${etc.dir}/WebClientResources.properties" ! todir="${build.dir}/WEB-INF/classes/${package.path}/web"/> <jar jarfile="${dist.dir}/${war.file}"> *************** *** 429,433 **** <fileset dir="${build.dir}" ! includes="WEB-INF/classes/web-client-resources.properties" > </fileset> --- 429,433 ---- <fileset dir="${build.dir}" ! includes="WEB-INF/classes/${package.path}/WebClientResources.properties" > </fileset> |
From: <iva...@us...> - 2003-07-14 21:49:43
|
Update of /cvsroot/pfc-prolog/prolix/web In directory sc8-pr-cvs1:/tmp/cvs-serv10367/web Modified Files: consult.jsp program.jsp solutions.jsp Log Message: Added exceptions in Bean - Corrected console client - updated jsp Index: consult.jsp =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/web/consult.jsp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** consult.jsp 14 Jul 2003 17:16:47 -0000 1.7 --- consult.jsp 14 Jul 2003 21:49:40 -0000 1.8 *************** *** 10,15 **** <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <ejb:useBean id="interpreter" ! type="org.asturlinux.frade.prolix.ejb.interfaces.ProlixMain"/> <html> --- 10,24 ---- <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> + <!-- Obtain Home reference--> + <ejb:useHome id="prolixHome" + type="org.asturlinux.frade.prolix.ejb.interfaces.ProlixMainHome" + location="org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMain" /> + + <!-- Obtain Bean reference. If don't exist, create new one --> <ejb:useBean id="interpreter" ! type="org.asturlinux.frade.prolix.ejb.interfaces.ProlixMain" ! scope="session"> ! <ejb:createBean instance="<%= prolixHome.create() %>" /> ! </ejb:useBean> <html> Index: program.jsp =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/web/program.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** program.jsp 14 Jul 2003 17:16:47 -0000 1.5 --- program.jsp 14 Jul 2003 21:49:40 -0000 1.6 *************** *** 22,30 **** </ejb:useBean> - <% - if (session.getAttribute("interpreterAt") == null) - session.setAttribute("interpreterAt",interpreter); - %> - <html> --- 22,25 ---- Index: solutions.jsp =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/web/solutions.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** solutions.jsp 14 Jul 2003 17:16:47 -0000 1.5 --- solutions.jsp 14 Jul 2003 21:49:40 -0000 1.6 *************** *** 10,16 **** <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <ejb:useBean id="interpreter" ! type="org.asturlinux.frade.prolix.ejb.interfaces.ProlixMain"/> <html> <head> --- 10,29 ---- <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> + <!-- Obtain Home reference--> + <ejb:useHome id="prolixHome" + type="org.asturlinux.frade.prolix.ejb.interfaces.ProlixMainHome" + location="org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMain" /> + + <!-- Obtain Bean reference. If don't exist, create new one --> <ejb:useBean id="interpreter" ! type="org.asturlinux.frade.prolix.ejb.interfaces.ProlixMain" ! scope="session"> ! <ejb:createBean instance="<%= prolixHome.create() %>" /> ! </ejb:useBean> + <% + String programLoaded = interpreter.getProgram(); + String queryLoaded = interpreter.getCurrentConsult(); + %> <html> <head> *************** *** 20,27 **** <h1>Prolix </h1> <hr align="left" size="10"> ! ! <hr align="left" size="10"> ! consulta: ? <hr align="left" size="10"> --- 33,39 ---- <h1>Prolix </h1> <hr align="left" size="10"> ! <%= programLoaded %> <hr align="left" size="10"> ! consulta: ?<%= queryLoaded %> <hr align="left" size="10"> |
From: <iva...@us...> - 2003-07-14 21:49:43
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions In directory sc8-pr-cvs1:/tmp/cvs-serv10367/src/org/asturlinux/frade/prolix/web/actions Modified Files: LoadConsultAction.java LoadProgramAction.java Log Message: Added exceptions in Bean - Corrected console client - updated jsp Index: LoadConsultAction.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions/LoadConsultAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LoadConsultAction.java 14 Jul 2003 17:16:47 -0000 1.3 --- LoadConsultAction.java 14 Jul 2003 21:49:40 -0000 1.4 *************** *** 83,87 **** { saveErrors(request,errors); ! return (mapping.findForward("failure")); } --- 83,87 ---- { saveErrors(request,errors); ! return (mapping.findForward("success")); } Index: LoadProgramAction.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions/LoadProgramAction.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LoadProgramAction.java 14 Jul 2003 17:16:47 -0000 1.6 --- LoadProgramAction.java 14 Jul 2003 21:49:40 -0000 1.7 *************** *** 46,51 **** { HttpSession session = request.getSession(); ! ProlixMain interpreter = (ProlixMain)session.getAttribute("interpreterAt"); ! interpreter.loadProgram(program); } catch (SyntaxException se) --- 46,54 ---- { HttpSession session = request.getSession(); ! ProlixMain interpreter = (ProlixMain)session.getAttribute("interpreter"); ! if (interpreter != null) ! interpreter.loadProgram(program); ! else ! errors.add("program",new ActionError("no.interpreter")); } catch (SyntaxException se) *************** *** 57,65 **** errors.add("program",new ActionError("error.lexical.exception")); } ! catch (NullPointerException np) ! { ! errors.add("program", new ActionError("no.interpreter")); ! System.out.println("Problems with interpreter"); ! } if (!errors.isEmpty()) --- 60,64 ---- errors.add("program",new ActionError("error.lexical.exception")); } ! if (!errors.isEmpty()) *************** *** 70,74 **** return (mapping.findForward("success")); } - } --- 69,72 ---- |
From: <iva...@us...> - 2003-07-14 21:49:42
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb In directory sc8-pr-cvs1:/tmp/cvs-serv10367/src/org/asturlinux/frade/prolix/ejb/sessionjb Modified Files: ProlixMainBean.java Log Message: Added exceptions in Bean - Corrected console client - updated jsp Index: ProlixMainBean.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/ejb/sessionjb/ProlixMainBean.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ProlixMainBean.java 9 Jul 2003 12:59:54 -0000 1.16 --- ProlixMainBean.java 14 Jul 2003 21:49:39 -0000 1.17 *************** *** 101,122 **** * @ejb:interface-method **/ ! public String getProgram() { ! /** ! * Some format operations to obtain a pretty output ! * FIXME Delete last "." ! * FIXME What happend if "loadProgram" is not previously called? ! */ ! StringBuffer result = new StringBuffer(_program); ! // Dirty trick ! result.append("."); ! int position = result.toString().indexOf("."); ! while (position != -1) ! { ! System.out.println("in the loop"); ! result.insert(position+1,"\n"); ! position = result.toString().indexOf(".",position+2); ! } ! return result.toString(); } --- 101,110 ---- * @ejb:interface-method **/ ! public String getProgram() throws ProgramNotLoadedException { ! if (_program == null) ! throw new ProgramNotLoadedException(); ! ! return _program; } *************** *** 138,143 **** * @ejb:interface-method **/ ! public String getCurrentConsult() { return _consult; } --- 126,134 ---- * @ejb:interface-method **/ ! public String getCurrentConsult() ! throws QueryNotLoadedException { + if (_consult == null) + throw new QueryNotLoadedException(); return _consult; } |
From: <iva...@us...> - 2003-07-14 21:49:42
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient In directory sc8-pr-cvs1:/tmp/cvs-serv10367/src/org/asturlinux/frade/prolix/consoleclient Modified Files: ConsoleClient.java Log Message: Added exceptions in Bean - Corrected console client - updated jsp Index: ConsoleClient.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/consoleclient/ConsoleClient.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ConsoleClient.java 4 Jul 2003 13:06:37 -0000 1.7 --- ConsoleClient.java 14 Jul 2003 21:49:39 -0000 1.8 *************** *** 157,160 **** --- 157,164 ---- System.out.println("Remote exception in getLoadedProgram"); } + catch (ProgramNotLoadedException pnle) + { + System.out.println("Cannot get a program not previouly loaded!"); + } } *************** *** 195,198 **** --- 199,206 ---- { System.out.println("Remote exception!!! 165"); + } + catch (QueryNotLoadedException qnle) + { + System.out.println("Cannot get a consult not previously loaded"); } } |
From: <iva...@us...> - 2003-07-14 21:49:42
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv10367 Modified Files: build.xml Log Message: Added exceptions in Bean - Corrected console client - updated jsp Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** build.xml 13 Jul 2003 20:46:25 -0000 1.32 --- build.xml 14 Jul 2003 21:49:38 -0000 1.33 *************** *** 501,506 **** <target name="deploy-server" depends="jar"> <!-- FIXME VI commented while test struts --> ! <copy file="${dist.dir}/prolix-beans.jar" todir="${jboss.deploy}"/> <copy file="${dist.dir}/${war.file}" todir="${jboss.deploy}" /> </target> --- 501,507 ---- <target name="deploy-server" depends="jar"> <!-- FIXME VI commented while test struts --> ! <!-- <copy file="${dist.dir}/prolix-beans.jar" todir="${jboss.deploy}"/> + --> <copy file="${dist.dir}/${war.file}" todir="${jboss.deploy}" /> </target> |
From: <iva...@us...> - 2003-07-14 17:16:50
|
Update of /cvsroot/pfc-prolog/prolix/web In directory sc8-pr-cvs1:/tmp/cvs-serv18040/web Modified Files: consult.jsp program.jsp solutions.jsp Log Message: Added new actions and forms. Updated web navigation Index: consult.jsp =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/web/consult.jsp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** consult.jsp 13 Jul 2003 21:38:51 -0000 1.6 --- consult.jsp 14 Jul 2003 17:16:47 -0000 1.7 *************** *** 18,21 **** --- 18,22 ---- </head> + <% String loadedProgram = interpreter.getProgram(); %> <body bgcolor="#768FDD"> *************** *** 26,30 **** <td> <hr align="left" size="1"> ! Programa cargado <br><br><br><br> <hr align="left" size="1"> --- 27,31 ---- <td> <hr align="left" size="1"> ! <%= loadedProgram %> <br><br><br><br> <hr align="left" size="1"> *************** *** 33,38 **** <font size="+3">?</font> <html:text property="consult" size="0" maxlength="100" /> <br><br> ! <html:submit value="Load consult" property="load"/> ! <html:submit value="Load other program" property="otherProgram"/> </html:form> </td> --- 34,39 ---- <font size="+3">?</font> <html:text property="consult" size="0" maxlength="100" /> <br><br> ! <html:submit value="load" property="load"/> ! <html:submit value="programAgain" property="programAgain"/> </html:form> </td> Index: program.jsp =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/web/program.jsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** program.jsp 13 Jul 2003 19:05:08 -0000 1.4 --- program.jsp 14 Jul 2003 17:16:47 -0000 1.5 *************** *** 23,28 **** <% ! if (session.getAttribute("interpreter") == null) ! session.setAttribute("interpreter",interpreter); %> --- 23,28 ---- <% ! if (session.getAttribute("interpreterAt") == null) ! session.setAttribute("interpreterAt",interpreter); %> Index: solutions.jsp =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/web/solutions.jsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** solutions.jsp 9 Jul 2003 18:30:32 -0000 1.4 --- solutions.jsp 14 Jul 2003 17:16:47 -0000 1.5 *************** *** 8,21 **** <%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %> <%@ taglib uri="ejbtags" prefix="ejb" %> <ejb:useBean id="interpreter" type="org.asturlinux.frade.prolix.ejb.interfaces.ProlixMain"/> - <% - String consultToLoad = (String)request.getParameter("consulta"); - session.setAttribute("consultToLoad",consultToLoad); - interpreter.loadConsult(consultToLoad); - %> - <html> <head> --- 8,16 ---- <%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %> <%@ taglib uri="ejbtags" prefix="ejb" %> + <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <ejb:useBean id="interpreter" type="org.asturlinux.frade.prolix.ejb.interfaces.ProlixMain"/> <html> <head> *************** *** 26,34 **** <hr align="left" size="10"> - <%= interpreter.getProgram() %> <hr align="left" size="10"> ! consulta: ?<%= interpreter.getCurrentConsult() %> <hr align="left" size="10"> <% String resultInXml = interpreter.step(); %> --- 21,30 ---- <hr align="left" size="10"> <hr align="left" size="10"> ! consulta: ? <hr align="left" size="10"> + + <% String resultInXml = interpreter.step(); %> *************** *** 43,49 **** <br> <hr align="left" size="10"> ! <form action="solutions.jsp"> ! <input name="moreResult" value="Siguiente solucion" type="submit"> ! </form> </body> </html> --- 39,47 ---- <br> <hr align="left" size="10"> ! <!-- ! <html:form action="/actions/solution"> ! <html:submit property="moreResult" value="Siguiente solucion"/> ! </html:form> ! --> </body> </html> |
From: <iva...@us...> - 2003-07-14 17:16:50
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/formbeans In directory sc8-pr-cvs1:/tmp/cvs-serv18040/src/org/asturlinux/frade/prolix/web/formbeans Added Files: SolutionsFormBean.java Log Message: Added new actions and forms. Updated web navigation --- NEW FILE: SolutionsFormBean.java --- package org.asturlinux.frade.prolix.web.formbeans; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.*; /** * @struts:form name="SolutionsForm" */ public class SolutionsFormBean extends ActionForm { public void reset(ActionMapping mapping, HttpServletRequest request) { } public ActionErrors validate (ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); return errors; } } |
From: <iva...@us...> - 2003-07-14 17:16:50
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions In directory sc8-pr-cvs1:/tmp/cvs-serv18040/src/org/asturlinux/frade/prolix/web/actions Modified Files: LoadConsultAction.java LoadProgramAction.java Added Files: SolutionAction.java Log Message: Added new actions and forms. Updated web navigation --- NEW FILE: SolutionAction.java --- package org.asturlinux.frade.prolix.web.actions; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import java.security.*; import org.apache.struts.action.*; import org.apache.struts.util.*; import org.asturlinux.frade.prolix.web.formbeans.*; import org.asturlinux.frade.prolix.ejb.interfaces.*; import org.asturlinux.frade.prolix.interpreter.exceptions.*; /** * @struts.action name="SolutionForm" * path="/actions/solution" * scope="request" * input="/consult.jsp" * validate="false" * parameter="" * * @struts.action-forward name="success" * path="/solutions.jsp" * */ public class SolutionAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ActionErrors errors = new ActionErrors(); return (mapping.findForward("success")); } } Index: LoadConsultAction.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions/LoadConsultAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LoadConsultAction.java 13 Jul 2003 21:38:50 -0000 1.2 --- LoadConsultAction.java 14 Jul 2003 17:16:47 -0000 1.3 *************** *** 9,16 **** import org.apache.struts.util.*; import org.asturlinux.frade.prolix.web.formbeans.*; ! /** ! * Action to load program ! * ! */ /** --- 9,14 ---- import org.apache.struts.util.*; import org.asturlinux.frade.prolix.web.formbeans.*; ! import org.asturlinux.frade.prolix.ejb.interfaces.*; ! import org.asturlinux.frade.prolix.interpreter.exceptions.*; /** *************** *** 46,70 **** // Take form bean atrributes ! //String consult = ((LoadProgramFormBean)form).getConsult(); ! String action = (String)request.getParameter("load"); ! if (action == null) { ! action = (String)request.getParameter("otherProgram"); ! if (action == null) ! { ! //FIXME Something is going BAD ! return (mapping.findForward("failure")); ! } ! else ! { ! return (mapping.findForward("otherProgram")); ! } } ! else { ! //FIXME here the code to load consult ! return (mapping.findForward("otherProgram")); } } } --- 44,90 ---- // Take form bean atrributes ! String consult = ((LoadConsultFormBean)form).getConsult(); ! ! //String action = (String)request.getParameter("load"); ! //if (action == null) ! // { ! // action = (String)request.getParameter("programAgain"); ! // if (action == null) ! // { ! // //FIXME Something is going BAD ! // return (mapping.findForward("failure")); ! // } ! // else // Wants to load another program ! // { ! // return (mapping.findForward("otherProgram")); ! // } ! // } ! // ! try { ! HttpSession session = request.getSession(); ! ProlixMain interpreter = (ProlixMain)session.getAttribute("interpreter"); ! interpreter.loadConsult(consult); } ! catch (SyntaxException se) { ! errors.add("consult",new ActionError("error.syntax.exception")); ! } ! catch (LexicalException le) ! { ! errors.add("consult",new ActionError("error.lexical.exception")); ! } ! catch (ProgramNotLoadedException pnle) ! { ! errors.add("consult",new ActionError("program.not.loaded")); } + if (!errors.isEmpty()) + { + saveErrors(request,errors); + return (mapping.findForward("failure")); + } + + return (mapping.findForward("success")); } } Index: LoadProgramAction.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions/LoadProgramAction.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LoadProgramAction.java 13 Jul 2003 19:05:07 -0000 1.5 --- LoadProgramAction.java 14 Jul 2003 17:16:47 -0000 1.6 *************** *** 46,50 **** { HttpSession session = request.getSession(); ! ProlixMain interpreter = (ProlixMain)session.getAttribute("interpreter"); interpreter.loadProgram(program); } --- 46,50 ---- { HttpSession session = request.getSession(); ! ProlixMain interpreter = (ProlixMain)session.getAttribute("interpreterAt"); interpreter.loadProgram(program); } *************** *** 56,59 **** --- 56,64 ---- { errors.add("program",new ActionError("error.lexical.exception")); + } + catch (NullPointerException np) + { + errors.add("program", new ActionError("no.interpreter")); + System.out.println("Problems with interpreter"); } |
From: <iva...@us...> - 2003-07-13 21:38:53
|
Update of /cvsroot/pfc-prolog/prolix/web In directory sc8-pr-cvs1:/tmp/cvs-serv29438/web Modified Files: consult.jsp Log Message: Minor changes in consult-page action and web Index: consult.jsp =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/web/consult.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** consult.jsp 13 Jul 2003 19:05:08 -0000 1.5 --- consult.jsp 13 Jul 2003 21:38:51 -0000 1.6 *************** *** 26,30 **** <td> <hr align="left" size="1"> ! writedProgram <br><br><br><br> <hr align="left" size="1"> --- 26,30 ---- <td> <hr align="left" size="1"> ! Programa cargado <br><br><br><br> <hr align="left" size="1"> *************** *** 33,38 **** <font size="+3">?</font> <html:text property="consult" size="0" maxlength="100" /> <br><br> ! <html:submit value="loadc"/> ! <html:submit value="otherProgram"/> </html:form> </td> --- 33,38 ---- <font size="+3">?</font> <html:text property="consult" size="0" maxlength="100" /> <br><br> ! <html:submit value="Load consult" property="load"/> ! <html:submit value="Load other program" property="otherProgram"/> </html:form> </td> |
From: <iva...@us...> - 2003-07-13 21:38:53
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions In directory sc8-pr-cvs1:/tmp/cvs-serv29438/src/org/asturlinux/frade/prolix/web/actions Modified Files: LoadConsultAction.java Log Message: Minor changes in consult-page action and web Index: LoadConsultAction.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions/LoadConsultAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LoadConsultAction.java 13 Jul 2003 19:05:07 -0000 1.1 --- LoadConsultAction.java 13 Jul 2003 21:38:50 -0000 1.2 *************** *** 27,30 **** --- 27,33 ---- * @struts.action-forward name="failure" * path="/consult.jsp" + * + * @struts.action-forward name="otherProgram" + * path="/program.jsp" */ public class LoadConsultAction extends Action *************** *** 44,50 **** // Take form bean atrributes //String consult = ((LoadProgramFormBean)form).getConsult(); - return (mapping.findForward("success")); } - } --- 47,70 ---- // Take form bean atrributes //String consult = ((LoadProgramFormBean)form).getConsult(); + String action = (String)request.getParameter("load"); + if (action == null) + { + action = (String)request.getParameter("otherProgram"); + if (action == null) + { + //FIXME Something is going BAD + return (mapping.findForward("failure")); + } + else + { + return (mapping.findForward("otherProgram")); + } + } + else + { + //FIXME here the code to load consult + return (mapping.findForward("otherProgram")); + } } } |
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/dummy In directory sc8-pr-cvs1:/tmp/cvs-serv22491/src/org/asturlinux/frade/dummy Added Files: PrologContextDummy.java PrologInterpreterDummy.java SubstitutionDummy.java TreeElementDummy.java Log Message: Added dummy interpreter to cvs --- NEW FILE: PrologContextDummy.java --- /** * * Copyright 2003 Ivan Frade * * This file is part of Prolix. * * Prolix is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Prolix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Prolix; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * **/ package org.asturlinux.frade.dummy; import org.asturlinux.frade.prolix.interpreter.exceptions.*; import org.asturlinux.frade.prolix.interpreter.interfaces.*; public class PrologContextDummy implements PrologContext { private int stepCounter = 1; private boolean loaded; private boolean asked; public void load (String programSource) throws SyntaxException, LexicalException, ProgramAlreadyLoadedException { System.out.println("loaded True"); loaded = true; } public void consult (String query) throws SyntaxException, LexicalException, ProgramNotLoadedException { System.out.println("asked True"); asked = true; } public TreeElement step() throws ProgramNotLoadedException, QueryNotLoadedException { if (!loaded) throw new ProgramNotLoadedException(); if (!asked) throw new QueryNotLoadedException(); TreeElementDummy result = new TreeElementDummy("hermano(A,B)"); /** * For each node: * * Construct node * Create, initialize and set substitutions array * Set Parent * */ TreeElementDummy node1 = new TreeElementDummy("padre(Z,A),padre(Z,B)"); Substitution[] node1s = new Substitution[2]; node1s[0] = new SubstitutionDummy("A","X"); node1s[1] = new SubstitutionDummy("B","Y"); node1.setSubstitutions(node1s); node1.setParent(result); TreeElementDummy node2 = new TreeElementDummy("padre(JC,B)"); Substitution[] node2s = new Substitution[2]; node2s[0] = new SubstitutionDummy("Z","JC"); node2s[1] = new SubstitutionDummy("A","Felipe"); node2.setSubstitutions(node2s); node2.setParent(node1); TreeElementDummy node3 = new TreeElementDummy(""); Substitution[] node3s = new Substitution[2]; node3s[0] = new SubstitutionDummy("A","Helena"); node3s[1] = new SubstitutionDummy("B","Felipe"); node3.setSubstitutions(node3s); node3.setParent(node2); node3.setSolution(true); TreeElementDummy[] node2Sons = {node3}; node2.setNextLevelElements(node2Sons); TreeElementDummy[] node1Sons = {node2}; node1.setNextLevelElements(node1Sons); TreeElementDummy[] resultSons = {node1}; result.setNextLevelElements(resultSons); /** * Now have the first solution. * Depends the step, added more or less nodes to this structure */ if (stepCounter == 1) { stepCounter++; return result; } TreeElementDummy node4 = new TreeElementDummy(""); Substitution[] node4s = new Substitution[2]; node4s[0] = new SubstitutionDummy("A","Felipe"); node4s[1] = new SubstitutionDummy("B","Felipe"); node4.setSubstitutions(node4s); node4.setParent(node2); node4.setSolution(true); TreeElementDummy[] node2SonsNow = {node3,node4}; node2.setNextLevelElements(node2SonsNow); if (stepCounter == 2) { stepCounter++; return result; } TreeElementDummy node5 = new TreeElementDummy("padre(JC,B)"); Substitution[] node5s = new Substitution[2]; node5s[0] = new SubstitutionDummy("Z","JC"); node5s[1] = new SubstitutionDummy("A","Helena"); node5.setSubstitutions(node5s); node5.setParent(node1); TreeElementDummy node6 = new TreeElementDummy(""); Substitution[] node6s = new Substitution[2]; node6s[0] = new SubstitutionDummy("A","Helena"); node6s[1] = new SubstitutionDummy("B","Felipe"); node6.setSubstitutions(node6s); node6.setParent(node5); node6.setSolution(true); TreeElementDummy[] node5Sons = {node6}; node5.setNextLevelElements(node5Sons); TreeElementDummy[] node1SonsNow = {node2,node5}; node1.setNextLevelElements(node1SonsNow); if (stepCounter == 3) { stepCounter++; return result; } TreeElementDummy node7 = new TreeElementDummy(""); Substitution[] node7s = new Substitution[2]; node7s[0] = new SubstitutionDummy("A","Helena"); node7s[1] = new SubstitutionDummy("B","Helena"); node7.setSubstitutions(node7s); node7.setParent(node5); node7.setSolution(true); TreeElementDummy[] node5SonsNow = {node6,node7}; node5.setNextLevelElements(node5SonsNow); if (stepCounter == 4) { stepCounter++; return result; } result.setCompletlyExplored(true); return result; } } --- NEW FILE: PrologInterpreterDummy.java --- /** * * Copyright 2003 Ivan Frade * * This file is part of Prolix. * * Prolix is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Prolix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Prolix; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * **/ package org.asturlinux.frade.dummy; import org.asturlinux.frade.prolix.interpreter.interfaces.*; import org.asturlinux.frade.prolix.interpreter.exceptions.*; public class PrologInterpreterDummy implements PrologInterpreter { public PrologContext createContext () throws CreateException { return new PrologContextDummy(); } } --- NEW FILE: SubstitutionDummy.java --- /** * * Copyright 2003 Ivan Frade * * This file is part of Prolix. * * Prolix is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Prolix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Prolix; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * **/ package org.asturlinux.frade.dummy; import org.asturlinux.frade.prolix.interpreter.interfaces.*; import org.asturlinux.frade.prolix.interpreter.exceptions.*; public class SubstitutionDummy implements Substitution { private String _original; private String _new; public String getOriginalValue() {return _original;} public String getNewValue() {return _new;} public SubstitutionDummy(String original, String newValue) { _original = original; _new = newValue; } } --- NEW FILE: TreeElementDummy.java --- /** * * Copyright 2003 Ivan Frade * * This file is part of Prolix. * * Prolix is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Prolix is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Prolix; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * **/ package org.asturlinux.frade.dummy; import org.asturlinux.frade.prolix.interpreter.interfaces.*; import org.asturlinux.frade.prolix.interpreter.exceptions.*; public class TreeElementDummy extends TreeElementImpl implements TreeElement { private String _query; private boolean iAmFinal = false; private boolean iAmCompletlyExplored = false; private boolean iAmSolution = false; private TreeElementDummy _parent; private TreeElementDummy[] _sons; private Substitution[] _substitutions = null; public TreeElementDummy(String query) { _query = query; } public boolean isCompletlyExplored() {return iAmCompletlyExplored;} public boolean isFinal() {return iAmFinal;} public boolean isSolution() {return iAmSolution;} public TreeElement[] getNextLevelElements() { return _sons; } public void setNextLevelElements(TreeElementDummy[] sons) { _sons = sons; } public TreeElement getParent() {return _parent; } public void setParent(TreeElementDummy parent) { _parent = parent;} public String getQuery() { return _query; } public void setQuery(String query) { _query = query; } public Substitution[] getSubstitutions() { return _substitutions; } public void setSubstitutions(Substitution[] yourSubst) { _substitutions = yourSubst; } public void setFinal(boolean b) { iAmFinal = b; } public void setCompletlyExplored (boolean b) { iAmCompletlyExplored = b; } public void setSolution(boolean b) { iAmSolution = b; } } |
From: <iva...@us...> - 2003-07-13 20:46:28
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv22491 Modified Files: build.xml Log Message: Added dummy interpreter to cvs Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** build.xml 13 Jul 2003 16:30:37 -0000 1.31 --- build.xml 13 Jul 2003 20:46:25 -0000 1.32 *************** *** 161,164 **** --- 161,168 ---- </path> + <path id="dummy.path"> + <pathelement location="${lib.dir}/prolix-interpreter-interface.jar"/> + </path> + <!-- =================================================================== --> <!-- Generates the necessary EJB classes and deployment descriptors --> *************** *** 496,503 **** to JBOSS_HOME/server/default/lib ? --> <target name="deploy-server" depends="jar"> ! <!-- FIXME VI commented while test struts ! <copy file="${dist.dir}/prolix-beans.jar" todir="${jboss.deploy}"/> ! --> ! <copy file="${dist.dir}/${war.file}" todir="${jboss.deploy}" /> </target> --- 500,507 ---- to JBOSS_HOME/server/default/lib ? --> <target name="deploy-server" depends="jar"> ! <!-- FIXME VI commented while test struts --> ! ! <copy file="${dist.dir}/prolix-beans.jar" todir="${jboss.deploy}"/> ! <copy file="${dist.dir}/${war.file}" todir="${jboss.deploy}" /> </target> *************** *** 570,573 **** --- 574,605 ---- </target> + + + <!-- =================================================================== --> + <!-- Builds dummy and copy to lib dir and to JBOSS --> + <!-- =================================================================== --> + + <target name="dummy"> + <mkdir dir="${build.classes.dir}"/> + <mkdir dir="${dist.dir}"/> + <javac + srcdir="${src.dir}" + destdir="${build.classes.dir}" + includes="org/asturlinux/frade/dummy/*.java" + classpathref="dummy.path" + > + </javac> + + <jar jarfile="${dist.dir}/${interpreter}" + basedir="${build.classes.dir}" + includes="**/dummy/*.class" + /> + <copy file="${dist.dir}/${interpreter}" + todir="${lib.dir}" /> + <!-- + <copy file="${dist.dir}/${interpreter}" + todir="${jboss.home}/server/default/lib"/> + --> + </target> </project> |
From: <iva...@us...> - 2003-07-13 20:45:10
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/dummy In directory sc8-pr-cvs1:/tmp/cvs-serv22343/dummy Log Message: Directory /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/dummy added to the repository |
From: <iva...@us...> - 2003-07-13 19:05:13
|
Update of /cvsroot/pfc-prolog/prolix/web In directory sc8-pr-cvs1:/tmp/cvs-serv9267/web Modified Files: consult.jsp program.jsp Log Message: Consult page with struts Index: consult.jsp =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/web/consult.jsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** consult.jsp 13 Jul 2003 16:12:40 -0000 1.4 --- consult.jsp 13 Jul 2003 19:05:08 -0000 1.5 *************** *** 26,30 **** <td> <hr align="left" size="1"> ! <%= writedProgram %><br><br><br><br> <hr align="left" size="1"> --- 26,30 ---- <td> <hr align="left" size="1"> ! writedProgram <br><br><br><br> <hr align="left" size="1"> *************** *** 32,40 **** consulta: <br> <font size="+3">?</font> ! <html:text name="consulta" size="0" maxlength="100" ! value="Aqui la consulta "/> <br><br> ! <html:submit value="consult"> ! <html:submit value="otherProgram"> ! </form> </td> --- 32,39 ---- consulta: <br> <font size="+3">?</font> ! <html:text property="consult" size="0" maxlength="100" /> <br><br> ! <html:submit value="loadc"/> ! <html:submit value="otherProgram"/> ! </html:form> </td> Index: program.jsp =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/web/program.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** program.jsp 13 Jul 2003 16:12:40 -0000 1.3 --- program.jsp 13 Jul 2003 19:05:08 -0000 1.4 *************** *** 22,25 **** --- 22,30 ---- </ejb:useBean> + <% + if (session.getAttribute("interpreter") == null) + session.setAttribute("interpreter",interpreter); + %> + <html> |
From: <iva...@us...> - 2003-07-13 19:05:11
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/formbeans In directory sc8-pr-cvs1:/tmp/cvs-serv9267/src/org/asturlinux/frade/prolix/web/formbeans Added Files: LoadConsultFormBean.java Log Message: Consult page with struts --- NEW FILE: LoadConsultFormBean.java --- package org.asturlinux.frade.prolix.web.formbeans; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.*; /** * @struts.form name="loadConsultForm" */ public class LoadConsultFormBean extends ActionForm { private String _consult = null; /** * Get the _consult value. * @return the _consult value. */ public String getConsult() { return _consult; } /** * Set the _consult value. * @param newConsult The new _consult value. */ public void setConsult(String newConsult) { this._consult = newConsult; } /** * Redefined methods */ public void reset(ActionMapping mapping, HttpServletRequest request) { _consult = null; } public ActionErrors validate (ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((_consult == null) || (_consult.length() < 1)) errors.add("consult", new ActionError("error.void.consult")); return errors; } } |
From: <iva...@us...> - 2003-07-13 19:05:11
|
Update of /cvsroot/pfc-prolog/prolix/etc In directory sc8-pr-cvs1:/tmp/cvs-serv9267/etc Modified Files: web-client-resources.properties Log Message: Consult page with struts Index: web-client-resources.properties =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/etc/web-client-resources.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** web-client-resources.properties 13 Jul 2003 16:30:37 -0000 1.1 --- web-client-resources.properties 13 Jul 2003 19:05:07 -0000 1.2 *************** *** 6,9 **** --- 6,11 ---- error.void.program=<li>Debe teclear un programa</li> error.void.consult=<li>Debe teclear una consulta</li> + error.syntax.exception=<li>Error sintactico</li> + error.lexical.exception=<li>Error léxico</li> errors.footer=</ul><hr> errors.header=<h3><font color="red">Error de validación</font></h3>Corrija estos errores para continuar:<ul> |
From: <iva...@us...> - 2003-07-13 19:05:11
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions In directory sc8-pr-cvs1:/tmp/cvs-serv9267/src/org/asturlinux/frade/prolix/web/actions Modified Files: LoadProgramAction.java Added Files: LoadConsultAction.java Log Message: Consult page with struts --- NEW FILE: LoadConsultAction.java --- package org.asturlinux.frade.prolix.web.actions; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import java.security.*; import org.apache.struts.action.*; import org.apache.struts.util.*; import org.asturlinux.frade.prolix.web.formbeans.*; /** * Action to load program * */ /** * @struts.action name="loadConsultForm" * path="/actions/loadConsult" * scope="request" * input="/consult.jsp" * validate="false" * parameter="" * * @struts.action-forward name="success" * path="/solutions.jsp" * * @struts.action-forward name="failure" * path="/consult.jsp" */ public class LoadConsultAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Auxiliar var //Locale locale = getLocale(request); //MessageResources messages = getResources(); ActionErrors errors = new ActionErrors(); // Take form bean atrributes //String consult = ((LoadProgramFormBean)form).getConsult(); return (mapping.findForward("success")); } } Index: LoadProgramAction.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/actions/LoadProgramAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LoadProgramAction.java 13 Jul 2003 16:12:40 -0000 1.4 --- LoadProgramAction.java 13 Jul 2003 19:05:07 -0000 1.5 *************** *** 9,14 **** import org.apache.struts.util.*; import org.asturlinux.frade.prolix.web.formbeans.*; ! //import org.asturlinux.frade.prolix.ejb.interfaces.*; ! //import org.asturlinux.frade.prolix.interpreter.exceptions.*; /** --- 9,14 ---- import org.apache.struts.util.*; import org.asturlinux.frade.prolix.web.formbeans.*; ! import org.asturlinux.frade.prolix.ejb.interfaces.*; ! import org.asturlinux.frade.prolix.interpreter.exceptions.*; /** *************** *** 22,26 **** --- 22,30 ---- * @struts.action-forward name="success" * path="/consult.jsp" + * + * @struts.action-forward name="failure" + * path="/program.jsp" */ + public class LoadProgramAction extends Action { *************** *** 34,43 **** // Auxiliar var //Locale locale = getLocale(request); ! //MessageResources messages = getResources(); ActionErrors errors = new ActionErrors(); // Take form bean atrributes String program = ((LoadProgramFormBean)form).getProgram(); ! return (mapping.findForward("success")); } --- 38,66 ---- // Auxiliar var //Locale locale = getLocale(request); ! //MessageResources messages = MessageResources.getMessageResources(); ActionErrors errors = new ActionErrors(); // Take form bean atrributes String program = ((LoadProgramFormBean)form).getProgram(); ! try ! { ! HttpSession session = request.getSession(); ! ProlixMain interpreter = (ProlixMain)session.getAttribute("interpreter"); ! interpreter.loadProgram(program); ! } ! catch (SyntaxException se) ! { ! errors.add("program",new ActionError("error.syntax.exception")); ! } ! catch (LexicalException le) ! { ! errors.add("program",new ActionError("error.lexical.exception")); ! } ! ! if (!errors.isEmpty()) ! { ! saveErrors(request,errors); ! return (mapping.findForward("failure")); ! } return (mapping.findForward("success")); } |
From: <iva...@us...> - 2003-07-13 16:30:40
|
Update of /cvsroot/pfc-prolog/prolix/etc In directory sc8-pr-cvs1:/tmp/cvs-serv19074/etc Added Files: servlet-mappings.xml servlets.xml web-client-resources.properties Log Message: Added some needed files in etc. Modified build.xml to new resources file name --- NEW FILE: servlet-mappings.xml --- <!-- servlet mapping to merge with webdoclet in web.xml --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> --- NEW FILE: servlets.xml --- <!-- File to merge in webdoclet generation --> <!-- Action Servlet Configuration --> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>application</param-name> <param-value>/WEB-INF/classes/web-client-resources</param-value> </init-param> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>validate</param-name> <param-value>true</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> --- NEW FILE: web-client-resources.properties --- e, button.cancel=Cancelar button.confirm=Confirmar button.reset=Borrar button.save=Guardar database.load=No puedo cargar base de datos desde {0} error.void.program=<li>Debe teclear un programa</li> error.void.consult=<li>Debe teclear una consulta</li> errors.footer=</ul><hr> errors.header=<h3><font color="red">Error de validación</font></h3>Corrija estos errores para continuar:<ul> errors.ioException=Problema de E/S al mostrar los mensajes de error: {0} prompt.password=Password: prompt.password2=Repita Password: prompt.username=Usuario: |
From: <iva...@us...> - 2003-07-13 16:30:39
|
Update of /cvsroot/pfc-prolog/prolix In directory sc8-pr-cvs1:/tmp/cvs-serv19074 Modified Files: build.xml Log Message: Added some needed files in etc. Modified build.xml to new resources file name Index: build.xml =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/build.xml,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** build.xml 13 Jul 2003 16:12:40 -0000 1.30 --- build.xml 13 Jul 2003 16:30:37 -0000 1.31 *************** *** 409,413 **** </copy> ! <copy file="${etc.dir}/Resources.properties" todir="${build.dir}/WEB-INF/classes"/> --- 409,413 ---- </copy> ! <copy file="${etc.dir}/web-client-resources.properties" todir="${build.dir}/WEB-INF/classes"/> *************** *** 425,429 **** <fileset dir="${build.dir}" ! includes="WEB-INF/classes/Resources.properties" > </fileset> --- 425,429 ---- <fileset dir="${build.dir}" ! includes="WEB-INF/classes/web-client-resources.properties" > </fileset> |
From: <iva...@us...> - 2003-07-13 16:12:43
|
Update of /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/formbeans In directory sc8-pr-cvs1:/tmp/cvs-serv16171/src/org/asturlinux/frade/prolix/web/formbeans Modified Files: LoadProgramFormBean.java Log Message: Added automatic struts-config.xml generation Index: LoadProgramFormBean.java =================================================================== RCS file: /cvsroot/pfc-prolog/prolix/src/org/asturlinux/frade/prolix/web/formbeans/LoadProgramFormBean.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LoadProgramFormBean.java 11 Jul 2003 20:38:42 -0000 1.3 --- LoadProgramFormBean.java 13 Jul 2003 16:12:40 -0000 1.4 *************** *** 4,8 **** import org.apache.struts.action.*; ! public class LoadProgramFormBean extends ActionForm { --- 4,10 ---- import org.apache.struts.action.*; ! /** ! * @struts:form name="loadProgramForm" ! */ public class LoadProgramFormBean extends ActionForm { *************** *** 43,47 **** return errors; } - - } --- 45,47 ---- |