I am a web developer with negligible knowledge of GIS. I have been assigned a task of developing a webpage where map from clients ArcGIS server will be displayed. User should be able to draw lines, arcs , circles , points and paths on it and later save it as an image.
if you need to support redline sketches that only need to be printed (not saved as GIS data), you should be able to get away with just using the printTask (which relies on ArcGIS Server 10.1)
in re-reading your thread i think i understand now that you were attempting to substitute a webmap in a sample application that was previously relying on a map service. those two things are not interchangeable.
the sample application i linked to above is still relevant, but if you would like to load in your content as a webmap (instead of using the urls of the services themselves), it might be handy to take a look at this example to see how a webmap can be loaded in a custom JS app using its ID.
Replacing the webmap ID on the sample should work. Make sure you have used the correct path for importing the css: <link rel="stylesheet" href="css/layout.css">