MediaLookup isn't working in a certain JSP file

Hi there!
This is my first time around here (I was in the original ATG Forum though) and I'm looking for your guidance about this odd behavior in my project...
I'm using MediaLookup droplet to show an image in the home page. This is the code I'm using:
     <dsp:droplet name="/atg/commerce/catalog/MediaLookup">
          <dsp:param name="id" value="defaultIMGProd"/>
          <dsp:setvalue param="media" paramvalue="element"/>
          <dsp:oparam name="output">
               <dsp:getvalueof var="imageURL" vartype="java.lang.String" param="media.url"/>
               <c:if test="${not empty imageURL}">
                    <img height="80px" width="80px" src="${imageURL}"/>
               </c:if>
          </dsp:oparam>
     </dsp:droplet>
And it works fine...
But when I copy the same code in a different JSP (to show this same image in the catalog, next to each product), it doesn't work at all, and it throws this error message:
12:30:41,485 INFO [MediaLookup] DEBUG Find item: id=defaultIMGProd; type=media
12:30:41,486 INFO [MediaLookup] DEBUG Item Found:media-internal-binary:defaultIMGProd(/ContenidoAdministrable/Catalogo/defaultIMGCatProd.jpg)
12:30:41,486 ERROR [DynamoServlet] atg.servlet.ServletResources->dynamoHttpServletRequestCantAccessProperty : getParameter(media.url) can't access property url in class atg.adapter.gsa.GSAItem
I just can't think on a reason why this is working in one JSP but isn't working in other one...
Any suggestions will we appreciated :)
Thanks!
Waldo.-
Edited by: user12845432 on 25-may-2012 9:41

Hi ,
The issue may be because you are using paramvalue="element" .
In the new jsp element may be referring to something else , due to nesting of droplets.
its better to use elementName attribute :
eg :
You may be using like this :
<dsp:droplet name="XYZ">
<dsp:param name="inputparam" param="inputparam" />
<dsp:oparam name="output">
<dsp:droplet name="/atg/commerce/catalog/MediaLookup">
<dsp:param name="id" value="defaultIMGProd"/>
<dsp:setvalue param="media" paramvalue="element"/>
<dsp:oparam name="output">
<dsp:getvalueof var="imageURL" vartype="java.lang.String" param="media.url"/>
<c:if test="${not empty imageURL}">
<img height="80px" width="80px" src="${imageURL}"/>
</c:if>
</dsp:oparam>
</dsp:droplet>
</dsp:oparam>
</dsp:droplet>
Instead use like this :
<dsp:droplet name="XYZ">
<dsp:param name="inputparam" param="inputparam" />
*<dsp:param name="elementName" value="mediaItem" />*
<dsp:oparam name="output">
<dsp:droplet name="/atg/commerce/catalog/MediaLookup">
<dsp:param name="id" value="defaultIMGProd"/>
*<dsp:setvalue param="media" paramvalue="mediaItem"/>*
<dsp:oparam name="output">
<dsp:getvalueof var="imageURL" vartype="java.lang.String" param="media.url"/>
<c:if test="${not empty imageURL}">
<img height="80px" width="80px" src="${imageURL}"/>
</c:if>
</dsp:oparam>
</dsp:droplet>
</dsp:oparam>
</dsp:droplet>
~ Praveer

