Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Create a jar/war file in xtext with websupport(Create a jar/war file in xtext with websupport)
Create a jar/war file in xtext with websupport [message #1858369] Fri, 31 March 2023 07:54 Go to next message
z232 I is currently offline z232 IFriend
Messages: 48
Registered: February 2016
Member
Hi there,

I have created the 5 minutes Xtext example with web support.
I can run it from the windows terminal with the command "gradlew jettyRun".
The example is working as expected, by opening the browser in localhost:8080.
The question is:
Is there any jar/war file(for this single project) automatically produced by gradle, that i can use to run it in an apache server( tomcat for example)?

Thanks
Re: Create a jar/war file in xtext with websupport [message #1858376 is a reply to message #1858369] Fri, 31 March 2023 08:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
Am not sure If I get you
In a Server you typically want to create a war
The new Xtext project wizard should already create everything needed


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com

[Updated on: Fri, 31 March 2023 08:30]

Report message to a moderator

Re: Create a jar/war file in xtext with websupport [message #1858382 is a reply to message #1858376] Fri, 31 March 2023 11:34 Go to previous messageGo to next message
z232 I is currently offline z232 IFriend
Messages: 48
Registered: February 2016
Member
Hi Christian,

so you mean that a war file is already produced after building the project with Gradle. I have searched in the folder project and found in the build forlder a war file (something like snapshot~1.war) but it is a few Kilobytes in size.
Also i build another xtext project with a filesize above 50MB, and the extracted war file is also a few KB.
Is this the correct war file that i am looking for the tomcat server?
Could you please correct me if i am wrong?

Bests
Re: Create a jar/war file in xtext with websupport [message #1858388 is a reply to message #1858382] Fri, 31 March 2023 12:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
Yes but it should be more than a few kb
(With wizard no changes it is 25mb )
Gradlew clean build
The Filename is
org.xtext.example.mydsl.web-1.00-SNAPSHOT.war


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com

[Updated on: Fri, 31 March 2023 12:38]

Report message to a moderator

Re: Create a jar/war file in xtext with websupport [message #1858394 is a reply to message #1858388] Fri, 31 March 2023 15:36 Go to previous messageGo to next message
z232 I is currently offline z232 IFriend
Messages: 48
Registered: February 2016
Member
Yes you are right,

after clean build i get "org.xtext.example.mydsl.web-1.0.0-SNAPSHOT.war" with a size of 25MB. (That's the 5 minutes project from xtext web site)
The think is that after deploying the war file in tomcat as shown in picture below
https://ibb.co/3YzT3GV

i get an HTTP status 404 - not found
https://ibb.co/QHk6X8S

the tomcat service is running on port 8080
Are there some dependencies missing or this approach is totally wrong ?

Re: Create a jar/war file in xtext with websupport [message #1858396 is a reply to message #1858394] Fri, 31 March 2023 15:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
I don't see any picture
The question is that the default url for tomcat is
When you deploy a war


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Create a jar/war file in xtext with websupport [message #1858397 is a reply to message #1858396] Fri, 31 March 2023 16:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
http://localhost:8080/org.xtext.example.mydsl.web-1.0.0-SNAPSHOT/ at least seems to show the editor
besides that you may have to check logs and or remote debug to see what is happening


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Create a jar/war file in xtext with websupport [message #1858398 is a reply to message #1858397] Fri, 31 March 2023 16:49 Go to previous message
z232 I is currently offline z232 IFriend
Messages: 48
Registered: February 2016
Member
Thanks Christian,

for some reason the server was't responding.
After a restart, everything seems to work ok !!!
Bests
Previous Topic:The annotation CheckType.NORMAL does not work
Next Topic:Xtext tracing
Goto Forum:
  


Current Time: Wed Dec 11 06:41:54 GMT 2024

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

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

Back to the top