cancel
Showing results for 
Search instead for 
Did you mean: 

Build Website Using Java

Solved
Contributor

Build Website Using Java

Is it possible to use Java API to create a web sites? If so, how does one go about it?

Tags (4)
7 Replies
Contributor

Re: Build Website Using Java

If the website cannot be completely built using Mega Java API, would it be possible to use a Java Macro in HTMLFormatters?  My hunch says I should beable to, but again whatwould bethe interface that needs to be implemented?

Contributor

Re: Build Website Using Java

Hello S-

 

you can of course generate a website with a java application that use Mega java API to communicate with the repository.
For that, you should read "MEGA Exchange - API EN.pdf" on "Documentation" folder of your Mega installation.
It's also possible to create a website from scratch after catching Mega datas on your java application, but in my opinion it's so far the worst solution.

Best regards,
Jean-Yves
Contributor

Re: Build Website Using Java

Hello J

 

Thanks for the response. I have looked at the Exchange En.pdf but couldnt completely understand the purpose of Exchange API. is th purpose of Exchange API to create a complete java (or any other language) version of Objects in the repository and output them so that someone can refer to them in their programs outside Mega - in other words create a cache? Or is it to create a connection so that web applications can use mega repository?

 

My purpose is not to access Mega Objects from a webapplication, rather publish a website (using a template preferably) - to demonstrate what we have inside Mega - like a website referred in the Publisher training.

 

I was looking at HTML descriptors but find them very limiting. My intention is to be able to harness the power of Java programming and hence I am curious if Java could be used while publishing websites( like in Publisher training)

 

I was looking at various things yesterday like Report Analysis in Java  -  and then got curious as to whether that model can be used to publish website as well.

 

Would it be possible to use Java language for HTMLFormatters? if so, what is the API?

 

Do you see where I am going?

 

I apologize for not being precise earlier.

 

Thanks

S

Contributor

Re: Build Website Using Java

Yes, it's possible to call and execute jar files on HTML formatters.
For that, you need :
1- to use on the HTML formatter the tag [ExternalCall Macro="Name of the macro"]Parameters[/ExternalCall].
2- to call your jar file on the macro (take a look on the KB for the solution number 00003334).
3- to create your jar file.
4- That's all !

Best regards,
Jean-Yves
Contributor

Re: Build Website Using Java

J

 

Followed your suggestion and I see that themacro's stub generated the following interface in my eclipse: public void Generate(final MegaObject object, final MegaCOMObject context, final String data, final StringBuffer response)

 

Thanks for the response!

 

Regards

S

Contributor

Re: Build Website Using Java

Would it be possible to leverage the pattern that is used by Java Analysis Reports: Data Set , Views and Renders?

 

I see that HTML Formatters return HTML data as response, but it would be nice if they can reuse the pattern created for Analysis Reports.

Highlighted
Contributor

Re: Build Website Using Java

Could Someone please post some code to demonstrate JAVA HTML Formatter?