• Post Reply Bookmark Topic Watch Topic
  • New Topic

EL beginner problem (without Eclipse)  RSS feed

 
Petar Thomas
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't start to work with EL, it frustrates me and panics me becaouse I have a lots of things to do. I appologise for that.

Now I tried the same thing only with Notepad. When I visit Test.jsp I get:
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 13 in the generated java file
DiceRoller cannot be resolved to a type



I created this directory structure

I compiled DiceRoller.java only with
javac DiceRoller.java
and left there class file and source file. Then I copied the whole SampleApp directory into apache/webapps/ directory, and startup the Tomcat.

Test.jsp


myFunctions.tld



web.xml


DiceRoller.java



response on http://localhost:8080/SampleApp/Test.jsp




Thank You...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Al classes in web applications must be in a package other than the default.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And why on Earth is your Java source flile in WEB-INF/classes?
 
Petar Thomas
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Becaouse I was acting like I am smart. No other reason. I compiled java file inside the directory structure, got class file next to it, and just copied it the whole directory to the webapps. (later I moved the java file around and compiled it from inside the webapps directory)I thought it just can't hurt so I left it...And for all classes that have to be in other than default directory... How could I not to know something like that... I think that I remember how I readed it.

Thank You so much. I needed to see EL working. Compiling it on command prompt, written in notepad, and deployed with copy-paste, it worked, probablly like it was supposed to, from some reason I got pessimistic about that. Now I have to make it work in Eclipse, but at least I know that lovely EL thing is working...

In my country now is eleven o clock in the night. Thank You , bye...


(Why is it not working in Eclipse...)
 
Petar Thomas
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just want to say that (after sleep) I solved my problem with your help...
(If I do everything right in Eclipse, and deploy it, Eclipse shows EL syntax error, but it actually works)
Also, this posts was a litle bit of semi cross posting, sorry, but thank you a lot.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!