How to link to the two jsp files

Hi,
In my project I have three files.
1.index.jsp
2.help.jsp
3.result.jsp
So index.jsp contains one label,one text and two buttons.
I already solved that after enter the id in the text box, i click result button to see the result.So I call the result.jsp in my form tag.
<form method="post" action="response.jsp">But Now I also want that when I click help button help.jsp whould be loaded.
can I put two forms to do?
How can I identify this form to this button?
will you please give some idea to do this.
Thank you so much.
Meena.

99% of it is javascript and not jsp.
'result' is a javascript string variable. The submitForm() function accepts this variable and assigns it as the value to the hidden field.
When button1 is clicked, 'result' is the string that is passed to the function. So the hidden field's value is set to 'result'. Similarly when the second button is clicked, 'help' is the string that is passed and the hidden field's value is set to 'help'.
The first parameter to the function is the form object which is used inside the function to submit the form after the hidden field has been assigned a value.
what action I have to mention.because I have two jsp files result.jsp or >response.jsp?Mention a standard action, say chooser.jsp. So the request always gets submitted to chooser.jsp
Now remember the hidden field will contain information as to which button was clicked. Based on that, shooser.jsp will forward to either result.jsp or help.jsp
In chooser.jsp
<%if(request.getParameter("type").equals("result")){%>
        <jsp:forward page="result.jsp"/>
<%}else{
        <jsp:forward page="help.jsp"/>
<%}%>Hope that helps,
ram.

