• 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

Struts: Incorrect form submission through javascript

 
Ranch Hand
Posts: 479
1
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am submitting my form using javascript.
E.g =>



The content of my deployment descriptor is



Almost all actions are working perfectly as required but the one I am working on right now is NOT. The result is that I get a blank page after I call the javascript function. No errors on the server (tomcat 6) console and none in the log files (both server logs and application logs).

I am stuck neck deep right now. The ways I approached are:-
1) Included alert() statements in the javascript function and all of them are executed (Am on Firefox and no javascript errors are reported).
2) Added breakpoints in the Java code but the server never reaches any of these.
3) The log files show that the form bean corresponding to this particular form is been instantiated.
4) The log files also says that its looking for the associated action and returning the existing Action instance and stops.
5) The page goes white and the whole application stops.

Anyone has any suggestions on how I should take this one?

Cheers,
Raj.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Add more logging, or fire up the debugger--there's not enough information to help. Make sure logging is at DEBUG level.
 
Rajkamal Pillai
Ranch Hand
Posts: 479
1
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks,

The debugger is already on DEBUG level. Since you mentioned logging, I had checked the logger level and it already was on DEBUG. Let me elaborate a little, This happens at a certain step in a flow. Say there are a few steps prior to this. I use Struts1.x/Java5/Hibernate/Tomcat6/MySQL on my application. All the steps involve interaction with the Db. But there are no transactions included. I am trying to figure out an approach which I could employ out here.
Thanks,
Raj.



 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using Tiles?
 
Rajkamal Pillai
Ranch Hand
Posts: 479
1
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Yes David Tiles is being used but not extensively. The basic layout of the page is via tiles but I am not sure to what extent. I can see Tiles TLDs included in pages but not the tags for the same.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tiles is notorious for swallowing exceptions-I'd look into the page first. You could subclass the request processor and add more logging if you truly *know* none of your action code is being executed.
 
Rajkamal Pillai
Ranch Hand
Posts: 479
1
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


That sure sounds like a good way to approach it but I regret to inform you that time is a major constraint right now and keeping that in mind I worked out a solution. This certainly is not a good way but I re-did the whole thing from a previous version and lo and behold, this time around all went fine. Thanks for the tip on Tiles and all the others as well.

Thank you David
 
reply
    Bookmark Topic Watch Topic
  • New Topic