You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christian Joelly <ch...@knapp.com> on 2002/02/21 17:59:16 UTC

[C2] http request parameters

Hello!

i have a little question concerning request parameters:

i have following html form:

<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" media="screen" href="styles.css">
<script src="knpscripts.js" language="JavaScript">

</script>
</head>
<body background="images/back.png" bgcolor="#585c5f" onload="javascript:parent.data.location='/knapp/reports/genreport.xsp?auftrag=U019B20&amp;produkt=LT5&amp;report=istzeit';">
<!--Auftrag: U019B20; Produkt: LT5; Report: istzeit;-->
<center>
<table cellpadding="5" cellspacing="0" border="0"><tr align="center" valign="middle"><td valign="middle" align="center" class="form">

<form name="chooser" method="post">
	<input type="hidden" name="timestamp" value="1014310116667">
	<input type="hidden" name="oldauftrag" value="U019B20">  
	<font class="form">Auftrag:</font>
	<input type="text" name="auftrag" value="U019B20" length="20" class="field-required">
	<font class="form">Produkt:</font>
	<input type="text" name="produkt" value="LT5" length="20" class="field">
	<font class="form">Liste:</font>
	<select class="field" name="report">
		<option value="istzeit" selected>Ist-Zeiten</option>
		<option value="istzeit-kst">Ist-Zeiten / Kst.</option>
	</select>
	<input class="button" type="submit" name="Start" value="Start">
	<input class="button" type="reset" name="Reset" value="Reset">  
</form>

</td></tr></table></center></body></html>

now, i enter the value "U019B21" into the field "auftrag". i need the
old value to decide if this value has changed or not...

and when i send this form to cocoon, it writes the following output:

DEBUG   (2002-02-21) 17:48.36:598   [cocoon  ] (/knapp/reports/chooser.xsp) Thread-35/Cocoon: DEBUGGING INFORMATION:
REQUEST: /knapp/reports/chooser.xsp

CONTEXT PATH: /knapp
SERVLET PATH: /reports/chooser.xsp
PATH INFO: null

REMOTE HOST: edvlw05.knapp.intern
REMOTE ADDRESS: 10.17.130.106
REMOTE USER: null
REQUEST SESSION ID: g5iab43c91
REQUEST PREFERRED LOCALE: de_AT
SERVER HOST: edvlw05.knapp.intern
SERVER PORT: 80

METHOD: POST
CONTENT LENGTH: 97
PROTOCOL: HTTP/1.0
SCHEME: http
AUTH TYPE: null

CURRENT ACTIVE REQUESTS: 1
MAXIMUM ACTIVE REQUESTS: 4

REQUEST PARAMETERS:

PARAM: 'report' VALUES: '[istzeit], [istzeit]'
PARAM: 'produkt' VALUES: '[LT5], [LT5]'
PARAM: 'auftrag' VALUES: '[U019B20], [U019B21]'
PARAM: 'oldauftrag' VALUES: '[U019B20], [U019B20]'
PARAM: 'Start' VALUES: '[Start]'
PARAM: 'timestamp' VALUES: '[1014310085064], [1014310106862]'
HEADER PARAMETERS:

PARAM: 'cookie' VALUES: '[JSESSIONID=g5iab43c91]'
PARAM: 'connection' VALUES: '[Keep-Alive]'
PARAM: 'accept-encoding' VALUES: '[gzip]'
PARAM: 'referer' VALUES: '[http://edvlw05.knapp.intern/knapp/reports/chooser.xsp?oldauftrag=U019B20&auftrag=U019B20&produkt=LT5&report=istzeit&timestamp=1014310085064]'
PARAM: 'accept' VALUES: '[image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*]'
PARAM: 'content-length' VALUES: '[97]'
PARAM: 'accept-charset' VALUES: '[iso-8859-1,*,utf-8]'
PARAM: 'accept-language' VALUES: '[de-AT, en]'
PARAM: 'user-agent' VALUES: '[Mozilla/4.77 [en] (X11; U; Linux 2.4.16 i686; Nav)]'
PARAM: 'content-type' VALUES: '[application/x-www-form-urlencoded]'
PARAM: 'host' VALUES: '[edvlw05.knapp.intern]'


