netbeans 500x360

NetBeans Visual JSF editor tutorial on web applications running over HTTPS displaying warning in IE “This page contains both secure and nonsecure items”.

If you “view source” on the page that Woodstock generates, you will see the following line:


Now if you change that line to:

The site will now work under HTTPS without any security warnings. Obviously, this cannot be done straightforward because this piece of HTML code is generated by the Woodstock library. The solution we have implemented to resolve this problem is to change the code in the Woodstock library that generates the HTML header of the pages. The following solution is not the most elegant solution; it’s more of a simple workaround to solve this problem in production environment:

  1. Open the Woodstock project web site,, and go to “Build it Yourself.”
  2. Follow the instructions on the “Build it Yourself” page to register and get a CVS access to download the framework source code. The CVS URL will be something like: :pserver:[email protected]:/cvs. You don’t need NetBeans 5.5, as it is written in the compile instructions.
  3. Open the CVS repository with NetBeans and check out the module “woodstock/webui” and branch “Release42″ as a new project.
  4. Open the project and edit the “” file in package com.sun.webui.jsf.util in “src/runtime” folder.
  5. In method “renderJavaScriptInclude”   change line 578 from:


  6. Save the file and rebuild the project. During compile, you might notice a lot of warnings, etc – just ignore them.
  7. Copy and overwrite the newly compiled webui-jsf.jar and webui-jsf-dt.jar from the Woodstock source code folder “woodstockwebuidist” to the NetBeans subfolder. “visualweb2modulesext”. Keep a copy of the original jar files (see below).
  8. Rebuild your WAR file and deploy it on the HTTPS server.

There you go. You should now have your website working under IE with no security warnings. Note that the newly compiled .jar files will work only on the server URL you define in Step 5. They won’t work in localhost development environment, so you might want to change with original .jar files during development phase. Cheers.

Alex Krasny

Creative Marketing Specialist at MentorMate

Front-end Developer, Social Media Acrobat & Blogger Alex Krasny comes from a design and advertising background with a long history of personal blogging. Alex has worn many hats at MentorMate starting with graphic designer and ending up in a hybrid position we call Creative Marketing Specialist. When not developing CMS websites for clients or writing blog posts at MentorMate he is probably researching new or long-forgotten ways to tie a necktie.

4 replies
  1. Scott Cheadle
    Scott Cheadle says:


    Using your example as a base, I have made it somewhat more portable by not needing to hardcode the server/port etc. The following lines will do this. :-

    String uri=((HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest()).getRequestURI();
    String url=((HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest()).getRequestURL().toString();
    String bitineed = url.replace(uri, “”);
    String jsFile = bitineed + getTheme().getPathToJSFile(file);

  2. Ana Garcia
    Ana Garcia says:

    I am using the code provided by Scott. I saved the project and did a clean and build. I am getting a BUILD FAILED message. Is this part of the messages to ignore?

  3. Ana Garcia
    Ana Garcia says:

    I tried it and it still fails on the build. I even deleted it and started all over without no luck. it says that is unable to access ..libwebui-tools.jar ; maybe I am not doing the steps correctly: when it comes back from tcheckout, it ask if I want it to open the project and I clickon Open Project, then I go and make the changes. save the file; run build. Did I miss something?

    this is the last part of the output:
    Running native2asci for,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, it takes several minutes…
    Unable to access jarfile C:Sourcewoodstock42woodstocktoolswoodstocklibwebui-tools.jar
    C:Sourcewoodstock42woodstockwebuibuild.xml:455: The following error occurred while executing this line:
    C:Sourcewoodstock42woodstockwebuibuild-l10n.xml:63: The following error occurred while executing this line:
    C:Sourcewoodstock42woodstockwebuibuild-l10n.xml:264: Java returned: 1
    BUILD FAILED (total time: 41 seconds)


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">