I'd like to have our ASP.NET web app create a desktop shortcut to our site on the user's (windows) desktop. With their permission of course. Like a button that they click and answer 'yes its ok', and then they get a link on the desktop or start menu that takes them to our site.
This may not seem like a great idea, and I could see how it could be annoying, but i have 2 great reasons for doing this. 1) Other people are doing it 2) Management wants it.
My question is, which technology would you guys recommend? I've heard this can be done via Java or Silverlight. Obviously our app is written in C#, but if it were much better/easier in Java we'd be willing to go that route.
So is one better for this task? And has anyone seen any examples?
EDIT:
Ok, assuming I wanted to go the route of Trusted XBAP or Signed Applet, can any point me in the right direction? I have no Silverlight or Java experience, but I'm willing to learn if someone can point me at a good tutorial.
If I've understood correctly what you're trying to do then no, you can't get your webapp to create a shortcut on the user's desktop. A couple of ways round it might be;
Host a batch file/script/installer on your site and try and get users to download it and run it locally.
Get the users to install a browser plugin that can do this. You may have to create this browser plugin yourself.
Browsers generally try to prevent websites having access to the local system for security reasons.
Related
Without thinking, I created an entire program in Java and began designing a website to use this applet. All it does is create image in a certain way but there is a bit more code (classifications and default values/images) that I just felt was easiest to do with Java. Now I have a Java app and HTML CSS and JavaScript that I can't seem to do much with.
I have thought of 2 ideas (below) but I don't know what the general alternative is to applets nowadays.
I have a spare PC I may use and just alter my applet to run the back-end of a server-based site instead, but I am hesitant to use my own IP and bandwidth for something like this. Also, this app doesn't even need access to the internet so this just seems like way overkill.
I could just release the .jar, but I plan on expanding the available options. I also told people that this website was coming. I'd like to be able to just update the website.
I don't really plan on writing my program in another language. This took me time to make. If there is no way to work Java into my site, I may just abandon the project altogether.
I am mainly concerned with Chrome for this problem.
Edit: I would like to use GitHub as my host, just in case this helps at all.
You can run anything you want on the server, including java programs. So
you could run the image creation program in the server and present the
resulting image using a standard img tag.
After a lot of work i manage to finish a java web aplication with netbeans using primefaces/glassfish server (it is a e-shop that we developed for a school project). I use xampp (mySql) in order to fiddle around with a database that i use in the web app.
My problem is that i have no idea on how to upload this to a server. What am i supposed to install on it ?, i dont even know what os to use :/ . Im really bad at the "internet part" of this project and since this was my last school year i can not reach for my professor to ask him for help.
I know my question is vague but please help me to finish this project because it would help me a lot to find a job in the future.
I should also mention that i use a mysql-connector-java-5.1.38-bin.jar .If im not wrong this allows me to send data throw a TCP connection right? My main problem is that im missing the Full picture ,I know how to write basic code in java , i know how to build the xhtml pages and how to bind them to the java code behind but other than that i dont get how the rest of this works.
Any help is greatly appreciated.
Edit: as i said im bad at this. if you just post a generic link on "how to set up a Javaweb" i will not be able to follow . Im asking here ,on this forum because i want human answer. I need someone to post a 4-5 line explanation and like 8 bulletins on what to do like
*install linux
*Build and export your project.
*install glassfish standalone.
etc
The thinks google returns to me are like 400 pages of glassfish documentation and really hard to follow guides on how to do what i want. Of course i could waste the next month or so just reading and trying to figure out how everything comes together (witch i inevitably have to do)but i feel like im only 15 clicks away. I just want a practical answer.
You need an application server to "upload" the code. Use tomcat, its simple and has plenty of documentation available.
If you are using XAMPP, you may be familiar with Apache Server, which runs , among other things PHP. For Java, you need application server to run the server side code.
It doesnt matter which OS you want to use, Java runs on all. You just need to download and install tomcat for the OS you want to run it on.
Please refer to http://tomcat.apache.org/
I must point out that there are many more Application servers which are available. Tomcat is one of the most popular for learning purpose.
I am developing an e-commerce web application, and in that ads from other giants pop up. I figured out that this is done by PriceFountain, which is actually a spyware. I found the steps to remove that from my laptop. more found here.
but the problem is my clients can also have this adware. I want to programmatically do following or either of them, on the client side:: (and if it is not possible at least inform the user to do so)
If, PriceFountain is present, uninstall it from their system. If it is an add-on, remove that.
Activate the pop-up blocker (deactivation can be achieved through javascript and jquery). But I want to activate. My site does not need pop-ups.
Alter the registry of user for the contents of PriceFountain.
I know this is somewhat an unethical hack, but can this be achieved and if so, how?
More of that, it is just my curiosity can we affect client site settings.?
You used to be able to do that (with jscript/vbscript) in IE if and only if the user added your site to his trusted sites (and allowed pretty much everywhere there), or if it was the intranet-site with relaxed permissions.
Back in the old day's I had such a thing for the intranet-help-site where users could browse through the faq and click on the 'execute solution' button for the common 'problems' (previously solved and added to DB).
For rather obvious security-reasons this is no longer the case (although one can still pull some stuff in legacy IE environments).
The point is: you can't do this on other browsers then IE (unless maybe you'd develop separate plug-ins for them and ask your users to install something that will essentially give you access to their whole machine). Realize that effectively what you are asking for is a way to fully control the user's machine. Would you install such a browser (on your parents pc)?
The best course of action would be to face-up, inform your users on your main-website (enter-page) that something bad spread throughout an ad-network and guide them through the steps (that you already found) necessary to relieve them from their problem.
Even if what you asked was possible, you'd still need the user's cooperation somewhere along the way, even if you'd were to write an application for this that the users could download and run (administrative/elevated)..
Good Luck!
EDIT: for the registry you might try something with the answers in this question: read/write to Windows Registry using Java
Still, you'd still need the user's co-operation.
We need a tool to test a set of fairly complex Java applications. The applications are mostly independent client programs or applets communicating with a servlet or apache server at a remote site. Specs:
Runnable on Windows XP, Vista and 7
Parameterizable (Can specify in a script the sequence of buttons to click, text to type in JTextFields and browser address bar etc.)
Can quit or bail out or display a nasty message if the expected window or dialog box doesn't appear
Record the output on the Java Console of browser in a .txt file (IE is sufficient for now) when the application opens a browser window.
While running, I should be able to see it running with folded hands while it would run
for a few minutes
We were thinking of writing an AWTRobot based tool that reads a command file and does this - (don't know how to do #3 or #4 yet - will ask you folks some day how to detect a window on the desktop). Would you suggest an open source tool available to do this? We don't need anything fancy to capture video or screenshots. Thank you, - M.S.
For browser based automated testing you can use Selenuim or you can use WebDriver.
The selenium project is hosted here
If you don't need to test the way the pages are actually rendered by the browser, but instead need to work at the HTTP/HTTPS/etc request level then have a look at JMeter. It has parametrization, dataproviders, graphs, and a proxy component for recording http user sessions.
If you do need browser testing, then, as has already been mentioned, Selenium is probably the best freely available tool. For production I would recommend using Selenium Remote Control server which can be driven by scripts written in Java/Python/C#/Perl/PHP.
To see what tools people use in real production environments, and to do your own research on what is available I recommend www.sqaforums.com.
Have a look at Sikuli
The reason I suggest this is it sounds like you need to test both a Java applet and the content of a native browser (launched from Java, but not itself Java) -- so it's not "Java all the way".
I'm not sure what you mean by criteria 4, though. It is worth noting that as Sukuli works by image analysis, it won't be able to copy text to a text file.
This question is an invitation for sales pitch, don't you think. How about Mercury Quicktest professional ( I believe its HP Quick test now). I do not believe this will be cheap either ( and well its HP, it will probably only work in IE ;)).
Since you want an open source solution, I believe, the most popular option is selenium and yes its a pain to configure sometimes ( like for Flex for example). So you should try Watir.
There is a lot of good buzz around it and when I evaluated it, I loved what I see.Also it does not work for desktop applications, I suggest you try some other solution for that.
(The problem is open source GUI testing tools are not usually all inclusive. If you need one solution to handle all your gui testing needs, then you should check out the more commercial ones like QTP.
I have used IBM Rational Functional Tester. It has everything you need and it's quite easy to learn. The scripting language is either Java or VB.Net so you won't have to worry about learning a language for your tests.
I had some pretty good results with Squish from FrogLogic and didn't break the bank: http://www.froglogic.com/products/
Did you try Squsih - http://www.froglogic.com/products/index.php
I recently played around with the SWT browser widget (which is great). I am wondering if I could write a full desktop application with it (with java services behind - e.g. persistence) and what drawbacks I would have to consider. The advantage would be that people without java knowledge could work on the gui. Of course it depends on the requirements and I know that this is not a very specific question. But mabye someone already tried to build a bigger app this way and is willing to share insights.
Thanks
Marcel
I'm not sure I share your opinion of the SWT browser widget. AFAIK it's merely a shell into the default browser on your machine, merely with a few API access points. I've used it for minor things when I needed to show a web page from within the application. But writing a whole application? That doesn't make sense.
If you want to build a web-based application that runs in the browser against a Java based server framework, there are many AJAXian frameworks to do it. You'd still be doing JavaScript for your client code. And you'd still be dealing with all the complexities of different browsers. I'm not sure why you would want to host it inside an SWT application instead of just directly in the browser window.