Weird but simple JSTL problem

so a servelet forward the request to jsp, passing a request attribute which is String[ ] as following..
request.setAttribute("headers",headers);RequestDispatcher view = request.getRequestDispatcher("options.jsp");
view.forward(request,response);
in the options.jsp, I tried to use JSTL to iterate each element in the array and display it..
<c:forEach var="header" items="${headers}" varStatus="loopCounter">
<td><span class="style2"> ${header} <BR>${loopCounter.count}</span></td>
</c:forEach>
..simple and straghtforwrd..But it doesn't display each element in the String[ ], insteads, it shows something like
"org.apache.commons.el.ImplicitObjects7@6279d"
..... for each of the element (exactly the same).. but the loopCounter.count shows correctly, with correct number of elements expected..
WHY??!

${header} is an implicit variable in EL.
It provides a map to be the equivalent of request.getHeader(), much like ${param} is the equivalent of request.getParameter().
solution: rename your variable to be something else.
<c:forEach var="hdr" items="${headers}" varStatus="loopCounter">
  <td><span class="style2"> ${hdr} <BR>${loopCounter.count}</span></td>
</c:forEach>

Similar Messages

  • Weird dreamweaver keyboard mapping problem

    weird dreamweaver keyboard mapping problem:
    Hope this solution helps someone out. If you have q's, ask
    and I will try to help.
    I was having a weird problem in dreamweaver... Whenever I was
    in code view and typed "shift+i" to make a capital "I", instead it
    would paste from the clipboard.
    I finally figured out what was happening. I compared the
    menu.xml in my app support folder in the user library to the
    original menu.xml file that was in the application folder. I went
    through until I came across the diff:
    menu.xml in my library/app support folder:
    <!-- Windows Navigation Shortcuts -->
    <shortcut key="Cmd+Ins" name="Copy2" platform=""
    command="if (dw.canClipCopy()) { dw.clipCopy() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Copy2" />
    <shortcut key="Shift+Ins" name="Paste2" platform=""
    command="if (dw.canClipPaste()) { dw.clipPaste() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Paste2" />
    <shortcut key="Shift+Del" name="Cut2" platform=""
    command="if (dw.canClipCut()) { dw.clipCut() }" domRequired="FALSE"
    id="DWShortcuts_HTMLSource_Cut2" />
    orig menu.xml file:
    <!-- Windows Navigation Shortcuts -->
    <shortcut key="Cmd+Ins" name="Copy2" platform=""
    command="if (dw.canClipCopy()) { dw.clipCopy() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Copy2" />
    <shortcut key="Shift+Ins" name="Paste2" platform=""
    command="if (dw.canClipPaste()) { dw.clipPaste() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Paste2" />
    <shortcut key="Shift+Del" name="Cut2" platform=""
    command="if (dw.canClipCut()) { dw.clipCut() }" domRequired="FALSE"
    id="DWShortcuts_HTMLSource_Cut2" />
    There was a diff in the "platform=" tags. The orig stated
    [platform="win"], my config stated [platform=""] (nothing in
    between the ""'s). So, I reset the platform tag to be
    [platform="win"] in my settings and then relaunched dreamweaver. It
    fixed the problem.
    Not sure how this occurred, but it works now.

  • Real simple xslt problem/question

    Hi, i have a real simple xslt problem but i just cant figure out how to do it by looking at various examples on the net. i have a xml document and in it are some elements with a "result" tag name. i want to use xslt to reproduce exactly the same xml document except with an attribute called "id" added to those elements with a "result" tag name. i'm sure that theres a simple solution to it but i just cant figure it out. any helps greatly appreciated, thanks

    Start with the XSLT identity transform (I don't have it handy and it's fairly long, but you should be able to google it up). Add this:<xsl:template match="result">
      <result id="">
        <xsl:apply-templates>
      </result>
    </xsl:template>

  • JDeveloper IDE simple setting problem

    Hi,
    Recently we switched to JDeveloper from Visual Cafe .I have a simple setting problem.How can I set the options so that IDE gives, the core java classes and packages,and our application classes and packeges, prompts in imports as well as in code.Where to set the options.
    eg: when I write
    import java. it should prompt all the pakages.
    Thanks in advance.
    -Gopal
    null

    I am not sure I understand what you are requesting, but ...
    You can configure JDeveloper projects to include various libraries by default.
    This is done by selecting menu Tools | Default Project Properties.../ Libraries tab.
    You should define a library for your classes.
    You can import any of the packages / classes from all the libraries which your project includes.
    It would be incorrect for a tool to automatically add a bunch of import lines at the top of every file because each file should import what it needs and just as importantly, not import what it does not need depending on the component type (e.g. a servlet should not include javax.swing.* ).
    An easy way to import elements into JDeveloper is to type in something like:
    import java.
    // and then type in Ctrl Space
    and this launches the package browser, you can select packages or classes to import.
    You can also do this at the variable declaratiton point such as typing in:
    foo() {
    Frame x
    // Press Control Alt Space
    and this will correctly change the type (Frame) to the type you select in the package browser and add the import statement.
    -John
    null

  • Another simple classpath problem question

    Hi All
    Yes I know, there are a lots of questions about this matter, but I couldn't found a solution to my problem.
    I have a simple program:
    public class prueba {
            public static void main(String[] args) {
                    System.out.println("Ahi va...");
    }placed in /tmp/javier/prueba.java
    After compiled, I've tried to run it from / and then problems started:
    cd /
    java /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    I said, ok...it could be a classpath problem...then:
    java -cp /tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba
    Damn, another try...
    java -cp .:/tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Jesus Christ....may be the last slash....
    java -cp .:/tmp/javier /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Oh...no.... may be classpath to java classes..
    java -cp .:/usr/java/j2sdk1.4.2_01/lib/jre/:/tmp/javier/ /tmp/javier/prueba
    Exception in thread "main" java.lang.NoClassDefFoundError: /tmp/javier/prueba (wrong name: prueba)
    Well, I don't know why this error happens....
    Please, could somebody help me !!!
    Thanks in advance...
    <jl>

    It's not too early to start following the Sun coding
    conventions for Java:
    http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.
    tmlHi
    thanks for your reply.
    Yes, I agree. I use conventions with my programs. But my real problem was with a real application and then I did quickly this simple code to help others to understand the problem and give a fast reply...
    Let me know if that works. (It was fine on my
    machine.) - MODYes it works fine, thanks.... and Damn...Murphys law again, the only option I didn't tried is the solution to my problem... :)
    Thanks again...

  • Weird BGP path selection problem

    Hi, all,
    I am seeing a weird BGP path selection problem on 4948 switch running cat4500-entservicesk9-mz.122-46.SG.bin code, this switch has two uplinks to the same ISP's different edge router, one circuit is primary the other one is strict backup, only default route is accepted from ISP. I am setting both local preference and weight to the default route advertised over backup link, however neither one is taking effect, BGP still thinks the backup link is better, what could be wrong?
    rtr#sh ip bgp 0.0.0.0/0
    BGP routing table entry for 0.0.0.0/0, version 105
    Paths: (3 available, best #2, table Default-IP-Routing-Table, not advertised to EBGP peer)
      Not advertised to any peer
      17675, (received & used)
        203.169.8.37 from 203.169.8.37 (61.211.160.150)
          Origin IGP, localpref 100, valid, external
          Community: 65001:0 no-export
      17675
        203.169.8.45 from 203.169.8.45 (61.211.160.151)
          Origin IGP, localpref 90, weight 90, valid, external, best <====
          Community: 65001:0 no-export
      17675, (received-only)
        203.169.8.45 from 203.169.8.45 (61.211.160.151)
          Origin IGP, localpref 100, valid, external
          Community: 65001:0 no-export
    Thanks

    Hi,
    On cisco routers , weight is having highest preference to decide best path. By default for received route, weight is 0 but you are setting weight 90 to backup path and that is why it is getting preferred (higher is better). Please remove weight and let local preference be 90 (lesser than route on primary path)
    --Pls dont forget to rate helpful posts--
    Regards,
    Akash

  • Simple OOP Problem. Help!

    This is just a simple OOP problem that i cant decide on a best
    implementation for.
    im passing an object to an instance of, 'TabbedFrame', which is just
    a frame with a Tabbed Pane in it that is holding custom panels.
    however, these custom panels need access to the object being
    passed to 'TabbedFrame' and to some methods in it.
    i cant make them static however so how do i gain access to them?
    is my only option to pass the 'TabbedFrame' to each panel?
    like - jtabbedpane.add( "Panel 1", new mypanel1(this));
    here is code:
    new TabbedFrame( DataObject );
    public class TabbedFrame{
    public TabbedFrame(DataObject do){
    this.do = do;
    jtabbedpane.add( "Panel 1", new mypanel1() );
    DataObject do;
    public class mypanel1{
    public mypanel1(){
    // need access to DataObject of the 'TabbedFrame' object that instantiated
    // this 'mypanel1' and to some of its methods
    }i would just pass the DataObject to evey panel (there are 12) but
    i also need to be able to call methods in the 'TabbedFrame'.
    Any help would be appreciated!

    Modify mypanel1's constructor:
    public class mypanel1{
    TabbedFrame tf;
    public mypanel1(TabbedFrame tf){
    this.tf = tf;
    // need access to DataObject of the 'TabbedFrame' object that instantiated
    // this 'mypanel1' and to some of its methods
    DataObject theDo = tf.getDataObject();
    tf.someMethod(); // Call method on the TabbedFrame
    }In TabbedFrame:
    public TabbedFrame(DataObject do){
    this.do = do;
    // Modify call to constructor to pass "this" TabbedFrame.
    jtabbedpane.add( "Panel 1", new mypanel1(this) );
    }

  • [b]Simple Deploy problem- making an Executable JAR File ...PLEASE HELP [/b]

    Hi all,
    I Trying to deploy a simple J2SE app by making an Executable JAR File, however I don'r understand how to add a valid value to the Main Class field.
    I followed the following description within Jdev, after creating a Deployment Profile:
    Deploying an Executable JAR File
    You can make your simple archive or J2EE Client Module into an executable JAR file that you can launch with the java command.
    To deploy an executable JAR file:
    1) Select and right-click the simple archive or client icon in the Navigator to display the context menu.
    2) Choose Properties.
    3) Click JAR Options in the tree.
    4) Select Include Manifest File (META-INF/MANIFEST.MF).
    5) In the Main Class field, enter the fully qualified name of the application class that is to be invoked.
    7) Click OK.
    8) Launch the executable JAR file from the command line:
    java -jar myapp.jar
    where myapp represents your JAR file name.
    Like I said it's in 5) I'm doing something worng
    My deploy-file (PlotPrint.deploy) looks the following:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <client-deployment xmlns="http://xmlns.oracle.com/jdeveloper/903/deploy/j2ee-client-jar" nselem="client-deployment" class="oracle.jdeveloper.deploy.jar.ClientProfile">
    <archiveOptions>
    <additionalManifests/>
    <compressed>false</compressed>
    <hasManifest>true</hasManifest>
    <mainClass>PlotPrintClient</mainClass>
    </archiveOptions>
    <archiveTargetPlatform/>
    <cdaSettings>
    <additionalArchives/>
    <afterFilters/>
    <beforeFilters/>
    <duringFilters/>
    <selectedArchives>
    <archives>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/jdbc/lib/classes12.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/jdbc/lib/nls_charset12.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/jdev/lib/jdev-rt.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/soap/lib/soap.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/lib/xmlparserv2.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/jlib/javax-ssl-1_2.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/jlib/jssl-1_2.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/j2ee/home/lib/activation.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/j2ee/home/lib/mail.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/j2ee/home/lib/http_client.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/webservices/lib/wsdl.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/lib/xmlparserv2.jar!/"/>
    <Item protocol="jar" path="file:/C:/Oracle9i_Jdev/jdevbin/lib/xmlcomp.jar!/"/>
    </archives>
    <selectionMode>0</selectionMode>
    </selectedArchives>
    </cdaSettings>
    <defaultConnection class="java.lang.String"/>
    <deployClientMaxHeapSize/>
    <earURL path="deploy/PlotPrint.ear"/>
    <enterpriseAppName/>
    <jarURL path="deploy/PlotPrint.jar"/>
    <profileDeps/>
    <properties/>
    <selectedProjectFiles>
    <autoInclude>true</autoInclude>
    <deploySourceAs>0</deploySourceAs>
    <files class="[Ljava.net.URL;"/>
    <selectionFilters/>
    </selectedProjectFiles>
    </client-deployment>
    I using Oracle9i Jdev, but have also tried it un the new Jdev 10g version, but the same problem everytime:
    Error message: Could not find the main class: program will exit.
    Please help I really need this to work
    Message was edited by:
    MHCI
    Message was edited by:
    MHCI

    Yes that was the problem so I have changed the element mainClass to
    <mainClass>xxPlotPrint.MHCI.PlotPrintClient</mainClass>
    But now another probem has occured, since I get the following error when run the jar-file (When I run the app from within Jdev there are no warnings or errors).
    ----Batch-file-----
    @echo off
    java -jar PlotPrint.jar
    echo Test Plot and Print Batch-file!
    pause
    ---- out to cmd ----
    Exception in thread "Thread-0" java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
    at xxPlotPrint.MHCI.NNE35_worker.run(NNE35_worker.java:42)
    at java.lang.Thread.run(Unknown Source)
    Exception in thread "Thread-2" java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
    at xxPlotPrint.MHCI.OCEJobDB_worker.run(OCEJobDB_worker.java:41)
    at java.lang.Thread.run(Unknown Source)
    Exception in thread "Thread-1" java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl
    at xxPlotPrint.MHCI.NNE27_worker.run(NNE27_worker.java:42)
    at java.lang.Thread.run(Unknown Source)
    It's the same problem in all three exceptions (the exactly the same code), however I was a bit to quick this is the line (the line before I process the xml doc :-)
    import org.w3c.dom.Element;
    responseData = new Vector();
    responseData = test_NNE35_SOAP.getXSDdoc();
    Element elements = ( (org.w3c.dom.Element)responseData.elementAt(0) ); (line 42)
    Please help I don't understad why I receive this exception, since I included the xmlparserv2.jar file, and don't even have a workaround :-(

  • I didn't install Genieo because it looked weird but it says its running when I try to throw it away

    I didn't install Genieo because it looked weird but it says its running when I try to throw it away.  I'm nervous about running the ininstall

    Hello,
    One way to test is to Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, Test for problem in Safe Mode...
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive
    Reboot, test again.
    If it only does it in Regular Boot, then it could be some hardware problem like Video card, (Quartz is turned off in Safe Mode), or Airport, or some USB or Firewire device, or 3rd party add-on, Check System Preferences>Accounts (Users & Groups in later OSX versions)>Login Items window to see if it or something relevant is listed.
    Check the System Preferences>Other Row, for 3rd party Pref Panes.
    Also look in these if they exist, some are invisible...
    /private/var/run/StartupItems
    /Library/StartupItems
    /System/Library/StartupItems
    /System/Library/LaunchDaemons
    /Library/LaunchDaemons
    Also see...
    https://discussions.apple.com/thread/4497906?start=45&tstart=0

  • WeiRd but i nEED to kno!

    How the **** do you stop playing music. i dont mean turn it off (sleep mode) or pause i mean stop the music. sozz if this seems weird but i am newb and hence need to know!

    If you mean by using the next track button that will
    dramtically decrease battery.
    Honest question, without short cuts. I read in the documentation online at the Apple site that using the track button makes the hard drive turn on and therefore it uses more energy. The Nano has flash memory. Does that really effect battery life that much. I don't use the track button much and really have not had much problem with the life of my battery. I get between 8 and 12 hours between charges, depends on the amount of changing the volumn that I do. Anyway just curious.
    dell 3000   Windows XP Pro  

  • I have an IPhone 4, and I wanted to reset it, but couldn't do it via computer because the "find my IPhone" was turned on. So I went to ICloud Find My IPhone and just erased my phone from there. The was acting weird but I finally got to a black scre

    I have an IPhone 4, and I wanted to reset it, but couldn't do it via computer because the "find my IPhone" was turned on. So I went to ICloud > Find My IPhone and just erased my phone from there. The was acting weird but I finally got to a black screen with the spinning circle. And it won't advance. I can't just hold the sleep button and home button down because my sleep button is broken! Any help? I have reset my phone before.

    Hello cwypyski,
    The link below provides information on and can also assist with setting up service for your iPhone to have your Sleep/Wake button repaired.
    Service Answer Center - iPhone
    http://support.apple.com/kb/index?page=servicefaq&product=iphone
    All my best,
    Allen

  • I have set up my new iPad 2 on my windowsn 7 computer, but experienced syncing problems from the start. It seems that it doesn't recognize the iPad, although it appears in iTunes.It only gives set up as new or restore options.

    I have set up my new iPad 2 on my computer (Windows 7), but experienced syncing problems from the start.  It seems that although my iPad is regognized in iTunes as it appears there, it only gives met the options to set up as a new iPad or restore from the backup, no synching options. What do I do?

    File>Devices>Transfer Purchases will transfer the itunes purchases to your ocmputer.
    You should sync your ipod to your computer regularly.

  • I plugged in my brand new nano to my husbands desktop to get it registered, but had a problem mid way through when I tried to used an apple login that already existed.  Now it's not registered and the computer won't recognize my device.  How do I fix this

    I plugged in my brand new nano to my husbands desktop to get it registered, but had a problem mid way through when I tried to used an apple login that already existed.  Now it's not registered and the computer won't recognize my device.  How do I fix this?

    iPod not recognized in 'My Computer' and in iTunes for Windows
    Call U.S. iPod and Mac technical support: 1-800-APL-CARE (1-800-275-2273) to register your iPod Nano.

  • In my i phone 4s all the notification sounds come first.after 4-5 seconds the msg,facebook notifications etc.seems to appear on the screen.But earlier the problem was not there.Earlier with instant sound the notifications were there on the screen.how to S

    in my i phone 4s all the notification sounds come first.after 4-5 seconds the msg,facebook notifications etc.seems to appear on the screen.But earlier the problem was not there.Earlier with instant sound the notifications were there on the screen.how to Sort out the Problem?

    No, sounds like when you dropped it an cracked the screen it may have also damaged the logic board or the repair person damaged a cable.

  • I have apple iPhone 4S upgraded to iOS 6.0.1 and everything was working fine suddenly my Wifi was not connecting and found the wifi on/off button is greyed out and to enable it I tried all resets but still my problem have not solved, still wifi is off

    I have apple iPhone 4S upgraded to iOS 6.0.1 and everything was working fine suddenly my Wifi was not connecting and found the wifi on/off button is greyed out and to enable it I tried all resets but still my problem have not solved, still wifi is off

    Same here.... No fix. Replacing is the option apparently and if you're out of warranty, you're SOL. That was as per the "Genius" at Apple.

Maybe you are looking for