Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL function

 
A. Aka
Ranch Hand
Posts: 93
  • 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,

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
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: 93
  • 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
Pie
Posts: 64843
86
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: 93
  • 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
Pie
Posts: 64843
86
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