Lets talk about redirect???

I found a interest beheavior about response.sendRedirect
and I hope someone can help me out if I am actually misunderstand the new interesting thing that I just found.
<%@page contentType="text/html"%>
<html>
<head><title>JSP Page</title></head>
<body>
<a href='redirect_test2.jsp'> man </a>
<font size=6><%=session.getAttribute("test")%></font>
</body>
</html>
[!code]
user click the link and the second page will redirect back<%@page contentType="text/html"%>
<html>
<head><title>JSP Page</title></head>
<body>
<%
if(true)
response.sendRedirect("redirect_test1.jsp");
session.setAttribute("test", " I am not sure.");
%>
</body>
</html>
[!code]
I expect when page redirect the
session.setAttribute("test", " I am not sure.");
whille not be executed and the calling page still
print out a null. But The interesting thing is when
page got redirected the
session.setAttribute("test", " I am not sure.");
is ran as well. Is that a bug or that's the way it design
Please help
thx in advance

Whats buggy about that ?
Your code line
session.setAttribute("test", " I am not sure.");is executed unconditionally. i.e. is not inside the if condition. Why were you expecting that it session attribute will not be set ?
Here is a section from the Javadoc for javax.servlet.http
Interface HttpServletResponse...
After using this method, the response should be considered to be committed and should not be written to.
It does not say you that cannot write to session or cannot otherwise run any code after redirect. Does it ?
You just should not write to the response.

