Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

mark babcock

+ Follow
since Jun 26, 2002
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mark babcock

I could really use some help from anyone who is familiar with JRUN 4. I have a war file I'm trying to deploy on JRUN 4 but dont' understand how to do it.

The documentation provided with the JRUN server says to put the war file in a specific location and it will auto-deploy.
I have done that and can see where it creates a temp directory of the war file. But where is the actual expanded version that I can edit? What is the context mapping so i can access my application?

I would appreicate any assisistance with this.
17 years ago
I have some tutorials I am working through from the Sum core servlets and javaserver pages book. I have a question about using JDBC with JSP. All the examples in the book show you how to make a connection to a database using serlvets and display the information back to the browser using the println method. However, is there a way to return the result to a jsp page? What i'm trying to do is build an application that uses MVC. Have my servlet make the connection then have the result set passed back to the jsp page. How can I do this?
18 years ago
Has anyone out there used HP middlewear Application Server? If so what did you think of it?
18 years ago
Thanks for the assisst. I can access apache fine with my IP address. Just not tomcat requests. However, I found the answer last night was in my <TOMCAT_HOME>\conf\server.xml. I needed to add a new host section with the IP address.
18 years ago
I have installed Apache 2.0.44 and Tomcat 4.1.24 and modjk.dll on win2k. I can get it to work using localhost host or the loopback IP address. HOwever, whenever I try to use my Live IP address I get a 404 error. Does anyone have any suggestions?
18 years ago
I need to be able to connect to exchange and send mail. How can I do this? Am I forced to revert to VB MAPI?
String to = "";
String from = "";
String host = ExchangeServer;
boolean debug = false;
String msgText1 = "Sending a file.\n";
String subject = "Sending a file";
// create some properties and get the default Session
Properties props = System.getProperties();
props.put("", host);
// create a message
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
InternetAddress[] address = {new InternetAddress(to)};
msg.setRecipients(Message.RecipientType.TO, address);
// create and fill the first message part
MimeBodyPart mbp1 = new MimeBodyPart();
// create the second message part
MimeBodyPart mbp2 = new MimeBodyPart();
// attach the file to the message
FileDataSource fds = new FileDataSource(filename);
mbp2.setDataHandler(new DataHandler(fds));
// create the Multipart and its parts to it
Multipart mp = new MimeMultipart();
// add the Multipart to the message
// set the Date: header
msg.setSentDate(new Date());
} catch (MessagingException mex) {
Exception ex = null;
if ((ex = mex.getNextException()) != null) {

Session session = Session.getDefaultInstance(props, null);
18 years ago
Thanks Joel,
That did the trick!
18 years ago
I cannot escape to a double quote it must be two single quotes. when I try to escape to
string.replace('\'', '\''');
I get an error because it must be two single quotes..
18 years ago
I have the following String:
Bob's house
and need to change it to:
Bob''s house
I tried using the replace method for String:
public class Replacetest
public static void main(String args[])

String str="bob's";
String mystr;
mystr = str.replace('\'','\'\'');
However, I'm getting an errors trying to do this. Does anyone have any suggestions that would help?
18 years ago
I need some help. Here is the scenario. I have a web server running and everytime someone fills out a form it places a new text file in a specific directory. I need to write a Java application that will determine how many of these files there are. I know that I need to use the package and that File class will be helpful. I'm just a bit stuck getting this going. Is anyone able to assist? Thanks.
18 years ago
I'm trying to round an integer.
lets say I have:
x = 22;
y = (x/10);
y would return 2.2 I want it to round up to the next whole number no matter what the decimal value. I was looking for a ceiling function. But, can't seem to find anything that does this.
18 years ago
Is there a way in JSP to tell if a page is a post back or not?
for example if I have a form and it submits to itself. Is there a way in jsp to determine if its the first time the page has come up or if it is from pushing the submit button?
18 years ago
I'm looking for a way to automatically send clicks to a program that I have just launched using Runtime.exec(). I know that in Visual Basic they have the sendkeys method. Is there a way once I launch my application to automatically tell it which buttons to click?
18 years ago
I'm trying to compile my class files. I have two classes. when I compile them i get the following error:
c:\java\test\src>javac cannot resolve symbol
symbol : variable Test
location : class MyTest
String t = Test.gethelp();
1 error
Here is my code:
public class Test
public String gethelp()
String test = "time";
return test;
public class MyTest
public static void main(String[] args)
String t = Test.gethelp();
System.out.println("THe word is " + t);
18 years ago