aspose file tools*
The moose likes Servlets and the fly likes JSp - Servlet - Tomcat/GlassFish Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSp - Servlet - Tomcat/GlassFish" Watch "JSp - Servlet - Tomcat/GlassFish" New topic
Author

JSp - Servlet - Tomcat/GlassFish

samarthya saurabh
Greenhorn

Joined: May 03, 2010
Posts: 17
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
samarthya saurabh
Greenhorn

Joined: May 03, 2010
Posts: 17
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

Joined: Jan 10, 2002
Posts: 61180
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
samarthya saurabh
Greenhorn

Joined: May 03, 2010
Posts: 17
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSp - Servlet - Tomcat/GlassFish