File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes interesting problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "interesting problem." Watch "interesting problem." New topic
Author

interesting problem.

michael echavez
Greenhorn

Joined: Feb 07, 2005
Posts: 18
hi! I've been doing this jsp for the past few days (since im still new).. It gets the buttons that will be displayed in the jsp by parsing through a xml file.when you select a button, the button's value will then be the parameter passed in the request so that the next set of buttons will be shown. the trick is that there is only one jsp and only one xml file. i've already done the jsp but i cant seem to make the next set of buttons appear.. can anyone suggest a way to implement this?

here si the code:

dynamic.jsp
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib uri="/WEB-INF/taglibs-xtags.tld" prefix="xtags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Dynamic Page</title>
</head>

<body>
<%
String searchby = (String)request.getAttribute("SEARCHBY");
if (searchby == null) {
request.setAttribute("SEARCHBY", "phenotype");
}
String peep = "//"+(String)request.getAttribute("SEARCHBY");
String miki = "name("+peep+")";
%>

<xtags arse uri="/buttons.xml"/>
<xtags:variable id="name" select="<%=miki%>"/>

<table border="1" align="center" cellspacing="5" cellpadding="5">
<tr>
<th>Search By:</th>
</tr>
<xtags:forEach select="<%=peep%>">
<tr>
<td>
<input type="button" value='<xtags:valueOf select="name"/>'/>
</td>
</tr>
</xtags:forEach>
</table>


</body>
</html>

**sorry bout the variables,i was planning on changing it later on..
Tim Baker
Ranch Hand

Joined: Oct 04, 2003
Posts: 541
Next time please use the UBB Code buttons you see next to the post box. There is one specifically for Code, so it stops stuff like that smiley appearing.

I'm not totally familiar with everything your using but I hate a few questions:

1. Where is your <form> HTML element?
2. Where are you setting the SEARCHBY element? You need to set it somewhere for it to appear as a parameter to the next page.
[ June 26, 2005: Message edited by: Tim Baker ]

Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: interesting problem.