Newbie Issue Jetty NO JSP

Suggestions, questions oder problems with regain

Moderator: thtesche

Newbie Issue Jetty NO JSP

Postby Solomoriah » Fri Oct 10, 2014 1:52 pm

I'm trying to set up a Regain server for a client. I'm really not a Java guy, so please bear with me.

The customer has a Debian Wheezy server, patched up to date. I downloaded and installed the following:

jdk-7u67-linux-x64.tar.gz
jetty-distribution-9.2.3.v20140905.tar.gz
regain_v2.1.0-STABLE_server.zip

I used the java-package program to make a .deb out of the jdk, then installed that. I unpacked jetty and regain into separate folders, got jetty running:

java -jar start.jar

... just to verify that it starts and runs okay. I created a folder called regain-base, followed the steps from the Jetty site to configure it:

cd regain-base
java -jar ../start.jar --add-to-startd=http,deploy

The resulting folder structure contains a webapps folder, so I put regain.war in it. I wasn't sure what to do with the SearchConfiguration.xml file, since the instructions for doing this with Jetty are basically missing in action, so I dropped it in start.d/regain and hoped that was right. (Hopefully someone will tell me where I should have put it if I have it wrong).

After updating the SearchConfiguration.xml, I started the server:

java -jar ../start.jar

and got this:

2014-10-10 08:38:41.982:INFO::main: Logging initialized @1888ms
2014-10-10 08:38:43.160:INFO:oejs.Server:main: jetty-9.2.3.v20140905
2014-10-10 08:38:43.246:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/opt/jetty/regain-base/webapps/] at interval 1
2014-10-10 08:38:45.017:INFO:oejw.StandardDescriptorProcessor:main: NO JSP Support for /regain, did not find org.apache.jasper.servlet.JspServlet
2014-10-10 08:38:45.105:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@4748dc72{/regain,file:/tmp/jetty-0.0.0.0-8080-regain.war-_regain-any-1622999502619781716.dir/webapp/,AVAILABLE}{/regain.war}
2014-10-10 08:38:45.216:INFO:oejs.ServerConnector:main: Started ServerConnector@2a31ac15{HTTP/1.1}{0.0.0.0:8080}
2014-10-10 08:38:45.230:INFO:oejs.Server:main: Started @5175ms

Visiting the page gives me this:

HTTP ERROR 500

Problem accessing /regain/index.jsp. Reason:

JSP support not configured

Powered by Jetty

I Googled extensively for that error message and got a lot of conflicting advice. According to the main Jetty website, Jetty 9 includes the JSP support libraries, so I shouldn't have to add them. Some sites said I should do this:

java -jar ../start.jar OPTIONS=Server,jsp

... but that gets me the same error messages, except at the top it says this:

WARNING: The behavior of the argument OPTIONS=Server,jsp (seen in <command-line>) has changed, and is now considered a normal property. OPTIONS no longer controls what libraries are on your classpath, use --module instead. See --help for details.

If I'm reading that right, the OPTIONS=Server,jsp has become a default. Do I have that wrong?

What the heck should I be doing here?
User avatar
Solomoriah
 
Posts: 3
Joined: Fri Oct 10, 2014 1:30 pm

Re: Newbie Issue Jetty NO JSP

Postby Solomoriah » Fri Oct 10, 2014 2:03 pm

Well, as so often happens when I post a question on a forum, I found the answer... sort of.

I started jetty with the --list-config option and saw that the jsp files weren't in the classpath, so after a little more thinking I did this:

java -jar ../start.jar --module=jsp

and now they were there. Hallelujah!

... or so I thought. Now when I go to my regain site I get this:

HTTP ERROR 500

Problem accessing /regain/. Reason

Server Error

Caused by

org.apache.jasper.JasperException: /index.jsp (line: 2, column: 0) null
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:276)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:92)
at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:325)
at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:358)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:461)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1428)
at org.apache.jasper.compiler.Parser.parse(Parser.java:139)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:227)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:405)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:349)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:595)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:191)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:72)
at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:585)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
at java.lang.Thread.run(Thread.java:745)

... and THIS is the message I got when I tried once before to set up regain with Apache Tomcat.

ACK. What the heck does THIS mean?
User avatar
Solomoriah
 
Posts: 3
Joined: Fri Oct 10, 2014 1:30 pm

Re: Newbie Issue Jetty NO JSP

Postby Solomoriah » Thu Oct 16, 2014 2:34 pm

... nobody?

Well, in answer to my previous post... I downloaded Tomcat 6 and deployed on it painlessly. Which means that it doesn't work with either Jetty 9 or Tomcat 8, the other Java servers I tried.
User avatar
Solomoriah
 
Posts: 3
Joined: Fri Oct 10, 2014 1:30 pm

Re: Newbie Issue Jetty NO JSP

Postby dcbailey » Mon Jul 13, 2015 5:03 am

I had the same problem. Thanks for the update, one reason why you need to Tomcat 6 is that regain is compiled using jdk 6. The reason that I figured it out was that I had to comple the project 6 to get it to compile
dcbailey
 
Posts: 1
Joined: Sun Jul 12, 2015 12:25 am


Return to regain

Who is online

Users browsing this forum: No registered users and 1 guest

cron