Two Laptop Bag*
The moose likes Servlets and the fly likes Servlet  Error Regarding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet  Error Regarding" Watch "Servlet  Error Regarding" New topic
Author

Servlet Error Regarding

Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
Hi All,

Working on an application that's migrated from WSAD 5.1 to RAD7. In one of the scenario the application comes up with an url

"http://xxx.com/null/index.jsp" and in case of running WAS5.1 server this throws a 404 Page Not Found Error

whereas in case of running the same URL in WAS6.1 server this returns JSP Compilation Error as shown below.
[ May 27, 2008: Message edited by: roshini sridhar ]
Esteban Puertas
Greenhorn

Joined: Mar 23, 2008
Posts: 22
Hi,
If you check the response code you would see that WAS 6.1 is also sending the status code 404.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60767
    
  65

Please use real words when posting to the forums. Abbreviations such as "regd." in place of whatever it supposed to mean only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
Hi,

As its pointed out that the Response comes as Status HTTP 404.

But my question is why there is a Page Not Found.. the usual html page that's displayed when the WAS 5.1 server used.

And why there is a HTTP Status 404 msg with JSP Compilation Error in case i hit WAS 6.1

I understand that the request goes to the JSP Processor that displays this page. Why is the request redirected to JSP Processor when the resource is not found..[HTTP 404 error]? kindly clarify.

Please provide some insight on this.

Thanks a lot in advance for your time.


Hi Bear,

I apologize for the term usage.


Regards
Roshini S
[ May 22, 2008: Message edited by: roshini sridhar ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60767
    
  65

Originally posted by roshini sridhar:
I apologize for the term usage.
No need to apologize. But you could go fix it. I still have no idea what it means.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What's "Regd"?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
I meant "Regarding".
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Error Message:JSPG0036E: Failed to find resource /null/index.jsp

I assume that your context path is not really supposed to be "null".
Can you show use the code that builds the link?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Also, if you click on the link in the first post of this thread, you can get rid of that "Regd" thing.
Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
Hi Ben,

The code at one point of time retrieves some null value because of session expiry and that's why the path comes as "null/index.jsp" instead of /xxx/index.jsp.

My question is why the same routing in the WAS5.1 displays a PageNotFound. HTML Page and in WAS6.1 it displays the JSP Compilation Error.

Is there any way that we can stop the URL not to move to the JSP Processor if its having a null value.

Thanks for your time and help.


Roshini Sridharan
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I'm not sure how a session expiration is causing your urls to do this.
Are you using session variables to build the URL?

If so, you should first check for an expired session and (if expired) redirect the user to the application's login page.
Roshini Sridharan
Ranch Hand

Joined: Jan 16, 2001
Posts: 143
The thing is the error occurs when we try to retrieve a value to return to the home page from the request.getServletPath() method.

We expect url like /xxx/index.jsp but sometimes the request.getServletPath() method returns /null/index.jsp.

Also, is there any reason for the behaviour difference when its run in the Websphere Application Server 5.1 and 6.1
[ May 27, 2008: Message edited by: roshini sridhar ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Error Regarding
 
Similar Threads
Problem in running struts application.
problem in j2me HTTP connection...ask for airtime charging..:S
problem with .jar files deployment
WAS4.0 on XP
dowloading file from a server problem