You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Jon.Ridgway" <Jo...@upco.co.uk> on 2002/08/28 15:45:51 UTC

Confirmation prior to post

Hi All,

I was wondering if anyone has done the following and could give advice. A
form has a text box into which the user enters an ID. This invokes some
JavaScript, which needs to invoke a tag lib that checks if the ID exists; if
it doesn't a JavaScript confirm dialgoue asks the user if they wish to add
the ID.

The problem is how do I pass the ID, which at this stage (prior to post) is
a JavaScript varible into my tag lib?

Is there a better/tried and tested approach to this; I'm guessing that its a
pretty common problem...

Jon.

The contents of this email are intended only for the named addressees and
may contain confidential and/or privileged material. If received in error
please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
e-mail from your system. Unauthorised review, distribution, disclosure or
other use of this information could constitute a breach of confidence. Your
co-operation in this matter is greatly appreciated. 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Cannot Retrieve Mapping for Action

Posted by "Todd G. Nist" <tn...@bellsouth.net>.
Chandra,

Remove the .do from you action attribute in the form definition:

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<head>
</head>
<body>
<html:form  method="post" action="/logon">
.
.
.

HTH.

Regards,
Todd

-----Original Message-----
From: Chandrasekar [mailto:chandrav@wisorindia.soft.net]
Sent: Thursday, August 29, 2002 12:36 AM
To: Struts Users Mailing List
Subject: Cannot Retrieve Mapping for Action


Hi ,
First sorry for a lengthy mail.

Searched the mailing list archive and tried every solution suggested there
...

still nothing ...

I am getting the following error when trying to invoke the login page.(Using
weblogic 6.0)

Aug 29, 2002 9:39:13 AM IST> <Error> <HTTP>
<[WebAppServletContext(6765727,wisor
repwebapp)] Root cause of ServletException
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /logon
        at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:784)
        at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
        at jsp_servlet.__login._jspService(__login.java:123)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImp
l.java:213)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSer
vletContext.java:1302)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImp
l.java:1680)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>

Below are my configuration details

web.xml

<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value>ApplicationResources</param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>false</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

 <!-- Standard Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>

struts-config.xml file

<struts-config>
<form-beans>
<form-bean name="loginForm" type="com.wisor.pom.formbeans.LoginFormBean"/>
</form-beans>
<global-forwards>
    <forward   name="loginForm" path="/Login.jsp"/>
</global-forwards>
<action-mappings>
<action path="/logon"
	type="com.wisor.pom.action.LoginAction"
	name="loginForm"
	input="/Login.jsp"
	scope="request"
	validate="true">
<forward name="success" path="/Login.jsp" />
<forward name="failure" path="/Login.jsp" />
</action>
</action-mappings>
</struts-config>

// all my Action and ActionForm classes are available inside the
WEB-INF/classes directory
// JSP pages available inside webapp directory


my JSP page

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<head>
</head>
<body>
<html:form  method="post" action="/logon.do">
<html:text property="username" />
<html:text   property="password" />
<html:submit/>

</html:form>
</body>
</html:html>

Thanks
Chandra


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Cannot Retrieve Mapping for Action

Posted by Chandrasekar <ch...@wisorindia.soft.net>.
Hi ,
First sorry for a lengthy mail.

Searched the mailing list archive and tried every solution suggested there
...

still nothing ...

I am getting the following error when trying to invoke the login page.(Using
weblogic 6.0)

Aug 29, 2002 9:39:13 AM IST> <Error> <HTTP>
<[WebAppServletContext(6765727,wisor
repwebapp)] Root cause of ServletException
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /logon
        at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:784)
        at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
        at jsp_servlet.__login._jspService(__login.java:123)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImp
l.java:213)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSer
vletContext.java:1302)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImp
l.java:1680)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>

Below are my configuration details

web.xml

<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>application</param-name>
      <param-value>ApplicationResources</param-value>
    </init-param>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>validate</param-name>
      <param-value>false</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

 <!-- Standard Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>

struts-config.xml file

<struts-config>
<form-beans>
<form-bean name="loginForm" type="com.wisor.pom.formbeans.LoginFormBean"/>
</form-beans>
<global-forwards>
    <forward   name="loginForm" path="/Login.jsp"/>
</global-forwards>
<action-mappings>
<action path="/logon"
	type="com.wisor.pom.action.LoginAction"
	name="loginForm"
	input="/Login.jsp"
	scope="request"
	validate="true">
