I'm using Eclipse and MyEclipse building a webapp with a standard directory structure:

  WebRoot
    .jsp files
    WEB-INF
      classes
      lib

In several of my JSPs I have the same need which would be well served by having one centrally located utility class, where I can put a method accessible to all the JSPs.

Question 1: Do I pretty much need to put that utility class down in /WEB-INF/classes? Am I correct that there is no natural way to put such a class up in WebRoot with the JSPs which use it?

Trying to write my method in a utility class down there in /WEB-INF/classes, I discover that HttpServletRequest can't be resolved down there. I gather the servlet jar is not on the build path, not for the lowly citizens of /WEB-INF/classes anyhow. But it seems obvious to me that the servlet jar is accessible to my JSPs, which can refer freely to the servlet packages. Seems sort of unfair.

Question 2: What is the best way for my class down in /WEB-INF/classes to get access to the servlet packages.

Thank you,

Rich


_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to