{"id":3066,"date":"2014-03-15T03:36:57","date_gmt":"2014-03-15T03:36:57","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/15\/web-applicationswebrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-03-15T03:36:57","modified_gmt":"2014-03-15T03:36:57","slug":"web-applicationswebrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/15\/web-applicationswebrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"web-applications,webRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f559d87526e0be57f66454564c4a59e3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser968834<br \/>\njquery ios events web-applications click<br \/>\nBuilding a web application and having trouble getting a click event to fire. It works perfectly when running from a normal instance of Safari, but when running from the home screen, it fails.$(&#8220;a.applink&#8221;).live(&#8216;click&#8217;, clickHandler); var clickHandler = function(e) {console.log(e);e.preventDefault(); }When running from the home screen, &#8216;e&#8217; is empty. If I replace &#8216;click&#8217; for &#8216;touchend&#8217;, it does work, but touchend doesn&#8217;t give the correct behaviour (i.e. if you happen to touch a link to start a sc<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/graph.facebook.com\/100003139165899\/picture?type=large\" \/><br \/>\nHarika Choudary Kanikanti<br \/>\njava jsp web-applications<br \/>\nThis question already has an answer here:How to avoid Java Code in JSP-Files?22 answersI am new to JSP i created a web application using JSP.I written the java code inside the JSP scriptlets(&lt;%&#8230;..%&gt;). For database connection also i fallowed the same manner.Example:html code;&lt;%database connectivity code;%&gt;some jquery code;&lt;%again database connectivity code;%&gt;But some people told to me that it has a big disadvantage that is &#8220;By using scriptlet declarations that only one person can<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bed9b266b2261fdfabab5bcce6e6aa47?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nYurii Soldak<br \/>\njava linux tomcat web-applications classpath<br \/>\nSummaryIs that possible for webapps deployed on linux + tomcat5.5 to use\/see all \/usr\/share\/java\/ jars automatically?DetailsI&#8217;m packaging my java webapp for Ubuntu (yet the question is related to any linux-based distro) and going to make it depend on tomcat.I&#8217;m going to put context descriptor (an xml file) to \/usr\/share\/tomcat5.5\/conf\/Catalina\/localhost\/ to make my app deployed. Having my web dir here: \/usr\/share\/&lt;appname&gt;\/web, how can I enable my app to use java jar libs installed in the<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/78a0a4bb106d07b6c6f33a51988155e3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPeter Mortensen<br \/>\nc# .net iis web-applications web<br \/>\nWe are developing a mini social networking web application. It has to get some JSON data from another web application. Strangly, when we run the code on our developer machine everything is fine and we get the JSON data. But when the same application is deployed on a web server, we get an error saying The underlying connection was closed: An unexpected error occurred on a receive.Please note: our login mode is Windows authentication:&lt;authentication mode=&#8221;Windows&#8221;&gt; &lt;\/authentication&gt;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/00f334244ce709168e97b51e89620693?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\n4 revsHenry<br \/>\nweb-applications coldfusion<br \/>\nWhere do you do validation in a webapp (backend)?Option #1: Service layer? UserService.validate(FORM); \/\/ verify and returns struct of errorsOption #2: Object layer, on setter? e.g. user.setEmail(email); \/\/ throws invalid\/used e-mailOption #3: Object layer, validate()? e.g.user.init(FORM); \/\/ accept any values, no type checking user.validate(); \/\/ returns struct of errorsWhat&#8217;s your take? Thanks!<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/cc1741ee1f11a2340aa1d54d21562959?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGaim<br \/>\ninternet-explorer web-applications zk<br \/>\nI am using framework ZK to develop web applications and they have to be usable also in Internet Explorer 6+. I have registered event OnOK on the Textbox. This event should be emitted when key ENTER is pressed. In Firefox this works pretty well but in IE it doesn&#8217;t. Can anybody help me how to fix it, please? I&#8217;ll be very greatfulI am using framework versions 3.6 and 5, Firefox 3.5, Opera 10.60 and IEs are tested in IETester 0.4.4<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0e0ac290b833189cfaab8b5b060db879?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJav_Rock<br \/>\npython django web-services web-applications flask<br \/>\nQuestion is for programmers who have used Django and Flask for real projects.What challenges do you face going to the Flask?Interested in the situation when there may be unexpected difficulties (after using django).Specific examples are welcome.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/jRDzn.jpg?s=32&amp;g=1\" \/><br \/>\nNishant Ghodke<br \/>\nphp facebook facebook-graph-api web-applications<br \/>\n&lt;?phpsession_start();require_once &#8216;facebook.php&#8217;;$app_id = &#8220;418907881455014&#8221;;$app_secret = &#8220;36389d2c4caaf6de86982cb87686a494&#8221;;$redirect_uri = &#8216;http:\/\/gooogle12.comuf.com&#8217;$facebook = new Facebook(array(&#8216;appId&#8217; =&gt; $app_id,&#8217;secret&#8217; =&gt; $app_secret,&#8217;cookie&#8217; =&gt; true));$user = $facebook-&gt;getUser();$user_profile = $facebook-&gt;api(&#8216;\/me&#8217;);$coded = $_REQUEST[&#8216;code&#8217;];$access_token = $facebook-&gt;getAccessToken();$name = &#8220;&#8221;.$user_profile[&#8216;name&#8217;].&#8221;&#8221;;$fbid = &#8220;&#8221;.$user_profile[&#8216;id&#8217;].&#8221;&#8221;;function<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b600f642928e3d61ae6e689a3f50a01f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRajkumar Masaniayan<br \/>\nhttp caching web-applications<br \/>\nI would like to set a far future date for Expires for some commonly used but relatively unchanging content but am wondering how to inform web \/ browser cache to get the latest content from the server in case I have to unexpectedly push new stuff to the user?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8e7b3eb1f6bb311c47610a9d230485f0?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nc00000fd<br \/>\nc# asp.net web-applications httprequest<br \/>\nI&#8217;m not sure why am I getting such result.If I load the following URL into a browser:http:\/\/localhost:57845\/app.ashx?n=update&amp;url=some_url&amp;logo=long_logo_namewhere the app.ashx file contains this code:public void ProcessRequest(HttpContext context) {string strURL = context.Request.Params[&#8220;url&#8221;]; }My strURL variable becomes some_url,\/app.ashx. Any idea why?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e48d590095aefbbeb50b7722d5166ca5?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ntomzi<br \/>\nweb selenium-ide<br \/>\nI&#8217;m trying to get a command return with selenium ide by doing it : storeTextPresent|myText|title gotoIf|storedVars.tite|true echo|${&#8220;true&#8221;}but it doesnt work&#8230;i have : [error] Unexpected Exception: fileName -&gt; chrome:\/\/flowcontrol\/content\/extensions\/goto-sel-ide.js?1347871647495, lineNumber -&gt; 120.Does anybody know how to get the return? Thank you<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b0f047f8261516bbcb3c652413f240f9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPSJay Peng<br \/>\njava java-ee servlets web servlet-filters<br \/>\nI need do something special to specific Servlet class object by :if (currentServlet instanceof SpecificServlet) {\/\/ do something special&#8230; }But I can not find a method in FIlter to get the currentServlet.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/cc21bd143a63dbea51c2caa5f1e8599b?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBenjamin<br \/>\npython google-app-engine web webapp2<br \/>\nI&#8217;m building my new website using app-engine with python and webapp2 I&#8217;m having hard times to define the URIs in my web applicationthe result I need is:http:\/\/www.example.com\/ http:\/\/www.example.com\/products\/ http:\/\/www.example.com\/products\/tableI thought it&#8217;s an easy task, but apparently it is not (for me, anyway)I&#8217;m getting 404 error when I&#8217;m trying to load something like that: http:\/\/www.example.com\/products\/chair\/where is my mistake?app = webapp2.WSGIApplication([ webapp2.Route(&#8216;\/&#8217;, MainPage<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/afad62de57000fd316366f3f8ba12d39?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMyles Grant<br \/>\nregex security web user-input<br \/>\nI would like to take regexes from users and then run them against other user-submitted input and display the output. What do I need to keep in mind, if anything, to protect against attacks?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/78a0a4bb106d07b6c6f33a51988155e3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPeter Mortensen<br \/>\nc# .net iis web-applications web<br \/>\nWe are developing a mini social networking web application. It has to get some JSON data from another web application. Strangly, when we run the code on our developer machine everything is fine and we get the JSON data. But when the same application is deployed on a web server, we get an error saying The underlying connection was closed: An unexpected error occurred on a receive.Please note: our login mode is Windows authentication:&lt;authentication mode=&#8221;Windows&#8221;&gt; &lt;\/authentication&gt;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/85fdb1536da4846561928133d6bfc54d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nL-R<br \/>\npython asynchronous web tornado<br \/>\nJust trying to use the async functions of Tornado &#8211; I want to invoke a method from my handler but it keeps telling me that it &#8220;got an unexpected keyword argument &#8216;callback'&#8221;.class MyHandler(tornado.web.RequestHandler):@asynchronous@gen.enginedef get(self):response = yield gen.Task(self.dosomething, &#8216;argument&#8217;)self.write(response)self.finish()def dosomething(self, myargument):pass<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8e587a4232502a9f1ca14e2810e3c3dd?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDima Pasko<br \/>\nc# visual-studio-2010 service proxy web<br \/>\nEverybody i need some help about web servicesI want to add web service to my project but i got an error .Web service adress is https:\/\/interaktifkargo.ptt.gov.tr\/topluTakipDetay\/topluTakipDetayWhen i want to add vs2010 add web service Error is &#8216;https:\/\/interaktifkargo.ptt.gov.tr\/topluTakipDetay\/topluTakipDetay&#8217;accor while loading .connection close.The process of sending anunexpected error has occurred.Unexpected end of file, or 0 bytes were received transport stream.Metadata contains a reference<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e2cab065d2c4a76b073df28ed864c028?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBastien D<br \/>\nweb key hidden<br \/>\nActually, i have this url http:\/\/mydomain.fr\/user\/1 in my web application. I think it is not very safeI would hide the id which is auto_increment.To not be able to do that:http:\/\/mydomain.fr\/user\/1 http:\/\/mydomain.fr\/user\/2 http:\/\/mydomain.fr\/user\/3 http:\/\/mydomain.fr\/user\/4 http:\/\/mydomain.fr\/user\/[&#8230;]I do not know which technique to use&#8230;Hash MD5 stored beside primary key UUID \/ GUIDI use MySQL.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d446c68bcd717f4cbe155b045075d529?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\npeer754<br \/>\nc# api rest web<br \/>\nJust installed VS 2013 Express for Web and thought that I should try out some of the many tutorials. This one: create a rest api with attribute routingWhen I come to the place (Add a Web API Controller) where you should add a controller I get an unexpected error saying: There was an error running the selected code generator: &#8216;Method failed with unexpected error code 1337.&#8217;Searching for this error message points to threads here but I haven&#8217;t found a solution\/explanation yet.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4d45c83fdb54a1282d0bab540029ae07?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nM. Berkhof<br \/>\nc# web mime-types<br \/>\nIve seen application\/png and image\/png mimetypes, whats the difference between these two and why do both mimetypes exist?<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>user968834 jquery ios events web-applications click Building a web application and having trouble getting a click event to fire. It works perfectly when running from a normal instance of Safari, but when running from the home screen, it fails.$(&#8220;a.applink&#8221;).live(&#8216;click&#8217;, clickHandler); var clickHandler = function(e) {console.log(e);e.preventDefault(); }When running from the home screen, &#8216;e&#8217; is empty. If [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3066","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3066"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3066\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}