struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samere, Adam J" <asam...@paychex.com>
Subject RE: Global forwards and actions
Date Thu, 01 Jun 2006 18:49:10 GMT
Maya,

It looks like you need to use the <html:rewrite/> tag to generate your url to the /Delete
action.

form.action="<html:rewrite action='/Delete'/>";

The tag will look up your action and prepend the context path etc.

-----Original Message-----
From: Maya menon [mailto:maya_java@yahoo.com] 
Sent: Thursday, June 01, 2006 2:42 PM
To: Struts Users Mailing List
Subject: Re: Global forwards and actions

well,
   
  Here is exactly what I have:
   
  1. jsp files are in /jsp folder.
  struts-config file entries and action classes. 
   
  struts-config entry is like this:
   
  <action path="/Delete" 
  type="com.xx.xxx.xxx.xxxaction" >
  <forward name="success" path="/jsp/delete.jsp"/>
  <forward name="failure" path="/jsp/failure.jsp"/>
  </action>
  

Monkeyden <monkeyden@gmail.com> wrote:
  

If that's the error you're getting, then that can't be your code. You're trying to request
"/jsp/Delete" somewhere in your code. I suspect that the /jsp is a directory and thus will
only be relevant to the action-forwards, not the form or the action-mapping.

On 6/1/06, Monkeyden wrote:
>
> The form action is the same as the action mapping in struts-config, 
> plus the ".do", so if the form has:
>
>   
>
> then the action mapping must be:
>
> 
>
>
> On 6/1/06, Maya menon wrote:
> >
> > Ok, for delete.jsp I put action="delete.do"
> > form.action="Delete.do";
> > form.submit ();
> >
> > In struts-config.xml, I put
> >
> > > > type="com.xx.xxx.xxx.xxxAction" >
> > 
> > 
> > 
> >
> > Now, when I run, it it gives me the following error:
> > type Status report
> > message Invalid path /jsp/Delete was requested description The 
> > request sent by the client was syntactically incorrect (Invalid path 
> > /jsp/Delete was requested).
> >
> > What am I missing here ?
> >
> >
> > Maya menon wrote:
> > Manoj,
> >
> > Thanks.
> > So, just 2 action entries r fine, thats what you think.
> >
> > manoj.tripathi@bt.com wrote:
> > Sample config
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Note the following
> > 1. This is a typical example modify according to your need 2. Name 
> > of the form is addForm and deleteForm in the xml above (You can 
> > change as you want) 3. Ask questions I will answer them all (not 
> > much work to do today) 4. Path in action mappings can be tile if 
> > that is the case you will need a tile definition as well or a jsp 
> > page(not a good idea to use jsp) 5. Optional: good idea to have all 
> > these xml files per struts module Hope that helps Manoj
> >
> >
> > -----Original Message-----
> > From: Maya menon [mailto:cc]
> > Sent: 01 June 2006 16:46
> > To: user@struts.apache.org
> > Subject: Global forwards and actions
> >
> > All,
> >
> > I want to understand this better:
> >
> > Say, I have one form , addDetails.jsp and another deleteDetails.jsp 
> > addDetails.jsp when submitted should call AddAction and 
> > deleteDetails should call Deleteaction.
> >
> > In adddetails I have and in delete I have
> >
> > Now, what all entries do I need in struts-config.xml for these to be 
> > forwarded to the correct action classes ?
> > thanks
> > Maya
> >
> >
> > ---------------------------------
> > Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great 
> > rates starting at 1ยข/min.
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Get on board. You're invited to try the new Yahoo! Mail Beta.
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around 
> > http://mail.yahoo.com
> >
>
>


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

-----------------------------------------
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message