Could someone explain what's happening? (pretty long)

This post is similar to the one I have posted earlier. I was hoping someone could explain to me what really is going on in the server.
I have a page where I have a header, left menu, right menu, footer. These are inluded jsp files using the include directive. In the main body I check if the request for the page was a post, do some actions with my beans then redirect to another page. So basically my code looks something like this:
   if (request.getMethod().equalsIgnoreCase("POST")) {
      // do some stuff with my beans
     response.sendRedirect("OtherPage.jsp");
     return; )When I reach the redirect that''s when I get an error: Microsoft Internal error. If I take off the redirect everything works except my user is still left in hte same page. The error occurs while I'm still loading my left menu. My left menu is made up of 2 sections. The first one is the menu options which is generated through JSP, and the second half the links of the site which is plain HTML. So I did a little experimentation. First I tried using the jsp:forward instead of the redirect. Still no go. Then I tried cutting my left menu to the point where I usually get the error, that's the part of the links. So I took of the links in the left menu - the pure HTML part of the menu, and it worked. So I tried generating the links through JSP as well. I got the error again. After researching in the forums I tried increasing the buffer size. A suggestion I saw in previous posts with people with similar problems. I increased the buffer size to 9kb using the <%@ page buffer ="9" %>. It worked. I restored my left menu the way it was before, and thikn s worked fine.
What's bugging me is that my left menu is very simple. It's just has a small background image and some links. The main page is just a simple form as well. I really don't see why there is a need to increase the buffer size. Is my design flawed and inefficient? Or is the need to increase the buffer a common thing in web applications?
I was also thinking could it be that I'm trying to send another response while still processing the current response? I noticed in some sites they do not redirect, instead the just post a page and link to the page where the user has to go. Is my approach wrong? Are you allowed to redirect in the manner I have?
If my design is wrong, what are the other approaches in performing the preocedure? Are there other methods that are more efficient which do not require an increase of the buffer?
I was hoping someone could explain what really is happening behind the scene, so I can decide what is the best approach. This is my first time doing a web application and everything is still new. Hoping to learn from you gurus. Thanks in advance for all the help!

Hi,
Vicky I did uncheck the show user friendly errors and
I still get "an internal error has occured in the
Microsoft internal extensions". Unless I'm doing
something wrong. If it's any help I'm still using ie
5. But I can tell you this, the error is raised while
I'm still in the same page. The page posts to itself
do some validation then redirects. When I hit the
redirect That's when I get the error.It should have shown you the actual Exception,Ibelieve even after unchecking the show user friendly error the response is comming from cache...So now try this Tools-----General---DeleteFiles----AlloffLine files(Check this)....
Now try the response....
As regards to the buffer I tried increasing it to 9kb
instead of the default 8kb and everything worked fine.
Right now what I did with the page is keep the buffer
at it's default 8kb size, it shows some message and
provides a link to direct the user where to go. I
don't think it's a Java exception because I have an
error page that displays the exception and the stack,
and I don't get redirected there. I think it has
something to do with either the buffer and/or creating
another response. Of course I could be wrong, I'm
still trying to figure things out and me being a
newbie and all I'm not getting anywhere.Well,try to access the page directly I mean OtherPage,jsp,which comes from response.sendRedirect.......
Are you allowed to redirect while processing a
response in the first place?Of cource you can....Actually if we see logically once the response is generated at the server it can be send as it is being generated or it can be stored in buffer at the server and then send at one time so the I/o allocations are not held forf the longer times.The default for the jsp is buffered state which can hold 8k,what will happen if the response you are trying to write is more than 8k,it will flush the old storage(check this) can depend on container implementation also....
You get IllegalStateException if the the autoflush=false defined by you....
Can you post the code of the two files let me see.
regards vicky

