Parse out the contents of meta tag using HTML.Tag

I need help with using the HTML.Tag class. I don't even know where to start...
I want to make a method that allows me to pass in a very long string and the NAME of the meta tag.. and will return the contents of the meta tag.. any help will be super..
sorry i do not have much of a code base to start with.. I am just guessing on how to get this to work..
private String getMetatag(String content,String Metaname)
String Metacontents;
Object HTML.Tag.META;
Object HTML.Attribute.NAME.Metaname;
     Object HTML.Attribute.CONTENT;
return Metacontents;
}

One of the way to get started is to check out how to overide (extend) the class
HTMLEditorKit.ParserCallback.. Lets say the class is called class A
Overide the methods for
HandleSImpleTags( HTML.Tag t, AttributeSet attribute, int pos) { }
roughly, the implemenation in that method is like this:
HandleSImpleTags( HTML.Tag t, AttributeSet attribute, int pos) {
if(t.equals(HTML.Tag.META) {
/// your procedure, what to do when encounter META tag
// String str = (String) attribute.getAttribute(HTML.Attribute.NAME);
// System.out.println(str);
You would still need to find some detail examples on how to use class A .
Roughly it is,
parser.parse(inputstream, an_instance of_class_A, true); // method in a outer class like a main class
parser is a instatiation of from the method getParser. This method need to be overidden as well.

Similar Messages

  • Hi, my macbook screen goes black at random points when I am using it. I know it is still running as music continues to play and I can vaguely make out the content of what is on the screen. Sometimes the screen will flicker between black and normal. Can I

    Hi,
    my macbook screen goes black at random points when I am using it. I know it is still running as music continues to play and I can vaguely make out the content of what is on the screen. Sometimes the screen will flicker between black and normal. Can I fix this?

    Emily..
    Could be the graphics card, run the Apple Hardware Test
    If the hardware test doesn't reveal any problems, use Lion Recovery.

  • How to get the values of an Array using JSP Tags

    Hey guys,
    I need some help. I've splited a String using
    fn:split(String, delim) where String = "1,2,3,4" and delim is ,
    This method returns an Array of splited Strings. how do i get the values from this array using jsp tags. I don't wanna put java code to achive that.
    Any help would be highly appreciated
    Thanks

    The JSTL forEach tag.
    In fact if all you want to do is iterate over the comma separated list, the forEach tag supports that without having to use the split function.
    <c:set var="list" value="1,2,3,4"/>
    <c:forEach var="num" items="${list}">
      <c:out value="${num}"/>
    </c:forEach>The c:forTokens method will let you do this with delimiters other than a comma, but the forEach tag works well just with the comma-delimited string.

  • Unable to use HTML tags in the BPEL email component

    Hi,
    I am using BPEL email component to send mail notifications. I want the email should be in proper format.If I use HTML tags the workflow application build fails .It says invalid syntax for html tags.So, I removed the tags and just using the concat string operations as of now.To format i even tried '\n' like in java but it didnt help. Could you please let me know how do I achieve this?
    The JDeveloper version is 11.1.1.3 and SOA ,OIM both are 11.1.1.3
    The BPEL source code for the email content I configured is:
    <copy>
    <from expression="concat(string('AD Account access request has been rejected by manager.\n
    Here are some details about the request:\n
    Request ID : '), bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:RequestID'),string('\n'),
    string('Employee First Name : '),bpws:getVariableData('empFName'),string('\n'),
    string('Employee Last Name : '),bpws:getVariableData('empLName'),string('\n'),
    string('Manager Employee ID : '),bpws:getVariableData('manager'),string('\n\n\n'),string('Thanks,\n IDM Administration')
    )"/>
    <to variable="varNotificationReq"
    part="EmailPayload"
    query="/EmailPayload/ns15:Content/ns15:ContentBody"/>
    </copy>
    Please suggest .
    Thanks,
    Piyasa

    Hi
    Here is the sameple email from BEPL email component. See if this helps:
    "<html>&#x0A;<body>&#x0A;<p>This is an automated message from the <b>Identity Provisioning Solution</b>. Please don’t reply to this email.</p>&#x0A;&#x0A;<p>An access request has been successfully submitted for <%concat(bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:FirstName'),' ',bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:LastName'))%> to access <%bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:ObjectDetails/ns4:name')%>.</p>&#x0A;&#x0A;To view additional details of the request, login to the Identity Provisioning Solution.&#x0A;&#x0A;<br>Request ID: <%bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:RequestID')%>&#x0A;<br>&#x0A;<br>&#x0A;<br>&#x0A;<br>Thank you,&#x0A;<br>Identity and Access Management&#x0A;</body>&#x0A;</html>&#x0A;"
    Regards
    user12841694

  • Print out the contents present in Modal Window on a paper

    Hi,
    Can anyone suggest me how to take print out the contents of a HTML Modal Window.
    Any Inputs on this can be appreciated.
    Thanks
    Ram

    I tried this Finder drag method & discovered that it is very important to set the blank TextEdit document to plain text before the drag (from the format menu or with Cmd-shift-t). If you don't, TextEdit attempts to load the content of the files!
    Once I discovered this, I tried the method with Find (Cmd-F) results & it works for that, too. This means that by choosing the right combination of search location(s) & search criteria, you can extend the method to filter the list to just about any files you want, which could be very handy.
    For instance, set the "Kind" criteria to "QuickTime Movie" & location to "Computer" & you get a list of every QT movie. Or set the search location to the folder containing the movies of interest & you get all of them, including ones in subfolders. You could also use the 'date created' or other search criteria to filter the list to a specific subset of movies (or whatever).
    If you need to do this often, you could create one or more 'Smart Folders' with the criteria preloaded for each search.
    The only drawback I see for either Finder based method is the full path one. If you are getting results from just one or a few folders, Find & Replace can delete any of the path name fairly easily, but it becomes a chore if there are a lot of different ones. Some other text editor, like TexEdit Pro, that supports grep searches would be handy here, but since I'm not up to speed on grep, someone else will have to explain how to use it for this, if they want.

  • In OAF restrict the richtext editor using html tags

    Hi Gurus,
    In my page Insert/Update I have requirement of Adding Comment. I have used MessageRichText for this Comment section. The data type of the corresponding Table column is CLOB.
    But while saving the entered comment, data is getting saved with HTML tags. .... :
    I have another search page that cannot have MessageRichText filed; only MessageStyledText field could be used to show the Saved Comment.
    As the data has been stored with HTML tags in DB Table, in the Search Page  it showing the Last Inserted Comment with HTML tag.
    I want to show the actual Comment entered without HTML tag.........how to do this??????
    Please help!!!!!!!!!!!!!!!!!!!!!!!!!1

    Hello cornelius.
    For one, you need to select RTF for message composition and not Plain Text.
    Select/highlight the text you want for the hyperlink and at the menu bar, go to Edit and select Add Hyperlink.
    Enter the URL in the space provided and be sure to include http://
    Select OK when finished.

  • How do i open a secured document,need to prin out the contents?

    How do I open a secured document? I need to print out the contents.

    Mail the Word document, and when you click the attachment in IOS 8 Mail, the Word document will open in Pages v2.4.2 (required for IOS 8). If password protected, you will receive a password challenge when you attempt to open the document.

  • Can I carry out the persistence and ORM tasks using EclipseLink?

    Can I carry out the persistence and ORM tasks using EclipseLink (without TopLink or Hibernate) ?
    Is the EclipseLink a free tool and no license fee?
    How about TopLink Essentials?
    Edited by: junez on 18-Nov-2009 05:51

    junez wrote:
    Can I carry out the persistence and ORM tasks using EclipseLink (without TopLink or Hibernate) ?
    Is the EclipseLink a free tool and no license fee?And yes, EclipseLink is an open source project so there are no license fees. However, Oracle does redistribute EclipseLink as part of the Oracle TopLink product and therefore customers are able to access support for EclipseLink through Oracle support.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How I get the community Folder of community using adaptive tag?

    Hi,
    How I will get the community Folder of community using adaptive tag.

    Hi,
    Andrew Caldwell wrote:
    Is there a way to invoke these without the script opening each one?
    You must use the bundle identifier instead of the name
    Here a example :
    set theApps to {"com.microsoft.excel", "com.adobe.Acrobat.Pro", "com.barebones.textwrangler", "com.roxio.Toast", "com.fetchsoftworks.Fetch"}
    repeat with anApp in theApps
           tell application "Finder" to tell (application file id anApp)
                  set vers to version
                  set parentFolder to name of its container
           end tell
           if parentFolder is in {"Applications", "Utilities"} then set parentFolder to ""
           display alert anApp & ": Version: " & vers & " " & parentFolder
    end repeat

  • How to use HTML Tags in Smartforms

    Hi,
    Can you please help me out in knowing how to use HTML tags in Smartforms,
    suppose i want to display some text in BOLD i should use the tag </b> as shown
    </b>  Header Information <b>
    regards
    Ranveer

    Hi Ranveer ,
        check this following links,
      hope this wil helps you
    <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/smartforms/smartform%20in%20abap.pdf">check this link,to know abt HTML in smartforms</a>
    rgds,
    shan

  • I want to display BLOB image in JSP Using  html tags IMG src=

    GoodAfternoon Sir/Madom
    I Have got the image from oracle database but want to display BLOB image using <IMG src="" > Html tags in JSP page . If it is possible than please give some ideas or
    Send me sample codes for display image.
    This code is ok and working no problem here Please send me code How to display using html tag from oracle in JSP page.
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="javax.swing.ImageIcon;" %>
          <%
            out.print("hiiiiiii") ;
                // declare a connection by using Connection interface
                Connection connection = null;
                /* Create string of connection url within specified format with machine
                   name, port number and database name. Here machine name id localhost
                   and database name is student. */
                String connectionURL = "jdbc:oracle:thin:@localhost:1521:orcl";
                /*declare a resultSet that works as a table resulted by execute a specified
                   sql query. */
                ResultSet rs = null;
                // Declare statement.
                PreparedStatement psmnt = null;
                  // declare InputStream object to store binary stream of given image.
                   InputStream sImage;
                try {
                    // Load JDBC driver "com.mysql.jdbc.Driver"
                    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
                        /* Create a connection by using getConnection() method that takes
                        parameters of string type connection url, user name and password to
                        connect to database. */
                    connection = DriverManager.getConnection(connectionURL, "scott", "root");
                        /* prepareStatement() is used for create statement object that is
                    used for sending sql statements to the specified database. */
                    psmnt = connection.prepareStatement("SELECT image FROM img WHERE id = ?");
                    psmnt.setString(1, "10");
                    rs = psmnt.executeQuery();
                    if(rs.next()) {
                          byte[] bytearray = new byte[1048576];
                          int size=0;
                          sImage = rs.getBinaryStream(1);
                        //response.reset();
                          response.setContentType("image/jpeg");
                          while((size=sImage.read(bytearray))!= -1 ){
                response.getOutputStream().write(bytearray,0,size);
                catch(Exception ex){
                        out.println("error :"+ex);
               finally {
                    // close all the connections.
                    rs.close();
                    psmnt.close();
                    connection.close();
         %>
         Thanks

    I have done exactly that in one of my applications.
    I have extracted the image from the database as a byte array, and displayed it using a servlet.
    Here is the method in the servlet which does the displaying:
    (since I'm writing one byte at a time, it's probably not terribly efficient but it works)
         private void sendImage(byte[] bytes, HttpServletRequest request, HttpServletResponse response) throws IOException {
              ServletOutputStream sout = response.getOutputStream();
              for(int n = 0; n < bytes.length; n++) {
                   sout.write(bytes[n]);
              sout.flush();
              sout.close();
         }Then in my JSP, I use this:
    <img src="/path-to-servlet/image.jpg"/>
    The name of the image to display is in the URL as well as the path to the servlet. The servlet will therefore need to extract the image name from the url and call the database.

  • How to use HTML Tags in webdynpro java

    Hi,
         Can any body tell me how to use HTML Tags in webdynpro java.
    If u provide me with sample code it will become more usefull.
    Thanks & Regards,
    SN

    HI,
    Please find the steps:
    Create a html file and store in your webdynpro project
    Add the html contents in your file
    & Create a IFRAME UI element and refer you html file
    Now you able to see the html in webdynpro
    Thanks & Regards,
    Ram

  • Can i use HTML tag in text when sending contens as "Attachement(PDF)".

    Hi all!!
    i try to add html tag on ibot email text column.
    is it possible?
    - in ibot delivery content.
    send content as Attachment(PDF)
    "if sent as attachement, include this text" <--- mark this field
    and below multi line input column, can i use html tag, for example,
    Yahoo
    thanks in advance.
    Edited by: vingorius on 2010. 10. 31 오후 7:27

    hi vingorius ,
    No you cant include html but u can use variables
    To add a variable in a text message to provide context for the iBot attachment
    1. Click the following option:
    If sent as attachment, include this text
    2. Type the text into the text box with a session variable, a repository variable, or a presentation variable using the syntax shown in the following table:
    Variable Type
    Syntax
    Repository @{Variable_Name}
    Session @{NQ_SESSION.Variable_Name}
    Presentation @{Variable_Name}
    For example, Dear, @{NQ_SESSION.Variable_Name}, here is your personalized Weekly Sales Territory Update.
    NOTE: If you want to use the @ character, you need to precede it with the \ (back slash) character to separate it from the variable syntax. For example, Dear @{NQ_SESSION.DISPLAYNAME}, \@ New York, appears as Dear Joe Smith, @ New York.
    Source : BI Guide
    Thanks,
    Saichand.v

  • How to use HTML tags inside JSF pages

    I am creating a Menu using dataTable and outputLink in a JSF page.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
    <h:column>
    <li>
    <h:outputLink id="crumbID" value="#{bread.menuLink}">
    <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
    </h:outputLink>
    <li>
    </h:column>
    </h:dataTable>
    </ol>
    </div>
    </div>
    I want to use <li> HTML tag as shown in code above before and after every <tr> tag formed, but when i run it and see view source, this is how it shows:
    NOTE: you can see it has thrown out of <table> tag itself.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <li>
    </li>
    <table>
    <tbody>
    <tr>
    <td><a id="_id0:0:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=-1"><span id="_id0:0:crumpName" style="width: 165px;">Home</span></a></td>
    </tr>
    <tr>
    <td><a id="_id0:1:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=3~-1"><span id="_id0:1:crumpName" style="width: 165px;">HIM Admin</span></a></td>
    </tr>
    </tbody>
    </table>
    </ol>
    </div>
    </div>
    Can some one help me, how do i use HTML tags inside <h:dataTable>.
    Or is their any other way i should form my Menus, to fully utilize to HTML tags.
    Thanks
    Ravi

    Hello,
    You can embed the verbatim elements in your datatable, ie,
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
      <h:column>
        <f:verbatim><li></f:verbatim>
        <h:outputLink id="crumbID" value="#{bread.menuLink}">
          <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
        </h:outputLink>
        <f:verbatim></li></f:verbatim>
      </h:column>
    </h:dataTable>

  • Background color using html tag

    Hi all,
    I hve to give background color using html tag , Please suggest
    and if can do in sql for background colour tag.
    Help me on this .
    Regards, Subathra

    just take placeholder property and select HTML option as below
    Then inside textbox you can use expression like below
    ="<FONT color=""green"">" & Fields!YourField.Value & "</FONT>"
    and text will show in green color. you can specify color of your choice
    But I would also prefer using standard property of textbox to set the color
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for