aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes condition using part of a URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "condition using part of a URL" Watch "condition using part of a URL" New topic
Author

condition using part of a URL

Al Finlay
Greenhorn

Joined: Oct 26, 2012
Posts: 16


Hi. I'm wondering if it's possible to write a condition, similar to the one above, but which evaluates to true if the first part of the URL is a match. For example, if the URL was http:\\www.greenhorn.com\thread3354 and I want to test for just http:\\www.greenhorn.com. In relation to the location property. Thanks in advance.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18113
    
    8

You mean take one string and see if a second string starts with the contents of that first string? Sure, I don't see why not. The basic code is no more than 3 lines long.
Al Finlay
Greenhorn

Joined: Oct 26, 2012
Posts: 16
I was a bit mixed up. I didn't know if there was a property I could test or if I had to parse the string.


Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: condition using part of a URL
 
Similar Threads
JAR + Saving and Uploading files
Dom Parser and special character
How does the "j_security_check" work?
Enable Security for JBoss + WS
How to provide the Shortcut on submit button in JSP/HTML