JSP Expression Languages (EL) doesn't work in Firefox1.5.0.5

Reply

Join Date: Oct 2009
Posts: 2
Reputation: vsanandan is an unknown quantity at this point 
Solved Threads: 0
vsanandan vsanandan is offline Offline
Newbie Poster

JSP Expression Languages (EL) doesn't work in Firefox1.5.0.5

 
0
  #1
27 Days Ago
Hi,
I am learning JSP now. The following program doesn't work in my Linux system's Mozilla firefox. Any help to fix this problem is appreciated.
  1. <html>
  2. <title>Using JSP EL Operators</title>
  3. <body>
  4. <h2> Using JSP EL Operators</h2>
  5. <table border ="2">
  6. <tr> <td> 13 + 2 = ${13 + 2} </td> </tr>
  7. <tr> <td> 13 - 2 = ${13 - 2} </td> </tr>
  8. <tr> <td> 13 * 2 = ${13 * 2} </td> </tr>
  9. <tr> <td> 13 / 2 = ${13 / 2} </td> </tr>
  10. <tr> <td> 13 % 2 = ${13 % 2} </td></tr>
  11. <tr> <td></td> </tr>
  12. <tr> <td> 13.24 + 2 = ${13.24 + 2} </td> </tr>
  13. <tr> <td> 13.24 - 2 = ${13.24 - 2} </td> </tr>
  14. <tr> <td> 13.24 * 2 = ${13.24 * 2} </td> </tr>
  15. <tr> <td> 13.24 / 2 = ${13.24 / 2} </td> </tr>
  16. <tr> <td></td> </tr>
  17. <tr> <td> true and false = ${true && false} </td></tr>
  18. <tr> <td> true or false = ${true || false} </td></tr>
  19. <tr> <td> not false = ${! false} </td></tr>
  20. </tr>
  21. </table>
  22. </body>
  23. </html>

Here expressions like ${13+2}, ${true && false} etc. are not evaluated, but displayed as given in code.
Last edited by peter_budo; 27 Days Ago at 6:22 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,612
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 463
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven
 
0
  #2
22 Days Ago
On Tomcat, there are (only?) two possible reasons: invalid schema in web.xml, or el-ignored config option.

Set isELIgnored="false" attribute.
  1. <%@ page isELIgnored="false" %>
  2. .....
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,609
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 464
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human
 
1
  #3
18 Days Ago
> The following program doesn't work in my Linux system's Mozilla firefox.
> Any help to fix this problem is appreciated

This isn't a browser problem. Make sure that your page which hosts EL snippets has an extension of .jsp and not .html . The container serves HTML pages as static content instead of running them through the entire JSP life-cycle [translate-> compile -> load -> instantiate].
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: vsanandan is an unknown quantity at this point 
Solved Threads: 0
vsanandan vsanandan is offline Offline
Newbie Poster
 
0
  #4
14 Days Ago
Originally Posted by adatapost View Post
On Tomcat, there are (only?) two possible reasons: invalid schema in web.xml, or el-ignored config option.

Set isELIgnored="false" attribute.
  1. <%@ page isELIgnored="false" %>
  2. .....
Even the above suggested solution is not working and I get a status error:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: /pjbank-1/operators.jsp(0,0) Page directive has invalid attribute: isELIgnored
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:49)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:383)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:174)
at org.apache.jasper.compiler.JspUtil.checkAttributes(JspUtil.java:287)
at org.apache.jasper.compiler.Validator$PageDirectiveVisitor.visit(Validator.java:85)
at org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:235)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1000)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:1042)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:1048)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:187)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1000)
at org.apache.jasper.compiler.Validator.validate(Validator.java:537)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:188)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:355)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:145)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:139)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2460)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:119)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:955)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:157)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:534)
Reply With Quote Quick reply to this message  
Reply

Message:



Other Threads in the JSP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC