B4J Tutorial [Server] Login System & Filters Tutorial

Discussion in 'B4J Tutorials' started by Erel, Mar 19, 2014.

  1. AscySoft

    AscySoft Active Member Licensed User

    Last edited: Jan 20, 2015
  2. tuicemen

    tuicemen Member Licensed User

    to be honest I only tried looking for one in the b4a libraries and it was the byteconverter I came up with xbyeconverter or something like that but never dug any deeper:rolleyes:
    Thanks:)
     
  3. tuicemen

    tuicemen Member Licensed User

    Ok new issue says can't find mysql-connector-java-5.1.27-bin.jar in the libraries folder however it is there
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Have you copied it to the additional libraries folder?
     
  5. tuicemen

    tuicemen Member Licensed User

    yes I even opened the folder to make sure it was there.
    maybe the sample download got corrupt.
    I'll attempt a new download.
    I redownloaded the mysql-connector-java-5.1.27-bin.jar and over wrote the other without success.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Can you post a screenshot of this error?
     
  7. tuicemen

    tuicemen Member Licensed User

    I did a refresh of the libraries and I notice it doesn't appear to the right
    I've redownloaded the sample and still the same results.
    is there another file that should be copied to the libraries folder too?(other then the jar)
     

    Attached Files:

  8. Erel

    Erel Administrator Staff Member Licensed User

    You should configure the additional libraries path under Tools - Configure Paths and put it out of Program Files as this is a restricted folder.

    Windows actually copied the file to a virtual folder so the IDE cannot find it.
     
  9. tuicemen

    tuicemen Member Licensed User

    Ok that makes sense
    I got the same error even with the path change. so I moved all B4j files.
    and now the error point to C\anywhere software\b4j\libraries :confused:
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    Hard to say. You need to check your configuration.
     
  11. tuicemen

    tuicemen Member Licensed User

    I've removed B4J and reinstalled to C:|anywhere software\b4j with the same results:confused:
    I think the issue is the mysql-connector-java-5.1.22-bin.jar file
    Originally I had read the manifest needed to be edited somewhere using 7zip (can't find that now):(
    Since I've redownloaded and over wrote the file those entries no longer exist so expect that is the issue.
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    Make sure that the file name exactly matches the AdditionalJar attribute (5.1.22 vs. 5.1.27).
     
  13. tuicemen

    tuicemen Member Licensed User

    Ah! that was it.:eek:
    I feel so stupid!:confused:
    good catch thanks!
     
  14. achtrade

    achtrade Active Member Licensed User

    Erel, where can I find this example for b4a ?
     
  15. Erel

    Erel Administrator Staff Member Licensed User

    This is a server solution implemented with B4J. There is no equivalent B4A example.
     
  16. Douglas Farias

    Douglas Farias Expert Licensed User

    @Erel can you change the code and add the new ReCaptcha ? https://developers.google.com/recaptcha/
    to use this example need make a new secret key and now its new system.

    i get only registerHelper: {"success":false,"errorMessage":"invalid-site-private-key"}
     
  17. BarryW

    BarryW Active Member Licensed User

    Hi.

    I tried to register and it works fine.

    Then i try to login and logout and it works fine.

    But, when i try to login then logout and i type this link: http://127.0.0.1:51042/login_example/members/index.html (link of members only)
    or pressed the browsers back button it opens the member page. Then after of some refresh it catches that i am already logout and i cant open the members page.

    Is this delay for page protection (filtering)? Somehow when i already logout and try to back on members page and i press the link (Example of a members only handler) it is not working.

    How to prevent this. Hope some will help. Tnx.
     
  18. Erel

    Erel Administrator Staff Member Licensed User

    There is no delay in the server side. The browser has probably showed you the cached page instead of reloading it.

    Try to add this line to the html file (inside the head section):
    Code:
    <HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
     
  19. JanPRO

    JanPRO Well-Known Member Licensed User

    Hi,

    I have a little question: Why you are using ajax POST requests for registering and sign in?

    For example for the sign in:
    Isn't it easier to read the values of the username and password inputs in the btnSign_Click event and check with the database?

    Jan
     
  20. Erel

    Erel Administrator Staff Member Licensed User

    This example was created before WebSocket handlers were available. It is easier to use WebSockets here.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice