2 Replies Latest reply on Sep 9, 2008 9:36 AM by Mark Egert

    seam component with httpcontext ?

    Mark Egert Newbie

      hi folk,


      is there any possibility to get the httpcontext in a seam component?
      for example:


      @Name("res1")
      @Path("/res1/")
      public class Res1  {
      
          @Context
          UriInfo uri;
          
          @GET
          @ProduceMime("text/plain")
          public String get() {
              
              log.info("------------------------------> #0", uri.getAbsolutePath());
              return "F t S";
          }
      ...
      



      on this way I got a NullPointerException - UriInfo is not accessible.


      What can I do to get the path I need? Thx for a lot for suggestion.