Create private tiff tags

Hi,
after an intensive search on how to create private tiff tags using JAI (ImagIO) libaries i'm now able to create my own tags. But if i'm using the snippet below all my tags are "unknown" to different applications. Of course i can re-read the tags using the number but not the name. Is there any way to set the name correctly too?
               TIFFDirectory tiffDir = TIFFDirectory.createFromMetadata(reader.getImageMetadata(0));
               IIOMetadata meta = tiffDir.getAsMetadata();
               String[] _value = { "test tag 1!" };
               TIFFTag tag=new TIFFTag("Test1", 65222, (1 << TIFFTag.TIFF_ASCII));
               TIFFField sub=new TIFFField(tag,TIFFTag.TIFF_ASCII , 1, _value );
               tiffDir.addTIFFField(sub);
               String[] value2 = { "test tag 2!" };
               TIFFTag tag2=new TIFFTag("Test2",33000,(1 << TIFFTag.TIFF_ASCII));
               TIFFField sub2=new TIFFField(tag2,TIFFTag.TIFF_ASCII,1,value2 );
               tiffDir.addTIFFField(sub2);
               IIOImage iioImage = new IIOImage(inputImg, null, meta);
               writer.write(null, iioImage, writeParam);By the way, is it possible to set private tiff tags using the com.sun.media.jai.codec package? With this package i'm only able to read/modify existing tags ...
regards,
Ulrich

I have created the private key and CA's self-signed certificate signed by the private key by using openssl program.That's not a 'CA's self-signed certificate'. That's your own self-signed certificate. No CA is involved. Unless you generate a CSR, have it signed by Verisign, and import it. In which case it is a CA-signed certificate, not a self-signed certificate.
I think you need to look up and note what all these terms really mean.
You could have done all that with the keytool BTW.
Is it considered 'private' with the password?'Private' enough for what? You need to answer that question first, and it's a very serious question. What is the private key being used for? what are the risks associated with it being disclosed? what is the level of security required to mitigate those risks? These are all questions about your application and your business. Not about security APIs in Java.

