problem enabling jsp in SunONE 6.0 sp9

Hi there.

Bit of a newbie question here...We've never used JSP pages on any of our sites before, so this hasn't come up.

I'm having difficulty enabling JSPs on our web server.

I've followed the steps in the "...Guide to Servlets" manual (1. enable servlets in server manager; 2. include jsp-servlet enable="true" in web-apps.xml file; 3. add tools.jar to jvm classpath (found this in /usr/java/lib/tools.jar) )

The classpath was originally .../iplanet/servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jarand now I've added :/usr/java/lib/tools.jar to it.

When I try to access a JSP application provided by a software vendor, I get an error in the server's error log as follows:

[25/May/2007:11:48:58] info (19136):JSP11 Log:The scratchDir you specified: /export/swr/iplanet/servers/https-mapstest.county.oxford.on.ca/config/../ClassC ache/https-mapstest.county.oxford.on.ca/jspviewer is unusable.

[25/May/2007:11:49:09] info (19136):jsp: init

[25/May/2007:11:49:10] failure (19136):Internal error: servlet service function had thrown ServletException (uri=/jspviewer/jspForm.jsp): org.apache.jasper.compiler.CompileException: /export/swr/arcgis/arcims/Samples/Java/jspviewer/jspForm.jsp(8,0) Unable to open taglibrary http://mapstest.county.oxford.on.ca/maps/Java_Connector91 : Could not locate TLD http://mapstest.county.oxford.on.ca/maps/JavaConnector91, stack: org.apache.jasper.compiler.CompileException: /export/swr/arcgis/arcims/Samples/Java/jspviewer/jspForm.jsp(8,0) Unable to open taglibrary http://mapstest.county.oxford.on.ca/maps/Java_Connector91 : Could not locate TLD http://mapstest.county.oxford.on.ca/maps/JavaConnector91

at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventL istener.java:715)

at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListene r.java:110)

at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)

at org.apache.jasper.compiler.Parser.parse(Parser.java:1096)

at org.apache.jasper.compiler.Parser.parse(Parser.java:1061)

at org.apache.jasper.compiler.Parser.parse(Parser.java:1057)

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:218)

at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadJSP(JspServlet.java: 209)

at org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$4(JspServlet.java :171)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:489)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:599)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletR unner.java:943)

at com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1094 )

at com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.j ava:1005)

, root cause:

There is a .tld file at the noted location (which is linked as an "additional document directory"). It's arcims_taglib.tld.

Is this a classpath thing?

The server has been restarted, and starts with no apparent errors. It's noted in the error log that it has successfully initialized the web application environment (web-apps.xml) for the virtual server.

Any suggestions and/or assistance will be greatly welcomed!

Thanks,

Chris J.

[3471 byte] By [cdejacoba] at [2007-11-27 5:31:13]
# 1
please consider upgrading to web server 7 - is free and u will find it lot easier to use than ever before
chilidevelopera at 2007-7-12 14:56:13 > top of Java-index,Web & Directory Servers,Web Servers...
# 2

Hi there.

Thanks for pointing that out - Neitehr 6.1 or 7.0 were free the last time I looked at upgrading. I've checked some of our other software and ESRI ArcIMS should work with 7.0. I'll upgrade to that, and see how JSPs work there. I'll update this thread again at that point.

Thanks,

CDEJ

cdejacoba at 2007-7-12 14:56:13 > top of Java-index,Web & Directory Servers,Web Servers...
# 3

I've installed 7.0 of the web server, and it's working fine. Administration seems a little slower (probably just the speed of the test machine), but it's generally fine to use. Seems quite quick and responsive at serving pages...

In short, jsp seems to work (out-of-box). A really simple jsp page (which just prints out a date) works. (e.g.

<%

Date now = new Date();

out.println(DateFormat.getTimeInstance().format(now));

%>

)

However, if I try to use a more complex set of jsp pages, one of which is referencing something from a jar file, I get a server error:

--

for host xx.xx.xx.xx trying to GET /GeoDoc/redirectlogin.do, service-j2ee reports: StandardWrapperValve[action]: PWC1406: Servlet.service() for servlet action threw exception

--

java.lang.NullPointerException at com.geodoc.struts.redirectLoginAction.execute(redirectLoginAction.java:73) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor .java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:796) at javax.servlet.http.HttpServlet.service(HttpServlet.java:917) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilte rChain.java:391) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 272) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextVal ve.java:241) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 182) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:160) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at com.sun.webserver.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:14 9) at com.sun.webserver.connector.nsapi.NSAPIConnector.service(NSAPIConnector.java:99 5)

--

Any thoughts or suggestions?

Thanks,

CDEJ

cdejacoba at 2007-7-12 14:56:13 > top of Java-index,Web & Directory Servers,Web Servers...
# 4
From the stacktrace it looks like your code get a nullpointer problem. Can you debug your strut application? you can find the source code line number from trace:java.lang.NullPointerException at com.geodoc.struts.redirectLoginAction.execute(redirectLoginAction.java:73)
wyb2005a at 2007-7-12 14:56:13 > top of Java-index,Web & Directory Servers,Web Servers...
# 5

Ah-ha!

It was a platform dependency thing - looking for a file with a '\' in the path, and it couldn't find it because our web server (unlike the original coder's) is a unix machine. Now that's looked affer, the null pointer has gone away, and everything's good.

Thanks!

CDEJ

cdejacoba at 2007-7-12 14:56:13 > top of Java-index,Web & Directory Servers,Web Servers...