Question with " c:catch ".

<c:catch var="errorMessage">
<%
int[] i = new int[2];
i[2] =2;
%>
</c:catch>
${errorMessage}
<%
// errorMessage.printStackTrace();
%>
I use the "${errorMessage}" to print the exception,it works.
But why i use "errorMessage.printStackTrace();"
Jsp give out:
C:\ApacheGroup\Tomcat5.0\work\Catalina\localhost\test\org\apache\jsp\test_jsp.java:250: cannot find symbol
symbol : variable errorMessage
location: class org.apache.jsp.test_jsp
errorMessage.printStackTrace();
^

JSTL variables are not the same as scriptlet variables.
JSTL variables are stored in the attributes.
You can retrieve the error into a variable like this:
Exception e = (Exception) pageContext.getAttribute("errorMessage");
e.printStackTrace();Also check out this thread:
http://forum.java.sun.com/thread.jspa?threadID=645936&messageID=3804592#3804592
Cheers,
evnafets

Similar Messages

  • Dreaded Question Mark... But with a Catch!

    The other night my mid 2009 MBP froze. I got the pinwheel and it was unresponsive. I gave it 10 minutes to come to, but it never did. I held the power button to turn it off, and then turned it back on. After a couple of minutes of blank white screen, I got the blinking question mark/folder. After searching the forums, I tried everything. CMD+R, the option key, etc. Nothing worked. The biiiig problem was that my last TM backup was corrupted, and I couldn't be bothered to spend the time doing a fresh backup. Well I pulled my HD, put it in an external enclosure and booted from it. Guess what? It worked perfectly. I was able to do a fresh TM backup, and used the computer this way to surf the internet today. I thought maybe it was some kind of fluke and put the HD back in my MBP. I checked the sata cable where it meets the motherboard, and it was fine. I booted it up, and I'm back to the question mark. Why would my HD work as an external, but not as an internal?

    Kris,
    Sorry. Someone else asked this question with almost exactly the same wording, including the "with a catch." Shop around a little, you should be able to find it for less than $60.
    http://www.powerbookmedic.com/Hard-Drive-Cable-w--IR-Sensor-for-MacBook-Pro-13-U nibody-p-17336.html
    Make sure this is right for your machine. I just looked for a 13" mid-2009.

  • How do I reset my apple id security question with out a rescue email

    How do I reset my apple id security question with out a rescue email?

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (101013)

  • Basic questions with respect to ABAP WebDynpro Application

    Hi All,
    I have two basic questions with respect to an ABAP WebDynpro application :
    a) If an ABAP WebDynpro application has been developed, how could it be made available to the end user?
    b) Can an ABAP WebDynpro application be developed in ECC or is it only applicable for version 4.6c?
    Thanks & Regards,
    Sushanth Hulkod

    Sushanth Hulkod wrote:
    > a) If an ABAP WebDynpro application has been developed, how could it be made available to the end user?
    >
    > b) Can an ABAP WebDynpro application be developed in ECC or is it only applicable for version 4.6c?
    a) If an ABAP WebDynpro application has been developed, how could it be made available to the end user?
    Answer - By providing direct link of the WD application created in SE80, creating iView for webdynpro abap application in the portal environment and  NWBC environment
    b) Can an ABAP WebDynpro application be developed in ECC or is it only applicable for version 4.6c?
    Answer - Yes it can be developed in ECC. Webdynpro ABAP is introduced in NW 2004s (SAP NetWeaver 7.0 or ECC 6.0)
    Thanks,
    Chandra

  • I cannot purchase anything at the itunes store because I am being ask for my security questions, but I don't remember them. How do you change you security questions with out knowing them?

    I cannot purchase anything at the itunes store because I am being ask for my security questions, but I don't remember the answers. I tried going to appleied.apple.com but I won't allow me to change my security answerswithout answering the original questions. How do you change you security questions with out knowing them? I need help.

    Welcome to the Apple Community.
    Start here, and reset your security questions, you will receive an email to your rescue address, use the link in the email and reset your security questions.
    If that doesn't help or you don't have a rescue address, you might try contacting Apple through iTunes Store Support

  • How do you resets your apple I'd security question with out calling apple

    How do you resets your apple I'd security question with out calling apple

    See Kappy's great User Tips.
    See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities https://discussions.apple.com/docs/DOC-4551
    Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/HT5312
    Send Apple an email request for help at: Apple - Support - iTunes Store - Contact Us http://www.apple.com/emea/support/itunes/contact.html
    Call Apple Support in your country: Customer Service: Contacting Apple for support and service http://support.apple.com/kb/HE57
     Cheers, Tom

  • Is it possible try  with out catch but with finally

    can any body tell me that try with out catch but with finally is possible or not and also if I dont want to execute the finally block but i want to execute the try and catch then what can i do for that.

    ... and also if I dont want to
    execute the finally block but i want to execute the
    try and catch then what can i do for that.Obviously the best way then would be to not have the finally block at all.
    But if you insist then add a boolean flag. Set it in the catch and test it in the finally block.

  • Surround With Try/Catch : comments issue

    hi
    Please consider this code:
         public static void main(String[] pArguments)
              FileInputStream vFileInputStream = new FileInputStream("someFile.txt");
              // some comments, e.g. several lines of commented code (that might be uncommented later)
         }It is possible to have JDeveloper "Surround With Try/Catch" this, but that results in this code:
         public static void main(String[] pArguments)
              FileInputStream vFileInputStream;
              // some comments, e.g. several lines of commented code (that might be uncommented later)
              try
                   vFileInputStream = new FileInputStream("someFile.txt");
              catch (FileNotFoundException e)
                   // TODO
         }Note that the declaration is before the comments and the try block starts after the comments.
    Is this intentional behaviour? I would prefer to leave the comments where they are, after the (modified) code.
    many thanks
    Jan Vervecken

    Thanks for your reply John.
    I tried the right-click "Surround With..." > "try-catch" approach you suggest, and I get this code:
         public static void main(String[] pArguments)
              try
                   FileInputStream vFileInputStream = new FileInputStream("someFile.txt");
              catch (FileNotFoundException e)
              // some comments, e.g. several lines of commented code (that might be uncommented later)
    }Indeed, the try-block starts before the comments.
    There is another difference with this approach, the declaration is not separated from the assignment.
    Next ... I'll try to remember which approach give which result. :)
    regards
    Jan

  • I need some more interview question with answer on modeling,reporting.

    i need some more interview question with answer on modeling,reporting.

    Hi,
    You may find tons of topic about interview question. Please try to search forums before opening a post next time.Take a look at the link below.
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=bwinterviewquestions&adv=true&adv_sdn_all_sdn_author_name=
    Regards,
    ®

  • HT201303 Have forgotten my apple I'd security questions with respective answers

    Have forgotten my apple I'd security questions with respective answers

    Forgotten security questions - https://discussions.apple.com/message/18402551
    More involved forgotten question issues - https://discussions.apple.com/thread/3961813
    Frequently asked questions about Apple ID - http://support.apple.com/kb/HE37

  • Trying to teach self Java-question with arrays

    I have a question with arrays. I have a simple inventory program that I am writing(very simple). I have declared and created my array. Is this the time I should build a new class outside of my main in order to hold my array? I am still trying to sort through classes and when to create them. My thought is that because it is a hierarchy I should have a new class. For example, Albums is at the top and then there are specific types of albums, like TributeAlbum, PremiereAlbum, etc. Do I need a class for each of these? When I create the class, do I use the same name as the array?
    More info, just in case: My original class is AlbumInventory. I have created an array to hold 25 TributeAlbums which has 4 instance variables.
    Question 2: Why can I not refer to an album variable like TributeAlbums[0].itemNumber?
    Thanks in advance for your input.
    Denise

    I have a question with arrays. Okay.
    I have a simple
    inventory program that I am writing(very simple). I
    have declared and created my array. Is this the time
    I should build a new class outside of my main in
    order to hold my array? In an OO language classes are usually a good idea.
    I am still trying to sort
    through classes and when to create them. My thought
    is that because it is a hierarchy I should have a new
    class.This sounds a bit confused. You should have a new class when it is appropriate to do so.
    For example, Albums is at the top and then
    there are specific types of albums, like
    TributeAlbum, PremiereAlbum, etc. Do I need a class
    for each of these? Not sure. Why is the type not an attribute of the Album class? This (attribute) seems at first glance to be the way to do it.
    When I create the class, do I use
    the same name as the array?
    ? I am going to say no but I'm not following what you are really asking here.
    More info, just in case: My original class is
    AlbumInventory. I have created an array to hold 25
    TributeAlbums which has 4 instance variables.
    Can you please post some of your actual formatted code? It would also be helpful to know what the attributes for an Album are as you have them.

  • HT1911 I am not answering the security question with the answer APL wants.  What do I do?

    I am not answering the security question with the answers APL wants.  What do I need to do to get past the security questions to reset my password?

    Welcome to Apple Support Communities
    Hold Power and Home buttons for 10 seconds until your iPad restarts, and you will be able to use it again. After doing this, open Settings > iCloud > Storage & Backup, and make a manual backup

  • HT5576 E-mail to Kdnci Alveamcunnina change their security questions with Apple Can I change the email link Barsaalh change the email to the main email with Apple

      E-mail to Kdnci Alveamcunnina change their security questions with Apple Can I change the email link Barsaalh change the email to the main email with Apple

    Contact Apple and ask the account security team for assistance: http://support.apple.com/kb/HT5699.

  • Architecture/Design Question with best practices ?

    Architecture/Design Question with best practices ?
    Should I have separate webserver, weblogic for application and for IAM ?
    If yes than how this both will communicate, for example should I have webgate at both the server which will communicate each other?
    Any reference which help in deciding how to design and if I have separate weblogic one for application and one for IAM than how session management will occur etc
    How is general design happens in IAM Project ?
    Help Appreciated.

    The standard answer: it depends!
    From a technical point of view, it sounds better to use the same "midleware infrastructure", BUT then the challenge is to find the lastest weblogic version that is certified by both the IAM applications and the enterprise applications. This will pull down the version of weblogic, since the IAM application stack is certified with older version of weblogic.
    From a security point of view (access, availability): do you have the same security policy for the enterprise applications and the IAM applications (component of your security architecture)?
    From a organisation point of view: who is the owner of weblogic, enterprise applications and IAM applications. In one of my customer, application and infrastructure/security are in to different departments. Having a common weblogic domain didn't feet in the organization.
    My short answer would be: keep it separated, this will save you a lot of technical and political challenges.
    Didier.

  • How do I reset my security questions with out having to select a new apple id or a new password?

    How do I reset my secrit questions with out having to select a new apple id or a new password when I'm at the itunes store.

    You will be able to reset them via:
    appleid.apple.com
    If you do not know your password contact Apple's expresslane:
    expresslane.apple.com

Maybe you are looking for