You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alex Vishnev <av...@optonline.net> on 2001/11/10 17:52:54 UTC

[C2]: Interesting Behavior in XSP

Hi,

I am using C2rc1 with Tomcat4 on Win2000. I am observing a very strange
behavior with it. I was working with the session examples in
docs/sample/session directory. Here is the xsp file I was trying to work
with. It is only slightly different then sessionpage.xsp example provided in
the distribution.

<?xml version="1.0 encoding="iso-8859-1"?>
<xsp:page
	  language="java"
	  xmlns:xsp="http://apache.org/xsp"
	  xmlns:session="http://apache.org/xsp/session/2.0"
	  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
	  >
  <page>
  <content>
    <para>Your fruit is:<session:get-id as="xml"/></para>
  </content>
</page>
</xsp:page>

However, when accessing this page, I am always getting HTTP-404 ( Page not
found). I don't feel it was necessary to change sitemap, because there is a
pipeline already for all session/*.xsp* files as follows:

map:match pattern="session/*.xsp*">
     <map:generate type="serverpages" src="docs/samples/session/{1}.xsp"/>
     <map:transform src="stylesheets/dynamic-page2html.xsl">
        <map:parameter name="view-source"
value="docs/samples/session/{1}.xsp"/>
     </map:transform>
     <map:serialize/>
   </map:match>

I also wanted to mention that if use
http://localhost:8080/cocoon/session/sessionpage.xsp - it works properly
Q1: Why does this happen?? What am I doing wrong?? BTW, the results do not
change if I stop and restart Tomcat.

The other experiment I made is to make a copy of sessionpage.xsp to
sess1.xsp and then tried to access that as :
localhost:8080/cocoon/session/sess1.xsp. This should me a valid response
just as it did with sessionpage (I expected that :)). The I started to
modify sess1.xsp to remove a couple of lines to only display session id.
When I saved the file and tried to access sess1.xsp as above. The results of
the page did not change at all. Basically, there was still URL and Session
ID, rather then just Session ID.

Q2: (same as above) Why does this happen?? What am I doing wrong?? BTW, the
results do not change if I stop and restart Tomcat.

Here is what sess1.xsp looks like:

<?xml version="1.0 encoding="iso-8859-1"?>
<xsp:page
	  language="java"
	  xmlns:xsp="http://apache.org/xsp"
	  xmlns:session="http://apache.org/xsp/session/2.0"
	  xmlns:xsp-request="http://apache.org/xsp/request/2.0"
	  >
  <page>
  <content>
    <para>Your fruit is:<session:get-id as="xml"/></para>
  </content>
</page>
</xsp:page>


I would appreciate any pointers that you can give me.

Alex Vishnev



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>