This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JSP and the fly likes EL function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "EL function" Watch "EL function" New topic
Author

EL function

A. Aka
Ranch Hand

Joined: Sep 08, 2012
Posts: 44
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

Joined: Jan 10, 2002
Posts: 60046
    
  65

Do you have a TLD file declared with the URI diceFunction? (Not a good URI, by the way.)


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
A. Aka
Ranch Hand

Joined: Sep 08, 2012
Posts: 44
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

Joined: Jan 10, 2002
Posts: 60046
    
  65

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

Joined: Sep 08, 2012
Posts: 44
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

Joined: Jan 10, 2002
Posts: 60046
    
  65

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EL function
 
Similar Threads
Stock up on JSP 404 error. JSP could not be located.
output of result.jsp
what is wrong with my tld
Can't render JSP
Servlet JSP Link error