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.
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 ]
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 ]