Probably i didin't explain my problem clearly....
I am having my project and roller as separate applications in webapps of
tomcat. Now whenever a user registers for my site i need to insert the same
user credentials into roller database(rolleruser table). Is there any way of
doing this??? I am trying to do it by creating a new method in Register.java
of org.apache.roller.weblogger.ui.struts2.core package. I am planning to
call that method by using URL,URLConnection of java.net package in the
following way
String data = URLEncoder.encode("username", "UTF-8") + "=" +
URLEncoder.encode("somex", "UTF-8");
data += "&" + URLEncoder.encode("password", "UTF-8") + "=" +
URLEncoder.encode("somex", "UTF-8");
data += "&" + URLEncoder.encode("fullName", "UTF-8") + "=" +
URLEncoder.encode("somex", "UTF-8");
data += "&" + URLEncoder.encode("email", "UTF-8") + "=" +
URLEncoder.encode("[EMAIL PROTECTED]", "UTF-8");
data += "&" + URLEncoder.encode("locale", "UTF-8") + "=" +
URLEncoder.encode("English(United States)", "UTF-8");
data += "&" + URLEncoder.encode("timeZone", "UTF-8") + "=" +
URLEncoder.encode("America/Jamaica", "UTF-8");
// Send data
URL url=new
URL("http://localhost:8080/roller/roller-ui/register!custom.rol");
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter wr = new
OutputStreamWriter(conn.getOutputStream());
wr.write(data);
wr.flush();
In that method i will be getting the parameters from the url using
request.getParameter() ,creating a User object and setting the required
fields with the obtained values from url then call the addUser() of
UserManager passing the User object as parameter. Is this the right way to
do??? or is there any easy way of doing this. Please advise me...
Thanks
Kranthi
Hi,
How can i insert the user registration details from an external
application. I have gone through the forum's previous questions and found
something called groovy. If groovy can be useful for this task ..please
suggest me how to use it.....
Thanks
Kranthi
kranthi kumar wrote:
>
> Hi,
> How can i insert the user registration details from an external
> application. I have gone through the forum's previous questions and found
> something called groovy. If groovy can be useful for this task ..please
> suggest me how to use it.....
> Thanks
> Kranthi
>
--
View this message in context:
http://www.nabble.com/inserting-the-user-details-from-external-application-tp20416391s12275p20438485.html
Sent from the Roller - Dev mailing list archive at Nabble.com.