How to click a HTML page button from Java code?

Know the HTML page name and the button id in this page, how to click the button automaticly in java code(Like in awt or swing)?

ukkus wrote:
Hi,
Thank for the quick reply,
It will be very helpful if you can tell me how can we do this, I am not able to get how to do the same, with the link that you have provided.You haven't even had time to read it yet.
>
Actually main scenario is:
I have to RUN a JSP report which will call this script. That JSP report and script is in UNIX server. Can you please explain how to perform this task.Running this from a JSP is an even worse programming practice than running it from a standalone application.

Similar Messages

  • How to send SMS ( Short Message Service ) from java code

    Hi
    How to send SMS ( Short Message Service ) from java code.
    Thanks
    Gaurav

    Do you need to receive SMS? If you need to receive SMS, you will need to host your own GSM device or modem so that people can send you SMS.
    If not, you can just use internet SMS gateways like clickatell as mentioned above will do the work, and post to them by HTTP, XML or email. The cost is about 6-8 cents per SMS. There are cheaper services, but not always reliable. If you need to host your own GSM device, you can use software like http://www.kannel.org (GPL Open Source) or http://www.visualgsm.com. Alternatively, you may obtain a shortcode from your Telco - but these come with monthly subscription of maybe one or two hundreds.
    Regards,
    Joshua
    <SMS Gateway>@Expert

  • How to modify an existing xml file from java code.

    Hi
    I have worked on creating a new xml file from java code using xmlbeans.But if i try to modify an already existing file using java code I am unable to get errorfree xmlfile.
    For example if xml file(studlist.xml) is as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    Now suppose i have set name to victor using student.setName,
    and set age to 20 using setAge from javacode,
    the new xml file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <StudentList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\kchaitanya\xmlprac1\abc\Studlist.xsd">
         <Student>
              <Name>ram</Name>
              <Age>27</Age>
         </Student>
    <Student>
              <Name>sham</Name>
              <Age>26</Age>
         </Student>
    </StudentList>
    <Student>
              <Name>victor</Name>
              <Age>20</Age>
         </Student>
    As observed this is not a valid xml file.But how can i modify without any errors?

    I know it's an old post, but I found this while doing a google search for something else, and don't like to leave it un-aswered
    Just in case anyone has a similar problem... In this case the new elements have been appended outside of the root element
    What you need to do is first get the root element and then append the new children to that, there are several ways of getting the root element, which depend on what you want to do with the elements you get back here's a simple (incomplete) way.
    // gets the root element of the specified file (code not shown)
    Element rootElement= new SAXReader().read(file).getRootElement();Then just append the new elements as below (this is non-generic code and would need to be modified for your situation)
    // write a new student element
    Element student = document.createElement("Student");  // creates the new student
    rootElement.appendChild(student); // ***appends it to the root element***
    Element name = document.createElement("Name"); // creates the name element
    name.appendChild(document.createTextNode("Fred")); // adds the name text to the name element
    student.appendChild(name); // appends the name to the student
    Element age= document.createElement("Age"); // creates the age element
    age.appendChild(document.createTextNode("26")); // adds the age text to the age element
    student.appendChild(age); // appends the name to the studentThen flush ya buffers or whatever and write the file
    Edited by: Dream-Scourge on Apr 23, 2008 11:10 AM

  • How to create dynamic HTML page using PL/SQL code in APEX.

    hello,
    I am woking on one APEX application in which i want to create one dynamic HTML page on button press using PL/SQL code.
    Thanks

    It is possible to create HTML page with dynamic content. One way would be creating hidden field (e.g. P1_HTML on page 1) with dynamic HTML and on button click you redirect to page 2 and pass P1_HTML item value to item P2_HTML on page 2. On page you must have PL/SQL region. You can then render your dynamic HTML with code:
    htp.p(:P2_HTML);
    Don use APEX URL for passing HTML value. Problem and solution is described here: http://blog.trent-schafer.com/2011/04/03/dont-pass-string-parameters-in-the-url-in-apex-its-a-bad-idea/
    Edited by: MiroMas on 3.2.2012 3:20

  • How to execute solaris lpd printing command from java code

    hi folk,
    I want to print a post script file on a network printer (my java code will receive the Printer's IP Address and the filename ) , i'm using the solaris lpd printing command :
    lpadmin -p banana_ps -o protocol=bsd,dest=IP -v /dev/null
    -m netstandard -T PS -I postscript
    my question is how execute this command from the java code :)
    i really appreciate ur advices

    Hi,
    See RunTime.getRuntime ().exec (...).
    Hope that help,
    Jack

  • How to download (export) user master data from java code

    Hi,
          I've an requirment. I need to export the user master through java code from a dual stack system
    The requirment is like an autmated of what we do in indentity management export.
    Thanks in advance
    Regards,
    mcsekar_21

    Solved it..
    Wrote a bean using UME factory, to download, upload and modify.

  • XML data storage - How to handle symbol ' inside xml data from java code

    Hi
    I'm trying to store XML data in Oracle XML DB 10gR2 both through SQL and JAVA .
    I have a simple test table called xmltable with a primary key and a XMLType column
    My sql is:
    insert into xmltable values ('020', sys.XMLType.CreateXML(
    '<?xml version="1.0"?>
    <Mpeg7 xmlns="urn:mpeg:mpeg7:schema:2001">
    <DescriptionMetadata id="2005">
    <LastUpdate>2006-10-19T12:48:22.null+01:00</LastUpdate>
    <Creator/>
    <CreationTime>2006-10-19T12:48:22.null+01:00</CreationTime>
    <Instrument>
    <Tool>
    <Name>LAS MPEG-7 Services v1.0</Name>
    </Tool>
    </Instrument>
    </DescriptionMetadata>
    <Description xsi:type="urn:ContentEntityType" xmlns:urn="urn:mpeg:mpeg7:schema:2001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <MultimediaContent xsi:type="urn:ImageType">
    <Image id="2005">
    <MediaInformation>
    <MediaProfile>
    <MediaFormat>
    <Content/>
    <Medium href="urn:mpeg:MPEG7MediumCS:2.1.1"/>
    <FileFormat href="urn:mpeg:IPTCMimeTypeCS:image/jpeg"/>
    <FileSize>2782043</FileSize>
    <VisualCoding>
    <Format colorDomain="color" href="urn:mpeg:MPEG7VisualCodingFormatCS:1"/>
    <Frame height="11604" width="8676"/>
    </VisualCoding>
    </MediaFormat>
    </MediaProfile>
    </MediaInformation>
    <MediaLocator>
    <MediaUri>oracle:bosch.informatik.rwth-aachen.de:1521/SMILEY/AMSDB.MEDIA_IMAGE/IMAGE[IMG_ID=2005]</MediaUri>
    </MediaLocator>
    <TextAnnotation>
    <FreeTextAnnotation>B?miy?n and Shikari areas</FreeTextAnnotation>
    </TextAnnotation>
    <Semantic>
    <SemanticBaseRef href="oracle:bosch.informatik.rwth-aachen.de:1521/SMILEY/AMSDB.OBJECT_XML/MPEG7_SB#/mpeg7:Mpeg7/mpeg7:DescriptionMetadata[@id='65']"/>
    <SemanticBaseRef href="oracle:bosch.informatik.rwth-aachen.de:1521/SMILEY/AMSDB.OBJECT_XML/MPEG7_SB#/mpeg7:Mpeg7/mpeg7:DescriptionMetadata[@id='148']"/>
    </Semantic>
    </Image>
    </MultimediaContent>
    </Description>
    </Mpeg7>
    Unfortunately I'm facing problem with the symbol ' at the tags:
    <SemanticBaseRef href="oracle:bosch.informatik.rwth-aachen.de:1521/SMILEY/AMSDB.OBJECT_XML/MPEG7_SB#/mpeg7:Mpeg7/mpeg7:DescriptionMetadata[@id='65']"/>
    <SemanticBaseRef href="oracle:bosch.informatik.rwth-aachen.de:1521/SMILEY/AMSDB.OBJECT_XML/MPEG7_SB#/mpeg7:Mpeg7/mpeg7:DescriptionMetadata[@id='148']"/>
    If I tried with double ' (not '' ) it works with SQL through SQLPLUS but not with java. Indeed I have to store the data through my application
    In java I get java.sql.SQLException: ORA-19102
    Many thanks in advance,
    Evanela

    Thanks for your answer. I downloaded the JDBC AddressBook application and I found it very usefull. I was able to populate a datalist from a datasource and show it in my application. My problem still remains in the sense that I am unable to show the KPI data in a "custom node" meaning I woul like not only to extract directly the database record to a datalist object but also put the information of a single record in a textbok and a gauge and keep control of paging. I think this is done with the parser in the other examples but I can not figure out how to do it with MySQL and the new Desktop screen designer. Should I use a clip object? or is that managed already by the desktop screen designer? or where can I find an example with the functionality I need?.

  • How to Read and Generate XML file from java code.

    hi guys,
    how to read the xml file (Condition :we know only DTD or Shema only).
    How to Generate the new xml file ?(using Shema )
    And one more how directly Generate the xml from DB?
    Pleas with code or any URL

    Using XMLbeans you can generate Java objects from an XSD schema (perhaps DTDs aswell)
    Then you can create an instance of the Document object and ask it to write itself.
    This will create an XML document complient to the schema.
    XMLBeans generates a "type" safe DOM where you can only ever have a structure compilent to you schema.
    matfud

  • How do I invoke another s/w from java code(urgent)

    Hi all,
    My code looks like this :
    Runtime rt =Runtime.getRuntime();
    String command = "~/tts/bin/mbrola" +" ~/tts/mbrola/us2 " + " /home/dir1/dir2/final/temp.pho "+
    " - | ~/tts/bin/mbrplay -";
    rt.exec(command );
    Whenever I ru n this code thru java , I get an error that this command was not found but am able to run it in my unix terminal. Would anyone have any clue as to why this is happening.
    Thanks
    Sohini

    Hi all,
    My code looks like this :
    Runtime rt =Runtime.getRuntime();
    String command = "~/tts/bin/mbrola" +"
    la" +" ~/tts/mbrola/us2 " + "
    /home/dir1/dir2/final/temp.pho "+
    " - | ~/tts/bin/mbrplay -";
    rt.exec(command );
    Whenever I ru n this code thru java , I get an error
    that this command was not found but am able to run it
    in my unix terminal. Would anyone have any clue as to
    why this is happening.
    Thanks
    SohiniHi,
    I guess that you're trying to run command WITH arguments, aren't you?
    So, you have to do it this way(just verify arguments):
        Runtime rt =Runtime.getRuntime();
        String command[] = {"~/tts/bin/mbrola", "la", "~/tts/mbrola/us2",
                                              "/home/dir1/dir2/final/temp.pho",  "-", " | ~/tts/bin/mbrplay", "-"}
        rt.exec(command);(making PROGRAM and ARGUMENTS an array - EACH argument SEPARATELY(I don't know their exact number in your script ))
    Hope to help,
    SHW

  • How am i supposed to prevent sm from pasting code in my JSP page?

    Hello,
    as i was testing my JSP page i noticed that when sm places code in an input box , it seems that the page is affected by that.
    Well i have a very simple form like:
    <form  style="text-align:left" method="POST" name="edit" action="Edit" >
    <input type="text" name="year" size="5" maxlength ="50" value="<%= convertdate.ReturnYear((resultset.getString(19)) %>">
    <input type="submit" name="Submit" value="Store Data" >
    </form>i noticed that when i was placing code in the button year of the form like:
    out.println("<HTML><HEAD><TITLE> " + "Error in PAGE BLAH BLAH BLAH" + " </TITLE></HEAD><BODY>");my website was affected by that and some pages looked different and couldn't display data from the database, although the data existed in the db.
    What am i supposed to do? How am i supposed to prevent a user from inserting code in inputs of a form?
    Also, sometimes when i was pasting code, some SQL exceptions appeared saying : Data too long for field etc.
    The weird was that the data was in the limit. I'm very worried about this problem because the sql exceptions show the names of my tables and i think
    that this is dangerous for malicious attacks in the website.
    Thanks, in advance!
    Edited by: g_p_java on Sep 5, 2009 5:09 PM
    Edited by: g_p_java on Sep 5, 2009 5:14 PM
    Edited by: g_p_java on Sep 5, 2009 5:15 PM

    smogura.eu wrote:
    All notices are important & how to say... you can place Java code in JSP, but in commercial job you will need to find new job.
    Well i'm not actually working somewhere, i'm student and i have to make this project.
    It's the first time I use JSP, servlets etc, so that's why i find a difficulty in using them.
    Why your pages are messed? If you put HTML code in db, rendered page is like
    ..="50" value="<HTML><HEAD...{code}
    this will prevent browser to render page properly. Well i was actually pasting some data in order to check if the data is too long for the field and afterwards the page changed and many fields disappeared...
    There are two ways to prevent inserting code, in your JSP, and you need use it, as no separating view logic, data acquisition from page will not prevent this error
    1. You need disallow user entering ", <, ' etc...., best way by validating input on server side, by this will prevent user from entering all texts, or
    2. You need replace all HTML special char with their HTML codes when rendering, the simplest way
    convertdate.ReturnYear((resultset.getString(19)).replace("\"", "&#34'").replace(...).replace(...)
    {code}
    You must use this in back logic.May you please elaborate on that, you mention that i shall replace the year with "&#34'",
    What is that "&#34'"?
    and why do you use 3 "replaces"?
    About prepared statements.
    Preparation will not only prevent you from SQL injections, but can speed up application, if your driver uses statement caching.
    Why after creating prepared statement, you then create normal statement, in your example code?I hadn't noticed that, thanks.I 'll change them. But Statement is less secure than PrepareStatement?
    Thanks, in advance!

  • How to create a html page

    Hello,i am very new to dreamweaver 8,and i have searched
    everwhere possible on how to create a html page.My website has a
    navegation bar.And on the navegation bar it has links,like
    forums,your accounts,and etc,but thats already integrated with the
    website.Now i have an option in the admin area,wher i can create a
    new category so that it would show up in the navegation bar,and i
    have a drop down menu where i cans select what to put in that
    category.But also i have an option to put a external url,so that
    when they click on it,it will take them to where that link is
    directed.The point is that i asnt to make a category in the
    navigation menu that says Lirics.So that i can put lirics of songs
    and etc,and that when users click on that link it will take them to
    the lirics page..Do you guys understand?Sorry for the bad english,i
    am now quite good with it..

    The most eloquent description will do nothing for us. To get
    a solution to
    your problem, we must see your code. Can you upload the file
    and post a
    link to it, please?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "don_playboy" <[email protected]> wrote in
    message
    news:eaadi9$kjf$[email protected]..
    > well what i am trying to say is that i created a Folder
    named
    > Liricas(which is
    > lirics in spanish),on my ftp.Now since i created that
    folder in my ftp,it
    > will
    > show on my navegation menu control panel.But it will be
    blank since it has
    > nothing on it.Now what i want to do is,sicne i created
    that folder,and i
    > go to
    > my nav meny control panel and select it as a category it
    will show on my
    > navegation menu(the Liricas that is),but when u click it
    it has
    > nothing,since
    > it has no html or anything in the category.Now i want to
    create a html
    > page so
    > that i can put albums names,and under those albums name
    i want to create a
    > link
    > or category thats for lirics.So all this will be stored
    on the ftp.and
    > when
    > users click on the Liricas category on my navigation
    menu,it will take
    > them to
    > the liricas index page,which will show all the lirics...
    >
    >
    >
    >

  • How to get the Portal Page name from PLSQL?

    Can anyone tell me how to get the portal page name from my dynamic page using plsql?
    Apparently you can get the page id and work it out from there, but my calls to get the page id are not returning any values anyway.
    My code for attempting to get the page id is below.
    <oracle>
    declare
    v_pageid varchar2(30);
    begin
    v_pageid := wwpro_api_parameters.get_value('_pageid', '/pls/portal30');
    htp.print('Page is '|| v_pageid);
    end;
    </oracle>
    Ideally I'd actually just like to get the page name. Is there a straightforward way to do this?
    Thanks in advance!
    Sarah

    Few clarifications -
    1. wwpro_api_parameters cannot be used to get default portal
    page parameters such as '_pageid', '_dad', '_schema' etc.,
    2. Page information can be obtained through any components which
    are available in that particular page. For example, in case of
    dynamic page, we need to publish it as a portlet and add it to the
    page. This process creates necessary packages in the DB, but we
    will not have access to the portlet methods.
    So, I would prefer creating a simple DB provider & portlet and access
    page title from its show method as follows -
    //Declare local variable l_page_id, l_page_title as varchar2
    select page_id into l_page_id from wwpob_portlet_instance$ where
    portlet_id = p_portlet_record.portlet_id and
    provider_id = p_portlet_record.provider_id;
    select name into l_page_title from wwpob_page$ where id=l_page_id;
    More information on DB provider can be found at
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/understanding.database.providers.html
    Secondly, usage of wwpro_api_parameters.get_value method is
    incorrect. This method expects two arguments -
    <ul>
    <li><b>p_name : </b> The name of the parameter to be returned.</li>
    <li><b>p_reference_path : </b> An unique identifier for a portlet instance on the current page.</li>
    </ul>
    p_reference_path would be something like 99_SNOOP_PORTLET_76535103 and not some type of path as its name suggests.
    The following code fragment fetches all parameters available
    for a portlet.
    Note : Copy this code into 'show' method of your portlet.
    //Declare l_names, l_values as owa.vc_arr
    * Retreive all of the names of parameters for this portlet
    l_names := wwpro_api_parameters.get_names(
    p_reference_path=>p_portlet_record.reference_path);
    * Retreive all of the values of parameters for this portlet
    l_values := wwpro_api_parameters.get_values(p_names=>l_names,
    p_reference_path=>p_portlet_record.reference_path);
    //Loop through these arrays to get parameter information
    htp.p('<center><table BORDER COLS=2 WIDTH="90%" >');
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(wwui_api_portlet.portlet_heading('Name',1));
    htp.tableData(wwui_api_portlet.portlet_heading('Value',1));
    htp.tableRowClose;
    if l_names.count = 0 then
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.p('<td COLSPAN="2">'
    ||wwui_api_portlet.portlet_text(
    'No portlet parameters were passed on the URL.',1)
    ||'</td>');
    htp.tableRowClose;
    else
    for i in 1..l_names.count loop
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(l_names(i));
    htp.tableData(l_values(i));
    htp.tableRowClose;
    end loop;
    end if;
    htp.p('</table></center>');
    Hope it helps...
    -aMJAD.

  • How can I delate a pages template from my mac?

    how can I delate a pages template from my mac?

    Follow this Path...
    users/yourname/library/application support/iwork/pages/templates/my templates
    If using Lion... in Finder, hold down the Option key while clicking on the Go menu and your users Library will appear...

  • How can I remove the page number from the first page of the document that is the cover page?

    How can I remove the page number from the first page of the document that is the cover page?

    If you open the Pages panel, (Window>Pages) you will see thumbnails of your master pages and your document pages. In new documents, there is usually a master called A-Master and one called None. If you drag the thumbnail of the None master onto the thumbnail of a document page, it will apply that master to that page. Presumably, you have made your page numbers on A-Master, so this will usually do the trick. If you have elements on A-Master that you need on the first page, but just not the page number, you can duplicate A-Master (which, by default will give you B-Master, but you can change the names if you like) and remove the page number on the duplicate and apply that to the document page.
    It might also be worth noting that you can apply master pages in the fly-out of the Pages panel. Go to the fly-out triangle and go down to Apply Master to Pages…, then select a master to apply and the range of pages (1-8 will give you all 8, 1, 3, 5, 7 will be the odds, 1-3, 4, 6-8 if you want continuous ranges and individual pages).

  • How can I remove the Star Button from the Address Bar?

    How can I remove the Star Button from the Address Bar? There's no obvious way of doing it. Is there any about:config value related to it?

    https://addons.mozilla.org/en-US/firefox/addon/no-star-button/

Maybe you are looking for

  • PI 7.0: IDOCs struck in IDX5 with error "Time Limit Exceeded".

    Hi All, We have a File to IDOC scenario in PI 7.0. After mapping the IDOCs are posted from PI to ECC System. On a normal day this interface works good, yesterday we received a huge file which resulted in the creation of about 25000 IDOCs from one sin

  • Problem with referenced libraries (after flash 5.5 trial install/uninstall)

    I've been using flash builder 4 & flash cs5 with on problems. I unstalled flash 5.5 trial version to have a play around, then uninstalled it. I also changed the flex sdk version flash builder was using so I could export and test stageVideo. Now when

  • Standby Mode - Does it work on Late 2012 MacBook Pro (non-Retina)

    I have read many articles today and I remain a little confused.  I have seen the Apple discussion at http://support.apple.com/kb/HT4392 regarding "Standby Mode", but I appear to have limited progress. Can the community verify if "Standby Mode" (contr

  • What's up with this-QT file showing up in FFox and Opera and not in Safari

    I am using the latest version of Dreamweaver (Adobe) and have embedded a quicktime file on a page such that it successfully shows up (via DW preview in browser feature) and plays in FireFox (latest version) and Opera (latest version). It's not showin

  • Print Function Workaround

    Hi everyone, I'd like to see some upgrade to allow LR's Print Module to interact properly with ALL printer drivers. Prints are dull or have a heavy majenta cast despite proper colibration of monitor and using correct printer profiles. I understand th