Similar Messages

  • Problem in creating a custom tag

    Hi All,
    I'm new to jstl. I want to create a custom tag. I created a sample java class and sample tld file and I used this file at my page it give me an error. The java and tag file code is as follow
    package mytag;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    * This is a simple tag example to show how content is added to the
    * output stream when a tag is encountered in a JSP page.
    public class Hello extends TagSupport {
         private String name=null;
          * Getter/Setter for the attribute name as defined in the tld file
          * for this tag
    public void setName(String value){
        name = value;
         public String getName(){
              return(name);
    * doStartTag is called by the JSP container when the tag is encountered
        public int doStartTag() {
           try {
            JspWriter out = pageContext.getOut();
            out.println("<table border=\"1\">");
              if (name != null)
               out.println("<tr><td> Hello " + name + " </td></tr>");
            else
               out.println("<tr><td> Hello World </td></tr>");
           } catch (Exception ex) {
             throw new Error("All is not well in the world.");
           // Must return SKIP_BODY because we are not supporting a body for this
           // tag.
           return SKIP_BODY;
    * doEndTag is called by the JSP container when the tag is closed
         public int doEndTag(){
            return EVAL_PAGE;
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
    <taglib>
         <tlibversion>1.0</tlibversion>
         <jspversion>1.1</jspversion>
         <shortname>sample</shortname>
         <info>My sample tag</info>
      <tag>
        <name>hello</name>
        <tagclass>tag.Hello</tagclass>
        <bodycontent>empty</bodycontent>
        <info>
         This is a simple hello tag.
        </info>
      <attribute>
          <name>name</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
      </attribute>
    </tag>
    </taglib>And I use this tld file in my jsp code I got below error
    * org.apache.jasper.JasperException: /mytag.jsp(9,15) Unable to load tag handler class "tag.Hello" for tag "sample:hello"
    Help me about this problem.
    Edited by: Get2win4world on Dec 15, 2009 1:12 AM

    Your class (according to what is posted) is in the package mytag.
    So in your tld: <tagclass>tag.Hello</tagclass>should be<tagclass>mytag.Hello</tagclass>cheers,
    evnafets

  • PLEASE HELP - JAI create a tiff file

    Hi people,
    I am trying to reate a TIFF file compressed for a Fax Server. The resolution of such an image must be 200dpi by 100dpi as per server requirements.
    I am managing the create a tiff file with these requirements. However, since I am using a resolution of 200dpi by 100dpi, the final image is squashed vertically. The following is the code which I am using.
    // loading the image
    RenderedImage src = myCreateImage();
    // this is a proprietary method which returns a RenderedImage
    // Specifing the tompression Group
    TIFFEncodeParam param = new TIFFEncodeParam();
    param.setCompression(TIFFEncodeParam.COMPRESSION_GROUP4);
    //set the image resolution to 200 x 100
    TIFFField[] extras = new TIFFField[2];
    extras[0] = new TIFFField(282, TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{(long)200, (long)1},{(long)0 ,(long)0}});
    extras[1] = new TIFFField(283, TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{(long)100, (long)1},{(long)0 ,(long)0}});
    param.setExtraFields(extras);
    OutputStream outputStream = new FileOutputStream ("c:/test.tif");
    TIFFImageEncoder encoder = new TIFFImageEncoder (outputStream, param);
    encoder.encode(src);
    outputStream.close();
    outputStream = null;
    Any help would be highly appreciated
    Thanks & Regards
    George Azzopardi

    Maybe it's because you're not setting the resolution unit (tag 296)
    Example:
    TIFFField[] extras = new TIFFField[3];
    extras[0] = new TIFFField(282,TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{200,(long)1},{(long)0 ,(long)0}}); //x
    extras[1] = new TIFFField(283,TIFFField.TIFF_RATIONAL, 1, (Object)new long[][] {{100,(long)1},{(long)0 ,(long)0}}); //y
    //set resolution unit to inches
    extras[2] = new TIFFField(296, TIFFField.TIFF_SHORT, 1, (Object) new char[] {2}); //2 for inches
    param.setExtraFields(extras);

  • How can I create a new Tag in Finder?

    Can somebody explain how to create a new Tag in Finder? Thank you very much

    If you right-click on the file you want to add the tag to you get this menu:
    Select "Tags..." and you get:
    Just type the new tag name in the box at the top.

  • How to create a custom tag for a custom converter

    In Jdeveloper 11g, I have a project where I have created a custom converter class that impements the javax.faces.convert.Converter class. I have registered the converter with an id in the faces-config.xml file of the project, and the converter works fine by using the <f:converter type="myconverter"> tag. However, the custom converter has a field which I would like to set from the tag itself. Hence, I would like to add an attribute to <f:converter> tag if possible or create a custom tag that has the attribute.
    I have done some reserach and I found that a custom tag can be implemented: I need to create a class which extends from the ConverterTag class or javax.faces.webapp.ConverterElTag class, which I did, but I also need to create ".tld" (tag library) file which defines the tag itself.
    The part about creating the ".tld" file and registring the new tag is what I'm not sure how to do.
    Does someone know how to do this?
    thank you

    Hi frank,
    that's a good document, and it explains how to make a custom converter. I already created the custom converter, it converts a number to any currency pattern. I know java already has a currency converter, but it doesn't support Rupee currency format, and I need that format.
    My converter works, but I would like to pass the pattern of the format through an attribute in a tag. Since f:converter doesn't seem to support that, I created a custom tag which uses my converter, and it enables me to pass a pattern to the converter.
    All of that works, but I need to be able to pass the pattern as an EL expression, and it's not evaluating the expression before passing it to the converter. It just passes the whole expression as a string. I'm thinking It may be something I'm doing wrong.
    this is the tag library definition file:
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.2</tlib-version>
    <jsp-version>2.1</jsp-version>
    <short-name>custom</short-name>
    <uri>custom-currency-converter</uri>
    <description>
    custom currency custom tag library
    </description>
    <tag>
    <name>CurrencyConverter</name>
    <tag-class>
    converter.Tag.CurrencyConverterTag
    </tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <name>pattern</name>
    <type>java.util.String</type>
    <required>true</required>
    <rtexprvalue>true</rtexprvalue>
    </attribute>
    </tag>
    </taglib>
    Edited by: Abraham Ciokler on Feb 4, 2011 11:20 AM

  • How To create a custom tag in jsf

    I'm trying to create a custom tag in jsf.what should be the approach to create it.it would be better if somebody will explain me from the skretch.

    There's a decent tutorial here, Priyo:
    http://www.exadel.com/tutorial/jsf/HowToWriteYourOwnJSFComponents.pdf
    Hope it helps,
    Illu

  • How to create a new tag in page properties in the sidekick of geometrrix page

    how to create a new tag in page properties in the sidekick of geometrrix pagesame as basic, advanced, blue print??

    Hi prachi,
        Is it tag OR Tab ? Seems like you are looking for Tab. Look at [1] & overlay to custamize per your need. Or define at your page component.
        [1]   /libs/foundation/components/page/dialog/items/tabs/items
    Thanks,
    Sham

  • I can't create a new tag while saving a file in Yosemite.

    The title pretty much says it all :-) As I try to type in a new tag while saving a file, the curser just blinks, and doesn't respond.  I can't create a new tag. I can click on existing tags, and they get added to the file, but the support page on tags says:
    To add a tag:
    Click on a recent tag that appears in the menu to link it your document. You can even add multiple tags.
    Click “Show All…” to see the all of the tags you have created. Then, click on a tag to add it.
    You can also add tag by typing. As you type in the Tags field, you’ll see matching suggestions from your existing tags.
    To add a new tag, just type it in the field.
    New tags you create automatically appear in other locations where tags are visible, such as in the Finder sidebar.
    The fourth bullet is the one I'm referring to. I think this might be a bug, but I can't find a way to report it. If it's not a bug, I would really appreciate some guidance.
    Here's some system info:
    MacBook Pro (15-inch, Early 2011)
    Model Identifier: MacBookPro8,2
    Processor Name: Intel Core i7
    Processor Speed: 2.2 GHz
    Number of Processors: 1
    Total Number of Cores: 4
    L2 Cache (per Core): 256 KB
    L3 Cache: 6 MB
    Memory: 8 GB
    Boot ROM Version: MBP81.0047.B27
    SMC Version (system): 1.69f4
    Yosemite version:10.10 (14A389)
    Thank you very sincerely for your time,
    Chris

    What sort of file(s) are you trying to tag while saving?
    Have you tried saving the file first, then tagging it/them afterwards?

  • How do I create a new tag for bookmarks in the new beta version?

    I was easily able to create a new tag with previous versions of Firefox.

    There shouldn't be any differences with creating tags in the Firefox 4 beta version?
    How are you trying to create tags?
    See also:
    *[[Bookmark Tags]]

  • Can I create private class in ABAP?

    Hi all,
    Can I create private class in ABAP? Please reply me its interview question.
    Thanks ,
    Vishal
    Moderator message : Interview type questions not allowed, read Forum Rules Of Engagement before posting.  Thread locked.
    Edited by: Vinod Kumar on Jan 16, 2012 12:20 PM

    Vishal , please read the rules of this forum.

  • How to create Sub- Category tags in PSE 12?

    I want to be able to create Sub- Category tags in PSE 12 without using the map view. I have tags United States with sub- categories South Carolina and Charleston. I had no problem doing this in PSE11.

    I found a very convoluted solution to creating a Places sub-category keytag in PSE12. First I created a new tag by placing an image on a map (using search). The resulting tag created a specfic location such as a street address. I then renamed the new tag with city name. The renamed tag can then be applied to all other desired and selected images. This is much more difficult than in PSE 11.  Is there an easier way?

  • Creating Private Inner Classes in Separate Files

    I sometimes find myself wanting to use private inner classes to do things, but then moving the classes to separate files and giving them package access just because I don't like having single large files.
    Is there a way to create private inner classes on a class but just save them in another file?
    Thanks,
    John

    For me, short file sizes usually make design structure
    more clear. This can make maintenance easier. It can
    also make browsing the code easier, even if you have a
    good editor or IDE. It is also less intimadating
    psychologically (for me, anyway) to work with a number
    of small files, each one with a distinct purpose, than
    it is to open up a monster, even if the monster does
    represent a coherent design unit in some sense. I
    think this psychological impact may be more important
    than most people give it credit for.The psychological impact is lessened if you use an IDE like VisualAge (where only one method at a time is generally displayed) or use the "Show Source Of Selected Element Only" option in Eclipse.
    It's one thing to say a method should be short and a class should have as few methods as possible. Those forces reduce complexity and ease maintenance. It's another to say a source file should be short. A source file is just a storage artifact; source code could be stored in a database without changing how the programmer interacts with it. The fact that the standard java compiler requires the implementation of nested classes to be stored inside the source file of their containing class is a minor inconvenience. Don't let it discourage you from using inner classes when they make sense. The design should not be driven by source file size considerations.
    >
    But you have added code only with the sole intent of
    making a source file smaller. If Java had amechanism
    for storing nested classes in other files youwouldn't
    do this. My point below was that you shouldn't let
    source file size override the decision to use anested
    class.Why shouldn't I let it? There are plenty of
    non-trivial benefits (the ones I gave above, for
    starters) to working with smaller files.Because all of those benefits can be gained from using a decent IDE. Eclipse is free. It can show only the current method and it can collapse nested classes.
    You say "If
    Java had a mechanism...." Well, I could answer: It
    does have such a mechanism, and that mechanism is
    packages.Packages are not a mechanism for creating private inner classes in separate files. Eclipse has a mechanism for making the fact that they reside in the same source file a non-issue.
    >>
    I am not being cavalier. I have no argument, onlyan
    opinion.Again, you are perfectly entitled to your opinion.
    But if it is truly an opinion, and nothing more, why
    bother telling me about it. You might as well post
    your favorite color. It is the reasons for your
    opinion that interest me, and you still have not
    really given any.I have had lengthy arguments about the issue of method and class size. Like I said before, I prefer very small classes and methods. I also think the number of nested classes should be as small as possible. But I have no problem with large files. Files are just one way to organize source code. The size of the things in the files matters, not the files themselves.

  • How do we stop the XSL transform creating an empty tag when there is no inp

    Here is a way to stop the XSL transform from creating an empty tag when there is no input.
    1. Open the XSL Map in Jdev
    2. Go to the Design Tab
    3. Right click the tag in the target tree and select "Add XSL node -> xsl:if"
    4. Create a new link from the source tag (the same that is linked to the target tag) to the newly created xsl:if

    For anyone coming in to find this, I located my answer here:
    [Special Applet Attributes|http://java.sun.com/javase/6/docs/technotes/guides/plugin/developer_guide/special_attributes.html#codebase]
    Thanks for reading.
    Sorry for the interruption.

  • Cp 5.5, Section 508 Accessibility - Is it possible to create a skip tag in the Accessibility dialog?

    Hi,
    We're working with a US Federal client so our Captivates need to fully Section 508 compliant. We've been able to work out strategies for all the elements of our course except one:
    In order to auto-play each slide, then have it pause until the user chooses to move forward using the playbar, we've added a click box to each slide. We would like for JAWS to skip reading the click bos, since it is not used as anything other than an automatic pause. If we could use the Accessibility dialog to create a skip tag for the click boxes, that would be ideal.
    Here's our experience so far:
    If we leave the Accessibility dialog in default (Auto Label checked), JAWS read "click box" - acceptable but not ideal
    If we uncheck Auto Label and leave Name and Description empty, JAWS reads "unlabeled button" - unacceptable
    If we uncheck Auto Label and populate Name and Description with empty quotation marks, JAWS reads "quote quote" - unacceptable
    Appreciate any techniques you've come up with -
    Thanks,
    KN

    System board for use in models with 1 GB of discrete graphics memory 616244-001
    System board for use in models with 512 MB of discrete graphics memory 608203-001
    System board for use in models with UMA graphics 608204-001
    http://h10032.www1.hp.com/ctg/Manual/c02437489.pdf
    Graphics is built into the motherboard.
    Can only upgrade with new motherboard.
    Only a few laptops have graphics cards that can be up graded. "Like Alienware"
    Good luck.
    HP Expert Tester "Now testing HP Pavilion 15t i3-4030U Win8.1, 6GB RAM and 750GB HDD"
    Loaner Program”HP Split 13 x2 13r010dx i3-4012Y Win8.1, 4GB RAM and 500GB Hybrid HDD”
    Microsoft Registered Refurbisher
    Registered Microsoft Partner
    Apple Certified Macintosh Technician Certification in progress.

  • How Do I create A css tag that sets my bg?

    I created a css tag that defines my bg and how it is
    displayed but I have no clue on how to apply it to my pg...or if I
    have done this the right way. If someone could provide a tutorial
    or instruction that would be greatly appreciated.
    Thank you

    You can apply it to the body tag, or create a div tag with an
    id (ie id="container") that surrounds the page and apply it to
    that.
    body {
    background: #333333;
    #container {
    background: #333333;
    Go to Window > Reference
    In the Book dropdown choose CSS under style select any of the
    background attributes to see details about how to use it.
    Put your styles in a new stylesheet, embedded on the page, or
    inline.
    -To link a separate style sheet put this in the head:
    <link href="pathtostyles/filename.css" rel="stylesheet"
    type="text/css" />
    -To embed it on the page place the css code in the head
    surrounded by style tags:
    <style type="text/css">
    body {
    background: #333333;
    </style>
    -To use inline styles, in the html tag use the style
    attribute:
    <body style="background: #333333;">

Maybe you are looking for

  • OSB - configuration project deploy error

    Hi! I got an error message when i wanted to deploy a configuration project to OSB: Permission denied Failed to create temporary jar file The OSB works in Linux. I had got problems with permissions of OSB file folder in Linux. I solved these (the orac

  • Hide eml file attachments in Convergence

    Hello, Is there a way to hide eml file attachments in Convergence? It already displays the contents of the eml inline so there is no need for the attachement Also, in Communications Express it currently does this

  • Service Selection in SES

    Hi, While creating SES, service selection is called to select serives from Work Order, Contract etc. But, at times or for some Work Orders, the radio button option for Service Selection from Contract is missing. Any explanations, please ? Thanks in a

  • How to access 'javax.bluetooth' from javaSE side?

    It's clear that the designers of 'javax.bluetooth' package decided to put it into 'javaME', rather than 'javaSE'. But, that is causing me grief and confusion, because I'm trying to write a simple 'bluetooth hello-world' application to utilize a bluet

  • Plugin container wont close

    Running newest versions of FF and flash, win 98 with all updates. Avast anti virus free version. When running intensive flash apps the plug in will hang and crash. Using Proc Explorer I see plugin-container.exe has maxed my ram and swap space and the