• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Error Regarding

 
Roshini Sridharan
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Roshini Sridharan
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
 
Roshini Sridharan
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant "Regarding".
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic