Very simple html template engine...

Hi forum
I need to create a very simple html templating engine. My requirements are only load a html document into an object (HTMLDocument for example?), search a couple of particular tag or string, treat the text found between these tags like a block, repeating the content all the necessary times, and replacing a special string within the text for another one.
Here an example:
<html>
<title>Foo page</title>
<body>
<table>
<!-- Initial special tag -->
        <tr>
            <td>{String to replace}</td>
        </tr>
<!-- Final special tag -->
</table>
</body>
</html>If i pass the html example code for the template engine with the following parameters, the result that i want is:
Number of times to repeat the BLOCK: 3
Text to replace de special string: Hello world
<html>
<title>Foo page</title>
<body>
<table>
        <tr>
            <td>Hello world</td>
        </tr>
        <tr>
            <td>Hello world</td>
        </tr>
        <tr>
            <td>Hello world</td>
        </tr>
</table>
</body>
</html>That�s all. I search in google for something but a encountered only javascript based "applications", except the "Rhino" engine, but that is to much for mi needs.
Well, i hope anyone can help me.... and sorry for may bad english :P...

Here's the generated code:
`include(~service="system", ~language="", ~theme="dm", ~name="TemplateLibraryDHTML.html")`
      `SAP_DynproLayerBegin(003,001,028,001)`
      `SAP_Label("%#AUTOTEXT001")`
      `SAP_DynproLayerEnd()`
      `SAP_DynproLayerBegin(003,003,020,001)`
      `SAP_Label("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_OLD")`
      `SAP_DynproLayerEnd()`
      `SAP_DynproLayerBegin(030,003,005,001)`
      `SAP_InputField("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_OLD")`
      `SAP_DynproLayerEnd()`
      `SAP_DynproLabelLine(003,003,030)`
      `SAP_DynproLayerBegin(003,004,020,001)`
      `SAP_Label("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_NEW")`
      `SAP_DynproLayerEnd()`
      `SAP_DynproLayerBegin(030,004,005,001)`
      `SAP_InputField("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_NEW")`
      `SAP_DynproLayerEnd()`
      `SAP_DynproLabelLine(003,004,030)`
      `SAP_DynproLayerBegin(004,006,014,001)`
      `SAP_Button("CTR_NEG_AMEND_REJ")`
      `SAP_DynproLayerEnd()`

