|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
obtaining the current URL of the calling pageI have "page with free text" object which has a jsp template behind it.
The jsp has html code for building a form in it and invokes another jsp which evaluates the form (checks for mandatory fields and plausibility). In case some fields were not filled in I would like to invoke the same page with a parameter (or a list of paramters) indicating which fields were not filled in correctly. (I would then frame the required fields in red or something) Anyway, I need a mechanism to find out the URL of the "page with free text" that has that form jsp template. When I do something like CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); String thisurl = cms.info("opencms.url"); I'm getting the URL of the jsp. Thanks for helping. -- Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de _______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/mailman/listinfo/opencms-dev |
|
|
Re: obtaining the current URL of the calling pageHi Christoph,
what about using String thisurl = cms.info("opencms.request.uri"); Eska
|
|
|
Re: obtaining the current URL of the calling pageOn Thu, Oct 15, 2009 at 01:07:31AM -0700, Eska wrote:
> > Hi Christoph, > > what about using > > String thisurl = cms.info("opencms.request.uri"); > > Eska Yeah, that's it. Thanks. -- Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de > > > > Christoph P. Kukulies wrote: > > > > I have "page with free text" object which has a jsp template behind it. > > The jsp has html code for building a form in it and invokes another jsp > > which evaluates the form (checks for mandatory fields and plausibility). > > > > In case some fields were not filled in I would like to invoke the same > > page with a parameter (or a list of paramters) indicating which fields > > were not filled in correctly. > > > > (I would then frame the required fields in red or something) > > Anyway, I need a mechanism to find out the URL of the > > "page with free text" that has that form jsp template. > > > > When I do something like > > > > CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, > > response); > > String thisurl = cms.info("opencms.url"); > > > > I'm getting the URL of the jsp. > > > > Thanks for helping. > > > > _______________________________________________ _______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/mailman/listinfo/opencms-dev |
|
|
Re: obtaining the current URL of the calling pageChristoph P. Kukulies wrote:
> I have "page with free text" object which has a jsp template behind it. > The jsp has html code for building a form in it and invokes another jsp > which evaluates the form (checks for mandatory fields and plausibility) What do you mean by "invoke"? Do you include the other JSP or do you issue a redirect? If you do a redirect, then you are on a different page and you would have to inspect the "referrer" HTTP header, which might not necessarily be sent by the client or have to keep some session state, etc.. If you just include another JSP into your template, then the call of cms.info("opencms.url"); will return the URL of the overall page and you should not have a problem Best regards Christian > . > > In case some fields were not filled in I would like to invoke the same > page with a parameter (or a list of paramters) indicating which fields > were not filled in correctly. > > (I would then frame the required fields in red or something) > Anyway, I need a mechanism to find out the URL of the > "page with free text" that has that form jsp template. > > When I do something like > > CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); > String thisurl = cms.info("opencms.url"); > > I'm getting the URL of the jsp. > > Thanks for helping. > > -- > Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de > > _______________________________________________ > This mail is sent to you from the opencms-dev mailing list > To change your list options, or to unsubscribe from the list, please visit > http://lists.opencms.org/mailman/listinfo/opencms-dev > > _______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/mailman/listinfo/opencms-dev |
|
|
Re: obtaining the current URL of the calling page
Sorry - seems like Eska wrote the correct answer - just forget my mail
Christian Christoph P. Kukulies wrote: _______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/mailman/listinfo/opencms-dev |
|
|
Re: obtaining the current URL of the calling pageOn Fri, Oct 16, 2009 at 02:56:05PM +0200, Christian Steinert wrote:
> Christoph P. Kukulies wrote: >> I have "page with free text" object which has a jsp template behind it. >> The jsp has html code for building a form in it and invokes another jsp >> which evaluates the form (checks for mandatory fields and plausibility) > What do you mean by "invoke"? Do you include the other JSP or do you > issue a redirect? Thanks, Christian, by invoke I meant the action part of the FORM. But as you said, I got the answer I needed. -- Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de > > If you do a redirect, then you are on a different page and you would > have to inspect the "referrer" HTTP header, which might not necessarily > be sent by the client or have to keep some session state, etc.. > > If you just include another JSP into your template, then the call of > > cms.info("opencms.url"); > > will return the URL of the overall page and you should not have a problem > > Best regards > Christian _______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/mailman/listinfo/opencms-dev |
| Free embeddable forum powered by Nabble | Forum Help |