Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Properties file for servlet in VA Java/WTE

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
My question is a very basic one. I've written a small test servlet to access environment variables. This works quite happily in Websphere 4.0 when I add an Environment Entry when assembling the application. The problem is that I don't know how to simulate this in WTE running in VAJ 4.0? I've seen various posts that talk about a properties file called ivj.servlet.properties in the c:\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment folder. I've tried this but haven't managed to get it working. What format should the data in this file take?
An extract of the Jave code I'm using is as follows:-

When the servlet runs in WTE I get the following message in the console:-
Exception : javax.naming.CommunicationException [Root exception is org.omg.CORBA.COMM_FAILURE: minor code: 3 completed: No]
This is happening when trying to perform the 'new javax.naming.InitialContext();'
Thanks in advance for any help you might be able to offer. Can you please reply in plain english rather than tech jargon as my Java/VAJ knowledge is limited at the moment.
Andee
[ January 23, 2002: Message edited by: Andee Weir ]
[ January 23, 2002: Message edited by: Andee Weir ]
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andee,
I don't know if the following information will be of use to you.
In section 4.7.2.3 of the InfoCenter docs v4("Troubleshooting guide for the J2EE application client")it gives an explanation and possible cause for the error. It's more specific to running the launchClient tool though.
I also received the error message before when I was obtaining an InitialContext - executing a java class with a main method. The reason was because I was doing this on another computer. When I did the same thing, on the computer where WebSphere was installed, there was no problems.
Vinnie.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this helps a bit it almost looks like you are trying to do a JNDI lookup. Have you looked at the options on WTE for persistent name server and DataSource Configuration ? Just a thought but i might be way offbase.
 
Andee Weir
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies guys.
As well as posting here I also emailed some other contacts who suggested that VAJ 4.0 runs Websphere 3.5.3 (certainly true!) which does not support the use of java:comp context yet - presumably Websphere 4.0 does, which is why works there.
So going back to my original problem - I don't want to hardcode some values in code as those values may change for each use of that class between different applications. I need a way to tell an Application (by Application I mean a WAR/EAR) what it's specific values to use are.
I've seen a number of posts around the place talking about Property Files but has anyone got a small example servlet they could share with me which can be run in VAJ WTE 3.5.3?
Thanks in advance,
Andee.
 
Andee Weir
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For those that may find this in the future - have a look at:-
http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=7&t=004641
for the answer.
Cheers,
Andee.
 
Lookout! Runaway whale! Hide behind this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic