Matt RaibleMatt Raible is a writer with a passion for software. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.
You searched this site for "jvm". 113 entries found.

You can also try this same search on Google.

Interested in Java ISP Options

I'm not exactly looking for a new ISP, but I am interested in exploring my options. I'm currently averaging about 10 GB of bandwidth usage per month, and it's unlikely to go down. I only pay around $50/month, so it's not bad, but I wouldn't mind some more RAM. I don't want to administer the server per say - I'd like backups and e-mail setup/config done for me. I don't think I want my own server b/c I don't want to be a sysadmin - I only want to worry about the Java server setup. Below is my ideal setup - please let me know if you think there's other things I should be looking for.

  • Linux
  • 512 MB RAM
  • 1 GB disk space
  • A Fat Pipe (100 MB+)
  • 25-50 GB traffic
  • Tomcat or Resin (Servlet 2.3 and JSP 1.2 at a minimum)
  • MySQL databases (2-5)

Posted in Java at Dec 18 2003, 02:09:30 PM MST 12 Comments

My IDEA Evaluation - Eclipse is better

I've been trying to use IDEA (on OS X) for the past few weeks and I keep reverting back to Eclipse for features that seem to be missing. I know the features must be there, but I just can't find them. Why else would everyone like it so much? Sidenote: I've never used IDEA for a feature that doesn't exist in Eclipse - I'm sure there are some, I'm just not using them. It sure would be cool if someone created a HowTo explaining how to migrate from Eclipse to IDEA. In the meantime, I'll settle for posting my questions here:

  • Debugging in Tomcat - I'm currently using Sysdeo's Tomcat Plugin in Eclipse for Tomcat 4.1.27. It's super easy to setup and use - I expect the same ease-of-use from IDEA. I haven't looked much, but I'd love to hear feedback on IDEA's Tomcat debugging support.
  • Renaming a variable in a JavaBean renames getter and setter methods. Sounds simple enough, in my 10 second search, I couldn't find it. In Eclipse, right-click -> Refactor -> Rename.
  • Override/Implement methods (from parent classes and interfaces). Right click -> Source -> Override/Implement methods in Eclipse.

I'll add more as I think of them throughout the day. So far, I like IDEA, but to be honest - it's not saving me any time over Eclipse. It also locks up as much as Eclipse and it's responsiveness is still a big sluggish on OS X (10.2.8) with 1 GB of RAM (1.33 MHz processor). Hopefully Panther will make both IDEs faster. Two weeks ago, I was thinking of buying it (as well as Dreamweaver) - now I'm frustrated with IDEA's lack of features and Dreamweaver's slowness. I'll probably pass on shelling out the cash since Eclipse and BBEdit are giving me all the features I need in IDEA and Dreamweaver.

Posted in Java at Oct 20 2003, 06:17:51 AM MDT 22 Comments

PHP vs. Java - which is better?

I have a former client that has a customer. This customer asked them - "so when are you migrating from Java to PHP?" So evidently this person has the impression that the next wave of web applications will be written in PHP. My former client has asked me to provide an answer for their customer. If I translate it, I think they mean to ask "what is different between Java and PHP and why should we use Java over PHP." Here are my opinions - please add yours as you see fit. I must admit I don't know a whole lot about PHP, except that it's widely popular among the Linux/Apache/MySQL crowd and that it's similar to ASP in it's lack of a MVC architecture (yes, I know about the PHP MVC project).

  • I think Java is more of an industry standard, whereas PHP seems to be popular among hackers and hobbyists.
  • Java provides better separation of layers - key for testability. PHP has all the code embedded in the page, so you have to run it through a browser to test if database connections work (for instance).
  • Java is more scalable.
  • More folks know Java and it's easier to qualify someone's Java skills. How do you test someone knows PHP? Is there a certification?
  • More for-profit organizations use it.

If you're a Java or a PHP-lover, I'd love to hear your opionions (facts are always better). I'm going to point my client to this post, so keep it clean.