Similar Messages

  • Lets talk about ZAGG Extreme

    want to know everything about it. please tell me all about it. im intending to buy this and put no cover on my iphone 5

    I have used Zagg film for all of my previous iPhones and as long as you dont have a white iPhone you'll be fine.
    My 4S was white and after a few months of having the Zagg shield it slowly turned blue and look horrible.
    (The case itself turned blue and not the iPhone). I can only assume this was from the insides of my pockets.
    I plan on buying one for my 5 but am not bothered about the Extreme one as the standard Invisible Shield worked perfectly for me, even with the Retina display of the 4S.

  • Instead of CLI lets talk about APR.

    So I see a ton of info on here about CLIs and people sharing their luck with limits.  I have learned a lot form those and have really improved my profile a ton in less than a year. Great info and has helped me a ton. What about APR reductions though?  I literally have no idea if the process for reducing APR is easy, hard, not possible, or what between lenders.  I was wondering if there was good info to know around this, I never carry a balance of any type and never plan to but if one day I had to I sure don't want to pay 24% or something.  I personally got a 4% reduction of APR from Barclays not long ago just by asking the right department.  Can I do this again?  I don't know, can I try with other lenders?  Just thought if there was some good info around this it might be nice to share what is possible with different lenders.  I'd try to get them down just becasue, kinda like getting high CL that I'll never fully use!    I'll start, I have only tried this one time with Barclays, called in and asked for the retentions department.  Asked about an APR reduction once connected not expecting to get it and they lowered my APR from 24.99 to 20.99 forever.  They also gave me 0% intrest for 9 months after that without me even asking. Lastly they gave me a CLI but this thread is not about that!  I've never tried elsewhere.

    SlowLane wrote:
    So I see a ton of info on here about CLIs and people sharing their luck with limits.  I have learned a lot form those and have really improved my profile a ton in less than a year. Great info and has helped me a ton. What about APR reductions though?  I literally have no idea if the process for reducing APR is easy, hard, not possible, or what between lenders.  I was wondering if there was good info to know around this, I never carry a balance of any type and never plan to but if one day I had to I sure don't want to pay 24% or something.  I personally got a 4% reduction of APR from Barclays not long ago just by asking the right department.  Can I do this again?  I don't know, can I try with other lenders?  Just thought if there was some good info around this it might be nice to share what is possible with different lenders.  I'd try to get them down just becasue, kinda like getting high CL that I'll never fully use!    I'll start, I have only tried this one time with Barclays, called in and asked for the retentions department.  Asked about an APR reduction once connected not expecting to get it and they lowered my APR from 24.99 to 20.99 forever.  They also gave me 0% intrest for 9 months after that without me even asking. Lastly they gave me a CLI but this thread is not about that!  I've never tried elsewhere.Well, congratulations, and no offense, but 20.99% is still an awful interest rate. And yes, I know Barclays loves their high APRs - my Rewards MC has 22.9% APR but was still the card I used most the last couple months because I get 2% cashback rewards on gas, groceries & utilities, and I would never ever carry a balance on it, I PIF monthly. I don't care about APRs because should I need to carry a balance I have so many 0% APR options. I just got a Discover card in early July and it has 0% APR for the first year, but since it also has double cash back for the first year I'm only using it for 5% Discover Deals or 5% Home Improvement this quarter. I have a standing 1 year 0% offer on my Cap One Quicksilver, either BT or cashing one of the checks they send me. If I need to make a major purchase I'd use my Walmart or Lowe's store cards or my Best Buy MC for 0% deferred. With so many 0% options, why should I care what APR my CCs have? They'll never get it from me. EDIT: I didn't want this to come off as 'snobbish'. I'm most defintely not wealthy, I'm semi-retired, took early retirement Soc Sec at 62 while continuing to work for my local county part time. I'm just diligent at managing my personal finances. And I'm motivated montlhy when I get my savings account statement - when I'm getting 1/10th of 1% interest on my savings, the CC coompanies are most definately not getting 20+% interest from me, or not even Cap One, which at 12.9% APR is my lowest interest CC.

  • IPods and Skins -- Talk about it.

    The key to success with a perfect, unscratched ipod is to follow some simple steps, all gathered together in one so new users can take action immediately.
    1. GET A COVER (SKIN/TUBE) FOR YOUR NANO!
    2. Dont take it out of the plastic when you purchase it UNLESS you already have a skin to put RIGHT on it.
    3. Even if tempted to, DO NOT RUB YOUR NANO TO YOUR SHIRT OR ANY OTHER MATERIALS. THEY ARE DELICATE. -- Treat with care DUH
    I am deciding over the zCovers, or the Apple Tubes...
    the set of apple tubes come with 5 colors for 29.99
    - white, blue, purple, lime green, bubble gum pink
    the zCovers are 24.95 EACH
    - green, grey, red, black, blue, pink, white, purple, "ice clear"
    Lets hear some oppinions about the Tubes and zCovers. Help people decide about which one to get.
    The zCovers have a crystal clear hard screen protector, and i am not sure of the Apple Tubes have those.. i have a doubt they dont, thus called TUBES.
    Lets talk about it.
    You choose and tell... zCover or Apple Tube set?
    Tom

    Thomas,
    I actually bought a single nano tube on eBay. I also bought a podsplus and Z-cover. Out of all of these the Apple nano tube is the best for me.
    1- Podsplus- Great silicone skin .Good quality. Scroll wheel is thinned out to make navigation easy. A pretty good skin. No option for lanyard.
    2- Z-Cover. Thicker than all the others. Scroll wheel not thinned out so naviagtion is difficult but many other folks like this one. Comes with 2 cases. Lanyard and non-lanyard.
    3- Apple nano tube - For me the best one. No option for lanyard (except Apples lanyard headphones of course). Very thin. Scroll wheel area thinned out very nicely. Cleaner then the others. Colors brighter than in the pictures on the apple web. The blue on the web looks like a powder blue. In real life it is a darker blue.
    Don't forget to protect the screen. I suggest the power computing Crystal film.
    Good luck. Many will have their opinions. Just have to wade through the advice and take the plunge.
    Regards
    Yosam

  • My itunes want let me download free apps its talking about my billing information!

    My itunes want let me download free apps its talking about my billing information why?

    Hello Deangelo,
    Thank you for the question.  It sounds like you do not want to add a credit card to your Apple ID.
    I suggest updating your billing information to "None" using the steps in the section titled "Change your payment information on an iPhone, iPad, or iPod touch" in the following article:
    iTunes Store: Changing your payment information
    http://support.apple.com/kb/ht1918
    If you are not seeing the "None" option when updating your billing information, I recommend the following article:
    Why can’t I select None when I edit my payment information?
    http://support.apple.com/kb/ts5366
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • When we talk about healthy

    When we talk about healthy fats those is a faster all structure and this engine or are they are just benign meeting their sources calories and don't cause hormonal chaos
    and atoll change our body's ability to responsive more calories in more calories us there's let's call in therapeutic fast these are anti-inflammatory fast which reduce inflammation they help to heal us they help us to absorb vitamins these are things like
    omega-3 festoon-unsaturated Ultra Thin Complete fats there are missing samples omega-3 fats are the fast around in San and flax seeds Chara seeds
    grass-fed beef by and large though that’s what people say TV that's why I see seafood Ultra Thin Complete cut that would be a primary source class
    in China also have them but the less biologically available forensically a labor sleepy arch week urging yeah granite I'm folks I and then there are I mono-unsaturated fats these are why people say olive oil is so good for you because it's high in monounsaturated
    fats yet on he did and also if at all possible our lives because we're about the whole
    For more information, visit this site >>>>>>> http://www.maletestosteronebooster.org/ultra-thin-complete/

    joncordova wrote:
    I'll make sure to check the firmware if I get the Samsung 830.
    The Samsung 830 is a different story. It's based on Samsung controller and their own nand flash. Of course the firmware version would be in a different system from the Intel ones. The early batch of the Samsung 830 Series is shipped with CXM01B1Q firmware, and the latest version is CXM02B1Q. The early version is not known to have any serious bug, but just worse write amplification and possible performance loss under continuous heavy load. It is recommended to update it to the latest firmware if it isn't yet.

  • [ANNOUNCE] Exadel's Max Katz talks about JSF and AJAX

    Hello,
    I'm pleased to announce that JSF Central has just published an interview with Exadel senior systems engineer Max Katz. In the interview, Max talks about the key value and benefits of JSF, how it compares to other frameworks, why it is such a good fit for AJAX, and support for JSF technology at Exadel.
    Here's a quote:
    KM: What do you think is the key value of JSF?
    MK: It's definitely the component-based approach to building web applications, and that it's a standard. JSF has introduced a new paradigm to web application development�building applications out of components. It allows developers to concentrate on application business logic rather than on little details of HTML and other plumbing that is common to all web applications.
    Being a standard is very important for the community, and it helps vendors like Exadel create advanced visual tools. The component-based approach also gave rise to vendors building web components, which also benefits developers. Instead of spending two weeks on integrating a calendar feature into your application, you can now get a calendar component and concentrate on the business problem you're trying to solve.
    KM: Let's talk about AJAX for a moment. What do you think makes JSF such a good fit for AJAX?
    MK: It's the component approach that makes AJAX such a good fit for JSF. You develop your application out of JSF components that provide AJAX functionality. This approach hides all the complexity of JavaScript and XML. Developers don't need to work with error-prone JavaScript making sure it works in all browsers. The AJAX JSF components are tested, ready-to-use components. From the developer perspective, there is really no difference between using the commandButton standard component and using the JSF AJAX drag-and-drop components. The AJAX component is simply a lot more sophisticated in what it does. You can add AJAX functionality in a matter of minutes by using such components. It's very powerful.
    To see the rest of the article, visit
    http://www.jsfcentral.com/articles/katz-06-16-06.html.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kito D. Mann
    Author, JavaServer Faces in Action
    http://www.virtua.com - JSF/Java EE consulting, training, and mentoring http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info

    The posted link led to a *404*.
    I think I found the podcast and transcript under [article on JSFCentral.com|http://www.jsfcentral.com/listings/R2925?link] . Kito: is this the correct location?

  • Lets talk Kiosk Applications...

    Okay, so I've been making a few kiosk applications (as Flash Projectors), and my one major frustration with flash is memory management.
    [Perhaps incorrectly] I've come to the conclusion that despite my best efforts, I can't completely control the memory usage of my apps. The memory usage just continues to go up.
    Unfortunately I need to use third-party stuff that doesn't seem to unload/dispose well--mainly Google Maps (and don't get me started on the Flash IDE components).. So no matter my best efforts at optimizing my own code, I feel that I need a better option or method (by all means, feel free to disagree and offer suggestoins)
    So open for discussion, lets talk kiosks, memory management etc. Applications that run for a looong time. Generally I insist restarting the apps once a day, but wouldn't it be nice if that wasn't necessary...
    Any thoughts on using an AIR app instead? Any thoughts on memory management in general? Any ideas for using a browser running full screen? Or creating a native windows app in another IDE? Thoughts in general? Should I be using Flash Builder/Flex instead? Or Visual Studio?
    Thanks in advance, any and all input/ideas welcome!
    -Zeke

    I'm sorry for my rant in my last post, but I was pretty TO'd. I wasn't using any plugins with this latest attempt. The tracks consisted of one stereo, one mono, one MIDI track. It was when I tried recording another mono track, the core audio crapped out.
    Lets get into the details. Here's my set up;
    12 inch Powerbook G4 1.5 GHz
    Latest OSX & Logic upgrades
    PreSonus Firebox using S/PDIF input
    1.25g RAM
    Maxtor 300g firewire drive
    The main drive is about 2/3rds full. The external is only 10% full since I can't enough tracks in it! What I can't understand is the Logic system resource monitor shows I should have plenty of both disk I/O speed and CPU load to work with. There has to be something else going on here. I've had issues setting up the S/PDIF with the Firebox. I use a Focusrite Voicemaster pro as my pre-amp. Maybe the digital audio is not syncing??? I'll have to test this using the non-digital inputs. There's only one firewire plug on the Powerbook. Could the daisy chaining I'm doing with the Firebox and the Maxtor be causing the slowdown???
    I don't think I'm going upgrade if I can't get this working. In fact, I'm going to downgrade back my EMac running Logic 5 big box in OS 9. It's not as many plugins, but I could track up to about 12 channels. Even more when using MOTU software.
    Thanks for the replies,
    Tim
    G4 12 inch Powerbook   Mac OS X (10.4.4)  
    G4 12 inch Powerbook   Mac OS X (10.4.4)  

  • Lets talk systems requirements for power users

    Ok so... I've been a Logic/Emagic user since Creator for the Atari ST. I find the latest version to be a power hungry beast. I can only get a few tracks working with my G4 powerbook before core audio runs out of resources. In my last attempt I could get only THREE tracks. I had a drum loop, a preset EP EVP88 sound with effects, and a bass track. When I wanted to record a saxophone, I ran out of gas.
    So I want to upgrade without mortgaging the farm. I could easy find myself tracking 20+ channels of audio and instruments. All with EQ and effect settings. I use Logic as a composition tool as much as recording medium. I don't want stop the creative process to have to bounce tracks around in order to get more usage.
    So what kind of "box" do I need. Is a quad G5 with a ton of ram the only thing that will keep the beast (aka Logic) fat and happy? Please talk about what kind of capabilities you're able to get out of your set up.
    G4 12 inch Powerbook   Mac OS X (10.4.6)  
    G4 12 inch Powerbook   Mac OS X (10.4.4)  
    G4 12 inch Powerbook   Mac OS X (10.4.4)  

    I'm sorry for my rant in my last post, but I was pretty TO'd. I wasn't using any plugins with this latest attempt. The tracks consisted of one stereo, one mono, one MIDI track. It was when I tried recording another mono track, the core audio crapped out.
    Lets get into the details. Here's my set up;
    12 inch Powerbook G4 1.5 GHz
    Latest OSX & Logic upgrades
    PreSonus Firebox using S/PDIF input
    1.25g RAM
    Maxtor 300g firewire drive
    The main drive is about 2/3rds full. The external is only 10% full since I can't enough tracks in it! What I can't understand is the Logic system resource monitor shows I should have plenty of both disk I/O speed and CPU load to work with. There has to be something else going on here. I've had issues setting up the S/PDIF with the Firebox. I use a Focusrite Voicemaster pro as my pre-amp. Maybe the digital audio is not syncing??? I'll have to test this using the non-digital inputs. There's only one firewire plug on the Powerbook. Could the daisy chaining I'm doing with the Firebox and the Maxtor be causing the slowdown???
    I don't think I'm going upgrade if I can't get this working. In fact, I'm going to downgrade back my EMac running Logic 5 big box in OS 9. It's not as many plugins, but I could track up to about 12 channels. Even more when using MOTU software.
    Thanks for the replies,
    Tim
    G4 12 inch Powerbook   Mac OS X (10.4.4)  
    G4 12 inch Powerbook   Mac OS X (10.4.4)  

  • How do you get Itunes to go the free radio station list, I'm not talkiing about the one that lists the price next to the song that's playing, I'm talking about the one that lists about 50 diffrent genes.

    How do you get Itunes to go to the free radio station list, I'm not talking about the one that lists the price next to the song that's playing, I'm talking about the one that gives you 50 diffrent genes to select from?

    This forum is for questions from those managing sites on iTunes U, Apple's service for colleges and universities to post educational material in the iTunes Store. You'll be most likely to get help with this issue if you ask in the general iTunes forums.
    But answering quickly, if you mean the streaming stations, click the Internet item:
    If you don't see that item, checkmark "Internet Radio" in the General preferences in iTunes.
    Regards.

  • 3 iOs 5 bugs no one seems to be talking about

    I've noticed 3 bugs in iOs 5 that no one seems to be talking about.
    1.  Sometimes the setup personal hotspot toggle in settings will keep thinking even if you don't tap on it.  I believe this contributes to the poor battery life.  I've found the only way to stop this is to reboot with home &amp; power buttons.
    2.   When playing a movie or music the fast forward/search toggle on top is unresponsive.  It takes up to 5 times sometimes for it to pick up that my finger is on it, and by this time it's already skipped around so much that it's pointless.
    3.  This last one is more of an app compatibility issue.  Google's search app times out and is useless now since opening Safari and using the search function in the corner works much faster.
    APPLE PLEASE ADDRESS THESE ISSUES IN THE NEW iOS UPDATE

    ddizzd,
    You're not addressing Apple here, only other users just like yourself.  You're just wasting your time and breath on this forum.  You need to post here:  http://www.apple.com/feedback/iphone.html

  • Recently, iTunes upgraded.  My 7th generation iPod is now not recognized and I cannot sync.  The troubleshooting talks  about being visible in Windows (iPod is invisible)  No other options and nothing about windows 8

    Recently, iTunes upgraded.  My 7th generation iPod is now not recognized and I cannot sync.  The troubleshooting talks  about being visible in Windows (iPod is invisible)  No other options and nothing about windows 8

    I have had similar issues with mine, happens mainly if I transfer songs and then decide to disconnect my iPod to listen to them with my IEMs (I use Interenet Explorer in my case and it is not neccessarely up when this happens, so I seriously doubt it is an issue conencted to the web browser). I have no patience for this so my trick is I try to eject it from iTunes, if that does not work, then I bring Windows explorer up, right mouse click on the iPod mounted drive and select Eject. It gives me the same warning but there is a third button selection called Continue. When I choose that it just disconnets the drive anyway and the iPod is finally disconnected. It seems to work each and every time I do it so this solution is fine for me. Would be intersting to see what the real root cause of this is because I started getting this problem with the newer iTunes 11.

  • HT1338 When I try to download the iMovie Update :  "You have updates available for other accounts.  To update this application, sign in to the account you used to purchase it." shows -don't know what other accounts it is talking about? I Only have 1 Apple

    When I try to download the iMovie Update :
    "You have updates available for other accounts.
    To update this application, sign in to the account you used to purchase it." shows -but I don't know what other accounts it is talking about? I Only have 1 Apple Id !

    Maybe this will help. If you monitor the "More Like This" box, other solved threads appear. Opening them usually displays other threads.
    http://support.apple.com/kb/TS4236

  • I cannot find a way to sort the bookmark folders themselves alphabetically by name.I am not talking about in a view mode but in the way they are displayed when I click on my bookmarks tab. Can someone explain to me how to accomplish this.

    I have a lot of various book mark folders with websites contained within each folder. I am able to sort the websites within each folder alphabetically by name but I cannot find a way to sort the bookmark folders themselves alphabetically by name.I am not talking about in a view mode but in the way they are displayed when I click on my bookmarks tab. Can someone explain to me how to accomplish this other than manually dragging them as this is extremely hard for me due to the fact that I am a quadriplegic with limited hand movement dexterity

    Bookmark folders that you created are in the Bookmarks Menu folder. "Sort" that folder.
    http://kb.mozillazine.org/Sorting_bookmarks_alphabetically

  • What is iMovie talking about with this error message?

    I have an iMovie 4 project that has been output to iDVD successfully some time ago from my G4 (Tiger 10.4.8). I recently copied it onto my iBook (600MHz - 10.4.8). When I try to insert an extra Title before a new footage clip I get the message - "You can't run this application from a read only disk." So I press OK and then I get "Error in system operation (-5000).
    What is it talking about ?
    Any advice much appreciated!
    Thanks
    Arnie

    If you have two versions of the project available — one on the DVD and one on the hard disk — make absolutely sure you are opening the one on the hard disk. If iMovie is opening the last-opened project, it may be opening the project on the DVD.
    Karl

Maybe you are looking for