Question : Websphere v5 configuration and servlets

Hi All,

I'm new to Websphere and I'm currently having a few issues which people here may be able to
help me with.

1.
I downloaded a trial version of WAS v5 and installed it on a WinNT workstation SP6a machine.
All seems ok and the web server (server1) starts normally. But when I go to the log files for
server1 I get the following errors:

+2      1     03.02.07 15:40:19:287 GMT java.io.FileNotFoundException com.ibm.ejs.jms.listener.AsyncMessageLog.readRequestLogFile 128
+3      1     03.02.07 15:40:24:755 GMT java.lang.ClassNotFoundException com.ibm.ws.activity.ActivityServiceInterceptor.loadMigrationImpls 424
+4      1     03.02.07 15:40:29:342 GMT com.ibm.ws.naming.jcache.CacheEntryNotFoundException com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal 367
+5      1     03.02.07 15:40:32:947 GMT javax.naming.NameAlreadyBoundException com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_bind_new_corba_context 1042
+6      1     03.02.07 15:40:32:947 GMT org.omg.CosNaming.NamingContextPackage.AlreadyBound com.ibm.ws.naming.jndicos.CNContextImpl.doCreateSubcontext 2155
+7      1     03.02.07 15:40:32:957 GMT javax.naming.NameAlreadyBoundException com.ibm.ws.naming.jndicos.CNContextImpl.createSubcontext 756
+8      1     03.02.07 15:40:34:910 GMT java.lang.NullPointerException com.ibm.ws.utils.VUTrace.initialisation 584
+9      1     03.02.07 15:40:35:811 GMT javax.naming.NameNotFoundException com.ibm.ws.naming.urlbase.UrlContext.lookup 1226
+10     1     03.02.07 15:40:35:811 GMT javax.naming.NameNotFoundException com.ibm.ws.naming.urlbase.UrlContext.lookup 1252
+11     1     03.02.07 15:40:37:894 GMT java.lang.ClassNotFoundException com.ibm.ejs.jms.listener.MDBListenerManagerImpl.initializeMQJMSConnectionPooling 705
+12     1     03.02.07 15:40:37:904 GMT java.io.FileNotFoundException com.ibm.ejs.jms.DurableSubscriptionManagerImpl.readDurableSubscriptionFile 236
+13     1     03.02.07 15:41:06:866 GMT java.lang.ClassNotFoundException com.ibm.ws.classloader.CompoundClassLoader.loadClass 248
+14     1     03.02.07 15:41:10:641 GMT java.util.MissingResourceException com.ibm.ejs.sm.client.ui.NLS.NLS 166

Anyone know what may be causing this?

2.
I created a simple servlet (simply outputs some html) and put this into the classes folder of the
default application (DefaultApplication.ear\DefaultWebApplication.war\WEB-INF\classes). I can
then go to IE and type http://localhost:9080/servlet/SimpleServlet to run the servlet. If I then
put the servlet into the classes folder of any of the other sample applications I can't call
the servlet and the following error gets logged in the websphere logs:

java.lang.NullPointerException com.ibm.ws.webcontainer.servlet.ServletManager.doDestroy 419

I'm not sure why I can call a servlet from the default context but not from any of the other contexts.

Would really appreciate any help.

Thanks,
Michael.

Answer : Websphere v5 configuration and servlets

the default servlet has a special mapping to /servlet/*, this is easy to test a servlet but has potential security problem.

you should always map your servlet in you own web application's \web-inf\web.xml file:

 
    uniqueNameYouGivevlet-name>
    com.your.package.YourServletervlet-class>
 


 
    uniqueNameYouGivevlet-name>
    /any/path/to/YourServlettern>
 


you must put all definations first then if you have more then one servlet.
Random Solutions  
 
programming4us programming4us