Hi Pankaj,

The mapping urls in Blossom scope are not exact browser urls.

What you can do is:
1. go to: Configuration > server/filters/servlets
2. The easiest way is to copy an existing servlet, and modify the mapping
path to your mapping (say ClasspathSpoolServlet)
3. set "class" nodeData to:
info.magnolia.cms.filters.ServletDispatchingFilter
4. set "serverClass" nodeData to:
org.springframework.web.servlet.DispatcherServlet
5. create or expand the "parameters" subnode
6, in the "parameters" node create a nodedata"contextConfigLocation" and
set the value to your context,
eg: classpath:/META-INF/spring/some-mvc-config.xml

Et voila, an mvc controller on the mapping you defined.

Rgds,
Erik


On Fri, Nov 15, 2013 at 3:22 PM, Pankaj Sharma (via Magnolia Forums) <
[email protected]> wrote:

> Hi Erik,
>
> Thanks for you response.
> I think first idea would not work as I need not to render any content but
> you second idea should be helpful what I need a way by which i can register
> a controller or servlet(having simple spring nature) and we can call it in
> ajax(using java script).
> I tried to add
> <servlets>
>         <servlet>
>                 <name>rest</name>
>
> <class>org.springframework.web.servlet.DispatcherServlet</class>
>                 <mappings>
>                   <mapping>/rest/*</mapping>
>                 </mappings>
>                 <params>
>                   <param>
>                     <name>contextConfigLocation</name>
>                     <value>classpath:/blossom-servlet.xml</value>
>                   </param>
>                 </params>
>                 <!-- <load-on-startup>1</load-on-startup> -->
>         </servlet>
> </servlets>
> in blossom module descriptor and created a controller with
> @RequestMapping("/rest").but it didnt work.
>
> Can you suggest me exactly how to bypass magnolia filters and get request
> in controller or servlet.
>
> Many Thanks,
> Pankaj
>
> --
> Context is everything:
> http://forum.magnolia-cms.com/forum/thread.html?threadId=a4bf260e-b516-4c29-9c2f-1b41c71377dc
>
>
> ----------------------------------------------------------------
> For list details, see
> http://www.magnolia-cms.com/community/mailing-lists.html
> Alternatively, use our forums: http://forum.magnolia-cms.com/
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
>
>


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to