Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

EL function  RSS feed

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am doing the dice exercise from HFJS and everything works fine when I put my project in webppas (webppas/myDiceProject) => http://localhost:8080/ch8_dice/result.jsp
However, when I make a subdirectory (webppas/rev/myDiceProject) => http://localhost:8080/rev/ch8_dice/result.jsp

I am getting this error




in jsp I have this



How to make it work, when the project is in subdirectory ?


regards,

 
Author and ninkuma
Marshal
Posts: 66801
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a TLD file declared with the URI diceFunction? (Not a good URI, by the way.)
 
A. Aka
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes I have and it looks like :



it works fine fine when I copy the project in webapps, however when I put the project in subdirectory, i am getting an error !
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66801
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "when I put the project in subdirectory"? If your folder structure does not conform the the web app standard, the web app will certainly not work properly.
 
A. Aka
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the project structure is conform as it is working when I put it in webapps folder of tomcat (webapps/ch8_dice/)
however, when I do this (webapps/rev/ch8_dice/) I am getting the error

I have tested with a simple jsp (using webapps/rev/ch8_dice/), without EL function, and it works

My questions
why EL finction do not work, when there is a subdirectory ?
what I should do to make it work ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66801
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

A. Aka wrote:why EL finction do not work, when there is a subdirectory ?


Because the folder structure no longer conforms to the rules. Break the rules, things don't work right. Simple as that.

what I should do to make it work ?


Either put the context root folder (ch8_dice in this case, which I assume is the folder that contains WEB_INF) back in webapps, or move the folder to someplace other than under webapps and configure it using a context file to be an indpependent web app.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!