Unable to have tags within tags??

K

Kwasi

I am using WSAD 5.1 and am having problems when compiling lines like
the following:
<input type="hidden" name="domainName" value="<c:eek:ut
value={requestScope.domainNm}"> where c is defined as the jstl taglib
The error I get when I try to do this is "the value of attribute value
must not contain the '<' character. Somehow I have a strange and very
strict compiler that is not very friendly. Anyone have any ideas as to
what I might be doing wrong??
 
A

Ann

Kwasi said:
I am using WSAD 5.1 and am having problems when compiling lines like
the following:
<input type="hidden" name="domainName" value="<c:eek:ut
value={requestScope.domainNm}"> where c is defined as the jstl taglib
The error I get when I try to do this is "the value of attribute value
must not contain the '<' character. Somehow I have a strange and very
strict compiler that is not very friendly. Anyone have any ideas as to
what I might be doing wrong??

1. you only have one '>'
2. try escape like this value="\<c:eek:ut
 
C

Chris Smith

Kwasi said:
I am using WSAD 5.1 and am having problems when compiling lines like
the following:
<input type="hidden" name="domainName" value="<c:eek:ut
value={requestScope.domainNm}"> where c is defined as the jstl taglib

What tool is giving you these errors? Is it the WebSphere application
server at runtime, or some development tool such as a page validator?

If your server implements JSP 2.0, you can simply do away with the
obsolete c:eek:ut tag, and write this instead:

<input type="hidden" name="domainName" value="${requestScope.domainNm}">


I'm assuming that the mismatched quotes and brackets and such in your
example was a typo in your newsreader. Copy and paste can prevent
confusion like this in the future.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
K

Kwasi

Chris, Thanks for the response..
Unfortunately, I'm using JSP 1.2 so this is at compile time (The
development tool is giving me problems). I'm not using any exotic
validators with my JSP.
I did have a typo in my snipet, It should read:
<input type="hidden" name="domainName" value="<c:eek:ut
value={requestScope.domainNm}>"/>
Is there a way to get around this with JSP 1.2?
 
C

Chris Smith

Kwasi said:
Chris, Thanks for the response..
Unfortunately, I'm using JSP 1.2 so this is at compile time (The
development tool is giving me problems). I'm not using any exotic
validators with my JSP.

The question is the same: which development tool is giving you problems?
"The" development tool isn't very descriptive. There are literally tens
of thousands of development tools in the world, and at least hundreds
that are relevant to what you're doing.
I did have a typo in my snipet, It should read:
<input type="hidden" name="domainName" value="<c:eek:ut
value={requestScope.domainNm}>"/>

Well, actually it should read:

<input type="hidden" name="domainName" value="<c:eek:ut
value="${requestScope.domainNm}"/>"/>

So perhaps that's your problem?

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
K

Kwasi

I'm using WSAD version 5.1
Chris Smith said:
The question is the same: which development tool is giving you problems?
"The" development tool isn't very descriptive. There are literally tens
of thousands of development tools in the world, and at least hundreds
that are relevant to what you're doing.


Well, actually it should read:

<input type="hidden" name="domainName" value="<c:eek:ut
value="${requestScope.domainNm}"/>"/>

So perhaps that's your problem?
 
C

Chris Smith

Kwasi said:
I'm using WSAD version 5.1

Here's the problem. WSAD is a gigantic collection of numerous tools,
all of which are plugins to the Eclipse platform. Which one of this
huge number of tools is giving you this error message? Unless the
correction I provided fixes things, it appears that this tool is broken.
Since JSPs don't need to be compiled, you can probably just quit using
that tool, whatever it is.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
K

Kwasi

The most recent suggestion gives me the same error.
If anyone has any other ideas please enlighten:)
 
A

Andrea Desole

how about quoting?

<input type="hidden" name="domainName" value='<c:eek:ut
value="{requestScope.domainNm}"/>'/>
 
K

Kwasi

This doesn't do it either Andrea..Thanks
Andrea Desole said:
how about quoting?

<input type="hidden" name="domainName" value='<c:eek:ut
value="{requestScope.domainNm}"/>'/>
 
K

Kwasi

This doesn't do it either Andrea..Thanks
Andrea Desole said:
how about quoting?

<input type="hidden" name="domainName" value='<c:eek:ut
value="{requestScope.domainNm}"/>'/>
 
S

Sudsy

Kwasi said:
I am using WSAD 5.1 and am having problems when compiling lines like
the following:
<input type="hidden" name="domainName" value="<c:eek:ut
value={requestScope.domainNm}"> where c is defined as the jstl taglib
The error I get when I try to do this is "the value of attribute value
must not contain the '<' character. Somehow I have a strange and very
strict compiler that is not very friendly. Anyone have any ideas as to
what I might be doing wrong??

<input type="hidden" name="domainName" value='<c:eek:ut
value="${requestScope.domainNm}"/>'>

Three things to note:
- use of both kinds of quotes
- the $ sign for EL
- the termination of the c:eek:ut tag
All were missing from your original post.

ps. I just tried this out and it works properly.
 
A

Andrea Desole

right, I forgot the '$'. This is the correct one
<input type="hidden" name="domainName" value='<c:eek:ut
value="${requestScope.domainNm}"/>'>

Three things to note:
- use of both kinds of quotes
- the $ sign for EL
- the termination of the c:eek:ut tag
All were missing from your original post.

ps. I just tried this out and it works properly.
 
K

Kwasi Yeboah via JavaKB.com

I'm really not sure what you mean by which tool I'm using..I'm using the Integrated Edition for windows which has the various perspectives (J2EE,Java,Web etc). There is a JSP editor that I'm using within this Integration Edition in the J2EE perspective and It's only now that I'm running into these issues. I've been using this for awhile and the only difference is that we're not trying to create well-formed JSP doclets which I'm guessing is causing our problems.

Here's what I found:
When I declare my taglibs like shown below, I have no problems with saving the page:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
But when I define them like this:
<jsp:root version="1.2" xmlns:bean="/WEB-INF/struts-bean.tld"
xmlns:c="http://java.sun.com/jstl/core"/>
is when I run into the problems with expressions like <input type="hidden" name="domainName" value='<c:eek:ut value="{requestScope.domainNm}"/>'/>. I imagine that the use of JSP 2.0 specs with doclets would make more sense because then we can use the EL to get at information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top