You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by John J Brecht <jo...@sri.com> on 2001/10/02 20:49:50 UTC

attibute has no value

I'm having a very simple problem.  I am attempting to migrate some
applications that ran fine under ServletExec to Tomcat 4.0.  Jasper
fails to parse my JSPs, throwing the folling error:

2001-10-02 10:46:44 ApplicationDispatcher[/DLServlet] Servlet.service()
for servlet jsp threw exception
org.apache.jasper.compiler.ParseException: /DLjsp/login.jsp(3,33)
Attribute servletPath has no value
	at
org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:563)
	at
org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:681)
.
.
.


here is the beginning of my JSP, the code that it is complaining about:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"
        "http://www.w3.org/MarkUp/Wilbur/HTML32.dtd">
<%@ page import="com.sri.ctl.dl.* %>
<jsp:useBean id="servletPath" scope="request" class="String"/>


In my servlet code, I included print statements that give the request's
attributes and their values right before I forward to the JSP, and it
shows that the attribute "ServletPath" exists, and has a value, as it
should.  I get this error in general for any bean i try to use in this
way.

Anyone know what might be going on?

-john

Re: attibute has no value

Posted by John J Brecht <jo...@sri.com>.
Doh! - the missing quote was definitely the problem. I just assumed that
all the syntax was right since ServletExec never complained.  Another
thing that ServletExec never complained about was not being able to find
the class String.  Even if I import java.lang.String, this page doesn't
parse unless i write each useBean line as:

<jsp:useBean id="servletPath" scope="request" class="java.lang.String"/>

as opposed to simply:

<jsp:useBean id="servletPath" scope="request" class="String"/>

oh, well, I'm on my way now.  Thanks a lot!

-john


"Craig R. McClanahan" wrote:
> 
> On Tue, 2 Oct 2001, John J Brecht wrote:
> 
> > Date: Tue, 02 Oct 2001 11:49:50 -0700
> > From: John J Brecht <jo...@sri.com>
> > Reply-To: tomcat-user@jakarta.apache.org
> > To: Tomcat <to...@jakarta.apache.org>
> > Subject: attibute has no value
> >
> > I'm having a very simple problem.  I am attempting to migrate some
> > applications that ran fine under ServletExec to Tomcat 4.0.  Jasper
> > fails to parse my JSPs, throwing the folling error:
> >
> > 2001-10-02 10:46:44 ApplicationDispatcher[/DLServlet] Servlet.service()
> > for servlet jsp threw exception
> > org.apache.jasper.compiler.ParseException: /DLjsp/login.jsp(3,33)
> > Attribute servletPath has no value
> 
> This message is thrown only when the first non-whitespace character after
> an attribute name is not an equal sign.  Double and triple check the
> quote characters in your source page.
> 
> >       at
> > org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:563)
> >       at
> > org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:681)
> > .
> > .
> > .
> >
> >
> > here is the beginning of my JSP, the code that it is complaining about:
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"
> >         "http://www.w3.org/MarkUp/Wilbur/HTML32.dtd">
> > <%@ page import="com.sri.ctl.dl.* %>
>                                  ^^^
> 
> Note that there is a missing quote after the "*" character.
> 
> > <jsp:useBean id="servletPath" scope="request" class="String"/>
> >
> >
> > In my servlet code, I included print statements that give the request's
> > attributes and their values right before I forward to the JSP, and it
> > shows that the attribute "ServletPath" exists, and has a value, as it
>                             ^^^^^^^^^^^
> Shouldn't that be "servletPath" (lower case "s")?
> 
> > should.  I get this error in general for any bean i try to use in this
> > way.
> >
> > Anyone know what might be going on?
> >
> > -john
> >
> 
> Craig

Re: attibute has no value

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 2 Oct 2001, John J Brecht wrote:

> Date: Tue, 02 Oct 2001 11:49:50 -0700
> From: John J Brecht <jo...@sri.com>
> Reply-To: tomcat-user@jakarta.apache.org
> To: Tomcat <to...@jakarta.apache.org>
> Subject: attibute has no value
>
> I'm having a very simple problem.  I am attempting to migrate some
> applications that ran fine under ServletExec to Tomcat 4.0.  Jasper
> fails to parse my JSPs, throwing the folling error:
>
> 2001-10-02 10:46:44 ApplicationDispatcher[/DLServlet] Servlet.service()
> for servlet jsp threw exception
> org.apache.jasper.compiler.ParseException: /DLjsp/login.jsp(3,33)
> Attribute servletPath has no value

This message is thrown only when the first non-whitespace character after
an attribute name is not an equal sign.  Double and triple check the
quote characters in your source page.

> 	at
> org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:563)
> 	at
> org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:681)
> .
> .
> .
>
>
> here is the beginning of my JSP, the code that it is complaining about:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"
>         "http://www.w3.org/MarkUp/Wilbur/HTML32.dtd">
> <%@ page import="com.sri.ctl.dl.* %>
                                 ^^^

Note that there is a missing quote after the "*" character.

> <jsp:useBean id="servletPath" scope="request" class="String"/>
>
>
> In my servlet code, I included print statements that give the request's
> attributes and their values right before I forward to the JSP, and it
> shows that the attribute "ServletPath" exists, and has a value, as it
                            ^^^^^^^^^^^
Shouldn't that be "servletPath" (lower case "s")?

> should.  I get this error in general for any bean i try to use in this
> way.
>
> Anyone know what might be going on?
>
> -john
>

Craig