Web Based Drop and drag

I want to develop a web based tool to catalogue my CAD drawings.

The goal being that i can click on an image that represents the drawing and can drag it onto a CAD application that runs under windows. The application does support drop and drag under windows.

I expect to be using a java servlet to generate the page.

Is this possible?

Who is Participating?

Improve company productivity with a Business Account.Sign Up

pbguyConnect With a Mentor Commented:
Are you using AutoCAD?

Just a few more I found:

Might get us in the right direction...

This one looks very close, Check out in particular the section labeled Adding drawing/x-dwf as a MIME type

This may help also

None seem to do exactly what you need but I think it's the right direction... If we get a CAD drawing to open through a link in a helper app or the browser we're home free methinks...

Ok, that's it for now.  Hope they help!
PhillOAuthor Commented:
Further info

when i click on the image, i want the web app to select the appropriate CAD file (not the gif image) for inserting into the CAD application

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Wrong subject ... sorry ... forget about my previous post ...
But if your writing an applcation for Windows you might want to switch to C#.
Hi Phil,

Don't know if I have an exact answer to your question but I think I can move you in the right direction.

When you say "web-based tool" that can mean alot of things.  

A true web-based application is an app that you can run through a browser using the standard, built-in capabilities of the browser (essentially HTML and Javascript)  Now, you can have true web-based applications that use dynamic scripting packages on the server (think ColdFusion, JSP, ASP, ASP.NET, PHP, etc.) -- all of these tools have their own special programming language, but all of that work happens on the web server.  By the time it gets to your browser, it's just straight HTML and Javascript (don't believe me?  Do a View Source next time you visit a ColdFusion site and try to find something that's not HTML or Javascript...)

Now, a true web-based application is not able to talk to the file system on a client PC.  It's security that built into the entire protocol.  You can't take control of a PC through straight HTML and Javascript, it's why you can surf the net without every hacker in the world looking at your financial statements.  

But there are other options.

Browsers allow plug-ins and ActiveX, which are essentially full-blown Visual Basic (or other) executable that runs like any other program on your PC.  Through this type of application, you can do whatever you wanna do.  But it's at a price.  First off, you need to manually install the plugin onto any browser you want to use the functionality on.  Second, you need to write a full-fledge VB (vb.net/powerbuilder, C++, whatever) application, Third,  ... well, really, once you get to this point why even bother with a browser, it's just aother Windows application, there's no real need to stick it inside a browser unless you're trying to fool someone.

So, bottom line, browsers and web-apps can't talk to Windows or the underlying OS unless you cheat and create a Windows Program and stick it into a browser, at which point why even bother with a browser?

Lastly, you may be able to get away with a Swing Applet (not a servlet - servlets work like Coldfusion, they do a bunch of work on the server and then serve up straight HTML and Javascript.)  Java has a strict protocol regarding security on client machines, but I'm pretty sure you can turn it off with permission from the machine owner and access components of the OS.

BTW C# essentially works the same way as Java, but I'm pretty sure you can use it to construct ActiveX Components that can be used as plugins as stated above...

I guess the first step is ask yourself "why do I need a web application for this?" and second "how much work am I willing to do to get this functionality to happen inside a browser?"

Hope this helped clear some things up for you, good luck and I'd be happy to clarify anything if you have questions.

PhillOAuthor Commented:
wow pbguy what an answer!!

I want to use my CAD blocks as a resource over the internet. Some of my clients want me to work from their premisies and others either don't care where i operate from. So, by using servlets with apache, I can use a central repository that i can access from anywhere. This would provide me with a HTML table to display images of drawings acting as a preview. Also i can include encryption (if really neccesary - but probably not) plus authentication (of course the password and username needs to be encrypted).

I know that i can just use the HREF tag and I can just download the file normally. That is one option. I have also been lead to believe that I can use javascript to copy to clipboard. If true, that is a second option. But If possible, the best option would be to mimic a win app and just drop the the file directly into the drawing.

i was thinking of using some client side java code to act as a psuedo ftp client (not an applet) that can provide the functionality (similar to activeX - I'm not familiar with activeX programming). One question that arises is can i use both java and javascript in the one html document?

i have thought about implementing webdav but it doesn't provide facilities (that I"m aware of) to display a series of images like a table

Having said all that, the programming will take as long as it takes. I have just completed a uni subject in web based information systems and found it very interesting. So I would like to pursue the possibilities and see where it leads. i have done some of the programming required for the above idea  but not all. So, there will be a learning curve

Regards Phill
Hey Phill,

Makes sense why you'd want to do it like that, and understood how you're gonna use servlets.  Not sure whatthey were talking about javascript copying to the clipboard, but you want a win app anyway so we should explore that further...

You can use java and javascript in the same document, but pretty much if it's java on the client end it's gonna be an applet (unless you're running it outside the browser...)

I had a thought that what you're looking for may already exist, and I wondered if you could accomplish it a bit easier with MIME types.  Check out this link:


It mentions CAD in there, but more importantly explains a bit about MIME types and plugins.  It may end up being a very easy task to just associate a file type with the CAD app and be able to click on it and open immediately (this is what happens with Word documents and Excel documents - just a MIME type in the browser.)  Looks like there might be some server-side configuration requirements but it may be the easiest way to go...

Tell me what you think, I'll try to dig up some more info for ya if you think this is helpful...

One question -- I assume that your CAD app is installed on each one of the clients and would open from the local PC (as opposed to the entire app being downloaded over the internet -- you just want the design files, not the whole app right?)

Ya got me curious now...
PhillOAuthor Commented:
yes pbguy

the CAD app will reside on the client. what i have on the server is just the resource file. I will have a look at the link and get back to you

PhillOAuthor Commented:
Thanks Phill,

Actually, would be very curious in how you finally resolve if you care to post some info...  Good luck
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.