Here is the code that it is being thrown on alledgedly..... String toField = request.getParameter("to"); String fromField = request.getParameter("from"); String msgField = request.getParameter("msgs"); String empty = ""; int count;
Hi. Well, first - it is easier to read if you use the tags. Now, regarding your question - sometimes the jvm will not point at the correct line of the exception. this happens sometimes when you change the source, recompile and fail - the jvm will use the old class, but your source has the lines all mixed up. Did you try it with a debugger? Also, The line where the exception is thrown is probably not too far away from where the jvm points. Try SOP the references of the arrays you use there. Nimo.
Himanshu Pathak
Greenhorn
Joined: Apr 26, 2004
Posts: 9
posted
0
hi, shouldn't you be doing
ron mccarthy
Greenhorn
Joined: Apr 29, 2004
Posts: 17
posted
0
Sorry I am new to the forum and I didnt know about the [CODE] tags, so yeah anyway I didnt try a debugger yet, but I did SOP at the top of the code and it was getting so far and then throwing the exception before it got here *: [ edited to fix tags -ds ] [ April 29, 2004: Message edited by: Dirk Schreckmann ]
Brian Pipa
Ranch Hand
Joined: Sep 29, 2003
Posts: 299
posted
0
toField.equals(null) should be toField==null as should all of those comparisons (as a previous poster said) Brian
Ok. Now I get it - sorry for before. you can not do
this will only work if your string is not null. If you try to do it on a null string - you get the NullPointerException. What you should test is if (s==null) Nimo. [ April 29, 2004: Message edited by: C. Nimo ]
ron mccarthy
Greenhorn
Joined: Apr 29, 2004
Posts: 17
posted
0
Thanks a million.......sorry for before
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.