GWT настройка встроенного сервера Jetty

Answered

Добрый день!

 

Я использую GWT 2.8.2 и gradle проект.

Несколько вопросов касательно GWT Run Configuration.

1) Как добавить свой сервер(Tomcat) в GWT Run Configuration?

2) Как настроить jndi параметры для встроенного сервера Jetty ?

3) Встроенный сервер Jetty не распознает опцию -Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true

А эта опция жизненно необходима.

Пробовал и в VM OPtions  устанавливать -Xmx512m -Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true

пробовал и в Environment variables JAVA_OPTS="-Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true"

 

Я использую.

IntelliJ IDEA 2019.2.4 (Ultimate Edition)
Build #IU-192.7142.36, built on October 29, 2019

Заранее спасибо.

0
6 comments

Would you please use English in community forums. Thanks.

>1) Как добавить свой сервер(Tomcat) в GWT Run Configuration?

GWT Run/Debug Configuration uses only embedded server. If you want to deploy application to a standalone Tomcat, use Tomcat run configuration and start GWT configuration with -noserver GWT option.

>2) Как настроить jndi параметры для встроенного сервера Jetty ?

Try approach from these threads https://stackoverflow.com/questions/28446115/setting-up-context-javacomp-env-in-jetty-running-inside-gwt-2-7/28513133
https://www.javacodegeeks.com/2012/04/setting-up-jndi-with-jetty-embedded.html

3) Встроенный сервер Jetty не распознает опцию -Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true

For the embedded Jetty to make sure the option is passed - you can check it in the very first line in Run(Debug) tool window when you launch the GWT run configuration.

0
Avatar
Permanently deleted user

>For the embedded Jetty to make sure the option is passed - you can check it in the very first line in Run(Debug) tool window when you launch the GWT >run configuration.

 

Ok I see option is passed on the first line of Run Window, but the is no effect of this option. Although then I'm doing the same thing for tomcat in Eclipse I see a effect.

0

You can try printing this option from code that runs on a Jetty to verify if it is honoured. If you see the expected output the problem must be in something else.

Verify also other parameters like Java, GWT version used.

0
Avatar
Permanently deleted user

Ok. I was able to solve this issue adding one more vm param.

 

-Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true -Djavax.net.ssl.trustStore="C:/Program Files/Java/jre1.8.0_211/lib/security/cacerts"

 

But I can't undrestand why in Eclipse+Tomcat it was working with only  -Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true

0

Looks like different Java was used that does not have the needed certificate imported into keystore.

0
Avatar
Permanently deleted user

>Looks like different Java was used that does not have the needed certificate imported into keystore.

I've used the same Java from the same location both on Eclipse and IDEA

0

Please sign in to leave a comment.