Howto read url query string? Help :(

Hi everyone, I am trying to read the query string from within an applet loaded from a URL. I am loading netscape with the following URL
"http://localhost/mypage.html?param1=help"
I am using code:
System.out.println(getDocumentBase().getQuery());
and all I am getting is a null?
This works with appletviewer so could someone tell me what is going on. I have searched the forum but it seems no answer yet exists for this. Perhaps its not possible?
Info:
OS: Redhat Linux 8
java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

hi,
can it be that there is a problem with netscape?
it would suggest to try on ie, but you use linux and i dont think theres an ie-version for linux available ;P
i would try it on a different browser like opera or something.
thats my suggestion.
hope this helped
cu Errraddicator

Similar Messages

  • How to access FlashVars or URL Query String

    I am a bit of a rookie with Flash/AS3 and I need help trying to access FlashVars or URL in Object/Embed tags. I've searched in the Internet and the forums but cannot get my head around how to implement this.  Here is my example.
    1) ACTION SCRIPT - I have created a simple flash banner with clickable button (sparkle) with a mouse down event.
    The action script (AS3) for the button is the following:
    sparkle.addEventListener(
        MouseEvent.MOUSE_DOWN,
        function(evt:MouseEvent):void {
            var url:String = "http://www.[site_url].com/as/img.cfm";
          var request:URLRequest = new URLRequest(url);
            var variables:URLVariables = new URLVariables();
            variables.gphc = "382";
            request.data = variables;
            request.method = URLRequestMethod.GET;
          navigateToURL(request);
         *** the core issue to resolve is how to make the line above (variables.gphc = "382";) to be set dynamically.  I would like for the variable to come from the FlashVars or the URL vars
    2) OBJECT/EMBED - my object/embed code with include FlashVars and URL Query String
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" ID="bannerAD" WIDTH="728"  HEIGHT="90">
         <PARAM NAME="movie" VALUE="http://www.[site_url].com/images/imgs/flash_ad.swf?gphc=382">
        <PARAM NAME="quality" VALUE="high">
        <PARAM NAME="bgcolor" VALUE="#FFFFFF">
        <PARAM NAME="FlashVars" value="gphc=382" />
        <EMBED src="http://www.[site_url].com/images/imgs/flash_ad.swf?gphc=382" quality="high"WIDTH="728" HEIGHT="90" TYPE="application/x-shockwave-flash"  PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" FlashVars="gphc=382" />
    </OBJECT>
    Questions that I need answered ... How do we access the FlashVars or the URL Query String?  I have found many references to loaderInfo but no clear way to implement that I'm able to understand. So if the loaderInfo is the key, where do I add in the loaderComplete() function into my action script above in #1?
    function loaderComplete(myEvent:Event)
      var flashVars=this.loaderInfo.parameters;
      gphcTextField.text=flashVars.gphc
    this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
    Any help is much appreciated.

    Thank you for your input.  I implemented your sugguestion in the following way without any success.  Notice below in the addEventListner that I have added the snippet of code.  Is this a good place (correct place) to set the local_var?  I did confirm that the FlashVars and URL variables were set.
    sparkle.addEventListener(
         MouseEvent.MOUSE_DOWN,
         function(evt:MouseEvent):void {
             var url:String = "http://www.[site_url].com/as/img.cfm";
             var request:URLRequest = new URLRequest(url);
             var variables:URLVariables = new URLVariables();
             var local_gphc:String = LoaderInfo(this.root.loaderInfo).parameters.gphc;
             variables.gphc = local_gphc;
             request.data = variables;
             request.method = URLRequestMethod.GET;
           navigateToURL(request);
    Thank you for your help.

  • URL query string block?

    I was asked recently if there is a way to "block" the potential for someone to hijack a SWF by spoofing a variable via a URL query string.
    For example, if there was a path variable hardcoded in the SWF that is pointing to data XML file, but someone found your path variable and typed in:
    http://www.mysite.com/myFlash.swf?dataFile=maliciousdata.xml
    That could change the variable in the SWF correct? Is there a way to block this behavior? Maybe a trick? Was thinking of delaying the declaration of the variable in the SWF in order to "void" anything coming in via the query string but want to know if there are other methods that could be used.
    Thanks!

    Hi,
    in the old (AS1) days, url variables could become program variables. With AS3, you need to specifically retrieve them from an object
    Of course, if you create your swf to do that (perhaps to see different data files during testing), someone else could abuse the feature

  • HELP INPUT TYPE = hidden  values SEEN IN URL QUERY STRING!!!

    Trying to do session management using hidden fields.
    The fields that are suppose to be hidden show up in the query string of the URL.
    I have included the code, the output to the web page
    and the URL with the "hidden" fields please help.
    HIDDEN FIELDS IN URL QUESRY STRING
    http://localhost:8080/myApp/servlet/Servlet077?firstName=Sandra&item=Michael
    WEB PAGE OUTPUT
    Enter a name and press the button
    Name:
    Your list of names is:
    Michael
    Sandra
    JAVA SOURCE CODE
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Servlet077 extends HttpServlet{
    public void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException{
    //An array for getting and saving the values contained
    // in the hidden fields named item.
    String[] items = req.getParameterValues("item");
    //Get the submitted name for the current GET request
    String name = req.getParameter("firstName");
    //Establish the type of output
    res.setContentType("text/html");
    //Get an output stream
    PrintWriter out = res.getWriter();
    //Construct an HTML form and send it back to the client
    out.println("<HTML>");
    out.println("<HEAD><TITLE>Servlet07</title></head>");
    out.println("<BODY>");
    //Substitute the name of your server or localhost in
    // place of baldwin in the following statement.
    out.println("<FORM METHOD=GET ACTION="
    + "\"http://localhost:8080/myApp/servlet/Servlet077\">");
    out.println("Enter a name and press the button<P>");
    out.println("Name: <INPUT TYPE=TEXT NAME="
    + "\"firstName\"><P>");
    out.println("<INPUT TYPE=submit VALUE="
    + "\"Submit Name\">");
    out.println("<BR><BR>Your list of names is:<BR>");
    if(name == null){
    out.println("Empty<BR>");
    }//end if
    if(items != null){
    for(int i = 0; i < items.length; i++){
    //Display names previously saved in hidden fields
    out.println(items[i] + "<BR>");
    //Save the names in hidden fields on form currently
    // under construction.
    out.println("<INPUT TYPE = hidden NAME=item "
    + "VALUE=" + items[i] + ">");
    }//end for loop
    }//end if
    if(name != null){
    //Display name submitted with current GET request
    out.println(name + "<BR>");
    //Save name submitted with current GET request in a
    // hidden field on the form currently under
    // construction
    out.println("<INPUT TYPE = hidden NAME=item "
    + "VALUE=" + name + ">");
    }//end if
    out.println("</body></html>");
    }//end doGet()
    }//end class Servlet07

    1. Change <form name=xxx action="your_servlet" mathod="Get"> to
    <form name=xxx action="your_servlet" mathod="POST">
    2. Add the following lines of code to your servlet.
    public void doPost(HttpServletRequest req, HttpServletResponse res)
            throws ServletException, IOException {
            doGet(req,res);
            return;
    }Sudha

  • Include XML payload as URL query string

    Hello Gurus -
    I have a business requirement that I'm hoping you all can help me with:
    Scenario: Send XML message from SAP XI to a third party system via the Receiver Plain HTTP Adapter
    I need to include the actual XML message as a query string in the target URL at the time of posting. The content of the XML message is determined within XI message mapping and will not be known until runtime, so the URL determination will need to be dynamic.
    For example - a target URL with the "xmldata=" query string:
    http://server01/receiver.asp?xmldata=<?xml version="1.0" encoding="UTF-8"?><headertag><tag1><value1></tag1></headertag>
    Does anyone know how to do this - Is there some communication channel configuration and/or programming that would work?
    Thanks to all!
    Chad

    Hi,
    This is very similar to our scenario. By manipulating some of the Plain HTTP Adapter parameters, my colleague was able to post using xmldata. He set content type to text/plain then set the prolog to xmldata=. Let me know if this worked.
    Regards

  • Portal URL Query String

    I am creating a Portal component and I want to catch the query string passed thru Portal url.
    Example:
    Suppose If user login thru this URL
    http://localhost:50000/irj/portal?userID=test
    I want to catch this userID=test in my component.
    Is it possible?
    Many Thanks,
    B Das
    Message was edited by: B Das

    Hi Das,
    HttpServletRequest Object contains many methods like
    HttpServletRequest servletRequest = request.getServletRequest();
    servletRequest.getRequestURL();
    servletRequest.getQueryString(); -->
    servletRequest.getParameter();
    servletRequest.getProtocol(); etc..
    Hope this helps..
    Regards,
    Karthick K Eswaran

  • CiscoIPPhoneExecute with URL query strings

    Has anyone successfully used the CiscoIPPhoneExecute xml object with URLs that contain query strings? Specifically, I'm wondering how to pass query string values that include spaces.
    I'm able to successfully execute a URL such as:
    http://<webaddress>/PushPage.asp?Field1=Value1&Field2=Value2
    However, when I try to execute a URL like:
    http://<webaddress>/PushPage.asp?Field1=Value with space&Field2=Value2
    The phone displays an error message that says "Not Available", and the url that is pushed never gets executed.
    I have tried representing spaces in the query string values using both the conventional "+" symbol, and I have also tried using "%20". Neither of these escape sequences seems to work.
    Thanks for any advice.
    -Mike

    Thanks for the response. As I stated above, I know that ampersand (&) must be escaped, and I am properly escaping that character in the XML packets. I'm not having any problems pushing URLs that contain ampersand.
    What I can't figure out is how to push URLs with *SPACES* included in the query string values. Please see the example URLs I posted in my original message, specifically the second URL. Again, I omitted the necessary ampersand escape sequence there for clarity.
    -Mike

  • On Demand process get url query string

    Hi,
    When I call On Demand process , is there way inside that process get url query sting or whole url did call On Demand process?
    I did try below but it returns null
    owa_util.get_cgi_env('QUERY_STRING')Regards,
    Jari

    You'd know this better than me - but I seem to recall there are 2 Oracle sessions involved in normal page processing - one for the request and one for the response. wwv_flow.show seems to correspond to the response session, not the request session (that might have the env variables you're looking for). Could that explain what you're seeing?

  • Encoding URL Query String .

    Suppose my url is
    Now i dont want my url to look exactly like this but instead of these alpabets abc some special charaters should appear on the querry string in url .
    If any body could help please .
    Thanx in advance .

    Don't be silly, of course you can! You just need a little JavaScript.
    Somewhere in your document header put a short script like this:<SCRIPT>
    function doPost(val1,val2,val3,val4){
       var f = document.formName;
       f.FirstVal.value = val1;
       f.SecVal.value = val2;
       f.ThrdVal.value = val3;
       f.FrthVal.value = val4;
       f.submit();
    </SCRIPT>Your form will look something like this:<FORM NAME="formName" METHOD=POST ACTION="some.action">
    <INPUT TYPE=HIDDEN NAME="FirstVal" VALUE="">
    <INPUT TYPE=HIDDEN NAME="SecVal" VALUE="">
    <INPUT TYPE=HIDDEN NAME="ThrdVal" VALUE="">
    <INPUT TYPE=HIDDEN NAME="FrthVal" VALUE="">
    </FORM>And your links will look something like this:<A HREF="javascript:doPost(1,2,3,4);">Link1</A>
    <A HREF="javascript:doPost(3,4,5,6);">Link2</A>
    <A HREF="javascript:doPost(4,5,6,7);">Link3</A>

  • Project server URL Query strings

    Hello,
    I'm trying to auto populate Project Server with project details, but I can't find the strings for name and Descriptions, 
    Trying: http://servername/pwa/Project%20Detail%20Pages/ProjectDetails.aspx?NewProject=yes&EntProjectTypeUID=8e006270-7ea1-e311-93f7-00155d01206a
    using &name=test
    Didn't fill in the name
    any Idea.
    Thanks
    tony
    Antoine AL Ibry

    Antoine,
    A little more detail would help. What are you using actually to auto-populate?
    The Name, and other properties in Project Server are "fields", and not page properties (not sure if I am using the right terminology here, but hope you get the idea).
    My guess is that you will have to use one of the PSI methods to do this.
    http://msdn.microsoft.com/en-us/library/office/ms457477(v=office.14).aspx
    Also you might get better answers if you post to the Project Customization and Programming forum.
    Prasanna Adavi,PMP,MCTS,MCITP,MCT http://thinkepm.blogspot.com

  • HTTP Sender Adapter - URL / Query String - Posting problems ?

    Hi All,
    Scenario: Partner sending order request via HTTP adapter to XI
    I have configured my scenario and this is a sample URL I gave to Partner but when they try to post, they get "Connection Failed" error.
    http://server.cmpny.com:1234/send/test/message?
    service=Send_Order
    &namespace=urn%3Asap-com%3Adocument%3Asap%3Aidoc%3Amessages
    &interface=ORDERS.ORDERS05
    &party=ABC&qos=EO/
    Party Name : ABC
    Service : Send_Order:
    Interface: ORDERS.ORDERS05
    Namespace: urn:sap-com:document:sap:idoc:messages
    This partner has been "successfully" exchanging data for other messages using the same hostname/userid/passwd, so is there any problem my URL encoding ?
    Any help is appreciated
    Bob

    Hey
    i m not sure how u generated the URL for the scenario but the best approach would be to use the following HTTP test tool for it
    /message/266750#266750 [original link is broken]
    just use the code given by Mr.Stefan Grube .
    secondly instead of host name ,give the IP address of the XI server.
    Thanx
    Aamir

  • Reading parameters from Query string : Sender SOAP adapter.

    Hello Experts,
    I have a SOAP to SOAP scenario. Here we will have multiple receivers and dynamic receiver determination is needed.
    The sender will send a Value in Query string of URL to sender SOAP adapter. This value in Query string parameter will decide the receiver at runtime.
    I need to know, how can we read values from Query string of incoming call? I did tried to search blogs & forum threads but unfortunately not able to hit the right links.
    Any inputs will be of great help.
    Should i use "Use Query String" on sender soap channel? I tried it, but i was not able to find any query string parameters in SOAP header or payload.
    Please guide me, its bit urgent.
    Regards,
    Abhi.

    > But the argument provided from their side is: They are using standard XSD and this service is provided out of box with sender application.
    If they can add a URL parameter, they can also add a field to the structure.
    > They cant control the value mapping of parameters in payload to the extent required to implement this change.
    Adding a new field to the structure would not affect any existing mapping.
    > Since they have this custom requirement of multiple receivers & receiver to be determined at runtime, they need to go for Query string.
    This can be done based on any field of the payload.
    > I need to find a way to read the query string in any case.
    This is not supported by SOAP adapter.
    > Can I use one of the header parameters to be mapped to this value  (By selecting "Use Query string" & "Keep Headers" flag in sender CC) & then extract this value from header using Dynamic configuration ?
    This feature works only for XI header fields, like message ID or QoS.
    Not for individual parameters.

  • How to pass url parameter string to a query

    I need urgent help please, to pass a mysql query string from a master page to another details jsp page using a url parameter. The master page's url parameter looks like this;
    <a href="Details.jsp?jobs=<c:out value="${row.actions_id}"/>"><c:out value="${row.action_title}"/></a>How can I query the mysql database using the url query string to get the query details.
    Please help me out with detailed example please.

    You can get the parameter value using HttpServletRequest#getParameter():String jobs = request.getParameter("jobs");You can interact with databases using the JDBC API. This is a different topic. If you aren't familiar with it yet, then learn it. There is a very good JDBC tutorial here at Sun.com: [http://java.sun.com/docs/books/tutorial/jdbc/index.html]. Once you're familiar with that, create a DAO class which does the all the database interaction tasks. Create a method which takes the jobs value as parameter and let it return result(s) accordingly. You may find this article useful either: [http://balusc.blogspot.com/2008/07/dao-tutorial-data-layer.html].

  • Read Query String Parameter Value in SSRS

    Hi,
    We have Project Server 2010 and Sharepoint Server 2010 env and using SSRS 2008 R2 for reporting purpose in Native mode.
    Here I am displaying the SSRS Project report in Project Server page using Report Viewer web part like below.
    Here I want to read projuid query string parameter value (Highlighthed above in URL ) in SSRS by using any way, so that I can pass that
    projuid value in my SSRS report parameter to filter and make this report dynamic.
    Right now I have to select the ProjectName (Label) which passes ProjUID
    as value from the Parameter, but I want it should read the projuid
    from URL so that this reports will display the project the data for the opened Project automatically
    Thanks and let me know in case we can achive this using OOTB or some custom functions.

    Hi,
    For the report parameter, you can get the value from database query or some embedded funcitons etc. or even some customerized function.
    You may consider to create your own code for the report to read the projuid from application or URL. The customer code can be used to get the values from the applicaiton or from the url etc. Then report can call the customer code function to get the value.
    refer link
    https://technet.microsoft.com/en-us/library/ms155798(v=SQL.100).aspx
    https://support.microsoft.com/kb/920769?wa=wsignin1.0
    Thanks,

  • Question to Proxy in Reading Query String

    Hi, our team have a problem, and let me state below:
    We use reverse proxy in machine A to redirect to machine B.
    Machine A is SJWS 6.1, and it has customized SAF.
    The SAF has one mission, which is to retrieve query string from each requests.
    The question is:
    When the SAF read the query string in body data( with netbuf_getc() ), the application in AP SRV cannot read anything about query string.
    In the contract way, if we let AP SRV to process data through query string first, and then we try to get body data( with netbuf_getc() ), NSAPI gets nothing.
    Any suggestion?!
    thanx.
    environment:
    ================
    machine A:
    Windows 2003 Server Enterprise (32 bits)
    Sun Java System Web Server 6.1 SP5 with Reverse Pxory Plug-in
    machine B:
    Windows 2003 Server Enterprise (32 bits)
    Sun Java System Application Server 8.1 (Enterprise, Platform both have been tried.)
    ================
    Message was edited by:
    potai.tsou

    The query string is part of the request URI. It is never part of the request body.
    I assume you mean that your SAF reads the request body to extract form data. If your SAF consumes the request body, that request body will not be available to other SAFs.
    It sounds like you should consider writing an input filter, not a SAF, that will process the request body. There's information on input filters in the NSAPI Programmer's Guide at http://docs.sun.com/source/817-1835-10/npgcfltr.html.

Maybe you are looking for

  • When will Creative recognize the linux opportuni

    Just bought a Zen Touch. Pretty nice device, but where is the linux commitment? Why am I forced to use an OS(M$), that has nothing to do with the MP3-Player to operate it's Although I'm already use kzenexplorer, libnjb I definetly would like to see f

  • Double pictures in projects

    Today I recognised that in my older projects (2010 and earlier) all versions are doubled. I never did this deliberately. This issue concerns thousands of pictures - how can I identify and delete all double versions - what may have caused this and how

  • Oracle 11gR2 RAC and DR setup

    Environment: Oracle 11gR2 RAC (2 node) with ASM HP-UX B.11.31 U ia64 We have configured two ASM disk group for Data & FRA, and we configured RMAN backup into FRA location. Now our Database, Log file, Archive logs and RMAN backup files all are in ASM

  • Table Modifications in Logical Standby

    Can I add a new column to a table in a logical standby for a table which is actively synchronized from the primary?  In essence, I would like to add a column to the table in the logical standby, but not add the column to the corresponding table in th

  • Print button that prints only certain pages

    I am using Acrobat Pro, and have a large document, the first four page section of which can be a stand alone document. I have set up one print button which uses Execute a menu item > File > Print, for users who want to print the whole document. I wou