Same code, different result

I have been using Javascript to create popups in Creator using the onclick property of a button or hyperlink.
Today any popups created fail with the message:
HTTP Status 500 -
type Exception report
message description The server encountered an internal error () that prevented it from fulfilling this request.
exception javax.servlet.ServletException: Cannot find FacesContext
Strangely the popups created earlier still work OK.
How can Creator cause code that works in older pages not work when cut and pasted into new pages?
After all the Javascript is standard stuff widely used across the web.
In the <head> tag I have
<script Language="JavaScript1.2">
                function popup(url, name, left, top, width, height)
                settings=
                "toolbar=no,location=no,directories=no,"+
                "status=no,menubar=no,scrollbars=yes,"+
                "left="+left+",top="+top+","+
                "resizable=yes,width="+width+",height="+height;
                MyNewWindow=window.open(url,name,settings);
                MyNewWindow.focus();
            </script>          and in the link the code is
<h:outputLink binding="#{yayw$yayw13Content.yw13hyperlink6}" id="yw13hyperlink6"
                onclick="popup('AidPopup.jsp', 'WinKC6', 150, 250, 600, 200); return false;" styleClass="tabProps">
                <h:outputText binding="#{yayw$yayw13Content.ywhyperlink6Text}" id="ywhyperlink6Text" styleClass="cmdLnk" value="#{c.w130}"/>
            </h:outputLink>where AidPopup.jsp is the jsp page tp pop up when called by the link.
The calling page and the popup page are in the same folder.
Thanks for any advice on this problem.
John.

It turns out the solution is that the full path to the popup file has to be given for the URL. So in the example above the code for the link should be
<h:outputLink binding="#{exer$exer1Content.hyperlink1}" id="hyperlink1" onclick="popup('/attain/faces/exer/RefocusPop.jsp', 'WinRef', 150, 250, 600, 200); return false;">
   <h:outputText binding="#{exer$exer1Content.hyperlink1Text}" id="hyperlink1Text" value="#{es.ex1}"/>
</h:outputLink>The project name is Attain and exer is a sub-directory containing the calling page and the RefocusPop.jsp.
I'll leave it to someone at Sun to explain the mystery of why pages written up to a few days ago still work on the old code but new pages must use a full path for them to work.
John.

