473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ServletContext.getResourceAsStream() in WAS5 and WAS6

Hi All,

I am facing a strange issue. I am migrating my application EAR from WAS5 to WAS6. This EAR works perfectly fine in WAS 5 but while the same EAR is deployed in WAS 6, it throwing an exception at the below line (in bold) of code:

String fileName =
ctx.getInitParameter("Webapp.properties");

try {
java.io.InputStream is =
ctx.getResourceAsStream(fileName);
}


The fileName is calculated as null (both in WAS5 and 6) but was5 executes fine the code line in bold while was6 throws null pointer exception.

Please note "ctx" above is the servletcontext instance.

TIA
Feb 16 '11 #1
0 1489

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: robert walker | last post by:
hi all, to my webapp named mrf, i have added load-on-startup tag to mrf\WEB-INF\web.xml so i added a snippet like so <servlet> <servlet-name>loadDbProperties</servlet-name>...
3
by: Moth | last post by:
Probably a simple question. I've written a web app that loads configuration info from an xml file. What is the best way to tell my app where that file is located? This app needs to run on both...
9
by: Russ Perry Jr | last post by:
I'm using "ID" and "Value" in the generic sense here... Let's say one page I had a <html:select> with a collection like this: <html:options collection="items" property="key"...
0
by: Paul C | last post by:
I am wanting to store a collection of relatively large binary files on a device. The above method seems to be the only way I can do this (j2me databases do not meet my needs- the recordstore class...
2
by: Alexander Kienzle | last post by:
I'm new to Java programming. I'm developing a Servlet for tomcat which needs an external configuration file. With external I mean a file (in XML format) which is customizable and not contained in...
1
by: Silviu-Lucian | last post by:
I have Tomcat running a servlet that needs to know the location of the WebApp that contains it (actually it needs to know the full path to itself). I thought that the servlet path was relative to...
0
by: ErikaW | last post by:
Hi all, I've tried to google this but could not find a clear solution. I have a Web application developed in JDevloper using mostly html and Javascript. I have a pre-defined PDF form which I merge...
3
oll3i
by: oll3i | last post by:
when i run my create.jsp that populates the database i get javax.ejb.EJBException error it throws the exception at line phoneHome.create("01", "01", "0957205114"); i have three lookups...
3
by: gjain123 | last post by:
Hi all, I am using netbeans as IDE and glassfish as app server for my web application. At runtime it needs some dll files and .conf file. Now the question is: 1. How should I package the .conf...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.