As a test I modified my form declaration as follows:

<html:form action="/partner_search_action.do" method="POST" onsubmit="return
validatePartnerSearchForm(this);" >

After doing this my webapp now properly displays when my jahia page is
initially loaded.  I can enter data into my webapp's form, process the form,
see the action retrieving data but the webapp is never redisplayed to show
the results of the action.  I see no errors in the log this time but my
webapp is not redisplayed.

Not sure if I should be using the response.encodeURL and
request.getContextPath calls or not.  Or is something else needed to get
this working?

Tim


-----Original Message-----
From: Tim Pyle [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 27, 2007 11:43 AM
To: [email protected]
Subject: Jahia 5 Webapp Form Action Issue

I have a basic struts webapp I'm trying to run in Jahia 5.  The webapp
deploys fine but will not run.  From what I can tell it does not like the
following code I have in a jsp.

<html:form action='<%=response.encodeURL(request.getContextPath() +
"/partner_search_action.do")%>' method="POST" onsubmit="return
validatePartnerSearchForm(this);" >

The following errors are generated when processing this code:

11:32:21,070 ERROR [jsp]:704 - Servlet.service() for servlet jsp threw
exception
javax.servlet.jsp.JspException: Cannot retrieve mapping for action
/jahia/Jahia/cache/bypass/pid/2

1296047 [2007-02-27 11:32:21,227]
[org.jahia.services.applications.ServletDispatchingProvider] ERROR - Error
in web application, can't access application Locator
org.apache.jasper.JasperException: Exception in JSP:
/partner_search_form.jsp:74

74:     <html:form action='<%=response.encodeURL(request.getContextPath() +
"/partner_search_action.do")%>' method="POST" onsubmit="return
validatePartnerSearchForm(this);" >

Below is some of my configuration.

jahia.xml:
<?xml version="1.0" encoding="ISO-8859-1"?> <jahia>
    <entrypoints>
        <entrypoint>
            <name>Locator</name>
            <display-name>Locator</display-name>
            <description>Locator for Installers and Retailers</description>
            <target type="servlet-name">action</target>
        </entrypoint>
    </entrypoints>   
</jahia>

web.xml:
...
...
    <servlet>
        <servlet-name>action</servlet-name>
 
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
...
...
    </servlet>

    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>
...
...
    <welcome-file-list>
        <welcome-file>/partner_search_load_action.do</welcome-file>
    </welcome-file-list>

Any ideas or help on what may be causing this is appreciated.

Thanks,
Tim Pyle


Reply via email to