Servlet redirect example - redirecting from a servlet to a JSP

Java servlet redirect FAQ: Can you provide an example of how to perform a Java servlet redirect?

Some time ago I wrote about forwarding from a servlet to a JSP. Depending on the circumstance I might rather redirect from a servlet to a JSP. When I need to to do a redirect instead of a forward I use this code:

Mon, Jun 27, 2005 (Using location.href to move to another HTML page)

Here's a quick note for those of us that like to create prototypes during a requirements process using HTML. Whenever you want to create a button that is supposed to simulate the action of moving to another screen, you can use code similar to the following code snippet to simulate this behavior:

Debug hibernate - how to see the SQL being run by Hibernate

Java Hibernate debug faq: How can I see the SQL that is actually being run/executed when I'm using Hibernate?

To debug Hibernate output, just configure this parameter in your hibernate.properties file:

hibernate.show_sql=true

This Hibernate configuration parameter will cause Hibernate to show the actual SQL that is being generated/used when your queries are run. Of course it can be a little verbose, but hopefully it will also give you all the SQL you need to troubleshoot your problem.

Java hyperlink - a JLabel hyperlink example

This Java class still needs some work, but it's my first attempt at creating a Java Swing component that simulates a hyperlink. Basically, if you use this label (a JHyperlinkLabel to be precise) instead of a JLabel you should see hyperlink behavior on your Swing labels (JLabel).

JTable popup menu example

JTable popup menu introduction

Here's a copy of a class file I created to demonstrate how to put a popup menu (JPopupMenu) on a JTable in a Java application. Actually, the intent of this particular class was to see if I could get the popup menu to work on the header cell of a JTable, but that ended up being a no-brainer.

Java splash screen tutorial (Mon, June 13, 2005)

Wow, it's been a long time since I've done anything out here. Busy, busy, busy. Here's a link to a tutorial I've written about creating a splash screen for Java applications.

A Java Monte Carlo simulation for my "Minority Report" problem

Introduction

This Java Monte Carlo simulation tutorial, and the corresponding Java program, was inspired by the story and subsequent movie "Minority Report", as well as my recent interest in Monte Carlo simulations.

Perl Excel example - A Perl program to parse Microsoft Excel XLS files

A co-worker, Chris Smith, created a very elegant Perl program to parse a Microsoft Excel XLS file for me some time ago. I recently modified that program to convert what was essentially a "glossary" in an Access database.

I first saved the Access database table as an Excel file. Then I used the following Perl program to extract the contents of the second and third columns from that file, and write them out to another file. The output file was in a Wiki (technically TWiki) format.

Syndicate content