Domanda

enter image description herei want to use Javaxt libs in JSP code

so i contain external libs in my DynamicWebProject

and use like this

<%@ page import="javaxt.io.Image"%>
<%
    javaxt.io.Image image = new javaxt.io.Image(
            "C:\\codeTest\\test.jpg");
    double[] gps = image.getGPSCoordinate();
    out.println(gps[1]);
    out.println(gps[0]);
%>

this code is work fine at JAVA project but can't work at JSP web

how to use javaxt in JSP?

È stato utile?

Soluzione

All webapp-specific runtime dependencies need to go in /WEB-INF/lib folder.

However, for some unclear reason you named that folder /WEB-INF/libs. This is obviously wrong.

Rename it back to /WEB-INF/lib and then it should end up correctly in webapp's runtime classpath. It's already the default folder name when you create a Dynamic Web Project from scratch. You're not supposed to rename those generated folders.

Also make sure that you don't touch anything in project's Build Path property, otherwise things may still possibly fail. Just dropping the JAR in /WEB-INF/lib folder ought to be sufficient.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top