Is this a correct JSP statment?

I am very new with Java/Jsp..etc!!!
What is the correct statement to display an image using HTML/JSP inside a portlet?
Is this correct:
<img alt="Pie chart" src="<%=renderRequest.getContextPath()%>/demo3.png" />
OR
<img alt="Pie chart" src="<%=renderRequest.encodeURL(renderRequest.getContextPath() + "/demo3.png" ) %>" />
Thanks,
rotseN

Sorry, if I confused you. That link was created by me changing the <img src='./image3.png' />
to an anchor tag <a href='./image3.png>Pie chart</a>
I just wanted to see what the entire path would be.  So when I take a look at my portlet and I look at
the binary garbage that the portlet display it will also display the link "Pie chart" and when I hover over
the link, that long line is what it point to.
I have a dead line to be able to display a Pie chart by Friday.  So I am reading how to create servlets
at this location:http://pdf.coreservlets.com/first-edition/CSAJSP-Chapter2.pdf.  Since the image3.png
file exist all I have to do is create a JSP or servlet that displays the PNG file.
Thanks,
rotseN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • DPS to iPad - Could someone clarify if this is correct please?

    Hi All,
    Is it possible I could pick someone's brains on this please? I think I've worked it out, just need to know if i have this right!
    OK, here goes. I best start with what i intend to do. I shall be creating content for our local sales team on the road. So, first off, i don;t need to charge for content. This content (for now at least) wouldn't need a global audience so i don't need it available on either the apple or android store. So, in order for this to work, is the following procedure correct?
    1) Content is created in Adobe indesign CS5.5. Type of content created are single page 'articles'. Each 'Article' has 100mb cap limit
    2) 'Articles' are uploaded to Acrobat.com (Basic or Plus account for more than 1 published document) and assembled into 'folios' (2gb size limit on folio files?)
    3) Access is assigned according to which Adobe ID's have been added to the sharing list (is there a limit to the amount of people you can share with?). Reciever of content would require a free adobe ID and the Adobe Content Viewer App (plus tablet device)
    Apart from the learning curve of how to do what in Indesign, is the export process for what i intend to use it for correct?
    Many thanks in advance for any help!
    Kind regards
    Scott

    Hi Scott,
    You are pretty much there.
    1) Yes this is correct, you create an InDesign document, you can use either CS5 or 5.5. The pages contained within the document will be pages within your Article. If you want to have both a Portrait and Landscape version, shown when the iPad is rotated then you need to have two documents one containing landscape versions of your pages and the other containing portrait versions.
    I usually create a folder named to match the Article name i.e. My Article, into that I save both documents naming them something like myarticle_h.indd, myarticle_v.indd, I also create two preview files, myarticle_h.jpg and myarticle_v.jpg and a "Table of Contents" preview file, this must be named tocPreview,png. If I have any associated files such as video or panoramas they go into an assets folder within the My Article folder.
    In InDesign, after signing in to your Acrobat.com account via Folio Builder, you create a new Folio file using the builder.  Once the folio is created it opens to the Article window and at this point I usually select Import from the dropdown menu and point to the folder, in this case My Article, that contains all my files.
    Once the files are located and you select Okay the folio is built and uploaded to your Acrobat.com account.
    2)Yes, in Acrobat.com they are refered to as workspaces. A free account can only contain one workspace at a time. A premium basic account can have 20 workspaces. I'm not sure if there is a limit on the size of a Folio/Workspace of 2gb perhaps someone else can advise on that.
    If you want to share the Folio you can share it via the Folio Builder in InDesign by highlighting the Folio and selecting Share from the dropdown menu. Add the Acrobat.com email address of the people you want to give access to. Once you've done this you will see an icon with two people on it.
    You can also share the workspace via the Acrobat.com dashboard as well.
    3) Yes, but I'm pretty sure access is only available to those registered for an Acrobat.com account. You use the email address they used when registering, in some cases it may be the same as their Adobe ID.  The reciever of the content has to have the Ipad, the Adobe Content Viewer app and the email address they registered with on Acrobat.com. Once they open the app and sign in the Folio will load with the word "FREE" in blue and a "Download" button.
    As far as I know there isn't a limit on the number of people you can add to a share.
    Tony

  • Is this the correct type of Ram for a mac mini?

    I have a 2007 Mac mini, and want to go from 1gig to 2 gigs of Ram.
    I currently have 2 512's
    I need to know 2 things. (i'm pretty sure on both but i'm not a huge hardware guy to bare with me)
    1. Will there be any compatibility problems? I.e if i upgrade to 2 gigs will it even help or because the rest of the computer is not being upgraded will it be useless?
    2. If i'm good to go, Is this the correct type of Ram? http://www.crucial.com/store/mpartspecs.aspx?mtbpoid=4E665783A5CA7304
    Not sure if these are needed but will post anyway:
    Model Name: Mac mini
    Model Identifier: Macmini2,1
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2 GHz
    Number Of Processors: 1
    Total Number Of Cores: 2
    L2 Cache: 4 MB
    Memory: 1 GB
    Bus Speed: 667 MHz
    Type: DDR2 SDRAM
    Thank you in advance <3

    NO, it will NOT work.
    You have to find the memory specific for Mac, and rule of thumb, Mac Intel chips usually take "ECC" memory. On occasions, You can get away with Non-ECC (on certain PPC Power Mac G5 towers) -- You can check on-line stores, like Newegg, Tigerdirect, or Goolge search for the Mac Mini memory. I got mine (for my two Mac 2,1) on line, and I put 4G (2x 2G), although only 3G was available.
    It is worth of upgrade it. just need to find the right memory.

  • Frame Rate - Is this info correct?

    If I have a 25 fps movie and I want to make an SD NTSC dvd I can drop it into encore and it will convert  it to 29.97 so it will play in a region 1 dvd player automatically. However if I want to make a NTSC blue ray then I will need to have a region free blue ray player in order to play it because it will keep it at 25 unless I take it into another program to convert it to 24 or 29.97. Is all is this info correct? Thank you

    It doesn't affect the original media.

  • When I forward an e-mail from my iPad or iPhone, the pictures in the signature and sent as attachments. How can this be corrected?

    When I forward an e-mail from my iPad or iPhone, the pictures in the signature are sent as attachments. How can this be corrected?

    See [[Blank messages in Hotmail]]

  • When I open my computer I receive the following message: The procedure entry point sqlite3_wal_checkpoint couldnot be located in the dynamic link library SQLite3.dll How can this be corrected?  I never got this message before and I have a iPhone and iPad

    When opening Windows 7 I'm receiving the following message The procedure entry point sqlite3_wal_checkpoint could not be located in the dynamic link library SQLite3.dll.......I have never rec'd this before............I have a iPhone and iPad...............How can this be corrected without interferring with the information on my computer?    Thanks

    With Windows Explorer, navigate to your C:\Program Files\Common Files\Apple\Apple Application Support folder.
    Copy the SQLite3.dll that you should find there, navigate to the nearby Mobile Device Support folder, and Paste it in there also.
    Reboot and see if all is well
    In case that your OS is Windows 7 (64 bit)
    1. Open windows explorer, go to location C:\Program Files (x86)\Common Files\Apple\Apple Application Support
    2. Copy file "SQLite3.dll"
    3. Open new windows explorer, to to location C:\Program Files (x86)\Common Files\Apple\Mobile Device Support
    4. Paste file "SQLite3.dll" to the location.
    5. Reboot your computer, it should not display that message, it should be clear.
    Good Luck

  • HT4914 I turned on iTunes Match, and subscribed; but it did not load all of my library. How can this be corrected so that I can recover all of my library?

    I turned on iTunes Match, and subscribed; but it did not load all of my library. How can this be corrected?

    iTunes Store: Subscribing to iTunes Match
    After looking through the above link, and still doesn't help then try this below:
    > iTunes Content: Downloading past purchases from App Store, iBookstore, and iTunes Store
    > Non-iTunes Content: Transfer them from a different iDevice or from USB flash drive and/or external hard drive.
    I don't use iTunes Match so I don't really know.
    Message was edited by: keeferaf

  • How to convert this Servlet into JSP

    I am trying to convert this Servlet into JSP page.
    How do I go about doing this?
    Thanks.
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.text.*;
    /** Shows all items currently in ShoppingCart. Clients
    * have their own session that keeps track of which
    * ShoppingCart is theirs. If this is their first visit
    * to the order page, a new shopping cart is created.
    * Usually, people come to this page by way of a page
    * showing catalog entries, so this page adds an additional
    * item to the shopping cart. But users can also
    * bookmark this page, access it from their history list,
    * or be sent back to it by clicking on the "Update Order"
    * button after changing the number of items ordered.
    * <P>
    * Taken from Core Servlets and JavaServer Pages 2nd Edition
    * from Prentice Hall and Sun Microsystems Press,
    * http://www.coreservlets.com/.
    * &copy; 2003 Marty Hall; may be freely used or adapted.
    public class OrderPage extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    HttpSession session = request.getSession();
    ShoppingCart cart;
    synchronized(session) {
    cart = (ShoppingCart)session.getAttribute("shoppingCart");
    // New visitors get a fresh shopping cart.
    // Previous visitors keep using their existing cart.
    if (cart == null) {
    cart = new ShoppingCart();
    session.setAttribute("shoppingCart", cart);
    String itemID = request.getParameter("itemID");
    if (itemID != null) {
    String numItemsString =
    request.getParameter("numItems");
    if (numItemsString == null) {
    // If request specified an ID but no number,
    // then customers came here via an "Add Item to Cart"
    // button on a catalog page.
    cart.addItem(itemID);
    } else {
    // If request specified an ID and number, then
    // customers came here via an "Update Order" button
    // after changing the number of items in order.
    // Note that specifying a number of 0 results
    // in item being deleted from cart.
    int numItems;
    try {
    numItems = Integer.parseInt(numItemsString);
    } catch(NumberFormatException nfe) {
    numItems = 1;
    cart.setNumOrdered(itemID, numItems);
    // Whether or not the customer changed the order, show
    // order status.
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Status of Your Order";
    String docType =
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
    "Transitional//EN\">\n";
    out.println(docType +
    "<HTML>\n" +
    "<HEAD><TITLE>" + title + "</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + title + "</H1>");
    synchronized(session) {
    List itemsOrdered = cart.getItemsOrdered();
    if (itemsOrdered.size() == 0) {
    out.println("<H2><I>No items in your cart...</I></H2>");
    } else {
    // If there is at least one item in cart, show table
    // of items ordered.
    out.println
    ("<TABLE BORDER=1 ALIGN=\"CENTER\">\n" +
    "<TR BGCOLOR=\"#FFAD00\">\n" +
    " <TH>Item ID<TH>Description\n" +
    " <TH>Unit Cost<TH>Number<TH>Total Cost");
    ItemOrder order;
    // Rounds to two decimal places, inserts dollar
    // sign (or other currency symbol), etc., as
    // appropriate in current Locale.
    NumberFormat formatter =
    NumberFormat.getCurrencyInstance();
    // For each entry in shopping cart, make
    // table row showing ID, description, per-item
    // cost, number ordered, and total cost.
    // Put number ordered in textfield that user
    // can change, with "Update Order" button next
    // to it, which resubmits to this same page
    // but specifying a different number of items.
    for(int i=0; i<itemsOrdered.size(); i++) {
    order = (ItemOrder)itemsOrdered.get(i);
    out.println
    ("<TR>\n" +
    " <TD>" + order.getItemID() + "\n" +
    " <TD>" + order.getShortDescription() + "\n" +
    " <TD>" +
    formatter.format(order.getUnitCost()) + "\n" +
    " <TD>" +
    "<FORM>\n" + // Submit to current URL
    "<INPUT TYPE=\"HIDDEN\" NAME=\"itemID\"\n" +
    " VALUE=\"" + order.getItemID() + "\">\n" +
    "<INPUT TYPE=\"TEXT\" NAME=\"numItems\"\n" +
    " SIZE=3 VALUE=\"" +
    order.getNumItems() + "\">\n" +
    "<SMALL>\n" +
    "<INPUT TYPE=\"SUBMIT\"\n "+
    " VALUE=\"Update Order\">\n" +
    "</SMALL>\n" +
    "</FORM>\n" +
    " <TD>" +
    formatter.format(order.getTotalCost()));
    String checkoutURL =
    response.encodeURL("../Checkout.html");
    // "Proceed to Checkout" button below table
    out.println
    ("</TABLE>\n" +
    "<FORM ACTION=\"" + checkoutURL + "\">\n" +
    "<BIG><CENTER>\n" +
    "<INPUT TYPE=\"SUBMIT\"\n" +
    " VALUE=\"Proceed to Checkout\">\n" +
    "</CENTER></BIG></FORM>");
    out.println("</BODY></HTML>");
    }

    Sorry.
    actually this is my coding on the bottom.
    Pleease disregard my previous coding. I got the different one.
    My first approach is using <% %> around the whole doGet method such as:
    <%
    String[] ids = { "hall001", "hall002" };
    setItems(ids);
    setTitle("All-Time Best Computer Books");
    out.println("<HR>\n</BODY></HTML>");
    %>
    I am not sure how to break between code between
    return;
    and
    response.setContentType("text/html");
    Here is my coding:
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException
         String[] ids = { "hall001", "hall002" };
         setItems(ids);
         setTitle("All-Time Best Computer Books");
    if (items == null) {
    response.sendError(response.SC_NOT_FOUND,
    "Missing Items.");
    return;
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String docType =
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
    "Transitional//EN\">\n";
    out.println(docType +
    "<HTML>\n" +
    "<HEAD><TITLE>" + title + "</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + title + "</H1>");
    CatalogItem item;
    for(int i=0; i<items.length; i++) {
    out.println("<HR>");
    item = items;
    if (item == null) {
    out.println("<FONT COLOR=\"RED\">" +
    "Unknown item ID " + itemIDs[i] +
    "</FONT>");
    } else {
    out.println();
    String formURL =
    "/servlet/coreservlets.OrderPage";
    formURL = response.encodeURL(formURL);
    out.println
    ("<FORM ACTION=\"" + formURL + "\">\n" +
    "<INPUT TYPE=\"HIDDEN\" NAME=\"itemID\" " +
    " VALUE=\"" + item.getItemID() + "\">\n" +
    "<H2>" + item.getShortDescription() +
    " ($" + item.getCost() + ")</H2>\n" +
    item.getLongDescription() + "\n" +
    "<P>\n<CENTER>\n" +
    "<INPUT TYPE=\"SUBMIT\" " +
    "VALUE=\"Add to Shopping Cart\">\n" +
    "</CENTER>\n<P>\n</FORM>");
    out.println("<HR>\n</BODY></HTML>");

  • Is this the correct syntax to submit a job using DBMS_JOB.SUBMIT?

    Hello,
    Is this the correct syntax to submit a job?
    DECLARE
    v_job_number NUMBER;
    v_job_command VARCHAR2(1000) := 'PREPARE_ORACLE_TEXT_SEARCH;';
    v_interval VARCHAR2(1000) := 'trunc(SYSDATE)+1+7/24';
    BEGIN
    DBMS_JOB.SUBMIT(v_job_number, v_job_command, sysdate, v_interval, false);
    COMMIT;
    END;
    Thanks
    Doug

    DECLARE
    v_job_number NUMBER;
    v_job_command VARCHAR2(1000) := 'BEGIN
    PREPARE_ORACLE_TEXT_SEARCH; END;';
    v_interval VARCHAR2(1000) :=
    'trunc(SYSDATE)+1+7/24';
    BEGIN
    DBMS_JOB.SUBMIT(v_job_number, v_job_command, sysdate,
    v_interval, false);
    COMMIT;
    END;
    About your error:
    PLS-00201: identifier 'PREPARE_ORACLE_TEXT_SEARCH'
    must be declared
    ORA-06550: line 1, column 96:
    PL/SQL: Statement ignored
    The problem is that the job cannot find the procedure
    (maybe own by an other user). The user who run the
    job is not the same as the owner of the package.
    Bye, AronYou forget the semicolon after END.
    But we don't need here begin - end Block.
    So it's OK.
    v_job_command VARCHAR2(1000) := 'PREPARE_ORACLE_TEXT_SEARCH;'[b];
    As you right mentioned, it is probably problem with owner or typo in the name of procedure.
    Regards
    Dmytro Dekhtyaryuk
    Message was edited by:
    dekhtyar

  • I have CS2 and would like to do Image Stacking.    I understand CS3 allows this.  correct?     Am I wiser to purchase CS3 upgrade.  Am I going to run into issues with install?

    I have CS2 and would like to do Image Stacking.    I understand CS3 allows this.  correct?     Am I wiser to purchase CS3 upgrade.  Am I going to run into issues with install?

    Well, I refuse to sign up to pay Adobe a monthly tribute for life too, but that doesn't mean we are limited to CS3.
    I'm staying with CS6.
    Adobe still sells a perpetual-license to Photoshop CS6 without the subscription model, but it's $700 for the Standard version and a cool $1,000 for the Extended version.
    You haven't mentioned your platform, Macintosh or Windows, so make sure CS3 or any other obsolete version you buy actually runs on a modern operating system.
    Good luck.

  • Is this a correct assumption about MacBooks?

    I've always seen MacBook Pro as being the better option. I've always thought that MacBook Pro has always been a year ahead of the MacBook Air . Is this a correct or incorrect belief? If so, or if not, why? Like if I were to buy a 2012 MacBook Pro, it's just like purchasing a 2013 MacBook Air.or if I purchased a 2010 MacBook Pro, it's like buying a 2011 MacBook Air. Kinda like that.

    That's not a realistic expectation, really. The MacBook Air will always be less powerful than a MacBook Pro - Apple offers the Air as an uber-lightweight model why the top of the line MacBook Pro can usually compare to a fast desktop machine. That doesn't mean that the Air will not share some of the technology of the Pro line, just that the Air is built for ultimate mobility instead of raw processing power. There's simply no correlation that presents this year Air with last years Pro.
    Clinton

  • Why are photos save as .jpeg instead of .jpg?  Can this be corrected?

    Why are photos save as .jpeg instead of .jpg?  Can this be corrected?  In certain applications I have to manually change the ending so that the application can open the photo.  Is there a setting to control to correct this?

    When I mail photos (via GMail) from my iPhone they are received on my PC as .jpg files, even if sent at full resolution.  Perhaps your e-mail service has imposed an attachment size limit, and in the process scales the attached picture down and alters the file extension?
    What happens if you e-mail a photo from your iPhone and open the message from a PC instead of the Surface?  What e-mail service are you using? (e.g. your ISP's service, or Yahoo, Gmail, iCloud, etc.)  When you send the photo from your iPhone, are you selecting a reduced resolution?

  • Previewed book on iPad2 appears smaller on my bookshelf beside the others that I actually purchased. Is this anomaly corrected when a book is actually published, or is there a way of sizing the finished product while building it in iBooks Author?

    Previewed book on iPad2 appears smaller on my Bookshelf beside the others that I actually purchased. Is this anomaly corrected when a book is actually published, or is there a way of normalizing the book's final dimensions for the Bookshelf while building it in iBooks Author?

    When you submit to the store via iTunes Producer, you'll have a chance to choose a cover.

  • The install wizard stops and "rolls Back" the install and just gives the attached notice of the install error...how can this be corrected?

    The install wizard stops and "rolls Back" the install and just gives the attached notice of the install error...how can this be corrected?
    The notice is inserted first and the stopping point is second.

    Da ich gar kein Englisch kann kann ich auch nicht sagen was sie mir
    geschrieben haben ich kann nur Vermuten was das sein soll es tut mir leid
    aber ich kann ihnen keine Konkreter Antwort geben alle Sprechen Englisch
    nur ich nicht mehr kann ich dazu nicht sagen
    Constantin Preda
    2015-02-12 21:45 GMT+01:00 Claudio González <[email protected]>:
        The install wizard stops and "rolls Back" the install and just gives
    the attached notice of the install error...how can this be corrected?
    created by Claudio González
    <https://forums.adobe.com/people/Claudio+Gonz%C3%A1lez> in Adobe Reader
    - View the full discussion
    <https://forums.adobe.com/message/7189357#7189357>

  • 't' and 's' in font GFS Didot don't correspond to selected font size.  't' is too small, and 's' is too big.  Can this be corrected?

    't' and 's' in font GFS Didot don't correspond to selected font size.  't' is too small, and 's' is too big.  Can this be corrected?
    GFS Didot is nearest listed MUSE font in appearance to Adobe Caslon Pro, which is the font used in the book which the website is intended to promote.  I would like to use Adobe Caslon Pro (I paid for it and it's on my computer, but not in the cloud). Is there any way to install Adobe Caslon Pro as a MUSE font choice in the cloud?

    The Firefox Page Zoom feature does a domain by domain level of saving the users preferred zoom level settings, there is no default Page Zoom level setting in Firefox.
    Try the Default FullZoom Level extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/6965
    Or the NoSquint extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/2592/

Maybe you are looking for