• Post Reply Bookmark Topic Watch Topic
  • New Topic

url pattern  RSS feed

 
aionius dactlys
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day everyone.

I have an issue with url patterns in servlet. When i download an html page from a server, i has as images on it and the image url are in the form for "/content/78787_images/image.png". I want to use that a=nd redirect it to something like "/content/test.jsp?path=/content/78787_images/image.png.

in my web.xml i have the following:

<servlet>
<servlet-name>contentServices</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>contentServices</servlet-name>
<url-pattern>/binary/*</url-pattern>
</servlet-mapping>

And help will be appreciated.
 
Nilesh Miskin
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be you can try using a javax.servlet.Filter.
 
Michael Angstadt
Ranch Hand
Posts: 278
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, you're saying that you want your image URL to be "/content/test.jsp?path=/content/78787_images/image.png" instead of "/content/78787_images/image.png"? It doesn't matter what the image URL is, as long as it returns image data.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you shoud set your context path?

Your question was not very clear.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!