Hi All
First of all my jsp file looks like this
Contents Jsp File:
<%@ page language="java" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<c:out value="${person.language.localeName}" />
The error occures on the line with the person.language.localeName.
Person is a object in the session. The code prints the locale name the
person has chosen.
System
Debian Sarge
Tomcat:
Tomcat 5.0.27 (I have also tried 5.0.28)
Java
I have Java j2sdk 1.4.2_05 installed under /opt/j2sdk1.4.2_05. I have
created a sym link from /opt/java to /opt/j2sdk1.4.2_05.
I have JAVA_HME point to /opt/java.
This runs perfectly. I then install j2sdk 1.4.2_08 under /opt and then
have /opt/java point to /opt/j2sdk1.4.2_08.
I stop tomcat. Wait and check to see that no occurance is running in the
memory anymore. I then start up tomcat. When calling the same jsp file
that worked with the previous version of Java I get this error in the
catalina.out:
2005-08-11 11:37:06 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception
An error occurred while evaluating
custom action attribute "value" with value
"${person.language.localeName}": Unable to find a value for "language"
in object of class "com.jatse.api.User" using operator "." (null)
at
(Evaluator.java:146)
at
(Evaluator.java:166)
at
()
at
(SetLocaleTag.java:141)
at
(SetLocaleTag.java:101)
at
(index_jsp.java:146)
at (index_jsp.java:100)
at (HttpJspBase.java:94)
at (HttpServlet.java:802)
at
(JspServletWrapper.java:324)
at
(JspServlet.java:292)
at (JspServlet.java:236)
at (HttpServlet.java:802)
at
()
at
()
at (PersonFilter.java:42)
at
()
at
()
at
()
at
()
at
()
at
(StandardWrapperValve.java:214)
at
(StandardValveContext.java:104)
at
(StandardPipeline.java:520)
at
(StandardContextValve.java:198)
at
(StandardContextValve.java:152)
at
(StandardValveContext.java:104)
at
(StandardPipeline.java:520)
at
(StandardHostValve.java:137)
at
(StandardValveContext.java:104)
at
(ErrorReportValve.java:117)
at
(StandardValveContext.java:102)
at
(StandardPipeline.java:520)
at
(StandardEngineValve.java:109)
at
(StandardValveContext.java:104)
at
(StandardPipeline.java:520)
at (ContainerBase.java:929)
at
(CoyoteAdapter.java:160)
at (JkCoyoteHandler.java:300)
at (HandlerRequest.java:374)
at (ChannelSocket.java:743)
I see a blank page in the browser by the way.
You might thing ok there is something wrong with the User class. So I
added some extra lines before the jstl call:
<%
// Person is a super class of User so casting the object to a Person
object will do.
Person person = (Person)session.getAttribute("person");
System.out.println("Language = " +
person.getLanguage().getLocaleName());
%>
Language = EN appears in the catalina out, so you can conclude that the
jsp code can read the Language locale name in User but jstl cant.
I then had /opt/java point back to /opt/j2sdk1.4.2_05 and restarted
tomcat. I then call the same webpage and the now the page works.
My conclusion is that jstl in combination with j2sdk 1.4.2_08 or higher
is impossible. For some reason they wont work together.
Thanks in advance for any help you could offer,
Martyn
It would probably help, if you would describe what you did (i.e. what
is your source code, your environment, tomcat version , etc.) and what
does mean "the bug happens" (i.e. error messages, stack traces, etc.)
Now we have just the analogue of "My car works on road a but not on
road b. Do you know what is wrong?"
Christoph
Martyn Hiemstra wrote:
>
>Hi
>>
>>
Do you have a link to a Sun Bugparade entry describing the problem?
>>
>>
>No I don't.
>>
>I have performed a test of my own.
>>
>I have installed j2sdk 1.4.2_05 and j2sdk 1.4.2_08 and j2sdk 1.4.2_09.
>I have installed these to the /opt directory. I have my JAVA_HME
>pointed
>to /opt/java.
>>
>First I point /opt/java to /opt/j2sdk1.4.2_09 and restart tomcat. The
>bug
>happens again. I then point /opt/java to /opt/j2sdk1.4.2_08. I restart
>tomcat and the same bug occures. I then point /opt/j2sdk1.4.2_05 to
>/opt/java, restart tomcat and BING no bug. Apparently versions java
>2 sdk
>1.4.2_09 and java 2 sdk 1.4.2_08 cause the bug to occure just as in the
>forum thread.
>>
>I have tried a different tomcat version but no luck.
>>
>Any ideas anybody? Maybe a configuration change that has occured in the
>new java versions?
>>
>Martyn
>>
>>
Hi,
I'm not convinced by that forum thread.
It's very hard to believe that there is such a severe bug in Java
1.4.2_06 *that isn't fixed yet*
Do you have a link to a Sun Bugparade entry describing the problem?
Christoph
Martyn Hiemstra wrote:
Hi All
I have found a Bug in Java 1.4.2_08 and Java 1.4.2_09.
Goto this address to read about it:
The new versions will break your jstl code and create errors in the
log
and create blank pages.
I have tried a new Tomcat version, no luck. I had it running on
another
server but that server is running on Java 1.4.2_05.
So just a tip. Dont install Java 1.4.2_08 or higher. It will kill your
application if your using jstl.
Martyn
To unsubscribe, e-mail: tomcat-user-unsubscribe (AT) jakarta (DOT) apache.org
For additional commands, e-mail: tomcat-user-help (AT) jakarta (DOT) apache.org
To unsubscribe, e-mail: tomcat-user-unsubscribe (AT) jakarta (DOT) apache.org
For additional commands, e-mail: tomcat-user-help (AT) jakarta (DOT) apache.org
>>
>>
>>
>>
>
>To unsubscribe, e-mail: tomcat-user-unsubscribe (AT) jakarta (DOT) apache.org
>For additional commands, e-mail: tomcat-user-help (AT) jakarta (DOT) apache.org
>>
>
>
To unsubscribe, e-mail: tomcat-user-unsubscribe (AT) jakarta (DOT) apache.org
For additional commands, e-mail: tomcat-user-help (AT) jakarta (DOT) apache.org
To unsubscribe, e-mail: tomcat-user-unsubscribe (AT) jakarta (DOT) apache.org
For additional commands, e-mail: tomcat-user-help (AT) jakarta (DOT) apache.org