Servlet not showing System.out.prints!??!?

R

ron1972

I've hit this forwards and backwards and can't figure this out.

I was getting all kinds of erroneous results and to eliminate the
possibilty of my Trace class having problems I resorted to using some
System.out statements. The results were even stranger:

My session object was acting buggy in my jsp page so I decided to call
it in the servlet just to see if I was still getting errors...

private void find
{
....
ArrayList al = (ArrayList)session.getAttribute("retailLogin");
System.out.println("TEST");
System.out.println("getAttribute: " + al.size());
...
}

Here is the output:

TEST

The second line isn't printing! In fact I've tried getting the
al.size() info through a couple of ways, neither work.

Now get this part: This only happens the first few times I run the
app. If I try 2 times it will start working:

TEST
AL SIZE FROM JSP: 1

the 3rd time I ran it *NONE* of the System.outs worked throughout the
entire servlet

huh?!?!
Has anyone had similar problem? Any solutions?
Much appreciated if anyone has any advice where to even start looking
for a solution.
Thanks
 
R

ron1972

Actually, I changed my submit type in the jsp file from <INPUT
type="submit" ... to a link and it works -huh?!? That's an interesting
bit of info.

<a href="javascript:findByEmail()">Email</a> - works!

<input type="submit" onClick="javascript:findByEmail()" value="Email" >
- submits but the servlet is having problems!

This doesn't make much sense because they are both calling the same
method. And why would a submit button affect System.out.print not
printing?

hmmm..... (still working on it)
 
V

Viator

Your problem seems to be in your html code. Please quote the javascript
and the form tag code also.

Amit :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top