Simple question(?): How to read parameters in JSP?

I am trying to get a parameter passed to my JSP script through an URL like this:
http://www.somewhere.com/cgi-bin/myscript.jsp?variable=test
How can I read the context of the variable "variable" within the JSP code? The content must be placed in a string... Is there any way to do it?
I tried to find this info everywhere, and I thought it should be the most basic thing on earth, but nada. Any help would be greatly appreciated!

I am trying to get a parameter passed to my JSP script
through an URL like this:
http://www.somewhere.com/cgi-bin/myscript.jsp?variable=
est
How can I read the context of the variable "variable"
within the JSP code? The content must be placed in a
string... Is there any way to do it?
I tried to find this info everywhere, and I thought it
should be the most basic thing on earth, but nada. Any
help would be greatly appreciated!
To get the parameter use
String something =request .getParameter("variable");

Similar Messages

  • Very simple question, how do you configure windows 8.1 to use a SF card as the default install location for software applications?

    Very simple question, how do you configure windows 8.1 to use a SD card / external drive as the default install location for software applications? Primarily interested in apps installed from the windows store. This should be available in the settings
    charm within the windows store. This must have been overlooked in the development of windows 8.1 or is a bug.
    Regards, Bill
    * update
    I've tried modifying this key and the path:
    “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx”
    http://answers.microsoft.com/en-us/windows/forum/windows_8-windows_store/how-do-you-install-apps-in-windows-8-from-the/c4fbe2a8-fd3d-41c1-b9a6-6f881eed374f
    Also tried using symlinks as detailed here:
    http://social.technet.microsoft.com/Forums/windows/en-US/8eee52c2-db0f-4032-8c72-7cd999e8b41a/windows-8-apps-installing-to-secondary-drive?forum=w8itprogeneral

    Here's some links I've used to try to figure this out:
    http://social.technet.microsoft.com/Forums/windows/en-US/2dfc0cd9-7d1b-41de-abce-e03fb6a5a383/metro-apps-not-working-in-windows-8-pro-x64-after-moving-users-and-programdata-folders?forum=w8itproinstall
    http://social.technet.microsoft.com/Forums/windows/en-US/8eee52c2-db0f-4032-8c72-7cd999e8b41a/windows-8-apps-installing-to-secondary-drive?forum=w8itprogeneral
    http://social.technet.microsoft.com/Forums/windows/de-DE/f5e33ac9-beab-4b99-b3ca-7cb5e6f415e4/how-do-you-change-metro-apps-default-install-location?forum=w8itprogeneral
    Regards, Bill
    The registry method does not work with 8.1.  I found this out the hard way.  Doing it on 8.1 will leave you reinstalling the OS if you didn't do a SRP beforehand.

  • HT4753 I have a very simple question: how do I view where Lion has autosaved my current version to (without the convoluted route of using finder)? In days gone by i'd simply use the save as function to see where it was being saved.

    I have a very simple question: how do I view where Lion has autosaved my current version to (without the convoluted route of using finder)? In days gone by i'd simply use the save as function to see where it was being saved.

    It's actually even easier than using Save As to see the full path to the currently open document. Just do a "Secondary click" on the document title in its window's title bar.
    Like you, I relied upon Save As my whole life to check a file's location and considered it a must-have capability. Turns out it's even faster to use the single-click method to reveal the full path to the open document. It displays the entire path to the current document starting from the level of your Mac, and works for files stored on drives as well as iCloud.
    If you're not sure how to do a secondary click, go into System Preferences, select Trackpad, Point & Click to find the current preference for secondary click on your Mac. If you happen to have a mouse with more than one button, it's probably the right button. As a trackpad user, I check the box to "Click or tap with two fingers," so a simple two finger tap on the title of an open document reveals its full path. This feature actually has been around for a very long time.
    Note that this is not the same thing as the Autosave and Versions menu, which is exposed using a little drop down triangle to the right of the title. There is no visual clue for the presence of this feature - you just have to know it's there, probably because this feature goes all the way back to pre-OS X days.

  • Simple question - How do you make an onchange event occur in a select list

    Simple question - How do you make an onchange event occur in a select list to fire a process?
    Thanks

    1) Using ApEx Selec list on Submit Item.
    You will create a PL/SQL Process after Submit. -> Conditional Type Request = Expression1. -> Expression1 is the name of your Select List. Process Source - > Procedure you like. For example depending of your select List value you will add rows in different tables.
    2) Javascript This example will change a System parameter value when changed
    <select id="P3_SUBSYSTEM" onchange="location.href='f?p=101:3:2164422329953284::NO::P3_SUBSYSTEM:'+this.options[selectedIndex].value;" size="1" name="p_t21">

  • New comer ask 2 simple questions:how to set the use of the right click of

    New comer ask 2 simple questions:how to set the use of the right click of your mouse?
    I don't know why when i click the right button of my mouse in logic, sometimes it's the same funcion as my left one, some times it's the same function that opens the tool menu....But in MacOSX,it's all okay.Just the weired thing in logic ,please help
    2.is there any kind of filter in Score? I mean, in midi track I have a C1 note, and I don't want the C1 note shown in my score, I want every note show which are above C2, like a filter. I think this is helpful dealling with some keyswich things,how can we do that?

    In Preferences -> Global -> Editing you can choose weather right click is assignable or opens the tools box.
    Not to sure about the score dude

  • Simple Question: How to search for a date value in SELECT

    Probabily a simple question, but in a SELECT statement, how do you do a search for a date value in the WHERE clause?
    example:
    Select * From Example
    Where date = 01/01/2001
    I know its not as simple as that, but what change has to occur to make it do what that example implies?
    Thanks In Advance.

    If you want to avoid the conversion part(to_date) you will need to specify the date in the format as ur nls date format.so the same query might not work if you change ur nls date format.
    so it is advisable to give it in general format.
    ie where date_col=to_date(01-01-2000,'dd-mm-yyyy')

  • Simple Question - How do I deploy custom taglibs to Oracle 9iAS r2?

    Simple question.
    There are lots of simple examples on JSP custom tags that have
    a .tld file, a .java file with the handler class, and a .jsp
    file that calls the custom tag to test it.
    My question is, lets say I have a .tld file, a .java file and
    a .jsp file for a tag example. How do I deploy them to
    Oracle 9iAS r2? I'd like to code an example and deploy it,
    but I'm stuck. I'm using Jdeveloper 9i, and have compiled the
    .java file and included it and the .tld in a Custom Taglib JAR.
    How is this JAR deployed to Oracle 9iAS, considering that the
    Enterprise Manager only deploys WAR and EAR files? How do
    a configure a web app to use the custom tags...
    This should be simple -- maybe its too simple so I'm stuck!

    check out ojspdemos which comes with the product.
    Also see
    http://otn.oracle.com/tech/java/oc4j/doc_library/902/jsp/taglibs.htm#1004903
    -Prasad

  • Simple question - How to find date

    Hi Experts,
    I have a simple question on date. Suppose today is Jan 4, 2010. I have to find out Jan 1, 2007 using Java code.
    I have used following code. This code will work for 2010 and 2011 properly. However it won't work properly after Feb 28, 2012. Please see "dayInMillis*1096 " portion of code. Here 365365366 = 1096.
    How I can avoid this hard coding. Do we have any simple way to get Jan 1, 2007 even without using following code.
         Calendar calendar = Calendar.getInstance();
         int lastDate = calendar.getActualMaximum(Calendar.DATE);
         int firstDate = calendar.getActualMinimum(Calendar.DATE);
         int todayDate = calendar.get(Calendar.DATE);
         int dayofyear = calendar.get(Calendar.DAY_OF_YEAR);
         java.sql.Date currentdate = new java.sql.Date(System.currentTimeMillis());
         long dayInMillis = 1000 * 60 * 60 *24; //1 day
         wdContext.currentContextElement().setFromDate(new Date(System.currentTimeMillis() - dayInMillis*1096 - ((dayofyear-1)*dayInMillis)));
    Please help.
    Regards,
    Gary

    Hi Gary,
    I am not pretty much clear with your question, whatever i have understood, i have found a way to get the previous date given the current date.
    Below is the code for the same.
                           Calendar now = Calendar.getInstance();//Jan 4, 2010
           String nowDateStr = DateFormat.getDateInstance().format(now.getTime());
           System.out.println("date now : " +nowDateStr);
           now.add(Calendar.YEAR, -3);//2007
           now.add(Calendar.DATE, -3);//1st
           now.add(Calendar.MONTH, 0);//No change in month, Jan.
           String changedDateStr = DateFormat.getDateInstance().format(now.getTime());
           System.out.println("date changed : " +changedDateStr);

  • Very simple question-how to fill a shape I draw with color

    hi. I am new to photoshop and having a lot of trouble selecting any shape that I draw. I am trying to do a tutorial that involves filling a canvas with gray, then drawing a smaller white rectangle inside of the larger gray canvas/rectangle. (I did not forget to unlock the background).
    My question: how do i select and fill (with white) the second rectangle I draw on top of the larger gray rectangle???
    In general, I cannot figure out how to select and/or fill any shape I draw using the rectangle tool. Likewise, the marque shape tools are no help as I cannot seem to draw a marque on my gray rectangle in order to select it and fill it with a white fill. I have also tried to use a "fill layer."
    I am almost certain that something is wrong with my computer(I reset the settings), but then again I have not used photoshop in over a year. Any help  will be greatly appreciated.

    The Rectangle Tool sgould create a Work Path, Shape Layer or Fill Pixels according to the Settings in the Options Bar.
    The Rectangular Marquee Tool should create a Selection, which you could Edit > Fill or use as a Layer Mask for a Solid Color Layer.
    Could you please post a screenshot with the pertinent Panels visible?

  • How to read parameters from request object

    We want to read parameters from GET request
    but whenever we are calling GET_URI_PARAMETER from the REQUEST we don't see any results
    url is like
    http://coevi116.wdf.sap.corp:8000/sap(bD1lbiZjPTEwMA==)/bc/bsp/sap/z_test_json/jsontest.htm?PARAM=ABC
    But reading PARAM is not givng value of ABC
    onCreate and onRequest wherever we put the code it is not reading the value
    Can anyone please help and share some expert opinion

    in jsontest.htm page create a page attribute named "PARAM" with auto check box checked and check in oninitialization, this will carry the value passed to param from url.

  • Simple Question: How do I read from keyboard?

    How do I read characters or integers from the keyboard?
    InputStream with try/catch?
    Can someone write code to show me how?

    play with this a little...
    it has the basics,
    best i can do right now...
    import java.io.* ;
    import Car ;
    class MilesPerGallon
      public static void main( String[] args )
          throws IOException
        BufferedReader userIn =
            new BufferedReader(
            new InputStreamReader( System.in ) );
        String line;
        int    startMiles, endMiles;
        double gallons;
        System.out.println("Enter first reading:" );
        line = userIn.readLine();
        startMiles = Integer.parseInt( line );
        System.out.println("Enter second reading:" );
        line = userIn.readLine();
        endMiles = Integer.parseInt( line );
        System.out.println("Enter gallons:" );
        line = userIn.readLine();
        gallons = Integer.parseInt( line );
        Car car = new Car(
            startMiles, endMiles, gallons  );
        System.out.println( "Miles per gallon is "
            + car.calculateMPG() );
    }

  • A very simple question: how to obtain the mail server name?

    In our JSP application, at one point an email will be sent to notify one event. Currently, that is done by using the html tag: mailto. To have more control on the email in tems of context format (a bad layout right now) and others. I would like to have it processed at servlet by using the JavaMail API, so that it have a nice format and have the sender's email address right in case email client is not installed in the machine where the browser in. The JavaMail API is straight forward. The question is how to obtain the mail server name, and the sender's email address if there is one?
    Thanks.
    v.

    How to obtain the mail server's name? It's your server, you should know its name. Or if it isn't your server, you should ask the administrator for its name. Point is, you need to decide in advance what server you are going to use and hard-code its name into the program or into a properties file.
    And how to obtain the client's e-mail address? You have to ask the client, probably by putting a box in the HTML and asking them to type it.

  • Simple question- How do I change a comment I made in Adobe Kuler?

    Do I have to delete and start over?
    A simple and silly question I know... but I can't seem to "edit" a comment I attached earlier to a colour profile. Thank you in advance!

    How do I enable the right clicking function that allows one to delete things?
    Open System Preferences +Keyboard & Mouse+ pane. Click on the Mouse tab. Set the right side click on the mouse to +Secondary Button+.

  • A simple question: how to create a folder in the active root

    I have a simple little issue:
    When I go in the "Finder" down the folder chain to what ever place with the intention to create a new sub folder, using "file" + "new folder" the system always create the new folder in the main root versus creating it where I'm standing (highlighted root) in the folder chain.
    Any idea how to make the new folder directly under the highlighted root?
    Thx

    If you are in column view a new folder will be created in the selected folder, but if you are using the other views you need to actually open the folder. The path shown at the top of a Finder window will show the target of the window (which is where a new folder will be created).

  • How to read images in jsp from an absolute path not from the web app?

    hello there
    i want to read images from an absolute path on the hard disk not from the images folder in the web application
    how to do that?
    thank you

    Ok. You don't give the servlet the full path of an image. You just give an image id in query string. E.g.
    http://my.server.com/imageServlet?id=12Id can be whatever: number as well as name.
    Then, in your servlet You get this id, then read an image file that is mapped for this id and sends it to browser via servlet output stream.
    On the jsp page you write sth similar to:
    <img src="http://my.server.com/imageServlet?id=12"/>and your image will be displayed using your servlet. The image file path is needed only in the servlet code to open the stream to file (image file can be stored wherever you want in file system), read it and write to output stream. Read the tutorial accessible via link I provided in the previous post.

