Master of science in Web Services development

I have just finished my last exam for the master. Right now is the last sprint to the end, I have to make a paper and an application on Web services for a modern educational system.

I have decided to make a challenge out of this paper and write the application in C#. I’m a Java developer mostly and making it in JSP would render in me learning almost nothing out of it. So as the paper will start to progress I will try to post all my findings, all that I learn in this blog or maybe writing longer articles in the article section of this site.

Creating a beta testing group - JSEclipse">Creating a beta testing group - JSEclipse

I’d just had the opportunity to create my first beta testing group.

For JSEclipse 1.5 release InterAKT opened on it’s site a new beta testing program to let JavaScript developers have an early preview on the next version and let the actual users become involved in shaping a great product.

JSP/Java - strip_tags() PHP like function

Another PHP function that is very used is strip_tags.
This function tries to return a string with all HTML tags stripped from a given string.

public static String strip_tags(String text, String allowedTags) {
  String[] tag_list = allowedTags.split(”,”);
  Arrays.sort(tag_list);
  
  final Pattern p = Pattern.compile(”<[/!]?([^\\\\s>]*)\\\\s*[^>]*>”, Pattern.CASE_INSENSITIVE);
  Matcher m = p.matcher(text);
  

  StringBuffer out = new StringBuffer();
  int lastPos = 0;
  while (m.find()) {
    String tag = m.group(1);
    // if tag not allowed: skip it
    if(Arrays.binarySearch(tag_list, tag) < 0) {
      out.append(text.substring(lastPos, m.start()))
        .append(” “);

    } else {
      out.append(text.substring(lastPos, m.end()));
    }
    lastPos = m.end();
  }
  if (lastPos > 0) {
    out.append(text.substring(lastPos));
    return out.toString().trim();

  } else {
    return text;
  }
}