URL-Rewriting or append query string in URL

Hi
I have one other quetion related to my project I am working and need to finish tonight.
I read one table in first JSP and want to send one column, eventname to the other JSP. Can I use URL-rewriting. I need to keep the event name thruoghout too.
Is this syntax correct..
Please help me !!!

Syntax is:
<a href="ListEvents.jsp?event=eventname">Click me</a>In the JSP, there are two things you may need to do when generating the link.
1. Encode the URL - this is needed if any arguments (in this case "eventname") might include spaces or special characters.
2. Apply URL rewriting info if this may be needed. This will add "&JSESSIONID=xxxxx" if required.
<%
String link = "ListEvents.jsp?event=" + getEventName();  // or whatever gets the event name
link = java.util.URLEncode.encode(s,"UTF-8");    // encode the event name data
link = response.encodeURL(link);                      // add the session id if URL rewriting in use
%>
<a href="<%=link%>">Click Me</a>The event name is retrieved using request.getParameter("event")

Similar Messages

  • SAPGUI Iview and passing logon language as query string in URL

    Dear Portal experts, is it possible to send the sapgui logon language as query string in URL so sso login to EP is language JP and the login to SAPGUI Iview (for windows) can be different langauge eg English. There is a document that talks abt configuration setting for SAPGUI for HTML , but no documentation for SAPGUI for windows using shortcut..
    eg :  http://serverhost:port/...../xxxx.iview?sap-config-mode=true&sap-language=ja
    Please let know ...thanks.
    Regards
    Gabriel

    Hi Gabriel,
    There are some context variables available for Generic component of app integrator. You can refer to the below link.
    http://help.sap.com/saphelp_nw70/helpdata/en/36/5e3842134bad04e10000000a1550b0/content.htm
    I know transaction iView is a different component but worth giving it a try.
    Regards,
    Mahesh
    Edited by: Mahesh Krishnapillai on Jan 6, 2012 1:09 PM

  • Pass multiple query strings to url using HTTPWebRequest

    I'm trying to read data from API (in Json format) and load it into SQL server using script task in SSIS.
    Dim Request1 As System.Net.HttpWebRequest = DirectCast(System.Net.HttpWebRequest.Create(URL), System.Net.HttpWebRequest)
            Dim Object1 As [Object]
            Dim Response1 As System.Net.HttpWebResponse = Nothing
            Dim reader1 As System.IO.StreamReader
            Dim myResponseString As String
            Request1.Headers.Add("Authorization: Token *****")
            Try
                Response1 = DirectCast(Request1.GetResponse(), System.Net.HttpWebResponse)
                reader 1= New System.IO.StreamReader(Response1.GetResponseStream())
                myResponseString = reader.ReadToEnd()
    I'm able to do this with the URL. However, the requirement now is to pass different query strings to the URL and load the data into SQL.
    Could someone please provide the code sample to achieve this.
    Thanks

    If we sent you a code you must try and tell that it doesn't work or that's not what I want, this is better than repeating the same question again and again. Here you go another snippet for httpwebrequest with querstrings and tested:
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Try
    Dim request As HttpWebRequest = DirectCast(HttpWebRequest.Create(New Uri("http://www.google.com?querstring1=1&querystring2=2")), HttpWebRequest)
    request.BeginGetResponse(New AsyncCallback(AddressOf ReadCallback), request)
    Catch ex As WebException
     End Try
    End Sub
    Private Sub ReadCallback(asynchronousResult As IAsyncResult)
    Dim request As HttpWebRequest = DirectCast(asynchronousResult.AsyncState, HttpWebRequest)
    Dim response As HttpWebResponse = DirectCast(request.EndGetResponse(asynchronousResult), HttpWebResponse)
    Using streamReader1 As New StreamReader(response.GetResponseStream())
    Dim resultString As String = streamReader1.ReadToEnd()
    Dim result As String = Convert.ToString("Using HttpWebRequest: ") & resultString
    End Using
    End Sub
    Fouad Roumieh

  • Query String in URL policy?

    Hi all,
    Is it possible in a policy agent to do these:
    1- Filter requests with respect to the query string?
    i.e. = http://www.example.com/go?*allowed=yes*
    (Bear in mind, there might be other fields in the query string)
    2- Is it possible to use query strings in NOTENFORCED uri list?
    i.e. = Access to http://www.example.com/go is not enforced
    Access to http://www.example.com/go?*allowed=yes* is restricted
    (Bear in mind, there might be other fields in the query string)
    3- Is it possible to do these on IIS?
    4- Is it possible to do the same with POST method rather than GET?
    Best,
    Kirpi

    I just solved it and here is the new policy defn that worked.
    My policy definition looks like this :-
    Resource = /ibi_apps/WFServlet
    URL Pattern = /.../*
    Query String = IBIF_webapp=*

  • Query string in URL messes up my deep linking

    My Flex application works great, but if you access the page
    with any query string in the URL, it starts behaving funny, and
    jumping from state to state. Has anyone had any experience with
    that?
    Thanks!

    Apparently this is only happening in google chrome.

  • Hide query string in URL

    How do you hide the query string in the URL?

    Have you tried urlencoding and encrypted copy of the string
    and then unencoding if necessary and decrypting on the next page.
    You will need to use a preserve quotes function within the cfquery
    to keep the single quotes.

  • Is it possible to pass parameters as query string to url iview of of sap tr

    I have created sap transaction iview . and created url iview for this sap transaction iview. Now i want to pass the parameters to this url iview as query string? and this parameter values should populate in the sap transaction screen . Have any body worked on this?
    pl. help.
    thanks

    URL iview I think is not the right way to do this.
    For this we have several templates calles application integrator.
    BR, Oliver

  • Help needed in - appending query string

    Hai All,
    Its very Urgent for me.Can anyone pls tell me how can I do the following.
    I want the query String of first page to be appended to the next following pages also.

    u want first page URL to second page or page data?

  • How to get values from a query string in URL in a jsf page?

    if i have a url, http://my.com/?name=john+smith, how do i get the values from that url in a jsf page and then pass those values to a servlet?
    i know how to do that in jsp using "request.getParamter("name")" and save it in a bean and then forward to a servlet. But what about in jsf?

    Hello,
    Try this:
    Map requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
    String name = (String) requestMap.get("name");If isn't worked one of these methods probably will solve your problem.
    FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
    FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap();hth.

  • In HTTP receiver, how to make a dynamic query string in URL

    Hi,
       I have a scenario where after a map we get an XML output as shown below
    <FUNLOC>000010038</FUNLOC>
    <SECONDARY_KEY>0000010038</SECONDARY_KEY>
    <SOURCE>SAP customer</SOURCE>
    <NAME>NAME NAME12 NAME13</NAME>.
    Now what i need that my HTTP receiver URL should add these tags as
    FUNLOC=000010038&SECONDARY_KEY=0000010038&SOURCE=SAP customer&NAME=NAME NAME12 NAME13.
    Can any one help me out in step by step process to archive this.
    This will be a great help from you.
    Thanks in advance,
    Smita

    Hi Smita,
    Check these threads You can find the solution there.
    https://forums.sdn.sap.com/click.jspa?searchID=5694804&messageID=3189288
    https://forums.sdn.sap.com/click.jspa?searchID=5694804&messageID=3717577
    Regards,
    Sreenivas

  • How do i pass a url with query string using the jsp:forward tag

    This snippet of code gives a 403 error
    <jsp:forward page="testpage.jsp?test=1" />
    How do i rectify it?

    Well better way to go about for the job is to use
    setAttribute("name","value");method in the first page
    and then in next page use method
    String s=getAttribute("name");to retreive the value.
    Url rewritting or using Query String has some disadvantages ,which are handled by above mentioned approach.
    Ashish

  • 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

  • Difference between GET and URL Rewriting in Servlets

    What is the difference between GET and URL Rewriting in Servlets?.Please illustrate with an example.

    Thanks for your reply gimbal.
    GET appends query string at the end of the URL. URL rewriting also does the same thing. It also appends query string right?. Then what is the difference between two. I have this question in my mind for long time.To my surprise an interviewer asked this question in an interview also.

  • If user disable cookie how to set and use session with URL Rewritting

    if user disable cookie how to set and use session with URL Rewritting by append session ID in url

    If cookies are disabled, then app server will automatically try to use URL rewriting for session control. Programmer's responsibility is to encode any links or redirects using
    response.encodeURL("/yourPage.jsp")
    and
    response.encodeRedirectURL("/yourPage.jsp")
    See API for details
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String))

  • IIS Url Rewriting supported with SharePoint 2010?

    I am currently working for a client that is investigating how they can do vanity domain names for sub sites.  I don't believe this will actually work with SharePoint 2010 and believe it may put the environment in an unsupported state...however I need
    to find some sort of official MS statement saying so.
    Everything I find points me to
    http://technet.microsoft.com/en-us/library/cc261814%28office.12%29.aspx#section2  which states that "Windows SharePoint Services 3.0 does not support asymmetrical paths" however I can't find anything that says the equivalent for 2010.
    I know that web apps and AAM are the typical approaches, and now in 2010 you can do host named site collections, however they want to do sub-sites.
    Can anyone point me to any official MS statement stating that this is not support with SharePoint 2010?
    Tony Testa www.tonytestasworld.com

    We ran into the same question. Since there's no official statement from Microsoft to be found on the internet that takes away the rumors about it being supported, we set out the question with Microsoft to provide their official statement. Their
    reply was that URL rewriting is supported. Find the full reply from Microsoft at my website at
    https://www.zomers.eu/knowledge/sharepoint2010/Pages/Url-rewriting-is-supported-for-SharePoint-2010.aspx
    This link doesn't work and also directly contradicts statements from other Microsoft sources, e.g.
    http://blogs.msdn.com/b/opal/archive/2010/04/23/sharepoint-2010-search-engine-optimization-seo-tips.aspx
    where the following is stated:
    "URL Rewriting is still not supported - however url redirect is supported. We are using url redirect feature in url rewrite model."
    Please provide a link that works and/or back up your claim. Thanks.

Maybe you are looking for

  • How to find duplicate row in sql query?

    Hi All, Please solve my query, find duplicate row and how to count its. your suggestion would be greatly appreciated.

  • Inserting authorizations from template

    Hi all, Does anyone know what are the basic authorizations needed for reporting and planning activities. I do not mean the basic analysis authorizations - I mean the basis authorizations - those you usually insert from a template such as S_RS_TREPU.

  • Paste & Paste in Place problem

    Hi there, Recently i have these problem in the following description: 1- Create a new documet. 2- Draw a recangle frame on a page. 3- Copy the frame, and when i go to the other page on the same document the paste command is grayed. Another problem: 1

  • Tunning Libary cache in oracle 9i

    Hey guys ! I need to clarify about the tuning technology related of library cache ! This is one of confusion which is always seems a big stuck for me .. Please help me through some instructions regarding the same .. Thanks for any help ...

  • Using a right click, how can I load in the background a new Google search tab?

    I can click on a link and have it open in a new tab in the background but try as I might I cannot select a word, right click, choose "Search Google for..." and have the new tabe open in the background. It opens in a new tab but then the tab is immedi