Solved

The 'null' appears as a String in Weblogic 8.1?

Posted on 2004-08-12
2
207 Views
Last Modified: 2013-12-10
Hi.
We are having a small problem with out Servlets after we started porting all Projects to Weblogic 8.1 from 5.1... 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 concept. Is there any way we can display that annoying 'null' string as ' ' in Weblogic 8.1 (just like in the Weblogic 5.1 and previous versions)?... please help. IO Believe that the problem lies in the Servlet API - Since this same this is present in the Tomcat 5 and JBoss as well,

--------------------------------------------------------------
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
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
2 Comments
 
LVL 23

Accepted Solution

by:
rama_krishna580 earned 500 total points
ID: 11803115
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
 

Expert Comment

by:amol78
ID: 11839852
Hi R.K

shouldnt this be , as we need to compare the null string and not the null object

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

regards
Amol
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

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 …
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…

730 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