AnsweredAssumed Answered

no puedo compilar PageTag.class

Question asked by no-name on Mar 3, 2009
Latest reply on Mar 3, 2009 by pjcaracuel_2349
Buenos dias, se que tenia que poner un titulo curioso para ver si me echais una mano a entender java.

No os voy a engañar yo soy mas de PHP C++ y cositas asi, donde los compiladores funcionan a la primera y no necesito volverme picha, bien la cuestion es la suiguiente, queria modificar la parte de abajo de alfresco para quitar lo que no tiene garantia ni nada, para poner que es mi empresa la que se encargara del soporte de ese alfresco, un numero de telefono la web tal y cual, y seguido los siguientes pasos:

-Buscar el jar correspondiente en este caso: alfresco-web-client.jar
-Lo descomprimo para podes trabjar con el
-edito el archivo que tiene esta clase: org/alfresco/web/ui/repo/tag/PageTag.class (para esto uso un decompilador llamado DJ Java Decompiler)
-Lo guardo como PageTag.java

Hasta aqui no hay ningun problema, todo se hace correctamente.

entonces me voy al cmd (bash shell o como se llame esa cosa negra de windows)y yo con toda mi ilusion escribo:
javac PageTag.java

A lo que el me dice para desilusionarme:

PageTag.java:5: package javax.faces.context does not exist
import javax.faces.context.FacesContext;
                         ^
PageTag.java:6: package javax.servlet.http does not exist
import javax.servlet.http.HttpServletRequest;
                        ^
PageTag.java:7: package javax.servlet.jsp does not exist
import javax.servlet.jsp.*;
^
PageTag.java:8: package javax.servlet.jsp.tagext does not exist
import javax.servlet.jsp.tagext.TagSupport;
                              ^
PageTag.java:9: package org.alfresco.web.app does not exist
import org.alfresco.web.app.Application;
                          ^
PageTag.java:10: package org.alfresco.web.app.servlet does not exist
import org.alfresco.web.app.servlet.FacesHelper;
                                  ^
PageTag.java:11: package org.alfresco.web.bean.coci does not exist
import org.alfresco.web.bean.coci.CCProperties;
                                ^
PageTag.java:12: package org.alfresco.web.ui.common does not exist
import org.alfresco.web.ui.common.Utils;
                                ^
PageTag.java:13: package org.apache.commons.logging does not exist
import org.apache.commons.logging.Log;
                                ^
PageTag.java:14: package org.apache.commons.logging does not exist
import org.apache.commons.logging.LogFactory;
                                ^
PageTag.java:16: cannot find symbol
symbol: class TagSupport
public class PageTag extends TagSupport
                            ^
PageTag.java:85: cannot find symbol
symbol  : class JspException
location: class org.alfresco.web.ui.repo.tag.PageTag
       throws JspException
              ^
PageTag.java:175: cannot find symbol
symbol  : class JspException
location: class org.alfresco.web.ui.repo.tag.PageTag
       throws JspException
              ^
PageTag.java:259: cannot find symbol
symbol  : class Log
location: class org.alfresco.web.ui.repo.tag.PageTag
   private static final Log logger =
LogFactory.getLog(org/alfresco/web/ui/repo/tag/PageTag);
                        ^
PageTag.java:76: cannot find symbol
symbol  : variable super
location: class org.alfresco.web.ui.repo.tag.PageTag
       super.release();
       ^
PageTag.java:259: cannot find symbol
symbol  : variable org
location: class org.alfresco.web.ui.repo.tag.PageTag
   private static final Log logger =
LogFactory.getLog(org/alfresco/web/ui/repo/tag/PageTag);
                                                       ^
PageTag.java:259: illegal forward reference
   private static final Log logger =
LogFactory.getLog(org/alfresco/web/ui/repo/tag/PageTag);
                                                           ^
PageTag.java:259: cannot find symbol
symbol  : variable web
location: class org.alfresco.web.ui.repo.tag.PageTag
   private static final Log logger =
