piyush raj jain wrote:
>
> hi all ..
> same question for jswdk1.0 i have posted sometimes back ..
> but couldn't get any reply..
> 1.
> <jsp:forward page="bb.jsp" >
> <jsp:param name="userid" value="ggggg9999" />
> </jsp:forward>
> giving the compile time error :com.sun.jsp.compiler.ParseException:
> unterminated <jsp:forward tag
The above is the correct syntax for JSP 1.1, but <jsp:param> wasn't supported
in JSP 1.0, and that could be why you get the error.
The original message is about JWS 2.0. Same problem there; it support JSP 1.0,
not 1.1.
> 2.<jsp:forward page="bb.jsp" />
> </jsp:forward>
> same error
This is definitely incorrect syntax. When you use /> to end a tag it means
it doesn't have a body. Hence, the </jsp:forward> closing tag is redundant
and probably cause the syntax error.
> 3.<jsp:param name="userid" value="ggggg9999" />
> this works
> means it work only with empty tags
Do you mean you try the <jsp:param> without an enclosing <jsp:forward>?
That should be reported as an error, since this tag is pointless outside
the scope of a <jsp:forward> or <jsp:include> tag (again, in JSP 1.1 only).
So what can you do? You can upgrade to a JSP 1.1 server, see
<http://java.sun.com/products/jsp/industry.html#tools>. Some servers I know
of that support JSP 1.1 are Tomcat (<http://jakarta.apache.org/>, our own
LiteWebServer, Orion Application Server.
Or if you're stuck with JSP 1.0 for some reason, try this instead:
<jsp:forward page="bb.jsp?userid=ggggg9999" />
Hans
PS.I see a lot of questions on this list about things not working as expected,
when it turns out that it's because people try to use features that are not
included in the version of the API their product supports. You will save
yourself a lot of time and pain if you first find out what version of the API
your product supports (and what optional features it supports), and then read
the corresponding version of the API specification. Reading the documentation
for your product and the specification is usually a much faster way to solve
these types of problems than asking on the mailing list.
> Hui Du wrote:
>
> > Hi,gurus:
> >
> > I don't know why param don't work here, it said userid is null.
> > I am using Javawebserver 2.0(trial version)
> >
> > aa.jsp
> > <HTML><body>
> > <jsp:forward page="bb.jsp" >
> > <jsp:param name="userid" value="ggggg9999" />
> > </jsp:forward>
> > </body></HTML>
> >
> > bb.jsp
> > <html><body>
> >
> > The greeting :<%= request.getParameter("userid") %>
> > </body></html>
> >
> > Please help
> >
> > Adam
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets