Home
TeamSite
Custom JAR files in TS.
vp98aa
Hello,
I am using a server call back to call a JSP from a DCT. This JSP will parse an XML file and build a drop list and return it to the DCT.
The server call back code in the DCT looks like this: IWDatacapture.callServer("/iw/webdesk/custom/myCustom.jsp")
In that JSP, I want to call a JAVA class that is part of a package called myXMLParser which is bundled in a JAR file.
I placed the JAR file at following location: \iw-home\httpd\webapps\webdesk\WEB-INF\lib\myXMLParser.jar
And the code in JSP looks something like this:
<%@ page import="com.myXMLParser.*" %>
<%
ParseXML xp = new ParseXML();
%>
I tried this and it is NOT working. I know for a fact that JSP is being called from DCT just fine. But the JSP is not able to get to the JAR file. Have I placed the JSP and JAR file in correct locations? Do I need to modify any manifest files? I tried looking through the logs but it didnt report any errors.
Another question would be: lets say I do System.out.println(); within my JSP, where would it write the output? Which log files?
Any help would be appreciated.
Thanks.
Find more posts tagged with
Comments
Migrateduser
I am not sure but one option may be to explicitly add the .jar to tomcat's classpath (I think you have to edit the installer Perl). Another option is to unjar under WEB-INF\classes. There is probably a better way. What you are doing looks correct and I think should work without modifying any manifests.
You can also bring your JSP up in a browser and see what error you get, also check the tomcat logs (IWHOME/local/logs/iwui). I think that's where your printlns will go too.
or maybe you just have to restart tomcat?
ts_user
Did you try recompiling webapps(JSP file) after you added your JSP, jar file and restart tomcat? Not sure if this would help but you can try doing this.
Stop Tomcat
run command <IWHOME>\install\install_webapps.ipl -c
restart Tomcaat servlet engine, or better still run iwreset -a to restart all the services.
I sometimes have trouble when my custom JSP file changes dont show up and the only way I have to make it work is to recompile the webapps ( so that it compiles my JSP files to .class Servlet) stop and start tomcat and it fixed my problems.