Posted in Java at Aug 22 2003, 03:52:33 PM MDT 98 Comments

[Denver JUG] The J2EE 1.4 Web Foundation: Servlets and JSPs

I'm sitting in the Qwest Auditorium right now, in the heart of downtown Denver. It's 7:20 p.m. and Sue Spielman is getting ready to launch her presentation on J2EE 1.4. There is a gentleman who is trying to start a JBoss Special Interest Group - if you live in Denver and are interested - send an e-mail to the DJUG mailing list. I've been here since 5:45 (after driving an hour from DTC) so this better be good. ;-) The Eclipse in Action speaker (David Gallardo) is coming to speak in October. In September, the author of AspectJ is coming in conjunction with Grady Booch. Never heard of him, but judging from the applause - I'm living under a rock.

On with the presentation. Sue thinks that J2EE 1.4 will be released towards the end of this year. Damn, I was hoping for the end of the summer.

What's new in Servlets 2.4?

1. Platform Requirements:

  • HTTP/1.1 - New static constants. HttpServletResponse.SC_FOUND to represent status code 302 instead of HttpSerlvetResponse.SC_MOVED_TEMPORARILY.
  • J2SE 1.3

2. DTD to XML Schemas:

  • Provides easier way to define element structure, element ordering structure is arbitrary under <web-app>
  • New elements in 2.4 XSD: <env-entry>, <resource-ref>, <resource-env-ref>, <jsp-config>

3. Complete event listener lifecycle:

  • New Request Events. Be aware that distributed containers handle listeners a bit different (1 instance per JVM).
    • ServletContext - manage, startup/shutdown, attribute changes
    • HttpSession - creation, invalidation, attribute changes, migration if sessions distributed
    • Request - request coming in or out of scope in a web component, attribute changes
  • javax.servlet.ServletRequestEvent, ServletRequestAttributeEvent
  • new interfaces ServletRequestListener, ServletRequestAttributeListener
  • SessionActivationListener is what you'd use for serializing sessions across a cluster

4. Filter enhancements:

  • Ability to configure filters to be invoked under request dispatcher. What does "under the Request Dispatcher mean?" It means that you can apply filters under RequestDispatcher forward() and include() calls. Defined in web.xml:
  • <dispatcher>REQUEST</dispatcher> and/or FORWARD, INCLUDE, ERROR (REQUEST was the only option in Servlets 2.3)
  • Example: if you have INCLUDE - a request doesn't invoke the filter, a forward doesn't invoke the filter, but an include would.

5. Enhancements for i18n:

  • Two new methods: setCharacterEncoding(String encoding) - do before getWriter() and getContentType().
  • <locale-encoding-mapping-list> - new element in the XSD to provide the deployer with the ability to assign locale-to-charset mappings outside servlet code.
<locale-encoding-mapping>
  <locale>en</locale>
  <encoding>en_US</encoding>
</locale-encoding-mapping>
  • Response encoding for English locales will default to US English (as opposed to the "other" English from Great Britain) ;-)

6. API Improvements added to the ServletRequest to help handle proxy servers: getLocalAddr(), getLocalName(), getLocalPort(), getRemotePort().

7. Other improvements:

  • Distributed sessions must throw an IllegalArgumentException if an object placed in the session can't be serialized
  • Relationship b/w session invalidate/timeout clarified (can now set zero or negative values in <session-timeout>)
  • Deprecation of Single ThreadModel (never used it - did you?)

8. Misc. Clarifications:

  • Welcome files can be servlets
  • Any library files exposed by the container apart from the WEB-INF structure must be loaded by the same classloader w/in any single JVM.
    • Examples include the JARs Tomcat loads from $CATALINA_HOME/shared/lib
    • This should help in avoiding potential ClassCastExceptions

As I expected, there still is now way to get the user's requested URL with container managed authentication. Damn.


JSP 2.0

