• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception on load of a jsp with EL function call

 
Krutika Ravi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am building an simple Email Client for which I am implementing the concept of El Functions. The idea is on click of the submit button an EL Function gets called which is responsible for Connection with the Mail server. However on executing the following code I am unable to even view my login page. I get the following Exception:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/mail/AuthenticationFailedException
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)





jsp file:




.tld




Thanks

Krutika
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you include mail.jar and activation.jar in your web app?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Krutika Ravi wrote:The idea is on click of the submit button an EL Function gets called

That is not going to work. The EL (including al EL functions) are evaluated on the server long before the page gets sent to the browser where JavaScript can be executed. So there's no way to "call" an EL function upon a button click. You either need to execute some JavaScript, or submit the form.

Please read this article to understand how JSP works.
 
Krutika Ravi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear. I see your point now.

Kind Regards
Kru
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic