CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Receiving userid & password from external form

Print topic Send  topic

Author Message
Alfred

Posts: 4
Posted: 01/28/2005, 12:10 AM

Hello,
I'm working on a project based on different application and I receive from other web program a form containing two parameters: userid & password.

How can I take them and make control on my login table?

I'm using CCS 2.3 (Java) on Tomcat 4.x server and MySQL database .

Thank you in advance

Alfred
View profile  Send private message
mrachow


Posts: 509
Posted: 01/28/2005, 1:58 AM

What I would try ...

Add the action Login on an usual event on your page.
If you store the values you get into hidden fields for example you can use this action as is, e.g. select the both fields for the properties.

If you handle your userid and password in a different way you can take this code (copy it away), remove the saction and insert the copied code into a custom event and adopt it to your needs.
_________________
Best regards,
Michael
View profile  Send private message
Alfred

Posts: 4
Posted: 01/29/2005, 1:48 AM

Thanks for your suggestion Michael,

unfortunatly I can't get your code as in your message, can you please resend it?

Regards,
Alfred :-)
View profile  Send private message
mrachow


Posts: 509
Posted: 01/29/2005, 1:13 PM

So sorry Alfred,

I was talking about the code which is generated by selection the action Login (this was this :-)).

For me it is like follows (login and password are the names of the textboxes)
com.codecharge.util.Authenticator auth = com.codecharge.util.AuthenticatorFactory.getAuthenticator( e.getPage().getRequest() );  
auth.setRequest( e.getPage().getRequest() );  
auth.setResponse( e.getPage().getResponse() );  
auth.invalidate();  
if ( auth.authenticate( e.getComponent().getControl("login").getFormattedValue(), e.getComponent().getControl("password").getFormattedValue() ) ) {  
String retLink = e.getPage().getHttpGetParams().getParameter("ret_link");  
if (retLink != null) e.getPage().setRedirectString( retLink );  
} else {  
e.getParent().addError("Name oder Passwort falsch.");  
e.getPage().setRedirectString( null );  
e.getComponent().getControl("password").setFormattedValue("");  
}  

_________________
Best regards,
Michael
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.