Here is my code that is causing this problem.

I have a xsp that takes input parameters and uses post method. 

                        
                
<form href="cocoon:/coplets/search/sampleoc.xsp" name="form1"
method="post">
     <input name="sampleoc" type="text" >                           
     <input name="user" type="text" >
     <input name="startdate" type="text" >
     <input name="submit1" value="GO" type="submit" onClick="go()"/>
     <input name="nowait" value="false" type="hidden" />
</form>


sampeloc has a hidden parameter nowait. If nowait is false then it goes
to wait.xsp. Wait.xsp is a page which just contains a animated gif which
contains a meta tag so that it can redirect to a different page.I wanted
to have wait.xsp in between the main page and results page because users
can understand that something is going on  because searching is taking a
long time and to display output when user submits sampleoc.xsp is almost
1 minute away. So for user interaction we wanted to have a animated gif
till the output search is done.In meta tag of wait.xsp I made nowait =
true so that in the sitemap it goes to the results page where database
query is done and results are displayed. When the submit method is get
everything is going on as excepted otherwise once the parameters are
submitted it goes to the results page and then we click back button.
Type in different parameters and click on submit the search is still
going on for the previous parameters. ANy help is greatly appreciated.

head tag in wait.xsp


<head>

String requestattr = "0;url=portal?nowait=true";
Enumeration attrnames = request.getParameterNames();
while(attrnames.hasMoreElements()) {
    String attrname = (String)attrnames.nextElement();  
    if(!attrname.equals("nowait")) {                        
            String attrvalue = request.getParameter(attrname);
            requestattr = requestattr + "&amp;" + attrname + "=" + attrvalue;
        }
}                               
<meta http-equiv="refresh" >
<xsp:attribute
name="content"><xsp:expr>requestattr</xsp:expr></xsp:attribute>
</meta>
</head>
   
        <!-- SAMPLE OC  SEARCH IN SITEMAP -->    
   <map:match pattern="sampleoc.xsp">
        <map:select type="request-parameter">
                <map:parameter name="parameter-name" value="nowait"/>
                <map:when test="false">
                  <map:generate type="serverpages" src="wait.xsp" />
                </map:when>
                <map:otherwise>                 
                  <map:act type="get-sample">           
                        <map:parameter name="sample" 
value="{request-param:sampleoc}"/> 
                        <map:generate type="serverpages" 
src="traderocresult.xsp"/> 
                                            
                </map:act>
                
                </map:otherwise>
                </map:select>

     <map:transform/>        
     <map:serialize/>    
   </map:match>
   <!-- END OF SAMPLE OC SEARCH-->
   



On Mon, 2004-11-22 at 18:21, Johannes Textor wrote:
> Hi Anna,
> 
> I'm having a hard time figuring out what your problem
> might be ... it would be useful if you could include source
> codes for your xsp and provide more information about how
> you actually pass your parameters.
> 
> cocoon itself does not differentiate between post and get
> request methods neither does it store values of previous
> request, so I would guess you're either doing something wrong
> when reading out the parameters ore it's a browser cache issue.
> 
> cheers,
> Johannes
> 
> Anna Bikkina wrote:
> 
> >Can anyone provide input on this problem? I still cannot get the
> >post/get methods working as they should.
> >
> >Thanks,
> >Anna.
> >
> >On Wed, 2004-11-17 at 16:53, Anna Bikkina wrote:
> >  
> >
> >>I think cocoon is somewhere internally storing my previous request
> >>values because before submit I called a javascript and checked the
> >>variables entered in page2 it displays right variables but then it still
> >>posts page1 variables and this is happening only when the submit type of
> >>form in page2 is post. How can I get rid of this?
> >>
> >>
> >>On Wed, 2004-11-17 at 16:32, Anna Bikkina wrote:
> >>    
> >>
> >>>Hi,
> >>>
> >>>I have a wierd problem using META tab in <HEAD> of my HTML in cocoon
> >>>portal. May be this is a html question more than a portal question. Can
> >>>someone please help me solve this one.. I have been working on this for
> >>>more than a week now.
> >>>
> >>>I have a html form in a cocoon coplet(page1.xsp). When I submit the form
> >>>it goes to wait.xsp which just displays a animated gif saying searching
> >>>results . Wait.xsp  has 
> >>>
> >>><meta http-equiv="refresh" 
> >>>content="1;url=page1.xsp?param1="xx"&param2="YY">
> >>>
> >>>where the url in content  contains all the request parameters that come
> >>>to wait.xsp.
> >>>
> >>>Now this one goes to the same sitemap match as page1  and the sitemap
> >>>directs it to page2 depending on some conditions page2 displays results
> >>>and also has  almost the same html form as in page1. When I submit the
> >>>form in page2 it submits details as in page1 when the method type =
> >>>"post" when the method type = "get" it works the way it should by
> >>>posting parameters in page2 .Not sure what difference it makes when it
> >>>is a get/post. Any  help is greatly appreciated.
> >>>
> >>>Here is the sitemap component for the coplet
> >>>
> >>>
> >>>  
> >>>    <map:match pattern="page1.xsp">
> >>>    
> >>>           <map:select type="request-parameter">
> >>>                   <map:parameter name="parameter-name" value="nowait"/>
> >>>                   <map:when test="false">
> >>>                   <map:generate type="serverpages" src="wait.xsp" />
> >>>           </map:when>
> >>>                   <map:otherwise>
> >>>                   <map:generate type="serverpages" src="page2.xsp"
> >>>label="raw"/>                                                              
> >>>                </map:otherwise>
> >>>                   <map:transform
> >>>src="con   text://newhistoryserver/styles/searchresult.xsl"/>
> >>>                   <map:serialize/> 
> >>>                                   
> >>>           </map:select>
> >>>
> >>>           <map:generate src="page2.xsp" type="serverpages"/>            
> >>>   <map:transform  src="context:/newhistoryserver/styles/search.xsl"/>    
> >>>   <map:serialize/>  
> >>>   </map:match>
> >>>      
> >>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to