*
The moose likes Struts and the fly likes HTTP 404 and Order of display. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HTTP 404 and Order of display." Watch "HTTP 404 and Order of display." New topic
Author

HTTP 404 and Order of display.

Schandha Ravi
Ranch Hand

Joined: Oct 20, 2007
Posts: 167
Hi All,

I'm designing a small application using struts. I have the following part of code in my Login.jsp





From the above code , I'm expecting the content in bold to be displayed after Submit and Cancel buttons. but its actually displaying on top of the table.

Also, I created the jsp page UserRegistration.jsp in a folder "views" in WEB-INF folder and is referring to it as /WEB-INF/views/UserRegistration.jsp which I guess is legal and valid. But when I click on the hyperlink "Click here to register.." , I'm getting HTTP 404 error. But when I move this jsp out of views folder and place it outside of WEB-INF it is working fine, if I change page attribute to "/UserRegistration.jsp" of <html:link> element.

Please clarify me on this.


Thanks & Regards, SK
SCJP 5.0, DB2 - 800, DB2 - 803, SCDJWS (On the way)
Marimuthu Madasamy
Ranch Hand

Joined: Jun 07, 2007
Posts: 72

Originally posted by Schandha Ravi:
I'm expecting the content in bold to be displayed after Submit and Cancel buttons. but its actually displaying on top of the table.

Also, I created the jsp page UserRegistration.jsp in a folder "views" in WEB-INF folder and is referring to it as /WEB-INF/views/UserRegistration.jsp which I guess is legal and valid. But when I click on the hyperlink "Click here to register.." , I'm getting HTTP 404 error. But when I move this jsp out of views folder and place it outside of WEB-INF it is working fine, if I change page attribute to "/UserRegistration.jsp" of <html:link> element.

Please clarify me on this.


Place the html:link inside a "td" tag. If possible use "colspan" attribute of td (since other rows has two columns). (HTML thing)

Originally posted by Schandha Ravi:
Also, I created the jsp page UserRegistration.jsp in a folder "views" in WEB-INF folder and is referring to it as /WEB-INF/views/UserRegistration.jsp which I guess is legal and valid. But when I click on the hyperlink "Click here to register.." , I'm getting HTTP 404 error.


Any files under WEB-INF cannot be accessed directly by the client. You can use those in server-side includes and forwards. (core servlet thing). If you want the page to be used in hyperlinks, the page should be available outside WEB-INF.


- Marimuthu Madasamy
Schandha Ravi
Ranch Hand

Joined: Oct 20, 2007
Posts: 167
Hey Madasamy,

Gotcha..... I missed this point. Thanks for letting me remind the basics .
[ March 25, 2008: Message edited by: Schandha Ravi ]
 
Consider Paul's rocket mass heater.
 
subject: HTTP 404 and Order of display.
 
Similar Threads
which jar file need to strug.taglib
Getting an Exception
html:cancel html:submit
Form validation in struts
Error on JSP