> From: Matthew Hailstone [mailto:[EMAIL PROTECTED]] > > Forgot. I'm using Cocoon 2.1-dev with Tomcat 4.1.3 > > and I replied using plain text. :)
:) Does session.xsp test work for you? Also, looks to me that XSP snippet does not match code. Is it wrong snippet? Java Code: > ) > == "-1" ){ > > session.setAttribute(String.valueOf("test-name"), XSP: ** Does not has '== "-1"' ** ** Has "test-name-title" instead of "test-name" ** > <xsp-session:set-attribute name="test-name-title">Test > Title</xsp-session:set-attribute> Vadim > Matthew > > -----Original Message----- > From: Matthew Hailstone > Sent: Tuesday, June 18, 2002 4:09 PM > To: [EMAIL PROTECTED] > Subject: Error compiling form_xsp.java file > > > I can't see what I'm doing wrong in the xsp file. The error logs aren't > helping me see it either. > > Any suggestions? I'm having a real hard time understanding the > documentation. It probably shows. > > Matthew > > From the form.xsp file: > > > ... > <form> > <xsp:logic> > String m_strFormAction = "home/form"; > if( <xsp-request:get-parameter name="test-name"/> == null ){ > <xsp-session:set-attribute name="test-name-title">Test > Title</xsp-session:set-attribute> > <field id="test-name" label="Test Name" type="select"> > <value value="-1"><xsp-session:get-attribute > name="test-name-title"/></value> > <esql:connection> > <esql:pool>dbpool</esql:pool> > <esql:execute-query> > <esql:query>select * from tests</esql:query> > <esql:results> > <esql:row-results> > <value> > <xsp:attribute name="value"><esql:get-string > column="test_id"/></xsp:attribute> > <esql:get-string column="test_name"/> > </value> > </esql:row-results> > </esql:results> > </esql:execute-query> > </esql:connection> > </field> > } > ... > <field id="choose-results" label="Choose Results" type="submit"/> > <action><xsp:expr>m_strFormAction</xsp:expr></action> > </xsp:logic> > </form> > ... > > > > From the access.log file: > > > > org.apache.cocoon.ProcessingException: Language Exception: > org.apache.cocoon.components.language.LanguageException: Error compiling > form_xsp: > ERROR 1 (D:\apps\Tomcat > 4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www/ > eval/logic/home\form_xsp.java): > ... > ) > == "-1" ){ > > session.setAttribute(String.valueOf("test-name"), > > // start error (lines 611-611) " unclosed character literal" > " > > // end error > > (XSPRequestHelper.getParameter(objectModel, > "test-name", null, > null, > > ... > ERROR 2 (D:\apps\Tomcat > 4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www/ > eval/logic/home\form_xsp.java): > ... > ) > == "-1" ){ > > session.setAttribute(String.valueOf("test-name"), > > // start error (lines 611-611) " illegal start of expression" > " > > // end error > > (XSPRequestHelper.getParameter(objectModel, > "test-name", null, > null, > > ... > ERROR 3 (D:\apps\Tomcat > 4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www/ > eval/logic/home\form_xsp.java): > ... > "test-name", null, > null, > null)) > > > // start error (lines 618-618) " unclosed character literal" > "); > > // end error > > > xspAttr.addAttribute( > "", > > ... > > > > From the form_xsp.java file: > > > > else { > if( > > ( > (XSPRequestHelper.getParameter(objectModel, > "test-name", null, > null, > null)) > ) > == "-1" ){ > > session.setAttribute(String.valueOf("test-name"), > " > > (XSPRequestHelper.getParameter(objectModel, > "test-name", null, > null, > null)) > > "); > > > xspAttr.addAttribute( > "", > "id", > "id", > "CDATA", > "test-name" > ); > > xspAttr.addAttribute( > "", > "label", > "label", > "CDATA", > "Test Name" > ); --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>