• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

EL not working

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,
I am working on tomcat 5.5.28(latest release), where serlvets and jsp works fine.
Code of jsp is as -


And output of the jsp code is as -
Person: ${person.name}
Servlet Engine: 2.4
JSP Engine: 1.2
Application Server: Apache Tomcat/5.5.28

Into the web.xml

<el-ignored> false </el-ignored>

is added to

<jsp-config>

tag.

The files(jsp-api.jar(JSP 2.0 API), servlet-api.jar(Servlet 2.4 API), commons-el.jar (Commons Expression Language 1.0) mentioned into Into tomcat release notes are available into common/lib of tomcat file structure.

I have five questions -

1. Why output of jsp does not show JSP Engine: 2.0?
2. Is jsp engine version same as that of jsp-api.jar?
3. Why EL ${person.name} is not evaluated?
4. If jsp has page directive with isELIgnored, parsers throws invalid attribute error. And
jsp cannot be translated to .java file?
5. Is that the case, file jsp-api.jar along with tomcat 5.5.28 is not 2.0 version?

Please help me solve these problems?

Thanks in advance!


 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May be your lib got corrupted due to manual overwriting of Jar.Best is reinstall tomcat and try again.If you still find this problem you should post here.
 
Sharmila Punde
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Raj,
Let me give you more details, I downloaded apache-tomcat-5.5.28.tar.gz from http://tomcat.apache.org/download-55.cgi. My machine has Fedora os.
Now please see how i install tomcat-
gunzip apache-tomcat-5.5.28.tar.gz
Then i untared the apache-tomcat-5.5.28.tar into apache-tomcat-5.5.28/ folder.
All parts of web application works fine except EL.
I can see jsp-api.jar and other jar file into apache-tomcat-5.5.28/common/lib/.

Just now i reinstall tomcat and again it is having same problem.
Should i download only jsp-api.jar from jakarta, and check with it. But where to get only jsp-api.jar?
Thanks






 
raj malhotra
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try it from jsp-api.jar
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

<el-ignored> false </el-ignored>


You don't need this. If your web.xml is properly declared, EL will be automatically interpreted. Read this FAQ carefully. If it still doesn't work, post your web.xml here.
 
Sharmila Punde
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Raj and Christophe,
I downloaded jsp-api.jar you given, it is still not working with that file. Do i have to put that file
in

/usr/java/jdk1.5.0_16/jre/lib/ext

. Because all these file are available into

tomcat_home/common/lib/

.

Christophe, just look at my web.xml please


Thanks

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It doesn't look wrong. What about your JSP file extension ? Is it ".jsp" ?
 
Sharmila Punde
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes file name result.jsp and i access it using /result.jsp
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, after you make changes to web.xml, make sure to clear Tomcat's cache. Remove the jsp-config tag from web.xml, clear the cache, and reaccess the page.
 
Sharmila Punde
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Christophe,
I removed jsp-config tag, cleared the browser cache. How to clear tomcat's cache. I just removed
.java and .class file related to result.jsp. Not getting the catch.

Thank you very much
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm running out of idea here. The problem comes from the fact that, for some reason, JSP1.2 is being used. What is your CATALINA_HOME set to ?
 
raj malhotra
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I feel only reason may be at run time server is referring wrong jar.May be there are more than two jars in the classpath and wrong one is declared before the correct one.
 
Sharmila Punde
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Raj & Christophe
I will search the classpaths ,jars,CATALINA_HOME,CATALINA_BASE and will see it carefully
Regards
 
Sharmila Punde
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Christophe & Raj,
You are right, tomcat was looking for servlet and jsp jars into /usr/java/jdk1.5.0_16/jre/lib/ext. Now i have removed javax.servlet.jar(old version) and put jsp-api.jar and servlet-api.jar into /usr/java/jdk1.5.0_16/jre/lib/ext. But looks like these files are not proper, because now tomcat do not run
simple servlet. So will see downloading tomcat again. And do not know whether gunzip and untaring created
some problem. See tomcat release note

NOTE: The tar files in this distribution use GNU tar extensions, and must be untarred with a GNU compatible version of tar. The version of tar on Solaris and Mac OS X will not work with these files.


My machine is fedora 6. I had face this problem once before, file was looking intact in terms of size but we required to put it again to make it work.
Thanks for your cooperation. Hope now problem gets solve.
Regards
 
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic