Setting VPN using Java [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I need to open a san box url while using file browse button in a web application. For that i planed to set VPN using Java code.I tried it google but could not find any solutions so for. Any Idea for this one?

What exactly are you trying to do? When you say "open a sandbox URL while using file browse button", I assume you're trying to list available files (and maybe retrieve contents of a file)? If so, are you trying to access the file system of the server (web server?) or the client?
Either way, I think you need to consider some other options.
If you're looking to expose a directory tree of the server, I'd expose any details you need (directory tree and/or file contents) through a web service (JSON, XML, or otherwise) - and present that data back to the client - possibly using AJAX. An immediate example that comes to mind is phpVirtualBox. I can remotely mount virtual disks from the server on the server - all through a remote web browser using this approach.
If you're looking to expose a directory tree from the web client, you either need to use the browser's built-in file selector (using <input type="file"...>, or an applet - e.g. Java or Flash, if the browser-provided options don't provide the functionality that you're looking for.

Related

Java program file output upload to Squarespace site [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
In summary I have a java program that writes a file and I would like to now take that file and upload it to my Squarespace website. From here I am trying to figure out what my next steps are.
Unfortunately, Squarespace currently only offers APIs related to commerce (inventory, orders, products, transactions) and forms. There is no file storage-related API.
The only ways to upload files are via the WYSIWYG editor (via the add-link button), via the CSS Editor (for image assets) and via developer mode.
Squarespace 7.0 sites (current sites are 7.1 by default) that have Developer Mode enabled do support Git and SFTP. Theoretically, one could develop a system that utilized one of those methods in order to add files to the site (which would then be accessible via /assets), but that is only theoretical and far from ideal.
I'm afraid there isn't a good method for automatically uploading files to a Squarespace site.

Is it possible to register a Domino Server with the Java API or C API? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
We are well on our way to Dockerizing Domino. In fact, we have a Domino Docker running in IBM Cloud (bluemix) that replicates with on prem.
What we want to be able to do is automate the standing up of a Domino server.
In our script, we are thinking of calling a custom program we can build that will use either the C API or Java API to register a new server, deploy a XPages (JSF) application to it, and start the server, replicate over the common user directory (names.nsf) from the master server.
Currently, we started the Domino Container in CentOS in listener mode. We registered the server on prem, and copied over a bunch of files (server.id is one of them) and edited confirmation to manually configure it. We want to automate this process.
Any insights on how this can be better accomplished? any api references you can share to get us most of the way there?
Yes, this is possible. We have done this in Lotusscript using LS2CAPI.
As we are accesing API functions, this is also possible using Java. Not sure, if domino-jna already includes the needed Api calls, but this can be implemented. Take a look at github for Karsten Lehmann and domino-jna.
domino-jna can be used from XPages as well.

Architecture of a simple JAVA EE app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I was given the task - to create a simple JAVA EE web-application that have the following functionality:
It had an index page
I choose an algorithm and enter parameters for it on index page
Depending on chosen algorithm a statistical .csv file will be processed on its own way.
After processing the .csv file in compliance with entered parameters and chosen algorithm I get a table where I can find processed data.
I know that it's a very simple application but I don't know what to do - architecture, what kind of web layer and etc
If you install Apache Tomcat on your computer, and then run it, you will find a lot of simple examples, many of which will come close to what your are asking. Plus, once you install it, you have a server on which to run your new code. I would recommend you start there.
Apache Tomcat
I would say that if you really want simplicity, you go with just Servlets for the server-side processing, and JSP pages for the HTML views. I know, it's "vintage" almost, but will get you running in no time and without the need for any special "architecture" or framework besides the servlets API.
You can build your app as a War file with the tool of your choice and deploy it in a Tomcat server and that's it.

How to web scrape on server side? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm not sure if the title says what I needed. But that's the best way I can put it.
My requirement: I want to check if a series of engine numbers (of vehicles) are registered with the local transportation authority. They have provide a web-interface for this task, but I can only check for a single engine number at once. Usually I need to check over 200 numbers. So, its a humongous task to check each one individually.
A couple of years ago, I have created a small standalone python script to do this automatically using web scraping, but now I want to do this on a server.
A user gives all the numbers in the text file which they upload/paste the contents in to a text field. Then I'll have to submit the form on the transportation website (using web scraping) for each number and display a final status for all of them.
What I want to know is how to do this on a server? What technologies could be helpful. I'm comfortable with Java & JavaScript. I don't know PHP (But i can learn if needed). I don't have slightest Idea how to do this on server side. Any Ideas and Help is greatly appreciated.
Thanks.
Java has a library called JSoup, which provides a mostly-familiar api that uses css selectors.
And obviously there are built-in functions that can get you the html from a given URL.
Put those together and you've got a server-side scraper
[edit]
Your question, on a re-read, isn't just about scraping -- it's about how to automatically submit an html form from within Java to an external server. This is an interesting question, one I've wondered myself.
this may be an answer: How to send post form with java?

How Applet talk to Web server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am going to build web application in Java (JSP). In my web application ;JApplet will communicate with the database that is on other place(Remote Database).
My question is that how applet can take and give the data from the database.
I am Using MYSQL database.
Can I use JDBC for that ?If so then how?
Unsigned applets must follow the same origin policy, hence the applet will only be able to talk with the server from where it was downloaded. For this case it may work, assuming you bundle JDBC driver somehow (like moving driver classes into applet jar, or trying to use multiple jars in the same applet).
However if you want to deploy the application more widely, it may be better to use text based communication (XML or JSON) on the server port 80. JDBC port may be blocked by various firewalls.
As the alternative to the applet technology, you may also look into Google Web Toolkit. It is the same Java (just toolkit compiles to JavaScript) and you should feel at home, but it is easier to deploy reliably. GWT provides callbacks to pass the data to and from the server.
what you exactly wanted to do is run to your applet inside your web container for that you study the architecture of J2EE web container that how it run applet container.you can check on the oracle site link : about j2EE containers. for the architecture you can view this :http://tekmarathon.files.wordpress.com/2012/10/j2ee_component_diagram.png

Categories