Create an XML File or XmlDocument Directly from a StringBuilder
An earlier DevX tip, “Create a New XML File Using XmlDocument,” showed how to create a new XmlDocument, populate it, and save the results to a file. This tip uses
An earlier DevX tip, “Create a New XML File Using XmlDocument,” showed how to create a new XmlDocument, populate it, and save the results to a file. This tip uses
SQL developers are mostly familiar with using temporary tables to temporarily accumulate or store query results. However, using a “table variable,” a less well-known concept, turns out to be a
This tip shows you how to inject an EJB 3.0 into the init() method of a servlet. //place all the required imports hereimport package.to.EJB.interface.myInterface;public class EJB30Servlet extends HttpServlet {@EJBmyInterface myobj;public
public void contextDestroyed(ServletContextEvent e) { //get the servlet context ServletContext servletContext = e.getServletContext(); //get the real path String root = servletContext.getRealPath(“/”); //get all handlers Handler[] handlers = logger.getHandlers(); //remove all
The following function returns the part of the passed string that matches the regular expression provided. You can use this function to get the necessary data from fields in a
While porting a 32-bit application to a 64-bit version, I discovered an interesting effect. The original code used negative array indexes frequently, which worked fine on a 32-bit machine, but
For a simple custom logger, you can inherit from the base java.util.logging.Formatter class and override its format method to customize the output. Here’s an example: import java.io.*;import java.util.*;import java.util.logging.*;public class
You can use the sp_MSforeachtable undocumented stored procedure to rebuild all indexes in your database. The command iterates through all the tables in a database. It’s best to schedule this
You can use the CommandName and CommandArgument attributes of a button to submit arguments to an ASP.NET method on the server. For example, suppose you have a repeater control in