Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't set JSP as welcome file in the GAE Guestbook example

i'm following the example here:

https://developers.google.com/appengine/docs/java/gettingstarted/usingjsps

so i created a really basic jsp file:

<html>
<body>
testing

</body>
</html>

and I'm trying to make this the welcome page, like it says in the tutorial:

    <welcome-file-list>
        <welcome-file>guestbook.jsp</welcome-file>
    </welcome-file-list>

but it doesn't get called at. when I go to http://localhost:8888 it's as if it's missing a file (i renamed index.html. when there is index.html - it displays it).

when i visit http://localhost:8888/guestbook.jsp i can see the jsp file with no problem

UPDATE: this happens only on my development server. when i deployed to google app engine, it works as expected:

http://test-ishener.appspot.com/

like image 632
Moshe Shaham Avatar asked Aug 02 '12 10:08

Moshe Shaham


1 Answers

Probably you are not storing JSP in root folder, please show your project directory structure.

Also if you have multiple matches in welcomefile lists say:

<welcome-file>index.html</welcome-file>
<welcome-file>guestbook.jsp</welcome-file>

then first matching will be executed ie index.html, if this is the case either move guestbook.jsp to first or remove index.html welcome-file tag

like image 139
Pradeep Simha Avatar answered Sep 20 '22 19:09

Pradeep Simha