• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Auto Registration

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[size=9][color=darkblue]Hi,

I am trying to integrate Jforum with our exisitng webapp. I have managed to get it working from within our webapp. I am now trying to add to net.jforum.view.forum.UserAction class so that when a user registers with the webapp they are automatically registered with JForum. I added the method "insertSaveAutoReg" which is similar to insertSave except that I ignore all captcha checks. this is because I want to register a user by providing just the username, password and email.

The insertSaveAutoReg method:
I added the following methods to the net.jforum.dao.generic.GenericUserDAO class
I have also added the following to WEB-INF\config\database\generic\generic_queries.sql
I wrote a test block to test this method:
This fails because DataAccessDriver.getInstance returns null.

I appreciate it if you guys can help.

Thanks in advance.

Profi[/size] [/color]
[originally posted on jforum.net by Proficianado]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, if you don't want to use captche, just disable it in the configuratio file.

Second, you should start all the JForum engine before doing any tests. Take a look in the code of JForumBaseServlet.java and JForum.java, specially in the parts related to DataAccessDriver and JForumExecutionContext.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rafael,

Thanks for your reply. I was stupid to overlook the captcha setting. But I am still having problems with initialising the Jforum engine. I have looked at the classes you have mentioned but I cannot seem to start the servlet engine from the test without the servlet being initialised without passing the ServletConfig, which is only inistialised when the servlet is invoked.

Any ideas?

Thanks again for your response.

Profi

P.S: BTW, this is an excellent piece of software and I am enjoying learning more about it. I am in the process of intgerating JForum to a struts app and am almost 75% there. I should be able to post my notes once I have completed the integration.




[originally posted on jforum.net by Proficianado]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look in the file tests/core/net/jforum/TestCaseUtils.java

Use that class and call the method loadEnvirontment()

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rafael,

Where can I get hold of the tests? I do not see a test folder in the source that I downloaded.

Thanks once again.

Profi
[originally posted on jforum.net by Proficianado]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Get it from the CVS - http://www.jforum.net/development.jsp

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rafael,

Thanks. I have downloaded the tests from cvs.

Prof

[originally posted on jforum.net by Proficianado]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have gone to the location specified and have signed up but i am still not able to find the project, i am seeing that a project request form but nothing else. I have also tried through CVS to get the project using the information on the above page and i get a guest user does not exist. I have also been asked for a password through WinCVS for the guest user.
Any thoughts on how i might get the source pulled down, i am most specifically interested in the TestCaseUtils.java

Susan
[originally posted on jforum.net by susan grandy]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, posted to soon. posted before i tried eclipse which likes the settings. thanks. Susan
[originally posted on jforum.net by susan grandy]
 
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic