• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

WebsphereTestEnvironment problem

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I try to get the MVC pattern working in the IBM VAwebsphereTestEnvironment. I works just fine with tomcat.
However the WTE is configured in a different way. An application a .webapp type of file.
In the defailt_app.webapp file I have included :
-----------------------------------
<servlet>
<name>action</name>
<description>Action class lader</description>
<code>ActionServlet</code>
<servlet-path>/</servlet-path>
<init-parameter>
<name>action-mappings</name>
<value>actions</value>
</init-parameter>
<autostart>false</autostart>
</servlet>
<servlet-mapping>
<name>action</name>
<description>Zoek de juiste beanclass</description>
<url-pattern>*.do</url-pattern>
<servlet-path>/action</servlet-path>
</servlet-mapping>
<taglib>
<taglib-uri>/jsp/demoAmmsys/utilities</taglib-uri>
<taglib-location>/jsp/demoAmmsys/tlds/utilities.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/jsp/demoAmmsys/application-tags</taglib-uri>
<taglib-location>/jsp/demoAmmsys/tlds/app.tld</taglib-location>
</taglib>
-------------------------------------------
The problem is it is loaded immediately on the start of the servlet engine. It should be called only when a request is done with a .do extention.
What do I have to do : first to stop it from being loaded on startup and second to have it called only when a request is send?
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Please change the servlet path to /xxxx instead of /.
This may serve ur purpose.
Give a try. All the best for the same.
Ram
 
wessel zaalberg
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
I did and now I get a very strange error : in the console:
Error: Cannot get the local host address.
Exception: Connection refused: no further information
on the page :
Error 500
An error has occured while processing request:http://localhost:8080/demoAmmsys_app/stam_gegevens.jsp
Message: Server caught unhandled exception from servlet [jsp]: null
In the trace :
java.lang.NullPointerException
java.lang.Throwable()
java.lang.Exception()
java.lang.RuntimeException()
java.lang.NullPointerException()
void com.ibm.ivj.jsp.debugger.base.JspEMAgentBase.openServerSocket()
void com.ibm.ivj.jsp.debugger.base.JspEMAgentBase.openServerSocket()
I compile in v1.1

[This message has been edited by wessel zaalberg (edited August 17, 2001).]
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Looks like some code in the jsp is throwing a NullPointerException. Just check up your jsp and initialize all variables so that this excepion will not be thrown.

------------------

Mahindrakar
IBM Application Server Forum Moderator
Consultant - Zensar Technologies.
SCJP2, SCJD2 & SCJEA (Part I)
 
wessel zaalberg
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually it has everything to do with
<.code>com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet</code.>
It is missing something while compiling.
If I choose to use
<.code>com.ibm.ivj.jsp.runtime.JspDebugServlet</code.>
(inserted . in < .code> for readebility)
all is well accept I need in the code
< .%@ taglib uri='utilities' prefix='util' %.>
In the tld is written:
<?xml version="1.0" encoding="ISO-8859-1" ?>
< !DOCTYPE taglib PUBLIC <br /> "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" <br /> "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<.taglib>
<.tlibversion>1.0</tlibversion.>
<.jspversion>1.1</jspversion.>
<.shortname>Sun Microsystems Press Examples</shortname.>
So it seems the jsp version 1.1 is required.
And that doesnot compile.

[This message has been edited by wessel zaalberg (edited August 17, 2001).]
 
wessel zaalberg
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The exception I get is thrown in openServerSocket of com.ibm.ivj.jsp.debugger.JspEMAgentBase.
Error in debug failed to write (toString() failed) later it becomes null pointer.
On the console is written :
Error: Cannot get the local host address.
Exception: Connection refused: no further information
Please, this is the chance to show yourself a super guru ;-)
 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure if you are using Struts. If yes, try to modify your defailt_app.webapp file as follows:
-----------------------------------
<.servlet>
<.name>action<./name>
<.description>Action class loader<./description>
<.code>org.apache.struts.action.ActionServlet<./code>
<.servlet-path>/<./servlet-path>
<.init-parameter>
<.name>application<./name>
<.value>com.ibm.mag.gui.ApplicationResources<./value>
<.name>config<./name>
<.value>/WEB-INF/struts-config.xml<./value>
<.name>action-mappings<./name>
<.value>actions<./value>
<./init-parameter>
<.autostart>false<./autostart>
<./servlet>

[This message has been edited by Caroline Iux (edited August 20, 2001).]
 
wessel zaalberg
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks, but I am not using struts.
I eventually solved the problem by doing a compleet new install and started from a clean repository.
I had to add to the actionservlet an url path *.do so that it was not dealt with by the simpleFileservlet.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic