Well this is a commun pb with the unstatfull nature of the http protocol itself i think there is no real solution to this but hacks: some suggest sending a http 200 msg as soon as the request is recived and then continue the processing. I think also adding a hidden field in the form with the transactionID (maybe on the session or serialisez to a db) and checking on it uppon recive of the request to see if this transaction have been already processed is a good idea BTW this is also an overhead for the application you may implement it only on some forms where this may cause a pb. I am interrested by other means to solve this. Best Ragards. Daoud AbdelMonem Faleh
On 7/13/06, Pankaj Gupta <[EMAIL PROTECTED]> wrote:
I understand that providing direct access to JSP's is not a good idea. But the problem that I am facing is that if we dont use redirect, the user of the application is confused by the way Browser's refresh and back/forward operations behave. Can you suggest some other way by which I can prevent the request from getting submitted again on Browser's refresh or forward/next operations? regards Pankaj Daoud Abdelmonem Faleh wrote: > Hi, > > Under Tomcat i would keep my jsp's under an accessible directory and > use the security-constraint in web.xml : (something like) > ... > <security-constraint> > <web-resource-collection> > <web-resource-name>protected jsp</web-resource-name> > <url-pattern>/jsp/*.jsp</url-pattern> > </web-resource-collection> > </security-constraint> > > to prevent direct access to my jsp's files then forward to them from > actions. > The added benefit is that we enforce the MVC model in that only the > controler can choose the next view. > > Hope this helps. > Daoud AbdelMonem Faleh. > > > On 7/13/06, James Woodward <[EMAIL PROTECTED]> wrote: >> I may be wrong but if all the jsp pages are in the WEB-INF directory and >> you try to redirect to a .jsp file it's basically the same as loading it >> directly. I think you have to use a forward to access it. You could >> probably get around it if you created an action to specifically display >> the jsp file and use a redirect to that action. >> >> Keep in mind I'm no expert and could be completely wrong about this one. >> >> James >> >> Pankaj Gupta wrote: >> > Hi All, >> > >> > I have specified redirect="true" in my action forwards but tomcat >> > fails to find the jsp. I have kept all my jsp's in WEB-INF/jsp folder >> > so as to avoid direct jsp access. Please suggest how can I make >> > redirect to work. >> > >> > regards, >> > Pankaj >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]