Package javax.servlet

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


    }

    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

     * @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

     * @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

    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

                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

    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

    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

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

  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

  public PluginContextTest(String arg0) {
    super(arg0);
  }

  public void testDispatcher() throws ConfigException {
    ServletConfig config = new TestServletConfig("test");
    ControlModuleMapping mapping = new ControlModuleMapping("/test/*");
    ControlModuleContext module = new ControlModuleContext(config, mapping, null);
    PluginContext context = new PluginContext(module, DefaultAction.class, new DefaultDispatcher(module));
    DefaultDispatcher dispatcher = new DefaultDispatcher(context.getModuleContext());

View Full Code Here

TOP

Related Classes of javax.servlet.ServletConfig

Copyright © 2018 www.massapicom. 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.