Examples of ServletConfig


Examples of com.crashnote.servlet.config.ServletConfig

    // INTERFACE ==================================================================================

    public void init(final FilterConfig filterConfig) throws ServletException {

        // at first, parse filter configuration
        final ServletConfig config = getConfig(filterConfig);

        // if the configuration enables the filter...
        if (config.isEnabled()) {

            // ... based on config, create the central reporter service
            reporter = config.getReporter();
            reporter.start();

            // ... finally install the appender(s)
            connector = new AutoLogConnector(config, reporter);
            connector.start();
View Full Code Here

Examples of javax.servlet.ServletConfig

      // Keep the old ClassLoader
      final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
      boolean hasChanged = false;
      try
      {
         ServletConfig config = new PortalServletConfig(sConfig, portalContainer);
         WebAppController controller =
            (WebAppController)portalContainer.getComponentInstanceOfType(WebAppController.class);
         // Set the full classloader of the portal container
         Thread.currentThread().setContextClassLoader(portalContainer.getPortalClassLoader());
         hasChanged = true;
View Full Code Here

Examples of javax.servlet.ServletConfig

    }

    public String getServletFileNameForJsp(Context context, String jspName) {
        String servletName = null;

        ServletConfig servletConfig = (ServletConfig) context.findChild("jsp");
        if (servletConfig != null) {
            ServletContext sctx = context.getServletContext();
            Options opt = new EmbeddedServletOptions(servletConfig, sctx);
            JspRuntimeContext jrctx = new JspRuntimeContext(sctx, opt);
            JspCompilationContext jcctx = createJspCompilationContext(jspName, false, opt, sctx, jrctx, null);
View Full Code Here

Examples of javax.servlet.ServletConfig

     * @param context
     * @param summary
     * @param names
     */
    public void recompileJsps(Context context, Summary summary, List names) {
        ServletConfig servletConfig = (ServletConfig) context.findChild("jsp");
        if (servletConfig != null) {
            if (summary != null) {
                synchronized (servletConfig) {
                    ServletContext sctx = context.getServletContext();
                    Options opt = new EmbeddedServletOptions(servletConfig, sctx);
View Full Code Here

Examples of javax.servlet.ServletConfig

     * @param summary
     * @param compile
     * @throws Exception
     */
    public void listContextJsps(Context context, Summary summary, boolean compile) throws Exception {
        ServletConfig servletConfig = (ServletConfig) context.findChild("jsp");
        if (servletConfig != null) {
            synchronized (servletConfig) {
                ServletContext sctx = context.getServletContext();
                Options opt = new EmbeddedServletOptions(servletConfig, sctx);

View Full Code Here

Examples of javax.servlet.ServletConfig

    protected ModelAndView handleContext(String contextName, Context context,
                                         HttpServletRequest request, HttpServletResponse response) throws Exception {

        String jspName = ServletRequestUtils.getStringParameter(request, "source", null);
        ServletContext sctx = context.getServletContext();
        ServletConfig scfg = (ServletConfig) context.findChild("jsp");
        Options opt = new EmbeddedServletOptions(scfg, sctx);
        String encoding = opt.getJavaEncoding();
        String content = null;

        if (jspName != null) {
View Full Code Here

Examples of javax.servlet.ServletConfig

                Resource jsp = (Resource) context.getResources().lookup(jspName);

                if (jsp != null) {

                    ServletContext sctx = context.getServletContext();
                    ServletConfig scfg = (ServletConfig) context.findChild("jsp");
                    Options opt = new EmbeddedServletOptions(scfg, sctx);
                    String descriptorPageEncoding = opt.getJspConfig().findJspProperty(jspName).getPageEncoding();

                    if (descriptorPageEncoding != null && descriptorPageEncoding.length() > 0) {
                        item.setEncoding(descriptorPageEncoding);
View Full Code Here

Examples of javax.servlet.ServletConfig

    protected SessionFactory lookupSessionFactory() {
        if (logger.isDebugEnabled())
            logger.debug("Using session factory '" + getSessionFactoryBeanName() + "' for OpenSessionInViewFilter");

        ServletConfig sc = PortletContext.getContext().getServletConfig();
        ServletContext servletContext = null;
       
        if (sc != null) {
            ServletActionContext.setServletConfig(sc);
            servletContext = ServletActionContext.getServletContext();
View Full Code Here

Examples of javax.servlet.ServletConfig

    public void init( PortletServiceConfig serviceConfig )
        throws PortletServiceException
    {
        super.init( serviceConfig );

        ServletConfig servletConfig = serviceConfig.getServletConfig(  );
        InputStream   in = servletConfig.getServletContext(  ).getResourceAsStream( CONFIG_FILENAME );

        if ( in == null )
        {
            throw new PortletServiceException( "File not found: " + CONFIG_FILENAME );
        }
View Full Code Here

Examples of javax.servlet.ServletConfig

 
  // ---------------------------------------------------------------------------

  public void init() throws ServletException {
       
    ServletConfig config = getServletConfig();

    String sProfile = config.getInitParameter("profile");

    if (sProfile==null) {
      oDbb = new DBBind();
    } else if (sProfile.trim().length()==0) {
      oDbb = new DBBind();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.