Muhammad Imad Qureshi

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromMuhammad Imad Qureshi
ToMe
SubjectSSL/HTTPS - JavaScript Files Not Working at all
Date8 September 2005 21:24
Hi

We have a full working application. Now when I have installed SSL
certificate and when I log in using https://localhost:80/foo I get all
kind of javascript errors. The first index.jsp page tries to use some .js
files but not able to read and in fire fox javascript console I can see this

Error: dialog has no properties.

Error: illegal character

Source File: http://localhost:80/somemenu.js

Line: 1

Source Code:

And lot more like the above ones. But when I click the error to go to the
location an editor is open with nothing in it. I am sure it is not something
big but I am a new developer and cannot figure out the problem

I would really appreciate your help.

Thanks

Imad
FromMe
ToMuhammad Imad Qureshi
SubjectRe: SSL/HTTPS - JavaScript Files Not Working at all
Date8 September 2005 23:11
Imad,

> https://localhost:80/foo
> Source File: http://localhost:80/somemenu.js

Sorry, but since these are not publically available, I cannot look at them
to see the cause of the problem. One thing I do notice is that you are
loading some of your files via HTTP and some via HTTPS. This is a _very_ bad
idea, as browsers often allow users to load only secure or only insecure
content.

By the way, please note that (as I say on my contact page), I find it much
more helpful if you can use Opera's JavaScript console, it gives much more
useful information to me than Firefox.
http://www.opera.com/download/


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromMuhammad Imad Qureshi
ToMe
SubjectRe: SSL/HTTPS - JavaScript Files Not Working at all
Date9 September 2005 00:03
Hi
Thanks for your reply. You have pointed out a big mistake that I am using
http and https at the same time. Where do I configure this so that
everything gets called through https. I am using Jboss and I have
uncommented the connector element in
C:\...\jbossweb-tomcat55.sar\server.xml

now this element looks like this

<Connector port="80" address="${jboss.bind.address}"
           maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
           emptySessionPath="true"
           scheme="https" secure="true" clientAuth="false"
           keystoreFile="${jboss.server.home.dir}/conf/ssl/server.keystore"
           keystorePass="123456"
    sslProtocol = "TLS" />

I have also attached my server.xml. If you dont like attachements I am not
going to attach it again and I apologize for that.

Also thanks for letting me know about Opera's javascript console. I'll
download it right now.

Thanks
Muhammad Imad Qureshi
FromMe
ToMuhammad Imad Qureshi
SubjectRe: SSL/HTTPS - JavaScript Files Not Working at all
Date9 September 2005 08:51
Imad,

Woah! This is way out of my league. I do not know how to configure a Tomcat
server. Sorry, I have no idea how to fix this, please refer to the Tomcat
documentation to work out why the files are not all being served securely.

I can probably take a look at the script if you can make it publically
available on a _real_ web site.

Tarquin
FromMuhammad Imad Qureshi
ToMe
SubjectRe: SSL/HTTPS - JavaScript Files Not Working at all
Date9 September 2005 17:53
Hi Tarquin

Thanks for your help. We had the following problem. Just in case in future
if someone as dumb as I am brings you up this then following could be the
reason. In our header.jsp we had

<base href="http://<%=request.getServerName()+ ":" + request.getServerPort()
+ request.getContextPath() %>/" />
it should have been


<% if(request.getServerPort() == 8443) {%>

<base href="https://<%=request.getServerName()+ ":" +
request.getServerPort() + request.getContextPath() %>/" />

<%}

else { %>

<base href="http://<%=request.getServerName()+ ":" + request.getServerPort()
+ request.getContextPath() %>/" />

<%} %>
Thanks again.
Imad
FromMuhammad Imad Qureshi
ToMe
SubjectRe: SSL/HTTPS - JavaScript Files Not Working at all
Date13 September 2005 23:18
AttachmentJSP source code
Hi

I am getting following error in my jsp page no matter what browser i use

document.getelementById ("incident.incidentId") has no properties.

I have attached the file. Can you please tell me what I am doing wrong.

Thanks

Imad
FromMe
ToMuhammad Imad Qureshi
SubjectRe: SSL/HTTPS - JavaScript Files Not Working at all
Date13 September 2005 23:29
Imad,

> I am getting following error in my jsp page no matter what browser i use

I really do not understand JSP. I cannot decypher your documents. It is much
better if you can just send me the address of the page online so I can see
the output produced by the JSP, and not the unprocessed source code.

> document.getelementById ("incident.incidentId") has no properties.

this means that there is no element on the page with:
id="incident.incidentId"

Take a look at the source code of the page _after_ it has been processed.

Tarquin
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.