Announcement

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

    SGWT application not forwarding from html to sgwt application

    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 HTMLpage which presents the login page and then if the credential is correct I forward it to my main sgwt application's HTML page.
    Locally it is working, I mean in dev mode. But when I setup it on the Tomcat, I get to see the login page but then I get to see only a blank page. Can somebody please help me analysis why this is happening or what I am missing out.
    The configuration.properties file for dev mode looks like so,
    Code:
    app.landingpage.url=http://127.0.0.1:8889/KaiBe.html?gwt.codesvr=127.0.0.1:9997
    app.loginpage.url=http://127.0.0.1:8889/login.html
    and the Tomcat version I change to this

    Code:
    app.landingpage.url=http://localhost:8080/KaiBe/KaiBe.html
    app.loginpage.url=http://localhost:8080/KaiBe/login.html
    Little background as to what I have done.

    I have a simple HTML file which forwards the page to a servlet,like so
    Code:
     <form method="post" action="loginApp">
    web.xml contains the servlet definition

    Code:
    <servlet>
    		<servlet-name>AppLoginServlet</servlet-name>
    		<servlet-class>com.beh.server.login.LoginServlet</servlet-class>
    	</servlet>
    	<servlet-mapping>
    		<servlet-name>AppLoginServlet</servlet-name>
    		<url-pattern>/loginApp</url-pattern>
    	</servlet-mapping>
    I have also attached my LoginServlet.java file.

    cheers
    Zolf
    Attached Files

    #2
    You mention arriving at a blank page - so from there, start gathering standard diagnostics as listed in the FAQ.

    No one can really help when the only information you provide is "blank page".

    Comment


      #3
      By the way s this the standard way to go with sgwt for login and relogin

      Comment


        #4
        There is no "standard way" since authentication systems are too varied. But your overall approach is in line with the recommendations in the QuickStart Guide, Authentication and Relogin sections.

        Comment


          #5
          Hi zaj,
          Originally posted by zaj View Post
          By the way s this the standard way to go with sgwt for login and relogin
          this entry in Isomorphic's wiki might also be interesting for you.

          Best regards
          Blama

          Comment


            #6
            Hi Blama,

            Thanks for your feedback.

            Comment


              #7
              OK, after analyzing my code I cam eot know that for some reason the getLandingPageURL is returning NULL value in my TOMCAT log. It seems tha application is not able to access the configuration.properties file.Can somebody help me in this matter.

              Code:
               
              // Credential are correct!!
              		if (authenticUser)
              		{
              			System.out.println("Credential are correct!!!!!!!!!!!!");
              			if (newLoginRequest)
              			{				
              				System.out.println("getLandingPageURL "+ConfigUtils.getInstance().getLandingPageURL());
              				
              				session.setAttribute("sessionId", request.getSession().getId());
              				response.sendRedirect(ConfigUtils.getInstance().getLandingPageURL());
              			}
              			else
              			{
              				System.out.println("NEW Login Request is FALSEEEE!!!!!!!!!!!!");
              			}
              		}
              		else
              		{
              			
              			System.out.println("Credential are NOOOOOOOOT correct!!!!!!!!!!!!");			
              			request.getSession().invalidate();
              			System.out.println(" getLoginURL!!!!!!!!!!!!!!!!!!!! "+ConfigUtils.getInstance().getLoginURL());
              			response.sendRedirect(ConfigUtils.getInstance().getLoginURL());
              		}
              
              		out.close();

              Comment

              Working...
              X