Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
JSP calling Java class
ankitmmi
I had make a new JSP under subfolders of iw-cc folder. This jsp makes a call to java file under livesite_customer_src folder.
On java file, I had make several methods that will be called under specific circumstances.
On running jsp, I found that log messages (apache logger) are not printed and only one of several methods written in java file are executed.
I had log file (servletd_out.log) under iwui folder.
Now, I had only option left to write all the methods under jsp file which I see as a good solution.
Kindly provide some suggestions.
Find more posts tagged with
Comments
Rick Poulin
Now, I had only option left to write all the methods under jsp file which I see as a good solution.
Sorry, I didn't see a question in your post so I'm kinda guessing at it. This is the opposite of what I normally think of as the 'good' solution. Ideally, your JSP should have nothing more than baby rendering code, and all of your real logic should be in a Java class. Why? Because IDEs typically check classes much better than JSPs, because you can reuse and better structure your code, because there's less escaping of stuff to fit the scriptlet syntax, and because you can't (really) run unit testing on JSPs.
Is logging your only actual problem? What does your apache logger declaration look like? And in your class, if you're seeing one message but not others, isn't it possible that they're not being executed? (posting your code would help right about now)