Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

JSP java server page

Hello,
I have an application whitch is developped in Netbeans(java langage).I want to execute my appliction in a server.
I ask if talend open studio can integrate my source code in Java Server Page(JSP) to execute it in this server.
Please can you anser me.
Thank you
Labels (3)
12 Replies
Anonymous
Not applicable
Author

When you export your job as a POJO or war file, yes u can.
For POJO, you'll have to add the jars to your classpath and call correctly the main class. U could also use Runtime.exec() to launch the script/shell TOS generate.
For the war, you'll have to deploy the archive in your container and call the URL from the jsp as needed.
Anonymous
Not applicable
Author

Hello;
thank you for your anser.
Please can you explain more your idea. I tried to follow your steps but i can't touch the resuly.
this is my source codde in netbeans(Slot).
Please can you help me.
thank you
Anonymous
Not applicable
Author

hello;
someone can help me please.
thank you.
Anonymous
Not applicable
Author

Hello,
I have the same problem.
I made a job using Talend : extract data from excel file and insert them into a database Oracle.
I want tou execute this job in my project JSP only when I click at a button.
First, Il should import the excel file to the server ans then call this job.
Can anyone help me.
Thank u.
Anonymous
Not applicable
Author

Hello All
Now I will show you how to run Talend Job in JSP page.
1) Export job as 'Axis webServices(WAR)', about how to export talend job and deploy it on server and run it as webservice, please see 1686.
here, I export a war file: test_0.1.war and put it to webapps foder of tomcat.(note that test_0.1.war will be unziped automatically to a folder: test_0.1 under webapps)
2)In talend, create a new job and put a tWebservicesInput component in Job editor, type in wsdl url in WSDL field. (See screenshot1)
3)Go to 'Advanced Setting' tab, select 'AdvanceD Use' option, then click on 'WSDL2Java' button to generate a stub client code. (See screenshot2). About 'WSDL2Java' button on tWebserviceInput, please see 6226.
4)Copy all the jar files which locates on webapps\test_0.1\WEB-INF\lib,(see screenshot3) then open your J2EE project in MyEclipse or other equate IDE, paste these jar files into lib folder. (see sreenshot4)
5)Create a new package called routines under src folder.(see screenshot5)
6)Create the same interface and class as client code generated on TOS. eg: create a interface called Test_PortType, copy the code of Test_PortType from TOS, then paste it on MyEclipse. (see screenshot6)
7)Call the client code inside a JSP page as you do on TOS. (see screenshot7)
8)Deploy your project and start server.
9)Run the JSP page and all are OK now 0683p000009MA9p.png (see screenshot8)

Best regards

shong
Anonymous
Not applicable
Author

Hello,
thank you Shong for your reply
It works fine. But I have some questions about this solution :
1- What I Shoud make in Schema Type of tWebServiceInput
2- How can I make my webservice and my project test.war parameterizable?
In your example, the address "http://localhost.../WSDL" is not dynamic. So I can put it in "context" but how can I change it when I put my projet in another server?

3- Can I integrate the job test_0.1.war to my project? Because I prefer deploy only one project and not two : test_0.1.war ans myProject.war.
Thank you
Anonymous
Not applicable
Author

Hello
1- What I Shoud make in Schema Type of tWebServiceInput
2- How can I make my webservice and my project test.war parameterizable?
In your example, the address "http://localhost.../WSDL" is not dynamic. So I can put it in "context" but how can I change it when I put my projet in another server?

We just use tWebServiceInput to generate the stub client code here, don't use it to run the job. To generate the client code, we need the address "http://localhost.../WSDL" and click on the 'WSDL2Java' button, so don't need care the schema. If there is a red X on the component, you can add one column on schema, but it is not important.
3- Can I integrate the job test_0.1.war to my project? Because I prefer deploy only one project and not two : test_0.1.war ans myProject.war.

test_0.1.war is an example, I export my job scritp and name it as test_0.1, you can call it any name in your case. To run the Talend job in a JSP page, I think you should know:
1) How to export a job in .war type.
2) How to deploy a job in webservice and run it out of TOS.
3) How to call the webservice on tWebServiceInput and know 'WSDL2Java' button usage.

Best regards
shong
_AnonymousUser
Specialist III
Specialist III

Hello Everyone!
I am trying to implement the job in jsp as per shong's steps shown below.
But when i click on wsdl2java button, it generates only stub class.
It doesnot generate any port type interface.
Even for the simplest jobs also, the result is same.
Can any one help?
As my jobs are running fine from browser and from TOS.
Thanks in advance.
-- Krsna
Anonymous
Not applicable
Author

Hi friends -
Just curious, has anyone been able to use the "export job scripts" functionality as a .war when also using contexts? I know, I know, this appears very obvious as it even allows you to select the context upon export, but I am unable to successfully move from one context to another when referencing it as a webapp within tomcat; no matter what I do, it seems to reset to the Default context, which, of course, throws an error in the tomcat logs (very plain to see).
Any suggestions?
Thanks,