Servlet sample "navimage.png.java" from CQ5-Docu "How to get fully featured Website" does not work.

When working on the sample described in "How to create a fully featured Website", I got an error in the part "Creating the Top Navigation Component". I have discussed this at the page itself (see the comments there) and in the sling mailing list. I was told,  this forum would be the best place to find a solution. So I will ask the remaining question here:
The sample uses a servlet "navimage.png.java" to create dynamically top navigation buttons with a meaningful text displayed.
We have got a node "/content/mywebsite/en/products" (there are more, but it is easier to explain when focusing on one of them) with jcr:primaryType=cq:Page with childnode jcr:content with the property sling:resourceType=mywebsite/components/contentpage.
The path "/apps/mywebsite/components/contentpage" contains a node body.jsp. The request http://localhost:4502//content/mywebsite/en/products.html renders the node /apps/mywebsite/components/contentpage/body.jsp.
The body.jsp includes another jsp "topnav.jsp" which refers to /content/mywebsite/en/products.navimage.png by the expression "src="<%= child.getPath() %>.navimage.png"></a><%".
The servlet "navimage.png.java" has been placed to /apps/mywebsite/components/contentpage/navimage.png.java. See inserted screenshot for the layout.
When issuing the request, none of the expected buttons is displayed. The "Recent Requests"-tab at the OSGi-Console shows a whole bunch of message requests.
The "GET customers.navimage.png", "GET services.navimage.png" and "GET products.navimage.png" tell me, that the request has been resolved (excerpt from the messages):
  10 (2013-02-01 15:45:18) LOG Including resource JcrNodeResource, type=mywebsite/components/contentpage, superType=null, path=/content/mywebsite/en/products/jcr:content (SlingRequestPathInfo: path='/content/mywebsite/en/products/jcr:content',  selectorString='navimage', extension='png', suffix='null')
     10 (2013-02-01 15:45:18) TIMER_START{resolveServlet(JcrNodeResource, type=mywebsite/components/contentpage, superType=null, path=/content/mywebsite/en/products/jcr:content)}
     10 (2013-02-01 15:45:18) TIMER_END{0,resolveServlet(JcrNodeResource, type=mywebsite/components/contentpage, superType=null, path=/content/mywebsite/en/products/jcr:content)} Using servlet /apps/mywebsite/components/contentpage/navimage.png.java
     10 (2013-02-01 15:45:18) LOG Applying Includefilters
But the "GET navimage.png" does not find anything:
  10 (2013-02-01 16:08:06) TIMER_END{10,ResourceResolution} URI=/apps/mywebsite/components/contentpage/navimage.png resolves to Resource=NonExistingResource, path=/apps/mywebsite/components/contentpage/navimage.png
     10 (2013-02-01 16:08:06) LOG Resource Path Info: SlingRequestPathInfo: path='/apps/mywebsite/components/contentpage/navimage.png', selectorString='null', extension='png', suffix='null'
     10 (2013-02-01 16:08:06) TIMER_START{ServletResolution}
     10 (2013-02-01 16:08:06) TIMER_START{resolveServlet(NonExistingResource, path=/apps/mywebsite/components/contentpage/navimage.png)}
     10 (2013-02-01 16:08:06) LOG {0}: no servlet found
So the servlet has been detected. Why isn't it displayed. When I place a real picture in the path (navimage.png) the sample works fine.
- What can I do to detect the cause of the error
- When becomes the servlet compiled and where is the class-file stored?
Thank you for your support.
Ulrich

I almost found it now. The reason was, that I had not copied (puposely!) the images-folder to the design-folder (/etc/design/mywebsite). The servlet itself requires a node from this folder
line 64: "String imgPath = new String(dg.getDesignPath(currentPage)+"/images/navimage_bg.jpg");"
line 65: "Layer bg = ImageHelper.createLayer(ctx.resolver.resolve(imgPath));"
The servlet must have failed and this is why I didn't see any buttons o my page.
I say, I have not supplied the images purposely, because I don't like to introduce too much stuff without knowing what it is meant for. I prefer to cause an error. Learning by researching errors is most of the time more effective than having something run without exactly to understand the prerequisites.
At the end this is also true for this case. I had many discussions on several platforms, read a lot of documents to go this short step.
Thank you.
Ulrich

