Hello, I have a form, with action="admin.xsp", a sitemap entry:
<map:match pattern="admin/admin.xsp"> <map:generate src="admin/admin.xsp" type="serverpages"/> <map:serialize/> </map:match> and an XSP page: <?xml version="1.0" encoding="UTF-8"?> <xsp:page language="java" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:xsp="http://apache.org/xsp" xmlns:sql="http://apache.org/cocoon/SQL/2.0"> <page> <xsp:logic> String title = <xsp-request:get-parameter name="title"/>; String date = <xsp-request:get-parameter name="date"/>; String content = <xsp-request:get-parameter name="content"/>; String category = <xsp-request:get-parameter name="category"/>; String posted_by = <xsp-request:get-parameter name="posted_by"/>; <execute-query xmlns="http://apache.org/cocoon/SQL/2.0"> <query>INSERT INTO blog_data (title, date, content, category, posted_by) VALUES <parameter>title</parameter>, <parameter>date</parameter>, <parameter>content</parameter>, <parameter>category</parameter>, <parameter>posted_by</parameter></query> </execute-query> </xsp:logic> </page> </xsp:page> The fields' names in the form are the same as in the DB. I'm having no error messages, everything seems fine, but the output I get is: INSERT INTO blog_data (title, date, content, category, posted_by) VALUES title, date, content, category, posted_by If we look at the page's code, it's: <page xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:sql="http://apache.org/cocoon/SQL/2.0"> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0"> <query>INSERT INTO blog_data (title, date, content, category, posted_by) VALUES <parameter>title</parameter>, <parameter>date</parameter>, <parameter>content</parameter>, <parameter>category</parameter>, <parameter>posted_by</parameter></query> </execute-query> </page> So, the code got through the Server Pages generator fine, but not through ESQL. Also, parameters, such as <parameter>content</parameter> weren't substituted with their real values from the request. What's wrong with my code? -- Lenya Khachaturov mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- 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]>