Hi Ranchers,
I have two
jsp pages(both jsp pages in the same directory)
i)patientdetails.jsp
ii)uploadpopup.jsp
I have two questions to ask.
question 1
----------
I am getting action mapping error when i am calling a uploadpopup.jsp using window.open from patientdetails.jsp
question 2
----------
if the first problem is rectified,the the appropriate action is called,what i what is ,i have the call the same jsp page(i.e uploadpopup.jsp) and some parameters must be passed to the page,so that based on parameters i will lose the window.
the error for question 1 is..
-----------------------------------
The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Cannot retrieve mapping for action /patientRegistration
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.pd.uploadpopup_jsp._jspService(org.apache.jsp.pd.uploadpopup_jsp:266)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:302)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /patientRegistration
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:723)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:419)
org.apache.jsp.pd.uploadpopup_jsp._jspService(org.apache.jsp.pd.uploadpopup_jsp:140)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:302)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
--------------------------------
my struts-config file
-------------------------------
<action-mappings>
<action
path="/patientRegistration"
type="patientdemographics.actionservlet.PatientAction"
name="PatientDetailsForm"
scope="request"
validate="true"
parameter="action"
input="/patientregistration.jsp">
<forward name="success" path="/patientregistrationcard.jsp"/>
<forward name="patientdetails" path="/patientdetails.jsp"/>
<forward name="imageuploaded" path="/uploaded.jsp"/>
</action>
<action-mappings>
--------------------------------
patientdetails.jsp
-----------------------------
<script type="text/JavaScript">
<!--
function winpopup()
{
open("<%=root%>/pd/uploadpopup.jsp","","width=500,height=250,scrollbars,statusbar=yes");
}
</script>
----------------------------
uploadpopup.jsp
--------------------------
<html:form method="post" action="/patientRegistration" enctype="multipart/form-data">
<input type="hidden" name="action" value="imageupload"/>
<html:file property="theFile"/>
nbsp; <html:submit>Upload</html:submit>
</html:form>
---------------------------------
help me out ranchers..
Sreenivas