server-side

Will server-side JavaScript take off? Which implementation is most stable?

Does anyone see server-side JavaScript taking off? There are a couple of implementations out there, but it all seems to be a bit of a stretch (as in, "doing it BECAUSE WE CAN" type of attitude). I'm curious to know if anyone actually writes JavaScript for the server-side and what their experiences with it have been to date. Also, whic...

Can you reliably set or delete a cookie during the server side processing of an Ajax (XHR) call?

I have done a bit of testing on this myself (During the server side processing of a DWR Framework Ajax request handler to be exact) and it seems you CAN successfully manipulate cookies, but this goes against much that I have read on Ajax best practices and how browsers interpret the response from an XmlHttpRequest. Note I have tested on...

Comprehensive server-side validation

I currently have a fairly robust server-side validation system in place, but I'm looking for some feedback to make sure I've covered all angles. Here is a brief outline of what I'm doing at the moment: Ensure the input is not empty, or is too long Escape query strings to prevent SQL injection Using regular expressions to reject invalid...

Server side virus scanning

I need to scan uploaded files for viruses on a Linux server, but I'm not sure how to go about it. What are my options, if any? I'm also interested in how the scanners perform when multiple users send multiple files at the same time. ...

generate HTML document server-side with jquery and classic asp

Here is my question, Would it be possible, knowing that classic asp support server-side javascript, to be able to generate "server side HTML" to send to the client like Response.write $(page).html() Of course it would be great to use jQuery to do it because it's easy to parse complicated structure and manipulate them. The only prob...

What's a good Minimal Server-Side Javascript Framework?

So I was writing a web app with web.py that uses plenty of client-side javascript, and my database is on couchdb so the queries are in javascript too, and eventually I just got to thinking, why not skip the python and go all javascript? Besides, some functions need to run once on the client and again on the server to make sure you're no...

How to get Https URL content

Hi all I have a https link that requires user login & password. If I run it in FX like this: https://[email protected]/link/sublink it will return the xml data as expected. However, what i'm trying to do, is to automate this process. I try to use file_get_contents in PHP fSocket in PHP I even try Ajax, but still.. doesn...

Do you validate your URL variables?

When you're passing variables through your site using GET requests, do you validate (regular expressions, filters, etc.) them before you use them? Say you have the URL http://www.example.com/i=45&p=custform. You know that "i" will always be an integer and "p" will always contain only letters and/or numbers. Is it worth the time to m...

How to handle multiple submissions server-side

We all know the good old "disable the submit button" trick but what are the best ways to handle multiple submissions server side? I have an application where it is absolutely critical that a form only be sent once - it processes a credit card. I didn't write how it is right now but as a quick fix I threw on the disable-on-submit techniqu...

javascript (spidermonkey) how does one run a linux command from js shell?

I'm stumped and feeling stupid. I've tried every search combination I can think of to figure this out. It seems simple, but being new to javascript I'm not seeing anything helpful in my search for examples or demos. I'm looking to use a script like I would a python or perl script to run a simple linux command. The interpreter is up and r...

JavaFXSCript for server side applications

Has anybody tried to use JavaFX Script in server side applications. The language itself looks quite nice and modern, and is fully Java compatible. If Sun is serious about it, it could be quite ubiquitus on the server side too, where Java is strong. What do you think? ...

Pagination: Server Side or Client Side?

What is it best to handle pagination? Server side or doing it dynamically using javascript? I'm working on a project which is heavy on the ajax and pulling in data dynamically, so I've been working on a javascript pagination system that uses the dom - but I'm starting to think it would be better to handle it all server side. What are e...

How can I convert JavaScript code into one big Java string

So I have 1000 lines of javascript. I need to turn it into a Java String so that I can output (via System.out.println or whatever). I'm looking for an online tool to escape all the quotes... something geared toward my specific need would be nice as I don't want other special characters changed. Lines like: var rgx = /(\d+)(\d{3...

Using XML parser to create XHTML code on fly

Hi all. Developing server side code i finally got my eyes X-crossed trying to write - and then understand, of course - forms or other html code in which text strings (attributes) within double quotes must occur in tagged string (markup) opening and closing properly; but often javascript text within apostophes must be instantiated, quite ...

Exporting Flash movie to downloadable animated GIF, server-side

Let's say that I have a Flash website where you could create an avatar and some motion. Is there a way to save those into an animated GIF with a server-side language ? (php is preferred) I've looked around and all I've got are ways to do that with the Flash software itself. Has anybody tried this ? Thanks in advance. ...

ASP.NET MVC server-side processing of Google search results

Hi, This is probably a really simple question but... I would like to do a Google image search (performed by Javascript as there is no other supported option right?) and resize the images on the server-side. My first thought was to have the Javascript generate links like this: http://example.com/Resize.mvc/(link) However, there ...

[PHP] Multiple Seperate Switch Statements

Hi :) I have multiple switch statements in on one of the pages in order to pass different vsriables to the URL, as well as different case. I need these different switch statements because I need the different variables. However, when I put a "default" in one of the switch statements, that default applies to every other switch statement...

Optimized graph drawing for the web

Having seen some suggestions for graphs, I wonder what's the optimum for my problem. I want to render a directed graph to a servlet/picture that is displayed in the browser. There should be some kind of optimization of position. No dependency to Swing would be preferred. Algorithms are not important, since the structure of the graph is...

How do you implement Basecamp style URL in Java/JEE environment? eg <username>.hostname.com

The Basecamp URL like .basecamphq.com, eg seymores.basecamp.com. How can I do the same in Tomcat environment? ...

Server Sided 3D rendering

My questions have to do with this very interesting article: http://www.techcrunch.com/2008/07/09/otoy-developing-server-side-3d-rendering-technology/ What they say: In this article it is claimed that this company can do amazing server sided 3D rendering all the while displaying the output in the browser using Flash, Ajax, Java or Active...