Creating dynamic URL parameters

I need to access the form value j_username to create a dynamic url but the following JSP code snippet is putting a blank value into �username�. This is before the form is submitted.
Any ideas ?
<input type="button" name="btnPassword" value="Password?" onClick=
"<c:url var="emailMyPwdUrl" value="secure/MailPasswd.do">
                 <c:param name="username"
                 value= "${document.loginForm.j_username.value}"/>
</c:url>
<input type="button" name="btnPassword" value="Password?"
onClick="document.location='${emailMyPwdUrl}';"> ">         I also tried with JavaScript and am having the same problem!
function getLogin() {
    var user = document.loginForm.j_username.value;
    if ( user == '' ) {
            alert( 'No User Name Entered');
      else {
            alert('User Name Entered:' + user);
            <c:url var="emailMyPwdUrl" value="secure/MailPasswd.do">
                    <c:param name="username"
                     value= "${document.loginForm.j_username.value}"/>
            </c:url>
     document.location='${emailMyPwdUrl}';
}

Thanks for your reply,
So basically when the user presses the "btnPassword" button I want to get the value "j_username" from the form and then redirect (no submit!)to "secure/MailPasswd.do" with parameter "username".
I do not want to submit the form when "btnPassword" is pressed as this will cause the "j_security_check" action to take place.
I am correctly redirected to "secure/MailPasswd.do" but the problem is the parameter "username" is blank when I try to getParameter on the "secure/MailPasswd.do" page.
So am I setting the c:param username correctly ?
Here is the full JSP page as I pasted it incorrectly the last time...
c:set var="fullPath" value="${pageContext.request.contextPath}"/>
<form name="loginForm" method="post" action="j_security_check">
<table  border="0"
        width="350"
        height="263"
        align="center"
        background="${fullPath}/images/include/collage.gif"> 
  <tr>
    <td colspan="3" align="center">
      <c:if test="${not empty error}">
        <font class="error">${error}</font>
      </c:if>
    </td>
  </tr>
  <tr>
    <td colspan="3" align="center">
      <c:if test="${not empty message}">
        ${message}
      </c:if>
    </td>
  </tr>
  <tr>
    <td align="center">
      <table border="0"> 
        <tr>
          <td align="right">
            <span class="text">User ID</span>
          </td>
          <td align="left" colspan=2>
            <input type="text" name="j_username" size="21" />
          </td>
        </tr>
        <tr>
          <td align="right">
            <span class="text">Password</span>
          </td>
          <td align="left" colspan=2>
            <input type="password" name="j_password" size="21" />
          </td>
        </tr>
        <tr>
          <td></td>
          <td>
            <input type="submit" value="${buttonLabel}" />
          </td>
          <td>
          <input type="button" name="btnPassword" value="Password?"
            onClick="           
            <c:url var="emailMyPwdUrl" value="secure/MailPasswd.do">
     <c:param name="username" 
                      value= "${document.loginForm.j_username.value}"/>
            </c:url>
          document.location='${emailMyPwdUrl}';"
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</form>

Similar Messages

  • How create  dynamic URL for every row  shown in the report?

    Hi,
    Iam new to this Application. I created one interactive report to find the number of bugs logged for every product and its sub component for past one year. The report will look like below structure in the application.
    Product Subcomponent Total
    P1 S1 10
    P2 S2 4
    P2 S21 15
    Now i want to pick the value of Prouct and sub component for every row dynamiaclly and want to generate the URL with the conditions and make it as hyperlink for the Total Column.
    Iam able to make hyperlink for the Total column using the edit options for the total attribute, but it is opening the same page for all the rows in the total column. I want to generate dynamic URL by picking the value prodcut and sub componenet dynamically from the report for every row and want to make it as hayperlink for every row individually.
    Please tell me how to do this?
    Please revert back if you are not clear. Appericiate for your quick help.

    Hello <unknown user>,
    So you already set the Column Link attributes for your Total column. Should all links go to the same page, but with different parameters (ProductID, SubcompID)? Or to another page? And how can you determine that page?
    Assuming you'll go to a sort of detail page or form:
    Target = [Page in this app]
    Page = <your target page no>
    Item1 = <ProductID field in target page>
    Value = #PRODUCTID#
    Item2 = <SubcompID field in target page>
    Value = #SUNCOMPID#
    (you can use the ' flashlight' for getting the correct values)
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Dynamic url parameters

    Hi!
    Has anyone experience in adding url parameters to a WDA url at runtime?
    Example:
    We have a WDA application with a tabstrip containing several tabs. Regardless of the selected tab the URL always is the same. What we want is that each time the tab is changed the url is changed. Sample:
    tab1 = www.hugo.com/wdaappl?tab=tab1
    tab2 = www.hugo.com/wdaappl?tab=tab2
    tab3 = www.hugo.com/wdaappl?tab=tab3
    Background:
    We have a tool for creating web statistics and this tool can only deal with urls. We want to measure not only the call of the whole application, but the call of the tabs within the tabstrip.
    Any hints?
    Thanx in advance.
    Regards,
    Volker

    Hello, Volker,
    I believe that can be done, but it can lead to inconsistencies in your application. Suppose you manage to change the URL during runtime; when the URL changes, probably a "refresh" will occur in the browser. That'll make your application start again, from the beginning, and all instantiated components, context elements, etc, will be empty again.
    That gets even more complicated if you are running your application from within a portal iView, as the URL will be that of the Portal.
    Anyway, good luck
    Andre

  • Create dynamic URL Iview type

    Hi Expert,
    I need to create a page with two URL iviews. The first iview is fixed and the other one is flexible and the URL address must be passed by parameter. Is that possible?
    Thank in advance
    Sergio Sepulveda M.

    Hi Sergio,
    it depends a bit from where the parameter should come... Anyhow, a general approach is to develop a wrapper iView around the target iView (component) which takes a parameter / calculates target parameter on the fly and then calls the target component with these dynamic parameters.
    Serach for "proxy iView AND Detlev" on SDN for further details.
    Hope it helps
    Detlev
    PS: As already mentioned, please consider rewarding points for helpful answers on SDN, see tool tips in second level navegation too

  • How to configure HTTP receiver comm channel with dynamic URL parameters?

    I need to perform HTTP Post using PI. URL contains some parameters. I need to set these parameters with different values in run time.
    Please help to do this.
    Thanks
    Ranji

    Check the section Adapter Specific Message Attributes from this help section:
    http://help.sap.com/saphelp_nw70/helpdata/en/43/64dbb0af9f30b4e10000000a11466f/content.htm
    The parameters can be set in the Message Mappinga nd then using the appropriate options in communication they can be included in the message header....for more info search with keywords "Dynamic Configuration" and you will get to know how the procedure works.
    Regards,
    Abhishek.

  • Creating dynamic urls

    Hi everyone, I've got the following problem:
    I have a set of parameters destined for a url that are the same.
    But, I have to add a few parameters to the url before creating it depending on the link.
    Also the url is not the same for each link.
    What's the best way to do it, apart from writing
    3 different <c:url></c:url>?
    Message was edited by:
    dvm.daedalus

    Hi there, I tried to get the external context just like my code below... please see my comments below
        public ShopController() {
            System.out.println("We entered shopcontroller Constructor method");
            //FacesContext.getCurrentInstance().getExternalContext().getSessionMap().clear();
            FacesContext fc = FacesContext.getCurrentInstance();
            FriendlyUrlServlet fus = (FriendlyUrlServlet) fc.getApplication().getVariableResolver().resolveVariable(fc, "FriendlyUrlServlet");
            System.out.println("IS FUS EQUAL TO NULL? : " + fus==null); <--printed out false...
            Shopdetails currentShop = fus.getCurrentShop();  <-- threw an exception saying NullPointerException *****
            System.out.println("IS Current Shop EQUAL TO NULL? : " + currentShop==null);
            //System.out.println(currentShop.getShopname());
            //System.out.println("Laughter: " + context.getExternalContext().toString());
            //context.responseComplete();
        }Why did Shopdetails currentShop = fus.getCurrentShop(); throw a null pointer exception? I suspect that the Servlet did not save the attribute, and when I led control over to the Managed Bean, the Servlet did not save the attribute "Shopdetails"...
    How should I get passed this barrier? I would like to retrieve the Shopdetails Object which was stored in the FriendlyUrlServlet (a servlet) from a ShopController(a managed bean). How to do this?
    Thanks

  • Source of URL parameters when launching the hap_document

    Hi,
    I have been working on the 'Status Overview' iView in the Employee Performance Management module. The source of the table in the iView is the MSS_HAP_STATUS data view in OADP. I have been able to edit and shuffle the columns through the 'define columns' options in the OADP data provider. Some of the columns are shown as links since they are associated with Service Keys which map back to Resources in the homepage framework. The resource 'MSS_MBO_DOCUMENT' is associated with the some of the columns of the Status Overview page. When I click on the link it launches the HAP_Document BSP application with some dynamic URL parameters like
    Application=HAP_DOCUMENT
    PageId=document_portal.htm
    DynamicParameter=NEW_APPRAISER_ID......
    I have been trying to debug the proxy class CL_HRWPC_SER_MBO_PARAMS associated with the service MSS_MBO_DOCUMENT to look for the dynamic URL parameters but didnt find them all in there. I did find some of them but not in the form of the parameter string it generates in the URL.
    Please let me know if I am looking in the right direction. Any help would be really appreciated.
    Regards,
    Prathamesh

    Hi,
    Check SAP note 1505832.
    Thanks
    Sunny

  • How to create Personalized urls

    how to create personalized urls like firstname.lastname.abc.com with out making any individual sub-domain records in DNS

    Hey Ben,
    Yes it is possible to create dynamic URL's.
    1. Simply select the link from the table like so.
    SELECT PK_ID,
           NAME,
           LINK
      FROM IMAGE_INFO2. Edit the region and go to report attributes.
    3. Click the pencil to edit the link column.
    4. Scroll down to the column link section and enter something like 'View' as the link text. You can change that to whatever you like.
    5. Change the target form page in application to url.
    6 In the URL text object enter *#LINK#*. This will substitute #LINK# for the value that is returned by the sql statement in the LINK column.
    Seeing how you are linking to an image you could just do something like this:
    SELECT PK_ID,
           NAME,
           '<img class="mug_shot" src="' || LINK ||'" title="'|| NAME ||'" alt="'||NAME ||'" />' IMAGE,
      FROM IMAGE_INFOThis will generate an image tag and show the image inline with the record. Since this species a class you could use CSS in your header section to format the image to a standard size. Something like:
    <style type="text/css">
    .mug_shot{
       width:200px;
       height:200px;
    </style>Good Luck,
    Tyson
    Edited by: Tyson Jouglet on Jan 12, 2009 4:13 PM

  • Dynamic URL for Exploration View

    Hi Experts,
    We know that we could create Dynamic URL for InfoSpace to get its facet value and chart type
    Would you kindly let me know whether it is possible to get dyanmic URL for Exploration View
    I know it's hard to set chart type but we just want to fitler value on facet
    Best regards
    Alex yang

    Hi Mallik,
    Thanks for your help
    But it looks like this kind of thing does not even for InfoSpace.
    According to the document from SAP, http://help.sap.com/businessobject/product_guides/boexir4/en/xi4_exp_admin_en.pdf
    The strucutre will be as below for InfoSpace if you want to pass parameter value
    http://Test.com:8080/explorer/index.jsp?isna=Dynamic URL Test&fans=Year_:_2013
    We need to use isna to get infospace name or document id and using Fans to get facet value
    But we do not know what's the key word to get exploration view name
    Would you kindly let me know whether there is some document to use?
    Best regards
    Alex yang

  • Performance Issue : Why does ADF Taskflow Portlet (JSF bridge portlet) loading ADF Specific images, css, js everytime from portlet producer with dynamic URL with portlet_id and context parameters?

    Hi All,
    We have used WSRP Portlet in Webcenter Portal Page. The Portlet is created using JSF Bridge out of ADF Bounded Taskflow.
    It is causing Performance issue. Every time static content like js, css and images URLs are downloaded  and the URL contain portlet_id and few other dynamic parameters like resource_id, client_id etc.
    We are not able to cache these static content as these contains dynamic URL. This ADF Specific  images, js and css files  are taking longer time to load.
    Sample URL:
    /<PORTAL_CONTEXT>/resourceproxy/~.clientId~3D-1~26resourceId~3Dresource-url~25253Dhttp~2525253A~2525252F~2525252F<10.*.*.*>~2525253A7020~2525252FportletProdApp~2525252Fafr~2525252Fring_60.gif~26locale~3Den~26checksum~3D3e839bc581d5ce6858c88e7cb3f17d073c0091c7/ring_60.gif
    /<PORTAL_CONTEXT>/resourceproxy/~.clientId~3D-1~26resourceId~3Dresource-url~25253Dhttp~2525253A~2525252F~2525252F<10.*.*.*>~2525253A7020~2525252FportletProdApp~2525252Fafr~2525252Fpartition~2525252Fie~2525252Fn~2525252Fdefault~2525252Fopt~2525252Fimagelink-11.1.1.7.0-4251.js~26locale~3Den~26checksum~3Dd00da30a6bfc40b22f7be6d92d5400d107c41d12/imagelink-11.1.1.7.0-4251.js
    Technologies Used:
    Webcenter Portal PS6
    Jdeveloper 11.1.1.7
    Please suggest , how this performance issue can be resolved?
    Thanks.
    Regards,
    Digesh

    Strange...
    I can't reproduce this because i have issues with creating portlets... If i can solve this issue i will do some testing and see if i can reproduce the issue...
    Can you create a new producer with a single portlet that uses a simple taskflow and see if that works?
    Are you also using business components in the taskflows or something? You can try removing some parts of the taskflow and test if it works so you can identify the component(s) that causes the issues.

  • Creating Bookmarkable URLs - two or more parameters

    I followed the tutorial "Creating Bookmarkable URLs" and I was able to pass 1 parameter OK with values from a database. I don't know the syntax for multiple parameters, though, when using the IDE Design view. I really would like to have bookmarkable URLs using multiple parameters.
    In the url property for the group of hyperlinks, I tried:
    /faces/Report.jsp?testableentityconfigId=#{currentRow.value['testableentityconfig.testableEntityConfigID']}&modelId=#{currentRow.value['device.deviceModelID']}
    When I run the program, the url in the address bar looks like this:
    /Reporting/faces/Report.jsp?testableentityconfigId=%23%7BcurrentRow.value%5B'testableentityconfig.testableEntityConfigID'%5D%7D&%3BmodelId=5
    The desired output would look like this:
    /Reporting/faces/Report.jsp?testableentityconfigId=2&modelId=5

    I tried it (using the TRAVEL FLIGHT table) and it worked for me.
    My url property setting in the Properties window looks like this:
    /faces/Details.jsp?flightId=#{currentRow.value['FLIGHT.FLIGHTID']}&tripId=#{currentRow.value['FLIGHT.TRIPID']}My JSP looks like this:
    <webuijsf:hyperlink binding="#{Page1.hyperlink1}" id="hyperlink1" text="text" url="/faces/Details.jsp?flightId=#{currentRow.value['FLIGHT.FLIGHTID']}&tripId=#{currentRow.value['FLIGHT.TRIPID']}"/>

  • Creating iView for WD ABAP application - Handling URL parameters

    Hi,
    I have a Web Dynpro ABAP application with me for which I have to create a iView in portal.
    This application has certain parameters to be passed via application URL.
    How do I take care of these URL parameters when iView is called?
    Thanks and regards,
    Amey

    Hi Sandip,
    I have created an iView for WD ABAP application.
    But for some unknown reason, it just displayed a tiny cross symbol while previewing it.
    Here are the properties of iView I created :-
    Authentication Scheme = basicauthentication
    Application Name = ZPLdaApp
    Application Parameters = dp=2&tn=ZGLTCO_ATTCH&so=ZGLTCO_ATT&dt=ZLDA_TCO&in=WD_ABAP_TEST
    System = mysap400
    Web Dynpro Client = Windows client
    Any idea what is going wrong here?
    Thanks and regards,
    Amey

  • Creating dynamic parameters

    Post Author: Deepal
    CA Forum: General
    How do I create dynamic parameters for reports that is created from business view?

    You're making things too hard. First of all as soon as you have two methods with the same name (overloaded methods) you won't know which one to use. And secondly you are asking for a generalized procedure to convert a String into an object of an arbitrary class. Can't be done.

  • Pa30 create external url link ( mass opload

    Has anyone been able to upload multiple attachments from a spread sheet to this transaction. Obviously using the function upload. I think the function module that I will need to use is called BDS_BUSINESS_DOCUMENT_CREA_URL.
    I have passed the following to the function module
    classname bus1065
    classtype bo
    client 210
    object_key personell_number 00080063
    and in the next section I am creating a url.
    When I run the function module it seems to be populating the trans pa30 with an attachment but it doesnt have a dynamic link and when you select an attachment you get an info message saying attachment link could not be uploaded.
    Can anyone help with this issue, I will be grateful if you could send me some sample parameters to get the test of the function module working properly>?

    Hi jeromemonange,
    Here is some information about creating hyperlinks in a PDF, both to external sources, such as a website, or to another page within the PDF: http://help.adobe.com/en_US/acrobat/X/pro/using/WS58a04a822e3e50102bd615109794195ff-7cb7.w .html
    Please let us know how it goes.
    Best,
    Sar

  • Dynamic URL for Recv HTTP (Adapter spec attribute enabled)

    Hi,
    I need to have a dynamic URL for one of my cases been worked. the URL is
    httlp://:<host>/perform/XTA?serv=*&action=start
    the event "action" can accept either start/stop or restart. i wanna to control this dynamically and went for recv http enabled with adapter specific message attributes. here i had enabled the check box "URL" and in parameter 1 i had given the name as "action".
    in my message payload the "action" will be start/stop or restart which is handled by UDF for which the code is below:l
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey trig = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/HTTP", "UrlParamOne");
    conf.put(trig,action);
    return "";
    this udf is mapped to the root node of the target...but when execute the case i get the following error
    "Dynamic Header - Missing Message Attributes: URL/HTTP Destination"
    when i execute the url
    httlp://:<host>/perform/XTA?serv=*&action=start
    in browser it works fine and also with fully qualified name in http recv works fine but not with dynamic settings.
    any help on it pls?

    Hi Prabhu,
    Enable Adapter-Specific Message Attributes(ASMA) in receiver HTTP channel.
    Dont enable checkboxes for "URL or HTTP Destination".
    Enable checkbox "Apply URL Parameters"
    for parameter1 textbox give value action
    Regards,
    Praveen Gujjeti

Maybe you are looking for

  • Switches on Network Borders

    Hi There, Can somebody advise how secure is it to place a L2 switch on my network perimter? I heard that it is easy to flood a switch that's exposed to the internet but I'm not sure how accurate is this sentence because I'm aware that switches are no

  • Make function inactive at scale==x

    i have some movie clips that when moused over, become visible.  when clicked the clips are clicked on they tween to center-stage and zoom to fill the extent of my stage. one the zoom completes, i'd like the mouse over effect and function to no longer

  • Setting Up a Personal page

    Hi SCN team, I found Jasons blog and was very happy as this is the feature were we are looking for: http://scn.sap.com/community/getting-started/blog/2012/04/30/personalization-of-scn-content-setting-up-a-personal-homepage# But this is not working as

  • Airport or Extreme

    I have a E Mac 1GHz Power PC G4 3.3 with 256 MB SDRAM running OS X 10.4.11. I am trying to go wireless. Since I have an older E Mac, I thought I needed an Airport card. When I obtained it, it does not fit. Try extreme version?

  • Customizing Tabbed Panels

    I have found several posts to help with this but none seem to work in both IE and Firefox (and I need it to work in both!). Here is my edited CSS: .TabbedPanels { margin:0px auto; padding: 0px; clear: both; width: 780px; /* IE Hack to force proper la