• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it necessary to restart the server each time before running , when using JSTL?

 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
I've been trying to use JSTL to write JSP pages .However I noticed something,whenever I make any changes to my page , try to save and run the page without restarting the page throws an error as below.

exception

javax.servlet.ServletException: java.lang.NoSuchFieldError: deferredExpression
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:268)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717

However when I save the page and restart the server it works fine. Any idea why this could be happening?
Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you do not need to restart anything when making a change to a JSP page, with the JSTL or not.

The reason for the problem is impossible to say without more information.
 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying Bear!
Hmm, but somehow I face the same error each time I try to run the page without restarting. What further information could help you analyze the case better ? I'm attaching the entire stacktrace below, if that's of any help.

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

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

exception

javax.servlet.ServletException: java.lang.NoSuchFieldError: deferredExpression
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:268)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

java.lang.NoSuchFieldError: deferredExpression
org.apache.taglibs.standard.tag.common.core.ForEachSupport.release(ForEachSupport.java:196)
org.apache.jasper.runtime.TagHandlerPool.release(TagHandlerPool.java:166)
org.apache.jsp.POC_jsp._jspDestroy(POC_jsp.java:48)
org.apache.jasper.runtime.HttpJspBase.destroy(HttpJspBase.java:61)
org.apache.jasper.servlet.JspServletWrapper.destroy(JspServletWrapper.java:437)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:338)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.30 logs.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to show the reference to the bean property in the JSP, and the bean definition. Please use code tags. Please post only relevant code sections.
 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply and Sorry about that.
Here's the relevant portion of the JSP.


And as for the bean definition are you talking about the bean class that defines the above beans?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, need the bean code.

And I see no reference to deferredExpression in your JSP code.
 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Yes, need the bean code.

And I see no reference to deferredExpression in your JSP code.

Okay.I've pasted the entire code fragment as a paste's , as I'm not sure what could be causing the problem.
Well As for the bean code .
Here's the consumer .bean
And the DAO bean

And the entire JSP
Thank you for your time.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no reference I can find anywhere in that code to deferredExpression. Where is that coming from?
 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:There is no reference I can find anywhere in that code to deferredExpression. Where is that coming from?

That is all I'm using right now. Could it be coming from some jar file in the class path?
 
Paul Clapham
Sheriff
Posts: 21113
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Curiously, the error seems to be thrown when the container is trying to destroy the old version of the JSP...



or am I guessing wrong about what is happening there?
 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Curiously, the error seems to be thrown when the container is trying to destroy the old version of the JSP...



or am I guessing wrong about what is happening there?

Old version of the jsp?I'm sorry but I'm completely lost on that one :x
However, I did notice from the stacktrace that the error is consistent, ie. when I try to run a different page under similar conditions , w/o restarting the server, I get the same error with the destroy method of the auto generated servlet of that page .
 
Paul Clapham
Sheriff
Posts: 21113
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vic Hood wrote:Old version of the jsp?I'm sorry but I'm completely lost on that one :x


I thought you said you were replacing a JSP. That would have to mean that there was an old version which you were replacing by a new version, no?
 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, didn't get your question initially.
Uh , I was trying to run the same jsp , after making changes BUT without restarting the server, yes so that would be mean replacing it with a new version .
 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
My vague guess about the problem coming from jar files, seemed to be true . Earlier, I was referencing three jar files related to jstl . jstl.jar, jstl1.1.2.jar and standard.jar however when I removed the reference to jstl 1.1.2 .jar , the problem seems to have solved itself.
Hope this helps anyone who faces the same problem in the future.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic