You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hong Gia Dinh <hg...@sdcgrp.com> on 2002/12/18 03:33:09 UTC

context problem

Hi all

i got the headache prolem like this 
i have the files and sitemap like this :

	<map:resources>
		<map:resource name="admin-page">
			<map:generate type="serverpages"
src="context://admin/system/{target}.xsp"/>
			<map:transform type="i18n">
				<map:parameter name="locale"
value="{../locale}"/>
			</map:transform>
			<map:transform
src="context://admin/style/{target}.xsl">
				<map:parameter name="use-request-parameters"
value="true"/>
				<map:parameter name="css-stylesheet"
value="admin/admin.css"/>
				<map:parameter name="base-url"
value="/saigoncoop"/>
				<map:parameter name="locale"
value="{../locale}"/>
				<map:parameter name="page"
value="{target}"/>
			</map:transform>
			<map:transform type="log">
				<map:parameter name="logile"
value="logfile.log"/>
				<map:parameter name="append" value="no"/>
			</map:transform>
			<map:serialize/>
		</map:resource>
	</map:resources>
	<!-- =========================== Pipelines
================================= -->
	<map:pipelines>
		<map:pipeline>
			<map:act type="locale">
				<map:match pattern="admin-*">
					<map:act type="form-validator">
						<map:parameter
name="descriptor"
value="context:///admin/system/admin-system-descriptor.xml"/>
						<map:parameter
name="validate-set" value="admin-system-validate"/>
						<map:call
resource="admin-page">
							<map:parameter
name="target" value="{1}"/>
						</map:call>
					</map:act>

					<map:call resource="admin-page">
						<map:parameter name="target"
value="{1}-error"/>
					</map:call>

				</map:match>
				
				<map:match pattern="adminstatic-*">
					<map:call resource="admin-page">
						<map:parameter name="target"
value="{1}"/>
					</map:call>
				</map:match>
			</map:act>
	</map:pipeline>
	<map:pipeline>			
			<map:match pattern="admin/*.css">
				<map:read mime-type="text/css"
src="admin/style/{1}.css"/>
			</map:match>
			<map:match pattern="portal/images/*.gif">
				<map:read mime-type="image/gif"
src="portal/images/{1}.gif"/>
			</map:match>
			<map:match pattern="portal/images/*.jpg">
				<map:read mime-type="image/jpg"
src="portal/images/{1}.jpg"/>
			</map:match>
			<map:match pattern="portal/images/*.swf">
				<map:read mime-type="image/swf"
src="portal/images/{1}.swf"/>
			</map:match>
			<map:match pattern="admin/images/*.gif">
				<map:read mime-type="image/gif"
src="admin/images/{1}.gif"/>
			</map:match>
			<map:match pattern="admin/images/*.jpg">
				<map:read mime-type="image/jpg"
src="admin/images/{1}.jpg"/>
			</map:match>
		</map:pipeline>


but when i just can run the {1}-error pages of all pages !!!! i cant run the
valid pages!!! but when i replace {1} by the hard coded pages , it can run
well the valid and error pages !!
i dont know how to solve it! when i run with {1} and the error pages form ,
i input the value but it cant find the correct page, it produces error like
this :


org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
java.lang.RuntimeException: admin/system/.xsp could not be found. (possible
context problem)

how to fix it??? it' sstrange that i can run all the pages that match
adminstatic-* rather well!!!

can you all show me what i did wrong ??

Thanks so much GD