Skip to main content



      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 12:26 Go to next message
Eclipse UserFriend
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 13:19 Go to previous messageGo to next message
Eclipse UserFriend
hi

Do you use maven or grade
How did you create your war Project ?
What do you mean by "export"
Re: What builds my webxml for my war-file [message #1793463 is a reply to message #1793462] Wed, 08 August 2018 13:33 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: What builds my webxml for my war-file [message #1793468 is a reply to message #1793463] Wed, 08 August 2018 14:23 Go to previous messageGo to next message
Eclipse UserFriend
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 14:51 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: What builds my webxml for my war-file [message #1793471 is a reply to message #1793470] Wed, 08 August 2018 15:06 Go to previous messageGo to next message
Eclipse UserFriend
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 15:44 Go to previous messageGo to next message
Eclipse UserFriend
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/

[Updated on: Wed, 08 August 2018 16:33] by Moderator

Re: What builds my webxml for my war-file [message #1793488 is a reply to message #1793474] Thu, 09 August 2018 02:35 Go to previous messageGo to next message
Eclipse UserFriend
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 06:17 Go to previous messageGo to next message
Eclipse UserFriend
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 06:45 Go to previous messageGo to next message
Eclipse UserFriend
what do you exactly mean. you can choose gradle as build system or maven.
Re: What builds my webxml for my war-file [message #1793509 is a reply to message #1793508] Thu, 09 August 2018 06:59 Go to previous messageGo to next message
Eclipse UserFriend
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 07:06 Go to previous message
Eclipse UserFriend
gradle is not used to build eclipse plugin.

and please dont use the term "language server" if you mean xtext in the web
Previous Topic:Xtext validation for custom terminal rules
Next Topic:Context aware grammar help
Goto Forum:
  


Current Time: Mon Jun 23 15:46:50 EDT 2025

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

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

Back to the top