how to reconfigure my app so that it runs without "context" in the uri path

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to reconfigure my app so that it runs without "context" in the uri path

Joshua Richardson
Hi, I'm looking to build an app using Tapestry.  I'm able to run the Quickstart 5.4 app and then I see my app by going to localhost:8080/site/, because I configured my project with the name, "site".


Since I do not intend to ever run any other apps on this same server/port, I would like to avoid the "/site/" portion of the url.


I have not been able to figure out how to reconfigure the app so that I can access it at the top level.  If i go to localhost:8080/, I get a 404, "No context on this server matched or handled this request."


Is this a limitation of Tapestry, or just a limitation in my understanding?


Sincerely,



Joshua Richardson

Email:   [hidden email]

Phone: 408-205-4417

Skype:  jricjr

In:         https://www.linkedin.com/in/joshua-richardson-878b8b1/
Reply | Threaded
Open this post in threaded view
|

Re: how to reconfigure my app so that it runs without "context" in the uri path

Mats Andersson-2
Hi Joshua,

It depends only on the container you are using to deploy the Tapestry
application. This is not different from any other Java application. If
you use Tomcat, see:
https://stackoverflow.com/questions/7276989/how-to-set-the-context-path-of-a-web-application-in-tomcat-7-0

Best regards
Mats

Den 2017-08-28 kl. 06:50, skrev Joshua Richardson:

> Hi, I'm looking to build an app using Tapestry.  I'm able to run the Quickstart 5.4 app and then I see my app by going to localhost:8080/site/, because I configured my project with the name, "site".
>
>
> Since I do not intend to ever run any other apps on this same server/port, I would like to avoid the "/site/" portion of the url.
>
>
> I have not been able to figure out how to reconfigure the app so that I can access it at the top level.  If i go to localhost:8080/, I get a 404, "No context on this server matched or handled this request."
>
>
> Is this a limitation of Tapestry, or just a limitation in my understanding?
>
>
> Sincerely,
>
>
>
> Joshua Richardson
>
> Email:   [hidden email]
>
> Phone: 408-205-4417
>
> Skype:  jricjr
>
> In:         https://www.linkedin.com/in/joshua-richardson-878b8b1/
>

--
---------------------- Mats Andersson | Ronsoft AB | +46(0)73 368 79 82

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: how to reconfigure my app so that it runs without "context" in the uri path

Svein
<plugin>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>9.3.10.v20160621</version>
    <configuration>
        <webApp>
            <contextPath>/</contextPath>
        </webApp>

       <httpConnector>
          <port>80</port>
       </httpConnector>
    </configuration>
</plugin>


From: Mats Andersson-2 [via Apache Tapestry Mailing List Archives] [mailto:[hidden email]]
Sent: mandag 28. august 2017 07:31
To: Svein-Erik L√łken <[hidden email]>
Subject: Re: how to reconfigure my app so that it runs without "context" in the uri path

Hi Joshua,

It depends only on the container you are using to deploy the Tapestry
application. This is not different from any other Java application. If
you use Tomcat, see:
https://stackoverflow.com/questions/7276989/how-to-set-the-context-path-of-a-web-application-in-tomcat-7-0

Best regards
Mats

Den 2017-08-28 kl. 06:50, skrev Joshua Richardson:

> Hi, I'm looking to build an app using Tapestry.  I'm able to run the Quickstart 5.4 app and then I see my app by going to localhost:8080/site/, because I configured my project with the name, "site".
>
>
> Since I do not intend to ever run any other apps on this same server/port, I would like to avoid the "/site/" portion of the url.
>
>
> I have not been able to figure out how to reconfigure the app so that I can access it at the top level.  If i go to localhost:8080/, I get a 404, "No context on this server matched or handled this request."
>
>
> Is this a limitation of Tapestry, or just a limitation in my understanding?
>
>
> Sincerely,
>
>
>
> Joshua Richardson
>
> Email:   [hidden email]</user/SendEmail.jtp?type=node&node=5733590&i=0>
>
> Phone: 408-205-4417
>
> Skype:  jricjr
>
> In:         https://www.linkedin.com/in/joshua-richardson-878b8b1/
>

--
---------------------- Mats Andersson | Ronsoft AB | +46(0)73 368 79 82

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]</user/SendEmail.jtp?type=node&node=5733590&i=1>
For additional commands, e-mail: [hidden email]</user/SendEmail.jtp?type=node&node=5733590&i=2>


________________________________
If you reply to this email, your message will be added to the discussion below:
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/how-to-reconfigure-my-app-so-that-it-runs-without-context-in-the-uri-path-tp5733589p5733590.html
To unsubscribe from [hidden email]<mailto:[hidden email]> Mailing List Archives, click here<
NAML<
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
Reply | Threaded
Open this post in threaded view
|

Re: how to reconfigure my app so that it runs without "context" in the uri path

Joshua Richardson
Hi Guys, thank you for both answers, which were useful.


In case anyone else runs into similar issue and finds this thread in the archives, I'll note that I ended up needing to replace the maven-jetty-plugin in the pom.xml with the jetty-maven-plugin (much newer version), configured as shown by Svein, but I also added:


    <systemProperties>

      <systemProperty>

        <name>tapestry.execution-mode</name>

        <value>development</value>

      </systemProperty>

    </systemProperties>


to match the old plugin configuration.  Finally, I needed to run "mvn jetty:run" with sudo on my mac, otherwise it failed to bind to port 80, although I'm exploring another way to do it with https://github.com/Castaglia/MacOSX-authbind.


Sincerely,



Joshua Richardson

Email:   [hidden email]

Skype:  jricjr

In:         https://www.linkedin.com/in/joshua-richardson-878b8b1/
Reply | Threaded
Open this post in threaded view
|

RE: how to reconfigure my app so that it runs without "context" in the uri path

Svein
Command line in IntelliJ, maven:
jetty:run -Duser.timezone=UTC -Dtapestry.execution-mode=development -Dtapestry-web-server-port=8888

Maybe it's easier to start with this project: https://github.com/sveine/tapestry-multi-module-demo.