cleverpig | 26 Aug 10:17

Where is complete tutorial of developing Roxen web application with pike?

The roxen manual has a little code to show how to use pike tag and
script,but there is not a complete reference for it.
I can do this with sample code:
<html>
	<head></head>
	<body>
	<?pike
	  //X <gtext>Server Info</gtext><br />
	  write(
	  	"This is %s running %s, and we've been up for %d seconds.",
	  	roxen.version, roxen["pike-version"], roxen.uptime
	  );
	
	  //X <br /><gtext>Cookies</gtext><br />
	  //X <pre><insert scope='cookie' variables='full' /></pre>
	  if(cookie.hi == "Hi!")
	    cookie.hi = "Ho!";
	  else
	    cookie.hi = "Hi!";
	?>
	</body>
</html>

But how to access roxen api? where can I get full roxen api for
pike,such as get request object and make response?
--

-- 
cleverpig
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
(Continue reading)

Arne Goedeke | 26 Aug 11:17

Re: Where is complete tutorial of developing Roxen web application with pike?

check out
https://extranet.roxen.com/support/docs/4.5/index.xml.html
especially the "system developer manual pike". it should contain most of 
what you are looking for.

arne

On Tue, 26 Aug 2008, cleverpig wrote:

> The roxen manual has a little code to show how to use pike tag and
> script,but there is not a complete reference for it.
> I can do this with sample code:
> <html>
> 	<head></head>
> 	<body>
> 	<?pike
> 	  //X <gtext>Server Info</gtext><br />
> 	  write(
> 	  	"This is %s running %s, and we've been up for %d seconds.",
> 	  	roxen.version, roxen["pike-version"], roxen.uptime
> 	  );
>
> 	  //X <br /><gtext>Cookies</gtext><br />
> 	  //X <pre><insert scope='cookie' variables='full' /></pre>
> 	  if(cookie.hi == "Hi!")
> 	    cookie.hi = "Ho!";
> 	  else
> 	    cookie.hi = "Hi!";
> 	?>
> 	</body>
(Continue reading)

cleverpig | 26 Aug 11:38

Re: Where is complete tutorial of developing Roxen web application with pike?

I think it's not enough..
Can you give me a example code for show request params via pike in roxen?

On Tue, Aug 26, 2008 at 5:17 PM, Arne Goedeke <el <at> laramies.com> wrote:
> check out
> https://extranet.roxen.com/support/docs/4.5/index.xml.html
> especially the "system developer manual pike". it should contain most of
> what you are looking for.
>
> arne
>
> On Tue, 26 Aug 2008, cleverpig wrote:
>
>> The roxen manual has a little code to show how to use pike tag and
>> script,but there is not a complete reference for it.
>> I can do this with sample code:
>> <html>
>>        <head></head>
>>        <body>
>>        <?pike
>>          //X <gtext>Server Info</gtext><br />
>>          write(
>>                "This is %s running %s, and we've been up for %d seconds.",
>>                roxen.version, roxen["pike-version"], roxen.uptime
>>          );
>>
>>          //X <br /><gtext>Cookies</gtext><br />
>>          //X <pre><insert scope='cookie' variables='full' /></pre>
>>          if(cookie.hi == "Hi!")
>>            cookie.hi = "Ho!";
(Continue reading)

Arne Goedeke | 26 Aug 12:48

Re: Where is complete tutorial of developing Roxen web application with pike?

take a look at this:
https://extranet.roxen.com/support/docs/4.5/roxen/4.5/system_developer_manual/languages/pike_script.xml.html

Not sure what exactly you are looking for. All request params are inside
the RequestId object given to parse(). You probably want to have a look
at id->variables.

arne

On Tue, 26 Aug 2008, cleverpig wrote:

> I think it's not enough..
> Can you give me a example code for show request params via pike in roxen?

cleverpig | 26 Aug 14:20

Re: Where is complete tutorial of developing Roxen web application with pike?

oh,it is a example that show how to use pike script which just like
java servlet.
I expect a example to show how to access roxen object to parse request
params in html with pike tag,like my example:
<html>
       <head></head>
       <body>
       <?pike
         //X <gtext>Server Info</gtext><br />
         write(
               "This is %s running %s, and we've been up for %d seconds.",
               roxen.version, roxen["pike-version"], roxen.uptime
         );

         //X <br /><gtext>Cookies</gtext><br />
         //X <pre><insert scope='cookie' variables='full' /></pre>
         if(cookie.hi == "Hi!")
           cookie.hi = "Ho!";
         else
           cookie.hi = "Hi!";
       ?>
       </body>
</html>

On Tue, Aug 26, 2008 at 6:48 PM, Arne Goedeke <el <at> laramies.com> wrote:
> take a look at this:
> https://extranet.roxen.com/support/docs/4.5/roxen/4.5/system_developer_manual/languages/pike_script.xml.html
>
> Not sure what exactly you are looking for. All request params are inside
> the RequestId object given to parse(). You probably want to have a look
(Continue reading)

Martin Bähr | 26 Aug 16:04

Re: Where is complete tutorial of developing Roxen web application with pike?

On Tue, Aug 26, 2008 at 08:20:43PM +0800, cleverpig wrote:
> oh,it is a example that show how to use pike script which just like
> java servlet.
> I expect a example to show how to access roxen object to parse request
> params in html with pike tag,like my example:

the pike part is the same. but apart from that inline pike in html is a
bad idea. don't do it. better write a tag module. it is just as easy
once you have done the first one and much safer and cleaner.

greetings, martin.
--

-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer   working in china                      community.gotpike.org
unix system-      iaeste.(tuwien.ac|or).at                     open-steam.org
administrator     caudium.org                                    is.schon.org
Martin Bähr       http://www.iaeste.or.at/~mbaehr/


Gmane