It looks like your issue isn't about customized page names, but customized links.

I don't know your implementation, and I'm going to abstract out the Tiles/Struts portion, but here is how I would do it:

- For the intro page, load the class schedule from the database, and its according class code.

- Create dynamic links that pass it to a 'ShowIndivClasses.jsp' page, with the parameters of the class to display details for.
ie <a href="ShowIndivClasses.jsp?class=ENG101">English 101</a>


- This page now loads up the information from wherever (DB,Bean) and displays the relative information based on the param.

Hope this gave a bigger picture on flow.

- Nic

Mark Lowe wrote:

For example, a
student is taking Eng101, Chem101, and CS120 this semester

These all look like modules you'll want to search for "indexed
properties" on the archieves, and you'll start to see how to go about
this.

StudentBean student = new StudentBean();
CourseBean course = new Course();
course.setCode("ENG101");
course.setTitle("Introductory English");
student.addCourse(course);

request.setAttribute("student",student);

...

<c:forEach var="course" items="${student.courses}">
${course.code}
</c:forEach>

or

<logic:iterate id="course" name="student" property="courses">
<bean:write name="course" property="code" />
</logic:iterate>



Mark


On Thu, 17 Feb 2005 11:48:51 -0500, Jerry Tan <[EMAIL PROTECTED]> wrote:


Hello Yan,

While the concept of constructing JSP's dynamically is an intriguing one, I
am still of the opinion that you can handle your situation below in a more
conventional manner.

For example, one simper way would be to have an array of String, which
represents that particular student's course list for that particular
semester.

Based on the values of contained in this array, you can construct the
appropriate links to that particular course, e.g., ENG101.jsp, etc.

hth,

                    Yan Hu
                    <[EMAIL PROTECTED]        To:       Struts Users Mailing List 
<user@struts.apache.org>
                    .com>                    cc:       (bcc: Jerry Tan/DTCC)
                                             Subject:  Newbie--->Construct JSPs 
on the fly
                    02/17/2005 11:43
                    AM
                    Please respond to
                    "Struts Users
                    Mailing List"


Hello Guys: This is my first real Struts-based project. I am fairly new to Struts. I know some basics and tried a few toy examples. Now it is time for a serious one. My project involes students. Each student has her own page that might take her to pages that are customized just for her. I can not jus write a JSP page for each student. For example, a student is taking Eng101, Chem101, and CS120 this semester. I fetch from the database all the info for these 3 classes she is taking. I do not want to put all the info on the first page after she logged in. I want to have three links on the first page and take her to a sub JSP page for each specific class for example Eng101.jsp. There are lots of students. I can't write all the pages for them. In addition, it changes every semester what classes a student takes. My question is how do I construct JSPs on the fly? I will need to use Tile. What else do you suggest me to look into? Thank you very much.

=====

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





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





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



Reply via email to