Archives / 2005 / August
  • [.NET 2.0] A must-know for ASP.NET 2.0 developers

    I spent a couple of hours trying to figure out what was wrong with my Master/Details test form, when I ran upon this one. ASP.NET 2.0 doesn't seem to rebind after a PostBack if there is a ViewState available. Even if cache is turned off on the data source. Fritz wrote about this.

    Need to test this a bit more. Amazing how much there is to learn about .NET 2.0. My first thoughts about the new release was "yeah, it'll be cool changes to the IDE, refactoring and all that, then there'll be great additions to the c# language and a cart-load of new controls". But this is a change in ASP.NET programming model, isn't it? A small change, but nevertheless quite important, don't you think?

  • [Java] WSS4J version 1.0

    Sorry for all the Java spamming today, but if anyone interested in the Apache Axis and Web Service Security area, the Apache WSS4J people got a version 1.0 ready for download and use now.

    You can get to their site here. They got some pretty good documentation available now it seems. I believe you should be able to learn from my wss4j tutorial, based on the earlier version of wss4j. I posted a follow-up to that tutorial here.

    I'll download the latest version of wssj4 myself and give it a try now, because we're most probably going to use it in the near future. Jeez, I need to get more time to look at the ASP.NET 2.0 stuff too... Argh...

  • [Java] More about cookies in Vignette Application Portal (VAP)

    Another blog post about cookies in VAP...

    Other ways of setting cookies from a portlet?

    I got this message from Sascha about setting cookies from a VAP portlet:

    Hi, I've read you log about setting cookie in a portlet. First, I thought so too, but there actually _is_ a way to set a cookie from a VAP Portlet: you have to get the original HttpServletRequest from the HttpServletRequestWrapper instance in your JSP:

    public static HttpServletResponse getOriginalResponse(HttpServletResponse response) {
       HttpServletResponse result = response;
       if (response instanceof HttpServletResponseWrapper) {
          response = (HttpServletResponse)((HttpServletResponseWrapper) response).getResponse();
          result = getOriginalResponse( response );
       return result;

    I tried this, but from a JSP page in a JSR168 solution it doesn't seem to work. I think maybe Sascha meant a VAP specific portlet/module and not a JSR168 portlet. As far as I understand it, the HTTP headers have already been written when the portlet starts to execute, so it's too late.

    I got another obvious way of setting cookies from a portlet - do it from a client-side javascript:

    Setting cookie through javascript:


    document.cookie = "jscriptcookie=testvalue";


    This obviously works fine and you can also get cookies this way, but again, what I'm really after is a way to both get and set cookies from within a portlat class scope, say for example in the processAction() method. Below I have a way of getting a cookie from there, but setting it still seems to be impossible.

    A better way of getting cookies from within a portlet class

    Earlier we've had to grab cookies from a JSP page in a JSR168 portlet solution, but a friend of mine found out that VAP actually adds the "cookie" http header(s) to the PortletRequest properties collection, according to the JSR168 spec, section PLT.11.1.4. So from within a JSR168 portlet it's quite simple to get the cookies from the RenderRequest.getProperties("cookie"). Thank you Vignette, now make sure all future versions of VAP does the same please :)

  • [NET 2.0] Master Pages - Most useful feature in ASP.NET 2.0?

    I've started to read up on the new stuff in .NET 2.0 to prepare myself for the PDC, especially the ASP.NET stuff, and I must say that so far the most useful thing I've looked at is Master Pages. I've used the Wilson Master Pages in previous versions of ASP.NET and it has helped us much, but now in 2.0 with the intergration with the IDE it's just plain beautiful.

    I think the Master Pages feature will be used in a majority of the web sites out there in the future, don't you think?

  • Counting the days to the PDC

    Ah, back from vacation and haven't written anything in my blog for a long time now. Not long now until the PDC. Looks like I'll have 3-4 swedish buddies of mine visiting LA as well - it will be great! Have to sit down and plan my schedule on-line. According to the information on the webby, you should be able to have the schedul on your pocket pc! Have to have that!