the interesting part is:

PARAM: 'report' VALUES: '[istzeit], [istzeit]'
PARAM: 'produkt' VALUES: '[LT5], [LT5]'
PARAM: 'auftrag' VALUES: '[U019B20], [U019B21]'

                                     ^^^^^^^^^
				     why is the new value the second
				     entry in this "parameter array"?

PARAM: 'oldauftrag' VALUES: '[U019B20], [U019B20]'
PARAM: 'Start' VALUES: '[Start]'
PARAM: 'timestamp' VALUES: '[1014310085064], [1014310106862]'

and why are the parameters filled with 2 values?

i'm really confused, and have already bought a new mouse... ;-)

thx, Chris

-- 
KNAPP Logistics Automation  http://www.knapp.com
Ing. Christian Jölly        Tel/FAX: (++43) 316 / 495 1926 / 495 394
Günter-Knapp-Straße 5-7     A-8075 Hart bei Graz

np: CD Audio Track 03

Re: [C2] http request parameters

Posted by Christian Joelly <ch...@knapp.com>.
Hello!

On Fri, Feb 22, 2002 at 09:48:38AM +0100, Christian Haul wrote:
> > 
> > and why are the parameters filled with 2 values?
> 
> So, I cannot answer why your browser posts two values back (check by
> setting method to "get") as your form seems to be OK in this
> respect. It might be related to your javasript code, though...

Because my form doesn't use javascript and the form controls have unique
names i changed the form method from POST to GET and it works... ;-)

thx for your hint,

Chris

-- 
KNAPP Logistics Automation  http://www.knapp.com
Ing. Christian Jölly        Tel/FAX: (++43) 316 / 495 1926 / 495 394
Günter-Knapp-Straße 5-7     A-8075 Hart bei Graz


Re: [C2] http request parameters

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 21.Feb.2002 -- 05:59 PM, Christian Joelly wrote:
> <form name="chooser" method="post">
> 	<input type="hidden" name="timestamp" value="1014310116667">
> 	<input type="hidden" name="oldauftrag" value="U019B20">  
> 	<font class="form">Auftrag:</font>
> 	<input type="text" name="auftrag" value="U019B20" length="20" class="field-required">
> 	<font class="form">Produkt:</font>
> 	<input type="text" name="produkt" value="LT5" length="20" class="field">
> 	<font class="form">Liste:</font>
> 	<select class="field" name="report">
> 		<option value="istzeit" selected>Ist-Zeiten</option>
> 		<option value="istzeit-kst">Ist-Zeiten / Kst.</option>
> 	</select>
> 	<input class="button" type="submit" name="Start" value="Start">
> 	<input class="button" type="reset" name="Reset" value="Reset">  
> </form>

> PARAM: 'report' VALUES: '[istzeit], [istzeit]'
> PARAM: 'produkt' VALUES: '[LT5], [LT5]'
> PARAM: 'auftrag' VALUES: '[U019B20], [U019B21]'
> PARAM: 'oldauftrag' VALUES: '[U019B20], [U019B20]'
> PARAM: 'Start' VALUES: '[Start]'
> PARAM: 'timestamp' VALUES: '[1014310085064], [1014310106862]'

> 
> and why are the parameters filled with 2 values?

I don't think it's Cocoon related. When two or more form controls
share the same name, they appear as an array of values to your
application. Actually, by getParameter you'll get only the first while
getParameterValues returns an array.

So, I cannot answer why your browser posts two values back (check by
setting method to "get") as your form seems to be OK in this
respect. It might be related to your javasript code, though...

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
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>