Solved

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

Posted on 2004-08-12
8
682 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
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

 

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 500 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Suggested Solutions

-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 …
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

756 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