944,167 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 1241
  • JSP RSS
Oct 31st, 2009
0

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

Expand Post »
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.
JSP Syntax (Toggle Plain Text)
  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; Oct 31st, 2009 at 6:22 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vsanandan is offline Offline
2 posts
since Oct 2009
Nov 5th, 2009
0
Re: JSP Expression Languages (EL) doesn't work in Firefox1.5.0.5
On Tomcat, there are (only?) two possible reasons: invalid schema in web.xml, or el-ignored config option.

Set isELIgnored="false" attribute.
JSP Syntax (Toggle Plain Text)
  1. <%@ page isELIgnored="false" %>
  2. .....
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Nov 8th, 2009
1
Re: JSP Expression Languages (EL) doesn't work in Firefox1.5.0.5
> 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].
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006
Nov 13th, 2009
0
Re: JSP Expression Languages (EL) doesn't work in Firefox1.5.0.5
Click to Expand / Collapse  Quote originally posted by adatapost ...
On Tomcat, there are (only?) two possible reasons: invalid schema in web.xml, or el-ignored config option.

Set isELIgnored="false" attribute.
JSP Syntax (Toggle Plain Text)
  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)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
vsanandan is offline Offline
2 posts
since Oct 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: HI
Next Thread in JSP Forum Timeline: Genealogy stuff





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC