Forum OpenACS Q&A: adp parser

Collapse
Posted by aT aT on
Hi ,

I have been trying to change all .adp file extensions to .asp
extensions throuoght my application for testing purpose.
I have set the MIME parameters in ini file , but somehow AOLserver
(3.2 Ad12 )is not executing the .asp extensione'd adp's .

What are the parameters required to make any extension working
as .adp files .

ns/mimetypes]
Default=text/plain; charset=utf-8
NoExtension=text/plain ; charset=utf-8
.html=text/html; charset=utf-8
.tcl=text/plain; charset=utf-8
.adp=text/html; charset=utf-8
.pcd=image/x-photo-cd
.prc=application/x-pilot
.asp=text/html; charset=utf-8

[ns/server/bayt/adp/parsers]
adp=".adp"

[ns/server/bayt/adp]
Map=/*.asp
Map=/*.adp
Map=/*.xml
Cache=true
CacheSize=5120000
ThreadCache=true
EnableExpire=False

[ns/server/bayt/MimeTypes]
Default=text/plain ; charset=utf-8
NoExtension=text/plain ; charset=utf-8
.pcd=image/x-photo-cd ; charset=utf-8
.prc=application/x-pilot ; charset=utf-8
.html=text/html; charset=utf-8
.tcl=text/plain; charset=utf-8
.adp=text/html; charset=utf-8
.asp=text/html; charset=utf-8
.xml=text/html; charset=utf-8

Collapse
2: Response to adp parser (response to 1)
Posted by Don Baccus on
The templating system makes assumptions about extensions, too.

Why do you want to do this, anyway?

Collapse
3: Response to adp parser (response to 1)
Posted by Tom Jackson on

The fastest way to do this would be to hack the request processor to not get so upset about the file extension. Right now the rp freaks out if you use .adp when you want to run a template of the same name. It would be convenient if it just ignored the extension in the case of a .tcl/.adp pair that matched the file root. Then you could 'impress' your boss by using extensions like .jsp, .asp, etc. My favorite is .html! However, filenames themselves should reflect the actual file type.

Collapse
4: Response to adp parser (response to 1)
Posted by aT aT on
well hacking the request server to ignore about extension hassles is beyond my knowledge for TCL
Is there any other way , any configuration parameters ?

Thanks for the help anyway
Regards