Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7975599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:41:17+00:00 2026-06-04T08:41:17+00:00

i’ve encountered an issue on GWT codeserver parameter in a simple scenario below, Project

  • 0

i’ve encountered an issue on GWT codeserver parameter in a simple scenario below,

Project structure

myapp
+src
++mypkg
---MainWindow.gwt.xml
---NextWindow.gwt.xml
+++client
----MainWindow.java
----NextWindow.java
+war
--MainWindow.html
--NextWindow.html

MainWindow.gwt.xml

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='mainwindow'>
  <inherits name='com.google.gwt.user.User'/>
  <entry-point class='mypkg.client.Mainwindow'/>
  <source path='client'/>
</module>

MainWindow.java

package mypkg.client;

import com.google.gwt.core.client.*;
import com.google.gwt.event.dom.client.*;
import com.google.gwt.user.client.ui.*;

public class MainWindow implements EntryPoint {
    @Override
    public void onModuleLoad() {
        Button button = new Button("NextWindow!");
        button.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                Window.open("/NextWindow.html", null, null);
            }
        });
        RootPanel.get().add(button);
    }
}

MainWindow.html

<!doctype html>      
<html>
<head>
<title>MainWindow</title>  
<script type="text/javascript" language="javascript"
    src="mainwindow/mainwindow.nocache.js"></script>
</head>  
<body>
    <h1>Hi, MainWindow!</h1>   
</body>
</html>

NextWindow.gwt.xml

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='nextwindow'>
  <inherits name='com.google.gwt.user.User'/>
  <entry-point class='mypkg.client.NextWindow'/>
  <source path='client'/>
</module>

NextWindow.java

package mypkg.client;

import com.google.gwt.core.client.*;
import com.google.gwt.user.client.ui.*;

public class NextWindow implements EntryPoint {    
    @Override
    public void onModuleLoad() {
        RootPanel.get().add(new Label("Hi, NewLabel!"));
    }
}

NextWindow.html

<!doctype html>      
<html>
<head>
<title>NextWindow</title>  
<script type="text/javascript" language="javascript"
    src="nextwindow/nextwindow.nocache.js"></script>
</head>  
<body>
    <h1>Hi, NextWindow!</h1>   
</body>
</html>

On Devmode launch the compiled myapp from the link,

http://127.0.0.1:8888/MainWindow.html?gwt.codesvr=127.0.0.1:9997

Click on button “NextWindow” then GWT browser plugin pops up a complaint window,

Module NextWindow need be (re)compiled!

Confirm it then a new browser window is open from the link on Prodmode,

http://127.0.0.1:8888/NextWindow.html

instead of the desired link on Devmode,

http://127.0.0.1:8888/NextWindow.html?gwt.codesvr=127.0.0.1:9997

Consequently it displays only,

Hi, NextWindow!

But the very anticipated content below doesn’t show up,

Hi, NewLabel!

If we trail GWT codeserver parameter ?gwt.codesvr=127.0.0.1:9997 to the source code, the problem could be solved by sacrificing the consistency on source level between Devmode and Prodmode.

What are the preferable solutions indeed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:41:19+00:00Added an answer on June 4, 2026 at 8:41 am

    You can use if(GWT.isProdMode()) to check for Prodmode and Devmode, and trail the parameter if it is devmode.

    That doesn’t affect production mode – the gwt compiler is smart enough to just ignore devmode-code, so the devmode-block never makes it into the compiled javascript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
I'm making a simple page using Google Maps API 3. My first. One marker
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.