LogFactory.getLog(org/alfresco/web/ui/repo/tag/PageTag);
                                                                    ^
PageTag.java:259: cannot find symbol
symbol  : variable ui
location: class org.alfresco.web.ui.repo.tag.PageTag
   private static final Log logger =
LogFactory.getLog(org/alfresco/web/ui/repo/tag/PageTag);
                                                                        ^
PageTag.java:259: cannot find symbol
symbol  : variable repo
location: class org.alfresco.web.ui.repo.tag.PageTag
   private static final Log logger =
LogFactory.getLog(org/alfresco/web/ui/repo/tag/PageTag);
                                                                           ^
PageTag.java:259: cannot find symbol
symbol  : variable tag
location: class org.alfresco.web.ui.repo.tag.PageTag
   private static final Log logger =
LogFactory.getLog(org/alfresco/web/ui/repo/tag/PageTag);

         ^
PageTag.java:259: cannot find symbol
symbol  : variable PageTag
location: class org.alfresco.web.ui.repo.tag.PageTag
   private static final Log logger =
LogFactory.getLog(org/alfresco/web/ui/repo/tag/PageTag);

             ^
PageTag.java:259: cannot find symbol
symbol  : variable LogFactory
location: class org.alfresco.web.ui.repo.tag.PageTag
   private static final Log logger =
LogFactory.getLog(org/alfresco/web/ui/repo/tag/PageTag);
                                     ^
PageTag.java:91: cannot find symbol
symbol  : class HttpServletRequest
location: class org.alfresco.web.ui.repo.tag.PageTag
           String reqPath =
((HttpServletRequest)pageContext.getRequest()).getContextPath();
                              ^
PageTag.java:91: cannot find symbol
symbol  : variable pageContext
location: class org.alfresco.web.ui.repo.tag.PageTag
           String reqPath =
((HttpServletRequest)pageContext.getRequest()).getContextPath();
                                                 ^
PageTag.java:92: cannot find symbol
symbol  : variable pageContext
location: class org.alfresco.web.ui.repo.tag.PageTag
           Writer out = pageContext.getOut();
                        ^
PageTag.java:93: cannot find symbol
symbol  : variable Application
location: class org.alfresco.web.ui.repo.tag.PageTag
           if(!Application.inPortalServer())
               ^
PageTag.java:110: cannot find symbol
symbol  : variable pageContext
location: class org.alfresco.web.ui.repo.tag.PageTag

out.write(Utils.encode(Application.getMessage(pageContext.getSession(),
titleId)));
                                                                 ^
PageTag.java:110: cannot find symbol
symbol  : variable Application
location: class org.alfresco.web.ui.repo.tag.PageTag

out.write(Utils.encode(Application.getMessage(pageContext.getSession(),
titleId)));
                                          ^
PageTag.java:110: cannot find symbol
symbol  : variable Utils
location: class org.alfresco.web.ui.repo.tag.PageTag

out.write(Utils.encode(Application.getMessage(pageContext.getSession(),
titleId)));
                             ^
PageTag.java:113: cannot find symbol
symbol  : variable Utils
location: class org.alfresco.web.ui.repo.tag.PageTag
                   out.write(Utils.encode(title));
                             ^
PageTag.java:161: cannot find symbol
symbol  : variable Application
location: class org.alfresco.web.ui.repo.tag.PageTag
           if(!Application.inPortalServer())
               ^
PageTag.java:169: cannot find symbol
symbol  : class JspException
location: class org.alfresco.web.ui.repo.tag.PageTag
           throw new JspException(ioe.toString());
                     ^
PageTag.java:179: cannot find symbol
symbol  : class HttpServletRequest
location: class org.alfresco.web.ui.repo.tag.PageTag
           HttpServletRequest req =
(HttpServletRequest)pageContext.getRequest();
           ^
