• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to pass variable to java method from jsp

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
I've this simple jsp,in which I take in query(from jsp1),pass it to java class and get the table.I sort the tables depending upon the table header clicked(index) and sort status given.
The problem is I want to send a "cnt" variable from jsp too,but when i do this ,it displays results correctly for the first time,and thereafter i am not able to sort or do anything.Is this a session problem,I have commented the code that's not working.Any help would be appreciated.



But,on the other hand if i hardcode this variable in the java class,everything starts working fine.Any clues???
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have any error logs?
What do you mean by "not being able to do anything"? Is the jsp not loading properly after the initial hit?
One issue could be that you are clearing the array, as this is being passed by reference, are you sure you are not making modifications that you expect to remain the arraylist in between requests?
Perhaps including the code to both version of retArrayList(...) could be beneficial.
Michal
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic