Announcement Announcement Module
Collapse
No announcement yet.
Changing th URL of a Deployed GWT Application Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing th URL of a Deployed GWT Application

    Dear Sirs et Madames,
    I have created a Roo GWT application and deployed it on Tomcat. however on the browser, the URL is unwieldy: htp://localhost:8082/gwttest-0.1.0.BUILD-SNAPSHOT/ApplicationScaffold.html

    Is there any way of replacing the gwttest-0.1.0.BUILD-SNAPSHOT part with something more user friendly for humans to type into the URL?

    Thanks in advance,

  • #2
    What if you configure the Maven WAR plugin (in your POM) to set the "warName" property to the more friendly name?

    Comment


    • #3
      Thanks Andrew. I have changed my pom like so:
      Code:
                 <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-war-plugin</artifactId>
                      <version>2.1.1</version>
      		<warName>app</warName>				
      
                  </plugin>
      But when I run
      Code:
      >mvn jetty:run-exploded
      I get
      Code:
      C:\Users\Sir Tumaini Kilimba\Desktop\Generic Application\GWT Test>mvn jetty:run-
      exploded
      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error building POM (may not be this project's POM).
      
      
      Project ID: unknown
      POM Location: C:\Users\...\Desktop\Generic Application\GWT Test\
      pom.xml
      
      Reason: Parse error reading POM. Reason: Unrecognised tag: 'warName' (position:
      START_TAG seen ...</version>\n\t\t\t\t<warName>... @382:14)  for project unknown
       at C:\Users\...\Desktop\Generic Application\GWT Test\pom.xml
      
      
      [INFO] ------------------------------------------------------------------------
      Any help deeply appreciated

      Comment


      • #4
        Originally posted by BlakkPhoenixx View Post
        I have changed my pom like so:
        Code:
                   <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.1.1</version>
                <warName>app</warName>                
        
                    </plugin>
        You need to wrap that parameter in a "configuration" tag like so:

        Code:
        <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-war-plugin</artifactId>
             <version>2.1.1</version>
             <configuration>
                 <warName>app</warName>                
             </configuration>
        </plugin>
        This is the style used by most Maven plugins. If you don't know Maven so well, it would really be worth your while getting a solid foundation in it, e.g. by reading some of the free on-line books from Sonatype.

        Comment

        Working...
        X