1. Simplifies tag extension protocol

  • SimpleTag interface: doTag(), Tag attribute methods, NO scriplet code allowed
  • SimpleTagSupport class, implements SimpleTag, adds convenience methods: public JspFragment getJspBody(), public JspTag getParentTag()

2. Relationships: .tag file mechanism allows page authors to use JSP syntax to write custom actions

  • Use directive standard syntax: <%@ tag %> instead of <%@ page %>
  • JSP compiler generates custom action code (look in Tomcat's work directory)
  • Flexible packaging:
    • drop .tag file into WEB-INF/tags
    • implicit tag library generation
    • can still write a TLD if you want, or TLD in a JAR file

3. EL Functions: simple function invocations, defined in tag libraries, but it's a fair amount of work - like writing a TLD file and .java source file.

4. Expression Language:

  • . and [] operations access JavaBean properties and Collection elements
  • ${books.title}, ${books[title]}, ${books["JSTL Practical Guide"]}
  • Automatic type conversion
  • Ability to specify defaults (i.e. in case of null)
  • EL can access Cookies, request params, headers, scope variables and others

5. XML-based JSPs:

  • .jspx and .tagx for pure XML versions
  • no more <jsp:root> just use namespace: xmlns:jsp=http://www.sun.com/JSP/Page
  • For full list of XML features - see section 6.

JSTL (Java Standard Tag Library)

  • Over 42 standard custom actions available for common tasks needed by page authors
  • JSTL will become rev 1.1 in the J2EE 1.4 release

1. Core features:

  • Control flow: for each, conditionals
  • URL management: encoding, ftp, http
  • Formatting and i18n: date, time, numbers, locales
  • XML: transformations and XPath
  • Database support: queries, data sources, transactions
  • 4 custom action libraries: core, xml, i18n formatting, sql.

Man, Sue really knows her stuff. This was a very enjoyable presentation for me and I'm glad I came. Too bad JSPs can't be used as templates like Velocity - that would be sweet! Of course, I like Velocity and it is easy to use - but I've never implemented it from scratch. I do hope to in Moblogger and Struts Menu, but who knows when that will happen.

Update (7/17/2003): Presentation slides from this are now available for download:

  • July 9 - Basic Concepts: Scott Davis Apache Xerces - XML Parse (PowerPoint and samples)
  • July 9 - Main Speaker: Sue Spielman J2EE 1.4 Web Foundation (PowerPoint)

Posted in Java at Jul 09 2003, 11:15:44 PM MDT Add a Comment

Quit Reading Me!

Just kidding. It's just that the ol' bandwidth issue has reared its ugly head again. I sent the following message to Keith last night:

Am I reading this stats page correctly?

Am I already over my KB limit for the month?

His response:

Wow, you've almost 3/4 million hits already this month....

It looks like it averages about 7.7K per hit, so yep, you appear to be over 5 
GB already this month.

I only have a 5 GB plan, so I asked him how much it would be to move to a 10 GB plan (no response yet). Why don't I just move? Because I like Keith, and ever since I moved to the new server, stability has been awesome. I pay $30/month for the 5 giger, so hopefully I can get the 10 GB for an extra $10/month. Then again, according to this page, 8 GB is $80/month. Maybe I will be moving...

Posted in Java at Jun 20 2003, 06:23:31 AM MDT 11 Comments

Braindump: Roller, Hosting and Wrox

I have a lot of things I want to mention, so let's just get right to it.

Roller should bundle Moblogger
It'd be cool if Roller bundled Russ's Moblogger as part of the application. It'd be pretty easy, all we'd need to do is slap a UI on it's config file - possibly put the config into a database, and maybe even use Roller's "page" feature for the e-mail templates. Then we'd have to figure out a way to start Moblogger's thread in the background and possibly do one thread for each user.

Roller Plugins
Should Roller add a Plugins feature like Blojsom has? Why should we? If we should, maybe we should just re-use an existing plug-in API - i.e. Struts' or Blojsom's. What would make a good plugin? Is this just a fancy name for a feature that can be turned on/off (i.e. comments).

Struts Menu for the Editor
I hope to add the ability to choose different menu types in Roller's Editor UI. First, I'll have to integrate Roller's tabbed menu as a displayer for struts-menu [demo]. The CoolMenu's displayer will work great (and require less mouse clicks). I mention this in hopes of making Lance and Dave aware of any schema changes that need to be made to support a user-selectable menu type. I'll also need to add the ability to specify struts-forwards in the menu-config.xml (not implemented yet in struts-menu).

This site and my provider
This site was down a lot today - probably because of all the hits from javablogs.com (just put Hibernate in your title). I noticed that Simon and Sam's sites were down as well. This leads me to believe that my kgbinternet.com is not up to snuff. Dave and Lance seem to never have issues with Roller crashing - so why am I? Please recommend any hosting providers that offer private Tomcat instances (preferrably with lots of RAM and disk space).

What's up with Wrox and Professional JSP 2.0
Who knows... I haven't heard a thing, from anyone. Think I'd get anyone's attention if I slapped both of my chapters on this site - free of charge? I doubt it. I might just do that if I don't get any feedback in the next week or so. Are they gonna sue me for the pocket change they paid me to write the chapters?

Now I'm going to assign this to my Java category and see if all you java.bloggers can crash this site again. ;-)

Posted in Java at Apr 29 2003, 11:20:43 PM MDT 8 Comments

My JVM doesn't like javablogs.com

Whaddya know, I write a popular post on javablogs.com and this site ends up crashing for a few hours. Here's the cause:

Unexpected Signal : 11 occurred at PC=0x403B4304
Function=(null)+0x403B4304
Library=/usr/java/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so

NOTE: We are unable to locate the function name symbol for the error
      just occurred. Please refer to release documentation for possible
      reason and solutions.

Lovely...

Posted in Java at Apr 29 2003, 02:49:24 PM MDT Add a Comment

This site's performance

This site crashes more than a 16-year old trying to pick up the ladies. You can check out all the errors in my catalina.out (3+ MB) file (snapshot from last night). Mostly OutOfMemory errors causing the issues. I'm going to try and configure jikes to run as my JSP compiler, we'll see if that helps. I'd like to try it locally first (on my Win2K machine), but it looks like I have to compile it with the -encoding option to make it work. Ughhh. Why don't they have an encoding-enabled download!?

Posted in Java at Apr 23 2003, 04:36:28 PM MDT 6 Comments

Tomcat 4.1.24: No More OutOfMemory Errors

I know I'm probably jinxing myself, but I'm going to say it anyway. I just checked my catalina.out file (a.k.a. Tomcat's log file) and I haven't had an OutOfMemory error since I upgraded to Tomcat 4.1.24. I was getting them all the time with Tomcat 4.1.18. Hopefully you've seen the same stability increase. I'm sure this site will crash with an OutOfMemory error as soon as I finish this post! ;0)

Update: I send a message to Keith to verify that Tomcat hasn't crashed since Saturday night. Here is his response.

The cron job hasn't had to restart it, and there are no out 
of memory errors in the log.  I can't find any sign that it
failed since then.

Keith

Sweeeeeettt!!

Posted in Java at Mar 26 2003, 07:41:57 AM MST 6 Comments

Keep your JVM Running with JSW

Carlos's post about Java Service Wrapper might be just what I'm looking for. This site seems to have stabalized a bit thanks to Keith's Perl script that checks for OutOfMemory errors (I can see that Tomcat gets restarted a few times a day). I think it's Roller, but I'm running a November version of it, so that's probably the issue. I plan on upgrading this weekend and then we'll see what happens. In the meantime, I'm going to let Keith know about JSW, seems like a very useful tool. Thanks for the tip Carlos!

Posted in Java at Feb 18 2003, 07:09:22 AM MST Add a Comment