09-10-2008 05:35 AM
09-11-2008 12:02 AM
The best solution at this time is to simply punt the problem to the delivery tier, and compose "multi input" pages (such as the job posting listing page) at request time. If performance is a concern, this can be made efficient by pre-generating HTML snippets for each job listing (both the table-of-contents snippet and the body snippet) and then simply including those snippets at request time to compose the final page impression (you might use server side includes for example, or <jsp:includes> or what-have-you). This doesn't have the dependency or race condition problems described above, since it's a simple 1-to-1 mapping of input Web Form content to output renditions (which are now a larger number of snippets, rather than a small number of fully composed pages).Cheers,
09-11-2008 05:03 AM
09-11-2008 05:37 PM
09-12-2008 04:12 AM
09-12-2008 11:04 AM
10-03-2008 04:51 AM
10-03-2008 05:03 AM
Is it possible to call a web script via an SSI or jsp:include? For example if the web script returned the HTML content of items for a search or latest by date, can the script be executed via some sort of page include? I have attempted this but I believe the HTTP basic auth is killing it (a c:import tag complains of the response code 401). I've read on the Web Scripts Wiki pages that they can be run as a specific user - is this the runas attribute in the desc.xml <authentication/> node? Also there is brief mention of a ticket being appended to the url but doesn't give much detail on this.
String scriptName = session.getAttribute("scriptName").toString();
if (scriptName != null && scriptName.length() > 0) {
try {
URL url = new URL("http://localhost:8080/alfresco/service'+scriptName);
URLConnection connection = url.openConnection();
connection.setRequestProperty("Authorization", "Basic HURtaHJSYHFdDdW4=");
InputStream stream = connection.getInputStream();
BufferedInputStream in = new BufferedInputStream(stream);
int i;
while ((i = in.read()) != -1) {
out.write(i);
}
out.flush();
} catch (Throwable e) {
// Silently fail.
}
}
10-03-2008 06:41 AM
<%@ attribute name="server" required="true" %>
<%@ attribute name="port" required="true" %>
<%@ attribute name="path" required="true" %>
<%@ attribute name="queryString" required="false" %>
<%
StringBuilder urlStr = new StringBuilder("http://");
urlStr.append(server).append(":").append(port);
urlStr.append("/alfresco/service");
urlStr.append(path.indexOf("/") == 0 ? "" : "/").append(path);
if (queryString != null) urlStr.append(queryString.indexOf("?") == 0 ? "" : "?").append(queryString);
try {
java.net.URL url = new java.net.URL(urlStr.toString());
java.net.URLConnection connection = url.openConnection();
connection.setRequestProperty("Authorization", "Basic YWRtaW46YWRtaW4=");
java.io.BufferedInputStream in = new java.io.BufferedInputStream(connection.getInputStream());
int i;
while ((i = in.read()) != -1) {
out.write(i);
}
out.flush();
} catch (Throwable e) {
// Silently fail.
}
%>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.