• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing Variables  RSS feed

 
Bernard Bobinski
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to pass 2 variables from one JSP page to another. I am using the following code



The end result is an error and the variable newcourse ends up as

"TEST1?year=2004" instead of "TEST1"

Obviously I am missing something code wise or do I have to pass one big variable consisting of multiple variables and sift through the mess with substrings?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Request parameters are separated from one another (after the initial ?) with the ampersand character. You should never have more than one ? in a URL.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the URL for this very page for an example.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!