I use a lot of j/cgi, but have not adopted Oleg's nice package. One important point (which I have "rediscovered" too many times) is illustrated by a cgi program I use for testing (with the comment expressing my frustration) -
#! /usr/local/bin/ja stdout 'Content-type: text/html', NL,NL NB. This line is very damn important (sigh) stdout 'HoHoHo',NL exit 0 This displays text, but if the HoHoHo is replaced by a proper <html><head> ... page, then it produces expected results. IF the Content-type line is missing, OR if there are fewer than 2 new lines after it, all browsers object to the dynamically created stream. (Those 2 new line characters are what usually tripped me up) At 08:08 +0200 2009/06/22, david alis wrote: >A follow on to previous posting. >If I use http://localhost/jhp/examples/index.html >instead of http://localhost/cgi-bin/jhp.cgi/examples/index.html >then the page does resemble Oleg's http://olegykj.sourceforge.net/jhp/ > >However selecting items from the left menu only fills the panels >with HTML source - instead of the actual page. > >i.e. this is displayed: ><% ContentType'text/html' %> ><html><head> > <link rel="stylesheet" type="text/css" href="style.css"> ></head><body> ><h2>Bitmap Test</h2> ><p>Time is <%= 6!:0 '' %></p> ><p>Bitmap image generated by J</p> ><img src="ht4a.jhp"> ></body></html> > >instead of the bit pattern that ht4a.jhp produces. >---------------------------------------------------------------------- >For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
