• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing AJAX url value to JSP  RSS feed

 
Ricky Jay
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am I going in the right direction with this? I'm trying to get a variable out of the url with ajax/jsp. First attempt with this.

As of now, it's just printing "no comments" most likely cause it's pulling in a null value on the jsp page.

AJAX:


JSP:
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66154
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you use a tool such as Firebug to check to see what's in the HTTP request?
 
Ricky Jay
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Have you use a tool such as Firebug to check to see what's in the HTTP request?

No I have not. Is there a way to do this without the tool? Maybe I should put an alert in and display the url...is that what you are saying?
 
Ricky Jay
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put an alert in the ajax, and its generating the url correctly. So I'm guessing the pass isn't being read by the jsp page. I used a request.getParameter.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66154
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's your beef with using the proper tools to debug?

The best, and I mean best -- hands-down, without argument, no question, irrefutable -- way to diagnose Ajax issues is to inspect the HTTP requests and responses. Everything else is just guessing.
 
Ricky Jay
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems to have been a JSTL problem. I'm still learning JSTL. This is what i needed:

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66154
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's EL, not JSTL.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!