You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Arbol One <Ar...@hotmail.ca> on 2023/12/17 05:05:15 UTC

JSP EL - How to

Hello.

In my NetBeans IDE, I have a ANT web project, to which I have added 
under Libraries the JSTL 1.2.7 - jstl-impl.jar and the JSTL 1.2.7 - 
jstl-api.jar libraries. However, when adding this code :
----
*<jsp:text>
<h1>Hello JSP EL!</h1>
</jsp:text>*

----
Although it rebuilds properly, I get the following error message :
----

*Type Exception Report*

*Message Unable to compile class for JSP: *

*Description The server encountered an unexpected condition that 
prevented it from fulfilling the request.*

*Exception*

*org.apache.jasper.JasperException: Unable to compile class for JSP: An 
error occurred at line: [99] in the generated java file: 
[/home/jamiil/opt/tomcat/work/Catalina/localhost/ArbolOneEnterprise/org/apache/jsp/login/sign_005fin_jsp.java] 
Syntax error on token(s), misplaced construct(s)*

*An error occurred at line: [55] in the jsp file: [/login/sign_in.jsp] 
Syntax error on token ":", , expected 52: <% 53: try{ 54: 55: <jsp:text> 
56: <h1>Hello JSP EL!</h1> 57: </jsp:text>*

----
It is my first time trying JSP EL, and I need a bit of guidance using 
this technology.
Can any body tell me what I am missing? Is there a library I need to 
add? (i.e. <%@ page import="something.el.*" %> ).

Thanks in advance.

Note: I got this example from here 
<https://www.tutorialspoint.com/jsp/jsp_expression_language.htm>

-- 
ArbolOne.ca
Using Fire Fox and Thunderbird.
ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations.
ArbolOne on Java Development is in progress [ í ]

Re: JSP EL - How to

Posted by Arbol One <Ar...@hotmail.ca>.
Thanks for the reply Chuck Caldarale.
I am really confused here, would you be able to provide me with a link 
to a EL tutorial.
Thanks in advance.

On 2023-12-18 11:04 a.m., Mark Thomas wrote:
> Chuck Caldarale

-- 
ArbolOne.ca
Using Fire Fox and Thunderbird.
ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations.
ArbolOne on Java Development is in progress [ í ]


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JSP EL - How to

Posted by Mark Thomas <ma...@apache.org>.
17 Dec 2023 21:31:10 Chuck Caldarale <n8...@gmail.com>:

>
>> On Dec 16, 2023, at 23:05, Arbol One <Ar...@hotmail.ca> wrote:
>>
>> Hello.
>>
>> In my NetBeans IDE, I have a ANT web project, to which I have added 
>> under Libraries the JSTL 1.2.7 - jstl-impl.jar and the JSTL 1.2.7 - 
>> jstl-api.jar libraries. However, when adding this code :
>> ----
>> *<jsp:text>
>> <h1>Hello JSP EL!</h1>
>> </jsp:text>*
>
>
> Tags are not allowed inside <jsp:text> elements. The following should 
> work:
>
>
> <h1>
> <jsp:text>
> Hello JSP EL!
> </jsp:text>
> </h1>
>
>
>   - Chuck

The JARs you added are for JSTL, not EL. And your example uses neither 
JSTL nor EL.

Confused.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JSP EL - How to

Posted by Mark Thomas <ma...@apache.org>.
17 Dec 2023 21:31:10 Chuck Caldarale <n8...@gmail.com>:

>
>> On Dec 16, 2023, at 23:05, Arbol One <Ar...@hotmail.ca> wrote:
>>
>> Hello.
>>
>> In my NetBeans IDE, I have a ANT web project, to which I have added 
>> under Libraries the JSTL 1.2.7 - jstl-impl.jar and the JSTL 1.2.7 - 
>> jstl-api.jar libraries. However, when adding this code :
>> ----
>> *<jsp:text>
>> <h1>Hello JSP EL!</h1>
>> </jsp:text>*
>
>
> Tags are not allowed inside <jsp:text> elements. The following should 
> work:
>
>
> <h1>
> <jsp:text>
> Hello JSP EL!
> </jsp:text>
> </h1>
>
>
>   - Chuck

The JARs you added are for JSTL, not EL. And your example uses neither 
JSTL nor EL.

Confused.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: JSP EL - How to

Posted by Chuck Caldarale <n8...@gmail.com>.
> On Dec 16, 2023, at 23:05, Arbol One <Ar...@hotmail.ca> wrote:
> 
> Hello.
> 
> In my NetBeans IDE, I have a ANT web project, to which I have added under Libraries the JSTL 1.2.7 - jstl-impl.jar and the JSTL 1.2.7 - jstl-api.jar libraries. However, when adding this code :
> ----
> *<jsp:text>
> <h1>Hello JSP EL!</h1>
> </jsp:text>*


Tags are not allowed inside <jsp:text> elements. The following should work:


<h1>
<jsp:text>
Hello JSP EL!
</jsp:text>
</h1>


  - Chuck