{"id":3444,"date":"2014-03-25T00:10:44","date_gmt":"2014-03-25T00:10:44","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/25\/javajqueryajaxurl-rewritingstruts2related-issues-collection-of-common-programming-errors\/"},"modified":"2014-03-25T00:10:44","modified_gmt":"2014-03-25T00:10:44","slug":"javajqueryajaxurl-rewritingstruts2related-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/25\/javajqueryajaxurl-rewritingstruts2related-issues-collection-of-common-programming-errors\/","title":{"rendered":"java,jquery,ajax,url-rewriting,struts2Related issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/88efa534b9a4305e7e30da4c7d568e2c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSotirios Delimanolis<br \/>\njava<br \/>\nIn the below programpackage test;public class test {public static void main(String args[]){\/\/System.out.println(2+3*4);int temp=0;temp+=temp++;System.out.println(temp);}}I do not understand why its giving me 0.Can any body please explain it?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/05779413dbb3915fa5b2f3ed82d66007?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nhsalimi<br \/>\njava php ruby django email<br \/>\nI am using django. I just want to know is it possible to check if an email is a correct one, so that it will be definitely delivered (99.99%)? If the user entered an email like klsdfksdajkfdn@skjdnf.com, it is technically a valid email but does not exist really. Can I detect such emails?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7725691bcff62c3309c373f1251d868c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSylvia Rosemond<br \/>\njava constructor setter<br \/>\npackage cen.col.course.demo;import java.io.Serializable;public class Course implements Serializable {private static final long serialVersionUID = 1L; protected String code; protected String title; protected Professor professor;public Course( String code) throws InvalidDataException {super();setCode(code); }public Course(String code, String title ) throws InvalidDataException {this(code);setTitle(title); }public Course(String code, String title, Professor professor) throws InvalidDataException<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/nvVhn.jpg?s=32&amp;g=1\" \/><br \/>\ncelloplayer<br \/>\njava exception try-catch<br \/>\nIf a method throws, say, an IOException, is there any negative effect from doing:catch (Exception ex){} instead ofcatch (IOException ex){}in my Java code?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/02522481c9b33f9b810db0fbab2e554d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser2424511<br \/>\njava sockets concurrency<br \/>\nI&#8217;ve got a pair of threads running a Socket and ServerSocket:runThreadA() {\/\/ Connects to B, or fails if B is not yet acceptingsocket.connect(); }runThreadB() {\/\/ Blocks until another thread connectsserverSocket.accept(); }Is there a way I can guarantee that B calls accept() and blocks before A calls connect()?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9611c06ea57e880f5b09538bf96e2d50?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAriel D. Moya Sequeira<br \/>\njava keystore pkcs#11<br \/>\nI&#8217;m using the following code to access the contents of a PKCS#11 smartcard from an Athena smartcard reader.Provider pkcs11Provider = new SunPKCS11(new ByteArrayInputStream (config.getBytes())); if (Security.getProvider(pkcs11Provider.getName()) != null) {Security.removeProvider(pkcs11Provider.getName()); }Security.addProvider(pkcs11Provider);KeyStore myKeyStore = KeyStore.getInstance (&#8220;PKCS11&#8221;, pkcs11Provider); myKeyStore.load(null, keystore_password.toCharArray());return myKeyStore;The problem<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/17551b2a537720b66ae0020b2995d441?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nArjan Tijms<br \/>\njava mysql netbeans java-ee ejb<br \/>\nHey I made an EJB program and I created entity classes form my SQL database. Everything worked fine and it can connect to my database, but I get this error now for some reason. Im using glassfish v3 and netbeans ide 6.8WARNING: Can not find resource bundle for this logger. class name that failed: com.sun.gjc.common.DataSourceObjectBuilder SEVERE: jdbc.exc_cnfe_ds java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSourcemore random errors here.WARNING: RAR5038:Unexpected ex<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/tfupx.jpg?s=32&amp;g=1\" \/><br \/>\ncybye<br \/>\njava performance memory<br \/>\nI performed a short benchmark on a long array in java with quite strange results. It seems that sequential reads with random writes are faster &#8211; half the time &#8211; than random reads with sequential writes. Has anyone a clue why??Here are two methods that write an array of some longs (run with -Xmx2G or so) by random when reading sequentially and read sequentially when writing by random:import java.util.Random;public class Scratch { static Random random = new Random(); static long[] arr = new long[1<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c422b640dd62b019c125836b1059e231?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAdrian Shum<br \/>\njava inheritance encapsulation<br \/>\npublic class test {public static void main(String[] args){new Person().printPerson();new Student().printPerson();} }class Student extends Person {public String getInfo(){return &#8220;Student&#8221;;} }class Person {private String getInfo(){return &#8220;Person&#8221;;}public void printPerson(){System.out.println(getInfo());} }The output to this is:Person PersonWhy is the second line not Student? The parent getInfo() is private but does that mean that the second call of printPerson() is prevented from finding the chil<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ac3410f38edbba2868cb4d7484b220c8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJDeveloper<br \/>\njava hibernate spring-mvc<br \/>\nI am total new to Spring and hibernate. I donot know where I am doing mistake. I am using spring 4.0.2 and Hibernate 3 with eclipse and tomcat.Project structure :-LibrariesWeb.xml&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt; &lt;web-app xmlns:xsi=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema-instance&#8221; xmlns=&#8221;http:\/\/java.sun.com\/xml\/ns\/javaee&#8221; xmlns:web=&#8221;http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_2_5.xsd&#8221; xsi:schemaLocation=&#8221;http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_3_0.xsd&#8221; i<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/034be0844072773b847cdddac9b09c0a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPool<br \/>\njavascript jquery html<br \/>\nI would like to display &#8220;password&#8221; as text in the password area, and when focused the box should become empty and allow normal password (starred out) input from the user.Currently I use the following method. Initially I display a text field showing password, when focused it is removed and replaced with a password field. Here is the jQuery:$(document).ready(function() {$(&#8220;#password&#8221;).focus( function() {$(&#8220;#pwd&#8221;).html(&#8216;&lt;input type=&#8221;password&#8221; id=&#8221;password&#8221; name=&#8221;password&#8221; value=&#8221;&#8221; \/&gt;&#8217;);$(&#8220;#pa<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/17cc17a100a91245c07ea67e1a7dcb72?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nuser3003460<br \/>\njquery ajax django file-upload<br \/>\nI am trying to build a small django pictures site using https:\/\/github.com\/sigurdga\/django-jquery-file-upload as a blueprint:My model is the following:class Picture(models.Model):test = models.SlugField(max_length=50, blank=True)slug = models.SlugField(max_length=50, blank=True)user = models.OneToOneField(User)file = models.ImageField(upload_to=&#8221;pictures&#8221;)def save(self, *args, **kwargs):self.slug = self.file.namesuper(Picture, self).save(*args, **kwargs)class PictureCreateView(CreateView):model<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8f0e2f63e81e8eda9bae82b956546c01?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSchart<br \/>\njavascript jquery google-chrome<br \/>\nSo I&#8217;ve tested this in Firefox as well and it works perfectly fine there, but when I opened my website in Chrome, none of the JS was working and I managed to find the chuck of code that is preventing it from loading. Here it is:\/* LOAD NEW PAGE STREAM *\/ $(&#8220;.nextpage&#8221;).click(function(){var id = parseInt($(this).attr(&#8220;currentmax&#8221;), 10);$(&#8220;#allpostcontainer&#8221;).load(&#8220;\/streampage.php?id=&#8221; + id);$(&#8220;.nextpage&#8221;).attr(&#8220;currentmax&#8221;, id+10);$(&#8220;.prevpage&#8221;).attr(&#8220;currentmax&#8221;, id+10);if (id =&gt; 10){$(&#8220;.prev<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/84IFQ.png?s=32&amp;g=1\" \/><br \/>\nmmelear<br \/>\njavascript jquery ajax<br \/>\nI am trying to send an AJAX request to my spring backend. I am hitting the controller, and am successfully responding. I am new to javascript and AJAX, so I have hit a ceiling that I cannot get through. I am trying to call &#8220;done&#8221; on a successful callback, and am getting a very non-descript error. This is my console after I push &#8220;button&#8221;clicked testAjax. js:3 Uncaught SyntaxError: Unexpected token : product:1I haven&#8217;t created a product file, but when I go into it I get the object I am trying to<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/61ee1ef42c85803b7cdb06ffd476404a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAlex Ford<br \/>\njavascript jquery html events dom<br \/>\nI am writing a jQuery plugin. In this plugin I wrap the existing BODY contents in a DIV and hide them.var $originalBodyContents = $(&#8216;body&#8217;).wrapInner(&#8216;&lt;div&gt;&#8217;).children(&#8216;div&#8217;).hide();The plugin then appends its own overlay DIV to the BODY and does it&#8217;s plugin magic. When the user exits the plugin removes its overlay DIV, and unwraps them.$originalBodyContents.children().unwrap();This is working great, as you can see in this demo: http:\/\/jsfiddle.net\/vKddB\/1\/However, if there are content scr<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e3f9fa39dd47cf9487995cbec0bddca6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMiika L.<br \/>\njquery html ajax load<br \/>\nI am using following code to load a html page inside a div,$(&#8220;#htmlViewer&#8221;).load(&#8220;conversion_test\/to_convert_3264\/&#8221;+getPageName(pageCount)+&#8221;.htm&#8221;, function(response, status, xhr) {if (status == &#8220;error&#8221;) {\/* var msg = &#8220;Sorry but there was an error: &#8220;;$(&#8220;#error&#8221;).html(msg + xhr.status + &#8221; &#8221; + xhr.statusText); *\/jAlert(&#8216;Unexpected Error : Please try again later&#8217;, &#8216;Alert&#8217;);pageCount&#8211;;}});In the above code I am getting only the HTML text but I am not getting CSS and the images in that page. To get t<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/64839d31baaefafa58120e1a5a503d66?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJohn Conde<br \/>\njavascript php jquery ajax<br \/>\nI&#8217;m simply trying to read in a field from a text box, pass the value via ajax to PHP and then store the data in a mysql table. The table is already set up and ready to go, all I need is to insert values. Here is my js file var address = $(&#8220;input#email&#8221;).val(); \/\/If submission is valid if(submitForm == &#8220;true&#8221;){$.ajax({ url: &#8220;bin\/process.php&#8221;, type: &#8220;POST&#8221;, data: {email: address}, success: function(response) { $(&#8216;#message&#8217;).html(response); }}); return false; }And then my PHP looks like this<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e5594b71e9f54f3e73f6294b054f5616?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nduncan<br \/>\njavascript jquery json google-maps-api-3<br \/>\nHere&#8217;s my code:&lt;script src=&#8221;\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.11.0\/jquery.min.js&#8221;&gt;&lt;\/script&gt; &lt;script&gt;var API = &#8220;https:\/\/maps.googleapis.com\/maps\/api\/geocode\/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&amp;sensor=true&#8221;;var API = &#8220;https:\/\/maps.googleapis.com\/maps\/api\/place\/textsearch\/json?query=chicken+greenvile+sc&amp;sensor=true&#8221;;$.getJSON(API, function (data) {console.log(data); }); &lt;\/script&gt;If I comment out the second var API, I get a returned result<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/58422518091f8f331ec7af8b029b9277?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1605822<br \/>\nc# javascript jquery asp.net datetimepicker<br \/>\nI am having trouble with displaying a date time on a page in a Textbox. See on Fiddle: http:\/\/jsfiddle.net\/LkpPJ\/5\/Internet explorer and Firefox show: 2013-12-16T01:00Chrome shows: 12\/16\/2013 01:00 AMJavascript Console in Internet explorer and Firefox says:Error parsing the date\/time string: Unexpected literal at position 2date\/time string = 2013-12-16T01:00 timeFormat = hh:mm TT dateFormat =mm\/dd\/yyASP.NET C# Code:StartDatePicker.Text = dtStartDate.ToString(&#8220;yyyy-MM-ddTHH:mm&#8221;); &lt;asp:TextBox<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/38e249098df3eeb83da393c1b2616a24?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nFabr\u00edcio Matt\u00e9<br \/>\njquery autocomplete<br \/>\nI&#8217;m trying to implement this web api autocomplete in a standard mvc app. http:\/\/techbrij.com\/987\/jquery-ui-autocomplete-asp-net-web-apiHere&#8217;s a screen grab from Firebug http:\/\/sdrv.ms\/N0WkHPI&#8217;ve created a controller method and added the jquery script, but I keep getting a &#8216;JSON.parse: unexpected character&#8217; error. I don&#8217;t see any unusual characters in my data.$(document).ready(function () { $(&#8216;#txtSearch3&#8217;).autocomplete({source: function (request, response) {$.ajax({url: &#8216;\/home\/Get&#8217;,type: &#8216;GET&#8217;,c<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9a514cd424088a3ba3012f5d77f2e334?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPeter O.<br \/>\njavascript ajax<br \/>\nIn my site I have:&#8230; &lt;script type=&#8221;text\/javascript&#8221; src=&#8221;https:\/\/www.google.com\/jsapi&#8221;&gt;&lt;\/script&gt; &#8230;The script above is the Google script to load up other resources dynamically. (eg Google charts API) This works 99.99% of the time. However, I just got a client that for some reasons got his company restricting access to google.com.As a consequence of this my website simply threw a JavaScript error.Now I know how to handle that, and I can check if window.Google exists. but my questio<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/85db777de4927872264462cdd975dd2a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nNeil<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/17cc17a100a91245c07ea67e1a7dcb72?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nuser3003460<br \/>\njquery ajax django file-upload<br \/>\nI am trying to build a small django pictures site using https:\/\/github.com\/sigurdga\/django-jquery-file-upload as a blueprint:My model is the following:class Picture(models.Model):test = models.SlugField(max_length=50, blank=True)slug = models.SlugField(max_length=50, blank=True)user = models.OneToOneField(User)file = models.ImageField(upload_to=&#8221;pictures&#8221;)def save(self, *args, **kwargs):self.slug = self.file.namesuper(Picture, self).save(*args, **kwargs)class PictureCreateView(CreateView):model<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/84IFQ.png?s=32&amp;g=1\" \/><br \/>\nmmelear<br \/>\njavascript jquery ajax<br \/>\nI am trying to send an AJAX request to my spring backend. I am hitting the controller, and am successfully responding. I am new to javascript and AJAX, so I have hit a ceiling that I cannot get through. I am trying to call &#8220;done&#8221; on a successful callback, and am getting a very non-descript error. This is my console after I push &#8220;button&#8221;clicked testAjax. js:3 Uncaught SyntaxError: Unexpected token : product:1I haven&#8217;t created a product file, but when I go into it I get the object I am trying to<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/946877067eaa2881b242e1b6fe6d5673?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMunzilla<br \/>\njavascript ajax html5 websocket accessibility<br \/>\nOne of the major requirements for accessibility standards such as WCAG is that the web site or application displays without the use of javascript or provides some sort of non JS alternative. I did some initial research and couldn&#8217;t find much information on this in regard to websockets. Should I assume websockets are treated similar to AJAX?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e3f9fa39dd47cf9487995cbec0bddca6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMiika L.<br \/>\njquery html ajax load<br \/>\nI am using following code to load a html page inside a div,$(&#8220;#htmlViewer&#8221;).load(&#8220;conversion_test\/to_convert_3264\/&#8221;+getPageName(pageCount)+&#8221;.htm&#8221;, function(response, status, xhr) {if (status == &#8220;error&#8221;) {\/* var msg = &#8220;Sorry but there was an error: &#8220;;$(&#8220;#error&#8221;).html(msg + xhr.status + &#8221; &#8221; + xhr.statusText); *\/jAlert(&#8216;Unexpected Error : Please try again later&#8217;, &#8216;Alert&#8217;);pageCount&#8211;;}});In the above code I am getting only the HTML text but I am not getting CSS and the images in that page. To get t<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/64839d31baaefafa58120e1a5a503d66?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJohn Conde<br \/>\njavascript php jquery ajax<br \/>\nI&#8217;m simply trying to read in a field from a text box, pass the value via ajax to PHP and then store the data in a mysql table. The table is already set up and ready to go, all I need is to insert values. Here is my js file var address = $(&#8220;input#email&#8221;).val(); \/\/If submission is valid if(submitForm == &#8220;true&#8221;){$.ajax({ url: &#8220;bin\/process.php&#8221;, type: &#8220;POST&#8221;, data: {email: address}, success: function(response) { $(&#8216;#message&#8217;).html(response); }}); return false; }And then my PHP looks like this<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/TM21B.jpg?s=32&amp;g=1\" \/><br \/>\nHelena Standaert<br \/>\njavascript ajax angularjs<br \/>\nI&#8217;m building an angular app where I have a &#8216;public transportation&#8217; section and I want to get directions from the google api. I seem to get a valid url &#8211; when I enter the url in my browser, it returns the json. But I get an error when user $.ajax.Urlhttp:\/\/maps.googleapis.com\/maps\/api\/directions\/json? origin=Assenede,%20Belgi%C3%AB&amp;destination=Industrieweg%20232,Gent- Mariakerke,belgium&amp;sensor=false&amp;departure_time=1343641500&amp;mode=transitFunction in angular controller$scope.getDire<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/073bd0ac810b0e3a4d040765f62a6bd8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1871612<br \/>\njavascript jquery ajax<br \/>\nTo ask about getscripthtml Code as follows:&lt;!DOCTYPE html PUBLIC &#8220;- \/ \/ W3C \/ \/ DTD XHTML 1.0 Transitional \/ \/ EN&#8221; &#8220;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&#8221;&gt; &lt;html&gt;&lt;head&gt; &lt;title&gt;jQuery GetScript&lt;\/title&gt; &lt;script src=&#8221;http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.8.3\/jquery.min.js&#8221;&gt;&lt;\/script&gt; &lt;script type = &#8220;text \/ javascript &#8220;&gt; $(document). ready(function () {$getScript (&#8216;script.js&#8217;, function (jd) {$.each (test, function (index, valu<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/8b2785c76d44f8a92108dbeb25595cd7?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRohan Kumar<br \/>\nphp jquery ajax json<br \/>\nHi friends can anyone me for this plz. im new to this chapter..i am trying to get JSON format value from PHP but while im running i got this output &#8220;SyntaxError: JSON.parse: unexpected characte&#8221;.. i think i had done mistake in php conversion &#8230;plz help me friends my .html file&lt;html&gt; &lt;head&gt;&lt;script src=&#8221;http:\/\/code.jquery.com\/jquery-1.8.3.min.js&#8221;&gt;&lt;\/script&gt;&lt;title&gt;Display Page&lt;\/title&gt; &lt;\/head&gt; &lt;body&gt;&lt;button type=&#8217;button&#8217; id=&#8217;getdata&#8217;&gt;GetData.&lt;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/191dbc0ae8b2e1192d867f5e806bbf71?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSumurai8<br \/>\nphp forms .htaccess mod-rewrite url-rewriting<br \/>\ni have problem with mod rewritei made htaccess to convert url from php to htmland every thing finebut problem is some file i dont need to convert like form.phpthis is my htaccessRewriteCond %{REQUEST_URI} !^(.*)form.php(.*)$ RewriteCond %{REQUEST_URI} !^(.*)sitemap\\.xml(.*)$ RewriteCond %{THE_REQUEST} ^[A-Z]+\\s([^\/]+)\\.php\\s RewriteRule .* %1.html [R=301,L] RewriteRule ^([^\/]*)\\.html$ $1.php RewriteCond %{ENV:REDIRECT_STATUS} 200 RewriteRule ^.*$ &#8211; [L] RewriteRule ^index.php$ http:\/\/%{http_host}<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/nZEUQ.png?s=32&amp;g=1\" \/><br \/>\nPeeHaa<br \/>\nphp .htaccess codeigniter url url-rewriting<br \/>\nI tried to make my website&#8217;s URL cleaner(and SEO friendly) by removing the index.php from my URLs but unexpected results happend, this is my .htaccess file: &lt;IfModule mod_rewrite.c&gt; &lt;IfModule mod_rewrite.c&gt;RewriteEngine OnRewriteBase \/### Canonicalize codeigniter URLsRewriteRule ^(site(\/index)?|index(\\.php)?)\/?$ \/ [L,R=301]RewriteRule ^(.*)\/index\/?$ $1 [L,R=301]# Removes trailing slashes (prevents SEO duplicate content issues)RewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.+)\/$ $1<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a9840656ceee0faa528806c4c04a9399?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKev<br \/>\nasp.net iis-7 url-rewriting web-config<br \/>\nI am using IIS7&#8217;s URLRewrite feature to hide the .aspx extension in my ASP.NET WebForms application&#8217;s URLs. I&#8217;m using the following configuration:&lt;rule name=&#8221;WebFormsToMVC&#8221; stopProcessing=&#8221;true&#8221;&gt; &lt;match url=&#8221;^(.*?)\\.aspx\\?*?.*$&#8221; \/&gt; &lt;conditions&gt; &lt;add input=&#8221;{REQUEST_FILENAME}&#8221; matchType=&#8221;IsFile&#8221; negate=&#8221;true&#8221; \/&gt; &lt;add input=&#8221;{REQUEST_FILENAME}&#8221; matchType=&#8221;IsDirectory&#8221; negate=&#8221;true&#8221; \/&gt; &lt;\/conditions&gt; &lt;action type=&#8221;Rewrite&#8221; url=&#8221;{R:1}&#8221; \/&gt; &lt;\/rule&gt;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/4ce1db5900dc701fa18c32d4d1ad047a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nCarl Manaster<br \/>\nphp apache .htaccess mod-rewrite url-rewriting<br \/>\nMy last post was met by smarmy, unhelpful &#8220;answers&#8221; (comments), so i&#8217;ll get right to it:if I have an htaccess file like so:RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\\.php -f RewriteRule ^(.*)$ $1.phpRewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ &#8211; [L] RewriteRule ^([^\/]+)\/([^\/]+)$ \/index.php?page=$1&amp;subject=$2 RewriteRule ^([^\/]+)$ \/index.php?page=$1 [L]how can I allow for other url variable names and values to be handled&#8230; say for instance I want<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/dJZWX.jpg?s=32&amp;g=1\" \/><br \/>\nSalesforceQueries<br \/>\njavascript url-rewriting salesforce remoting visualforce<br \/>\nI am getting an error when I use JavaScript remoting and have my URLReWriter turned on on my Force.com SIte. The error does not occur when using JavaScript Remoting with the URL ReWriter turned off.The error is as followsException Error parsing json response: &#8216;Unexpected token &lt;&#8216;. Logged in? I&#8217;m confused as to why this is occuring. If I have no checks for being logged in in my URL ReWriter (or visualforce page) why should this occur?Has anyone ever come across something similar to this befor<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f88689c61045fa62272965aae524cdb4?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSlovaN<br \/>\nregex mod-rewrite url-rewriting apache2<br \/>\nI&#8217;m playing with apache rewrite_mod (Apache\/2.2.17 Win32) and encounter very weird behave of rewriteRule.My script primarily rewrite infinite filter parameters named f1 .. f&lt;infinity&gt; from nice url and in loop adding them as query variables, add path as query, and page number.It works flawlessly, but if I add one another rule (last rule in script)RewriteRule ^(.+)\\.html$ \/index.php?path=$1.html [QSA]which is for another cases, it change execution of rewriterule at s<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9270737ce9487fbaabc328f0dfccee29?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRohit Pande<br \/>\nurl-rewriting htaccess<br \/>\nAs per the answer provided in How to create custom URL routes? I have created the rewrite rule using the same function provided.add_action( &#8216;init&#8217;, &#8216;wpse26388_rewrites_init&#8217; ); function wpse26388_rewrites_init(){add_rewrite_rule(&#8216;gallery\/([0-9]+)\/?$&#8217;,&#8217;gallery?custom_gallery_id=$1&#8242;,&#8217;top&#8217; ); }After the flushing of the rules .htaccess file was having the following rule :RewriteRule ^gallery\/([^\/]+)\/?$ \/wordpress\/gallery?custom_gallery_id=$1 [QSA,L]upto this point everything was fine then I<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/iAkAS.png?s=32&amp;g=1\" \/><br \/>\nG. M.<br \/>\nurl-rewriting add-rewrite-rule<br \/>\nI am using URL rewrite like this page: unexpected problem in url rewriteIt works without any problem, but when I try to use the same rules for nested page, it doesn&#8217;t work. Say, I have two pages named page-a and page-b. page-a is parent for page-b. Now I want to catch the passed variable. The URL structure will be:page-a\/page-b\/ page-a\/page-b\/var1\/ page-a\/page-b\/var1\/var2\/ page-a\/page-b\/var1\/var2\/var3\/So, I created three rules. The full code is as follows:add_filter( &#8216;query_vars&#8217;, &#8216;wpse26388_que<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/nyzNK.png?s=32&amp;g=1\" \/><br \/>\nPaul<br \/>\nasp.net database url url-rewriting url-routing<br \/>\nI have single aspx page to view product details. i have stored url of each product in database against each productid. Now please guide me how we can generate http url from url text stored in database dynamically which is bookmarkable also.Basically i am looking for url that stakeoverflow generate at runtime.Thanks,Paul<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a7cd283f886e60241d921289f3c83f23?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMartin<br \/>\nasp.net-mvc url-rewriting url-routing<br \/>\nIm trying to make a very simple application that lets my client create their own pages. The hard part is to let them create thir own URL.Client need to fill in:Page name (ex. About us). Page description (ex. We are a big company). Page URL relative (ex. \/About)When client enter this information and save, it should be saved in the database.I can easily create a controller named &#8220;Page&#8221; which takes a value &#8220;ID&#8221; and when a user enters &#8220;www.someurl.com\/Page\/1&#8221; the newly created page pops up.But what<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bca617231294691f95f0e9f0ee623630?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRoman C<br \/>\njava parameters struts2 interceptor<br \/>\nI am trying to understand the use of ActionMappingParametersInteceptor class in Struts2. Looking in the API:This interceptor sets all parameters from the action mapping, for thisrequest, on the value stack. It operates exactly likeParametersInterceptor, only the parameters come from theActionMapping, not the ActionContext.getParameters() method.Is there a case where an ActionMapping class might contain a different set of request parameters than the ones I am getting from the ActionContext.getPar<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5fb01dfa9d0b2ca46a9a4baa426c2879?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\naksamit<br \/>\njava jsp struts2 struts<br \/>\nI am following the Struts 2 Tutorial &#8211; Using Struts 2 TagsSo far everything have been working as expected until I added the following to index.jsp:&lt;s:url action=&#8221;hello&#8221; var=&#8221;helloLink&#8221;&gt;&lt;s:param name=&#8221;userName&#8221;&gt;Bruce Phillips&lt;\/s:param&gt; &lt;\/s:url&gt; &lt;p&gt;&lt;a href=&#8221;${helloLink}&#8221;&gt;Hello Bruce Phillips&lt;\/a&gt;&lt;\/p&gt;Expected result is that the anchor-link (Hello Bruce Phillips) should be substituted with corresponding URL for hello.action with parameter userName encod<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bfd13ef154c3b67882d34c9b84e737f9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nsjr<br \/>\njava spring struts2 javabeans<br \/>\nI&#8217;m developing a web-app using Struts 2 with a Spring 3 backend. I&#8217;m using Spring aop:proxy beans to handle my session beans rather than the Struts 2 SessionAware interface. Everything was working fine until I have an Action that is running under the Struts ExecAndWait interceptor. Because this interceptor in effect runs my action under a seperate thread, when I come to try and access my proxied session bean, I get a BeanCreationException\/IllegalStateException. Is there another &#8220;spring way&#8221; that<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b354bb952b6a63379d6d8636d73801e4?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDarkKnightFan<br \/>\najax jsp struts2 servlet-filters session-timeout<br \/>\nI am making ajax calls from my JS methods to invoke the action class&#8217;s methods in the following manner:$.getJSON(&#8220;treeDemo_!getRootNode?appId=&#8221; + applicationId, function () {}).success(function (e) {}).error(function (jqXHR, textStatus, errorThrown) {alert(textStatus);}).complete(function () {});Session configuration in my web.xml looks like this&lt;session-config&gt;&lt;session-timeout&gt;1&lt;\/session-timeout&gt; &lt;\/session-config&gt;Now when the session expires after 1 minute, the ajax call<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bca617231294691f95f0e9f0ee623630?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRoman C<br \/>\njava jsp struts2 struts ognl<br \/>\nI have a situation where in Struts application I have select tag and some values inside it&lt;select name=&#8217;locale&#8217;&gt;&lt;option value = &#8220;DATA1&#8221;&gt;FR_DATA1&lt;\/option&gt;&lt;option value = &#8220;DATA2&#8221;&gt;FR_DATA2&lt;\/option&gt;&lt;option value = &#8220;DATA3&#8221;&gt;FR_DATA3&lt;\/option&gt;&lt;option value = &#8220;DATA4&#8221;&gt;FR_DATA4&lt;\/option&gt;&lt;option value = &#8220;DATA5&#8221;&gt;FR_DATA5&lt;\/option&gt;&lt;\/select&gt;now problem is that when I submit the form the value passed to setter method of the action form is lab<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3198238aa6bdedbcda019b46c685069f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMiguel Ribeiro<br \/>\njavascript json exception struts2<br \/>\nI have this JSon string received from an AJAX call: {status:OK,addresses:[0,1,2,3,4,5]}To convert it to a JSon object I have this line:var jsonObj = eval(jsonString);But an exception is thrown! This one has no message in the exception variable. I also tried using{&#8220;status&#8221;:&#8221;OK&#8221;,&#8221;addresses&#8221;:[0,1,2,3,4,5]}And, yet again, an exception is thrown but saying that an unexpected character &#8216;&amp;&#8217; was found.I&#8217;m using Struts2 and the JSon is received from an action.Any help will be appreciated. Thank you<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1290bc9a01fb4d07e276b52f92536947?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nbuzzsawddog<br \/>\njava struts2<br \/>\nFor some reason I am getting the following error message:Developer Notification (set struts.devMode to false to disable this message): Unexpected Exception caught setting &#8216;claimForm.payableEvents[1].totalHours&#8217; on &#8216;class com.somedomain.application.action.claimreimbursement.ProcessSaveClaimFormAction: Error setting expression &#8216;claimForm.payableEvents[1].totalHours&#8217; with value &#8216;[Ljava.lang.String;@54f242c1&#8217; Developer Notification (set struts.devMode to false to disable this message): Unexpected Ex<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bca617231294691f95f0e9f0ee623630?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nRoman C<br \/>\njava list jsp struts2 ognl<br \/>\nThis is the form I am using to repopulate the ArrayList&lt;form method = &#8220;POST&#8221; action = &#8220;addItemsToTemplate&#8221;&gt;&lt;s:iterator value = &#8220;myQuestions&#8221; var = &#8220;quizItem&#8221; status=&#8221;key&#8221;&gt;&lt;s:textfield name = &#8220;quizItem.question&#8221;\/&gt; &lt;\/s:iterator&gt;&lt;input type = &#8220;submit&#8221; value = &#8220;submit&#8221;\/&gt; &lt;\/form&gt;This is the action class public class QuizTest extends ActionSupport{public String execute(){List&lt;Question&gt; q= myQuestions;System.out.println(myQuestions);return &#8220;success&#8221;;}public<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d3fd7567a373d134aeaffe8c9d4311d6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDennis<br \/>\njavascript struts2 escaping<br \/>\nI read some struts2 variable in javascript as follows:&lt;javascript type=&#8221;text\/javascript&#8221;&gt; var data='&lt;s:property value=&#8221;simulationInfos&#8221;\/&gt;&#8217;; &lt;javascript&gt;If my simulationInfos contains single quote &#8216;, I get the error : unexpected identifier.therefore, I tried to escape the quote as follows:var data='&lt;s:property value=&#8221;simInfos&#8221; escapeJavaScript=&#8221;true&#8221;\/&gt;&#8217;; and var data='&lt;s:property value=&#8221;simInfos&#8221; escapeHTML=&#8221;true&#8221;\/&gt;&#8217;;I get the error: Attribute escapeJavaScript (or e<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5ad106352f4025af8fb0aff6a27fe1d2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAndrea Ligios<br \/>\nhibernate struts2 struts ognl<br \/>\nStruts 2 is giving a strange behavior that the commercial,productCategory objects is not set on on form submission.It happens in some cases like these.Other fields are getting set properly Most of the cases struts 2 is setting the custom objects very well and even for complex objects like List inside a object but in this case it is giving strange behavior.Can somebody help in this.Can i debug the struts 2 code to check why it is not setting the property.If possible let me know the steps Hibern<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sotirios Delimanolis java In the below programpackage test;public class test {public static void main(String args[]){\/\/System.out.println(2+3*4);int temp=0;temp+=temp++;System.out.println(temp);}}I do not understand why its giving me 0.Can any body please explain it? hsalimi java php ruby django email I am using django. I just want to know is it possible to check if an email is a correct [&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-3444","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3444","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=3444"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3444\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}