• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Strange behaviour of jsp:include

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two of the pages in my application are called "login.jsp" and "confirm.jsp".

confirm.jsp has this line in it.



only if init-caps is given to the file name of login.jsp on Windows, it works fine. When I give the correct filename of login.jsp (without init-caps), I get this exception:

java.lang.NoClassDefFoundError: org/apache/jsp/login_jsp (wrong name: org/apache/jsp/Login_jsp)



But on Linux, it works fine only if the correct case is given. Why is this strange behaviour on Windows?
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Windows, unlike sane operating systems, is case-insensitive.
 
Sangeetha Rao
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand that Windows is case-insensitive. It means that you can give either upper case or lower case in a file name and it is sure to fetch the same file. But in my case, when I give lower case (the actual file name is with lower case) it doesnt work but if I give upper case it works!
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks as if a discrepency was introduced when the class file was created from the JSP's servlet. Be sure to always use the correct case when referencing files even if using Windows.

I'd remove all work files and make sure that the first time that you "hit" the JSP, you use the correct casing.
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic