File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Plain html link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Plain html link" Watch "Plain html link" New topic
Author

Plain html link

A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
Hi all I am trying to figure out how to set up a simple html link so that a user can navigate from one page to the next. there isn't any data that has to be remembered. I am getting a 404 error with the various manners that I have tried. I was using <a href="custSummaryScreen.jsp">Customer Summary</a>
but I am going on the standard that one should never be given direct access to a jsp, and trying to adjust the application to work with that standard. Any suggestions or explanations would be much appreciated.

thanks in advance for your time on this matter.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Do you plan on sending the user to an action instead of a jsp? You might want to look into using the html:link tag since that helps out with creating a full URL.

http://struts.apache.org/1.1/userGuide/struts-html.html#link

- Brent

P.S. I am surprised somebody has not bugged you about your name...unless "A" is in fact your real first name.
A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
Originally posted by Brent Sterling:
Do you plan on sending the user to an action instead of a jsp? You might want to look into using the html:link tag since that helps out with creating a full URL.

http://struts.apache.org/1.1/userGuide/struts-html.html#link

- Brent

P.S. I am surprised somebody has not bugged you about your name...unless "A" is in fact your real first name.


I'll have to change my display name. Thought it was more to reduce people from putting obsenities and just to have a reference for who you are talking to.

The end result is just to send them to a jsp page, but from the struts information I have read I was under the impression that you should never give an outside user direct access to a page, that they should follow through the controller for each one. If I am misunderstanding please inform me so that I can clarify best practices.
A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
Originally posted by Brent Sterling:

P.S. I am surprised somebody has not bugged you about your name...unless "A" is in fact your real first name.


Was going to change my display name and was reading the conventions again to ensure that I met all the criteria and found that this information was in the naming policy:
You can even use initials for the first name if you like.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I agree that "best practices" say that in a Struts application access to pages should go through an action. Have you tried using html:link with either the page or action attribute?

- Brent...if that is indeed my real name ;-)

P.S. I guess I will just have to fill in the blank myself...maybe Abigail, Albert, Alex, Alicia, or Alphonse?
A knibbs
Ranch Hand

Joined: Aug 23, 2006
Posts: 158
Originally posted by Brent Sterling:
I agree that "best practices" say that in a Struts application access to pages should go through an action. Have you tried using html:link with either the page or action attribute?

- Brent...if that is indeed my real name ;-)

P.S. I guess I will just have to fill in the blank myself...maybe Abigail, Albert, Alex, Alicia, or Alphonse?


Found out that it was a typo that was preventing me from getting it to work.

Maybe AKA ;-P
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Plain html link
 
Similar Threads
c:out - JspTranslate:unable to load class null.
Tiles, putList and tiles-defs.xml
Form Being Rendered Outside of the Page
using JSTL and EL to get/set request parameters
JSP html link