user529265
user529265

Reputation: 820

web.xml servlet mapping infinite loop

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...

Upvotes: 3

Views: 1323

Answers (1)

gparis
gparis

Reputation: 1267

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

Upvotes: 5

Related Questions