Is this a bug??? or I am crazy (any help?)

this is the result of my brainstorming,
[index.html]
<html>
<head>
<title>test code</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</head>
<body bgcolor="#FFFFFF">
<img src="images/logo.jpg" width="640" height="80">
<form method="post" action="response2.jsp">
<table width="80%" border="0" cellpadding = "4" >
<tr>
<td>
<p class="query">this is the text</p>
<p>
<textarea name="inputText" cols="60" rows="7" class="form">
actg
agtc
ccag
</textarea>
</p>
</td>
</tr>
<tr>
<td>
<p>
<p>
<input type="submit" name="submit"
value="I'll see what I can do" class="query">
<input type="reset" name="reset"
value="I have changed my mind" class="query">
</td>
</tr>
</table>
</form>
</body>
</html>
[response.jsp]
<%@page import="MyLib.util.*" %>
<html>
<head>
<title>
Result of the test
</title>
<head>
<body>
<pre>
<%
String inputText = request.getParameter("inputText");
if(inputText==null){
out.println("Why don't you try to input an text?");
out.println("This is my response<br>"+inputText);
inputText=inputText.trim();
out.println("trying to do something else");
int b=MyString.countChar(inputText,"\n");
out.println(b);
// int c=MyString.countChar2(inputText,"\n");
// out.println(c);
%>
</pre>
</body>
<html>
this produce...:
This is my response
actg
agtc
ccag
trying to do something else
2
but if I uncomment the two lines with // I get
<%@page import="MyLib.util.*" %>
<html>
<head>
<title>
Result of the test
</title>
<head>
<body>
<pre>
<%
String inputText = request.getParameter("inputText");
if(inputText==null){
out.println("Why don't you try to input an text?");
out.println("This is my response<br>"+inputText);
inputText=inputText.trim();
out.println("trying to do something else");
int b=MyString.countChar(inputText,"\n");
out.println(b);
int c=MyString.countChar2(inputText,"\n");
out.println(c);
%>
</pre>
</body>
<html>
I get
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: countChar2
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
     at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
     at java.lang.Thread.run(Thread.java:536)
root cause
javax.servlet.ServletException: countChar2
     at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
     at org.apache.jsp.response2_jsp._jspService(response2_jsp.java:78)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
     at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
     at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
     at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
     at java.lang.Thread.run(Thread.java:536)
Apache Tomcat/4.1.18
but these two methods are the same!!!!!:
public static int countChar2(String s,String c)throws Exception{
int counter=0;
// split the string into chars
String[] split=getChars(s);
// walk the splitted String
for(int i=0;i<split.length;i++){
// if the char is the same
// on the string that the char
// we are looking for add one
// to the counter
if(split.equals(c)){
counter++;
return counter;
* take a String and a letter on this string and count the number
* of times you can find this character on the string
* return the number of ocurrences
* ex.
* s string to walk
* c character to find on the string
public static int countChar(String s,String c)throws Exception{
int counter=0;
// split the string into chars
String[] split=getChars(s);
// walk the splitted String
for(int i=0;i<split.length;i++){
// if the char is the same
// on the string that the char
// we are looking for add one
// to the counter
if(split[i].equals(c)){
counter++;
return counter;
what Am doing wrong?????
Thanks for your time
Pedro

You could try these.
A.
1. Recompile your MyLib.util package which contains the countChar2 and countChar functions.
2. Restart the server.
B.
1. Rewrite the functions countChar2 and countChar to throw meaningful exceptions rather than Exception.
2. Compile the MyLib.util package in debug mode
javac -g <source files>
Maybe you will get a decent stack trace this time!
Hope that helps!
Manoj
PS: I would strongly suggest NOT doing two things
1. throws Exception
2. catch( Exception e )
// Do nothing at all...

Similar Messages

  • I used to be able to download files from the Harddrive of my Sony Handycam, but now it won't let me import them while going through "log and transfer."  I have tried to update my settings, but this doesn't seem to work.  Any help would be much appreciated

    I used to be able to download files from the Harddrive of my Sony Handycam, but now it won't let me import them while going through "log and transfer."  I have tried to update my settings, but this doesn't seem to work.  Any help would be much appreciated

    Hard Drive:  The Hard Drive is on my camera (Sony Handycam)
    Just needed some info on what is going on with your particular system.
    Knowing the exact camera model will also assist us.
    If this camera is standard AVCHD you should be able to connect with USB to Mac with FCE open and use Log and Transfer without all the fiddling around converting etc.
    What FCE does during ingest is convert files to AIC. (Apple Intermediate Codec)
    FCE cannot read the individual files in the BDMV folder, that's why all the converting is required when you use that method.
    BTW: regards formatting drives/cards/memory on cameras; it is wise to use the actual device to format rather than a computer. This is a prime cause of read/write goof ups with solid state media. This applies to still or video cameras.
    Keeping the COMPLETE card/memory structure in tact is vital for successful transfers.
    Try here for some trouble shooting tips:
    https://discussions.apple.com/message/12682263#12682263
    Al

  • In Word I want to bring the color box out as a separate box in the screen.  I used to could do this, but I no longer can.  Any help?

    In Word I want to bring the color box out as a separate box in the screen.  I used to could do this, but I no longer can.  Any help?

    you cannot create folders for photos on the iPod Touch. you must currently do it on a computer by syncing the iPod with a photo program, and creating folders within that program and syncing them over. kinda stupid, but hopefully they'll fix it in an update soon.

  • When trying to copy and paste on my MAC using firefox, I keep coming across a message "your browser security settings don't permit the editor to automatically execute pasting operations". This only happens with firfox, not Safari. any help??

    When trying to copy and paste on my MAC using firefox, I keep coming across a message "your browser security settings don't permit the editor to automatically execute pasting operations". This only happens with firefox, not Safari. any help??

    See:<br />
    http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard
    https://addons.mozilla.org/firefox/addon/852 - AllowClipboard Helper

  • I can't update Fiefox since update 10.o1 or 10.02. Every time I try to I get the same message, "7 - ZIP File is missing" I don't know how or where to correct this problem. I'd really appreciate any help that corrects this problem. Thanks sovery much,

    Missing "7-Zip File"
    Hello,
    I haven't been able to update Firefox since 10.01 or 10.02 because every time I try I get the same message the "7-ZIP File" is missing. Then the update fails. I've submitted this problem to Mozilla Firefox and, got an immediate reply of " they are researching your problem".
    Well, you can tell how long that has been. Is there anything I can do, or any where I can go to get the file I need?
    Any constructive help would be very much appreciated! I'm not sure If I'll ever be able to find where this is located. But I do appreciate help just the same.

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox.<br />
    Disable your anti-virus software temporarily to see if that makes installing work.
    Download a fresh Firefox copy and save the file to the desktop.
    *Firefox 11.0.x: http://www.mozilla.org/en-US/firefox/all.html
    Uninstall your current Firefox version, if possible.
    *Do NOT remove personal data when you uninstall the current version or you lose your bookmarks and other data because all profile folders will be removed.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    *It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    *http://kb.mozillazine.org/Uninstalling_Firefox
    Your bookmarks and other profile data are stored elsewhere in the Firefox Profile Folder and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Profile_backup
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

  • I purchased CS6 2 years ago (or more) I now keep being asked to register, I also find Bridge is running slow in building the cache is this two problems or are they interrelated  - any help please.

    Hello could anyone advise me please:
    I purchased CS6 Student edition approx 2 years ago, and I have been using it pretty much on a daily basis.  Now it has suddenly started prompting me to register the software because the trial has ended. I did think about uninstalling and reinstalling but thought against this in view of the fact that CS6 is no longer available for purchase.
    I am also having problems with the speed of Bridge in building the cache it seems to take for ever - about 2 sec per image.
    Any help would be much appreciated.

    Sign in, activation, or connection errors | CC, CS6, CS5.5
    And for the Bridge cache simply flush it from the Bridge prefs and rebuild it - after doing disk maintenance liek defragmenting your drives.
    Mylenium

  • Cannot open RAW in CS3. This must be a common problem. Any help please?

    Good day folks
    Anyone got any help with opening files in RAW ? I'm using CS3 and my cam is a 5D mark 2. Keep getting the same generic message from adobe " could not complete your request because this is not the right type of document "  aaarrrgghhhhhh.......
    Cheers
    G

    Thanks for the reply dude but i've tried these options
    No, you haven't -- at least not Solution 4.
    however CS3 seems to only support version 4.6 ???
    Correct.
    Which means you need to follow Solution 4 described on this page:
    http://kb2.adobe.com/cps/407/kb407110.html
    Please read it and follow its steps very carefully.
    Eric

  • I need recovery a photos that I losse from one comparting secuence that I have This is posible?? Thanks for any help.

    I need recovery a photos that I losse from one comparting secuence that I have This is posible?? Thanks for any help

    Hello:
    The password should be your administrator password.
    Barry

  • Is this a bug or am I crazy?

    Our customer doesn't like the standard DateField display so I've wrapped TextInput and am trying to validate the text. I wrote a FocusOut event handler and can get the entered text, but I'm having trouble converting it to a date. I could do it the hard way and write my own, but I found DateField.stringToDate( date, format). Since it excepts the format to convert from, you would think (at least I do) that I could put "MM/YYYY" in the format field and pass it a string of "06/2005" and have it create a Date field. stringToDate("06/01/2006", "MM/DD/YYYY") works, but that isn't what I need...of course.
    Am I missing something?
    Thanks
    Bill

    Hi Bill. Try posting your question to the Flex SDK forum. This isn't a BlazeDS issue and I don't know the answer. Thanks.
    -Alex

  • When closing 2 windows(with multiple tabs each), system restore does not properly restore the second window's tabs. Is this a bug in the new update/any ideas to fix?

    I regularly use 2 windows with multiple tabs each and session restore would work to get them all back, but after this latest update the second window does not restore properly, with the first tab not visible on top(only in drop down menu) and the add a tab button now on the left(instead of right). The add a tab button is not really concerning other than it indicates other problems with the tabs on tab of the 2nd window. Not having the 1st tab visible is frustrating, because I can not move it or as easily navigate. Also, the tabs on top of the 2nd window that are visible no longer have the "x" to close visible unless that tab is selected. I'm assuming this is a problem with the new release/update, since this is the first time I've ever encountered the problem, and I've shut down and restored Firefox a few times to make sure this was a recurring problem and not a one-time deal. Any ideas on how to fix would be welcome(other than perhaps cramming my tabs onto one window or sucking it up XD).

    Hi,
    You can try to '''Reset toolbars and controls:''' and '''Make Changes and Restart''' in the [https://support.mozilla.org/en-US/kb/Safe%20Mode Safe Mode] start screen.
    If the problem persists, please try a [https://support.mozilla.org/en-US/kb/Managing-profiles?s=profile&r=0&e=sph&as=s new profile]. You can later copy [https://support.mozilla.org/en-US/kb/Backing%20up%20your%20information?s=backup&r=1&e=sph&as=s needed data] from the old profile to this.
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder & Files]

  • I am using ios 7 on the iPad 4.. The OS restarts suddenly when I open the music app and and select a radio station.. Is this a bug?.. Or any updates coming to resolve this?...

    Rare restart problem when I play radio from music app..

    cor-el:
    Thanks for the suggestion. I already tried rebuilding that file as well and it didn't help. Also, all the changes I make are retained from session to session in terms of placement and what's shown/hidden, it's just the contents of the bookmark toolbar that disappear. The toolbar is still there and I can drag things to it, but again, they disappear after restarting the browser.
    edit (clarification):
    When I say the items disappear, I mean they are no longer visible or clickable. They are still there in the sense that they appear in the Bookmark menu and if I move the Bookmark Toolbar from its own toolbar into the space next to the Menu Toolbar, they are then shown.

  • I have the iPod Touch 4th Gen, my issue is my iPod wont connect to wifi attall. The signal bars come up full, but it wont let me log on and it says fbapierrordoman. how do i fix this? whys it doing it? any help is much appreciated, THANK YOU

    ok, so ios7 recently came out, but apparently its not available on ipod 4th gen? thats fine, but i really need to connect to the internet and i dont know why it wont work? someone please help! thank you ive reset my network settings, left it off over night, restarted and wiped the whole ipod, still nothing! anything is aprreciated, thanks x

    Does the iOS device connect to other networks?
    Does the iOS device see the network?
    Any error messages?
    Do other devices now connect?
    Did the iOS device connect before?
    Try the following to rule out a software problem:                 
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on the router
    - Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - Wi-Fi: Unable to connect to an 802.11n Wi-Fi network
    - iOS: Recommended settings for Wi-Fi routers and access points
    - Restore from backup. (Is this wiping) See:
    iOS: How to back up
    - Restore to factory settings/new iOS device. (you mayhave done this by wiping)
    If still problem make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar

  • Have an imac with snow leopard and Firefox 3.6.13. On a prompt downloaded and installed Firefox 3.6.16. Firefox opening Screen still shows 3.6.13. Have done this twice with the same result. Any help?

    Imac, processor Intel core i3, Mac OS X version 3.6.6.
    On opening Firefox 3.6.13 firefox screen suggests downloading latest version. Have downloaded and installed Firefox 3.6.15 (sorry typing error in previous entry). On opening Firefox, screen still shows 3.6.13 as the operating version although "Get info" shows that updating has been done. Thinking I may have made a mistake I have done this twice with the same result. The screen is still telling me to update.
    Not really a problem using Firefox but I would like to know which version I am using.

    Your user agent in the More system details list shows that you have the Firefox 3.6.15 version
    *Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
    Where do you see "3.6.13" ?

  • Hi There, my itunes no longer opens.  It quits unexpectedly for some reason when I try to login.  I have tried updating my itunes and this has not solved the problem.  Any help would be appreciated, thanks

    Hi There,
    My itunes quits unexpectedly when I try to login.  I cannot even open the application, not sure why this is happening.  Have upgraded my itunes and this has not solved the problem either.  If anyone can help me out, that would be appreciated.  Thanks

    Hello balisurfergal,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    Mac OS X 10.6: If an application quits unexpectedly
    http://support.apple.com/kb/PH7044
    iTunes 10 for Mac: May quit unexpectedly on launch
    http://support.apple.com/kb/TS3494
    Have a nice day,
    Mario

  • HT1414 My phone powered off on it's own this morning, and will not restart. Any help?

    I replied to a text message this morning, put the phone in my shirt pocket. I went to use it again 2 mins later and it was completely non-responsive. I have tried all the tricks I know to restart it, but no success. I even went to my vehicle and plugged it in, hoping the charge would bring it to life, but still no.
    Is there an answer to turning my phone back on? Have never experienced this issue prior to download of the new OS.

    Hello kylega,
    We've an article that can help bring your iPhone back among the working.
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Cheers,
    Allen

Maybe you are looking for