0

When I try to instantiate an class inside my JSP page, I Get the following error:

An error occurred at line: 5 in the jsp file: /ProcessSale.jsp
UniversalPlugin cannot be resolved to a type
2: <%@ page import="java.util.*" %>
3: <%@ page import="com.aciworldwide.commerce.gateway.plugins.*, com.sun.org.apache.xalan.internal.xsltc.compiler.Parser" %>
4: <%
5:  UniversalPlugin o = new UniversalPlugin(); 
6: %>

Follow my code:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*" %>
<%@ page import="com.aciworldwide.commerce.gateway.plugins.*, com.sun.org.apache.xalan.internal.xsltc.compiler.Parser" %>
<%
    UniversalPlugin o = new UniversalPlugin(); 
%>

How I can to do it inside a JSP page?

Pshemo
  • 122,468
  • 25
  • 185
  • 269
mcamara
  • 731
  • 4
  • 15
  • 26
  • 3
    Start by [not using scriptlets at all](http://stackoverflow.com/q/3177733/1065197). – Luiggi Mendoza Jul 15 '14 at 16:16
  • In this package `com.aciworldwide.commerce.gateway.plugins` are your sure that you have `UniversalPlugin` class? – Pradeep Simha Jul 15 '14 at 16:17
  • In which package `UniversalPlugin` class is located? – Pshemo Jul 15 '14 at 16:17
  • Yeah i Have this package inside my solution, I imported a jar file. – mcamara Jul 15 '14 at 16:21
  • UniersalPllugin is in package com.aciworldwide.commerce.gateway.plugins – mcamara Jul 15 '14 at 16:23
  • Make sure your external libraries are inside WEB-INF/lib folder. – Luiggi Mendoza Jul 15 '14 at 16:29
  • 1
    First of all as it is an external jar add it to the build path by doing like this RightClick on the project ->properties -> java BulidPath -> Library Tab ->Add external jar -> select the jar then ok Or If it is a web project put the jar in WEB-INF/lib the right click on the jar and add to build path. Once done Try to give the full qualified name of the class Like this `<%@ page import="com.aciworldwide.commerce.gateway.plugins.UniversalPlugin" %>` – SparkOn Jul 15 '14 at 16:41

0 Answers0