Bug 535409 - HTML A HREF in Javascript Not Working with Default Internal Web Browser but does with External Web Browser Eclipse setting
Summary: HTML A HREF in Javascript Not Working with Default Internal Web Browser but d...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Niraj Modi CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2018-05-31 13:08 EDT by Mike L Curles CLA
Modified: 2021-05-02 13:25 EDT (History)
2 users (show)

See Also:


Attachments
Copy of .jsp that uses javascript.top.parent that does not fire when execute using eclipse internal browser (9.75 KB, application/octet-stream)
2019-04-12 15:19 EDT, Mike L Curles CLA
no flags Details
Full Screen Snippit of Eclipse Internal Browser using two Frames (220.56 KB, image/png)
2019-05-01 13:24 EDT, Mike L Curles CLA
no flags Details
Full Screen Shot of Left Frame Javascript.top.parent command not working (226.40 KB, image/png)
2019-05-01 13:33 EDT, Mike L Curles CLA
no flags Details
Attached jsp in IE (65.04 KB, image/png)
2019-05-02 06:41 EDT, Dani Megert CLA
no flags Details
Attached jsp in Firefox (23.08 KB, image/png)
2019-05-02 06:41 EDT, Dani Megert CLA
no flags Details
Example of JavaScript command Javascript:top.parent working IE...What it's suppose to look like when selecting First Meno Option... (250.68 KB, image/png)
2019-05-02 10:00 EDT, Mike L Curles CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike L Curles CLA 2018-05-31 13:08:42 EDT
Here is the HTML code under Javascript that Eclipse Internal Web Browser does not "fire or launch" on but works fine under Eclipse External Web Browser setting...  All other "A HREF" HTML variations the Eclipse Internal Web Browser works fine...

Here is the code snippit that fails under Eclipse Internal Web Browser usage but works fine under External Web Browser setting:

<A HREF="javascript:top.parent.doPDOptAGetTemplate();"
      onMouseover="stat_write('Setup & Compile/Assemble A Program')"
	 onMouseout="stat_write('');return true;"> 	
 <img src="images/menuind.gif" border="0"></A> 
 
 Here is example of Eclipse Internal Web Browser "A HREF" variation and Eclipse External Web Browser both working fine:
 
 <A HREF="DemandView.html" TARGET="_blank"
      onMouseover="stat_write('Open DemandView Session');return true;"
      onMouseout="stat_write('');return true;">
      <img src="images/menuind.gif" border="0" width="17" height="18"></a>

-- Configuration Details --
Product: Eclipse 4.7.0.20170620-1800 (org.eclipse.epp.package.jee.product)Installed Features:
 org.eclipse.wst.xml_ui.feature 3.9.0.v201706011851
Comment 1 Dani Megert CLA 2018-06-01 09:39:33 EDT
Please attach a self-contained example.
Comment 2 Mike L Curles CLA 2019-04-12 15:19:52 EDT
Created attachment 278264 [details]
Copy of .jsp that uses javascript.top.parent that does not fire when execute using eclipse internal browser

Attachment has multiple examples of A HREF="javascript:top.parent.doxxxxxxx();" command that all do not fire under Eclipse internal browser but works fine in latest IE, Firefox and Chrome Web browsers when used in left frame of web page.
Comment 3 Mike L Curles CLA 2019-04-12 15:24:29 EDT
Just noticed that I thought I had sent you a copy of offending .jsp so resubmitted materials again.  Regards...  Problem still seen in eclipse 4.8 now...
Comment 4 Mike L Curles CLA 2019-04-30 10:13:51 EDT
Problem still seen in eclipse 4.9 now...
Comment 5 Dani Megert CLA 2019-05-01 08:56:13 EDT
Sorry, I don't see any links when opening the JSP in IE. We would need more detailed steps.
Comment 6 Mike L Curles CLA 2019-05-01 13:24:49 EDT
Created attachment 278454 [details]
Full Screen Snippit of Eclipse Internal Browser using two Frames
Comment 7 Mike L Curles CLA 2019-05-01 13:31:39 EDT
Hi,
Not sure what else you need to see on the above Full Screen Snippet of Eclipse Internal Browser serving Web Page using two frames the left frame does not fire when the icon is selected: javascript:top.parent.doxxxxxx(); see the attached second screen shot with non-working JavaScript command highlighted that does not work.   When this same JavaScript is executed outside of Eclipse Internal Browser using standard browser this Javascript code works fine.  let me know if you need more information but tried to describe it here as best I can. Regards, Michael
Comment 8 Mike L Curles CLA 2019-05-01 13:33:05 EDT
Created attachment 278455 [details]
Full Screen Shot of Left Frame Javascript.top.parent command not working
Comment 9 Dani Megert CLA 2019-05-02 06:40:23 EDT
I first tried the attached file in Firefox and IE and it looks broken (see screenshots).
Comment 10 Dani Megert CLA 2019-05-02 06:41:07 EDT
Created attachment 278465 [details]
Attached jsp in IE
Comment 11 Dani Megert CLA 2019-05-02 06:41:32 EDT
Created attachment 278466 [details]
Attached jsp in Firefox
Comment 12 Dani Megert CLA 2019-05-02 08:21:02 EDT
OK, I guess you expect the file to be served by a server instead of just opening.

