problem declaring objects...

why i always have to do this in order to solve errors:

java.util.Date origen = new java.util.Date();

java.sql.Date fecha = new java.sql.Date(orige

java.sql.Time hora = new java.sql.Time(origen.getTime());

java.util.Properties props = new java.util.Properties();

instead of this:

Date origen = new Date();

Date fecha = new Date(origen)

Time hora = new Time(origen.getTime());

Properties props = Properties();

the same with all kinds of variables, methods, functions, etc. even if i do this:

import="java.sql.*"

import java.io.*;

import javax.mail.*;

import javax.mail.internet.*;

import javax.activation.*;

etc...

:S

if i dont do it errors like this happens:

Generated servlet error:

[javac] C:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\__default-web-module-server\org\apache\jsp\fmail_jsp.java:91: cannot find symbol

[javac] symbol : class MyAuthenticator

[javac] location: class org.apache.jsp.fmail_jsp

[javac] Authenticator auth = new MyAuthenticator();

[javac] ^

[javac] 1 error

[1168 byte] By [eckoa] at [2007-10-3 0:10:05]
# 1
did you put the mail.jar and activation.jar on the classpath(WEB-INF/lib) of your wev app?
jgalacambraa at 2007-7-14 16:59:21 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
how can i do that? i just simply made the web page and thats all where can i set those things?
eckoa at 2007-7-14 16:59:21 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

for JSP pages you have to use the import tag:

<%@ page import="java.sql.*, java.util.Properties" %>

Be aware if you import both java.sql.* and java.util.* you WILL have to qualify which Date you want - java.sql.Date or java.util.Date, because the compiler can't tell without your qualification.

evnafetsa at 2007-7-14 16:59:21 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...