Results 1 to 7 of 7

Thread: Parameter number increases continuous - AJAX / JSP

  1. #1
    Join Date
    Apr 2010
    Posts
    84

    Parameter number increases continuous - AJAX / JSP

    I'm looking for a quick question or even a few suggestions--- So, it is this: I import a JSP page with certain parameters
    Code:
    <c:import url="xyz.jsp"> 
    <c:param name="param1" value="hallo"> 
    </ C: import>
    so far so good ... in the named, I read the parameters as follows:
    Code:
    <c:forEach var='parameter' items='${param}'> 
    <c:if test="${!fn:startsWith(parameter.key,'field')}"> 
    ...
    everything works wonderfully .. But now the main problem comes
    I create a link in the imported page, composed of the parameters
    (& = Param.key param.value ...). The link is on the first import also the way you want it / is presented. When you click on this link, an Ajax request is executed, which loads a particular new Div. In this Division, the same page is imported, only now are all the parameters that were sent through the Ajax request and at the same time in the imported page. Which means that the created link now contains all the fields that were previously sent to the Ajax request. Which means that not only the parameters in the <c:import>. are given as to pass to the side, but also those of the Ajax request. Maybe someone can tell me why this is so and how I can help it.

  2. #2
    Join Date
    Dec 2008
    Posts
    183

    Re: Parameter number increases continuos - AJAX / JSP

    Maybe you've even expressed a bit complicated ... atleast I am not able to get an exact point that you want to ask. So I would like to suggest you to elaborate more so that it would be better to understand me (and also others ). I hope that you got what I am trying to tell.!! So I am waiting for your elaborated query..

  3. #3
    Join Date
    Apr 2010
    Posts
    84

    Re: Parameter number increases continuos - AJAX / JSP

    The Ajax request is sent as follows: (Controller is the servlet).
    Code:
    open ("POST", "controller", true); 
    req.setRequestHeader ('Content-Type', 'application / x-www-form-urlencoded; charset = utf-8'); 
    req.setRequestHeader ('Content-Length', url.length); 
    req.setRequestHeader ('Cache-Control', 'no-cache, must-revalidate'); 
    req.send (url); 
    
    bsp url could be: action = go & field1 = value1 & field2 = value2 etc.
    These parameters are then included in the imported page is reloaded with the Ajax request. Say: forEach loop in the above dive, now field1 = value1, field2 = value2 and so on. I hope someone understands me.

  4. #4
    Join Date
    Dec 2008
    Posts
    183

    Re: Parameter number increases continuos - AJAX / JSP

    I would like to suggest you to do the following things :
    • Internal to dispatch JSP
    • A separate HJTTP request parameters to with anything else.
    • in separate HTTP request / thread

  5. #5
    Join Date
    Apr 2010
    Posts
    84

    Re: Parameter number increases continuos - AJAX / JSP

    Unfortunately, you can find on google etc. nothing that can help me further, but I think I was misunderstood. So I try it as short and concise as possible to make. I import a JSP. About the parameters that are created during the import, I create a link again. I now import the JSP in a reloaded by Ajax DIV, all parameters were passed for the reloading of the Divs, with the imported page (This link is longer so many times over). Basically, it's OK that the parameters still "there" are. It is in effect, no error, but for my purpose a bit complicated and unpredictable, what happened there in the end. If I reload several nested DIVs, increasing the number of fast and I have accordingly as more common parameters (action = loadDiv2 & action = loadDiv3 etc.) It would be nice with no effort on only the parameters passed to recognize.bsp:
    Code:
    <c:import url="myPage.jsp"> 
    <c:param name="parm1" value="val2" /> 
    </ C: import>
    If I now have the parameters in the imported page, I just want to "get parm1" and not those who were previously for Ajax. Please help..

  6. #6
    Join Date
    Dec 2008
    Posts
    202

    Re: Parameter number increases continuos - AJAX / JSP

    Just struts (hopefully 2.x) offers very good alternatives - velocity and free marker. And may eliminate the flexibility it gives a groovy view (Which to me is a bit too flexible). Since JavaScript does not define variable types is not possible to ensure that parameters passed to a function are the type for the operations it performs the function. If a function is passed more parameters that you defined, the remaining parameters are ignored. If you pass fewer parameters than the role defined for all other parameters to complete the correct number is assigned the value undefined.

  7. #7
    Join Date
    Feb 2010
    Posts
    530

    Re: Parameter number increases continuous - AJAX / JSP

    A function can contain other functions inside nested, like in the following code :
    Code:
     square_sum function (a, b) (
       function square (x) (return x * x;)
       return square (a) + square (b);
     )
    The function calculates the sum of the squares of two numbers. To do this, define the function inside another function that calculates the square of the number that is passed. To obtain the final result, the role square_sum() makes use of the nested function square().

Similar Threads

  1. hidden objects Increases suddenly
    By Repliers in forum Networking & Security
    Replies: 4
    Last Post: 28-05-2011, 10:24 PM
  2. jQuery AJAX vs. Adobe AIR AJAX Class
    By Agaev in forum Windows Software
    Replies: 5
    Last Post: 06-07-2010, 01:59 PM
  3. Naukri.com increases its lead over competitors
    By Job-finder in forum Education Career and Job Discussions
    Replies: 1
    Last Post: 01-04-2009, 02:42 PM
  4. P5K Premium increases for 4GB of Ram
    By Neider in forum Motherboard Processor & RAM
    Replies: 3
    Last Post: 23-03-2009, 01:50 PM
  5. Does Turbo increases the speed of your pc
    By goatape in forum Windows Software
    Replies: 2
    Last Post: 10-10-2008, 01:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,055,395.05710 seconds with 17 queries