[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] jetty: "servlets only" configuration . . .
|
> If you are using the home directory of the distribution
so far I just installed Jetty, I haven't altered anything yet
~
> you need to edit the *start.ini* file and remove or comment out the line that enables the *jsp* module (line 107).
Actually inside of {jetty.home}/demo-base there is also a
"--module=jsp" line which I commented as well
$ find . -type f -iname "*.ini" -exec grep -iHn "jsp" {} \;
./demo-base/start.d/jsp.ini:2:# Module: jsp
./demo-base/start.d/jsp.ini:3:# Enables JSP for all webapplications
deployed on the server.
./demo-base/start.d/jsp.ini:5:--module=jsp
./start.ini:104:# Module: jsp
./start.ini:105:# Enables JSP for all webapplications deployed on the server.
./start.ini:107:# --module=jsp
However, all jsp examples in:
http://localhost:8080/test/jsp/
were working just fine.
~
> You can read about managing Jetty home and Jetty base at:
> https://www.eclipse.org/jetty/documentation/current/startup-base-and-home.html
thank you, I did read through those pages, but, even though I learned
about a few other things, I coulnd't find an answer to my question.
Lots of internal code seems to be using JSP libraries:
$ date; time java -jar ../start.jar STOP.PORT="${_STOP_PORT}"
STOP.KEY="${_STOP_KEY}" --list-modules=jsp
Fri Feb 3 15:46:49 EST 2017
Available Modules:
==================
tags: [jsp]
Enabled Modules:
================
0) ext ${jetty.base}/start.d/ext.ini
1) resources ${jetty.base}/start.d/resources.ini
2) server ${jetty.base}/start.d/server.ini
3) jndi ${jetty.base}/start.d/jndi.ini
4) security transitive provider of security for webapp
transitive provider of security for plus
5) servlet transitive provider of servlet for webapp
transitive provider of servlet for servlets
transitive provider of servlet for jsp
6) webapp transitive provider of webapp for plus
transitive provider of webapp for deploy
init template available with --add-to-start=webapp
7) plus transitive provider of plus for annotations
8) annotations ${jetty.base}/start.d/annotations.ini
9) apache-jsp transitive provider of apache-jsp for jsp
10) apache-jstl transitive provider of apache-jstl for jstl
11) client ${jetty.base}/start.d/client.ini
12) continuation ${jetty.base}/start.d/continuation.ini
13) deploy ${jetty.base}/start.d/deploy.ini
14) http ${jetty.base}/start.d/http.ini
15) ssl transitive provider of ssl for https
init template available with --add-to-start=ssl
16) https ${jetty.base}/start.d/https.ini
17) jaas ${jetty.base}/start.d/demo.ini
18) jsp ${jetty.base}/start.d/jsp.ini
19) jstl ${jetty.base}/start.d/jstl.ini
20) rewrite ${jetty.base}/start.d/demo.ini
21) servlets ${jetty.base}/start.d/servlets.ini
22) websocket ${jetty.base}/start.d/demo.ini
real 0m1.197s
user 0m1.727s
sys 0m0.183s
~
Even if you comment out all --module=jsp lines:
$ find . -type f -iname "*.ini" -exec grep -iHn "\-\-module=jsp" {} \;
./demo-base/start.d/jsp.ini:6:# --module=jsp
./start.ini:108:# --module=jsp
like (1/6) of the loaded classes seem to be jsp-related
~
_LOG_FL="jetty_startup_loaded_classes_startup_loaded_classes_$(date
+%Y%m%d%H%M%S).log"
echo "\$_LOG_FL: |$_LOG_FL|"
time(java -d64 -server -verbose:class -jar ../start.jar
STOP.PORT="${_STOP_PORT}" STOP.KEY="${_STOP_KEY}") > "${_LOG_FL}" 2>&1
date
~
$ _LOG_FL=_LOG_FL="jetty_startup_loaded_classes_startup_loaded_classes_$(date
+%Y%m%d%H%M%S).log"
$ echo "\$_LOG_FL: |$_LOG_FL|"
$_LOG_FL: |jetty_startup_loaded_classes_startup_loaded_classes_20170203192221.log|
$ time(java -d64 -server -verbose:class -jar ../start.jar
STOP.PORT="${_STOP_PORT}" STOP.KEY="${_STOP_KEY}") > "${_LOG_FL}" 2>&1
$ date
Fri Feb 3 19:23:51 EST 2017
$ ls -l "${_LOG_FL}"
-rwxrwxrwx 1 knoppix knoppix 593921 Feb 3 19:23
jetty_startup_loaded_classes_20170203192221.log
$ wc -l "${_LOG_FL}"
4261 jetty_startup_loaded_classes_20170203192221.log
$ cat "${_LOG_FL}" | grep jsp > "${_LOG_FL}"_jsp_classes_lines.log
$ ls -l "${_LOG_FL}"_jsp_classes_lines.log
-rwxrwxrwx 1 knoppix knoppix 144465 Feb 3 19:26
jetty_startup_loaded_classes_20170203192221.log_jsp_classes_lines.log
$ wc -l "${_LOG_FL}"_jsp_classes_lines.log
709 jetty_startup_loaded_classes_20170203192221.log_jsp_classes_lines.log
$ cat "${_LOG_FL}"_jsp_classes_lines.log | grep "\[Loaded org.apache.jsp.jsp"
[Loaded org.apache.jsp.jsp.dump_jsp from
file:/tmp/jetty-0.0.0.0-8080-test.war-_test-any-3200093898214200160.dir/jsp/]
[Loaded org.apache.jsp.jsp.bean1_jsp from
file:/tmp/jetty-0.0.0.0-8080-test.war-_test-any-3200093898214200160.dir/jsp/]
[Loaded org.apache.jsp.jsp.bean2_jsp from
file:/tmp/jetty-0.0.0.0-8080-test.war-_test-any-3200093898214200160.dir/jsp/]
[Loaded org.apache.jsp.jsp.tag_jsp from
file:/tmp/jetty-0.0.0.0-8080-test.war-_test-any-3200093898214200160.dir/jsp/]
[Loaded org.apache.jsp.jsp.tagfile_jsp from
file:/tmp/jetty-0.0.0.0-8080-test.war-_test-any-3200093898214200160.dir/jsp/]
[Loaded org.apache.jsp.jsp.tagfile_jsp$Helper from
file:/tmp/jetty-0.0.0.0-8080-test.war-_test-any-3200093898214200160.dir/jsp/]
[Loaded org.apache.jsp.jsp.tag2_jsp from
file:/tmp/jetty-0.0.0.0-8080-test.war-_test-any-3200093898214200160.dir/jsp/]
[Loaded org.apache.jsp.jsp.tag2_jsp$Helper from
file:/tmp/jetty-0.0.0.0-8080-test.war-_test-any-3200093898214200160.dir/jsp/]
[Loaded org.apache.jsp.jsp.expr_jsp from
file:/tmp/jetty-0.0.0.0-8080-test.war-_test-any-3200093898214200160.dir/jsp/]
[Loaded org.apache.jsp.jsp.foo.foo_jsp from
file:/tmp/jetty-0.0.0.0-8080-test.war-_test-any-3200093898214200160.dir/jsp/]
~
lbrtchx
On 2/2/17, jetty-users-request@xxxxxxxxxxx
<jetty-users-request@xxxxxxxxxxx> wrote:
> Send jetty-users mailing list submissions to
> jetty-users@xxxxxxxxxxx
> Message: 4
> Date: Thu, 2 Feb 2017 11:16:26 -0500
> From: Albretch Mueller <lbrtchx@xxxxxxxxx>
> To: jetty-users@xxxxxxxxxxx
> Subject: [jetty-users] jetty: "servlets only" configuration . . .
> Message-ID:
> <CAFakBwih9pENy2K3y3OOBM1BKkBoWuvNk0=EX-g+K-78EMzFeg@xxxxxxxxxxxxxx>
> Content-Type: text/plain; charset=UTF-8
>
> How can you compile jetty so that its JSP capabilities are not included?
>
> lbrtchx
> jetty-users@xxxxxxxxxxx
> Message: 5
> Date: Thu, 2 Feb 2017 11:48:19 -0500
> From: Chris Walker <chris@xxxxxxxxxxx>
> To: JETTY user mailing list <jetty-users@xxxxxxxxxxx>
> Subject: Re: [jetty-users] jetty: "servlets only" configuration . . .
> Message-ID:
> <CA+X3704EncHZKLYJFBoTd4jY+u=E6v5GbJX2KWDYBB=odeO92g@xxxxxxxxxxxxxx>
> Content-Type: text/plain; charset="utf-8"
>
> Albrecht,
>
> If you are using the home directory of the distribution, you need to edit
> the *start.ini* file and remove or comment out the line that enables the
> *jsp* module (line 107).
>
> As an aside, I'd recommend to looking into running your installation out of
> a Jetty base directory, leaving the home directory as a standard of truth.
> You can read about managing Jetty home and Jetty base at:
>
> https://www.eclipse.org/jetty/documentation/current/startup-base-and-home.html
> <https://www.eclipse.org/jetty/documentation/current/startup-base-and-home.html>
>
> Best,
> Chris