The servlet spec requires that the following packages are imported in your jsp:
javax.servlet.*;
javax.servlet.http.*;
javax.servlet.jsp.*;
Other vendors in the past have also done things such as also include
import java.util.*
import java.io.*
These actions are not mentioned by the spec and create non portable code.
If your app is using the 2.4 servlet spec, you can use a preclude. Add this
to web.xml. (See google for more details)
<jsp-property-group>
<url-pattern>/*.jsp</url-pattern>
<include-prelude>
/WEB-INF/jsps/include/preclude-common-imports.jspf
</include-prelude>
</jsp-property-group>
Where preclude-common-imports.jspf is a one liner
<%@ page import='java.io.*' %>
-Tim
Abh N wrote:
Hi,
We are migrating our applications from Tomcat to Websphere server.
We are getting some issues (in Websphere )with code which used to work fine
in Tomcat.
Server is not recognizing IOException in jsp code. I am now putting import
java.io.* to resolve this.
Am not able to understand how it used to work in Tomcat env without error.
Can anybody give some pointers regarding this.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]