PageTag.java:179: cannot find symbol
symbol  : class HttpServletRequest
location: class org.alfresco.web.ui.repo.tag.PageTag
           HttpServletRequest req =
(HttpServletRequest)pageContext.getRequest();
                                     ^
PageTag.java:179: cannot find symbol
symbol  : variable pageContext
location: class org.alfresco.web.ui.repo.tag.PageTag
           HttpServletRequest req =
(HttpServletRequest)pageContext.getRequest();
                                                        ^
PageTag.java:181: cannot find symbol
symbol  : variable pageContext
location: class org.alfresco.web.ui.repo.tag.PageTag
               pageContext.getOut().write(getAlfrescoButton());
               ^
PageTag.java:182: cannot find symbol
symbol  : variable Application
location: class org.alfresco.web.ui.repo.tag.PageTag
           if(!Application.inPortalServer())
               ^
PageTag.java:183: cannot find symbol
symbol  : variable pageContext
location: class org.alfresco.web.ui.repo.tag.PageTag
               pageContext.getOut().write("\n</body></html>");
               ^
PageTag.java:187: cannot find symbol
symbol  : class JspException
location: class org.alfresco.web.ui.repo.tag.PageTag
           throw new JspException(ioe.toString());
                     ^
PageTag.java:194: cannot find symbol
symbol  : variable super
location: class org.alfresco.web.ui.repo.tag.PageTag
       return super.doEndTag();
              ^
PageTag.java:200: cannot find symbol
symbol  : variable pageContext
location: class org.alfresco.web.ui.repo.tag.PageTag
           loginPage =
Application.getLoginPage(pageContext.getServletContext());
                                                ^
PageTag.java:200: cannot find symbol
symbol  : variable Application
location: class org.alfresco.web.ui.repo.tag.PageTag
           loginPage =
Application.getLoginPage(pageContext.getServletContext());
                       ^
PageTag.java:208: cannot find symbol
symbol  : class HttpServletRequest
location: class org.alfresco.web.ui.repo.tag.PageTag
           HttpServletRequest req =
(HttpServletRequest)pageContext.getRequest();
           ^
PageTag.java:208: cannot find symbol
symbol  : class HttpServletRequest
location: class org.alfresco.web.ui.repo.tag.PageTag
           HttpServletRequest req =
(HttpServletRequest)pageContext.getRequest();
                                     ^
PageTag.java:208: cannot find symbol
symbol  : variable pageContext
location: class org.alfresco.web.ui.repo.tag.PageTag
           HttpServletRequest req =
(HttpServletRequest)pageContext.getRequest();
                                                        ^
PageTag.java:216: cannot find symbol
symbol  : class FacesContext
location: class org.alfresco.web.ui.repo.tag.PageTag
       FacesContext fc = FacesContext.getCurrentInstance();
       ^
PageTag.java:216: cannot find symbol
symbol  : variable FacesContext
location: class org.alfresco.web.ui.repo.tag.PageTag
       FacesContext fc = FacesContext.getCurrentInstance();
                         ^
PageTag.java:219: cannot find symbol
symbol  : class CCProperties
location: class org.alfresco.web.ui.repo.tag.PageTag
           CCProperties ccProps =
(CCProperties)FacesHelper.getManagedBean(fc, "CCProperties");
           ^
PageTag.java:219: cannot find symbol
symbol  : class CCProperties
location: class org.alfresco.web.ui.repo.tag.PageTag
           CCProperties ccProps =
(CCProperties)FacesHelper.getManagedBean(fc, "CCProperties");
                                   ^
PageTag.java:219: cannot find symbol
symbol  : variable FacesHelper
location: class org.alfresco.web.ui.repo.tag.PageTag
           CCProperties ccProps =
(CCProperties)FacesHelper.getManagedBean(fc, "CCProperties");

51 errors

y yo me quedo con cara de  :shock:

Alguien me esplica un poquito en que estoy metiendo la pata, porque me imagino que durante este proceso e tenido que cometer algun error

Outcomes