Start a form from JSP

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

Start a form from JSP

#1

Postby dvanhussel » Tue May 07, 2013 10:47 am

Hi,

I'm implementing a connection with Ogone (a payment provider). This service needs a webpage it can call to update paymentstatus. This can be days later then when the payment was started by the user. The status of the payment is send in several url parameters.

I want this webpage to be an Ebase form. But unfortunately it doesn't work. That's because Ogone sends 1 request (post or get) to the page. It doesn't handle the default page reload of Ebase checking the browser capability's.
So, the script that is defined as before form script, is not run.

Is there a way to prevent this reload from happening?

Or is it possible to start a form from a JSP page without user interaction, like from the Ebase Scheduler? Then Ogone calls the JSP, which collect's the url parameters and then invokes the form to handle these parameters.

I could not find this in the documentation of Ebase.

Of course, any other solution for this problem is welcome as well :D

Regards,

David
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Tue May 07, 2013 3:37 pm

David,

I guess the best solution would be to set up an Integration Service and have Ogone call this. But this might not be an option.

Other alternatives are:

1. Disable the browser check mechanism (Ufs.skipBrowserAttributesCheck= true in UFSSetup.properties). Though then the system won't be able to detect clients with Javascript disabled, and it won't know the browser type, which can give problems with IE6/7 and menus. To get around these problems, you could set up a separate web app with this option and just use it for these Ogone calls.

2. You could use the batch system as a means of running a form (just the before form event) from a JSP. This doesn't support tables, and it's an old piece of functionality but it should work. To get this working, you would need to create an XML document in your JSP containing the form name and any input data, and then call the batch system servlet. See batch documentation (under Advanced Topics on the documentation main index page).

3. Save the data in your JSP to the database. Then have a scheduled form that wakes up at fixed intervals and processes it.

I think I would prefer option 1 or 3.

Regards
Jon
0 x

User avatar
jig
Ebase User
Posts: 30
Joined: Sun Oct 09, 2011 10:16 am
Location: UK

#3

Postby jig » Tue May 07, 2013 4:33 pm

Hi David,

You can always disable Ebase browser check by using 'Ufs.skipBrowserAttributesCheck' property. We have done something similar in one of our projects where we have a .html page passing data into a Ebase form using "post" method.

With regards to the JSP invoking the URL, if the JSP is invoked programmatically (without browser), it will be the same issue as above as Ebase will run the 'browser check' first.

Ebase offers several options to invoke the scheduler. Have a look at http://dev-docs.verj.io/ufs/doc/scheduler.htm

According to me, disabling 'browser check' would be the easiest option. If you can't then you can always look at the JSP option :)

Hope this helps!

Regards
Jignesh
0 x
Regards,
Jignesh

Jignesh Vaducha, MSc, MCA
Mobile: +44 (0) 77 325 47 112
Telephone: +44 (0) 1462 488 311
Email: jignesh@schnellsolutions.com

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

#4

Postby dvanhussel » Tue May 07, 2013 9:06 pm

Hi Jon and Jignesh,

Thanks for your suggestions! As far as I know, 'Ufs.skipBrowserAttributesCheck' is a setting for the whole server, we need it for our other forms. Is this correct?

I will look into the JSP/scheduler options.

Jon, by 'Integration Service' do you mean a SOAP webservice? Unfortunatly, Ogone only supports a webpage to which it can post or get formvalues. Is it possible to call the 'integration service part' of a Ebase webservice as where it a form?

Regards,

David
0 x

User avatar
jig
Ebase User
Posts: 30
Joined: Sun Oct 09, 2011 10:16 am
Location: UK

#5

Postby jig » Wed May 08, 2013 9:38 am

dvanhussel wrote:As far as I know, 'Ufs.skipBrowserAttributesCheck' is a setting for the whole server, we need it for our other forms. Is this correct?
Yes. Ufs.skipBrowserAttributesCheck is for the whole server.

Another option I can think of:
If Ogone can send you a CSV/XML/etc file via FTP, then you can have a scheduled form that wakes up at fixed intervals and process the file(s).

Regards
Jignesh
0 x
Regards,
Jignesh

Jignesh Vaducha, MSc, MCA
Mobile: +44 (0) 77 325 47 112
Telephone: +44 (0) 1462 488 311
Email: jignesh@schnellsolutions.com

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#6

Postby Jon » Wed May 08, 2013 9:47 am

An Integration Service is an Ebase published web service, you can't call these like a form. Sounds like this is not an option.

Regarding the Ufs.skipBrowserAttributesCheck flag, it applies to each web application as opposed to the whole server - subtle distinction. So you can set up a second web application e.g. ufs2, which has this option set and then use it just for these Ogone posts.

Regards
Jon
0 x

User avatar
jig
Ebase User
Posts: 30
Joined: Sun Oct 09, 2011 10:16 am
Location: UK

#7

Postby jig » Wed May 08, 2013 10:01 am

Sorry Jon/David! What I meant to say was "web application" rather then whole server.

Thank you Jon!

Regards
Jignesh
0 x
Regards,
Jignesh

Jignesh Vaducha, MSc, MCA
Mobile: +44 (0) 77 325 47 112
Telephone: +44 (0) 1462 488 311
Email: jignesh@schnellsolutions.com

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

#8

Postby dvanhussel » Wed May 08, 2013 1:55 pm

Thanks again!

I have made a JSP page which writes the (raw) Ogone data to a database. Using the scheduler, a form is run every minute to proccess the new data.

Validation and actions based on the payment result are thus handled by Ebase scripts.

I think that this is the most simple solution, and most important: it works :D

Regards,

David
0 x


Who is online

Users browsing this forum: No registered users and 5 guests