Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

JSp - Servlet - Tomcat/GlassFish  RSS feed

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Spring 3.0 + with eclipse as my tool, I added a simple controller to respond to incoming requests and following is my Deployment descriptor file




Now when I deploy it in tomcat it runs fine, when I use GlassFish Open source v3 I get error while deploying,




I believe the JSP servlet I have defined is the problem, but what should I do to remove this issue?

- Samarthya
 
samarthya saurabh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I remove the JSP declaration it works in Glasffish fine, but the request for the desired JSP file does not work under tomcat6.
 
Author and ninkuma
Marshal
Posts: 66783
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the purpose of declaring the jsp mapping in the first place? The whole purpose of putting JSPs under WEB-INF is to not allow them to be directly addressed by URL. If that's not what you want (and it should be), don't put the JSPs there.

Why do you want the JSPs addressable? That's a pretty poor practice.
 
samarthya saurabh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:What is the purpose of declaring the jsp mapping in the first place? The whole purpose of putting JSPs under WEB-INF is to not allow them to be directly addressed by URL. If that's not what you want (and it should be), don't put the JSPs there.

Why do you want the JSPs addressable? That's a pretty poor practice.



Probably it is a bad practice, I just was trying to resolve a request for page (JSP) to the default view. Under tomcat if I do not include the JSP servlet tag the page is bever resolved.

Probably just to make it more clear - what I am trying to achieve here is create a set of pages and when the request comes in return the appropriate view. Just to learn the mapping process in a cleaner way.

A default Index.html I want to route and return a WELCOME.JSP for that and for every other direct request for any other page I will show a not accessible page, without using the spring-security here or any other helper framework libs.
- Samarthya
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!