Similar Messages

  • How do I remove music from my iphone 5?  Un-checking and syncing does not work.

    How do I remove music from my iphone 5?  Un-checking and syncing does not work.

    Hello mail4bru,
    I read your post, and it sounds as though you'd like to learn more about iTunes syncing. I have linked to an article that will instruct you on that:
    iTunes 11 for Mac: Set up syncing for iPod, iPhone, or iPad
    http://support.apple.com/kb/ph12113
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • I use OverDrive to get audiobooks from my library to listen on my ipod. Does not work since latest update of ipod. Converts the WMA and acts like it is putting it on the ipod but then it isn't there.

    I use OverDrive to get audiobooks from my library to listen on my ipod. Does not work since latest update of ipod. Converts the WMA and acts like it is putting it on the ipod but then it isn't there.

    Downgrading the iOS is not supported by Apple.Have yo tried:
    - Backing up and restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes
    - Restore to factory settings/new iOS device.                       
    - Go to the OverDrive support site

  • After "upgrading" from trial to FCPX 10.0.3 multi cam does not work

    After "upgrading" from trial to FCPX 10.0.3, multi cam does not work anymore. Everything was fine in the trial version, but now the multicam clip I made in trail is shown, but not with the 4 windows, only the first angle can be seen. And I can not find (import) the cuts I made in the trail. The settings are the same in both versions. Am I missing something? Is it possible that I have to start from scratch and all work is lost?
    When I double click the multi cam clip I see all four angles in the timeline, one underneath the other... 
    Any help is appreciated! Thanks!

    There is an excellent podcast tutorial series called "Creative COW Final Cut Help Tutorials Podcast (SD)"
    in the iTunes Store.
    The latest three are video podcasts and go into great depth concerning the new Multicam in 10.0.3
    Can't recommend them enough.

  • I need to know how to delete downloaded videos and movies from iTunes when the instructions on the support page does not work.  I have swiped the selections from left to right on the phone and nothing happens.

    Hello.
    I need help deleting videos, tv shows, and movies downloaded from itunes.  I have followed the instructions to delete from the macbook, I selected the videos I wanted to delete and right clicked to delete.  Nothing happens.  When I double click on the video it still starts playing.  I also followed the instructions to delete the videos from the iphone by swiping from left to right with nothing happening.  I opened the videos on the ipad and there is no edit selection like in the instructions on the support page. Can you please tell me how to permanently remove this content so it doesn't try to copy from each device when I want to back up the Iphone and Ipad to my macbook.  Thank you.

    Hi Shawninglewood,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    How to delete content you've downloaded from the iTunes Store, App Store, iBooks Store, or Mac App Store
    http://support.apple.com/kb/HT5772
    Cheers,
    - Judy

  • LR Mobile 5.6 Desktop: Up sync from DL desktop on Mac to Adobe Photo Cloud does not work, down sync from Cloud to DL desktop works

    I have successfully used DL Mobile for some months (currently: some 3+k photos in Adobe's Photo Cloud, in 56 collections).
    Some two weeks ago sync on DL desktop went erratic, i.e. sync attempts were always active according to the spinning wheel in the UI, but no sync happened. Right now this has changed to a status of no sync indication on Mac DL desktop whatsoever (no spinning wheel). No upward sync of changes from DL Mac to the Adobe Photo Cloud is happening.
    BUT: Up-sync to the Adobe Photo Cloud from iPad works: For example, change results can be seen immediately via browser in Adobe's Cloud collection library. AND, strange enough: the changes from iPad via Cloud are synced down to DL desktop on the Mac as well (without any sync indicator visible on DL desktop though).
    What can I do to get back to full functioning?
    Ludwig

    Could you please send me a LR Desktop diagnostig log  - best as a private message with a downloadable dropbox link.
    You can trigger the log via LR Desktop preferences -> Lightroom Mobile and when you hold down the alt key you will notice a generate diagnostic log button
    Thanks,
    Guido

  • In finder cannot easily change files from one folder to another. Drag and drop does not work. There should a cut and paste feachure.

    In finder I cannto easily change files from one folder to another.  There should de a cut and paste for this.  Not drag and drop. thanks P.

    paulfromqueretaro wrote:
    In finder I cannto easily change files from one folder to another.  There should de a cut and paste for this.  Not drag and drop. thanks P.
    OS X is all about keyboard shortcuts.
    To cut       cmd+x
    To copy     cmd+c
    To paste    cmd+v
    With the Mouse, hold command and drag to your destination.

  • DOCUMENT SETTING that ALLOW FUTURE POSTING DATE does not work in PL34

    Hi Expert,
    I am now using SAP B1 2005B (7.40.252) sp:00 pl:34 and realised that the ALLOW Future Posting Date was not working. 
    I still can remember while I was using pl:11 at B1 2005A, there is no such problem and wish to know when can the bug fix up? in which sp/pl?
    Wish to hear goods news ASAP .
    Thank you.
    Joan.

    Basically can you please clarrify your requirement as to what you want to change ..what I understand you would need to change the code for ABAP - RFEBBE00
    Value Date code in the above abap
            IF PAR_VALD = 'X'.
              MOVE C2-VALDT TO HLP_VALDT.  "  VALUE DATE
             write hlp_valdt to umsatz-budat dd/mm/yy.
            ELSE.
              MOVE C8-BALDT TO HLP_BALDT.
              MOVE HLP_BALDT TO HLP_VALDT.
            write hlp_valdt to umsatz-budat dd/mm/yy.
            ENDIF.
               MOVE HLP_VALDT(2) TO UMSATZ-BUDAT.
               MOVE HLP_VALDT2(2) TO UMSATZ-BUDAT3.
               MOVE HLP_VALDT4(2) TO UMSATZ-BUDAT6.
    Regards
    Anurag
    Message was edited by: Anurag Bankley

  • HT201317 Sometimes i take pictures and they do not transfer to  my computer and i need to reset to make it work is this normal and also sometimes i copy pictures to upload file so it can transfer to from my Pc to my i phone and it does not work at all tim

    1)     Why does it not transfer  picturesat all times even when my pc is on wi fi
    2)     When i copy pic into my upload file it does not transfer back to my i phone ?

    DavidBenJeshuah wrote:
    apple wont give me a new phone cause I broke the screen and I replaced it my self.
    Correct. When you did that, you voided all warranty/support, & forfeited the right to an out of warranty replacement.
    There was nothing wrong with the screen I bought,
    And, exactly, how do you know that? Since Apple DOES NOT sell iPhone parts, there is no official source for genuine parts. Thus, many on the market are counterfeit & produce nothing but problems.
    Good luck.

  • Activation number after installing LR 5 from a disc following Lightroom 5 CC trial period does not work

    I installed Lightroom on the Creative Cloud, trial version, then I was offered LR 5 disc. I thus installed it and entered the serial number but it doesn't work now that the trial version is over on CC. I don't understand... Can anybody help me with that?
    I must have missed something, I am stuck now.
    THanks in advance

    I installed Lightroom on the Creative Cloud, trial version, then I was offered LR 5 disc. I thus installed it and entered the serial number but it doesn't work now that the trial version is over on CC. I don't understand... Can anybody help me with that?
    I must have missed something, I am stuck now.
    THanks in advance

  • Recently upgraded from Windows 7 to 10. Now EOS Utility app does not work.

    Recently upgraded from Windows 7 to 10. Tried downloading photos from my 5D Mark II, but EOS Utility app does not work to Select Images to Download, unlike before. But when I disconnected my External Hard Drive, EOS Utility app main window works normally. I need the external hard drive connected all the time. How can I fix this problem, please? Thanks.

    This sounds like a hardware problem with your computer.  A USB port puts out a certain amount of power and can be used to power external devices... such as hard drives.  But the camera does not use any USB power -- it runs on the power from the internal battery.  It only uses the data pins to communicate. But you are describing a situation in which having one device connected a to a USB port prevents a different USB port from working.  That can happen if the device in one port is drawing too much power (it can prevent other ports from working correctly.)   Did you have this problem when using Windows 7?  

  • Ive migrated my apps from an old mac to my new mac. When i try to open my CS5 programs it get a pop up that says i need to install the legacy java SE 6. Ive done that and it still does not open?

    Ive migrated my apps from an old mac to my new mac. When i try to open my CS5 programs it get a pop up that says i need to install the legacy java SE 6. Ive done that and it still does not open?

    I'm having a similar problem...but mine results from an OS upgrade from 10.6.4 to 10.8.5.
    Where did you access a clean copy of Java SE 6?  The link at adobe for archicval plug-ins is a dead download (and it doesn't appear to contain Java SE 6.).
    Jerry

  • BUG: Oracle Schema Processor does not work in Servlets

    We found a bug with Oracle's Schema Processor. It does not work in Servlets.
    When we try to validate a XML document in a Servlet it does not work, but we can execute the same code in a stand alone application and it works.
    The following is the code we are using:
    try {
    File f =new File(filename);
    FileReader r = new FileReader(f);
    DOMParser dp = new DOMParser();
    URL url = createURL (filename);
    dp.setValidationMode(false);
    dp.setSchemaValidationMode(true);
    dp.setPreserveWhitespace(true);
    dp.parse(url);
    System.out.println("it is parsed");
    } catch(Exception e){System.out.println("there is Error"+e.getMessage());}
    null

    I don't think this is related to Servlets per se.
    Check that the Schema processor classes used by the servlet container, and your application are the same.
    Java does not have proper versioning of classes, I have seen many applications collapse. People compiled their code on developer machines, where it worked fine, but when moved to a production machine they failed because the production machine had a different version of classes. Usually the name of the class doesn't change, but either a method or a variable is missing in several classes. VM doesn't complain but simply crashes.
    In your Schema Processor classes that are used by the servlet engine might be different from the one that the app uses. Do a search on the file system to see how many copy of the same class bundle (zip, jar) you have on the system.

  • Excel File read using WebUtil does not work. Gives java.lang.NoSuchMethodEr

    We have a form which reads from an Excel File. The form works in development env., but in the live env when we deployed the form it does not work. Form fails @ the 1st call to Client_OLE2 where we set the Excel file to read.
    For both the envs. the values are given here:
    (1.) Client Forms Version : Forms [32 Bit] Version 10.1.2.0.2 (Production)
    (2.) Application Server Version : 10.1.2.0.2
    (3.) AS Linux Version : (Live) RHEL 5.7 Tikanga / (Dev) Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
    (4.) Client Sun JRE Version :Version 1.5.0 (build 1.5.0_10)
    (5.) Client Web Browser & Version: I.E 8.0.6001 or Mozilla  3.0.15
    (6.) WebUtil Version: 1.0.6Both envs. are the same except the Linux version.
    Works fine in Dev but does not work in Live. Other Webutil functions like file open dialog box works fine in live, only this Excel read is not working.
    Full Error message
    Java Plug-in 1.5.0_10
    Using JRE version 1.5.0_10 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\dinesha.IIL
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    RegisterWebUtil - Loading WebUtil Version 1.0.6
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.0
    Exception in thread "AWT-EventQueue-3" java.lang.NoSuchMethodError:
    com.jacob.com.Dispatch.put(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V
         at
    oracle.forms.webutil.ole.OleFunctions.set_obj_property(OleFunctions.java:1216)
         at
    oracle.forms.webutil.ole.OleFunctions.setProperty(OleFunctions.java:333)
         at oracle.forms.handler.ComponentItem.setCustomProperty(Unknown Source)
         at oracle.forms.handler.ComponentItem.onUpdate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onUpdate(Unknown Source)
         at oracle.forms.handler.UICommon.onUpdate(Unknown Source)
         at oracle.forms.engine.Runform.onUpdateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.processEventEnd(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
    Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)We connected to Live AS server via VPN and ran the Form in a client machine (where the Dev. is working) but same problem.
    Any help would be greatly appreciated.

    Channa,
    I sounds like you might have missed a configuration step on your Linux application server (AS). I recommend you go back through the configuration of your AS and verify each step of the WebUtil Runtime Setup Checklist was completed correctly. Seach the Forms Help system on "Runtime Setup Checklist" for a copy of the checklist.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Steve Muenchs file upload sample (No. 69) does not work with JDev 10.1.3.1

    Hi,
    I installed and started Steves sample about uploading and storing OrdImage types (http://otn.oracle.com/products/jdev/tips/muench/jsfordimage/JSFOrdImageExample.zip).
    When I try to upload a file I get an exception:
    java.io.EOFException: Per-request disk space limits exceeded.
         at oracle.adfinternal.view.faces.webapp.UploadedFileImpl.loadFile(UploadedFileImpl.java:187)
         at oracle.adfinternal.view.faces.webapp.UploadedFileProcessorImpl.processFile(UploadedFileProcessorImpl.java:96)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doUploadFile(AdfFacesFilterImpl.java:247)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:163)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:106)I have found other postings concerning uploading a file with JDev10.1.3.1 (af:inputFile bug JDev10131 production ignores Per-request disk space limit
    Is it a bug with JDev 10.1.3.1? Any workaround available?
    I'm using JDev 10.1.3.1 on WinXP.
    Thanks,
    Markus

    I managed to correct this problem.
    The situation is the following:
    A CRUD page (Example: userList.jsp and userForm.jsp).
    The first page there is a af:table with tableSelectOne and a Edit button. (theres also other components, like af:menuBar and af:form, html, body and head)
    On submit, the backing bean(requestScope) gets the selected object (table.getSelectedRowData()), copy the values to the form fields and send (redirect=false) to the form page.
    When i try to update, the fileupload does not work and ignores the valueChangeListener. All the other fields are updated correctly.
    The form page is used to do Inserts and the upload works correctly.
    The problem is, when you redirect (redirect=false) from userList.jsp (usesFileUpload="false")
    to the other page, that uses the upload, the form page does not get the enctype="multipart/form-data"
    To solve it, put usesUpload="true" in both page , and you will get enctype="multipart/form-data", and upload to work.
    Changing components, the af:menuBar has a similar problem.
    I got a menubar with 2 goMenuItem.
    On each page the corresponding goMenuItem has selected="true".
    On redirect, from list page to form page, the selected goMenuItem is the one on the ListaPage, and not the form page! It only changes if I click on the tab I want!

Maybe you are looking for