Search Results

Search found 28879 results on 1156 pages for 'pretty url'.

Page 121/1156 | < Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >

  • Sorting list of URLs by length in Jython

    - by Eef
    Hi, I am writing a Jython script to sort a list of URLs. I have a list that looks like this: http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 The pipe and the comma separates the path from the amount of files that are under that path. Is it possible some how use Jython to order the URLs by length, so it would end up look like the below list: http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 Hope you guys get what I mean, any help would be appreciated. Cheers

    Read the article

  • Getting a full list of the URLS in a rails application

    - by Laurie Young
    How do I get a a complete list of all the urls that my rails application could generate? I don't want the routes that I get get form rake routes, instead I want to get the actul URLs corrosponding to all the dynmically generated pages in my application... Is this even possible? (Background: I'm doing this because I want a complete list of URLs for some load testing I want to do, which has to cover the entire breadth of the application)

    Read the article

  • Asp.Net 3.5 Routing to Webservice?

    - by Maushu
    I was looking for a way to route http://www.example.com/WebService.asmx to http://www.example.com/service/ using only the ASP.NET 3.5 Routing framework without needing to configure the IIS server. Until now I have done what most tutorials told me, added a reference to the routing assembly, configured stuff in the web.config, added this to the Global.asax: protected void Application_Start(object sender, EventArgs e) { RouteCollection routes = RouteTable.Routes; routes.Add( "WebService", new Route("service/{*Action}", new WebServiceRouteHandler()) ); } ...created this class: public class WebServiceRouteHandler : IRouteHandler { public IHttpHandler GetHttpHandler(RequestContext requestContext) { // What now? } } ...and the problem is right there, I don't know what to do. The tutorials and guides I've read use routing for pages, not webservices. Is this even possible? Ps: The route handler is working, I can visit /service/ and it throws the NotImplementedException I left in the GetHttpHandler method.

    Read the article

  • What is the query string of a BlazeDS request?

    - by dacracot
    I have a Tomcat service running on localhost:8080 and I have installed BlazeDS. I created and configured a simple hello world application like this... package com.adobe.remoteobjects; import java.util.Date; public class RemoteServiceHandler { public RemoteServiceHandler() { //This is required for the Blaze DS to instantiate the class } public String getResults(String name) { String result = “Hi ” + name + “, the time is : ” + new Date(); return result; } } With what query string can I invoke RemoteServiceHandler to my Tomcat instance via just a browser? Something like... http://localhost:8080/blazeds/?xyz

    Read the article

  • Regex to match all valid links

    - by Unkwntech
    In regards to this: http://stackoverflow.uservoice.com/pages/general/suggestions/103227-parser-does-not-match-all-valid-urls is this regex adequate or will it need to be refined, if it needs to be refined how so? \b(?P<link>(?:.*?://)[\w\-\_\.\@\:\/\?\#\=]*)\b

    Read the article

  • Android Autolink to launch WebView

    - by Jason Kim
    Hi, I'm using autoLink="web" attribute in TextView to launch Browser. However, I want to launch the myActivity with WebView, when I click the links in TextView. Is is possible that catch the click event and invoke startActivity? Thanks in advance, Jason

    Read the article

  • Detect the URI encoding automatically in Tomcat

    - by Roland Illig
    I have an instance of Apache Tomcat 6.x running, and I want it to interpret the character set of incoming URLs a little more intelligent than the default behavior. In particular, I want to achieve the following mapping: So%DFe => Soße So%C3%9Fe => Soße So%DF%C3%9F => (error) The bevavior I want could be described as "try to decode the byte stream as UTF-8, and if it doesn't work assume ISO-8859-1". Simply using the URIEncoding configuration doesn't work in that case. So how can I configure Tomcat to encode the request the way I want? I might have to write a Filter that takes the request (especially the query string) and re-encodes it into the parameters. Would that be the natural way?

    Read the article

  • How to setup .htaccess to rewrite to different folder

    - by Guy
    I'm moving my site to a new host but I need to have my current server continue to handle requests (not all files can be moved to the new server). So I added a parked domain to my old server (old.mydomain.com) and I want all requests to it to be written to the files from the old site. My old site (mydomain.com) was hosted internally in a folder (/public_html/mydomain/) and I want all requests to old.mydomain.com to be rewritten to the same folder. So if mydomain.com/blog was internally at /public_html/mydomain/blog I now want old.mydomain.com/blog also to reach /public_html/mydomain/blog. Here is the .htaccess that I'm trying to use: RewriteCond %{HTTP_HOST} ^old\.mydomain\.com/* RewriteRule ^(.*)$ mydomain/$1 [NC,L] but for some reason as soon as I add the $1 in the rewrite rule I get an internal error. Any ideas?

    Read the article

  • Rule not redirecting .co.uk to .com

    - by bateman_ap
    I have been trying to get my site, when a visitor goes to .co.uk to be automatically redirected to .com. As well as if they go to domain.com to be taken to www.domain.com I have the code below in my httpd.conf, it appears to be working with domain.com to www.domain.com but not domain.co.uk or www.domain.co.uk to www.domain.com RewriteEngine on RewriteBase / RewriteCond %{http_host} ^domain.com [NC,OR] RewriteCond %{http_host} ^domain.co.uk [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,NC]

    Read the article

  • JS encodeURIComponent result different from the one created by FORM

    - by Marco Demaio
    I thought values entered in forms are properly encoded by browsers. But this simple test shows it's not true: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title></title> </head><body> <form id="test" action="test_get_vs_encodeuri.html" method="GET" onsubmit="alert(encodeURIComponent(this.one.value));"> <input name="one" type="text" value="Euro-€"> <input type="submit" value="SUBMIT"> </form> </body></html> When hitting submit button: encodeURICompenent encodes input value into "Euro-%E2%82%AC" while browser into the GET query writes only a simple "Euro-%80" Could somone explain? Or is encodeURIComponent doing unnecessary conversions?

    Read the article

  • CodeIgniter: Page not found when passing parameters to a controller???

    - by thedp
    Hello, I'm trying to pass parameters to a control in codeigniter, but I'm getting 404 page not found error, I don't get it, I did what the guide says: http://codeigniter.com/user_guide/general/controllers.html#passinguri <?php class Main extends Controller { function index($username) { echo $username; } } ?> How can I get more info regarding this error from codeigniter? Thank you.

    Read the article

  • Why did mislav-will_paginate start adding so much garbage to urls between rails 2.3.2 and 2.3.5?

    - by user30997
    I've used will_paginate in a number of projects now, but when I moved one of them to Rails 2.3.5, clicking on any of the pagination links (page number, next, prev, etc.,) went from getting nice URLs like this: http://foo.com/user/1/date/2005_01_31/phone/555-6161 to this: http://foo.com/?options[]=user&options[]=date&options[]=2005_01_31&options[]=phone&options[]=555-6161 I have a route that looks like this that is probably the source of the 'options' keyword: map.connect '/browse/*options', :controller=>'assets', :action=>'browse' It's enough of an annoyance that I'm willing to roll a paginator to get around this if there isn't a way to get back to where I was before. Is there a way to get will_paginate to turn array-style routes into sane urls again? Thanks.

    Read the article

  • Calling webservice via server causes java.net.MalformedURLException: no protocol

    - by Thomas
    I am writing a web-service, which parses an xml file. In the client, I read the whole content of the xml into a String then I give it to the web-service. If I run my web-service with main as a Java-Application (for tests) there is no problem, no error messages. However when I try to call it via the server, I get the following error: java.net.MalformedURLException: no protocol I use the same xml file, the same code (without main), and I just cannot figure out, what the cause of the error can be. here is my code: DOMParser parser=new DOMParser(); try { parser.setFeature("http://xml.org/sax/features/validation", true); parser.setFeature("http://apache.org/xml/features/validation/schema",true); parser.setFeature("http://apache.org/xml/features/validation/dynamic",true); parser.setErrorHandler(new myErrorHandler()); parser.parse(new InputSource(new StringReader(xmlFile))); document=parser.getDocument(); xmlFile is constructed in the client so: String myFile ="C:/test.xml"; File file=new File(myFile); String myString=""; FileInputStream fis=new FileInputStream(file); BufferedInputStream bis=new BufferedInputStream(fis); DataInputStream dis=new DataInputStream(bis); while (dis.available()!=0) { myString=myString+dis.readLine(); } fis.close(); bis.close(); dis.close(); Any suggestions will be appreciated!

    Read the article

  • Robots Crawling Across Namespace?

    - by Codex73
    I migrated site from one domain to another. Also placed permanent redirection on old account. My stats logs are capturing this: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) /libro_metaboforte_chap5.php/members/members/file_chap6.php I placed this on robots which wasn't present at time of migration. Robots.txt Contents User-agent: * Allow: / Disallow: /members/ Disallow: /includes/ HTACCESS FILE CONTENTS DirectoryIndex index.php index.html Options +FollowSymlinks RewriteEngine On # Turn on the rewriting engine RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/store/?$ RewriteCond %{QUERY_STRING} !. RewriteRule ^.+/?$ index.php [QSA,L] RewriteCond %{QUERY_STRING} ^curlang=([a-z]*)$ RewriteRule ^.+/?$ index.php? [QSA,L] Will continue to log incoming bot captures. My htaccess does rewrite. I just added the robot file. The funny part is that is stepping in double directories... I don't know if the problem was not having the 'robots.txt' in place or the actual in place htaccess doing rewrites?

    Read the article

  • Exclude routing parameters in VaryByParam for Asp.Net 4

    - by HasanGursoy
    I have a routing setting in my global.asax file: routes.MapPageRoute("video-browse", "video/{id}/{title}/", "~/routeVideo.aspx"); My routeVideo.aspx page has caching setting: <%@ OutputCache Duration="10" Location="ServerAndClient" VaryByParam="id" %> But when I request http://localhost/video/6/example1 and http://localhost/video/6/example2 after this, the page is created again. So I think VaryByParam works for * but I only want compile when id changes. Is there a way to define routing parameters at VaryByParam?

    Read the article

  • .htaccess more than one command

    - by Stefan
    Hey I have an .htaccess file with the following code: <Files ~ "item|profile|category|search"> ForceType application/x-httpd-php </Files> What I want is to add a re-write rule as well which changes any body who navigates tot he site ot use http://www.domain.com sintead of http://domain.com I have the code stored somewhere else for it however I can't seem to just place in the file as it corrupts? Or just doesn't work... I wish I knew more about .htaccess files How can I add this in? Thanks, Stefan

    Read the article

  • php URI troube with if statement,

    - by sea_1987
    I am running an if statement, that looks like this, if($this->uri->segment(1) !== 'search' || $this->uri->segment(1) !== 'employment') { //dome something } My problem is that first condition works, if the uri segment 1 equals search then the method do not run however if I on the page employment, and the first segment of the uri is employment then the condition still runs, why is this?

    Read the article

  • code igniter codeigniter question, making anchor load page containing data from referenced row in DB

    - by thrice801
    Hi, Im trying to learn the code igniter library and object oriented php in general and have a question. Ok so Ive gotten as far as making a page which loads all of the rows from my database and in there, Im echoing an anchor tag which is a link to the following structure. [code]echo anchor("videos/video/$row-video_id", $row-video_title);[/code] So, I have a class called Videos which extends the controller, within that class there is index and video, which is being called correctly (when you click on the video title, it sends you to videos/video/5 for example, 5 being the primary key of the table im working with. So basically all Im trying to do is pass that 5 back to the controller, and then have the particular video page output the particular rows data from the videos table. My function in my controller for video looks like this - [code] function video() { $data['main_content'] = 'video'; $data['video_title'] = 'test'; $this-load-view('includes/template', $data); } [/code] So ya, basically test should be instead of test, a returned value of a query which says get in the table "videos", the row with the video_id of "5", and make $data['video_title'] = value of video_title in database... Should have this figured out by now but dont, any help would be appreciated!

    Read the article

  • python regular expression for domain names

    - by user230911
    I am trying use the following regression to extract domain name from a text, but it just produce nothing, what's wrong with it? I don't know if this is suitable to ask this "fix code" question, maybe I should read more. I just want to save some time. Thanks pat_url = re.compile(r''' (?:https?://)* (?:[\w]+[\-\w]+[.])* (?P<domain>[\w\-]*[\w.](com|net)([.](cn|jp|us))*[/]*) ''') print re.findall(pat_url,"http://www.google.com/abcde") I want the output to be google.com

    Read the article

  • Which's the best way to protect primary key on ASP.NET MVC?

    - by Junior Mayhé
    I'm creating a ASP.NET MVC website and I was wandering which techniques do you guys use to protect primary key on these mvc urls. Actually ASP.NET MVC generates this syntax for its urls: /Controller/Action/Id Last week I was trying to encrypt it using SHA-1 Encryption, but this encrypter generates some special symbols like + (plus), / (slash), and other annoying chars which difficult the decryption. Perhaps creating a custom encryption should solve the problem. But I wanna here from you guys, do you have some ideas to protect mvc urls?

    Read the article

  • What's my best bet for replacing plain text links with anchor tags in a string? .NET

    - by Craig Bovis
    What is my best option for converting plain text links within a string into anchor tags? Say for example I have "I went and searched on http://www.google.com/ today". I would want to change that to "I went and searched on http://www.google.com/ today". The method will need to be safe from any kind of XSS attack also since the strings are user generated. They will be safe before parsing so I just need to make sure that no vulnerabilities are introduced through parsing the URLs.

    Read the article

  • Python filter/remove URLs from a list

    - by Eef
    Hi. I have a text file of URLs, about 14000. Below is a couple of examples: http://www.domainname.com/pagename?CONTENT_ITEM_ID=100&param2=123 http://www.domainname.com/images?IMAGE_ID=10 http://www.domainname.com/pagename?CONTENT_ITEM_ID=101&param2=123 http://www.domainname.com/images?IMAGE_ID=11 http://www.domainname.com/pagename?CONTENT_ITEM_ID=102&param2=123 I have loaded the text file into a Python list and I am trying to get all the URLs with CONTENT_ITEM_ID separated off into a list of their own. What would be the best way to do this in Python? Cheers

    Read the article

  • Problem with Spring security's logout

    - by uther-lightbringer
    Hello, I've got a problem logging out in Spring framework. First when I want j_spring_security_logout to handle it for me i get 404 j_spring_security_logout not found: sample-security.xml: <http> <intercept-url pattern="/messageList.htm*" access="ROLE_USER,ROLE_GUEST" /> <intercept-url pattern="/messagePost.htm*" access="ROLE_USER" /> <intercept-url pattern="/messageDelete.htm*" access="ROLE_ADMIN" /> <form-login login-page="/login.jsp" default-target-url="/messageList.htm" authentication-failure-url="/login.jsp?error=true" /> <logout/> </http> Sample url link to logout in JSP page: <a href="<c:url value="/j_spring_security_logout" />">Logout</a> When i try to use a custom JSP page i.e. I use login form for this purpose then I get better result at least it gets to login page, but another problem is that you dont't get logged off as you can diretcly type url that should be guarded buy you get past it anyway. Slightly modified from previous listings: <http> <intercept-url pattern="/messageList.htm*" access="ROLE_USER,ROLE_GUEST" /> <intercept-url pattern="/messagePost.htm*" access="ROLE_USER" /> <intercept-url pattern="/messageDelete.htm*" access="ROLE_ADMIN" /> <form-login login-page="/login.jsp" default-target-url="/messageList.htm" authentication-failure-url="/login.jsp?error=true" /> <logout logout-success-url="/login.jsp" /> </http> <a href="<c:url value="/login.jsp" />">Logout</a> Thank you for help

    Read the article

< Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >