Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » What builds my webxml for my war-file(Export file for webserver)
What builds my webxml for my war-file [message #1793456] Wed, 08 August 2018 16:26 Go to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hello there,

I'm new and at least i got the example to work. I try to deploy the language server of xtext to my own jetty webserver. But it doesn't open and i figured out, that with export of "...web" the web.xml is missing. The usual way to create it doesn't work (found in google). I don't know what to do. I need this language Server out of eclipse

thanks, Mark
Re: What builds my webxml for my war-file [message #1793462 is a reply to message #1793456] Wed, 08 August 2018 17:19 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi

Do you use maven or grade
How did you create your war Project ?
What do you mean by "export"


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: What builds my webxml for my war-file [message #1793463 is a reply to message #1793462] Wed, 08 August 2018 17:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
And. What is the reasoning for the deployment. Can you elaborate on that.
Language servers usually run on the client e.g in a child process


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: What builds my webxml for my war-file [message #1793468 is a reply to message #1793463] Wed, 08 August 2018 18:23 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi there,
I use gradle and build the example. The reason is, i have to access it via a servlet from a requirement management tool (Polarion/ master thesis). It has to work without eclipse. I right click on the "web"-folder and could export a war file (without web.xml) and run it on my own webserver. Probably i will have more troubles in the next weeks but i want to start with this problem.
Re: What builds my webxml for my war-file [message #1793470 is a reply to message #1793468] Wed, 08 August 2018 18:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
a xtext language server is no web app. ist just an app. if you want something else you have to create that yourself. e.g. create a gradle war project (have a look what xtext create for xtext-web - but that one does not use language server at all) , create your servlet, etc

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: What builds my webxml for my war-file [message #1793471 is a reply to message #1793470] Wed, 08 August 2018 19:06 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
In the xtext- 5min example it's showed how to to start jetty webserver and access it via webbrowser. I want to do the same, but without eclipse. I don't find information for this. This works within eclipse. It uses the gradle-build script from the web-folder
Re: What builds my webxml for my war-file [message #1793474 is a reply to message #1793471] Wed, 08 August 2018 19:44 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
yes but this (WEB) is not LS(P)

(1) create new project
(2) deselect eclipse
(3) select web
(4) select gradle

(5) go to org.xtext.example.mydsl.parent
(6) ./gradlew clean build -x test (might need workaround for https://github.com/eclipse/xtext/issues/1231)
(7)go to org.xtext.example.mydsl.parent/org.xtext.example.mydsl.web/build/libs
(8) get a war
(9) drop it onto jetty
http://localhost:8080/org.xtext.example.mydsl.web-1.0.0-SNAPSHOT/

the servlet has @WebServlet thus i am not sure if you need a web.xml at all
https://stackoverflow.com/questions/29475426/which-is-better-to-use-in-professionally-web-xmldeployment-descriptor-or-web
=> you need a web xml? have a look at https://guides.gradle.org/building-java-web-applications/


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 08 August 2018 20:33]

Report message to a moderator

Re: What builds my webxml for my war-file [message #1793488 is a reply to message #1793474] Thu, 09 August 2018 06:35 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
It works...thanks alot. Somehow I'm too stupid to deploy on a web Server. With the deploy feature of the tomcat it works. manually copy not. First problem solved

Mark
Re: What builds my webxml for my war-file [message #1793506 is a reply to message #1793488] Thu, 09 August 2018 10:17 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
The next problem: Polarion wants a Eclipse PlugIn. When i choose Export ->Ecl.-Plugin i can't choose Web. So my intention is to modify the gradle script. But how?
the same functionality like in the war file in a eclipse plugin.
The struggle won't end the next weeks, i see.

Mark
Re: What builds my webxml for my war-file [message #1793508 is a reply to message #1793506] Thu, 09 August 2018 10:45 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
what do you exactly mean. you can choose gradle as build system or maven.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: What builds my webxml for my war-file [message #1793509 is a reply to message #1793508] Thu, 09 August 2018 10:59 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
My first intention was, that Polarion installs an Apache where I can deploy my language server. I tried first on a standalone Apache. But it also uses Eclipse as a background app and i have to deploy like a eclipse plugin. When I build it with Eport->PlugIn Development- ...and fragments, i get a very tiny file. The examples here in the company (they develop for Polarion but not with Xtext and without gradle. There are differences) are much bigger. I need much more files, what was in the war file i need in the Eclipse PlugIn too, and maybe other stuff. So my intention is to use the gradle build script which created me an war-file and modify it somehow to get this eclipse plugin.
For me it seems to be the simplest way, but...

thanks
Mark
Re: What builds my webxml for my war-file [message #1793510 is a reply to message #1793509] Thu, 09 August 2018 11:06 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
gradle is not used to build eclipse plugin.

and please dont use the term "language server" if you mean xtext in the web


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Xtext validation for custom terminal rules
Next Topic:Context aware grammar help
Goto Forum:
  


Current Time: Thu Apr 25 12:10:35 GMT 2024

Powered by FUDForum. Page generated in 0.03653 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top