• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem locating class from jsp...

 
Ryan Crow
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, im relatively new to EJBs...
im working on the beans under Forte j2ee, so basically everything is generated automatically by the rdk itself.
altering the generated web servicec, im writing an image mapper class to read the variable and return the image path to the jsp page. im using the jsp:useBean tag to refer to my mapper class and compilation worked fine in forte... but when i tried to execute the jsp, the servlet had problem locating the mapper class... where did i go wrong?
by fact i think tomcat in forte shouldve been conf and working fine.
here's the code for my jsp
<%@page contentType="text/html"%>
<%@page import="java.lang.*" %>
<html>
<head><title>main header</title></head>
<body>
<jsp:useBean id="imapper" scope="session" class="EJBTier.WebService.LoginWebServiceClient$Documents.ImageMapper" />
<img src="add_leftpic.jpg">
Welcome!
<% out.println(session.getAttribute("theName"));
String ui = session.getAttribute("theName").toString(); %>
<img src="<%= imapper.mapImage("header1",ui) %>">
</body>
</html>
this code compiled fine with the class located at the specific path.. but when it translate itself into servlet, the servlet occured an error trying to located the same class.
 
Shubhrajit Chatterjee
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import the class / package at the top using the page import directive
 
Ant Swa
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no problem with the case.
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it an inner class? If so, try just using '.' instead of '$'.
Let us know how you get on...
Simon
 
Ant Swa
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ooooooohhhppps, disregard the previous post of mine.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!