Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Testing application in eclipse and dev mode

    Hello there,

    I am using SmartClient Version: v10.0p_2015-07-08/PowerEdition Deployment (built 2015-07-08) along with FF26.

    I have a simple html login page and then after successful login I forward the user to the sgwt main html page. Now my question is in eclipse when I want do my testing and right click on my project and select Run as -- Web application,eclipse provides me with 2 html file. the simple login html page and the sgwt html page. Now i want to know which one should i go for or it makes no difference. Can somebody please explain this to me.

    cheers
    Zolf

    #2
    We're not sure why your login page even appears in that menu. If you follow the advice in the QuickStart Guide, the login page will not be based on SmartGWT or GWT at all.

    Comment


      #3
      thanks for your comments. It is confusing to me,why it shows me two files to choose from and so I want to ask the experts for advise.Please see attachment.

      >>the login page will not be based on SmartGWT or GWT at all.
      What do you mean??
      Attached Files

      Comment


        #4
        Please re-read the QuickStart section on Authentication and Relogin - you will see a clear explanation of why the login page should not be built with GWT / SmartGWT.

        Comment


          #5
          After reading that article I decided to use a simple html page for login and then after successful login sgwt html takes over.My login page is a simple html file, like so

          Code:
          <!DOCTYPE html>
          <!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
          <!--[if IE 7]> <html class="lt-ie9 lt-ie8" lang="en"> <![endif]-->
          <!--[if IE 8]> <html class="lt-ie9" lang="en"> <![endif]-->
          <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
          <head>
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
            <title>Login Form</title>
            <link type="text/css" rel="stylesheet" href="css/login.css">
            <!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
          </head>
          <body>
            <section class="container">
              <div class="login">
                <form method="post" action="loginApp">
          	   <table>
          	        <tr>
          			   <td>
          			   </td>
          			   <td class="logo">
          			    <img src="images/pieces/logo_demo.png" /> 
          			   </td>
          			</tr>
          	        <tr>
          			<td>
          			 </td>
          			  <!-- <td><h1>Login</h1></td> -->
          			</tr>
                      <tr>
                          <td class="formLabel" nowrap>User Name</td><td><input type="text" name="user_name" value="" placeholder="Username">
                          </td>
                      </tr>
                      <tr>
                          <td class="formLabel" nowrap>Password</td><td><input type="password" name="user_password" value="" placeholder="Password">
                          </td>
                      </tr>
                      <tr>
          			   <td>
          			   </td>
                          <td>
                              <input type="submit" name="commit" value="Login">
                          </td>
                      </tr>
                  </table>
                </form>
              </div>
          
              <div class="login-help">
              </div>
            </section>
          </body>
          </html>

          Comment


            #6
            Hi zaj,

            I do the following:
            1. Build and deploy to Tomcat
            2. Start Tomcat in Debug Mode from Eclipse
            3. Start main java file in Dev Mode
            4. Get a :8080-URL to my HTML/JSP file with gwt-query string in Eclipse Dev Mode Tab
            5. Open that URL
            6. Get redirected to login screen (simple HTML/JSP page, no SmartGWT, almost no JS)
            7. Login
            8. Get redirected to GWT App in Dev Mode


            Best regards
            Blama
            Last edited by Blama; 26 Aug 2015, 02:19.

            Comment


              #7
              Blama, you are a blessing for me in this forum!!Appreciate your suggestions and feedbacks...

              Can you please tell me more about the point 1. How you do that. Do you mean you create a war file every changes you make to your code and then deploy on Tomcat for testing or I have misunderstood you...

              Comment


                #8
                Hi zaj,

                :) Happy to hear that.

                Yes, I meant war+deploy, but this is only necessary if also server side DMI code changes.
                If only client code is affected for a change, either a Browser F5-Reload or steps starting with 3. are sufficient.
                Also .ds.xml changes don't need a redeploy or server restart - I have an Ant task that just copies the .ds.xml from my source directory to Tomcat's webapp-ds directory. Then also a Browser F5-Reload is enough to get the new code.

                For server code I did not find out yet what makes a server restart or undeploy-war-deploy powercycle necessary.

                Best regards
                Blama

                Comment


                  #9
                  Thanks for your help,let me try to mimic your instructions!!

                  Comment


                    #10
                    Hi Blama,

                    Can you please tell me how you Start Tomcat in Debug Mode from Eclipse.
                    Another question I have is you use TOmcat or dev mode for testing/debugging your application in development??

                    Comment

                    Working...
                    X