0

iframe don't render a .jsp page sometimes

asked 2019-11-09 04:30:46 +0800

alexamm gravatar image alexamm
106 4

I have a child window on a zul page, on the child window, i put a iframe component, and programaticaly i write the source of the iframe example: page.jsp?par1=one&par2=two...

But sometimes, the child window don't show anything.

The code is:

<window id="wdwFirmaDoc" width="800px" height="600px" title="F" visible="false" closable="true" border="normal" maximizable="true" 
            minimizable="false">
        <borderlayout height="100%" width="100%">
            <center border="none">
                <div align="center" height="100%" width="100%">
                    <iframe id="ifrm" height="100%" width="98%" />
                </div>
            </center>
        </borderlayout>
    </window>

The java code is:

ifrm.setSrc(urlJsp);

where urlJsp is the url address with the parameters

Sometimes shows good, but sometimes show this:

paste(add period)pics(add slash)2461dc40845778c4dc3a12f2554f3e78

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-11-11 13:05:32 +0800

cor3000 gravatar image cor3000
6280 2 7

Your usage looks good and the iframe showing anything, even something unexpected, indicates that it reacts to your call to ifrm.setSrc(urlJsp).

So the first thing to check is which request is going out and what response is coming back via the network (which can be easily done in the browser's developer tools -> Network Tab - e.g. in chrome).

There you can check whether the response contains the expected data or not. If the response body contains paste(add period)pics(add slash)2461dc40845778c4dc3a12f2554f3e78 then there's nothing you can do from the ZK application side, and instead you have to check what your JSP is actually receiving and returning. (In most IDEs you can put breakpoints into JSPs to check what's happening).

In any case the information provided from the network tab should allow to decide where the problem happens. Once you have additional ZK related insight you can provide the additional information here, so we can have a dedicated look.

link publish delete flag offensive edit

Comments

Thanks for the answer. The jsp always have content, if the parameters have data or null, always prints information. Previosly i had a html page, and the same case, sometimes show the page, other times don't show anything :(

alexamm ( 2019-11-14 00:10:37 +0800 )edit

again, please check the network responses... those will show whether the problem is coming from your server hosting the JSPs or the browser/ZK displaying the contents incorrectly. In scenarios like this, that's the starting point for any further investigation, to narrow down the problem.

cor3000 ( 2019-11-14 10:29:59 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2019-11-09 04:30:46 +0800

Seen: 11 times

Last updated: Nov 11 '19

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More