Aug 21, 2013

[Solved] Jetty HTTP 500 "A full JDK (not just JRE) is required"

Today I am deploying Jetty in my machine, my machine configuration is:
OS: windows 7, JDK: jdk1.7.0_25, Jetty: Jetty9
And I have configured JAVA_HOME in system environment and also add %JAVA_HOME%\bin in Path

I can start Jetty:
Java -jar start.jar

And I can see in console it successfully started.
But when I try to access the web application via browser, I met a strange problem:

ERROR:
PWC6345: There is an error in invoking javac.  A full JDK (not just JRE) is required



SOLUTION:

1. Edit jetty.xml which is under the jetty installation folder \etc folder, for example C:\Program Files\jetty-distribution-9.0.5.v20130815\etc

2. Add a section

    org.apache.jasper.compiler.disablejsr199
    true
  


within section





It's a happy world now!
The solution was referring Jetty document: http://wiki.eclipse.org/Jetty/Howto/Configure_JSP

If you think this article is useful, please click the ads on this page to help. Thank you very much.

Aug 15, 2013

How to add code snippet in Google Blogger

This blog is interesting because it's a blog about Blogger itself. Google Blogger is powerful but it's not easy to use. As a developer, we often want to add some code snippet in our blog but it's not available in blogger. Fortunately there is a way to do it - The solution is to use:
SyntaxHighlighter (http://alexgorbatchev.com/SyntaxHighlighter/)



Step1: go to blogger dashboard -->Template--> Edit HTML

Step2: In the part, add the codes below to enable SyntaxHighlighter.





http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/



    
     
     
     
    
 
 
 -->-->





to add more language support, for example SQL, you can add the js below in the codes we added to head section:
  

3. In the blog you write, edit html, add the codes For example, below is what I put:
































And when publish or preview the post, it looks great!































Bingo! We can write more nice posts now.

If you think this article is useful, please click the ads on this page to help. Thank you very much.

Aug 7, 2013

[Solved] Chrome Debugger Cannot Modify Local Variable

I found it's strange that Chrome Debugger doesn't allow modify modify local variables. For example:

you have a variable: instanceType, which original value is "VERTICA"
in the console, you write:
instanceType="MAPR"
But when you type instanceType again, it still shows
"VERTICA"


I did some search but found it's a know problem, and yet not be fixed in latest Chrome build. Luckily I found an easy solution, which is to use Canary Chrome:
 https://www.google.com/intl/en/chrome/browser/canary.html


With the debugger tool of Chrome Canary,



Aha, what a happy world!

If you think this article is useful, please click the ads on this page to help. Thank you very much.