Similar Messages

  • Creating a simple HTML template

    Hello All,
    I have to create a simple HTML template for a screen in SRM for Mass change of a field on contracts. I have ITS service ready and I have created a HTML template with reference to the prorgam and screen. It generated following code. what change do I need to make to make the template displayed. When i run the template it gives me an error 'URL http://XXXXX/sap/bc/gui/sap/its/ysrm_ctr_mass/ call was terminated because the corresponding service is not available'.I have never worked on HTML templates before. Anybody wannna help me, pls?
    Here's the generated code:
    `include(~service="system", ~language="", ~theme="dm", ~name="TemplateLibraryDHTML.html")`
          `SAP_DynproLayerBegin(003,001,028,001)`
          `SAP_Label("%#AUTOTEXT001")`
          `SAP_DynproLayerEnd()`
          `SAP_DynproLayerBegin(003,003,020,001)`
          `SAP_Label("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_OLD")`
          `SAP_DynproLayerEnd()`
          `SAP_DynproLayerBegin(030,003,005,001)`
          `SAP_InputField("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_OLD")`
          `SAP_DynproLayerEnd()`
          `SAP_DynproLabelLine(003,003,030)`
          `SAP_DynproLayerBegin(003,004,020,001)`
          `SAP_Label("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_NEW")`
          `SAP_DynproLayerEnd()`
          `SAP_DynproLayerBegin(030,004,005,001)`
          `SAP_InputField("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_NEW")`
          `SAP_DynproLayerEnd()`
          `SAP_DynproLabelLine(003,004,030)`
          `SAP_DynproLayerBegin(004,006,014,001)`
          `SAP_Button("CTR_NEG_AMEND_REJ")`
          `SAP_DynproLayerEnd()`
    Thanks,
    Chandra

    Hi
    Which SRM version are you using ?
    Please do the following steps ->
    -->Activate the services through SICF  - SRM transaction code.
    > Go to SICF transaction and activate the whole tree under the node Default host>sap>bc>gui>sap>its.
    Right click on any of the services (there you will find option to De-actiave / activate the service)
    Related links ->
    Note 851940 - Launchpad in BBPSTART has wrong URL for services
    Re: Service Cannot be Reached
    Please ensure IACOR service must be running correctly before publishing the HTML Templates using the report - W3_PUBLISH_SERVICES
    When you are using the Internal ITS,you need not run the report W3_PUBLISH_SERVICES.(only SIAC_PUBLISH_ALL_INT )
    Re: Activating a Service in SICF
    Regards
    - Atul

  • On a mac, coded a simple HTML page, but can't bring it up in firefox, it simply brings up the code instead of translating it to a web page.

    I have made a very simple HTML page in text editor on my mac. I'm trying to view what the page would look like in firefox, but it just brings up the code, rather than the webpage, even though the extension in the address bar says .html.

    Are you opening that file locally or have you uploaded the file to a server on the internet?
    Can you post a link if you have uploaded the file?

  • Page includes in html templates

    I see <% include file="header.html" %> in html template working for 'HTML' gallery type web engines.
    <br />
    <br />But, it doesn't work if the gallery type is 'Flash'. It seems the only supported directive includes are %variablename% format.
    <br />
    <br />Why LR is restricting lots of features for Flash based galleries? Is this by design or restricted for some other reasons or a bug?
    <br />
    <br />I wish if there is some flag somewhere that can be turned on so that Flash gallery type will have all the features of html. Currently I don't think it'll encourage any developer to write/adapt flash based web plugin for LR.
    <br />
    <br />Chris

    Sean, Thanks for your reply. SlideShowPro is no different. Please check any of the html pages in the SlideShowPro plugin. It doesn't use <% %> directives. Only %var% is used.
    <br />
    <br />Yes, I'm aware of what include does. That's exactly the reason why I need it in Flash gallery type. Keep the header and footer outside the template for easy user editing.
    <br />
    <br />To explain the issue in easier terms, lua coding is allowed in the template files only if you set gallery type as 'Html'. If you change it to 'Flash', it won't work.
    <br />
    <br />Even simpler,
    <br />You can use <% %> only in html gallery types.
    <br />
    <br />It's not just 'include'. If <% ... %> is allowed for Flash gallery type, you can do a lot of lua scripting in your html templates. All spoiled by LR limitation :-)

  • How to take data from HTML Template into BSP Variable?

    hi all,
                can we take the data from the input field of HTML Template and collect into BSP variable? i have the shown the HTML Template into BSP page by passing the url in <IFRAME> tag now i have to take the data form the into field of HTML Template and save it back to the BSP table onclicking the Save button of BSP Page. please help me out thanks in advance.
    Thanks & Regards,
    Amol

    Hi Amol,
    This is very simple....
    In the onInputProcessing event of the page use the following code to read data from the InputField into an ABAP variable...
    Then you can use it at will..!
    Code is :
    data : event       TYPE REF TO if_htmlb_data,
           but_event   TYPE REF TO cl_htmlb_event_button.
    event = cl_htmlb_manager=>get_event( request ).
    IF event->EVENT_NAME = 'button' and event->EVENT_TYPE = 'click'.
          but_event ?= event.
          CASE event->EVENT_ID.
            when 'your_button_id'.
              data : lw_inf type ref to cl_htmlb_inputfield.
                 lw_inf ?= cl_htmlb_manager=>get_data(
                                request = runtime->server->request
                                name    = 'inputField'
                                id      = 'your_inputField_id'  ).
              if lw_inf->value is not initial.
                lw_variable = lw_inf->value.
              endif.
         ENDCASE.
    ENDIF.

  • Deciphering Aperture Web Themes: the html templates v3

    version 3 of my Aperture Web Theme html template reference. enjoy
    the html templates.
    rkid attributes:
    Aperture uses proprietary ids within the html documents to identify the parts it needs to play with. These ids are 'rkid' ids. for example,
      <ul id="nav" rkid="navbar">
    These are the rkid values that I've identified so far:
      "navbar"
        a <ul> element containing all of the navigation elements.
      "active" and "inactive"
        rkid attributes to enable the coder to place different formatting on
        current and non-current page numbers in the navbar.
        eg; <li rkid="active"><span class="currentPage">PageNumber</span></li>
          <li rkid="inactive"><a href="IndexPageURL_">_PageNumber</a></li>
      "content"
        a <div> containing all of the album images and their metadata.
      "pictureblock"
        a mandatory <table> in which the images are placed, one image per <td>.
        the <table> must even be used on the Detail page where only one image is
        displayed.
        the metadata will be within the "pictureblock" table if more than one
        image is displayed so that the metadata can be tied to the image. if
        only one image is displayed; i.e., the Detail page; the metadata may be
        in a <td> outside of the table that the image is in but still within the
        "content" div, usually in the following format:
          <div rkid="content">
            <table>
              <td>metadata
              <td><table rkid="pictureblock">
      "image"
        the rkid for the <img> elements containing the album images, frequently
        placed in <dt> elements within the table's cells.
      "metadata" (added in Decipher v3)
        all metadata for the respective image is specified within this element.
        everything within the element is repeated for every metadata value.
        the Aperture themes use the <ul> element but <div> also works:
          <div rkid="metadata"><p>metaname: metavalue</p></div>
      "titleblock"
        a <div> containing the title text; usually <h3>; for Journals. the <h3>
        element within this element must be given the attribute rkid="text" or
        Aperture will ignore it.
      "textblock"
        a <div> containing the description text for Journals. as with the
        titleblock, the <p> element/s within this div must be given the
        attribute rkid="text".
      "text"
        the rkid given to the text data within the titleblock and textblock
        elements.
    Place holders:
      PageTitle
        used in the <head> of the html. it's made up of the Album/Journal's name plus a page number. eg; "My lucky album - Page 1".
      IndexPageURL
        the gallery page/s URLs; may be more than one.
      ThumbImageURL
        the href links for the images, whether thumbnails or detail full size.
      DetailPageURL
      used within navbar:
        PageCount
        PageNumber
        PreviousPageNumber
        PreviousPageURL
        NextPageNumber
        NextPageURL
        PageCount the total number of pages
        PageNumber includes all of the page numbers listed in the navbar, one
          occurrence for each page.
        _Previous and _Next are more specific and are currently used to draw the
          prev/next arrows in the navbar.
      ImageName
      ImageNameSpace
      PlateNameSpace
      PlateNumberSpaceSlash
        *only seen* when 'Enable Plate Metadata' option in the tag popup menu is
          chosen.
        used to represent an index of the image in the album. the first image
          shown gets the index 1, the second 2 and so on.
        for the Image placeholders, the word 'Image' is used.
        for the Plate placeholders, the word 'Plate' is used.
        space indicates an extra space after the index, probably for html
          formatting purposes because it's only used within <dt> elements.
        slash indicates an extra / character after the index.
        examples:
          ImageName > 'Image 1'.
          ImageNameSpace > 'Image 1 '.
          PlateNameSpace > 'Plate 1 '.
          PlateNumberSpaceSlash > '1 / '.
      metaname
      metavalue
        the placeholders for all of the metadata names/values in the selected
        metadata set.
      PageWidth
        not sure if Aperture calculates it based on the width and number of
        images being displayed in both gallery and detail pages.
        don't know why it's only used in the Special Occasion theme.
      CellWidth
        the width of the table cells containing the album images. not
        necessarily the width of the images. may include margins as specified in
        the albuminfo.plist files.
      ImageWidth
        the width of the image.
      TableWidth
        the width of the pictureblock table. it can probably be applied to other
        elements too but it's length is almost certainly calculated from the
        pictureblock table.
    Operative attributes:
      removeonfirstpage="yes"
        used in the navbar to remove the Prev link from the first page.
        because it's applied to the <a> element, the <a> element is removed
          while leaving an empty <li> in place.
      removeonlastpage="yes"
        used in the navbar to remove the Next link from the last page.
        because it's applied to the <a> element, the <a> element is removed
          while leaving an empty <li> in place.
      removeonsinglepage="yes"
        used in the navbar to remove elements when there's only one page.
        used in a <div> in the Art Collection to remove the whole navbar on
        single pages.
      contenteditable="yes"
        used in text elements to indicate that the user can customise the text.
        not necessary in titleblock and textblock rkid="text" elements.
        in elements outside of the titleblock and textblock elements, content
        will not be truly editable unless a textid is assigned to the text
        elements. unfortunately, all text elements with textids are always
        'common' and can not be specific to any one image.
      common="yes"
        the element is seen on all pages.
    Other attributes:
      metaseparator="|"
        used in metadata formatting, within the metadata lists.
        you can add additional characters. for example, the metaseparator
        in the Stock Black theme is " | "; ie, a | bar with a space on both
        sides. (Decipher v3)
        if the metaseparator is specified and the html template places the
        metadata into <li> elements as it does in most of the current themes,
        then it produces non-standard html code with the metaseparator between
        concurrent <li> elements.
      metalayout="paragraph"
        used in metadata formatting, within the metadata lists.
        if not specified, the metadata will not be exported. (Decipher v3)
      singlenesting="yes"
        used in metadata formatting. not sure what it does yet.
      textid="x"
        used to id text elements outside of the titleblock and textblock
        elements.
        possibly no limit to the number and id names used.
        examples used:
          textid="copyright"
          textid="header1"
      picturename="x"
      pictureimage="true"
        picturename gives the image an id.
        pictureimage="true" tells Aperture that the image is a static image
        which can be designated by the user during setup of the album. they show
        up in Aperture as grey blank rectangles with cross-eyes in the middle.
        they do not need to be inside the "content" element
        with picturename and pictureimage, we can place as many static images on
        the page as we wish.
    Assertions:
      Aperture uses the rkid values to identify the areas of the html to be
      repeated for the respective objects.
      standard id and class attributes are only used by the css for formatting and
      not by Aperture to write the html data.
    Notes:
      Aperture is hardcoded to expect and require that the album images are always
      within a <table rkid="pictureblock"> element. it is not possible to place
      album images outside of the table. all album images must be placed within
      <td> cells within the table. the <td> code is repeated for each image.
      image metadata is also normally within the rkid="content" element although
      it can be outside of the rkid="pictureblock" element.
      by default, the textblock rkid="text" element is added when the T+ button is
      pressed within Aperture. the textblock element is switched with the
      titleblock element when the Title/Text toggle button is clicked.
      width and height attributes of <img> elements are rewritten by Aperture
      based on the inserted images. placeholders aren't necessary within <img>
      elements.
      comments are stripped from the html before export some but some
      Aperture-proprietary attributes are forgotten and left behind.
      some pages use the html 4.0 loose doctype. others use the xhtml 1.0 strict
      doctype.
      all markup is converted and exported in UPPER-CASE. personally, I prefer
      lower-case.
      high-ascii characters entered by the user are not converted to their html
      entities when available. eg, the © character.
      multiple <p> elements can be inserted into the titleblock and textblock
      <div> elements but each of them must have the rkid="text" attribute. any
      element without this attribute will be ommitted by Aperture.
      the reason there are Smart Galleries but no Smart Journals is because you
      need to write text between each row of images.
      titleblock and textblock elements will not be applied to Galleries or Detail
      templates; only to Journals.
      if there are more than one titleblock or more than one textblock, only the
      first will be used by Aperture.
      upon export, Aperture will remove everything from within the rkid="content"
      element which is not the pictureblock, titleblock or textblock elements.
      (Decipher v3)
      some of the Aperture templates have xhtml doctypes but are exported from
      Aperture with html 4.0 loose doctypes. weird! worthy of note is the fact
      that UPPER-CASE element names is not permitted with xhtml which is
      case-sensitive. (Decipher v3)
    Questions:
      are there variable scopes with each rkid? eg, within the "content" rkid, can
      every variable/placeholder be accessed?
      why did the Aperture team use Definition List <dl>, <dt>, <dd> elements for
      the images and related metadata in the table? easier css formatting?
    JavaScript: (Decipher v3)
      you can include JavaScript in the html code but cannot wrap it in html
      comments because Aperture will remove everything within comments.
      Aperture variables such as PageNumber will not be replaced within
      attributes such as <body onload="dialog(PageNumber);">.
      it is very difficult to use document.write anywhere within the html <body>.
      Aperture seems to be using JavaScript to export the html and its code is not
      able to cope with more than one instance of document.write in the html
      templates. after hours of trial and error, I found that the most stable way
      to use JavaScript within the html <body> was to only use one <script>
      element and place everything within it. using document.write within a second
      <script> element would almost certainly lead to unpredictable exported html,
      and instability and crashes in Aperture.
    iMac Duo Core 2GHz 2GB   Mac OS X (10.4.6)  

    It worked. I still have a few tweaks to do on my final template, but the method I described above works. I've set up my templates like this:
    1) one large image per thumbnail page (like a photo essay or photo blog style)
    2) same size image on detail page, but with paypal buttons directly below in their own table (I have several different paypal buttons - for different print sizes and a couple other things like postcards, etc.)
    The neatest thing about this setup is that since it's all controlled by flat html and css, it looks almost like javascript the way the paypal buttons pop up - the image stays in exactly the same place and the buttons just appear below it (haven't tried it on a slow connection, though, probably a slight delay).
    This is great because I hate javascript but sometimes like the immediate visual effects it allows.
    This template makes it trivial to create a reverse chronological gallery/journal - kind of like a photoblog - and allows visitors to view the large images without the extra clutter of the buttons, but then they can just click on the image to reveal the buttons and click the image again to hide them.
    The benefit of putting these buttons directly into the Aperture templates rather than using a find-replace script to add them to iWeb pages after processing? Well, using Aperture, I can add the PageTitle tag to the Paypal button - it doesn't work in hidden form fields or anything that needs to go inside an attribute, but it does parse using a textarea field, which I hid with CSS - This alleviates the problem many photographer sites have where they ask the buyer to email them with the image name/number they want - this way, the shopping cart automatically knows which image they're ordering.
    PageTitle uses the following format: Gallery/Journal Name - Image/Version Name
    So using this tag in the Paypal button tells me which image the buyer wants and which gallery they were viewing when they ordered - simple but effective.
    Anyway, I know it's been a few weeks since I last replied, but I thought I would post this for others who might be interested in doing something similar - entirely through Aperture. Sorry about the run-on sentences; I'm a bit pre-occupied to proofread today.

  • Servlet HTML Template

    Hi, there.
    I have a Servlet that among many other things, return a HTML to the user.
    At the beggining, the HTML was so simple that it worth write the String and output it. The HTML now became much more complex, and I'd like to make it an external resource (.html), for mantainance purposes, and only replace the dynamic content inside it. I don't know which is the best way to accomplish it, to replace the variables inside the HTML Template I've just created. What should I look for?
    Searched the web and found this solution: [HTML.Template.java|http://html-tmpl-java.sourceforge.net/]
    Anyone knows it? Is it the fastest way? The best? Does anyone know a better solution?
    Thank you in advances,
    CaioToOn!

    CaioToOn! wrote:
    Hi, Kayaman.
    I'm searching over "velocity template" just right now, didn't knew it. Are you talking about it http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html
    Yes.
    On JSP, I have no familiarity with it. I can achieve anything with a JSP that I could achieve with a servlet? Like starting a second thread, reading headers, sending custom headers, etc? I'd also, for "fancy" reasons, like not to have a ".jsp" at the end of my URL. May I do it without a URL rewriting rule?Ideally you wouldn't do that logic in the JSP. You would do it in the servlet, then forward to the jsp which would only display and have minimal logic in it.
    And you can do it without having .jsp at the end of the URL.

  • Any suggestions on HTML templates for MAC?

    I'm wanting to create a email page for blasting, and I've used Netscape7 for this,
    but it's not up to my desires. I've tried with iWeb/save to folder, and was told it doesnt' work well with PCs. Does anyone know of a template program or site that creates sophisitcated web pages on mac that I can create and load into an email that will work well on both MAC and PCs?
    Also any good sites on simple HTML snippets that can be loaded into iWeb for my sites?
    Thanks

    I have used Sony 7506's forever, and I still love them. I think considering most of the world listens to the majority of their music on earbuds now, it's very legitimate discussion. There is a real validity to devoting some time to making sure things sound good in the cans these days. I think the days of the Maxell guy sitting in his chair in front of his expensive stereo system and getting his hair parted are long gone. Everyone is on the go these days and listens to their music on the run.
    When I was in high school..(back in the 70's...Yikes) all the guys worked part time so they could buy stereo components. You had the great big speakers, cassette deck, turntable, amp, receiver, graphic eq... that's how we listened back then. Bigger was better... it's the opposite now, new generation new approach.
    I hate to sound too pragmatic and break the mould of the traditional studio mixing on studio speakers and nearfields, but I think we are getting close to the day where the best way to mix will be setting up you mixing facility in the front seat of a car (as your main mix) and the cans acting as your nearfields. If it's something that is going to be played in clubs, do a special mix. You have to mix your music to sound good where people are going to listen to it.
    Of course I am somewhat joking, but you have to admit I have a point.

  • ITSMobile HTML template adjustment

    Hi Experts,
    we are doing WM RF barcode scanning projects, there are many many ABAP screens translated to HTML page for displaying in the hand held devide, but the problem is, the screen is relatively small (320*240 pixals) so that the HTML page (tcode LM01 etc) can not fit in one screen, it is too large, user need to drag the scrollbars vertially and horizontally, that's not convenient.
    I tried to modified the html page and also apply the css file to resize the page size, but since the are lots of screens/HTML template, it's terrible to modify the pages one by one. Could you give some idea of modify those page more quickly?
    By the way, the css file doesn't solve the problem since there are many width tags are hard coded, for example: <input type="button" style="width:'w("10","8.200em")'" '>    I need to change 8.200em to 5.200 page by page, besides this, there are many other places I need to modify, that's terrible...
    Please kindly advice whether there is a simple way.
    Thank you very much
    Fresh_man

    Maybe this answer is very late, but I was having the same problem but I have fixed this by adding this following to the service "GUI configuration":
    ~ITSMOBILEELEMFACTOR: 8
    ~ITSMOBILEELEMUNITS: px
    By changing the factor I was able to change the width of the buttons. Now the buttons fit perfectly within the RF screens.
    Hope this helps you out.
    Regards,
    Erkan

  • Problem With Deploying a very simple Servlet

    HELP REQUIRED:
    Hi,
    I'm including code of a very simple Servlet application (I shd not call it an application):
    index.html
    ==========
    <html><body bgcolor="#FFFFFF">
         <head>
         <title> Rajeev Asthana </title>
    <form action = "/HelloWorldApp/HelloWorld" method = "POST" >
    Please press Submit
    <input type = "submit" value = "Press Me!">
    </form>
    </body></html>
    HelloWorld.java
    ===============
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
         public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
              throws ServletException, IOException {
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("<html><body bgcolor=\"#FFFFFF\">");
              out.println("<p>Hello World!</p>");
              out.println("</body></html>");
              out.close();
    web.xml
    ========
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>HelloWorldApp</display-name>
    <servlet>
    <display-name>HelloWorld</display-name>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>HelloWorld</servlet-class>
    </servlet>
    </web-app>
    sun-web.xml
    ===========
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd">
    <sun-web-app xmlns="http://java.sun.com/xml/ns/j2ee">
    <context-root>/HelloWorldApp</context-root>
    <session-config>
    <session-manager persistence-type="memory">
    <manager-properties/>
    <store-properties/>
    </session-manager>
    <session-properties/>
    <cookie-properties/>
    </session-config>
    <cache enabled="false" max-entries="4096" timeout-in-seconds="30">
    <default-helper/>
    </cache>
    <class-loader delegate="true"/>
    <jsp-config/>
    </sun-web-app>
    I have deployed it in following directory structure:
    C:\Sun\AppServer\domains\domain1\applications\j2ee-modules\HelloWorldApp\
    |
    |
    |               |               |               |
    |               |               |               |
    META-INF          WEB-INF          HelloWorld.java          index.html
                   |
                   |
              |          |          |          |
              |          |          |          |
         classes          sun-web.xml     web.xml          sun-j2ee-ri-project
         |
         |
         HelloWorld.class
    While generating HelloWorldApp.war (which is the war file for this app), I specifies /HelloWorldApp as context root (sun specific).
    Now, when I deployed it thru Admin Tool and then clicked on "Launch", it displays a page with :
    Please press Submit Press Me!
    But when I click the button "Press Me!", it says:
    "The requested resource (/HelloWorldApp/HelloWorld) is not available."
    What should I do to correct the problem?
    Thanks in advance.
         

    Yes, you need to add a servlet -mapping element and adjust your form to submit to the appropriate URL mapping.
    <servlet-mapping>
    <servlet-name>HelloWorldServlet</servlet-name>
    <url-pattern>/servlet/Hello</url-pattern>
    </servlet-mapping>

  • Muti-page HTML Web Engine that shows filename or other details

    I am getting frustrated with the limited web support in Lightroom 2.1. I am looking for a very basic HTML based web engine that can show labels, flagged status or name on the thumbnail page. I don't have the time to figure out the SDK and start writing my own.
    I have tried the TTG engines, which will allow you to put additional info into the thumbnails, but it dumps everything into one page and it doesn't stack the thumbnails correctly.
    Can anyone point me to something that would work. It just shouldn't be this hard.
    Thanks,
    Chris

    Right.
    There are 3 ways to use CSS:
    Inline: styles applied to the  HTML code between the <body> tags.  This is not usually recommended.
    Embedded:  inside  <style> and </style> tags between the  <head> tags in your HTML document. This code is applied to only one page.
    External: a physical file that contains nothing but CSS code and applies to all site pages that are linked to it.
    If you have a unique style you want to use on a single page, either use embedded CSS (in the HTML document itself) or set up a unique class in your external stylesheet.
    CSS classes:
    .center {text-align:center}
    .right {text-align:right}
    .left {text-align:left}
    HTML:
    <p class="center"> this is centered text</p>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Problem with speed after adding external html "template

    HI
    I created nice looking  html "template" for my site in program Aristeer 2. Basicly it created 3 files for me- *.HTML (about 10kb) *.CSS(avout 25kb) and *.js(javascript about 7kb). I was thinking that it will work perfectly ,when i will just define new dreamweaver site and open the html file in my Dreamweaver CS3.
    problem is,that everything ,what i want to do,in this site takes enormly long time...if i just click to open my html file,it takes about 2 minutes to open it,later,when am trying to delete some picture,delete some text,add some ApDiv,create table etc,it takes really a lot of time to do it...
    am just wondering why,cos am still working with ,lets say,small files,so where is the problem?
    can please somebody help me how to fix it? (when i open another site,that i designed all by Dreamweaver CS3,there is no problem like that....)
    thanks a lot
    radko

    I have no idea what the problem is.  I did download your page and I have no idea how you can even work with that file in DW.  Every time I moved my cursor, the elements either disappeared or reappeared as I moved over the page.
    Looks like every element on that page has been placed inside an absolutely positioned div which may or may not account for the 'slowness'..
    I did notice a lag (slowness) with the mouse movement - but once I managed to get open a content container, I did paste some text into it but it was all very slow.
    I' put it down to the way the page has been created honestly.  Even though it validates and no errors were found, that really is not the best way to create a web page.  (sorry).  I realise YOU did not create it, it was an automated process - I'd stay well away from it in future  :-)

  • Using a template engine in a portlet, possible?

    Hi there,
    When developing servlets I've always used webmacro as a template engine,
    separating the code (java) from the layout (html). With Portlets it seems
    that people put their html within the java code.
    Are there any template engine solutions available for portlets, besides
    jsp ofcourse. I'm not really familiar with jsp, and also isn't jsp doing the
    same thing, putting java code within the html?
    I read it was possible to use webmacro without a servlet container, so
    perhaps this is the way to go using it with portlets. But are there also
    any integrated solutions.
    Does anybody have any experience separating their code and layout using a
    template engine? eg webmacro, velocity
    How do other developers do this, do you use jsp, or put your html directly
    into your code?
    kind regards
    ido

    Hi Ido,
    If you can do it in a servlet, then you should be able to do it in the portlet too. You need to specify the servlet for the showpage information in your provider.xml file.
    As long as all the HTMl is getting generated upfront (at the Servlet side) then you should not have any issues.
    Let me know if you have issues doing it this way.
    thanks,
    Harsha

  • Very simple question about webapp list layout.

    Hi Everyone!
    I am having a very simple issue. I have created a web app and it has a default list layout looks like:
    <table><tbody><tr><td>{tag_counter}. {tag_name}</td></tr></tbody></table>
    I have placed web app module (using {module_webapps,14273,a} ) in one of my page. In front-end it has show every thing fine except it shows table tag for each item:
    <table>
        <tbody>
            <tr>
                <td>1. <a href="/lot/lot-101">Castlepoint Lot 101</a></td>
            </tr>
        </tbody>
    </table>
    <table>
        <tbody>
            <tr>
                <td>2. <a href="/lot/efg-lot">EFG Lot</a></td>
            </tr>
        </tbody>
    </table>
    <table>
        <tbody>
            <tr>
                <td>3. <a href="/lot/some-lot">Some Lot</a></td>
            </tr>
        </tbody>
    </table>
    <table>
        <tbody>
            <tr>
                <td>4. <a href="/lot/some-other-lot">Some Other Lot</a></td>
            </tr>
        </tbody>
    </table>
    When I delete table and tbody tags from list view, it stop showing table related tags instead it start showing it without any tag.
    How to correct this issue? Please help!!!

    Here is what you can do:
    -edit the webapp list layout via FTP or via the "alpha" File Manager. The WYSIWYG editor will attempt to "correct" your HTML code. Enter something like this:
    <tr>
    <td>
    {tag_counter}. {tag_name}
    </td>
    </tr>
    -on the page you need the listing placed on enter this code:
    <table>
    <tbody>
    {webappmodule here}
    </tbody>
    </table>
    When the page renders you will get the desired result:
    <table>
    <tbody>
    <tr><td>1</td><td>Item1</td></tr>
    <tr><td>2</td><td>Item2</td></tr>
    <tr><td>3</td><td>Item3</td></tr>
    <tr><td>4</td><td>Item4</td></tr>
    </tbody>
    </table>

  • HTML Template for Web Dynpro (ABAP)

    Hi Guys,
    I am developing a webpage in webdynpro abap.
    my requirement is to use a existing HTML(same as existing applications) template for this.
    how do i do that ?
    regards
    Siddharth

    You don't.  That isn't how Web Dynpro works.  The architecture is such that it abstracts the HTML/JavaScript rendering of the output.  You place a UI element on the screen and only a metadata reprsentation of the screen is created at design time.  At runtime different rendering engines can be applied to produce the final output.  This allows SAP to add new rendering engines and to improve the rendering engines over time without having to adjust the applicaitons itself. This makes Web Dynpro sutiable for producing Business Transactions, but not general web pages.  It also gives us the flexibility to render Web Dynpro in HTML/JavaScript, a desktop client (.Net 3.0 and WPF), and a RIA client (Adobe Flex).
    You can alter the theme of the WDA application when running in HTML rendering.  The theme gets automatically inherited from the NetWeaver Portal - or you can apply a stanalone theme when running without the portal.  Theming allows for some basic changes of color scheme and branding elements - but is not the same as applying a complete HTML template.

Maybe you are looking for

  • Is there any way to...

    I have a Macbook Pro with a busted display. The HD has also been wiped. I'm waiting for a replacement display, and in the meantime am wondering if there is any way to get it hooked up to an external display using the DVI to Video adapter. I'm not sur

  • GRIR clearing accounts - PO & PO line items

    Hi gurus, In ECC 6.0 with new GL functionality being active in TCODE FAGLL03 for all GRIR clearing accounts we would like to see purchase order and p.o line item to appear in the report. regards, rupa

  • XAI invalid user name and password

    Hello, I am getting the following error when i submit the SOAP request to CC&B, i have changed the all username's and password's fields on XAI Option page to SYSUSER and its corresponding password. still getting the below error, looks like i am doing

  • Outlook 2013 cannot connect to local Exchange 2013 server

    Server name EXCHANGE: is Domain controller for (domainname.local), DNS server and Exchange 2013  Has UCC CA cert successfully installed for (exchange.domainname.com) External Outlook connections, Web Outlook and autodiscover work fine. local DNS poin

  • Is there a JRE for windows mobile 6.1 ?

    Hi everyone, I need to install a Java Virtual Machine on my Intermec CK3 device which runs on Windows Mobile 6.1. Can anyone advice where to download the JRE ? Is there a JRE for windows mobile ? Thanks in advance, Best Regards