cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zamek <za...@vili.pmmf.hu>
Subject Cannot create a xml file :-(
Date Fri, 12 Mar 2004 11:14:58 GMT
Hello All,

I want to create a log file at login process based on JD Daniels' s xsp 
script (full xsp file and sitemap.xmap snippet are at end of my letter):

<source:insert>
  <source:source>log.xml</source:source>
	<source:path>/log</source:path>
	<source:fragment>
	  <logon>
	    <date><util:time format="yyyy/MM/dd"/></date>
	    <time><util:time format="hh:mm:ss a"/></time>
	   <user-agent><xsp-request:get-header name="user-agent"/></user-agent>
           <remote-addr><xsp-request:get-remote-address/></remote-addr>
	   <remote-host><xsp-request:get-remote-host/></remote-host>
	   <userFirstName><xsp-session:get-attribute 
name="userFirstName"/></userFirstName>
  	  <userLastName><xsp-session:get-attribute 
name="userLastName"/></userLastName>
       </logon>
    </source:fragment>
</source:insert>

if I tried to set /home/zamek/log.xml it doesn' t works too?

What do I do wrong?

full xsp is:
<?xml version="1.0"?>
<xsp:page language="java"
	xmlns:xsp="http://apache.org/xsp"
	xmlns:esql="http://apache.org/cocoon/SQL/v2"
	xmlns:xsp-request="http://apache.org/xsp/request/2.0"
	xmlns:xsp-session="http://apache.org/xsp/session/2.0"
	create-session="true"
	xmlns:source="http://apache.org/cocoon/source/1.0"
	xmlns:util="http://apache.org/xsp/util/2.0"
	xmlns:log="http://apache.org/xsp/log">
<authentication>
	</xsp:logic>
	<esql:connection>
		<esql:pool>portal</esql:pool>
			<esql:execute-query>
				<esql:query>
					SELECT usrid, firstName, lastName, email, role_id, role
							FROM authenticate ('<xsp-request:get-parameter name="name"/>',
																'<xsp-request:get-parameter name="password"/>')
					LIMIT 1
				</esql:query>
				<esql:results>
					<esql:row-results>
						<ID><esql:get-int column="usrid"/></ID>
						<role><esql:get-string column="role"/></role>
						<data>
							<ID><esql:get-int column="usrid"/></ID>
							<role><esql:get-string column="role"/></role>
							<firstname><esql:get-string column="firstName"/></firstname>
							<lastname><esql:get-string column="lastName"/></lastname>
							<email><esql:get-string column="email"/></email>
						</data>
						<source:insert>
							<!-- source:source>context://stats<util:time 
format="yyyy/MM/dd"/>.xml</source:source-->
							<source:source>log.xml</source:source>
							<source:path>/log</source:path>
							<source:fragment>
								<logon>
									<date><util:time format="yyyy/MM/dd"/></date>
									<time><util:time format="hh:mm:ss a"/></time>
									<user-agent><xsp-request:get-header 
name="user-agent"/></user-agent>
									<remote-addr><xsp-request:get-remote-address/></remote-addr>
									<remote-host><xsp-request:get-remote-host/></remote-host>
									<userFirstName><xsp-session:get-attribute 
name="userFirstName"/></userFirstName>
									<userLastName><xsp-session:get-attribute 
name="userLastName"/></userLastName>
								</logon>
							</source:fragment>
						</source:insert>
					</esql:row-results>
				</esql:results>
				<esql:no-results>
				</esql:no-results>
			</esql:execute-query>
		</esql:connection>
	</authentication>
</xsp:page>

here is my sitemap.xmap snippet:

      <map:match pattern="authenticate-portal">
        <map:generate src="java/auth1.xsp" type="serverpages"/>
        <map:transform src="stylesheets/sql2html.xsl">
          <map:parameter name="use-request-parameters" value="true"/>
        </map:transform>
        <map:serialize type="xml"/>
      </map:match>

-- 
thx,
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message