struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mitchell" <>
Subject RE: [tiles] More tiles questions
Date Tue, 26 Nov 2002 18:53:09 GMT

You probably already know this, but:

1. You cannot redirect if the jsp are under /WEB-INF, you ONLY forward
2. You must always go through an action (do not link from one jsp to another)
3. Make sure when you link or post to an action, that you do so with '/' as the
   first character for your action, if you don't, then you could potentially
   get: 1) a 'growing' URL
        2) incorrect path to your *.do

<html:base/> can screw you up....

Consider this ( #1 ):
(Not using <html:base/>)

<html:link page="items/">Display</html:link>

So you click on it and you see this in the address bar:

ok, now if that same link is on the page, click it again:

see what happens?

( #2 )
Now if you had used <html:base/> then your link would do this:
 (assuming jsp is at /WEB-INF/jsp/)

Since you are using jsp under /WEB-INF, I would not use <html:base/> unless
you are sure that all client side references (images, css, js, etc) are
using to the correct url.

Hope that helps you.

James Mitchell
Software Engineer/Struts Evangelist

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing

> -----Original Message-----
> From: Wendy Smoak []
> Sent: Tuesday, November 26, 2002 1:30 PM
> To: Struts Users Mailing List (E-mail)
> Subject: [tiles] More tiles questions
> Finally!  I have a tabbed tiles page working.  Sort of...
> I go to http://host/dev/ and I see that URL with my brand new
> tabbed page with the first tab selected.  Then I click the second tab, and
> it tries to go to this URL:
> http://host/dev/WEB-INF/jsp/tilesTest/tabsTest.jsp?selected=1
> The 'jsp under WEB-INF' thing is popping up again!  I'm stuck.
> I think the tabbed links should go back to the Action.  In my case, I want
> to do a "Person Profile" with tabs.  It will come up with name and address
> on the first tab.  When the user clicks, say, the "Employment History" tab,
> I will need to talk to the database and put some beans in scope to be
> displayed.
> (In addition, I need to do some verification because not all of the users
> will be allowed to see data on all of the tabs.  But I'd be happy at present
> if *I* could just see all of them. :)
> I'm not quite sure where I've gone wrong, so I would appreciate any hints or
> advice you can offer.
> --
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message