How to pass parameter in query string

Hi Friends,
I have a working struts app with Action classes and Servlets...now I need to pass query paramter to one of the servlets,can someone please tell me how to do that.I tried to put this code in web.xml but failed:
<servlet>
<servlet-name> test</servlet-name>
<servlet-class>com.app.Test </servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>test</servlet-name>
    <url-pattern>/app/Test</url-pattern>
  </servlet-mapping>And then I tried to pass parameter as:
http://localhost:8080/app/Test?param=value
Please tell me guys how to accomplish this.
Thanks in advance

What do you mean by fails? Can you access the Servlet without the parameter? Do you get a null value when trying to retrieve the parameter?

Similar Messages

  • How can pass the Maximum query String parameter in browser.....?? (URGENT)

    hi Guys,
    i make the application, in which lots of data record with id, whenever i clicked to the SUBMIT button, it wil forwarded to the next page.
    But The problem is.....when we pass the 30 id in a query string parameter that' fine but when it is incresing it is not transfaring to the next page. how i can do this.
    As per the concept EVERY BROWSER HAVING THE LIMITATION..
    hope all of u help me.
    saM

    hey all of you are saying right..!!
    But you know the doPost() method having the limitation, that is
    1 MB. so how can i used this method.
    I know the second way....Like make the hidden control with mantain the session, but i can not use this(Client do't want this).
    so please guys help me........
    saM

  • How to pass parameter to the Query String of the Named Queries'SQL

    Firstly to say sorry,I'm a beginner and my English is very little.
    Now I want to know
    How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
    Thanks.

    benzi,
    Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    Also see section 5.9 and chapter 18 in the developer's guide.
    thanks

  • How to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part

    Hi,
    I want to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part like mentioned below:
    http://server/pages/Default.aspx?Title=Arup&Title=Ratan
    But it always return those items whose "Title" value is "Arup". It is not returned any items whose "Title" is "Ratan".
    I have followed the
    http://office.microsoft.com/en-us/sharepointserver/HA102509991033.aspx#1
    Please suggest me.
    Thanks | Arup
    THanks! Arup R(MCTS)
    SucCeSS DoEs NOT MatTer.

    Hi DH, sorry for not being clear.
    It works when I create the connection from that web part that you want to be connected with the Query String Filter Web part. So let's say you created a web part page. Then you could connect a parameterized Excel Workbook to an Excel Web Access Web Part
    (or a Performance Point Dashboard etc.) and you insert it into your page and add
    a Query String Filter Web Part . Then you can connect them by editing the Query String Filter Web Part but also by editing the Excel Web Access Web Part. And only when I created from the latter it worked
    with multiple values for one parameter. If you have any more questions let me know. See you, Ingo

  • How to Pass parameter to Custom Scheduler dynamically

    hi ,
    I am new to OIM.
    Need your help in passing parameters dynamically to Custom Scheduler.
    I have created Custom Scheduler by extending Task Support.
    I have registered the plugin through API , using PlatformService.registerPlugin() method.
    As I need to send the parameter(s) to this CustomScheduler, I have defined them in Metadata (CustomScheduleTask.xml) file as below and got it imported into DB
    through weblogicImportMetadata.sh script by providing the path of the file.
    <scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
    <task>
    <name>CustomScheduleTask</name>
    <class>org.schedule.custom.task.CustomScheduleTask</class>
    <description>Fetch details of the given user_id</description>
    <retry>5</retry>
    <parameters>
    <string-param required="true" helpText="Login Name">Login Name</string-param>
    </parameters>
    </task>
    </scheduledTasks>
    Iam able to import this plugin as well as register the plugin successfully. Now I have defined a job to which this Custom SchedulerTask is mapped.
    Now in order to run this job(schedule task) I need to provide Login name( or id) which needs to be send as a parameter for the scheduler to get executed.
    But while defining the job with this Schedule Task on OIM console, I was not able to define or pass parameter to this job. hence parameter is null in
    CustomSchedule 's execute method .
    Kindly help me how to pass parameter dynamically while running the scheduler from OIM console so that the execute method would be able to receive it.
    Thank you in Advance.
    Regards,
    Kumar

    Hi,
    When you have created the schedule job for your custom schedule task, you should see your Login Name textfield in the schedule task. If not, then there verify your schedule task xml.
    In your schedule class code, add:
    public void execute(HashMap arg0) {
              final String METHOD_NAME = "execute :: ";
              logger.debug(CLASS_NAME + METHOD_NAME + "Entering Method - execute");
              try {
                   String LoginName = arg0.get("Login Name");
    Regards,
    Sunny

  • How to pass parameter /1BCDWB/DOCPARAMS from webdynpro?

    Hi Experts,
    We create a wdp view and indert an adobe form into it. And this form has an interface based on XML schema.
    Now we want to translate this form into multi-language, and in wdp side, we will display diffenent language version of form for different regions.
    I found that there is a paramater /1BCDWB/DOCPARAMS-LANGU, and it seems can control the language version in processing.
    But I donot know how to pass parameter /1BCDWB/DOCPARAMS from wdp to adobe form.
    Its my 1st to use adobe form and wdp, i really have no way out. Any advice will be Appreciated.
    Thank you.
    Richard

    @sahai: Hey no , I am using very very simple example without any query or complex statement. I just have 2 radio buttons in VIEW1. On clicking the radio button, the naviagtion to view2 is done and the value of selected radio button is passed as a parameter in the plug.
    In the view2 , i just have a caption in my layout where i am displaying the parameter value by setting the attribute.THe warning i get is in view2. Here is the code. Apart from this there is no coding in view2.
    METHOD HANDLEPLUG_IN_V2 .
        DATA:
          NODE_CAPT_MSG                       TYPE REF TO IF_WD_CONTEXT_NODE,
          ELEM_CAPT_MSG                       TYPE REF TO IF_WD_CONTEXT_ELEMENT,
          STRU_CAPT_MSG                       TYPE IF_VIEW2=>ELEMENT_CAPT_MSG ,
          ITEM_MSG                            LIKE STRU_CAPT_MSG-MSG.
    *   navigate from <CONTEXT> to <CAPT_MSG> via lead selection
        NODE_CAPT_MSG = WD_CONTEXT->GET_CHILD_NODE( NAME = `CAPT_MSG` ).
    *   get single attribute
        NODE_CAPT_MSG->SET_ATTRIBUTE(
          EXPORTING
            NAME =  `MSG`
            VALUE = PAR_1 ).
    ENDMETHOD.

  • How to pass parameter to intro.jsp page ?

    Hi all,
    Anybody please tell me how to pass parameter to intro.jsp page.
    Is there any param name defined in <forward > syntax ?
    I have made following configuration in struts-config.xml file.
    I want to pass parameter to intro.jsp page
    <global-forwards>
              <forward name="invalidsession" path="/intro.jsp" redirect="true" />
    </global-forwards>
    please reply soon.
    Thanking you.

    Hi all,
    I have a similar kind of question..
    Iam trying to pass a string variable from JSP to servlet thro URL..
    Im using tomcat5
    COde:
    String fname=request.getParamter("filename");
    <jsp:forward page="/servlet/coreservlets.filedownload?name=" +fname />
    It is generating a unterminated tag error..Please help..

  • How to pass parameter into a source variable of a invoke activity

    I'm an new BPELer, I created a invoke activity to submit Oracle Appplications concurrent program, but I don't know how to pass parameter into source variable.
    BTW, I have created the mapper file (.xsl) file.
    could anyone tell me how to do that?
    Thanks,
    Victor

    Hi.
    How you start application? I think you send message to webservice(BPEL process is webservice too). So construct message with variable and value.
    But I created only processes where input value doesn't matter. I haven't use mapper yet too.

  • How to pass parameter as http POST in pageContext.setForwardURL

    Hi,
    I need to call a third party application page in my custom OAF page. I need to pass parameter to this third party page using POST method. I am using following command to call that -
    HashMap hm = new HashMap();
    hm.put("FirstName",firstName );
    hm.put("LastName",lastName);
    hm.put("AppSignature", signature);
    pageContext.setForwardURL(hopURL,
    null, // not necessary with KEEP_MENU_CONTEXT
    OAWebBeanConstants.KEEP_MENU_CONTEXT, // no change to menu context
    null, // No need to specify since we're keeping menu context
    hm, // request parameters
    false, // retain the root application module
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // display breadcrumbs
    OAException.ERROR);
    I am passing parameter to the page using hash map table. That application is expecting the parameters in POST format and I believe using hash map table the parameters will be passed as GET format.
    We figured that out because one of the parameter we have to send is AppSignature which is 160 characters long. When third party applicatoin received that parameter they got only 151 characters, looks like they are truncated by GET method.
    Any idea how to pass parameter using POST format so that this issue could be fixed.
    Regards
    Hitesh

    Sumit,
    Thanks for your reply. I have resolved this issue by forwarding all parameters in session using pageContext.putSessionValueDirect and redirect to a jsp using pageContext.redirectImmediately.
    in jsp I read the params from session and set in the form , and then redirected to my third party application.
    Regards
    Hitesh

  • How to pass parameter into transaction iview ?

    Hi experts,
    I want to know "how to pass parameter into transaction iview ".
    Regards,
    Krishna Balaji T

    Hi Krishna,
    Not sure if this can help you.
    1) Passing a parameter to a transaction iview (I saw a resolved suggestion)
    Passing a parameter to a transaction iview
    2) Passing a parameter from the portal to R3 (helpful info for you)
    Passing a parameter from the portal to R3
    3) Create SAP Transaction iView using SAPGUI for Windows (Great Blog and info about TA Iview)
    Create SAP Transaction iView using SAPGUI for Windows
    Please check the following link for Transaction Iviews
    http://help.sap.com/saphelp_nw2004s/helpdata/en/02/f9e1ac7da0ee4587d79e8de7584966/frameset.htm
    Just some info: Portal is basically what the end user can see. What he can do, is still maintain in the backend system. If there are parameters setup already for the user in the backend system (in SU01), then those parameters should still valid for the transaction that the parameters are linked to.
    Hope that helps and award points for helpful suggestions.
    Ray

  • How to   Pass Parameter from BIP  to Dashboard  Report

    Hi,
    Parameter from BIP to Dashboard Report
    If I select BIP report paremeter should pass value to dashboard report
    thanks in advance.
    CHEERS ,
    Jel

    Hi Saichand,
    I hav gone through above link its passing values from Dashboard prompt to BIP report only..
    just i need like reverse (if i click on BIP report value then it should pass that value to Dashboard reports) in this this case how to pass parameter from BIP to dashboard report
    Thanks in advance
    Cheers,
    Jel

  • Query is taking only 1 dept .,...how to pass dept98 in query

    select file_subject as "File Subject",
    (select RECEIPT_DATE from FILETRANS JOIN FILEMASTER
    on filemaster.file_serial_no = FILETRANS.file_serial and
    filemaster.file_year=FILETRANS.file_year and filetrans.RECEIPT_DATE
    between trunc(sysdate-6)+(15/24) and least( trunc(sysdate)+(15/24), sysdate)and rownum=1)
    as "Received Date",(select department_name from departments JOIN FILEMASTER
    ON departments.department_code=filemaster.department_code and rownum=1 ) as "Dept",
    (select section_name from sections JOIN
    FILEMASTER ON sections.section_cd=filemaster.section_code
    and rownum=1 and sections.dept_cd=filemaster.department_code) as "Section"
    from filemaster
    select department_name from departments JOIN FILEMASTER
    ON departments.department_code=filemaster.department_code and rownum=1
    this query is taking only 1 dept but it should take other dept name as welll..
    and how to pass "
    dept98 in query..so that i take user dept automatically..and based on that query will give result
    dept98 = Session("dept")
    thanks and regard love4csharp

    rsingh()
    my sub query is returning more than 1 row so how to handle tis with whole query there are more subquery ....
    and also where to add 
    dept98 in above query
    thanks and regard love4csharp

  • How to pass parameter values to Bex query through xcelsius (LO or QWAAS)

    Hi,
    I have prompt in Bex query and want to pass values to query prompt through xcelsius .
    In xcelsius i have selection
    e.g 1] Combo selection is for Vendor
    2] Combo selection is for Fiscal Year
    If i select value from Combo list  and refresh the dashboard im getting below error
    A database error occured. The database error text is: The MDX query SELECT  { [Measures].[4IKKZVYWWD3XKQK7Z1BK34VTL], [Measures].[4IKKZVJJUFWIJHHBND6VJ0YE1], [Measures].[4IKKZV46SIP3I8EFBP26YX0YH], [Measures].[4IKKZUOTQLHOGZBJ00XIET3IX] }  ON COLUMNS , NON EMPTY [0CREDITOR].[LEVEL01].MEMBERS ON ROWS FROM [0FIAP_O03/ZFIAP_O03_UNIVERSE] SAP VARIABLES [VN_VAR] INCLUDING A00140 [0S_FYEAR] INCLUDING V3/2010 : V3/2010 failed to execute with the error Unknown error. (WIS 10901)
    I have tried using LO and QWAAS but not able to do so......
    if any one knows plz help....

    Hi,
    most likely yo are passing the wrong value.
    you need to send the key or the member unique name.
    Ingo

  • How to get the original query string in an event receiver when dialogs are enabled

    I have scenario where I am adding a document to a document library which has an external data column on it. My goal for this column is to have it automatically populated with an appropriate value based on original query string to the page. The general
    idea is that I am on a custom page that has various webparts on it including a view of my document library that is context sensative based on the query string, and I want to use that context sensitivity not just to filter the list but also when adding documents.
    I have been searching around for solutions to this problem all day and have gotten this far:
    I have an event receiver attached to my document library that handles the ItemAdded event syncronously (as such I have the new list item available to me). In that event receiver I am able to set the column values as required. Where I am stuck is on getting
    the value from the query string that I need to actually set as the column value.
    Based on:
    http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/8cfcb299-9a55-4139-86ec-0b53b2922a54 and several similar articles/posts I have been able to get the original source Url with the query string I want via the following
    code in my event receiver:
    private HttpContext context;
    public EventReceiver1()
    context = HttpContext.Current;
    public override void ItemAdded(SPItemEventProperties properties)
    var originalQueryString = context.Request.QueryString["Source"];
    // Parse the query string and use the value ...
    The problem is that this solution breaks down if the dialogs are turned on under the advanced settings for the list. The reason the solution fails is because the "Source" query string parameter goes away and is replaced by "IsDlg" set to a value of "1".
    Does anyone know how to get past this hurdle? Any help would be greatly appreciated.

    Hi Stuart,
    The reason I'm looking for "Source" in the query string is because that is something I found to be reliable when the Dialogs are turned off. I've dug around pretty deep in the Request object to see if anything had the data I was looking for and unfortunately
    it doesn't appear to be there. The
    context.Request.QUeryString.ToString()
    returns a rather simple one of:
    List=%7b43ECDCB0-8440-4652-B067-AA20481779D7%7d&RootFolder=&IsDlg=1
    and the
    context.Request.UrlReferrer.Query.ToString()
    has the same value.
    I suspect this is due to the dual step process that takes place in adding an item to a document library where the first modal popup (which I suspect likely has the information I need) gives you the opportunity to browse to your file and then the second
    dialog (maybe this is getting brought up as a result of another request which is now referring back to the original request that brought up the first dialog?) where you edit your properties.
    Thanks for the try though, if you've got anything else I'd love to hear it.

  • How to pass parameter [bind variable or substitution variable] to a view?

    How can I pass a parameter [bind variable or substitution variable] to a view in Oracle?
    Some will tell me that this is not necessary, that I can only pass the parameter when I query the view, but I found some case where this cause performance issue. In long view where I use subquery factoring [WITH], it's necessary to pass the parameter many time through different subqueries and not only to the resulting view.
    In other database (SQL Server, Access), we can pass parameters through query. I can't find how to do that in Oracle. Can some one tell me what is the approach suggest by Oracle on that subject?
    Thank you in advance,
    MB
    What I can do:
    CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")
    AS
    SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES;
    What I want to do:
    CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")(prmEMP_ID)
    AS
    SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID IN (:prmEMP_ID);

    Blais wrote:
    How can I pass a parameter [bind variable or substitution variable] to a view in Oracle?
    Some will tell me that this is not necessary, that I can only pass the parameter when I query the view, but I found some case where this cause performance issue. In long view where I use subquery factoring [WITH], it's necessary to pass the parameter many time through different subqueries and not only to the resulting view.Yes, there can be performance issues. Views are a form of dynamic SQL and it is hard to predict how they will perform later.
    You can't pass parameters to a view. They are not functions. The mechanism to put the values in is what you mentioned, passing the parameter when you query the view.
    In other database (SQL Server, Access), we can pass parameters through query. I can't find how to do that in Oracle. Can some one tell me what is the approach suggest by Oracle on that subject? This functionality is not supported.
    What I can do:
    CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")
    AS
    SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES;
    What I want to do:
    CREATE VIEW "HR"."EMP_NAME" ("FIRST_NAME", "LAST_NAME")(prmEMP_ID)
    AS
    SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID IN (:prmEMP_ID);Include the bind value when you use the view in a SELECT. The value will be applied to the view at run-time, somthing like
    CREATE  VIEW "HR"."EMP_NAME_VW" ("FIRST_NAME", "LAST_NAME","EMPLOYEE_ID")(prmEMP_ID)
    AS  SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES;
    select *
      from emp_name_vw
      WHERE EMPLOYEE_ID IN (:prmEMP_ID);To use EMPLOYEE_ID I added it to your list of columns in the view so it can be referenced in the WHERE clause. If you don't want to see that value don't select it from the view.

Maybe you are looking for