Help DeskHelp Desk
Programming in JSP/Servlets (Tomcat)
<% You can download and example Java Mail script here (Rename the file to "mail.jsp").
NOTE: It is preferrable NOT to use the below example, but rather JSTL to accomplish this. Please see this link. If you are using MySQL with JSP you will need the Class.forName path to the MySQL Driver:
NOTE: It is preferrable NOT to use the below example, but rather JSTL to accomplish this. Please see this link. If you are using PostgreSQL with JSP you will need the Class.forName path to the PostgreSQL Driver:
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class MyHelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException,
3) make sure you are in the WEB-INF/classes folder
4) then, run these two commands to make sure the path to java and the servlet jar file is found: [user]$ export JAVA_HOME=/usr/java [user]$ export CLASSPATH=/var/tomcat5/common/lib/servlet.jar 5) compile the class using the javac command:
6) You will now have a file called "MyHelloWorld.class" 7) Redeploy your JVM (from the control panel) and then point your browswer to your site to execute it ( http://yoursite.com/servlet/MyHelloWorld )
JSTL is the new preferred method for coding in JSP. We recommend ALL customers use this instead. Please see this link for more details.
here are some excellent sites that have help forums and code examples: |
HELP DESK
BEFORE OPENING A TICKET, please see our Online Help Desk. It may already have the answer you need!
OPEN/CLOSED TICKETS
If you have any currently open or recently closed tickets, you can find them
by entering your username:
Telephone support 24x7
1-888-819-6985