Similar Messages

  • Same image, same code, different results!!

    Hi,
    I have this HUGE dilema, the following works with a gif or a jpg image but the problem occurs in png images (the format I have chosen to create my images in).
    Here is the source code for the applet:
    * bufferstr.java
    * Created on 23 October 2003, 14:03
    * @author  Ahmed
    package Destruction_BufferStrategy;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class appletExecutor extends JApplet {
        private Image offs;
        private Graphics2D g2;
        ImageLoader imageStore;
        Game game;
        public void init() {
            imageStore = new AppletImageLoader();
            imageStore.prepareImage("car2dirty1.PNG");
            imageStore.prepareImage("car2dirty2.PNG");
            imageStore.prepareImage("car2dirty3.PNG");
            imageStore.prepareImage("car2dirty4.PNG");
            imageStore.prepareImage("car2dirty5.PNG");
            game = new Game(imageStore, this.getSize().width, this.getSize().height);
            super.getContentPane().add(game);
            game.startThread();
            game.createStrategy();
            game.requestFocus();
    }and here is the code for the application:
    * appExecutor.java
    * Created on 25 October 2003, 01:08
    package Destruction_BufferStrategy;
    * @author  Ahmed
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class appExecutor extends JFrame {
        private Image offs;
        private Graphics2D g2;
        ImageLoader imageStore;
        Game game;
        public appExecutor() {
            super("Destruction Derby");
            setDefaultCloseOperation(super.EXIT_ON_CLOSE);
            setResizable(false);
            setBounds(0, 0, 600, 600);
            imageStore = new AppletImageLoader();
            imageStore.prepareImage("car2dirty1.PNG");
            imageStore.prepareImage("car2dirty2.PNG");
            imageStore.prepareImage("car2dirty3.PNG");
            imageStore.prepareImage("car2dirty4.PNG");
            imageStore.prepareImage("car2dirty5.PNG");
            game = new Game(imageStore, 600, 600);
            getContentPane().add(game);
            show();
            game.startThread();
            game.createStrategy();
        public static void main(String[] args) {
            new appExecutor();
    }if I use a jpg or a gif image, everything is as good as gold. However, when I use png images, this error occurs in the applet only:
    java.util.zip.ZipException: invalid stored block lengths
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:140)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
    at java.io.FilterInputStream.read(FilterInputStream.java:66)
    at com.sun.imageio.plugins.png.PNGImageReader.decodePass(PNGImageReader.java:1165)
    at com.sun.imageio.plugins.png.PNGImageReader.decodeImage(PNGImageReader.java:1276)
    at com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1362)
    at com.sun.imageio.plugins.png.PNGImageReader.read(PNGImageReader.java:1530)
    at javax.imageio.ImageIO.read(ImageIO.java:1384)
    at javax.imageio.ImageIO.read(ImageIO.java:1348)
    at Destruction_BufferStrategy.AppletImageLoader.loadImage(AppletImageLoader.java:36)
    at Destruction_BufferStrategy.AppletImageLoader.prepareImage(AppletImageLoader.java:45)
    at Destruction_BufferStrategy.appletExecutor.init(appletExecutor.java:28)
    at sun.applet.AppletPanel.run(AppletPanel.java:347)
    at java.lang.Thread.run(Thread.java:536)
    Error Loading Image: car2dirty1.png
    the Error Loading Image: car2dirty1.png is from my Loading Images class which abuse so kindly showed me the light to.
    any help on this issue is of great appreciatence..
    P.S. the error occurs for every image, not just this one!!

    You don't actually show the method you are using to load your image, however from the error msg, I assume you are using ImageIO.read().
    What version of JRE are you using?
    The reason I ask, is because the error you are getting seems to be occuring at quite low-level; the only potencial cause I know of (outside an error of your creation) is the ImageIO loader in 1.4.0 is buggy/broken when dealing with small images.

  • Same code, different result (load the library...)

    I have to use external library. So I programmed short code. But...
    It's work in Illustrator CS3
    var samplelib= 'C:/Program Files (x86)/Adobe/Adobe Bridge CS3/webaccesslib.dll';
    mylib = new ExternalObject ("lib:" + samplelib);
    alert(mylib.version) ;
    It's NOT WORK in Illustrator CS5
    var samplelib= 'C:/Program Files (x86)/Adobe/Adobe Bridge CS5/webaccesslib.dll';
    mylib = new ExternalObject ("lib:" + samplelib);
    alert(mylib.version) ;
    Extend Script Toolkit talk to me : 'I/O error'(i uploded capture image below)
    I don't know what I missed. Could you let me know what I wrong?
    Thank you for reading.
    p.s. I'm using windows7.

    Hi kimDino8,
    Can you check the file path again?
    In my opinion the path should be (sorry, I can't check this here at home - perhaps this is the path for CS5.5):
    var samplelib= 'C:/Program Files (x86)/Adobe/Adobe Bridge CS5.1/webaccesslib.dll';

  • Same code, different positioning

    Hello,
    I am a fairly new person to web design. I was working on a project for my uncle, and for some reason with the same code I got different results on different browsers.
    Here's what I mean:
    1) Chrome
    2) Mozilla
    #1 "read more..." is positioned higher than #2 "read more..."
    I used relative positioning on the parent ( banner ) and absolute positioning on the child ( text ). Does anyone know what could be the problem here? Thank you!

    To add to what John said, are you sure this isn't just browser variation?   You're never going to get pixel perfect precision across all browsers, web devices or even different versions of the same browsers.  If you look hard enough you will invariably see some differences.  That's what makes web development so challenging.
    If things go terribly wrong, check your code for errors and fix them. 
    CSS - http://jigsaw.w3.org/css-validator/
    HTML - http://validator.w3.org/
    Nancy O.

  • SQL Server 2012 Physical vs. Hyper-V Same Query Different Results

    I have a database that is on physical hardware (16 CPU's, 32GB Ram).
    I have a copy of the database that was attached to a virtual Hyper-V server (16 CPU's, 32GB Ram).
    Both Servers and SQL Servers are identical OS=2008R2 Standard, SQL Server 2012R2 Standard same patch level SP1 CU8.
    Same query run on both servers return same data set, but the time is much different 26 Sec on Physical, 5 minutes on virtual.
    Statistics are identical on both databases, query execution plane is identical on both queries.
    Indices are identical on both databases.
    When I use set statistics IO, I get different results between the two servers.
    One table in particular (366k rows) on physical shows logical reads of 15400, on Hyper-V reports logical reads of 418,000,000 that is four hundred eighteen million for the same table.
    When the query is run on the physical it uses no CPU, when run on the Hyper-V it takes 100% of all 16 processors.
    I have experimented with Maxdop and it does exactly what it should by limiting processors but it doesn't fix the issue.

    A massive difference in logical reads usually hints at differences in the query plan.
    When you compare query plans, it is essential that you look at actual query plans.
    Please note that if your server / Hyper-V supports parallelism (which is almost always nowadays), then you are likely to have two query plans: a parallel and a serial query plan. Of course the actual query plan will make clear which one is used in which
    case.
    To say this again, this is by far the most likely reason for your problem.
    There are other (unlikely) reasons that could be the case here:
    runaway parallel threads or other bugs in the optimizer or engine. Make sure you have installed the latest service pack
    Maybe the slow server (Hyper-V) has extreme fragmentation in the relevant tables
    As mentioned by Erland, you have much much more information about the query and query plan than we do. You already know whether or not parallelism is used, how many threads are being used in it, if you have no, one or several Loop Joins in the query (my
    bet is on at least one, possibly more), etc. etc.
    With the limited information you can share (or choose to share), involving PSS is probably your best course of action.
    Gert-Jan

  • Same infoprovider, different results

    Hello together,
    here it is my problem: I have one infoprovider and two queries based on it. In both queries I have one identical formula, but the result is different ..
    Could you please help me? Where could be the problem?
    Thank you,
    Iuliana

    Please chacek all the InfoObjects in rows and columns in both Queries and Formulas/CKFs/RKFs/ and variavles too....Definetly there will be a difference..so you are getting different results...all calculated kfs in both Queries using same formulas?
    There is no rule that both Queries should display same result if both are on Same infoProvider unless and until both are similar(one Query is copy of another one)...
    i don't think in u r case it is same..
    Please don't forget to assign points if it is helpfulu.its the way of saying thnaks here in SDN.

  • HT4207 Archiving gmail e-mails on MacBook Pro vs iPhone: Same action, different results

    The core issue:
    The same action yields different results.
    The details:
    First, I'm on my laptop looking at an e-mail sent to my gmail account and want to archive it so I hit archive and it goes to the archive folder; Second, I'm on my iPhone looking at an e-mail sent to my gmail account and want to archive it so I hit archive and it goes to the "All Mail" folder in my gmail account. The second part doesn't make me happy because it doesn't make any sense. In other words the same action results in two different results.
    Ideal solution:
    Please tell me how to make the archive icon on my iPhone act like its righteous twin does on my MacBook Pro.
    Thanks!

    Same question, but the reverse. I want Apple Mail on Mountain Lion to work like iOS with regard to archiving Gmail messages.

  • Same code; different response

    I am using an extremely simple script that I've used at least
    a half dozen times on different projects and it has always worked
    before. Spent hours re-pasting code, trying variations and this
    stupid thing won't work. There's an iTunes gift certificate for the
    first person that helps me solve this insane dilemma. Here's the
    code:
    menu buttons:
    on(release) {
    _root.link=1;
    _root.play();
    Main timeline rolls and encounters this script:
    label="m" + _root.link;
    gotoAndPlay(label);
    So in this case it should jump to frame label "m1"
    but the code is just ignored.
    As I mentioned, I have this working in about 6 different
    projects and it always functions. I have copied and pasted the code
    over and over, trying to find the bug. Completely lost.

    I tried quickly adding
    _root
    to
    _root.gotoAndPlay(label)
    And it works fine! Amazing how I never needed that before and
    all of the other files still function. Chalk it up to bugs in the
    software I guess. Seen enough with this dodgy program over the
    years!

  • Same code - different outcome

    I've copied a code (AS3) from one FLA-file and pasted it into
    an other FLA-file.
    The reason for this was to not write the code all over again
    (timesaving, huh?).
    The code is used for loading a xml-file, extracting the data,
    loading the url-paths in the xml-file and place the loaded contents
    into thumbnails on the stage.
    Although the thumbnails are a bit different from the FLA-file
    where the code is copied from the path still remain.
    The path for the loaded contents to be placed is 'contArray
    .cont_'.
    The thumbnail-names is 'th_0', 'th_1', etc. so the path is
    like 'th_0.cont_', 'th_1.cont_', etc.
    The code:

    The background attached to the body tag like that without being absolute positioned will appear at the bottom of the content, not necessarily the page. The home page is too short for that to stick to the bottom. You should try adding the background into the html tag, instead of body and setting the height to 100%. This could solve it.
    html {
              background-color: #383637;
              background-image: url(Images/All-Background-Image.jpg);
              background-repeat: no-repeat;
              background-position: center bottom;
              margin: 0px;
              padding: 0px;
              height:100%;

  • Gamestop Red Samurai controller - same controller different result

    I'm using a new Gamestop Red Samurai controller paired via bluetooth to my mac, and it's been working great. I can play a PS1 emulator and map all the keys and it's excellent. So I thought "How about getting some 2 player action going", and I bought another controller (same brand and model number). The new controller will not stay connected to the mac for longer than 5 seconds. The original doesn't disconnect until I manually turn it off. When I bought the new controller I actually bought 2 because a friend also wanted one. I tested his and it's the same issue of 5 seconds, then the connection goes away. I can hit any button on the controller and it will connect again, but in another 5 seconds it's gone. I can manually reconnect via my mac settings, but again in 5 seconds, you can guess what happens. So is there anything I can try to get this new controller to stay connected. I've tried using the controllers gaming mode and keyboard mode (switch on the back) but the connection continues to drop either way. I've removed all previous controllers from my mac bluetooth preferences, but it still will only stay connected to the original controller when I add them back 1 by 1. I'm completely stumped by how 2 out of 3 seemingly identical products could behave so differently. If there were any more in store, I'd go try them out and find another that stays connected, but it's a big gamble to buy online hoping for better luck. I'm open to any possible solutions.
    I'm on Mavericks 10.9.5. I should also mention that both controllers pair with my amazon fire tv stick, and stay connected just fine. The new controller that disconnects from the mac, also stayed paired to a windows computer just fine.

    Hi Matt,
    Just to add a note to the great info from Scott. You can use the WCS to push this info out to all the WLC's using this method;
    Configuring an Access Point Authorization Template
    Follow these steps to add an access point authorization template or make changes to an existing template. These templates are devised for Cisco 11xx/12xx series access points converted from IOS to LWAPP or for 1030 access points connecting in bridge mode.
    Step 1 Choose Configure > Controller Templates.
    Step 2 From the Security selections in the left sidebar menu, choose AP authorization.
    Step 3 If you want to add a new template, choose Add Template from the Select a command drop-down menu and click GO. To make modifications to an existing template, click a MAC address in the AP Base Radio MAC column. The AP Authorization Template appears (see Figure 9-12), and the number of controllers the template is applied to automatically populates.
    Step 4 Select the Import from File check box if you want to import a file containing access point MAC addresses.
    
    Note You can only import a .csv file. Any other file formats are not supported.
    Step 5 Enter the file path from where you want to import the file.
    Step 6 Click Save.
    From this doc;
    http://www.cisco.com/en/US/docs/wireless/wcs/4.0/configuration/guide/wcstemp.html#wp1072945
    Hope this helps!
    Rob

  • Controls and timecode - same player, different result

    I need to look at video clips on-line on a laptop and a PC, both running Windows 7 32 bit and from within Firefox 3.6.3 with Flash 10.   But they behave differently even on the same video from the same site.  On one (the laptop) the visible screen is larger, there is a black border at the bottom with start/pause/stop controls, and a timecode.  On the other (the PC) no border, no controls, no timecode.
    How can this be?  .
    There are minor differences - a few decimal points -  in version numbers for Flash 10 (as well as for firefox itself, java and many other apps) but in all cases the PC is the more current.
    I've checked for differences in plug-ins, add-ons, default programs.  No obvious answer.
    Mybe there is some way of setting options within flash player so that it shows things like timecodes?
    Advice welcome!!!

    Select count(*) from (
    [code0]
    select J_8DG_4JLF.J_8DG_4JLF_DG7.LINE_REF AS "F1" , J_8DG_4JLF.J_8DG_4JLF_DG0.PRIMARY_CARD AS "F2" ,
    ROUND ( SUM(Case when J_8DG_4JLF.J_8DG_4JLF_DG0.LINE_INTERNAL_CODE BETWEEN 40 and 59 THEN 1 ELSE 0 END),0) AS "F3" ,
    ROUND ( SUM(Case when J_8DG_4JLF.J_8DG_4JLF_DG0.LINE_INTERNAL_CODE BETWEEN 40 and 59 THEN - J_8DG_4JLF.J_8DG_4JLF_DG0.LINE_AMT
    ELSE 0 END),0) AS "F4" , Max( J_8DG_4JLF.J_8DG_4JLF_DG0.TXN_DATE) AS "F5"
    , Max( nvl(J_8DG_4JLF.J_8DG_4JLF_DG0.CUSTOMER_STAFF_REF,' ')) AS "F6"
    from J_8DG_4JLF.J_8DG_4JLF_JT
    INNER JOIN J_8DG_4JLF.J_8DG_4JLF_DG7 On J_8DG_4JLF.J_8DG_4JLF_DG7.DG7_ID =J_8DG_4JLF.J_8DG_4JLF_JT.DG7_ID
    INNER JOIN J_8DG_4JLF.J_8DG_4JLF_DG0 On J_8DG_4JLF.J_8DG_4JLF_DG0.DG0_ID =J_8DG_4JLF.J_8DG_4JLF_JT.DG0_ID
    where ((J_8DG_4JLF.J_8DG_4JLF_DG0.LINE_INTERNAL_CODE in('22','42')) )
    group by J_8DG_4JLF.J_8DG_4JLF_DG7.LINE_REF, J_8DG_4JLF.J_8DG_4JLF_DG0.PRIMARY_CARD
    having (
    ROUND ( SUM(Case when J_8DG_4JLF.J_8DG_4JLF_DG0.LINE_INTERNAL_CODE BETWEEN 40 and 59 THEN 1 ELSE 0 END),0) > 0
    AND
    ROUND ( SUM(Case when J_8DG_4JLF.J_8DG_4JLF_DG0.LINE_INTERNAL_CODE BETWEEN 20 and 39 THEN 1 ELSE 0 END),0) = 0
    [code0]
    ) t
    LINE_INTERNAL_CODE is string

  • Background Position: 2 pages, same code, different outcome...

    Hey guys,
        I have finished a site that uses the code following CSS:
    body {
              background-color: #383637;
              background-image: url(Images/All-Background-Image.jpg);
              background-repeat: no-repeat;
              background-position: center bottom;
              margin: 0px;
        padding: 0px;
    This code is the same across all pages yet on the index the background does not position itself at the bottom of the screen, it only centers itself, all of the other pages work. Here is the site:
    http://christianstest.info//CherryHillRecreation/Grangerfun.com/Live%20to%20Web/index.html
    You can click the blue tabs to see what I mean... I only noticed it on a screen with a resolution with a height of more than 800pixals, otherwise you can't tell I don't believe... any Ideas why this is happening?

    The background attached to the body tag like that without being absolute positioned will appear at the bottom of the content, not necessarily the page. The home page is too short for that to stick to the bottom. You should try adding the background into the html tag, instead of body and setting the height to 100%. This could solve it.
    html {
              background-color: #383637;
              background-image: url(Images/All-Background-Image.jpg);
              background-repeat: no-repeat;
              background-position: center bottom;
              margin: 0px;
              padding: 0px;
              height:100%;

  • Same PDF, same printer, different results from different PCs??

    Weird situation I've encountered:
    I have a PDF that yields fuzzy, slightly bolder black text when printed from a couple different PCs, but prints just fine (no fuzzy black text) from other PCs-- even when the PDF is printed to the same printer.
    Any ideas why a given PC can't print the PDF text cleanly? Every other non-black text, logos,and lines print just fine -- but black text can end up looking like a little bit of mascara was applied to it.
    Thanks in advance.
    pete

    Are the same printer drivers used on each workstation? Some printers can use
    both PCL and PostScript drivers. Some drivers may also be set to download
    fonts to the printer while the others may allow font substitution by the pri
    nter..

  • Same query, different results depending on compute statistics!!!

    This one is really weird, you would think I am making this up but I am not...
    We have one really long query that uses several large inline views and usually returns a few rows. All of a sudden the query stopped working -- i.e. it returned no rows. We tried rebuilding indexes; this didn't help. We tried computing full statistics and this fixed the problem. Has anyone heard of compute statistics affecting the output of a query????
    About a week later, the problem happened again. Computing estimate statistics didn't help. Only computing full statistics fixed the problem.
    The only thing I can note, is that this database was recently upgraded from 9.2.0.6 to 9.2.0.7, but I checked the install log files and there are no errors.
    Luckily this is just a development database but we are a little worried that it might re-occur in production. We have a few other development databases that have also been upgraded to 9.2.0.7 and none of these have the problem.
    We have compared the init.ora files, no real differences. Any other ideas? Maybe a full export import?

    Thanks, will do, but I am a little doubtful it is
    fixed by 9.2.0.8 because it works on one of our
    9.2.0.7 environments... Although if it is a statistics issue, it's likely a corner case, so you have to have a number of things in alignment. It's quite possible that, for example, two systems have identical structures and identical data but slightly different query plans because the data in one table is physically ordered differently on one system than in another which slightly changes the clustering_factor of an index which causes the CBO to use that index on one system and not on another. You may also end up with slightly different statistics because you have histograms on a column in one system and not in another.
    Looks like we are going to 9.2.0.8 anyway because of
    the end-of-life service support forcing us to go to
    9.2.0.8 anyway.If it reproduces on 9.2.0.8 (and I'd tend to suspect it will), it's certainly worth raising an issue. Unless you have an extended support contract, though, I wouldn't hold out a lot of hope for a patch if this isn't already fixed, since 9.2 leaves Premier Support at the end of the month...
    Justin

  • Same loop, different result

    The function below contains two virtually identical for..in
    loops. The first one produces the expected result, the second one
    only returns the last value of the object.
    Output:
    first loop
    0 => [object LED]
    1 => [object Math_Add]
    2 => [object Math_Multiply]
    second loop
    2 => [object Math_Multiply]
    I can't even see how this is possible. I'm at the pulling my
    hair out stage. I must be doing something very wrong somewhere, but
    I can't see it.

    I think it's time to stop working for me. I had been looking
    at that for hours. I had even managed to make the other loop do
    what I wanted to do, but I still couldn't tell why. Now I
    feel...humbled, as I should be.
    You are my hero. Thanks.

Maybe you are looking for