Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP error in Websphere test environment

 
Sylvia Wang
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody help !
the JSP file is under defaut_app directory, but stopped at very beginning, looks like compile problem. the websphere test environment is from my VAJ ent3.5 version...Thanks.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unhandled error! You might want to consider having an error page to report such errors more gracefully
com.sun.jsp.JspException: D:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_0\default_app\_main__display_xjsp_debug_jspsrc_476594170.java:3: Package javax.servlet.jsp not found in import.
import javax.servlet.jsp.*;
^
D:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_0\default_app\_main__display_xjsp_debug_jspsrc_476594170.java:9: Package com.sun.jsp.runtime not found in import.
import com.sun.jsp.runtime.*;
^
D:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_0\default_app\_main__display_xjsp_debug_jspsrc_476594170.java:13: Package com.sun.jsp.compiler.ibmtsx not found in import.
import com.sun.jsp.compiler.ibmtsx.*;
^
D:\Program Files\IBM\VisualAge for Java\ide\project_resources\IBM WebSphere Test Environment\temp\JSP1_0\default_app\_main__display_xjsp_debug_jspsrc_476594170.java:14: Package com.sun.jsp.compiler.db not found in import.
import com.sun.jsp.compiler.db.*;
^
4 errors

 
Caroline Iux
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like Visual Age can't find those packages. Import Servlet 2.2 to your workspace and also make sure you have websphere test environment feature added.
 
Amy Smith
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, be sure the projects with those packages are in the classpath for WTE. Classpath set from the WTE Tool window.
 
Gary Craig
Author
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a known defect associated with the JSP Execution Monitor. It was fixed with VAJ 3.5.2 but reappeared in VAJ 4.0.
You get this error if JSP Execution monitor is enabled to "Retrieve Syntax Errors".
A work around (other than disabling the JSP EM) is add empty directories in the WTE project folder corresponding to the "Packages" which are not resolved.
For example:
For "import javax.servlet.jsp.*"
Be sure there is an "empty" directory on your system at:
<VAJ Install Dir>/ide/project_resources/IBM WebSphere Test Environment/javax/servlet/jsp
Cheers!

------------------
Gary Craig,
Author of Enterprise Java (tm) Programming with IBM Websphere
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic