Passing parameters from JSP to Batch file

hi,
i had a small problem regarding passing parameter from JSP to a batch file.
My program is like this..........
I wrote a batch file which opens and pings a remote system. Code looks like this......
ping %1 -t
which takes one argument and named this as "a.bat"
The corresponding JSP page has lot of links which contains IP Addressess. From JSP page, i am calling "a.bat" so that it will open and start pinging corresponding IP Address. So i want to know how can i pass the corresponding IP from a JSP to batch file so that it start pinging remote machine........... can any body help me in this regard??
Thanks in Advance.
cheers,
Sudhakar.

it might be a permissions problem for the process itself. i once fought for some time with a java app that would mysteriously exit (no exceptions or any VM vomit) i finally discovered that the application was killed when the screen saver came on. just a regular screen saver mind you.
at any rate i did see this issue and other strange ones like it reported here and there, i think i once say a bug report here on it but I can't seem to find it now. i believe this is fixed in 1.4.
this of course may not be of much help to you.
the two workarounds i found were 1) to turn off my screen-saver, 2) set up the program as an NT service. for the NT service i used this stuff http://www.kcmultimedia.com/
so my suggestion for weird process permission problems on NT would be to try and make it into a service.

Similar Messages

  • Passing parameters from JSP to JSP

    How can I pass parameters from one JSP to another JSP?
    JSP1 calls JSP2. I need to pass some values in JSP 1 to use in JSP 2.
    Please help.
    Thanks.

    use jsp:forward and param tags

  • Issue with passing parameters from JSP to Backing bean

    hi ,
    I have an issue in passing parameters from my JSP to backing bean. I want to fetch the parameter from my URL in backing bean .This is how i am coding it right now. But the parameter companyID returns me null.
    URL http://localhost:8080/admin/compadmin.jsp?companyID=B1234.
    In my backing bean
    FacesContext context = FacesContext.getCurrentInstance();
    String companyID = (String)context.getExternalContext().getRequestParameterMap().get("CompanyID");
         public void setCompanyID(String companyID)
              this.companyID=companyID;
         public String getCompanyID()
              return this.companyID;
    faces-config.xml :
       <managed-bean-name>admincontroller</managed-bean-name>
              <managed-bean-class>com.admin.controller.AdminController</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
              <managed-property>
                   <property-name>companyadminbean</property-name>
                   <property-class>com.admin.model.AdminBean</property-class>
                   <value>#{companyadminbean}</value>
                         </managed-property>
                        <managed-property>
                                 <property-name>companyID</property-name>
                              <value>#{param.companyID}</value>
                             </managed-property>Please let me know if iam missing something.Appreciate your help in advance
    Thanks

    Thanks very much for your input. I made changes to my bean accordingly. Actually the method getAdminType() is a not a getter of a property. It's just a method which iam calling in AdminController bean constructor to verify whether the person is System Admin or Client admin. So now the issue is inspite of making changes still the link "Copy Users" shows up for Client admin too which is incorrect.
    My Administrator bean:
    public class Administrator {
      boolean GSA=false;
      boolean SA=false;
      public Administrator(){}
    public boolean isGSA()
        return GSA;
      public boolean isSA()
        return SA;
      public void setGSA(boolean value)
        this.GSA=value;
      public void setSA(boolean value)
        this.SA=value;
    }My backing bean:
    public class AdminController {
    private AdminBean adminbean = new AdminBean();
    public AdminController(){
    int userID=1234;
    this.getAdminType(userID);           
    public void getAdminType(int userID)
             Administrator admin = new Administrator();
             if (userID<0) return;
             try{
                 if(Rc.isGlobalSystemAdmin(userID)){
                      admin.setGSA(true);
                              }else if(Rc.isClientSystemAdmin(userID)){
                      admin.setSA(true); // i could see these values setup correctly in the admin bean when i print them
                 adminbean.setAdmin(admin);
                  } catch (Exception e){ }
    Admin Bean:
    public class AdminBean {
    private Administrator admin; 
    public Administrator getAdmin()
                        return this.admin;
              public void setAdmin(Administrator admin)
                        this.admin = admin;
    faces-config.xml
    <managed-bean>
              <managed-bean-name>admincontroller</managed-bean-name>
              <managed-bean-class>com.controller.AdminController</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
              <managed-property>
                   <property-name>adminbean</property-name>
                   <property-class>com.model.AdminBean</property-class>
                   <value>#{adminbean}</value>
             </managed-property>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>adminbean</managed-bean-name>
              <managed-bean-class>com.model.AdminBean</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
              <managed-property>
                   <managed-property>
                   <property-name>admin</property-name>
                   <property-class>com.model.Administrator</property-class>
                   <value>#{admin}</value>
                             </managed-property>
         </managed-bean>     My JSP:<h:outputLink id="ol1" value="/companyadmin/copyusers.jsp">
               <h:outputText id="ot1" value="Copy Users" rendered="#{adminbean.admin.isGSA}" /><f:verbatim><br/></f:verbatim>
               </h:outputLink>    so now the issue is thelink copy users is displayed even #{adminbean.admin.isGSA} is FALSE. please advise.
    Thanks
    Edited by: twisai on Oct 15, 2009 7:06 AM

  • Pass parameters from JSP Dyn Page to WDJ Application

    Hi,
    I am trying to pass parameters from my JSPDyn Page to WDJ Application.
    I am using NWDS 7.1 EHP1
    My code is :
    function to_WEBDYNHK()
          EPCM.relaxDocumentDomain();
          EPCM.doNavigate
        ('ROLES://pcd:portal_content/Himanshu.Himanshu/TestDynUIApp?DynamicParameter="hkparam%3Dqwertyuio"');
    This method is being called on click of a button.
    hkparam is the parameter in question.
    The JSPDyn page is an iView and the WDJ application is a page and both have been assigned to a role.
    In the properties of the WDJ Page, I have removed DymanicParameter from "Do not Forward These Parameters To Web Dynpro" property.
    However I am getting null as the value of hkparam in my WDJ application.
    The code used is :
    IWDRequest request = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
           String param1= request.getParameter("hkparam");
    What seems to be missing here.
    Please help.
    I went through the documentation on SDN but it does not seem to help.
    TIA,
    Himanshu

    Hi Himanshu,
    Try this code.
    EPCM.doNavigate("ROLES:portal_content/Himanshu.Himanshu/TestDynUIApp?hkparam=Dmypass1123")
    if the parameter is hkparam and the value to be passed is Dmypass1123. You need not change any design time property of the WD page, and WDProtocolAdapter should retrive the parameter.
    Regards,
    Vishweshwara P.K.M.

  • Passing Parameters from JSP with Drill Down Graphs

    Hello,
    I have 2 JSP's where when user clicks on the bar graph it drill down and goes to next JSP, it is hyperlink. How can I pass parameters using HttpPortletRendererUtil.portletParameter
    My JSP code is something like this which is pasted below.
    StandardCategoryURLGenerator("xy_chart.jsp","series","section")) is the function, I need to use for drill down.
    Kindly help me with this and any help is highly appreciable.
    Thanks
    ************ JSP**************
    CategoryAxis categoryAxis = new CategoryAxis("Site");
    ValueAxis valueAxis = new NumberAxis("Value");
    StackedBarRenderer3D rend = new StackedBarRenderer3D();
    StandardCategoryToolTipGenerator tt = new StandardCategoryToolTipGenerator();
    rend.setItemURLGenerator(new StandardCategoryURLGenerator("xy_chart.jsp","series","section"));

    Trenton,
    One way to pass parameters to other portlets on the page while using a form is to create a hidden form field and assign it the value that you need to pass to it. If the hidden field has an unqualified name (i.e. not created by using the portletParameter method) then it will be seen by all portlets on the page.
    Since all the form fields are passed on to the query string as part of the URL, you can then use request.getParameter(paramName) to take different actions in your portlets.
    You could use different techniques where based on the values you pass on to parameters of the portlets, some portlets make specific updates to themselves. Though the whole page would be refreshed, you could allow portlets to decide based on the incoming parameter value whether they need to change or not.
    So given the functionality you desire - here's something you might try.
    1) Create hidden form field that gets populated when you select values from the drop-down lookup.
    One way to do this would be to add a onChange ="populateMyHiddenParam(this.form)" to your form item that changes.
    And you could add a small JavaScript function that populates the parameter.
    e.g.
    function populateMyHiddenParam(thisForm){
    thisForm.myHiddenParam.value=thisForm.elements[4].value;
    2)In the other JSP portlet (on the same page) where you need to populate a table based on the value selected, just get the parameter value passed by using request.getParameter("myHiddenParam").
    Since you want this parameter to be read by other portlets, you need to create it as an unqualified parameter. So dont call the HTTPPortletRendererUtil.portletParameter while assigning the name to the form component for the hidden field.
    Hope this helps.

  • Pass Parameters from JSP to PL/SQL

    I have a JSP portlet which consists of a few pages.
    Meaning, I move from one page to the next by using the "next_page" param from the JPDK.
    In one of my JSP pages, in its <form> tag, I have the action set to call a PL/SQL procedure
    (in the form of "pls/portal30.portal30.myPackage.myProcedure").
    The procedure is called, and everything works just fine.
    However, now I want to recieve some of the parameters I set in the URL in my PL/SQL.
    Meaning, just like I can do in the JSP "myRequest.getAttribute('itemID')", I want to do the same in PL/SQL.
    The way I'm doing it right now is not too great: in my JSP form I have a hidden field which, using javascript ("location.href") contains the current URL.
    Then, when the JSP is submitted, I start parsing the URL for the parameters I need.
    There MUST be a better way!
    Oh, and also, a very similar question -- what I've asked above speaks about passing the params through a "get" request to the PL/SQL. Can I also pass params in a "post?" Meaning, get session variables that were set in JSP context, into a PL/SQL procedure?
    Thanks,
    Dan

    Dan,
    mod_plsql enables you to pass any number of parameters to a PL/SQL procedure. The procedure should 'expect' the parameters (by having the right signature). You can use both GET and POST methods to pass the parameters.
    I'd pass the plain portal page URL (pr.getRenderContext().getPageURL() or something like this) in a hidden field, just like you do (but wouldn't use the JavaScript). All the additional parameters (you have at the end of the page URL as a result of the JavaScript) can be passed through hidden (or not hidden) fields.
    I'm not sure about the last paragraph of your question... The only way you can pass any information to the PL/SQL procedure is using parameters. So the JSP should read the session store and put the values into hidden fields of your form.
    Hope this helps a bit,
    Peter

  • Passing parameters from jsp to xslt

    Hi all,
    I am trying to pass a variable string from a jsp to xslt .
    This is the code in the jsp which passes the variables .
    <c:set var="xsl">
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:import href="<%= "service_attribute.xsl" %>"/>
    <xsl:variable name="ItemId"><%= ItemId %></xsl:variable>
    <xsl:variable name="pos"><%= pos %></xsl:variable>
    <xsl:variable name="lineInfoTn"><%= lineInfoTn %></xsl:variable>
    </xsl:stylesheet>
    </c:set>
    <x:transform xmlSystemId="foo.xml" xslt="${xsl}">
    <%= FM.getOrderBean().getXml("ActivationRequest") %>
    </x:transform>
    In the service_attribute.xsl I would like to be able to check the lineInfoTn variable for content .
    something like this .
    <xsl:if test="$lineInfoTn='10pt'">
    <!-- Do something -->
    <xsl:value-of select="$lineInfoTn"/>
    </xsl:if>
    The first problem is that it complains that the $lineInfoTn is not declared .
    So I added the variable as a global variable .
    <xsl:param name="lineInfoTn">10pt</xsl:param>
    Note I have been switching between variables and parameters to try and get this working .
    I can use the itemId variable like this and I dont have a problem .
    <xsl:for-each select="q:RequestItem/q:ItemId[text() = $ItemId]/..">
    Any ideas on how to get this working .
    Thanks for your help

    Thanks for the input

  • Passing value from JSP to JApplet

    Hello,
    I am stuck up with a problem, can anyone please tell me how do i pass a value from a JSP page
    to a JApplet,
    and the parameter passed through JSP should be displaed in the JTextArea.
    It would be kindful if any of you could help.
    Thanks
    Sanam

    hello,
    thanks for reply.
    I know how to pass parameters from html,
    I want to pass values from jsp page,
    and i dono how to do it, may be we cann pass values through url connection but i dono how.
    if anone knows plz help me in solving this.
    i hvae posted my applet code.
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.JToolBar;
    import javax.swing.JButton;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    import javax.swing.JScrollPane;
    import javax.swing.JPanel;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    <applet code = "DocApplet" width = 500 height =5000>
    </applet>
    public class DocApplet extends JApplet
         private JPanel jp;
         private Container cp;
         private JTextArea jt;
         private JToolBar tb;     
         private JScrollPane sp;
         private String annotation;
         private String url;
         private Connection con;
         private Statement stmt;
         public void init()
              jp = new JPanel();
              cp = getContentPane();
              jt = new JTextArea();
              tb = new JToolBar();
              sp = new JScrollPane(jt);
              repaint();
         public void start()
              jp.setLayout(new BorderLayout());
              jp.add(tb, BorderLayout.NORTH);
              jp.add(sp, BorderLayout.CENTER);
              jt.setBackground(Color.BLACK);
              jt.setForeground(Color.WHITE);
              setContentPane(jp);
              addButtons(tb);
              repaint();
         public void run()
              repaint();
         public void paint()
         private void addButtons(JToolBar tb)
              JButton button = null;
              button = new JButton("Save");
              button.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
              tb.add(button);
    }

  • Automatically Pass Parameters From Crystal To SAP B1

    So, I've searched extensively, and haven't been able to find an answer to my unique issue.
    This question pertains to linking a Crystal Report by parameter values to the OWOR table in SAP B1, and automatically passing those parameter values from the active record in SAP. Several other tables are used in sql joins, but the report is generated from an OWOR production order. I should start by stating that the report works great when manually populating the parameter fields when SAP calls for them.
    Overview:
    I've written a report in Crystal that contains several sub reports, some of which are looking to the DocEntry field as the parameter (DocKey@) and others that do not look to the DocEntry field at all - but rather use another field on the form to pull up information that spans more than just that one production order. I've chosen to upload as a layout in SAP (as that is all I've worked with up to this point, and it seems it needs to be to automate from a production order); but as I continue to research, it appears DocKey@ is mandatory when uploading as a layout, and in order to view the report from the actively selected production order, it must be a layout. Does that mean the parameter is required in all sub reports? Is it required in any sub report?
    I have two main issues that I need to hurdle for this report to work how I would like it to:
    1. Three of the eight Commands (one main command and seven sub-report commands) use the DocKey@ as the parameter to pass from SAP back to Crystal. The main report command, as well as four of the sub reports/commands are looking to another field in the OWOR record - which happens to be a re-seller defined field (UDF). For all intensive purposes, let's call this field BatchID. I'm assuming the sub report commands run in succession, one after the next. The reason I need to use BatchID as the parameter to pull from the record, rather than DocEntry, is there are other records that contain the same BatchID, and I want all of the info pertaining to that BatchID to populate on the report.
    Q1: The first command containing DocKey@ is automatically populated by SAP, and the user does not have to key that one in. However, the next two DocKey@ parameters do not automatically populate, and the user is asked for those values. How can I fix this?
    Q2: How can I automate the passing of BatchID so the user does not have to fill it in 5 times when they wish to preview the report(layout)? Can I link ObjectID@ to any field in OWOR? Is there any other way like creating a stored procedure or something , to automate the passing of that variable from the SAP active record to the crystal report - so the user doesn't have to key it in several times just to pull up the report?
    Thank you so much for even reading, let alone helping me with this issue!!
    Cheers,
    Nick

              Hi
              I had the same problem. Take a look at this newsgroup article on the businessobjects
              website :
              http://support.businessobjects.com/library/kbase/articles/c2015264.asp
              Grieg
              "Rada Pickens" <[email protected]> wrote:
              >
              >Hi,
              >
              >I'm getting the same error message, I was wondering if you fixed the
              >problem.
              > I'm stumped, can you help?
              >
              >Rada
              >
              >
              >"JAI" <[email protected]> wrote:
              >>
              >>I am passing parameters, from the JSP page to Crystal Report, i took
              >>the code from
              >>the below mentioned url, i dont know, it is something wrong with the
              >>jsp page
              >>or crystal report.
              >>i have created parameter field in crystal report to receive the value
              >>from the
              >>jsp page.
              >>If u r not clear with the error, please reply to me.
              >>
              >>i took the code from the below mentioned page
              >>
              >>reference page:
              >>----------------------
              >>http://dev2dev.bea.com/trainingevents/webinars/012804_faq.jsp
              >>parameterFieldsViewReport.jsp
              >>
              >>
              >>error displaying in the jsp page
              >>-----------------------------------
              >>com.crystaldecisions.report.web.viewer.CrystalReportViewer
              >>Some parameters are missing values
              >
              

  • Pass parameters from hbj link

    Hi,
        I want to pass parameters from hbj link to the component where the event method is going to be called. And also when I click the event how it is going to redirect other jsp.
    Regards,
    Suresh.B

    Hello Reinuka,
    It is possible to send parameter to Web Dynpro iview.
    In the iview application parameters add Param1 =.
    Place this code wherever  you want to call that iview.
    WDPortalNavigation.navigateAbsolute("ROLES:"+iview,WDPortalNavigationMode.SHOW_INPLACE,(String) null, (String) null, WDPortalNavigationHistoryMode.NO_DUPLICATIONS,(String) null,(String) null,"Param1 = ");
    "ROLES:"+iview=Iview Path
    "Param=Paramvalue"=Parameter and its value
    Youcan receive the value as
    String parmvalue=WDWebContextAdapter.getWebContextAdapter().getRequestParameter("Param");
    Regards,
    Sridhar

  • How can I pass parameters from one process flow to another process flow?

    How can I pass parameters from one process flow to another process flow (sub process) in warehouse builder? let me know the steps I have to do in warehouse builder.
    Thanks in advance,
    Kishan

    Hi Kishan,
    Please post this question to the Warehouse Builder forum:
    Warehouse Builder
    Thanks, Mark

  • Passing Parameters from One Screen to Another Screen

    Hi All,
    I need to Pass Parameters from one Module Pool Screen to Another Screen.
    I have two Parameters in First screen. I don't want to use <b>Export and Import</b>
    The first screen record should sit in the Second Screen as it is.
    Please suggest me.
    Thanks and Regards,
    Prabhakar Dharmala

    An Idea,
    Create a function group, in that define global variables. Then create two function module. Pass variable from one function module and get in the another one.
    Hope this will help you to solve. If you need further help I will create and sent you a test code.
    Darshan.
    <i><b>Pl. Reward points to the helpful answer, it motivates us to answer more </b></i>

  • Passing parameters from a browser URL to Flash

    Flash CS3, AS3
    Is there any way to pass parameters from the URL line in a
    web browser to actionscript?
    ie. so if you had something like the following URL link in
    the browser...
    http://www.somedomain.com/someswf.swf?var1=10&var2=false
    ...it would pass var1 and var2 to someswf.swf.
    (Hypothetically, of course - I'm unsure as to the necessary syntax)
    Is this possible? Or would I need some intermediary software?
    Thanks
    Rick

    i answered a very similar forum query a few days ago
    here
    You need to look into loaderInfo.parameters.

  • Passing parameters from an URL to a WAD Web Template 7.0

    Hi guys, I need to pass parameters from an URL to a web template created with WAD 7.0. We need to open a template with certain filters starting from a link button located on an Xcelsius Dashboard. Our customer wants a web template to be opened with the filters defined within the Xcelsius
    The idea is to run the template with the filters defined in the URL. I know this was incredibly easy with WAD 3.x, but I didn't find any suitable solutions to use with WAD 7.0.
    What is the easiest way to do this with WAD 7.0?
    Thanks in advance and regards.
    Fabio Cristi

    Hi,
    It is possible in 7.0, but unfortunately it is a lot more complicated than i 3.x. There are quite a few examples here:
    http://help.sap.com/saphelp_nw70/helpdata/en/43/ef05462480025ae10000000a1553f7/content.htm
    I used it in a case where I wanted to embed a Web template in a BPS application and pass characteristic filters from the BPS application to the web template - similar to your requirements. Basically you need the following just to restrict one characteristic :o(
    &BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE
    &BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1
    &BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1=SELECTION_INPUT_STRING
    &BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=PDS06
    &BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0D_PH2
    I could only get it to work with one characteristic and I suspect, that the reason is that the URL simply gets to long (very quickly). You have to repeat the above for every characterstic you want to use :o(
    Hth,
    Jacob

  • URGENT: Passing Array from JSP to a Stored Procedure

    Hi,
    Can some one please help me understanding how can I pass array from JSP page to a stored procedure in database.
    Thanks in advance.
    Jatinder

    Thanks.
    I tried ArrayExampla.java and was successful in passing array values to the stored database procedure.
    How can I use this class in JSP? Like I have first JSP where in I will collect input from the user and then submit it to the second JSP - that needs to call the ArrayExample.java to pass the values as array to the database.
    How should I call this java code in my second JSP?
    Thanks in advance.

Maybe you are looking for

  • ITunes 8 Will Not Play Specific Songs

    Alright so, this has happened to me a few times, but it just happened again and is beginning to anger me. Yesterday I imported a CD, as .MP3 into my iTunes Library. I start playing it, and everything is going fine. This morning I open up iTunes and n

  • HTTPS with null cipher

    Hi, I have two OSB's communicating over SSL. How do I configure Weblogic to use a particular cipher during communication. I want the communication to use TLS_RSA_WITH_NULL_SHA, or any null cipher, so that the content can be scanned as it passed throu

  • ICloud account not matching my iPhone account?

    So when i sign up for itunes i had a different account so now that i got the update and im trying to use the icloud its not letting me cause the email i had back then its still on my iphone account eventhough i change it in my apple account its not l

  • HP Officejet ProL7590 All in ONe

    I have two HP Office jet Pro L7590.... GREAT product.  I recently had a printer repairman out because the rollers wre not picking up the paper - top tray, occasionally bottom tray.  Repairman confirmed we needed new rollers.  He was unable to secure

  • Advantages and Disadvantages of XML over CSV

    Hi friends, We have a requirement in our implimentation project. We are implimenting HR module. The company is using SABA for Education and Certification. We are implimenting Education and certification in BW and the data for BW will be comming from