Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Servlet Container return Null for empty string after upgrading weblogic 5.1 to 8.1

Posted on 2004-08-12
8
Medium Priority
?
703 Views
Last Modified: 2013-12-10
Servlet Container return Null for empty string after upgrading weblogic 5.1 to 8.1. Think This is due to Java 1.4 NIO libaries. because weblogic 5.1 dont use NIO. or This can be a Issue with Servlet Container. I already update my weblogic.xml, and ORACLE drivers
    <jsp-descriptor>
          <jsp-param>
                 <param-name>printNulls</param-name>
                 <param-value>false</param-value>
          </jsp-param>
     </jsp-descriptor>
Please help me on this.  
0
Comment
Question by:ErandikaUmal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 4

Expert Comment

by:illusionz70
ID: 11790672
i presume <jsp-descriptor>
is <weblogic-web-app>
0
 

Author Comment

by:ErandikaUmal
ID: 11790798
Yes  Copy of weblogic.xml

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">

<weblogic-web-app>


  <jsp-descriptor>
    <jsp-param>
      <param-name>compileCommand</param-name>
      <param-value>D:\weblogic\jdk141_03\bin\javac.exe -noPrintNulls</param-value>
    </jsp-param>
  </jsp-descriptor>

<weblogic-web-app>
<jsp-param>
<param-name>printNulls</param-name>
<param-value>false</param-value>
</jsp-param>
</weblogic-web-app>



  <context-root>/</context-root>
</weblogic-web-app>


But 'null' problem was with the Sun Servlet Containiner Implementation of the javax.nio.* library. I dont know how to over come this issue. same poblum is comming for Tomcat 5 and JBoss.

 

0
 
LVL 4

Expert Comment

by:illusionz70
ID: 11791455
you are write , i noticed the difference in both while comparing weblogic6.1 with 7.1 and tomcat 4 with tomcat 5.
point 1 : your nesting seems to be wrong conceptually , test it. (i ahvent used 8.1 so i am not sure). ur startup doesnt complain coz the mark up appears to be wrong. ??

check this url out...
http://www.javapractices.com/Topic176.cjp

using c:out doesnt display null.
i know the problem is in ur servlet but this may help..
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:ErandikaUmal
ID: 11791526
Thanks for your comments but My problum still the same. Is there a way to make Servlet Containiner assume "" as empty string.

The below mentioned servlet code-segment works well in both 5.1 & 8.1 , except for 1 small diference... The 'null' appears as a String in Weblogic 8.1, and as ' ' in 5.1, We have developed many thousands of servlets around this concep

--------------------------------------------------------------
ServletOutputStream out=null;
try{

    String abc = null;
    res.setContentType("text/html");
    out = res.getOutputStream();
    out.println("<html><body><br>");
    out.println("");
    out.println(abc);
    out.println("</body></html>");
}catch(Exception er11){ }
---------------------------------------------------------------

0
 
LVL 4

Expert Comment

by:illusionz70
ID: 11791706
so it prints null on screen instead of "" , rite??
0
 
LVL 23

Accepted Solution

by:
rama_krishna580 earned 1500 total points
ID: 11803110
Hi,

we also have the same problem in our application(s)... I think you have only one way to do this...

After variable "abc" validated, then check for abc value...

if (abc == null) abc = "";

thats all you can do it, this is new change in Weblogic 8.1.

i hope it may help you..

R.K

0
 
LVL 4

Expert Comment

by:illusionz70
ID: 11817762
well if that was the solution you were looking for , you shuld not have posted the foll statement

We have developed many thousands of servlets around this concep

:)

0
 

Author Comment

by:ErandikaUmal
ID: 11817876
We are running out of time so I took my last option (Changing the code). if any one can find solution please update. I think it will usefully for others.
0

Featured Post

Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question