More than one way to pass an attribute across pages

Hi, I need to pass an attribute (not a parameter) across pages, there seem to be two ways and I tested them, both worked. But I still have doubt.
Approach 1: in a.jsp: session.setAttribute("house",house);
in b.jsp: Object house = session.getAttribute("house");
Approach 2: in a.jsp : RequestDispatcher rd = request.getRequestDispatcher("b.jsp");
request.setAttribute("house",house);
rd.forward(request,response);
in b.jsp : Object house = request.getAttribute("house");
Now my question is: Is it safe to use session to pass an attribute when the value of the attrbute is quite dynamic. I tried to test it, it seemed ok. But I can not convince myself completely.
Anybody can give me some comments on the two approaches? Which is safer, which is better?
Thanks

Both methods can handle dynamic data. The determining question s how long do you need the data for? If you only need the data for the life of the request use the request.setAttribute. If you need to access that data during the life of the session then use session.setAttribute.

Similar Messages

  • More than one column retrieved in "report and form" page

    HELLO!
    let's see if anybody can help me with this... i'm sure it's a stupid problem but i really don't know how to solve it.
    when i create a new application with APEX, i want to add a "report and form" page. i select the table where de data is, and then click on add page. then i go to the page definition for the form that just has been created but there's no option for selecting more than one column as the link column...
    i mean, i want to show a report with all the columns from the table and then, by selecting one of them, the form should display that column but the problem is that the primary key of the table is formed by 6 columns and i always receive the "more than one column retrieved" message as it's trying to retrieve the information using only one column. is there any way to make the link column be composed by 6 or 7 columns??

    APEX can handle 2 primary key for one table (if you are using the automated fetch row and the automated process row).
    In your case, you'll have to create your own "fetch process (page rendering)" and "DML process (page processing)".
    Flex
    Homepage : http://www.insum.ca
    InSum Solutions' blog : http://insum-apex.blogspot.com

  • How can i insert more than one record a time in a JSP page?

    Hi experts,
    I'm working with JDeveloper version 3.2 application server 9i.
    I want to insert more than 1 record using a jsp page and then perform a commit at the end.
    do you can help me with this problem/challenge?
    Thank you,
    Regards,
    Mario

    statement.executeBatch() maybe?

  • Is there more than one way to strip clean a HD before reloading OSX 10.6.8 operating system

    I've had my MacBook's HD emptied and OSX reinstalled twice now in a few weeks by a Mac "reseller" there is no one in the store that has a full knowledge`of mac's they have the orange herd drive that i've seen in Mac shop's, they have the opperating systems to load.
    both times it's taken only a few moments to "empty" the hole hard drive, it takes longer to empty 10 items in finder  / Secure Impty Trash than empty the HD
    the last reinstall i saw that there 22GB used on the HD there must be things getting stuck in the HD some how and becoming part of the reinstall.
    Can anybody tell me, so i can tell them ( in the store )  how to go about getting a clean HD ready to reinnstall  OSX 10.6.8 with out the things that must be hidden so they become part of the new install

    SailBoynz wrote:
    is it possoble that some files are making it to the "new" HD
    No. The computer can no longer see the files once the Directory has been erased. The only way to access them is from a data recovery method which involves scanning the entire disk and listing these files by examining them - an extremely slow process. I can't say wht you are having the issues you are, but the erase method isn't likely to be the cause - though if you are concerned you could follow the method I gave above for doing a fuller erase, just to satisfy your mind. It may be that the disk itself is beginning to fail. You could download SMART Reporter which can look for possible indications of impeding failure:
    Older free version: http://www.corecode.at/smartreporter_lite/index.html
    Or £2.99 in the Mac App Store for the current version:
    https://itunes.apple.com/gb/app/smartreporter/id509148961?mt=12

  • Can not access control center-more than one way to turn off and on portait rotate?

    The very bottom of my screen does not register touch for some unknown reason ( I have a 4s and iOS 7.1)—however I've been dealing with that by rotating my phone to pull up the keyboard to type for text messages, etc. I accidently locked my ability to rotate my phone and now I can't pull up the control center to turn it off. Is there another way to access this function?

    Thank you for the quick response. Unfortunately, in the AssistiveTouch there is still no way to turn off the locked position of my screen, so when I click the different rotate options provided, the screen does not change orientation... any thoughts?

  • Evaluating tag attribute with more than one el

    the following code
              baseurl="keywords=${param['keywords']}&spatialBounds=${param['spatialBounds']}"
              in not correctly processed by weblogic 9.0 server
              the resulting html is just baseurl="keywords="
              --> When I have more than one el in the same attribute the el are not evaluated.
              --> This code works in Tomcat & Resin
              --> Is it a bug in weblogic?

    TÃtulo: Quer mudar sua vida??Leia com atenção!
              Autor: LUIZ
              Data: 19/11/2005
              Cidade: Boa Vista
              Estado: RR
              PaÃs: Brasil
              COMO ACABAR COM A DIFICULDADE FINANCEIRA
              ACABE COM A DIFICULDADE FINANCEIRA
              GANHE MUITO DINHEIRO COM APENAS 6 REAIS
              HONESTIDADE, INTELIGENCIA E EFICÁCIA
              POR FAVOR, LEIA COM BASTANTE ATENÇÃO, VALE A PENA!
              COMO TRANSFORMAR 6 (SEIS) REAIS EM NO MINIMO 6.000(SEIS MIL REAIS) !! : VOCÊ É CAPAZ, APENAS FAÇA FUNCIONAR.!
              Eu achei uma mensagem sobre esse assunto e não dei muita atenção por ser um texto muito longo e parecer ser presente de papai Noel, más resolvi arriscar e deu certo. Vou tentar resumir para que vc tbm não ache esse texto cansativo e se quiser mais informções mande-me um e-mail – [email protected].
              Funciona assim:
              PASSO 1: Separe 6 meias folhas de papel e escreva em cada uma, o seguinte bilhete: " POR FAVOR, PONHA-ME EM SUA LISTA DE REMETENTES" colocando seu nome e endereço logo abaixo. Agora adquira 6 notas de R$ 1,00 e envolva cada uma em um dos bilhetes que você acabou de escrever. Em seguida, envolva cada um deles novamente com um papel escuro, para evitar que alguém veja a nota e viole o envelope, roubando o dinheiro. Então coloque cada um dentro de um envelope e lacre. A lista abaixo contém 6 nomes com endereços e você tem 6 envelopes lacrados. Você deve REMETER PELO CORREIO, um envelope para cada um dos nomes da lista. Faça isto, anotando corretamente o nome e o endereço nos envelopes, depositando em seguida no correio. A lista se encontra no final desse texto : PASSO 2: Elimine o primeiro nome da lista (#1). Reordene a lista de 1 a 5, ou seja (2 torna-se 1), (3 torna-se 2), etc.. Coloque o SEU nome e endereço como o 6º(sexto) da lista. :
              PASSO 3: Após feitas as alterações acima, coloque este artigo em pelo menos 200 fóruns e newsgroups.Você pode modificar o texto deste artigo, mas por favor, mantenha a integridade da mensagem. Isto é importante. LEMBRE-SE, quanto mais mensagens nos fóruns, newsgroups e livros de visitas você colocar, mais dinheiro você ganhará!
              O retorno será melhor se você colocar um bom tÃtulo ( ou esse mesmo), que fique visÃvel para todos.
              Agora, coloque o artigo modificado (ou esse mesmo).Existem milhares de fóruns e newsgroups. Você só precisa de 200. Então mãos à obra, LEMBRE-SE Toda vez que alguém agir como você, salvando esta mensagem, seguindo e executando corretamente todas as instruções, 6 pessoas estão sendo beneficiadas com R$ 1,00 cada e seu nome subirá na lista. Assim as listas multiplicam-se rapidamente e seu nome vai subindo até atingir a primeira posição. Desta forma quando seu nome alcançar a #1 posição, você já terá recebido milhares de reais em DINHEIRO VIVO! Lembre-se que você só investiu R$6.00. Envie agora os envelopes, suba o nome dos participantes da lista e adicione seu próprio nome na sexta posição da lista, poste-a nos fóruns e você está no negócio!
              COMO POSTAR NOS NEWSGROUPS --------
              Etapa 1) Copie e salve este artigo em seu editor de texto. (selecione o texto, clique em Editar e Copiar, abra seu editor de texto e clique em Editar e Colar, depois clique em Arquivo e Salvar como .txt) Etapa 2) Faça as devidas alterações neste artigo, incluindo seu nome na sexta posição da lista. Etapa 3) Salve novamente o arquivo. Clique em Editar e Selecionar tudo. Clique novamente em Editar e Copiar. Etapa 4) Abra seu navegador, Netscape, Internet Explorer ou algum outro qualquer e procure vários newsgroups (fóruns on-line, cadernos de mensagens, locais de conversa, discussões) e poste uma mensagem nova em cada MURAL ou ÁREA, ou algo similar. Etapa 5) Para postar entre nesses newsgroups. No campo destinado para digitar o texto ou mensagem a ser enviada para o newsgroups, clique com o botão direito do mouse. Em seguida clique em Colar. Como Assunto ou tÃtulo, digite um nome que chame a atenção, como o meu, ou invente algo parecido. Clique em enviar e pronto, você acabou de enviar sua primeira mensagem! Parabéns...Etapa 6) Selecione outro newsgroups e repita o passo 5. Faça isso no mÃnimo para 200 newsgroups. **QUANTO MAIS MENSAGENS VOCÊ ENVIAR AOS NEWSGROUPS MAIS CHANCES VOCÊ TERÁ DE GANHAR MAIS DINHEIRO ** Pronto! Você logo começará a receber dinheiro pelo correio. Se você deseja ficar anônimo, você pode inventar um nome para usar na lista, contanto que o endereço esteja certo para que você receba o dinheiro. **CONFIRA SEU ENDEREÇO!!!.
              ------- PORQUE RENDE TANTO DINHEIRO --------
              Agora vamos ver POR QUE rende tanto dinheiro: Fazendo uma análise bastante pessimista, vamos supor que de cada 200 mensagens, apenas 5 dêem retorno. Assim das minhas 200 mensagens, receberei apenas R$5,00 referentes ao meu nome na #6 posição. Agora, cada uma das 5 pessoas que me enviaram R$1.00 postaram mais 200 mensagens cada uma. Se apenas 5 de cada 200 retornarem, receberei R$ 25,00 referentes ao meu nome na #5 posição. Agora, cada uma das 25 pessoas que me enviaram R$1.00 postaram mais 200 mensagens cada uma. Se apenas 5 de cada 200 retornarem, receberei R$ 125,00 referentes ao meu nome na #4 posição. LEMBRE-SE ! Estamos considerando um exemplo extremamente fraco. Agora, cada uma das 125 pessoas que me enviaram R$1.00 postaram mais 200 mensagens cada uma. Se apenas 5 de cada 200 retornarem, receberei R$ 625,00 referentes ao meu nome na #3 posição. Agora, cada uma das 625 pessoas que me enviaram R$1.00 postaram mais 200 mensagens cada uma. Se apenas 5 de cada 200 retornarem, receberei então R$ 3.125,00 referentes ao meu nome na #2 posição. Agora, cada uma das pessoas que me enviaram R$1.00 postaram mais 200 mensagens cada uma. Se apenas 5 de cada 200 retornarem, receberei nesta última fase R$ 15.625,00 referentes ao meu nome na #1 posição. INCRÍVEL! Com um investimento original de apenas R$6,00, cria-se uma oportunidade gigantesca. Estima-se que entre 20.000 e 50.000 novas pessoas se juntem à Internet todos os dias e vão para os chats e fóruns. "O que são seis reais para tentar uma chance milionária que pode dar certo?" As chances são grandes quando milhões de pessoas honestas como você estão se juntando a esse grupo?? Lembre-se, a HONESTIDADE faz parte deste jogo. MANDE UM DÓLAR AO INVÉS DE UM REAL PARA OS ESTRANGEIROS .
              IMPORTANTE: O envio das cartas contendo o bilhete e R$1,00, é que torna honesto e prospero o sistema, assim o sistema sobrevive, pois tudo que é desonesto, mais cedo ou mais tarde, fracassa certamente.
              NÓS SOMOS RICOS, NÓS SOMOS PROSPEROS, NÓS ESTAMOS CHEIOS DE SAÚDE E HARMONIA.
              **** SE VC DESEJA PARTICIPAR DESSA CORRENTE DE SOLIDARIEDADE E AO MESMO TEMPO FICAR RICO, MANDE (1 REAL) PARA CARA UM DOS NOMES ABAIXO******
              ENDEREÇOS DAS PESSOAS QUE VC DEVE ENVIAR R$1,00 JUNTO COM O BILHETE:
              1)Luiz Carlos Rodrigues - Av. Dr. Nilo Peçanha,252 - Marapé.
              CEP: 11070-050 SANTOS - SP
              2)Renato Pontes Eller - Rua Ranulfo Alves,709 Vila Isa.
              Cep: 35044-220 Governador Valadares - MG
              3)Dalton Sampaio - Rua Senador Máximo, 75 - Centro.
              Cep: 57250-000 Campo Alegre – AL
              4)Samuel Rodrigues P. Junior – Av. Ernani do Amaral Peixoto, 195 Apt 701 - Centro.
              Cep: 24020-071 Niterói - RJ
              5)PatrÃcia A de Barros Silva – Rua Maria Teresa Assunção 479 A –Penha
              CEP:03609.000 –São Paulo-SP
              6) Luiz Faustino – Rua Ágata, 238 – Jóckey Club
              CEP: 69313-108 – Boa Vista - RR
              NÃO PERCA TEMPO COMECE JÁ A ENVIAR SUAS CARTAS E POSTAR!!!QUANTO ANTES MELHOR, MAIS RAPIDO COMECARA A RECEBER AS SUAS CARTAS!!!!

  • More than one af:messages component on a page?

    Hi,
    I'm struggling with error messages. Our users complain about the numerous popups with errors they get and about how "persistent" those popup are. I cannot blame them for complaining, the popups can be really annoying.
    Consider an editable table, with a couple of required fields. You create a new record, required fields are empty and then you think: "Oh, I should change that value in that other record", so you click on another row in the table to edit the other record before continuing to fill the newly created one. You'll get a popup that keeps re-appearing constantly, until you've filled all required fields in the new record. Users get very frustrated about this.
    So, I'm looking for another solution, and this is my idea: we have a small piece of "screen real estate" at the bottom of the screen, near the commit and rollback buttons. I can put an <tt><af:messages></tt> component there, with the <tt>inline</tt> attribute set to <tt>true</tt>. Because of the limited space, only the first line of the errors will be shown. To enable the user to see the complete list of errors, I can add a <tt><af:popup></tt> with an <tt><af:noteWindow></tt> inside. I can then add an <tt><af:popupBehaviour></tt> to the <tt><af:messages></tt> component, to show the popup whenever the user mouses over the first line of errors. I can get this working without problems. But when I add a second <tt><af:messages></tt> inside the <tt><af:noteWindow></tt>, it won't show any message. Can I have more than one <tt><af:noteWindow></tt> on a page? If not, is there another way to repeat the error messages inside the popup?
    Best regards,
    Bart Kummel

    Hi Bart,
    How about hiding messages(by setting visible property to false using javascript) on table mouse over and making it visible on clicking on the submit button by using clientListener tag to call the javascript methods.
    I am not sure about note windows but you can think of the above solution if it makes sense.
    Sireesha

  • Validating more than one source with one validator

    Dear all,
    Can we use one validator to validate more than one source?
    <mx:StringValidator id="labelVld" source="{nameEntry,
    labelEntry}" required="true" property="text" />
    <mx:Form>
    <mx:FormItem
    label="{resourceManager.getString('Admin','name')}"
    required="true">
    <mx:TextInput id="nameEntry" />
    </mx:FormItem>
    <mx:FormItem
    label="{resourceManager.getString('Admin','label')}"
    required="true">
    <mx:TextInput id="labelEntry" />
    </mx:FormItem>
    I placed more than one value inside the source attribute of
    the mx:StringValidator component but it didn't work. How do I
    handle this kind of issue in Flex? Does anyone has any idea about
    this?
    Many thanks

    I think this is what you're probably looking for:
    http://livedocs.adobe.com/flex/3/html/help.html?content=validators_3.html

  • Merging more than one address card into the same document

    Is there a way to merge more than one address book card into the same Pages document? I am wanting to create a photo directory and I don't want more control over the formatting than Address Book would probably give me. I would like to be able to set up multiple merge fields in a Pages document, and then merge in a whole group of Address book cards and have them populate the merge fields in my pages document with probably about 4-8 address cards represented on each page. Any help you can offer would be appreciated!

    I wanted to do the same thing with tickets that had unique numbers on them, so I created a group in my address book and put the numbers in the notes section, then I made my document just a little bigger than my ticket and had the Note field in the ticket where I wanted the number. When I did the mail merge it created the tickets with the numbers, then to print I put 9 pages per sheet and that way I have 9 tickets per sheet and only 20 sheets for 180 tickets.
    Worked that way for me, hope it helps!

  • How to show more than one record at a form-like style report?

    Hi All,
    I developed a form-like style report
    I want it to show more than one record at once (At the same page)
    I tried that by setting the value to "Maximum records per page" property for the repeating frame to 10
    but when I close the property palete and open it agian the value is returned to 1 !!!
    how to show more than one record at the same page?????
    Thank u

    Hi,
    there's perhaps another property like "page protect". If than 2 records didn't fit at one page there's a page break. Or is there any object inside the repeating frame with page-break properties? Sorry .. it's like looking into a chrystal ball ...
    Regards
    Rainer

  • Rendering Error when using more than one DataSheetView on a Enterprise Wiki-Page

    Hi Experts,
    how to reproduce:
    Add two Custom Lists with some Fields (Add Lookup-Columns to both Lists).
    Add a DataSheetView to each List and mark it as Default-View
    Create a Enterprise Wiki-Page
    Add a WebPart (Custom-List-1)
    You will see the Content from List 1 as DataSheet-View (because it is the Default-View)
    Add another WebPart below the previous added WebPart (Custom-List-2)
    You will see the Content from List 2 as DataSheet-View (because it is the Default-View)
    Notice that the First DataSheet has faulty Rendering. The Lookup-Columns having more than one 'Arror-Down' Image and it is even on the left. If you click into different Column, different row you get the same.
    I can reproduce this behaviour anytime.
    Environment: SharePoint 2013 Enterprise, IE10
    If you use Development-Tools to identify first datarow of first DataSheet you can see that it has to do something with the related <Input>-Tags:
    <div class="combobox-placeholder" id="jsgrid_combobox" style="left: 27px; top: 32px; width: 117px; height: 29px; border-top-color: currentColor; border-right-color: currentColor; border-bottom-color: currentColor; border-left-color:
    currentColor; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; visibility: inherit; ; direction: ltr; min-width:
    117px; background-color: transparent;">
    <input class="cb-textbox " style="width: 156px; height: 25px;" dir="ltr" type="text"/><input tabindex="-1" title="Dropdown" class="combobox-img" style="height: 29px;"
    dir="ltr" type="button" value="▼"/><input class="cb-textbox " style="width: 84px; height: 25px;" dir="ltr" type="text"/><input tabindex="-1" title="Dropdown"
    class="combobox-img" style="height: 29px;" dir="ltr" type="button" value="▼"/>
    Please have a look into it. Current Workaround for me is to have a Default-ListView in first WebPart. But then Customer has to click the Edit-Button to Change the Item in the releated EditForm. This is a Show-Stopper here!
    With Best Regards,
    Ronny

    Hi Ronny,
    According to your description, the lookup column would render incorrectly when adding more than one datasheet view in the Enterprise Wiki page.
    I tested the same scenario per your post, and I got the same results as you got.
    We will help to submit the issue to proper pipeline for you.
    Again, thank you for your report which will definitely make SharePoint a better products. There might be some time delay. 
    Appreciate your time and patience.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Identify Supervisor if current Position has more than one A012-assignment

    Hello experts,
    I wonder if you could help me with this "challenge" please:
    Starting point is a non-vacant position that owns more than one A012-assignment.
    For example:
    Position-ID: 00000001
    01.01.2006     31.12.9999     A012     O     004712
    01.01.2007     31.12.9999     A012     O     004711*
    01.01.2006     31.12.9999     A008     P     101010
    *The second A012-assignment is needed because the person leads the O 004712 as well as O 004711 (general manager).
    If I am using the standard function RH_GET_LEADING_POSITION, I get a sy-subrc = 1 (which means that there was no leading position found). But there is a position owned by the supervisor of the person 101010 that should be determinated:
    O 004711
    ___S 00000002
    _____P 101020
    _______|O 004712
    _________S 00000001
    ____________P 101010
    If I delete the first A012-assignment of position 00000001 it works fine: P101020 is shown as Supervisor of P 101010.
    Does anyone know how to solve this problem, if there is more than one A012-assignment?
    Thanks in advance.
    Greetings,
    Dirk vdH

    Hi Ronny,
    According to your description, the lookup column would render incorrectly when adding more than one datasheet view in the Enterprise Wiki page.
    I tested the same scenario per your post, and I got the same results as you got.
    We will help to submit the issue to proper pipeline for you.
    Again, thank you for your report which will definitely make SharePoint a better products. There might be some time delay. 
    Appreciate your time and patience.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Can i create report using more than one Business Area ?

    Hi Gurus,
    Can i create report using more than one Business Area?.Could anybody tell me that report will work?.
    Vikram

    You should have no problem creating a report using more than one Business Area, we share folders across BAs all the time for ease of management. As long as your joins exist its not a problem.
    Matt Topper
    TUSC, The Oracle Experts
    [email protected]

  • LOV Return To More Than One Column

    Hello,
    How could I return LOV values to more than one column?
    I created a dynamic LOV based on sql statement. I would like to return more than one values to multiple columns in my page.
    E.g. When user selects employee number name, department and location to return to respective columns.
    Any help is highly appreciated.
    I am using APEX 3.2.0.
    Thanks

    hi,
    Below link might help you.
    http://rutgerderuiter.blogspot.com/2008/10/update-multiple-items-from-lov-field.html

  • Pass more than one argument for action in the URL

    Hi,
    i've created a DesktopURL object with which i refere back to the Front Page. With the same URL i want to minimize two channels at the same time. I know that i can minimize one channel with the "action=minimize&provider=myProvider" attribute.
    Is there a way to pass more than one provider for an action ?
    Or exists another way to do that ?
    thx

    In fact, my code was completely right. I tried with commas and it hasn't work. When I tried again without commas it worked perfectly...
    Nevertheless, thanks for the advice!
    Gilmar

Maybe you are looking for

  • Ios 3.1.1 will not download for the 1st generation ipod touch

    Why won't ios 3.1.1 download for the 1st generation ipod touch?  It will start and then a second later stop.

  • No audio!! HELP!

    I need to include a .avi Movie in a Final cut project but quicktime cannot read the audio track. It's a .avi DivX movie and my properties tell me that the audio format is msgq (whatever that means). Can someone tell me how to get the audio from my mo

  • Decode variant data w/o using 'Variant To Data' function.

    I need to decode variant data w/o having foreknowledge of the type used to create it. That is, I'm using the 'Flattened String To Variant' function which gives me the info I need, but it's all contained within one indicator. I need some way to break

  • Can I run a iMac G4 on Ethernet?

    I am new to imac and was recently given a imac g4 from a family member but I'm wondering if it can be run on wireless or Ethernet?

  • ITunes 11.0.1 does not show purchased apps as 'Install' or 'Download'

    For many years including this version, I have been able to tell apps that have been purchased either by a sign 'INSTALL' or 'DOWNLOAD'.  For the last 2-3 days, apparently, this has been missing. I see either FREE or prices in all apps, I can't tell w