<forward name="success" path="/Login.jsp" />
<forward name="failure" path="/Login.jsp" />
</action>
</action-mappings>
</struts-config>

// all my Action and ActionForm classes are available inside the
WEB-INF/classes directory
// JSP pages available inside webapp directory


my JSP page

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<head>
</head>
<body>
<html:form  method="post" action="/logon.do">
<html:text property="username" />
<html:text   property="password" />
<html:submit/>

</html:form>
</body>
</html:html>

Thanks
Chandra


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Confirmation prior to post

Posted by Andrew Hill <an...@gridnode.com>.
I saw an article about doing this at the apple developer website:
http://developer.apple.com/internet/javascript/iframe.html
Havent had time to play with the technique much myself yet, but seems to be
quite a neat trick.

-----Original Message-----
From: Jacob Hookom [mailto:hookomjj@uwec.edu]
Sent: Wednesday, August 28, 2002 22:11
To: 'Struts Users Mailing List'; 'Struts Users Mailing List'
Subject: RE: Confirmation prior to post


One common thing designers are doing is taking advantage of iframes as a
page controller.  You place a 0px by 0px iframe on the page by which you
can submit content via javascript (POST) and then have that page modify
page data dynamically on return, but to the user, they are looking at
the same page they always have been.

-Jacob

| -----Original Message-----
| From: Jon.Ridgway [mailto:Jon.Ridgway@upco.co.uk]
| Sent: Wednesday, August 28, 2002 8:46 AM
| To: 'Struts Users Mailing List '
| Subject: Confirmation prior to post
|
| Hi All,
|
| I was wondering if anyone has done the following and could give
advice. A
| form has a text box into which the user enters an ID. This invokes
some
| JavaScript, which needs to invoke a tag lib that checks if the ID
exists;
| if
| it doesn't a JavaScript confirm dialgoue asks the user if they wish to
add
| the ID.
|
| The problem is how do I pass the ID, which at this stage (prior to
post)
| is
| a JavaScript varible into my tag lib?
|
| Is there a better/tried and tested approach to this; I'm guessing that
its
| a
| pretty common problem...
|
| Jon.
|
| The contents of this email are intended only for the named addressees
and
| may contain confidential and/or privileged material. If received in
error
| please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
| e-mail from your system. Unauthorised review, distribution, disclosure
or
| other use of this information could constitute a breach of confidence.
| Your
| co-operation in this matter is greatly appreciated.
|
| --
| To unsubscribe, e-mail:   <mailto:struts-user-
| unsubscribe@jakarta.apache.org>
| For additional commands, e-mail: <mailto:struts-user-
| help@jakarta.apache.org>
|
| ---
| Incoming mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
|

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Confirmation prior to post

Posted by Jacob Hookom <ho...@uwec.edu>.
One common thing designers are doing is taking advantage of iframes as a
page controller.  You place a 0px by 0px iframe on the page by which you
can submit content via javascript (POST) and then have that page modify
page data dynamically on return, but to the user, they are looking at
the same page they always have been.

-Jacob

| -----Original Message-----
| From: Jon.Ridgway [mailto:Jon.Ridgway@upco.co.uk]
| Sent: Wednesday, August 28, 2002 8:46 AM
| To: 'Struts Users Mailing List '
| Subject: Confirmation prior to post
| 
| Hi All,
| 
| I was wondering if anyone has done the following and could give
advice. A
| form has a text box into which the user enters an ID. This invokes
some
| JavaScript, which needs to invoke a tag lib that checks if the ID
exists;
| if
| it doesn't a JavaScript confirm dialgoue asks the user if they wish to
add
| the ID.
| 
| The problem is how do I pass the ID, which at this stage (prior to
post)
| is
| a JavaScript varible into my tag lib?
| 
| Is there a better/tried and tested approach to this; I'm guessing that
its
| a
| pretty common problem...
| 
| Jon.
| 
| The contents of this email are intended only for the named addressees
and
| may contain confidential and/or privileged material. If received in
error
| please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
| e-mail from your system. Unauthorised review, distribution, disclosure
or
| other use of this information could constitute a breach of confidence.
| Your
| co-operation in this matter is greatly appreciated.
| 
| --
| To unsubscribe, e-mail:   <mailto:struts-user-
| unsubscribe@jakarta.apache.org>
| For additional commands, e-mail: <mailto:struts-user-
| help@jakarta.apache.org>
| 
| ---
| Incoming mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
| 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/2/2002
 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>