• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to pass variable to java method from jsp  RSS feed

 
amrit choong
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • 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???
 
Michal Bienek
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!