Maybe you are looking for

  • Ugh. help me if you can!  Proplem w/  front-row.  no music on slideshow

    forgive me if this is a small problem that I should be able to resolve on my own. When using Front Row to access a slideshow, the music that I added to the show doesn't play! Yet, when I launch the show from iPhoto, it plays. This happens on only one

  • Labview FPGA compile stuck at "Place and Routing"

    I am using LabVIEW 2010 SP1 32-bit FPGA module.  I've built a very large program that was first done back using LabVIEW 8.6, so I have several years experience on LabVIEW FPGA. When I say it's a large program, I mean that a several times over the las

  • Application content migration manually from EP 6.0 to EP 7.0 EHP1

    Hi All, We have EP 6.0 portal system running on windows 2003 server and oracle .We have another EP7.0 EHP1 portal system installed on AIX 6.1 and oracle. The present portal is connected to BW, CRM and ECC systems and also lot of customization is done

  • Default open jpg to photoshop cc 2014 in win 8.1

    Why dont beta testers find things like this. in windows 8.1, you can not change the default program for jpg, jpeg or gif to photoshop cc 2014 in default settings it always defaults to photoshop cc 64bit instead. Tif and Tiff however can be switched t

  • CS3 Education Version on Mac_Timeline Issue

    Premiere works fine most of the time, but occassionally I will have issues within the timeline. What happens is I will be zoomed in on some portion of the timeline, and I will grab a clip with the selection tool and simply try to drag it over to wher