Similar Messages

  • Managing JSP files (.java, .class) size in working directory

              Our new web application automatically generates JSP pages which
              causes the working directory holding the JSP files to grow
              too large to manage,does Weblogic have a alternate way to
              compile JSP without permanently storing the .java, .class files
              on disk.
              Maybe in cache were they can be managed, cleaned up similar
              to how a database cache works.
              Any ideas or advice would be appreciated.
              THANKS IN ADVANCE.
              

              Just don't look in the classfiles directory and everything will
              be fine.
              WLS will only leave the .java files if you ask it to keep them (keepgenerated).
              If you don't keep the .class files on disk then WLS will have to
              recompile them every time it is restarted. If you have so many
              JSPs you are having trouble managing them, you definitely don't
              want to recompile everytime you restart WLS.
              Last time I looked in our public_html there were 67000 JSP files.
              We don't have any problems managing them.
              Mike
              "denis mercier" <[email protected]> wrote:
              >
              >Our new web application automatically generates JSP pages which
              >causes the working directory holding the JSP files to grow
              >too large to manage,does Weblogic have a alternate way to
              >compile JSP without permanently storing the .java, .class files
              >on disk.
              >Maybe in cache were they can be managed, cleaned up similar
              >to how a database cache works.
              >Any ideas or advice would be appreciated.
              >THANKS IN ADVANCE.
              

  • Functionality of  LoginSubmit function in Login.jsp file

    Hi,
    I have tried to change the javascript customization in the "Login.jsp" file on my test box but I am sort of stuck in terms of getting the logic behind the function "LoginSubmit(value)" .
    What I have tried to do is to create a conditional expression based on the button ("submit" or "cancel" in the password reset form) that is clicked. Based on my testing I find that the function "LoginSubmit(value) " is called for each button click and it seems to treat each call in a different way.
    The function "LoginSubmit(value)" is a function which is available in the default implementation of access manager itself. I basically needed to know how this function works when the "Login.jsp" file is called or how this function responds to each button click .
    Can anyone direct me to specific documentation which is of help.
    Appreciate your thoughts on the working of this function.
    Thanks,

    Have a look here. This might be useful to you:
    Re: How to call a PL/SQL procedure from a Java class?

  • Can't run jsp files in Jdeveloper

    I have some existing jsp files and when I compile these files, Oracle9i Jdeveloper keeps telling me "Error: JSP files must reside in the server root directory or a subdirectory beneath it".
    I originally think that's because of "import" and I got rid of all "import ....", and the same error message still insists.
    Please help, thanks!:-).

    Hi All!
    I have just downloaded jdeveloper 9.0.3.3 - and I have run into a similar issue...
    1. I created workspace by selecting new workspace from wizard
    2. I created a new project -- from existing (previously tested using Resin server) code -- and, I select the "copy files to project directory" checkbox in the "wizard" dialog
    3. when I rebuild the project in jdev9033, for each jsp file name I get this message, i.e.,
    "Error: JSP files must reside in the server root directory or a subdirectory beneath it"
    what does this mean for me do?? (btw - I am using the default server that is integrated within Jdeveloper)
    In my working "existing code", my jsp files are loosely located under my "myProject" folder (which also contains the "WEB-INF" and "src" folders.
    Where, in my existing code, does JDeveloper expect to my the JSP files to be?....In a "JSP" folder?.... Or, where - within my new workspace/project - should I copy these JSP files in order to make this error message go away??
    Thanks for you help!!

  • Certain hardware on Black Macbook isn't working?

    I'm having a problem with my Black Macbook it's running on Snow Leopard. That laptop is being bootccamp & it's running on Windows 7 too. Currently i'm facing a problem with the Keyboard, Sound, Bluetooth & trackpad. All of the mentioned above isn't working help???

    Does it work for changing screen brightness (F1, F2)?  If not then go System Preferences ⇾ Keyboard ⇾ Keyboard and ensure that 'Use F1, F2 etc as function keys' is turned off, i.e. unticked.

  • Trying to import photos into Lightroom 5 isn't working

    I am trying to import photos into my lightroom 5 catalog and it isn't working.  Done this MANY times before and this time nothing.  Tried importing directly from memory card and copying the files to the hard drive both just start the process and it never moves.  Even tried putting the files in the folder I was going to use and then selected to Sync the folder.  Lightroom recognized the 203 times in that folder...  but nothing.  Just sits there.
    Using Lightroom on the Mac, importing JPG and a few AVI files.  Tried single JPG (that I could open in preview) but nothing...
    Any help would be appreciated!

    Seems like this is related to specific files.  If I make a new folder with only certain files it works.  But seeming like it is more then a handful.  Really painful, because once it has the issue you need to close lightroom, then lightroom needs to be forced to quit... it doesn't close cleanly.....
    All the images that cause the problem seem fine in any other viewer....

  • Anyone notice that iTunes Store isn't working?

    Has anyone noticed that the store isn't working at all... and certain titles are now missing... "Batman Begins" no longer listed.

    Yes Jason, I had the same problem you seem to be describing. It's been happening for a couple of days now (at least since I noticed) and I was able to get it to work tonight. I finally installed the new upgrade and once I did, iTunes was once again available. So if you haven't taken the update, I'd recommend maybe trying that. At least it worked for me, though I don't know why.

  • Can I give a certain JSP its own thread pool?

    Hey all,
              The application I'm working on needs to give a certain JSP its own thread pool so that it does not effect the performance of the other pools. I can create the new thread pool and am trying to set the value in web.xml. Here's my entry:
              <servlet>
              <servlet-name>??????</servlet-name>
              <jsp-file>/search/*.jsp</jsp-file>
              <init-param>
                   <param-name>wl-dispatch-policy</param-name>
              <param-value>search</param-value>
              </init-param>
              </servlet>
              Since this is just a JSP can you tell me what I should set the <servlet-name> to?
              Thanks for the help.

    you could also try it here:
    http://web.mac.com/madmax019/0/mx/Favicons%20%26%20URL%20Icons.html
    max

  • My lock button isn't working. I am using the assistive touch thing right now. Can I get my phone fixed?

    My lock button isn't working. I am using the assistive touch thing right now. Can I get my phone fixed or replaced?

    Rice is hit or miss but if you can (assuming you live in a home with a furnace) sit it up with the speakers facing down on an air flow register for about 10 minutes.  The heat from the furnace will not harm the sensitive components and will dry the phone out nicely including the display layers.  DO NOT USE a hair blower!  The iPhone is capable of drying out much more easily than phones with removable backs as the iPhone while sumbermeged in liquid (for a short time) will take on limited moisture hence can be dried and keep on keeping on.  My dauhter dropped her iPhone 5 in a toilet and it was fine after spending 24 hours in rice and 10 minutes on the air register while the furnace was producing heat.
    One last thing.  DO NOT POWER ON the phone until the drying out efforts have been completed and certainly DO NOT plug it in.

  • Push isn't working for email on iPhone or iPad using aol

    Push isn't working for my email on iPhone and iPad for aol carrier

    I have the paid AOL accounts, and they were supposed to get back to me today and have not, thus far. It has to be an issue with AOL's email server.  The tech that I spoke to over the weekend said that he thought that it may be an issue with their server.  Almost 3 weeks ago, AOL's email server was hacked.  They said that 2% of their accounts were affected, and one of my AOL accounts was in that 2%.  They didn't admit for over a week that it was their server that had been hacked, and instead made everyone affected think that it had been their own computers that had been hacked.  I have to believe that this is an AOL issue again.  Everything was working fine with my iPhone and my iPad, and suddenly my email was nolonger being pushed on Thurs night/early Friday.  If I get an answer from AOL, I will certainly post it here.

  • TS1389 My iTunes isn't letting me play certain songs.

    My iTunes isn't letting me play certain songs, saying that the computer is not authorized to do so.  I've done everything Apple recommends. I've gotten rid of the SC folder twice.  I deauthorized then reauthorized it, etc. I am the administrator so signing in as administrator doesn't help.  I don't know what to do. Help please.

    Doublechecking. In the course of your troubleshooting to date, have you also worked through the instructions from the following document?
    iTunes: Missing folder or incorrect permissions may prevent authorization

  • I am trying to activated a brand new iPhone 4s but the serial number isn't working. Suggestions?

    I am trying to activated a brand new iPhone 4s but the serial number isn't working. Suggestions?

    Are you getting any error message or other data that helps to understand why the SR # is not working?  Sometimes when entering a serial number a letter or number is entered incorrectly because a 1 looks like an l or an s looks like a 5.  Make certain that this type of an entry error is not your problem. 

  • Need to re-install Creative Suite 5 to my computer after my laptop crashed. But disc isn't working.

    hello all,
    please help me!
    my Creative Suite 5 installation disc isn't working. What can i do?
    rd

    the 7 steps are needed so you can successfully download.  if you downloaded what you wanted, you followed the directions correctly.
    just make sure your serial number is for the downloaded program.  here's some help with serial numbers, http://helpx.adobe.com/x-productkb/global/find-serial-number.html
    if you're certain you're using the correct serial number for the correct product and it still fails, contact adobe support: http://www.adobe.com/support/chat/ivrchat.html

  • My iMessage isn't working on my 4s I've tried everything!!!

    MY iPhone 4S iMessage isn't working I've tried everything!!

    HI,
    Is the Serial Number shown on your Mac ?
    In the Apple iCon Menu > About this Mac click the line that tells you the current OS version twice.
    Once will show you the Build Number (another method of counting the OS version and can be specific to certain models) and the next click shows you the Serial Number.
    If it is missing (due to refurb or repair and not replaced) it will need replacing at an Apple Store or Apple Authorise Service Provider.
    10:26 PM      Saturday; February 16, 2013
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Photoshop isn't working... any help?

    Hey, so I've been using PS for about a year but I'm not really keen to all the technicalities when it comes to mishaps. I mostly use it for fanart which is what I was in the middle of today when it stopped working.
    I usually hit the C + J + Control keys to open an image on a blank layer after I used the pen tool to crop it out. But my finger slipped and I have no idea what I pressed. Now the cursor is the no sign (prohibition sign like when a poster is showing that smoking isn't allowed in a certain place) and no mater what I do it won't change. I can't even exit out of it because no matter what I scroll over I just have this small no sign that doesn't react when I press any of the tools.
    Really don't wanna begin again so if I can get some help asap, that'd be nice!!! But if I have to start over I will.

    Its okay. I think I might have messed it up in general because to get to PS I have to minimize my web browser... just pressing the PS tab doesn't do anything and Google Chrome stays open.

Maybe you are looking for