What is the best way to display errors to users when using JSPs?

          Hello,
          Could someone suggest me the best way to display errors to users when using JSPs?
          Many thanks in advance.
          Rino
          

          Thanks for the code snippet!
          Rino
          "Deepak Vohra" <[email protected]> wrote:
          >
          >
          >The 'errorPage' attribute of the 'page' directive forwards uncaught run-time
          >exceptions
          >to an error processing page. For example:
          >
          ><%@ page errorPage="error.jsp" %>
          >
          >redirects the browser to the JSP page error.jsp if an uncaught exception
          >is encountered.
          >
          >
          >Within error.jsp, indicate that it is an error-processing page, via the
          >directive:
          >
          >
          >
          ><%@ page isErrorPage="true" %>
          >
          >The Throwable object describing the exception may be accessed within
          >the error
          >page via the 'exception' implicit object.
          >
          >
          ><% if (exception != null) { %>
          ><p> An exception was thrown: <b> <%= exception %>
          >
          ><p> With the following stack trace:
          ><pre>
          >
          ><%
          > ByteArrayOutputStream ostr = new ByteArrayOutputStream();
          > exception.printStackTrace(new PrintStream(ostr));
          > out.print(ostr);
          >%>
          ></pre>
          >
          >
          >
          >"Rino Srivastava" <[email protected]> wrote:
          >>
          >>Hello,
          >>
          >>Could someone suggest me the best way to display errors to users when
          >>using JSPs?
          >>
          >>Many thanks in advance.
          >>
          >>Rino
          >
          

Similar Messages

  • What is the best way to display a Interactive Report having 20 columns

    Hi,
    I am having a Interactive Report having many columns (around 20).
    What is the best way to display that report...by default we have to scroll it horizontally to see all the columns.
    I want to avoid Horizontally Scrolling.
    Thanks,
    Deepak

    Hello Deepak,
    You mean apart from using a smaller font size or a bigger monitor?
    You can think about combining / wrapping columns (so more data in one column).
    Or hide some less important data and show that only on demand.
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • What is the best way to open emails and attachments without using wifi?

    For I-phone and I-pad, what is the best way to open emails and attachments without using wifi?  I turned off wifi in my settings but my boss thinks there may be another way and a better way to use something else instead of wifi.  Any help would be appreciated!  Thank you!

    Thanks!  That is a very good question you post.  My boss asked me that and I am assuming that he is having issues with using wifi wherever he is at.  My boss is the kind of person that when he asks something you look into it and ask him no questions...he's the only one asking questions!  But thank you for your response I will tell him the information you told me and hopefully that will help!

  • Hi, what's the best way to replace IMAC 27'' glass when broken (latest Imac generation from end 2012) ?  Thanks,

    Hi, what's the best way to replace IMAC 27'' glass when broken (latest Imac generation from end 2012) ?  Thanks,

    Not sure about the 2012 models but the 2010 ones can be removed in seconds, using a suction cup on the top corner. I use my tomtom to lift it away. It is attached by magnets.
    Hope this helps.

  • I need to organize medical photos.  They are pre-op and post-op photos.  What is the best way to organize them.  should I use iphoto or is that too much trouble.

    I need to organize medical photos.  They are pre-op and post-op photos.  What is the best way to organize them?  should I use iphoto or is that too much trouble? Since they occur on different days, organizing by event does not seem appropriate.  Also, organizing by face is not always possible as some are close up photos of an individual eye.  Surely, this has been done before, and I don't want to spin my wheels reinventing this.

    Who can tell with that amount of information to work with?
    iPhoto is not limited to Events or Faces as organizational tools - Albums, Keywords, various forms of metadata can be leveraged for use as well, and these are often more flexible. Really it's up to you to look at the tools available and see if they suit your usage scenario.

  • What is the Best Way to Display a ClobDomain Field on a jspx Page?

    I have a ClobDomain field in my table that I need to display in my jspx form. What is the best way to go about this? I can't just drag and drop the field from my View and place it onto the form.
    Thanks.

    Apply a swap image behavior to the image. DO NOT ENABLE THE
    AUTOMATIC
    RESTORE.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "BillC-Bos" <[email protected]> wrote in
    message
    news:gp0utj$rmk$[email protected]..
    >I have what I imagine is a simple challenge but I after
    reviewing the forum
    >and
    > the DW workspace it seems that the technique I might try
    in GoLive are not
    > really the best way to go.
    >
    > I have a small graphic that when clicked should change
    to a different
    > graphic
    > to indivate that the site's visitor already clicked that
    graphic (which
    > links
    > to a detail page). There are many detail pages and the
    solution to
    > providing
    > navigation from one main page drastically limits the
    amount of information
    > provided on the "master" page making it necessary to
    provide some way to
    > indicate to the visitor that they already selected that
    option - so they
    > can
    > either avoid that link or return to it if they wish.
    >
    > So the "master" page will show an image (icon) that will
    change once the
    > visitor has clicked it. I am not sure how best to make
    this happen and can
    > use
    > some help or guidance. Thanks in advance for you help.
    Be well.
    >
    > Bill C
    >

  • What's the best way of displaying output in other VI ?

    For example, in a sub-vi I continuously acquire a motor position, and I want the position value to be displayed simultaneously in a numerical indicator or waveform in the main vi.
    I know there are lots of ways to implement this easily, but I just want to know what's the best way which use lest computer resources, say memory....
    Can control reference be used effectively for this?
    Thank you for your suggestion.
    Dejun

    here is an example (in LV7.0) of what Dennis is refering to.
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion
    Attachments:
    ctrl reference folder.zip ‏7 KB

  • What is the best way to display text?

    Hi,
    I am developing a full screen presentation. I like to know which is the best way to display text with different styles and fonts.
    When i use JLabel, i have to use HTML. But the presentation is not good as it does not have anti-alias property. Also i want the background to be seen behind the text. Note that all the text in a paragraph is not of same style. I want some words to be in different color and style.
    Thanks,
    Mathan

    It works alos with JTextPane:
    Try this :
    import java.awt.*;
    import javax.swing.*;
    public class MyTextPane extends JTextPane  {
         public void paintComponent(Graphics g) {
              Graphics2D g2d = (Graphics2D)g;          
              g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);          
              super.paintComponent(g2d);
         public static void main(String[] args) {
              JFrame f = new JFrame("test");
              f.getContentPane().add(new JScrollPane(new MyTextPane()));
              f.setBounds(200,200,300,400);
              f.setVisible(true);
    }Denis

  • What is the best way to display image ??

    hi my questions is unusual, there are so many ways to display images.
    I m developing image processing s/w can any one suggest me which would be the best way to display image on which i can perform image operations.
    like in JPanel, icon, trhough paint() or anything else...
    thank you..In advance

    hi man... i think so imaging is better with JAI(Java Advanced Imaging) .... is perfect for display in jcomponent like JPanel or JLabel, you have to replace the paintComponent().
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Rectangle;
    import java.awt.geom.AffineTransform;
    import javax.media.jai.PlanarImage;
    import javax.swing.JComponent;
    class ImagePanel extends JComponent {
         protected PlanarImage image1;
         protected AffineTransform atx= new AffineTransform();
         protected int width, heigth;
         public ImagePanel() {
         public ImagePanel(PlanarImage i) {
              image1= i;
              width= i.getWidth();
              heigth= i.getHeight();
         public void paintComponent(Graphics gc) {
              Graphics2D g= (Graphics2D)gc;
              Rectangle rect= this.getBounds();
              if ((width != rect.width) || (heigth != rect.height)) {
                   double magx= rect.width / (double)width;
                   double magy= rect.height / (double)heigth;
                   atx.setToScale(magx, magy);
              if (image1 != null)
                   g.drawRenderedImage(image1, atx);
    if you need more info, ask about JAI api and docs

  • What's the best way to check whether a user is logged in or not?

    I have a question about basic session handling.
    I'm running Tomcat 5.0.30 and have a web application where users can register with a username and password, and then log into a "member site".
    What is the best way of making sure that a user actually has logged in or not?
    What I've done in previous applications I've made is that I've just put a simple variable into the users session after he has successfully entered his password (i.e. Boolean loggedIn=true). Then I just test if this flag is true to grant him access to the member site. Is that a smart way of doing it?
    Are there any libraries I can use which handles sessions for me in a secure way?
    All comments and suggestions are appreciated!

    Maintain a flag using session attributes it to one when the user is logs in set it to value.... and change set it zero or invalidate that session... when the user is logged out...
    use something like this while user had logged in
    session.setAttribute("flag",<unique_number>);
    for checking whether the user had logged in or not...
    if(Integer.parseInt(session.getAttribute("flag").toString())=!<unique_number>){
    out.println("The session had expired");
    out.close();
    }

  • What is the best way to organize LabVIEW VIs to be used with TestStand?

    I'm using LabVIEW 8.6 with TestStand 4.1.1 and I'm trying to organize the VIs to later deploy them to a production PC. So, I organized them into a LV project and built a LLB with the "Source Distribution Tool". (Destination type: LLB)
    Some VIs in the LLB use the "Call Library Function" (user32.dll) to simulate keyboard events. But, when any of these VIs is called from TS, LabVIEW is suddenly terminated. When these same VIs are not in the LLB and are called from TS they do not have any problem.
    Is the LLB the best way to organize VIs to be used with TestStand? If so, What could I be doing wrong?
    I appreciate your help.
    H.P.
    Mfg. Test Engineer
    Certified LabVIEW Associate Developer
    Attachments:
    LabVIEW Problem.JPG ‏28 KB

    Hi Ray,
    I really appreciate your intention to help, but I believe I solved the problem already. However I still have some questions.
    The problem was that when I built the LLB the configuration of the "Call Library Function" changed. When the LLB is built it is also created a Support Directory named "data" that contains some dependencies including a new copy of the user32.dll. The "Library name or path" field in the "Call Library Function" changed to be linked to a new Dependency Path. ( ...\data\user32.dll.)
    What I did was select "Specify path on diagram" and create a path-constant ("C:\WINDOWS\system32\user32.dll"), so the "Call Library Function" will be always linked to the original user32.dll.
    I still don't know why the "Call Library Function doesn't work with the user32.dll copy in the New Dependency Path. And I'm not sure if the LLB is the best way to organize VIs to be used with TestStand.
    Do you know why?
    Thank you,
    H.P.
    Mfg. Test Engineer
    Certified LabVIEW Associate Developer

  • What is the best way of exporting artboards from Illustrator for use in InDesign?

    Hi,
    I have an artboard in Illustrator CS6 which contains some text with a scribble effect applied to it.  I would like to use this text in an InDesign CS6 document.  I am wondering what the best way of exporting/importing this artboard would be so that I get the best quality.
    Thanks,
    Nick

    Save as an AI file with PDF compatibility enabled and the Document Raster Effects set to "High"; then use File>Place in ID.

  • What is the best way to make google earth style maps using Creative cloud

    I work in News.  I am trying to come up with the best way to create a google style map for our news stories.  I want to create a map that I can highlight certain counties and pinpoint certain spots on the map.  For example cities and landmarks.  So far we have been using our weather graphics system to accomplish making maps, or we have used google earth to make maps too.  From what I understand there would be a lot of leg work in the process of making a project that has a map database with any possible info I would need to make a map.  I need to be able to output the graphic in a Quicktime movie format, or at least a JPEG.  This would help us put the map on air for broadcasts.  Any suggestions, thoughts, advice on where to begin?  Am I wasting time?  Should I stick to google maps/earth?
    -Newsie WBBJ

    Don't leave it as an LOP file. FM will overwrite the contents every time. You may still have a ".backup.fm" version of this that will have your original table.
    Also, the approach mentioned should be the very last step when publishing the book, not something that you're continuously updating.

  • What's the best way to store test parameters for future use?

    I'm creating a test stand that will perform various "standard" tests. Each of the tests has it's own setpoints (integer numbers) as well as some string values that are stored in the log file with the data.
    What is the easiest way to store these setpoints and strings so that I can pull them into the VI in the future, say by selecting a test type from a ring control, etc.?
    I would also like to make this dynamic so that new test types can be stored from the vi. (i.e. I don't want to have to hard code all the future tests and their parameters).

    I like INI files, too. If you are looking for an easy way to read and write your parameters to INI, take a look at the Variant Configuration File IO Library of the OpenG Toolkit.

  • What is the best way to share music wirelessy at home using a external hard disk?

    We would like to find the best way we can access wirelessly our music track stored on a external hard disk at home?  We would it to be able to access them by using MAC, PCs, iPads, Android and iphones.

    Personally, I use MobileMe and let my family watch the movies on line. It is easy to share this way. I share the movie in Large (960x540) or Medium to iTunes. Then I share to Mobile Me.
    For personal viewing, I use the Apple TV.
    You can also burn a data DVD of your finished movie, and let them copy the file to iTunes from their data DVD.
    You can upload the movie to other video sharing services such as YouTube or Vimeo.
    You can burn a blu-ray disk if you have Toast and a BluRay burner. You can burn a short movie to regular DVD media using Toast and a regular DVD burner that is playable on most BluRay Players.

Maybe you are looking for

  • Photoshop CS4 crash on startup on Snow Leopard 10.6.2

    Hello, I can't run photoshop cs4 on my macbook: the dock icon jumps for a second and then disappears. I've downloaded the latest photoshop trial, installed it and it still crashes upon startup. Here are the log messages from Console: 3/28/10 2:14:57

  • I am trying to setup bootcamp on my MacBook Air.  Network diagnostics doesn't believe I'm connected to the internet... but I am!!???

    I am trying to setup bootcamp on my MacBook Air.  I have a wifi internet connection which works fine in Safari etc. However, when I get to the point of downloading the windows install files I am told the network is not connected, but it is! I have a

  • How to control RS232 Interface through LABView?

    Does LABView have the ability to control RS232 Interface? If it does, what version of LABView has this capability? The LABView versions that we have in the company are 7.2 and 8.1 only. The operating systems that we have are Windows and Linux.

  • SMQ2 - Status: RUNNING forever?

    Team, We are presently processing a lot of messages – all asyn. In SMQ2, we can see all (XBTI) inbound queue messages and (XBTO) outbound queues messages. At some point we get CCMS errors on queues saying that the queue are blocked with the status RU

  • Error while running MOPZ

    H everyone I am trying to do the necessary calculation to get SPS 11 on PI 731 SPS6. In MOPZ, I am getting the error: "It is required to select only one software component version for XI 3RD PARTY". Does anyone know what this message is related to? T