Similar Messages

  • I have downloaded ios 5.1.1 and the wifi has stop working or it would stay on for less then 20min its only 9 months old can someone explain what is happening and if some know how to fix it

    I have downloaded ios 5.1.1 and the wifi has stop working or it would stay on for less then 20min its only 9 months old can someone explain what is happening and if some know how to fix it

    I have taken it back to the Apple store genius bar, but they say they don't see anything wrong. Well unless you use it all day and experience the problems when they happen, you wont see anything wrong. But there are lots wrong with it. But this would be the same store as I purchased the phone. And they backed up my old Iphone 4, but were not able to get anything to load back onto my new phone. So, I lost pretty much everything. But over time, some of my contacts have started showing up, although i am still missing over 800 of them.

  • Could someone explain what is wrong with this refind expression?

    Hi, could someone explain what is wrong with this refind expression
    faultCode:Server.Processing faultString:'Unable to invoke CFC - Malformed regular expression "^[0-2][0-9][/][0-1][0-2][/][1-2][0-9]{3}+$".'
    thanks

    ^[0-2][0-9][/][0-1][0-2][/][1-2][0-9]{3}$ works,
    thanks
    dates 12/12/2007matching

  • Could someone explain what is Object?

    Could someone explain what is Object? I have a little
    idea what is it, but not sure. Please give me some
    concret example. Thanks.

    An object is an Instance of a class. A class describes a uniwue entity with behaviors and attributes. For example you can consider your arm.
    public class Arm {
      /** How many hairs on the arm. */
      private int hairCount;  // <== This is an attribute
      /** This is a method to set the hairCount Variable.
       * We dont let the outside user set it directly because that would
       * create problems if we wanted to change its implementation to
       * use a float. In addition we might have logic in this setter to
       * prevent bad data.
      public void setHairCount(final int hairCount) {
        // this is a good example of logic in the set method that we dont
        // want the user to bypass.
        if (hairCount < 0) {
          throw new IllegalArgumentException();
        this.hairCount = hairCount; // <-- Note how we have to use this. to
                                    //     access the instance variable
                                    //     insead of the parameter.
      /** This is a method to move the arm.
       * This is behavior of the class. ONLY behavior pertaining to an arm
       * belongs in the arm class. For example, the method "sneeze" would
       * not belong here but be in the Nose class instead. You can see then
       * that each class describes an entity.
      public void move() {
        // code to move the arm.
    }We have only ONE class per type but we can have many objects. For example the description of an arm does not change no matter who'se arm it is. The data in the class changes but not the actual essence of the arm. So we instantiate two arms for every person (assuming they arent disabled). To instantiate is to create a new object like so.
    Arm myarm = new Arm(): This creates a new object that we can work with.
    So consider the old inteview question of, "What is the difference between a class and an object?" The answer is, "A class is a map or desription of an object; whereas an object is a descrite instance of a class."

  • Round Corners Effect Can someone explain what's happening?

    I just don't get what's going on here... I have this shape, a bent rectangle and I need it to have rounded corners. When I apply the effect Round Corners the shape is transformed to a completely diferent shape instead of just applying round corners on each corner. See image below. What am I doing wrong?

    Now you've done it!
    What's happening well I would say it was not working, which means it is a bug.
    However you can get it to work if you do it one of three ways.
    Draw your rectangle then give it a round corner effect or convert it to a round corner rectangle
    then give it either a warp effect or go to Object>Envelop Distort>Make with Warp and then expand.
    You can expand the warp effect as well.
    The third way is to make a round corner rectangle and either do the warp from the Object menu or do it as an effect.
    Otherwise the explanation for the result you see is it is a bug. It shouldn't happen.
    I think this might have been reported.

  • Can someone explain what has happened to the "Classic" Text Tones such as Glass, Tritone?  It was on my phone and last night they disappeared and I can find them anywhere.

    All of the sudden those Classic tones are gone and I can't access them anymore.  What happened to them?  Makes me really upset because the new tones are so long.

    > Go to settings
    > Go to sounds
    > Select ringtone
    > Scroll down and you will see a "Classic" option , Select it
    VOILA!!

  • Could someone explain what's going on?

    Every time I try to export from flash as a quicktime, in my exported file pieces of animation keep getting left behind as residue of some sort, and it's messing up the video. I've included a link to a youtube video of what I'm looking at, the video doesn't run real smoothly in youtube but I think it should be clear what the problem is. Thanks any help would be very much appreciated.
    http://www.youtube.com/watch?v=_YTOkyfSx40

    Also, I'm using CS4

  • Can someone explain what's happening with my music library?

    When I switched to my iPhone 5 I synced my music the way I always did through iTunes but when I checked the "on this iPhone" tab in iTunes it shows I have more songs on the iPhone than the Music tab does, many of which are grayed out and have a circle next to them. I tried un-syncing all the music which I understand is to remove all music from the device. After doing that it shows in the Music tab that nothing is syncing but in the "on this device" tab it still looks like this:
    So it's showing these 82 songs, plus the weird grayed out ones, even though they shouldn't be there.
    Can anyone tell me what's going on here, what that circle means, why it shows the songs even though they aren't there? And more importantly, can it be fixed? I tried resetting the device and everything early on and it didn't work, so maybe it's baked in at this point. Any help is appreciated.

    The dim ones are in iCloud, not in your library. If you don't want to see them go to the iTune View menu, "Hide items in the cloud"

  • Could someone explain what a smart object is and what they are used for?

    Keep seeing them mentioned, but no idea what they are or what the purpose is..

    http://help.adobe.com/en_US/photoshop/cs/using/WS41A5B796-6846-4e95-8459-95243441E126.html

  • RT - could someone explain why this happens

    Hi,
    If I'm editing hdv and it begins to stutter during playback. Why when I change the RT setting from safe to unlimited and back to safe again, does the timeline now play without the stutter?
    Thanks,
    Matt
    Yoga Maya Films - www.yogamayafilms.com
    The Film Producer's Podcast - www.yogamayafilms.com/podcast

    Hey Max,
    Thanks again. And sorry to continue a conversation that was solved, but...
    With ProRes being a much higher bit rate than HDV I would've expected it to be even worse. Are you transcoding to some other format to edit HDV?
    If that is making the problem go away, then that's cool, but would that mean that the HDV problem is in the processing power?
    The strange thing is that when my system starts to stutter and not be able to cope - even with things like Motion, but also with HDV in the timline - my CPU is only sitting at around 60%, there's lots of free RAM, but still the timeline stutters with one track of HDV often.
    Anyway, if I'm boring you don't worry, but this is the main issue I'm having on my system and I'd love to understand it better.
    Could it be that the RAM in the graphics card is maxed out, or some cache in the graphics card - and if so, how can you empty that?
    Just some thoughts.
    Cool,
    Matt

  • Could someone explain what this piece of codes means

    The code section is below there are few things I don't get about this code:
    1:What does all that stuff that the string data equals means
    // Construct data
            String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8");
            data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");2: The second thing is that I'm wondering what is the URL definining part mean, more specifically what's the 80 for and why is there that cgi line.
    URL url = new URL("http://hostname:80/cgi");This is the full code that I'm getting the questions from
        try {
            // Construct data
            String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8");
            data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");
            // Send data
            URL url = new URL("http://hostname:80/cgi");
            URLConnection conn = url.openConnection();
            conn.setDoOutput(true);
            OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
            wr.write(data);
            wr.flush();
            // Get the response
            BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            String line;
            while ((line = rd.readLine()) != null) {
                // Process line...
            wr.close();
            rd.close();
        } catch (Exception e) {
        }

    The code section is below there are few things I
    don't get about this code:
    1:What does all that stuff that the string data
    equals means
    // Construct data
    String data = URLEncoder.encode("key1",
    "UTF-8") + "=" + URLEncoder.encode("value1",
    "UTF-8");
    data += "&" + URLEncoder.encode("key2",
    "UTF-8") + "=" + URLEncoder.encode("value2",
    "UTF-8");
    Looks like data is a query string for an HTTP GET request. It has two key/value pairs encoded as UTF-8.
    : The second thing is that I'm wondering what is the
    URL definining part mean, more specifically what's
    the 80 for and why is there that cgi line.
    URL url = new
    URL("http://hostname:80/cgi");
    The code is making the HTTP GET request to a server named hostname via port 80 to a CGI script that will consume the request and send a response back.
    This is the full code that I'm getting the questions
    from
        try {
    // Construct data
    String data = URLEncoder.encode("key1", "UTF-8") +
    "=" + URLEncoder.encode("value1", "UTF-8");
    data += "&" + URLEncoder.encode("key2",
    "UTF-8") + "=" + URLEncoder.encode("value2",
    "UTF-8");
    // Send data
    URL url = new URL("http://hostname:80/cgi");
    URLConnection conn = url.openConnection();
    conn.setDoOutput(true);
    OutputStreamWriter wr = new
    OutputStreamWriter(conn.getOutputStream());
    wr.write(data);
    wr.flush();
    // Get the response
    BufferedReader rd = new BufferedReader(new
    InputStreamReader(conn.getInputStream()));
    String line;
    while ((line = rd.readLine()) != null) {
    // Process line...
    wr.close();
    rd.close();
    } catch (Exception e) {
    Very bad code. An empty catch block? Terrible.
    %

  • Could someone explain why mds is using so much CPU?

    Could someone explain what mds is doing if my Mac has been indexed (don't see activity in Spotlight menu bar icon) & I haven't recently added a lot of files?
    I noticed my Mac was slowing down for a while so I looked in Activity Monitor & it says mds is running at 60% CPU. Isn't this something to do with Spotlight indexing?

    If you recently upgraded the OS or installed an application that includes a metadata parser for spotlight (such software generally comes in the form of a package instead of a single icon), it will force spotlight to reindex. Also, restoring from a backup does the same thing.
    Also, if you used mdutil to disable spotlight indexing on the volume and then reenable it, it will force a reindexing.

  • ParseInt and radix: could someone explain to me what they are ?

    Hi ,
    could someone explain to me in simple words, and maybe with an example, what is the radix, and what "16" means ?
    String fields[] = line.split( "\\s+" );
       // Field 2 : POS
       // Field 3 : Number of words in the Synset (in hex)
        // Field 4 : First word in the Synset
    int words = Integer.parseInt( fields[3], 16 );Thank you !
    Grazia

    Short answer: Radix is the base, 16 means treat the string as a base 16 (hex) number.
    Long answer: Read the documentation (see link provided by jverd). It is very good to understand. Also, look at the following link:
    http://wwwacs.gantep.edu.tr/foldoc/foldoc.cgi?radix� {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • When I try to download apps, a message appears saying that to move forward I have to agree to the new terms of the contract, but does not allow me to agree and not low Apps. Someone can explain what is happening?? thank you

    When I try to download apps, a message appears saying that to move forward I have to agree to the new terms of the contract, but does not allow me to agree and not low Apps. Someone can explain what is happening?? thank you

    Delete some stuff to make room on the device.
    iCloud is not local storage and has nothing to do with your situation.

  • Could someone explain the Factory Method Design Pattern

    Hi Experts.
    Could someone please explain for me the Factory Method Design Pattern. I read it a little and I understand that it is used in JDBC drivers but i'm not clear on it.
    Could someone explain.
    Thanks in advance
    stephen

    Basically, you have one class that's sole purpose is to create instances of a set of other classes.
    What will usually happen is you have a set of related classes that inherit from some base class. We'll say for example that you have a base class CAR and it has sub-classes FORD, GM, HONDA (sorry Crylser). Instead of having the user call the constructors for FORD, GM, and HONDA, you can give the user a Factory Class that will give him a copy. We'll call our factory class Dealership. Inside dealership, you can have a static function :
    public static Car makeCar(String type)
    if(type.equals("FORD")
    return new FORD();
    else if(type.equals("GM")
    return new GM();
    else if(type.equals("HONDA")
    return new HONDA();
    So when the user needs a car, they will just call
    Dealership.makeCar("FORD").
    This is a good way to hide the implementation of your classes from the user, or if you require complex initialization of your objects.
    Another good example of this is in the Swing library. To get a border around a component, you call static methods on BorderFactory.
    Hope this helped.
    Ed

Maybe you are looking for