×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Included page does not recognize parameter passed! Please help!

Included page does not recognize parameter passed! Please help!

Included page does not recognize parameter passed! Please help!

(OP)
Hi,

I have the following jsp page:

<jsp:include page="title.jsp" flush="true">
   <param name="title" value="About Our Company"/>
</jsp:include>

And in the title.jsp page, I have the following:

<html>                    
Title: <%= request.getParameter("title") %>
</html>
                    
But I got the following result on the browser:

Title: null

What am I doing wrong?  Please help!

I am using Resin 1.1.2 as my JSP engine on IIS4.

Thanks in advance!

--
Josh

RE: Included page does not recognize parameter passed! Please help!

Dear Josh,

Never used Resin, but using the JWS I would do this:

<%@ include file="title.jsp" %>


Now assuming that your outer page contains <html></html> tags then you do not want them in your 'title.jsp' file

Also avoid mutiple <body> tags when using server side includes.

Hope this helps
-pete

RE: Included page does not recognize parameter passed! Please help!

(OP)
I found the problem.  It should be:

<jsp:param name="title" value="About Our Company"/>

ie I was missing the "jsp:" before the "param"

--
Josh

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close