I tried this with the built-in help server and get the error below.

So, please provide steps to reproduce using https://download.eclipse.org/eclipse/downloads/drops4/S-4.12M1-201904110625/ and a new workspace.


HTTP ERROR 500

Problem accessing /help/index.jsp. Reason:

    Server Error

Caused by:

org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6197: An error occurred at line: 13 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
cmsess.cmSessionMgt cannot be resolved to a type

PWC6197: An error occurred at line: 13 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
cmsess.cmSessionMgt cannot be resolved to a type

PWC6197: An error occurred at line: 13 in the jsp file: /index.jsp
PWC6199: Generated servlet error:
cmsess.cmSessionMgt cannot be resolved to a type


	at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129)
	at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299)
	at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.equinox.jsp.jasper.JspServlet.service(JspServlet.java:164)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:183)
	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.service(HttpServiceRuntimeImpl.java:1448)
	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:158)
	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:67)
	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:132)
	at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.dispatch(ProxyServlet.java:147)
	at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.preprocess(ProxyServlet.java:115)
	at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.service(ProxyServlet.java:104)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:312)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:873)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:505)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:786)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:743)
	at java.base/java.lang.Thread.run(Thread.java:835)

Powered by Jetty:// 9.4.17.v20190418
Comment 13 Mike L Curles CLA 2019-05-02 10:00:29 EDT
Created attachment 278473 [details]
Example of JavaScript command Javascript:top.parent working IE...What it's suppose to look like when selecting First Meno Option...

Wanted to give you a screen shot of it working in normal Web Browser outside of Eclipse Internal Web Browser (see attached Shot 3).  Since I work in a classified setting I do not have access to an external server for you to use to reproduce this Eclipse Internal Web Browser problem.  I assume the newer eclipse bundle link you gave me you want me to setup enough of the application in a new Workspace?  But since this Java App in order to see the frames presented there has a Logon Servlet we must traverse that has to verify credentials off yet another server not sure how we get past this part to show you this exact web page setup.  If we can get past this how do I send it to you...ZIP file attachment??  The issue is with JavaScript:top.parent.doXXXXXXXX(); JavaScript command not working under Eclipse Internal Web Browser in a Web frames environment. Please advise as to what I can send you if you are unable to simulate using this javascript command in a frames environment. Regards....
Comment 14 Dani Megert CLA 2019-05-02 10:09:31 EDT
(In reply to Mike L Curles from comment #13)
> Please advise as
> to what I can send you if you are unable to simulate using this javascript
> command in a frames environment. Regards....
You could
1. Give us an URL that serves the file and we can use it to test/debug.
2. Provide a ZIP file with a minimal help doc plug-in that contains the file and allows to open it via Eclipse Help center.

The latter one would probably be easier, but as mentioned in comment 12, I tried to use the given file in the help center and it failed.


BUT: Before all that, please confirm that you still see the issue using 4.12 M1:
https://download.eclipse.org/eclipse/downloads/drops4/S-4.12M1-201904110625/
Comment 15 Mike L Curles CLA 2019-05-10 08:51:49 EDT
Hi Daniel,
 
Before I send this .ZIP file I have created to you that I got to work that simulates this issue I wanted to make sure this approach will work on your side.
 
I have tested the issue with 4.12 as you requested and the problem is still an issue in Eclipse 4.12.
 
I was not able to get it to work using Eclipse Help Center as this application has several layers that must be there and my environment this runs in in a secure one.
 
I was able to narrow the Eclipse Internal Web Browser issue down to just the “Internet Explorer mode of the Eclipse Internal Web Browser” having the issue
under Chrome and Firefox this same code works fine.  Unfortunately my client standard now and for the foreseeable future is IE so need a resolution with Eclipse
Internal Web Browser working under IE.
 
With that said I have successfully created a scaled down .war of the java application that we see with Eclipse Internal Web Browser problem on and
can repeat the problem.  Since the .war even scaled down war is still too big to email to you (34MB) I can give you my secure FTP server URL and you have to use a
Secure FTP client like Filezilla to obtain the .war that will be in a .zip file.   Once you obtain the .war…it needs to be loaded into a Tomcat Web Server
For your testing under Eclipse but everything you need is in this .war.
 
Will this approach work for you??
 
Please advise if this will work for you if so I will forward the FTP server and access info for you to get the .zip…
 
Regards,
Michael
Comment 16 Dani Megert CLA 2019-05-12 12:37:01 EDT
(In reply to Mike L Curles from comment #15)
> Please advise if this will work for you if so I will forward the FTP server
> and access info for you to get the .zip…
Please attach it here.
Comment 17 Eclipse Genie CLA 2021-05-02 13:25:09 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.