Reduce Page reloading time using struts tiles.

Hello
How to reduce page reloading time using struts tiles.
Thanks
Ramki

Hi,
I've found the move from Struts to JSF pretty easy. I got stuck on using Struts-Tiles, however I found a solution.
I downloaded and started using Apache MyFaces. It has :
org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl
which allowed me to leave everything pretty much as it was and move on.
Mission Accomplished.
Thanks for the link. Now added to the library.
Matthew

Similar Messages

  • Using Struts tiles

    hi,
    Has any body worked with Struts Tiles in workshop. Is it possible. Can any one share his experience.
    Regds
    Ashwani

    Hi Rohrlich,
    I attempted managing portal layout (e.g.: header.jsp,
    footer.jsp and body.jsp) by Struts Tiles (see below) and
    there is no sample code in the online document of WLW8.1.
    If possibility, have you any suggestion of it or advice
    reads.
    Thanks you in advance.
    <b>
    There is error message after requesting somepage.jsp:
    [ServletException in:Controller.jpf] TilesPlugin :
    Specified RequestProcessor not compatible with
    TilesRequestProcessor'
    </b>
    Environment info:
    -WLW 8.1.4 ( necessary for my workplace)
    -struts-1.2.9-bin.zip
    I practiced rudely code as below...
    [WEB-PROJ]/WEB-INF/.pageflow-struts-generated/jpf-struts-config.xml
    <plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-config" value="../tiles-defs.xml"/>
    <set-property property="definitions-debug" value="0"/>
    <set-property property="definitions-parser-details" value="0"/>
    <set-property property="definitions-parser-validate" value="false"/>
    </plug-in>
    [WEB-PROJ]/WEB-INF/tiles-defs.xml
    <tiles-definitions>
    <definition name=".template" path="layout.jsp">
    <put name="title" value="title" />
    <put name="header" value="header.jsp" />
    <put name="body" value="Controller.jpf" />
    </definition>
    </tiles-definitions>
    [WEB-PROJ]/WEB-INF/web.xml
    <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    [WEB-PROJ]/layout.jsp
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <table border="2" width="300" bordercolor="Gray">
    <tr><td bgcolor="Blue"><strong><tiles:getAsString name="title"/></strong></td></tr>
    <tr><td><tiles:insert attribute="header"/></td></tr>
    <tr><td><tiles:insert attribute="body"/></td></tr>
    </table>
    [WEB-PROJ]/somepage.jsp
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <tiles:definition id=".template" template="layout.jsp">
    <tiles:put name="title" value="This is the title." />
    <tiles:put name="header" value="header.jsp" />
    <tiles:put name="body" value="Controller.jpf" />
    </tiles:definition>
    <tiles:insert beanName=".template" />
    Best regards,
    Beginner Chan<b></b>

  • What can be done to reduce page loading time?

    Hi,
    I've built a site to showcase my photographs and pages load slowly. It has about 70 pages and each page uses the same custom template that contains graphics and type. Hyperlinks navigate from page to page or from section to section. Each page has a unique photograph. The site can be seen at...
    http://web.mac.com/peter_tangen/iWeb/pt/enter.html
    I'd like to reduce the time it takes to load a page.
    In other web design applications it's possible to have all pages access a single graphic file, this speeds up page loading as the cache "remembers" the contents of the file and eliminates the need to reload it. Other posts in this forum indicate that this capability is not currently available in iWeb, however hoped for in Ver 2.0.
    I'd appreciate any suggestions!
    FYI: A typical page contains the following files (from the page)...
    http://web.mac.com/peter_tangen/iWeb/pt/portrait01.html
    backgroundimage_1.png
    photo-filtered.jpg
    portrait01.css
    portrait01.js
    shapeimage_1.png
    shapeimage_2.png
    shapeimage_3.png
    shapeimage_4.png
    shapeimage_5.png
    shapeimage_6.png
    shapeimage_7.png
    shapeimage_8.png
    shapeimage_9.png
    shapeimage_10.png
    shapeimage_11.png
    transparent.gif
    Thanks for your time!
    g4 laptop   Mac OS X (10.4.4)  

    pvt:
    If you load the page you linked to and then open Safari's Activity window you'll see that those png files are all about from 0.1 to 2.6 kb in size. thats not very large at all. The largest file there is 66kb, the jpg background, and again not big. The Elijah jpg is 53 kb.
    Those small png files are your links below the photo and probably the borders around it.
    Here are some tips I've learned from these sites:
    1 - do not use and frames or borders, etc. around photos.
    2 - don't use any reflections.
    3 - create your own navigation bar with linked text* and turn of the iWeb Navigation bar. The nav bar is all png based.
    4 - use only the web safe fonts from the Font pane.
    5 - do not use drop shadow on fonts.
    6 - turn off smart quotes.
    The above will reduce the number and size of files associated with a web page quite a bit. Photos with fancy frames and reflections can generate a thumbnail png of around 110KB whereas the plain version will be a jpg of only 28KB. Although it doesn't sound like a lot, it will speed up loading of the page and be more darkside (i.e. PC) friendly.
    Run a test with a test site and publish to a folder. Then follow the hints above and publish to another folder and compare folders.
    *Put your linked text directly under the Navigation bar. Then turn off the nav bar in the Inspector window. The nav bar will disappear and the linked text will move up to the top of the page. (This wouldn't apply to your site)
    None of the pages I visited had any large png or unusually large files. One on the portrait 2 page was 448 kb and was the largest jpg I found.
    On your portrait 6 page the drop shadows on the photos produced png files of 2.1 and 0.9 kb. The background is 66 kb.
    As I said all the small png files are the borders and text links. I don't know if knocking out those drop shadows and eliminating those two files would make that big a difference for that page. One of the gurus here mentioned only adding a color background for the page and not the browser. I don't know how that would look or affect your site.
    I like it by the way. Nice customization.
    Tutorials

  • How do I use Struts Tiles with JavaServer Faces?

    I want to use JavaServer Faces and need something like tiles.
    Is it right that tiles is for struts what Portlets is for JavaServer Faces?
    Do I have to use Portlets or is there something else?
    What Do I have to do to use Portlets?
    Do I have to use any "engines" or something like that?
    Thanks

    Miikee_
    I guess you understood me wrong!
    JSF RI (and also MyFaces) are implementation of JavaServer Faces Spec.
    Each JSF app needs to be deployed inside of a Servlet Container.
    (like Tomcat). An no, they aren't coming up with an own servlet engine.
    But... you can also run MyFaces and the RI inside of an portlet container
    (eg pluto) instead of Servlet Container.
    HTH,
    Matthias

  • Error while trying access JSP page first time using Oracle Lite

    Hi,
    We are doing a proof of concept using Oracle Lite 10gR3. Installed Mobile server and published a JSP based application. Installed web-to-go setup.exe on a client machine and synchronized the application. However when we tried to open the page, it comes up with an error. We are using jdk version 1.4. Any advise will be highly appreciated. Thanks.
    Error message:
    Requested URL:/webtogo/18Mar1/MyIndex.jsp
    Exception: oracle.classloader.util.AnnotatedClassFormatError:_MyIndex (Unsupported major.minor version 49.)
    Invalid Class: _MyIndex
    Loader:mobileclient.web.18Mar1.jsp22486527:0.0.0
    Code-Source: /C:/MyInstallation/mobile_client_oc4j/j2ee/mobileclient/application-deployments/mobileclient/18Mar1/persistence/_pages/
    Configuration: *.jsp in C:\MyInstallation\mobile_client_oc4j\j2ee\mobileclient\application-deployments\mobileclient\18Mar1\persistence\_pages
    Dependent Class: oracle.jsp.runtimev2.JspPageInfo
    Loader: oc4j:10.1.3
    Code-Source: /C:/MyInstallation/mobile_client_oc4j/j2ee/mobileclient/lib/ojsp.jar
    Configuration: <code-source> in META-INF/boot.xml in C:\MyInstallation\mobile_client_oc4j\j2ee\mobileclient\oc4j.jar
    This class was compiled for a newer version of the JRE. Expected version 48.0, found 49.0

    (Since this is the general forum for the 'big' database, my advice would be to ask in the Oracle Lite forum. Database Mobile Server (inc. legacy Database Lite)
    If this is a formal evaluation, you could also get a Sales-sponsored trial which usually comes with 30-90 days of Metalink support. You would be able to search for notes like Doc 414106.1
    Bottom line is that the code is for JDK 1.5 and it's being deployed against JDK 1.4.2. Something needs to be either upgraded or downgraded.

  • How to reduce page load time

    Hi All,
    In my page i have 2 portlets...
    The first portlet takes 10 seconds to render and the second portlet takes 8 seconds to render. Therefore, your page is taking more than 18 seconds to render. I want render these portlets in <= 12 seconds ...
    Please give any suggestions..
    Thanks in advance...

    Try using AJAX to load the portlets

  • Slow Slow Slow page loading times using Iweb......

    I used Iweb to create a photo gallery / web site and it loads very slow...I expect the images to load slowly but even the text hangs up a bit. It is worse on IE and the layout is messed up on Firefox....is there a way to make a website created on I-web uniform for all browsers and of course load and unload faster? I have cut my image files down in half ...they are about 400-600 kB (JPG) each but they still load slow...not to mention an annoying white block where the image and text is loading?? Any help from a seasoned I-web vet?

    Hi,
    I faced same troubles. Read through my thread http://discussions.apple.com/thread.jspa?threadID=1131543
    Vonz.

  • How to create menu bar in jsp page using struts-tles

    I have started working with struts-tiles. I want to create menu bar using struts-tiles. please guide me.

    I've done this very recently. In fact, tiles has very little to do with the menu itself.
    In your layout, define where you want the menu to go.
    <tiles:insert attribute="menu" />Now, in the actual file, create your menu structure. This part is up to you. I've used http://www.brainjar.com/ as a starting point for the client side actions.
    On my menu page, I call a method on a custom object that returns the menu bar object. Currently, I'm working on putting this menu into some sort of cached object so it doesn't have to rebuild it on every page request.
    Perhaps I've misread your post and you're looking to use tiles, in and of itself, to simulate menus? Otherwise, I hope my post helps.

  • Struts tiles to create event based loading of tiles on a JSP

    Hi All,
    I am working on a web app where I am using struts tiles to create my JSPs. I have tiles for header, footer & nav bar.
    Now I want to break up my JSP body in multiple tiles. It is required that I insert only one body tile initially, say body1, which contains few hyperlinks. Depending on which link is clicked, I would attach another tile (body2) below the first one. Can any advanced tiles user inform me if it's possible with struts-tiles, & if yes how?
    Thanks.

    Tiles is basically used to overload the jsp pages and reuse them.
    In your tiles-defs.xml file:
    //Tiles for header, footer and nav bar goes here
    //Tiles for body1 and body2  goes here
    <definition name="BodyTile" page="/yourPage.jsp">
              <put name="body1" value="/blank.jsp" />
              <put name="body2" value="/blank.jsp" />
    </definition>
    <!--Blank jsp is a simple html page without any data into it-->
    Now create a customized tile for your module. Mapping has to be done in struts-config.xml.
    Notice that the definitions here extend the tile from tiles-defs.xml, i.e. "BodyTile"
    <definition name="ActionOneWithBodyOne" extends="BodyTile">
        <put name="body1" value="/yourPage1.jsp" />
    </definition>
    <definition name="ActionTwoWithBodyTwo" extends="BodyTile">
        <put name="body1" value="/yourPage1.jsp" />
        <put name="body2" value="/yourPage2.jsp" />
    </definition>Now when you first load the page forward it to "ActionOneWithBodyOne" and it displays you just your body1.
    When ever u click a link on body 1, after performing the action populate the form bean corresponding to yourPage2.jsp and forward the action to "ActionTwoWithBodyTwo".
    Hope that helps!!
    SirG

  • Can't get definitions factory from context in struts tiles in weblogic 10

    I have exception trace which only happens whenever i recompiling my java file while running my web application in weblogic 10
    javax.servlet.ServletException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Can't get definitions factory from context.
    *     at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)*
    *     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)*
    *     at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)*
    Caused by: javax.servlet.jsp.JspException: Can't get definitions factory from context.
    *     at org.apache.struts.tiles.taglib.InsertTag.processDefinitionName(InsertTag.java:580)*
    *     at org.apache.struts.tiles.taglib.InsertTag.createTagHandler(InsertTag.java:479)*
    *     at org.apache.struts.tiles.taglib.InsertTag.doStartTag(InsertTag.java:441)*
    Anybody has any idea how to fix this?
    It seems the error happen because weblogic trying to reload the context after i recompiling java file
    How do i turn off / workaround on this?
    By the way i m using struts tiles
    Thanks

    I have exception trace which only happens whenever i recompiling my java file while running my web application in weblogic 10
    javax.servlet.ServletException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Can't get definitions factory from context.
    *     at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)*
    *     at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)*
    *     at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)*
    Caused by: javax.servlet.jsp.JspException: Can't get definitions factory from context.
    *     at org.apache.struts.tiles.taglib.InsertTag.processDefinitionName(InsertTag.java:580)*
    *     at org.apache.struts.tiles.taglib.InsertTag.createTagHandler(InsertTag.java:479)*
    *     at org.apache.struts.tiles.taglib.InsertTag.doStartTag(InsertTag.java:441)*
    Anybody has any idea how to fix this?
    It seems the error happen because weblogic trying to reload the context after i recompiling java file
    How do i turn off / workaround on this?
    By the way i m using struts tiles
    Thanks

  • How Do I Swap Images w/o Page Reloading?

    Hi --
    I've created a graphic on this page with two tabs:
    http://www.karisma.thelegatogroup.com/designers/7mankind/bootcut/bootcut.htm
    To allow users to click from tab-to-tab and display the
    proper graphic I
    created hotspots over the tabs and added a behavior to each.
    However, if
    you scroll down the page then click a tab the page reloads
    each time and you
    have to scroll down again. Highly annoying.
    Does anyone have an idea how I can keep the same
    functionality of the tabs
    without the page reloading each time?
    Thanks,
    John

    "Alan" <[email protected]> wrote in
    message
    > <a href="#"
    >
    > many browsers see that as a blank link to a named
    anchor- so the page
    > reloads.
    >
    > use this instead:
    >
    > <a href="javascript:;"
    >
    Thank you, Alan. That did it.
    John

  • XMLBeans vs Struts Tiles

    Right now I am working on a product which is developed using XMLBeans, XSL, Transformer etc. My opinion is that this can be simplified by using struts tiles. Please give me your opinions. Which is better leaving as it is or redesigning

    I'm not a fan of Struts Tiles, IMHO it's only slightly better than raw JSP and has some nasty issues regarding exception handling. Having said that I'm also not a fan of using XSL to render web pages unless there are extremely good reasons for doing so (e.g. multi channel delivery).
    Maybe take a look at some of the other presentation frameworks around...tapestry, velocity, Spring MVC, jsf etc.

  • Portal Page Response time

    Hi All,
    Enter the portal page url in IE,
    I observed portal page response time using the HTTPWatch, it was taking 6 to 7 mintes to get response .
    What are the things to do improve the response time.
    Please suggest me possible solutions.
    Thnaks,
    Venkata Sarvabatla

    Too big a topic :). Involves download a profiler (commercial ones like JProbe or OptimizeIt or YourKit or ClearApp or free ones available on a google search) which can profile CPU execution and installing and configuring your JVM to send data to it. Then running the problematic part of your application, the profiler will tell you how long each method call took, how many calls were made, the call graphs etc. Once you know which part of your application is taking time , you would then inspect the code and see what the problem is. Im assuming you have already done your rule of thumb tuning (on VM, OS, DB etc).
    Google will give you plenty of examples, the tool you choose will also be important , whether you already have a commercial profiler available to your project , or whether youll need to configure some open source one.
    This is my writeup for TPTP (free open source)
    http://theworkaholic.blogspot.com/2009/10/profiling-bea-weblogic-portal-apps.html
    If you havent profiled/tuned before , i suggest you find someone on your project who has and watch them while they do it. Setting up profilers on app servers and writing tests is somewhat painful the first time around and you can learn much more from someone else.

  • I am having an increasing problem loading almost any page or site on my Macbook pro. When I click on a page or site, it doesn't load, or I have to click on reload page numerous times. Otherwise, screen remains white.

    Has anyone encountered the problem with the Pro not being able to load almost any page or site? This has been a situation growing worse by the week. I have to click on the reload page numerous times for me to access sites or pages (from news outlets, entertainment mags, etc.) Under the address bar, the screen remains white.

    Hi Linc....I have been using Safari. SHould I try Firefox? Version 10.5.8 is what I have which I believe is up to date? This is incredibly frustrating. Only thing it seems to load quickly and without trouble is my home page (NY Times). Any thoughts?
    Thsnks,
    Bill

  • How can I stop Safari reloading web pages every time?

    When I am using Safari on my iPad I frequently want to jump between web pages or between the internet and other applications.  This is simple on my laptop as once I have loaded a page it does not require reloading until I ask it to, but on my iPad I find it next to impossible as each page gets reloaded when you move back to it.  We have a slow internet connection and that coupled with the latest version of iOS working slowly on my iPad makes it very frustrating.
    Is there anyway I can stop Safari from doing this?
    I am using an iPad 2 with the latest version of iOS

    I wish it was that simple, but I'm afraid it's not.  Turning off Background App Refresh doesn't affect page reloading.  Supposedly the reloads are due to limited memory forcing Safari to keep no more than a very few (3 to 5, depending on device) pages in memory; pages therefore routinely get deleted from memory, thus forcing reloads.  I haven't tried it yet, but reportedly the iCab browser ($1.99) retains its tabs / web pages and will display them without reloads.  As will a couple of other browsers, just not Safari.  More info here http://apple.stackexchange.com/questions/56164/can-you-prevent-the-iphone-browse r-from-reloading-pages

Maybe you are looking for