• 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

Struts2 and Ajax

 
Ranch Hand
Posts: 40
Hibernate Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am new in AJAX, I am trying to learn AJAX with Struts2, I did small web application. When User choose country name ,its capital will be display.

see my code , When I click on any country name nothing is display.

Index.jsp



loginchk.java



struts.xml




 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, if I were going to do AJAX, I'd use the Struts jQuery plugin. It makes AJAX much easier than doing it yourself.
That said, what have you done to debug your application? Have you used a JavaScript debugger like FireBug to see that your JavaScript is working? What return code are you getting from your HTTP request? Are you checking your server logs to check for errors there? You don't show us success.jsp. Does it exist? Note your index.jsp expects XML. What does success.jsp render?
 
Hardik Patel p
Ranch Hand
Posts: 40
Hibernate Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joe Ess,

I searched lots of tutorial for Ajax with Strtus2 but all are code snippest, I did small application from code snippest as above but its not working so I want perfect simple application to learn.

Thank you
Hardik
 
Hardik Patel p
Ranch Hand
Posts: 40
Hibernate Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used firebug, but It only shows the element of form not the value of variable.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What return code are you getting from your HTTP request? Are you checking your server logs to check for errors there? You don't show us success.jsp. Does it exist? Note your index.jsp expects XML. What does success.jsp render?
 
Hardik Patel p
Ranch Hand
Posts: 40
Hibernate Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
object not found displays when I clicked on button. success.jsp contains just "Hi"
 
There are no more "hours", it's centi-days. They say it's better, but this tiny ad says it's stupid:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic