James Fraley

Greenhorn
+ Follow
since Feb 28, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by James Fraley

I resolved this issue today. The Under Java 1.6, jaf-1_1_1.zip isn't necessary. And, the zip file must be unzipped and the mail.jar copied to the lib directory. I'll try to post a more complete description later today. Thank you
12 years ago
I'm resurrecting a project I started some while ago. My first challenge is to recreate the environment I was using. I'm mostly there, but I can't get mail to send. I have installed Tomcat 7.0.27 and it seems to work. It servers JSPs and Servlets and can access my database server. But, I can't get mail to send. I know the code works, because it did work when I last used it.

- I'm running java 1.6.0_32
- I downloaded both javamail1_4_5.zip and jaf-1_1_1.zip to my WEB-INF\lib directory
- I copied javamail1_4_5.zip to javamail1_4_5.jar and jaf-1_1_1.zip to jaf-1_1_1.jar in my WEB-INF\lib directory (so both the .jar and .zip files are in my WEB-INF\lib directory)
- I added both javamail1_4_5.jar and jaf-1_1_1.jar to my classpath
- Finally, I copied javamail1_4_5.jar to mail.jar and jaf.jar to jaf.jar in my WEB-INF\lib.

None of the above seems to be the solution.

So, how do I configure the java environment properly to send email???
-------------------------------------------------------------------------------------------
The errors I get are:org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 19 in the generated java file
Only a type can be imported. javax.mail.AuthenticationFailedException resolves to a package

An error occurred at line: 20 in the generated java file
Only a type can be imported. javax.mail.Authenticator resolves to a package

An error occurred at line: 21 in the generated java file
Only a type can be imported. javax.mail.PasswordAuthentication resolves to a package

An error occurred at line: 22 in the generated java file
Only a type can be imported. javax.mail.Message resolves to a package

An error occurred at line: 23 in the generated java file
Only a type can be imported. javax.mail.MessagingException resolves to a package

An error occurred at line: 24 in the generated java file
Only a type can be imported. javax.mail.Session resolves to a package

An error occurred at line: 25 in the generated java file
Only a type can be imported. javax.mail.Transport resolves to a package

An error occurred at line: 26 in the generated java file
Only a type can be imported. javax.mail.internet.AddressException resolves to a package

An error occurred at line: 27 in the generated java file
Only a type can be imported. javax.mail.internet.InternetAddress resolves to a package

An error occurred at line: 28 in the generated java file
Only a type can be imported. javax.mail.internet.MimeMessage resolves to a package
-------------------------------------------------------------------------------------------------------
The code generating the errors (out of the .java file) are:

import javax.mail.AuthenticationFailedException;
import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

Thanks
Jim
12 years ago
After 2 days and 1000s of attempts, it was setting privileged="true" in the context.xml file.



I hope this might help someone else avoid the pain.

Jim
12 years ago
Hi. I'm new to administering Apache, so please be kind. I'm trying to get SSI to work on Apache 7.0.26 with JDK 6 update 31. I've tried to configure it on both windows and Linux and get the same result, so I'm reasonable sure it's a configuration issue. What I've done is:

1: Install a clean copy of windows (or Linux)
2: Install JDK 6u31
3: Install Tomcat 7.0.26
4: Test the install to ensure it works (and it does)
5: create the main.shtml and sub.html
6: Edit the web.xml to enable the SSI filter or the SSI
7: Try the load main.shtml and I get nothing... But I do get the following error in the Tomcat7-stderr log: SEVERE: Error filterStart

I've found 2 possible errors. First that there could be a conflict between the version of java that tomcat was compiled with and the version that was running. Second, that the context needs to be marked as privileged.

I know this is a possible security hole, but I'm the sole user.

I've wasted 2 days on this problem. So, I REALLY appreciate any help you can offer.

Thanks
Jim

-------------------------------web.xml-------------------------






-------------------------------main.shtml-------------------------


-------------------------------sub.html-------------------------


-----------------------tomcat7-stderr.2012-02-28.log


12 years ago