This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Can anyone please provide me any hints as to why following piece of code is not working as I think it should?
So in the output on browser, I just get "Start End". That's it.
I'm coming back to Servlets and JSP after a big break of around 4-5 months, and I tried and tried and I'm not able to figure out why it's not printing in the loop or the str variable outside the loop. So kindly help me realize what I've done wrong here. I'll really appreciate that!
If this was my problem the first thing I would do is use the browser "view source" to see exactly what has been transmitted. Sometimes the peculiarities of HTML markup can conceal the real problem. Firefox browser is great for debugging because of the ease in viewing headers and the HTML as a DOM.
Joined: Mar 11, 2007
Thanks for the reply. Ya, I didn't think about that "View Source" before you mentioned. So I tried it just now. And in that also, funnily, I see the same thing. "Start End". I tried "View Source" in Mozilla Firefox, Avant and IE. Mozilla and Avant show the same thing in the source "Start End" and IE gives some access denied type error.
Any more suggestions please? I'm totally lost here.
I can post the JSP here, if anybody is interested in seeing this scenario (and then explain it to me )
I think the line before "End" is getting printed and its just blank, which is making her feel tis not getting printed(test this by initializing "str" as something other than blank). Her html form is not submitting properly and control is not going into while loop as her Enumerator is empty.
If I become filthy rich, I'll sponsor research for painless dental treatment at Harvard Medical School. Thats why,I'm learning Java.I have 32 teeth, 22 are man made.
Joined: Mar 11, 2007
Here's the JSP code I was trying. I know this is not proper way, but I was just doing some R&D with that link there and got this unexpected output. Without that link, everything will work fine. With that link, two requests go to the servlet, one having some request parameters, and the other without any. Correct me if I'm wrong.