3

I am using appengine and seem to be having some problems with url routing

My web.xml

<servlet>
    <servlet-name>ViewServlet</servlet-name>
    <jsp-file>viewdata.jsp</jsp-file>
</servlet>

<servlet-mapping>       
    <servlet-name>ViewServlet</servlet-name>
    <url-pattern>/view/*</url-pattern>
</servlet-mapping>


<welcome-file-list>
    <welcome-file>default.html</welcome-file>
</welcome-file-list>

The redirection works just fine when I test in the local machine. On upload to appengine when I try to navigate to http://myurl/view/ it redirects infinitely to

http://myurl/view/default.html/default.html...

Is this the right way to redirect in web.xml. Am I missing something here. It work fine on the local machine. Just goes into an infinite loop when uploaded onto gae. Any help would be appreciated...

1 Answer 1

5

Note that the <jsp-file> must start with a forward slash (/) if the JSP is in the application's root directory.

1
  • thanks...that worked...was chasing this for a couple of hours...:)
    – user529265
    Commented Mar 2, 2011 at 6:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.