27.04.2013 Views

330 Java Tips.pdf - FTP Server

330 Java Tips.pdf - FTP Server

330 Java Tips.pdf - FTP Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Servlets & <strong>Server</strong>s<br />

import java.util.Date;<br />

SimpleDateFormat dateFormat<br />

= new SimpleDateFormat("EEE, dd MMM yyyy - HH:mm:ss z");<br />

response.setHeader("Expires", dateFormat.format(new Date()));<br />

The format of the date is very particular.<br />

---<br />

Scott Gartner<br />

Q: Wich free software can I use to debug Servlets?<br />

Answer: What you need to do is use Jakarta-Tomcat to run your servlets. Then, bring<br />

in all the tomcat jars into your "required libraries".<br />

Then set up your "project run" to actually run the Tomcat class. If you run it in debug<br />

mode, you should be able to put breakpoints in your servlets.<br />

We did this at a project I was on with weblogic and EJBs, and Jbuilder 4 does it with<br />

tomcat, so I'm assuming you can do this as well.\<br />

--<br />

Trever M. Shick<br />

http://xjr.sourceforge.net<br />

http://velocidoc.sourceforge.net<br />

http://www.objectwave.com<br />

http://www.geocities.com/trevershick<br />

Q: Is tomcat an EJB container?<br />

Answer: No. It's only a servlet/JSP container. However, you can certainly use it with<br />

an EJB container, and you can get another free EJB container such as JBoss.<br />

--<br />

Chris Smith<br />

Pick your topics, and we'll send you great deals, free<br />

information, and special offers by email from Focalex.<br />

IT Professional General Computer Design and Graphics Linux Freeware/Shareware<br />

Games Intranet Computer Hardware Web Design Computer Software<br />

UNIX Web Software Windows Software Personal Finance Programming Software<br />

<strong>Server</strong>s C/C++ Powerbuilder Perl XML<br />

<strong>Java</strong> SQL Design/Graphics Utilities Handhelds<br />

Get FREE STUFF, special offers and information on the <strong>Java</strong>, C/C++,<br />

SQL, XML and another languages programming topics YOU want to hear<br />

about delivered to your inbox!<br />

Unix, Windows Software/HardWare, Handhelds - just pick YOUR<br />

interests and start getting the stuff you want today. The best<br />

free info and deals on computers, software and much more by email.<br />

SUBSCRIBE for FREE HERE<br />

file:///F|/350_t/350_tips/servlets_servers.htm (7 of 8) [2002-02-27 21:19:05]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!