Jump to content

Array from one JSP to other (HOW)?

- - - - -

  • Please log in to reply
1 reply to this topic

#1
toto_7

toto_7

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 295 posts
Hello,

I have a JSP file that retrive items from an XML and present them in Table. I implement two submit buttons that according the button, JSP goes to other JSP page and sort them. My question is how i can now, to bring back the sorted elements to first JSP and present them on Table. (Sorted items on 2nd JSP stored in Array).
thank you

"Programming is like sex. One mistake and you have to support it for the rest of your life."

-Michael Sinz

#2
ZekeDragon

ZekeDragon

    Writes binary right handed and hex left handed

  • Moderators
  • 2,103 posts
You could have the method call that results in calling the second JSP return the Java array that represents the sorted Table.

However, you may be approaching this problem incorrectly, have you considered using the Model-View-Controller pattern? This way all the views sort the model data however they choose, and the model remains unchanged despite how the user chooses to look at the data. I don't know how your architecture works, however, so I cannot say.
Wow I changed my sig!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users