Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems with JavaMail 1.2 using Tomcat  RSS feed

 
p Walsh
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to run the example given below and i am having problems.
I am relativly new to this so any feedback would be gratefully apprteciated.
When I click on the file premailer.html it reports the following error.
The file premailer is a html form for creating a new mail message and it posts the message to the file Mailer.jsp

org.apache.jasper.JasperException: The absolute uri: http://jakarta.apache.org/taglibs/mailer-1.0 cannot be resolved in either web.xml or the jar files deployed with this application

I typed in the above url"http://jakarta.apache.org/taglibs/mailer-1.0" and i receive the error page cannot be found".
I downloaded the fileS taglibs-mailer.jar
and taglibs-mailer.tldlib

My classapths are set up to pick up JavaMail 1.2 and the Java Beans Framework

The mailer.jsp file is as follows....

<%@ taglib uri="http://jakarta.apache.org/taglibs/mailer-1.0" prefix="mt" %>
<html>
<head>
<title>Example JSP using mailer taglib</title>
</head>
<body bgcolor="#FFFFFF">

<mt:mail server="<%=request.getParameter("server")%>">
<mt:from>
<%=request.getParameter("from")%>
</mt:from>
<mt:setrecipient type="to">
<%=request.getParameter("to")%>
</mt:setrecipient>
<mt:setrecipient type="cc">
<%=request.getParameter("cc")%>
</mt:setrecipient>

<mt:subject>
<%=request.getParameter("subject")%>
</mt:subject>

<mt:message>
<%=request.getParameter("message")%>
</mt:message>

<mt:send>
Errors Occurred. Unable to send message
</mt:send>
</mt:mail>
<p>The message has been successfully sent.</p>
</body>
</html>

The web.xml file is as follows...

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.4">
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/mailer</taglib-uri>
<taglib-location>/WEB-INF/mailer.tld</taglib-location>
</taglib>
</web-app>
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ taglib uri="http://jakarta.apache.org/taglibs/mailer-1.0" prefix="mt" %>

and
<taglib-uri>http://jakarta.apache.org/taglibs/mailer</taglib-uri>

Look carefully.
 
p Walsh
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault

Thanks you for your feedback, appreciate it.
I changed both the jsp and the xml file to reflect both tags but unfortunetly I am still unable to get the example working.

<taglib-uri>http://jakarta.apache.org/taglibs/mailer</taglib-uri>
Error
http://jakarta.apache.org/taglibs/mailer tet patrickwalsh@campus.ie patrickwalshndc3@hotmail.com ddd dddd Errors Occurred. Unable to send message
The message has been successfully sent.
<taglib-uri>http://jakarta.apache.org/taglibs/mailer prefix="mt"</taglib-uri>
Error
http://jakarta.apache.org/taglibs/mailer prefix="mt" Patrick patrickwalsh@campus.ie patrickwalshndc3@hotmail.com kjh khjjhjh Errors Occurred. Unable to send message
The message has been successfully sent.

Finalyy when I try the below tag I receive the error
<%@ taglib uri="http://jakarta.apache.org/taglibs/mailer-1.0" prefix="mt" %>
Error:
The absolute uri: http://jakarta.apache.org/taglibs/mailer-1.0 cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!