New Scripts | Java | Tutorials & Tips
How Bridge2Java helps expand your Java code's horizons
posted bykwigintinMiscellaneous
One of the strengths of the Java platform is its object-oriented nature; one of the benefits of object-oriented languages is that they aid code reuse. But what if you're a Java programmer and you want to reuse code that wasn't written in the Java language? With Bridge2Java, an IBM alphaWorks technology, Java developers can integrate COM objects into their applications. This article explains how it works.
Reviews0
PriceFree
Views1276
Dynamic Web-based data access using JSP and JDBC technologies
posted bykwigintinDatabase-Related
This article discusses using the JSP and JDBC technologies to integrate static, dynamic, and database content in Web sites. For the purposes of simplicity and illustration, the JSP pages here use short scriptlets to expose the JSP developer to the underlying JDBC concepts instead of hiding them in custom tags. The author introduces a key design approach that integrates JavaBeans components with JDBC, similar to the way that JavaServer Pages technology already uses beans with HTTP. He also provides code for implementing this integration.
Reviews0
PriceFree
Views3465
Best Practice with Expresso Framework
posted bypeter.pilgriminDevelopment
Why invent the wheel every time you develop an application in Java? Writing a J2EE web application is complicated enough; you would not write a linked list module in C++ every time you started a new project. You would rather use another person's implementation. The same reuse-idea surely applies to server-side web development. This article looks at the best practices of using one popular web application toolkit, Expresso Framework. The idea of using custom tags, JSP, and the MVC paradigm are suitable for such frameworks. It will illustrate the best of practice through an on-line stock trading program example.
Reviews0
PriceFree
Views1451
The Jxta command shell
posted bykwigintinMiscellaneous
Project Jxta is a community-run attempt to build a utility application substrate for peer-to-peer applications. The initial reference implementation of Jxta includes a command-line shell that allows experimentation with the core Jxta platform without programming. This article takes us through a hands-on tour of the <a href="http://www-106.ibm.com/developerworks/java/library/j-p2pint2?open&l=766,t=grj,p=Jxta2">Jxta shell</a>. You'll explore its command set and extend its capability by writing your own custom commands using the Java programming language.
Reviews0
PriceFree
Views1217
Threading lightly : Reducing contention
posted bykwigintinDevelopment
While it's common to hear that synchronized method calls can be 50 times as expensive as unsynchronized method calls, these numbers can actually be quite misleading. With each successive JVM version, overall performance has improved, and the cost of uncontended synchronization has been reduced, making the issue of uncontended synchronization overhead less significant. Contended synchronization, however, is quite expensive. Moreover, a high degree of contention is disastrous for scalability -- an application that had a high degree of contended synchronization will exhibit markedly worse performance as the load increases. This article explores several techniques for reducing contention, and hence improving scalability, in your programs.
Reviews0
PriceFree
Views1216
Introducing JMS (Java Message Service)
posted bykwigintinCommunication
This tutorial provides an overview of the Java Message Service (JMS) and offers the basics for developing programs that use it. JMS provides a way for Java programs to access an enterprise messaging system, also known as message oriented middleware (MOM). MOM provides a mechanism for integrating applications in a loosely coupled, flexible manner by providing asynchronous delivery of data between applications in an indirect way through an intermediary.
Reviews0
PriceFree
Views2799
Diagnosing Java Code : The Orphaned Thread bug pattern
posted bykwigintinDevelopment
In multithreaded code, it is often common to use a single, master thread that drives the actions the other threads take. This master thread may send messages, often by placing them on a queue, that are then processed by the other threads. But if the master thread throws an exception, the remaining threads may continue to run, awaiting more input to the queue, causing the program to freeze. This article discusses detecting, fixing, and avoiding this bug pattern.
Reviews0
PriceFree
Views1124
Web services and J2EE connectors for B2B integration
posted bykwigintinMiscellaneous
Web services and J2EE connectors promise to simplify the integration of heterogeneous enterprise information systems and provide a way for business partners to share their respective applications' functionality over the Internet. This article uses an insurance broker scenario, in which the programmatic functions from legacy transactions are incorporated into a Web application, to illustrate these capabilities.
Reviews0
PriceFree
Views1593
Building your first JSP custom Tag
posted byfaisalinDevelopment
Tags are reusable code libraries and allow easier separation of HTML and Java code. This tutorial first introduces JSP custom tags and then moves forward to build a simple JSP tag. Every step has been explained in detail. Online demo available.
Reviews0
PriceFree
Views2209
Introducing Scripting Variables in JSP Tags.
posted byfaisalinDevelopment
This tutorial is second in a series of tutorials about JSP tags. In this tutorial we will learn what are scripting variables in JSP tags and how to make use of them. Online demo available.
Reviews0
PriceFree
Views1798
Accessing Database using Tags in JSP Pages
posted byfaisalinDatabase-Related
This step by step tutorial describes how to access database using JDBC with JSP tags in a JSP page. Also describes how to iterate through the records using BodyTag interface. Online demo available.
Reviews1
PriceFree
Views5079
Long-term persistence: Serialize JavaBean component state to XML
posted bykwigintinXML & Java
The ability to save the JavaBean component state for long-term persistence within an XML document has been a topic of much discussion with Java developers in the past few years. This feature has finally been adopted in the 1.4 version of J2SE. This article shows you how to use the new XMLEncoder and XMLDecoder classes, bypassing serialization and allowing you to generate fully initialized bean instances.
Reviews0
PriceFree
Views2122
HTTP tunneling with servlets
posted bykwigintinNetworking
The corporate firewall is a double-edged sword. It helps prevent unauthorized access to the corporate Web services, but can disable access for legitimate clients. Due to the number of safety measures taken by system administrators, HTTP has become the universal entry mechanism to the corporate network. Where technologies such as CORBA and DCOM have failed because of the firewall, technologies such as SOAP have been developed to provide safe and reliable access through firewall protection. This article explores an alternative to SOAP, the use of Java objects over HTTP. In addition, it uses J2EE servlet technology as server-side middleware to the business data.
Reviews0
PriceFree
Views3236
Exception Handling in JSP Pages
posted byfaisalinDevelopment
An article on exception handling in JSP pages. Describes how to catch exceptional events and display a useful message to the user. Online demo available.
Reviews0
PriceFree
Views3008
What's new in JDBC 3.0
posted bykwigintinDatabase-Related
The Java Database Connectivity (JDBC) API has emerged as a key part of the Java 2 Standard Edition (J2SE) and Java 2 Enterprise Edition (J2EE) platforms. It is the primary standards-based mechanism for the Java language to programmatically access relational databases, so when a new version of the specification is released by the Java Community Process, developers are bound to be interested. This article summarizes the key new features as outlined in Sun Microsystems' recently released Proposed Final Draft 3.0 of the JDBC specification.
Reviews0
PriceFree
Views2207
Your guide to weblet security
Weblets are Java programs that run in a browser, using DirectDOM to directly manipulate displayed documents. Like most Web-based programs, weblets pose a threat to system security if they're mishandled. Fortunately, weblets come with built-in security in the form of the Java sandbox. This final installment of a three-part series on DirectDOM and weblet-based development shows you how to use the sandbox to your best advantage. With simple, working examples, this article demonstrates what a weblet can and can't do by default, and also shows you how to get around the constraints of the sandbox when the situation calls for it.
Reviews0
PriceFree
Views1490
WAP builds Java applications
If your company already relies on multitiered enterprise Java applications, then you may be closer to a wireless future than you think. By outlining a sample application, this article shows you how to connect your existing enterprise Java infrastructure to a wireless network with minimal investment in equipment and labor. Using existing EJBs, modified servlets, and new WML and WMLScript pages makes the process a snap.
Reviews0
PriceFree
Views2739
Creating a Browser Detection JavaBean
A step by step tutorial to create a JavaBean which detects user browser and .NET enabled status. You can use this bean to develop browser friendly pages. Online demo available.
Reviews0
PriceFree
Views2958
What are JavaBeans?
An article on JavaBeans, answers questions like what JavaBeans are and how to create your own JavaBean. Online demo available.
Reviews0
PriceFree
Views2766
Calling a JavaBean from a JSP Page
This tutorial describes <jsp:useBean>, <jsp:setProperty> and <jsp:getProperty> tags and demonstrates how to call JavaBean from within a JSP page. Online demo available.
Reviews0
PriceFree
Views3123