Link to home
Start Free TrialLog in
Avatar of LianaD
LianaD

asked on

Help determining why Struts App is no longer working

I am a new to JAVA and Struts.  I had a working application until I decided to clean-up a few things (removed some SystemOut statements, removed duplicate code, etc.).  Now the application is not working and I can’t figure out why.  I didn’t modify the jsp or the struts-config.xml file.  There are no error messages in the console.   Before I include pieces of my code, I wanted to know where to look to try to determine what’s causing the problem.  Here’s a high level flow of what’s happening:

Index.jsp  invokes an action that will load values into a dropdown box.  It forwards “success”  
RptReq2.jsp is invoked if “success” is returned
Form is displayed and the dropdown list is populated
Once a value is selected from the dropdown, an onchange event will trigger a JAVA script function that will populate the values in another dropdown box (same form is submitted)
There is a button on the form that will trigger another function via an onclick event (same form is submitted)
There is a submit button to create a report based on the values in the form  (same form is submitted)


Everything was working okay as described above.  Now that I have done some cleanup, the form comes up as expected and the first dropdown list is populated.  However, when I make a selection nothing happens.  I put alerts in the functions to see if they were being invoked, but I am not getting alerts now.   I put a sysout in the load action to make sure I was reaching the point where “success” is returned.  I can see it on the console:

SystemOut     O about to return success from LoadAction
[4/1/10 9:42:18:734 EDT] 0000002b ServletWrappe I   SRVE0242I: [StrutsErrQueRptEAR] [/StrutsErrQueRpt] [/RptReq2.jsp]: Initialization successful

Any idea where I should start looking to try to figure out what is going on?
ASKER CERTIFIED SOLUTION
Avatar of cmalakar
cmalakar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LianaD
LianaD

ASKER

I do have alerts and they are not getting triggered.  Any idea what would cause them not to function?  As I mentioned in my first post, I even tried adding a button that would trigger the same function and send an alert.  Nothing was sent.  So, does this seem like a javascript issue to you?
Why dont you post your jsp ?
If you have firefox, check if there are any errors in ErrorConsole, after loading the page. (Clear all the errors, before loading the page)
Avatar of LianaD

ASKER

Okay, you made me focus in on the javascript, so i took a look at my functions.  One of the things that I did to "clean up the code" was to add another IF condition.  Unfortunately, my syntax was incorrect.  I'd seen earlier that the functions in the HTML were underlined in red and the message stated that the functions were undefined.  I ignored the message because I could see that they were there and spelled correctly.  Silly me for not investigating further.  It would have been nice to have a message detailing the root cause of the issue.  Any way, my app is working again. Thanks for pointing me in the right direction!!!!
Glad to know.. that you app is back. :)