[opencms-dev] error vfs target "/system/modules/org.opencms.frontend.templateone/pages/search.html" was already included earlier ?

bub habub japorami at yahoo.com
Mon Jul 25 10:50:56 CEST 2005


hi all,

i do get this error msg. wanted to setup the search
engine. and created two forms.
got the code from the book and thought that i only
have to connect it to the search.html page.
is that correct? or do i have to write the seach
myself.
so all in all i got this error msg that i don't
understand what it means.
error vfs target
"/system/modules/org.opencms.frontend.templateone/pages/search.html"
was already included earlier ?

javax.servlet.ServletException: VFS target
"/system/modules/org.opencms.frontend.templateone/pages/search.html"
was already included earlier.
	at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:272)
	at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:175)
	at
org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:215)
	at
org.opencms.jsp.CmsJspActionElement.include(CmsJspActionElement.java:384)
	at
org.opencms.jsp.CmsJspActionElement.include(CmsJspActionElement.java:408)
	at
org.opencms.jsp.CmsJspActionElement.include(CmsJspActionElement.java:312)
	at
org.opencms.frontend.templateone.CmsTemplateSearch.includeWithPageUri(CmsTemplateSearch.java:410)
	at
org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.org_opencms_frontend_templateone.pages.search_html_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.org_opencms_frontend_templateone.pages.search_html_jsp:49)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
	at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
	at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
	at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:193)
	at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:171)
	at
org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:402)
	at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:417)
	at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:175)
	at
org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:434)
	at
org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:381)
	at
org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:711)
	at
org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1302)
	at
org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:136)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:534)




what does it mean?


here my code: searchresults.jsp

<%@ page session="false" %>
<%@ taglib prefix="cms"
uri="http://www.opencms.org/taglib/cms" %>
<div style="display:table; padding: 5px;">
<cms:include
file="/system/modules/org.opencms.frontend.templateone/pages/search.html"/>
</div>


search-form.jsp
<%@ page session="false" %>
<%
// If a param q is found, it is placed in the text
box.
String qval = request.getParameter("q");
if(qval == null) qval = "";
%>
<form method="GET" name="searchform"
action="searchresults.jsp"> 
Search:<input type="text" name="q" value="<%= qval
%>"/>
<input type="submit" value="Go"/>
</form>


search.html
<%@ page session="false" buffer="none"
import="java.util.*,org.opencms.search.*,org.opencms.frontend.templateone.*"
%><%--

This is the search code page.

--%><%

// initialise the template bean
CmsTemplateSearch cms = new
CmsTemplateSearch(pageContext, request, response);

// include the template head
cms.includeWithPageUri("head");

%><%--
--%><jsp:useBean id="search" scope="request"
class="org.opencms.search.CmsSearch"><%--
--%><jsp:setProperty name="search" property="*"/><% 
    	search.init(cms.getCmsObject());
    	search.setMatchesPerPage(10);
    	search.setQueryLength(3);
    	search.setDisplayPages(11); %><%--
--%></jsp:useBean><%--

--%><div class="element">
<h2><%= cms.buildSearchHeadline() %></h2>
<p style="vertical-align: middle;">
<form style="margin: 0;" name="searchform"
method="post" action="<%=
cms.link("/system/modules/org.opencms.frontend.templateone/pages/search.html")
%>" onsubmit="return
parseSearchQuery(document.forms['searchform'], '<%=
cms.key("search.error.wordlength") %>');">
<input type="hidden" name="action" value="search" />
<input type="hidden" name="query" value="" />
<input type="hidden" name="index" value="<%=
cms.getSearchIndexName() %>" />
<input type="hidden" name="page" value="1" />
<input type="hidden" name="<%=
CmsTemplateBean.PARAM_URI %>" value="<%=
cms.getRequestContext().getUri() %>" />
<input type="hidden" name="__locale" value="<%=
cms.getRequestContext().getLocale() %>" />

<span style="vertical-align: middle; padding-left:
4px;"><input type="text" name="query2" class="search"
style="width: 350px" value="<%= search.getQuery() %>"
/></span>
<span style="vertical-align: middle;"><input
type="submit" value="<%= cms.key("link.search") %>"
class="formbutton" /></span><br />     
<span style="line-height: 3px; font-size:
1px;"> </span><%

if (cms.isSearchAllDisplayed()) {

%><br />
<span style="vertical-align: middle;"><input
type="checkbox" name="<%=
CmsTemplateSearch.PARAM_SEARCHALL %>" value="true"<%=
cms.getSearchAllChecked() %>></span>
<span style="vertical-align: middle;"><%=
cms.key("search.text.all") %></span><%

}

%><br /> 
</form>
</p>
<%

// get the search results for the page
List result = cms.getSearchResults(search);

out.print(cms.buildSearchErrorMessages(search,
result));

if (result != null && result.size() > 0) {
	
	// show the result list
	out.print(cms.buildSearchResultList(result));
	
	// show the links to other result pages
	out.print(cms.buildSearchLinks(search));	
	
}

%>
</div>
<%
// include the template head
cms.includeWithPageUri("foot");
%>


search.html is a standard inlcuded file from opencms.

anyone has an ideas what that could be?

thanks for help


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the opencms-dev mailing list