Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • 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:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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.
 
Marshal
Posts: 67163
169
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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!