Similar Messages

  • How can I use the same object in the different jsp files?

    I am doing a project. I have finished my jave source files and compiled them successfully. And I also wrote a main method to test my classes, they also worked well. Now I am trying to use my jave code in the jsp files. But I meet a problem, in my method of java source file, I can generate a object of a class, and use it in the whole main method. But in the different jsp files, how can I do same thing?
    For example, in the .java file,
    Vector vl = new Vector();
    While ...{
    vl.add(...)
    In each of my .jsp file I want to do one loop of the above, meanwhile I want to do that in the same object.
    I hope you can understand what I mean. Really need your help!

    put your object into a session and you can the use it in all the jsps as long as the session is valid. Or you could create a static variable in the class that only creates one instance off an object and then create a static method to return this object.

  • I set up my new computer using the apple ID i always use, and then later migrated all my files from my old mac book to the same new one, but under a different user (same ID). how do i consolidate the two users on my new mac book?

    i set up my new computer using the apple ID i always use, and then later migrated all my files from my old mac book to the same new one, but under a different user (same apple ID). how do i consolidate the two users on my new mac book?

    Well if you use the Finder Go menu to Computer, a window opens up double click on your boot drive and then on Users folder, open the other user folder and open Public and drop your files into DropBox
    When you do this it will copy them and change the permissions and user assigned to it, so log into the other user and place them into your respective normal folders.
    Once you have all your files over and don't need the old user, use System Preferences > Accounts to delete it if you wish, however it's good two Admin accounts on the machine in case something bad happens in the other. Some people for security reasons on use a Standard account for most uses and a emergency Admin account.
    One can still do most Admin things in Standard user.

  • I have created 2 websites one is in english and the other in russian how can i link these 2 so that on each page you can choose to read the page in russian or english??? like how do i put the two language flag toggles?

    like how do i put the two language flag toggles such that you can choose to read the site in russian or english?

    On each of the English pages add a Russian flag and link that flag to the Russian equivalent page with the Inspector/Link/Hyperlind pane.
    On each of the Russian pages add a US or British flag and link that flag to the equivalent English page.
    OT

  • How to play the two video files simultaneously in Xletview

    Hi All,
    How to play the two video files simultaneously in Xletview. But only one video must be visible to user and the other video must run in the background(Invisible to user). I need to implement like broadcasting channel, I don't want to stop the current video while switching to another video and vice versa.
    Is it possible to do in Xletview 0.3.6?. Or Anybody tried this?...
    Sourab.

    I think no one try this with xletview!
    xletview is not for that!

  • How run the simple .jsp file on 9 i as application server?

    hi,
    i developed simple .jsp file on notepad,the same .jsp file to run in 9ias server?
    how can any one help me or send steps how to do?
    jpullareddy

    Hi,
    Try out these samples...
    http://otn.oracle.com/sample_code/tech/java/jsp/htdocs/jspdemo/OjspReadme.html
    Thanks,
    Rajat

  • Hi. I made a modern resume from the pages template and then made a modern letter from the templates, how do I combine the two into one PDF file in Pages? Thank you.

    Hi. I made a resume from the modern template in Pages, then I made a letter from the modern template in Pages. How do I combine the two (cover letter and resume) into one PDF file. Thanks in advance.

    Open them both in Preview.app and drag the thumbnail of one into the other,
    Peter

  • How can I convert the ringtone (m4r file) I made into an mp3 file on itunes?

    How can I convert the ringtone (m4r file) that I made into an mp3 file on iTunes? I want to put it on a CD, but I can't figure out how to convert it. I didn't buy it, I made it by converting a YouTube video into an mp3 (I wanted to get the little song in the video for a ringtone.) I'm not sure what to do. 

    Hello ed2345,
    Thanks for the help, but this is not the problem.
    It's hard to describe the problem, but I'll try it again, this time with pictures.
    I was left with the following folders in the iTunes Downloads folder.
    http://www.picfront.org/d/7yb3
    These TMP Folders have a download.m4a and a Info.plist file.
    After moving the audio files in iTunes a bit I get this.
    http://www.picfront.org/d/7yb2
    As you can see no other Information for the download.m4a than the length.
    That's how the .m4p file looks like
    http://www.picfront.org/d/7yb1
    And this is how the same .m4a file currently looks
    http://www.picfront.org/d/7yb0
    Like I said, I could edit all these download.m4a files by myself but that would leave some information out.
    Note: Sorry, I hope the links do not spam you with annoying ads. I don't get any but I was told that there can be some annoying one.

  • How can I convert the ITHMB photo files to PC readable format like JPEG?

    How can I convert the ITHMB photo files on my new Iphone 4s to a PC readable format like JPEG

    Look at the link and follow instructions to convert the file taken from a different thread in this forum:
    https://discussions.apple.com/thread/2640386?start=0&tstart=0

  • How can I extract the two channels from a stereo track?

    Hi,
    I am writing a class that is able to draw an audio signal. It seems to be working well but I have a question. If I load a mono audio file I am able to draw it on a graph by using the byte[] array and everything is ok until now. That's the code:
    void Draw(byte[] x)
                Graphics g=getGraphics();
                Graphics2D g2=(Graphics2D)g;
                g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,                     RenderingHints.VALUE_ANTIALIAS_ON);
                for(int i=0; i<x.length-6; i++)
                    g2.draw(new Line2D.Float(((i*(getWidth()-6))/x.length)+5, (getHeight()/2)-          ((x*(getWidth()-6))/x.length), (((i+1)*(getWidth()-6))/x.length)+5, (getHeight()/2)-     ((x[i+1]*(getWidth()-6))/x.length)));
    The results is correct only if I have a mono track. Obviously when I get a stereo track the array becomes very large so here the question. How can I extract the two audio channels from a stereo track?
    Thanks in advance.
    Maurizio Di Vitto                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    A mono audio stream is stored [sample, sample, sample, sample], so just a list of samples in an array.
    A stereo sample is interleaved in the same manner, so you get [left-sample, right-sample, left-sample, right-sample]
    So every nth sample is the 1st channel, every nth+1 is the 2nd channel...

  • How should we get the out put file-name same as in put file-name in file to

    Hi frnds,
    having hundreds of files in the sender system with different names, how should we get the out put file-name  in the receiver system same as the in put file-name in file to file scenario ?
    Thanks in advance.
    truly,
    snrvakiti.

    Hi,
    In Receiver File Adapter you can set under 'Adapter-Specific Message Properties'
    check Use Adapter-Specific Message Properties
    check Fail on Missing Adapter Message Properties
    Check File Name
    Have a look at this link,  [File_to_File|http://allsapnetweavernotes.blogspot.com/2008/09/how-can-i-access-filename-from-fileftp.html]
    Regards,
    P.Rajesh

  • How to go to the location of file that I received ...

    How to go to the location of file that I received on skype? I was able to do it easily in old version. 
    Now, I recieved the zip file. If I click on the file, it shows the Zip File View. I don't know where that file is downloaded. (of cuz, need to dip where I set the download path.) In old version of Skype, there is a link where we can open the file in windows explorere.
    I would suggest that the Skype UX or development team needs to read "Don't make me think" short book. 
    Update: There are other people who reported the issues in 2013 http://community.skype.com/t5/Modern-Windows-from-​Windows/Where-are-the-files-saved-that-someone-sen​... Please don't copy all metro skype UI to skype desktop without thinking about usability and royal user expereince. Thanks! 
    Note: Another thing: THis forum seems like it let me post without me logging in. But when I submit the context, it redirects to login page. So, I chose to login with my account and it redirect back me to this forum and the post that I wrote a few min ago was totally gone.. Seriously? 
    Solved!
    Go to Solution.
    Attachments:
    Fuck New UI.png ‏9 KB

    What about this?
    Attachments:
    ShowInFolder.jpg ‏28 KB

  • How do I clear the recently edited files in the file menu?

    How do I clear the recently edited files in the file menu? (ie. cache)

    I don't have PSEv.13, but in my current version, and in the two that I had before, the behavior is/was identical.
    As far as I know, the only way to purge an entry in the list of recently edited files via the File menu, is to delete the picture file or send it to the recycle bin.
    Perhaps someone will come along with additional information.
    "The File option dose not have an option for FILE-MORE-PURGE CACHE. as Adobe suggested."
    Where is this referenced suggestion?? On-line? In a book or manual?

  • How an i compare the two forms ( script) that are in two systems ?

    Hi,
    How can I compare the two forms(sap script)  which are in different versions  or systems? One form is in D22 and other form is P22 .
    My requirement is to change the form when they are different.
    Thanks,
    Suresh.

    Hi,
    You can download the form info for each script and compare these two files.
    In the SAPscript choose Utilities -> Form info and save this as a file.  As they are structured in the same format you can then look for differences in these files rather than having to look through the form window by window.
    Regards,
    Nick

  • I have just donwloaded Firefox 5 to my Sony Vaio laptop and it keeps opening three tabs, I uninstalled it and reinstalled it and it happened agona, how do I remove the two surplus tabs?

    I have just donwloaded Firefox 5 to my Sony Vaio laptop and it keeps opening three tabs, I uninstalled it and reinstalled it and it happened again, how do I remove the two surplus tabs?

    I finally managed to fix this problem! You have to go into your program files and you will see another bearshare folder, this has two add on components for firefox. Go into the folders, and find the uninstall program tools.
    One of them will uninstall here. There is a program called media mrg or something along those lines in your add ons for firefox. You need to delete this, and it should stop bearshare popping up in the tabs. Then just to make sure, I went back and deleted the bearshare folder. You know you have disabled all the right components when it will finally let you delete the folder.

Maybe you are looking for

  • Attribute Tables by User ID

    Hi Guys Hi All I will really appreciate if anyone can let me know if there is a table(s) that stores the attributes in the EBP org structure by user ID. Let me know of any table that stores org attribute information. Thanks

  • I want to refresh my jsf page on the click of command button.

    Hi all, i m using JDEV 11.1.2.1.0 i have created one jsf page with fragment i want to refresh my whole page on the click of command button which is present in fragment page.Besause i want to refresh some field but those are present in jsf page so i c

  • Trying to delete Vault, Aperture 1.5 crashes

    First, i create a vault on an external LaCie 160GB FW drive. Took two tries to create the vault - at least Aperture thinks it is created. but there is nothing in that folder where it supposedly got created. Then when I try and update it, it doesn't d

  • PKI CA CLUSTER CRL PUBLICATION FAILURE

    After configuring PKI cluster , I am not able to publish CRL, i am seeing the error below when i try to publish CRL Event log error Event ID 74 Active Directory Certificate Services could not publish a Base CRL for key 1 to the following location on

  • Hp Pavilion dv7-4157cl

    my hp Pavilion dv7-4157cl turns on but has no display. monitor is completely black. I connected an external monitor and still no display. This question was solved. View Solution.