gwt - WARNING: /%3C%=request.getContextPath()%%3E/trailpath/trailpath.nocache.js: java.lang.NumberFormatException: =r -


i giving code. client

 package a.b.client;  public class trail implements entrypoint{  button b=new button("click"); flowpanel fs=new flowpanel();  int i=0; private final trailinterfaceasync obj = gwt         .create(trailinterface.class); @override public void onmoduleload() {     rootpanel.get().add(b);     rootpanel.get().add(fs);     b.addclickhandler(new clickhandler(){          @override         public void onclick(clickevent event) {             obj.getdetails(new asynccallback<arraylist<string>>(){                  @override                 public void onfailure(throwable caught) {                     // todo auto-generated method stub                  }                  @override                 public void onsuccess(arraylist<string> result) {                      try{                     system.out.println("size:"+result.size());                     for(i=1;i<=result.size()-1;i++)                     {                         html l=new html(result.get(i).tostring());                          fs.add(l);                     }                     }                     catch(exception e)                     {                         e.printstacktrace();                     }                  }});          }});  }  } 

server

package a.b.server; import a.b.client.trailinterface; import com.google.gwt.user.server.rpc.remoteserviceservlet;   public class trailimpl extends remoteserviceservlet implements trailinterface {  /**  *   */ private static final long serialversionuid = 1l;  @override public arraylist<string> getdetails() {     connection con;     statement stmt;     resultset resultset;     arraylist<string> details=new arraylist<string>();  try {     system.setsecuritymanager(null);     class.forname("com.mysql.jdbc.driver");      con = drivermanager               .getconnection("jdbc:mysql://69.162.121.114:3306/ayushcaredb?"                   + "user=xxxxx&password=yyyyyy");     if(con!=null)         system.out.println("success!");         else             system.out.println("fail!");       stmt = con.createstatement();           // result set result of sql query           resultset = stmt.executequery("select * locationtable");           while(resultset.next())           {              details.add(resultset.getstring(1));           } } catch(exception e) {     e.printstacktrace(); }  return details;  }  } 

web.xml

  <!-- servlets -->  <servlet> <servlet-name>trailimpl</servlet-name> <servlet-class>a.b.server.trailimpl</servlet-class>  </servlet>   <servlet-mapping> <servlet-name>trailimpl</servlet-name> <url-pattern>/trailpath/trail</url-pattern>  </servlet-mapping>  <!-- default page serve --> <welcome-file-list> <welcome-file>trail.html</welcome-file> 

when did run as-web application showing error this:

jul 18, 2013 5:02:09 pm com.google.apphosting.utils.jetty.jettylogger warn warning: /%3c%=request.getcontextpath()%%3e/trailpath/trailpath.nocache.js:     java.lang.numberformatexception: =r 

i couldn't understand come from? please me.

as tried deploy simple gwt project in tomcat while working before(suddenly showing above error).i didn't change thing now. getting above error. while working, got fallowing error in post. have use gwt.gethostpagebaseurl() or gwt.gethostpagebaseurl() method in code. dont have redirection other pages hear. couldn't found solution this.

post:how deploy gwt app tomcat

at first sight, i'd you're referencing trailing.nocache.js files trail.html page using jsp syntax, trail.html not evaluated jsp server (by default, *.jsp files treated jsp).

the numberformatexception: =r comes server when evaluating url (%3c%=request) expects %=r (from %=request) evaluate url escape. numberformatexception comes trying parse =r hexadecimal number.

solution: remove jsp syntax trail.html page, or change page evaluated jsp (e.g. rename trail.jsp)


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -