Easy Compile?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2006 11:43 PM
Hello,
I want to simply alter the PageTag.java code so that the image points to a local image in order to avoid that https problem with the footer logo (the one where the warning screen keeps popping up if running https - this is due to the code referring to an http image).
That's the background. What I want to do now is simply change that one little line of code so that it points to a locally hosted image so I can avert the warning popups.
What is the simplest way to compile the PageTag.java file and stuff it back into the installation? In the past on other apps, after setting the appropriate CLASSPATH, etc., I used to simply change the code, compile, and place in a jar. I was a bit overwhelmed looking at the sdk process of changing the code for alfresco - it seems like a lot of preliminary setup.
I just need a quick compile process for now. I can setup the sdk later for a more stale change environment.
Can anyone recommend a very simple way to change this piece of code and get the appropriate class back into the alfresco installation?
Your help is greatly appreciated.
-Matt
I want to simply alter the PageTag.java code so that the image points to a local image in order to avoid that https problem with the footer logo (the one where the warning screen keeps popping up if running https - this is due to the code referring to an http image).
That's the background. What I want to do now is simply change that one little line of code so that it points to a locally hosted image so I can avert the warning popups.
What is the simplest way to compile the PageTag.java file and stuff it back into the installation? In the past on other apps, after setting the appropriate CLASSPATH, etc., I used to simply change the code, compile, and place in a jar. I was a bit overwhelmed looking at the sdk process of changing the code for alfresco - it seems like a lot of preliminary setup.
I just need a quick compile process for now. I can setup the sdk later for a more stale change environment.
Can anyone recommend a very simple way to change this piece of code and get the appropriate class back into the alfresco installation?
Your help is greatly appreciated.
-Matt
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2006 11:44 AM
What is the simplest way to compile the PageTag.java file and stuff it back into the installation? In the past on other apps, after setting the appropriate CLASSPATH, etc., I used to simply change the code, compile, and place in a jar.
In theory there is no reason why you can't follow a similar procedure for Alfresco. The PageTag.java file has the following imports:
import java.io.IOException;import java.io.Writer;import javax.servlet.http.HttpServletRequest;import javax.servlet.jsp.JspException;import javax.servlet.jsp.tagext.TagSupport;import org.alfresco.web.app.Application;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;
So you should be able to compile just the PageTag.java against the; tomcat jars for the servlet classes, apache commons logging jars and the Alfresco webclient.jar from the Alfresco WAR file. The resulting class needs to replace the one in the webclient.jar file inside the Alfresco WAR - so you should be able to unpack the Alfresco WAR, unpack the webclient.jar, replace the class file and pack it all up again. I've done similar unpack, minimum compile and repack operations with other products myself also which all worked ok.Thanks,
Kevin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2006 11:49 AM
Awesome - just what I was looking for. I will give it a shot.
thanks Kevin!
-Matt
thanks Kevin!
-Matt

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2006 11:22 AM
Kevin (or anyone else),
I tried to compile this (the PageTag.java) and got the error below.
Any ideas for me?
thanks!
-Matt
C:\javawork\wcsrc>javac PageTag.java
PageTag.java:31: cannot access org.alfresco.web.app.Application
bad class file: c:\Program Files\Alfresco ECMS Community Network\tomcat\webapps\alfresco\WEB-INF\lib\web-client.jar(org/alfresco/web/app/Application.class)class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath.
import org.alfresco.web.app.Application;
^
1 error
C:\javawork\wcsrc>javac PageTag.java
I tried to compile this (the PageTag.java) and got the error below.
Any ideas for me?
thanks!
-Matt
C:\javawork\wcsrc>javac PageTag.java
PageTag.java:31: cannot access org.alfresco.web.app.Application
bad class file: c:\Program Files\Alfresco ECMS Community Network\tomcat\webapps\alfresco\WEB-INF\lib\web-client.jar(org/alfresco/web/app/Application.class)class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath.
import org.alfresco.web.app.Application;
^
1 error
C:\javawork\wcsrc>javac PageTag.java
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 04:44 AM
Hi guys,
I am trying to do the same thing I am compiling the source code
I am having these errors:
==============================================
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.faces.FacesException: org/alfresco/web/ui/repo/tag/PageTag
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
=============================================
Do u have any idea what could be causing this ?
thanks
I am trying to do the same thing I am compiling the source code
I am having these errors:
==============================================
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.faces.FacesException: org/alfresco/web/ui/repo/tag/PageTag
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
=============================================
Do u have any idea what could be causing this ?
thanks
