• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Can't execute jsp file

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have created a war file with the following command:

mvn compile war:war

The war application is written in spring, hibernate, jpa, view is jsp, running in glassfish 3.1 server.

The deployment is completed successfully, and i have verified that the war file is display under the Application menu option in glassfish Admin console.

The jsp file is guest.jsp which is shown below:



The mapping is also inplaced in the WEB-INF/context/applicationContext.xml file:



Typing the following url

localhost:8080/guest-book/guest.jsp

resulted:


HTTP Status 404 -

type Status report

message

descriptionThe requested resource () is not available.

GlassFish Server Open Source Edition 3.1



Here is my source tree about where jsp file is:

WEB-INF/context/applicationContext.xml
WEB-INF/jsp/guest.jsp

I don't know what is wrong is my file structure or definition in my xml file.

Can anyone please suggestion a way to resolve this error?

Any suggestion is very much appreciated.

Thanks
Sam
 
Sheriff
Posts: 67695
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSP files anywhere under WEB-INF are hidden and cannot be served.
 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:JSP files anywhere under WEB-INF are hidden and cannot be served.



Arh.... thank you very much for the quick response. I forgot this is the case.

Thanks so much
Sam
 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

I didnt change the location of my jsp, but created the following mapping in my web-info/context/applicationContext.xml file:

<bean name="/guest.HTML" class="guest.GuestController"/>

Navigate to localhost:8080/guest-book/guest.HTML still having the same error.

Thanks & best regards
Sam
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic