forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: Indirect linking and request parameters
Date Wed, 07 Jan 2004 10:36:47 GMT
Justus H. Piater wrote:

>Hi,
>
>I'm building a site where some pages rely on request parameters
>("file.html?parameter=value"), using XSP. All links are known at build
>time, so I can in principle build a static site.
>
>- With direct links, the dynamic site ("forrest run") works without
>  problems.
>
>- If I build a static site with direct links, the dynamic pages are
>  precompiled ok, under the name "file.html_parameter=value".
>  
>
In my work on the Cocoon CLI, I have never given any attention to how 
parameter 'mungling' is done. There's code there to do it, but I've 
never used it.

The filename you mention above doesn't look too helpful, does it. It 
should be, as you say, file_parameter=value.html, or some variant.

This would, IMO, need to be done in the mangle method of the 
'org.apache.cocoon.bean.Target' class, probably using 
NetUtils.getExtension() in there somewhere.

>  PROBLEM 1: The corresponding links in the statically-built pages are
>             not rewritten appropriately. They still point to
>             "file.html?parameter=value".
>  
>
Do you use 'link view' or 'link gathering'? Look at the top level 
attributes in your cli.xconf file. The URLs should be rewritten - it is 
the same code that converts a filename as converts links, so that is 
strange.

>  PROBLEM 2: To avoid MIME-Type problems, I think the precompiled
>             pages should rather be called
>             "file_parameter=value.html".
>  
>
I agree. I didn't realise they weren't.

>- PROBLEM 3: I'd rather use indirect links, but there's apparently no
>             way to include request parameters.
>  
>
What is an indirect link?

>Am I right about these three problems, or am I missing something?
>  
>
No, I think you're right.

>Problems 1 and 2 are probably Cocoon (rather than Forrest) problems,
>right?
>  
>
Yup.

>Solving Problem 3 would require an enhancement of Cocoon's
>LinkRewriterTransformer, in addition to changes on the Forrest end,
>right?
>  
>
I'd need to understand what you mean by 'indirect links' to be able to 
comment.

>Should I file bug reports / feature requests in the appropriate
>places?
>  
>
Or even better, supply a patch!

What do others think? If parameter handling is as Justus describes, 
should it be changed?

Regards, Upayavira



Mime
View raw message