Tomcat 5, XML JSP Syntax Question

2004-03-04 Thread Lipov, Felix
Hi,

I've been using the XML syntax for JSPs without much problem in Tomcat
4.1. When I try to read those same pages in Tomcat 5 I get errors. The
issue is with declared entities, like nbsp for space. Below is a sample
and the error I get. How in general can I declare something like nbsp
and have it work without the jsp compiler complaining regarding syntax?

Thanks.

Here is the sample:

?xml version=1.0 ?
!DOCTYPE jsp:root [
  !ENTITY nbsp #160;
  !ENTITY le #8804;
  !ENTITY ge #8805;
]


jsp:root xmlns:jsp=http://java.sun.com/JSP/Page;
xmlns:logic=http://jakarta.apache.org/struts/tags-logic;
xmlns:bean=http://jakarta.apache.org/struts/tags-bean;
xmlns:bean-el=http://jakarta.apache.org/struts/tags-bean-el;
xmlns:html=http://jakarta.apache.org/struts/tags-html;
xmlns:html-el=http://jakarta.apache.org/struts/tags-html-el;
xmlns:sql=http://java.sun.com/jstl/sql;
xmlns:c=http://java.sun.com/jstl/core;
xmlns:fmt=http://java.sun.com/jstl/fmt; version=1.2
  html
  body
  beforespacenbsp;afterspace
  /body
  /html
  /jsp:root

Output:
org.apache.jasper.JasperException: /test.jsp(9,521) Element type
jsp:root must be declared.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:83)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java
:402)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java
:126)
org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.jav
a:241)
org.apache.jasper.compiler.ParserController.doParse(ParserController.jav
a:235)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:
139) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:553)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 




 Important Notice to Recipients 
It is important that you do not use e-mail to request, authorize or effect the 
purchase or sale of any security or commodity, to send fund transfer instructions, or 
to effect any other transactions. Any such request, orders, or instructions that you 
send will not be accepted and will not be processed by Morgan Stanley.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Syntax Question

2004-03-02 Thread Shapira, Yoav

Hi,

 I want to add a variable to the web.xml file and be able to call in
 from within a servlet, taglib or bean.

You need to use the init-parameter element in your web-app element
in web.xml. Your JSP syntax appears to be correct.

Or context-parameter if you're right under web-app, and want the
variable accessible from the ServletContext directly, as
init-parameter belongs to a specific servlet or filter (and only that
servlet or filter can read it).

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Syntax Question

2004-03-01 Thread Jack Lauman
I want to add a variable to the web.xml file and be able to call in
from within a servlet, taglib or bean.

In a JSP 2.0 page using JSTL 1.1 I can use:

%=application.getInitParameter(variable_name)%

Can this be done?  If so, what's the correct syntax to do it.

Thanks,

Jack


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Syntax Question

2004-03-01 Thread Christopher Schultz
Jack,

I want to add a variable to the web.xml file and be able to call in
from within a servlet, taglib or bean.
You need to use the init-parameter element in your web-app element 
in web.xml. Your JSP syntax appears to be correct.

-chris


signature.asc
Description: OpenPGP digital signature