• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSp - Servlet - Tomcat/GlassFish

 
samarthya saurabh
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
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