Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Http status 404 error problem

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am doing struts application in tat i am display list of admins,when i click edit button action is not getting called?

Struts-config.xml
=================

 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use below code



<a href=<%request.getContextPath()%>"/Edit.do?username=<bean:write name="satyajit" property="tsadmEmailid" />">Edit</a>



but its better to use html:link in struts application.
 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the solution
but still getting error


<html:link action="/AdminList?username=<bean:write name="satyajit"
property="username" />">View Admins </html:link>

org.apache.jasper.JasperException: /AdminList.jsp(92,72) equal symbol expectedorg.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:86)
org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:193)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:143)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1337)


I think struts i not supporting bean:write in <html:link>
if you know, please help me
 
Milan Jagatiya
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


<html:link action="/AdminList?username=<bean:write name="satyajit"
property="username" />">View Admins </html:link>


you can not allow to write <bean:write> tag there..
refer below line


for more details refer html:link docs...will gives you better idea.
[ January 30, 2007: Message edited by: Milan Jagatiya ]
 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for solution
I have dowloaded example from Professional Jakarata struts 1.1 in that example this tag works perfectly.
I can't understand why it is not working ?





 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is probably with the fact that you're using relative references. The URL "Edit.do" will only work if the current page is being displayed from the web context root. If the current URL is something like /myApp/jsp/myPage.jsp, it won't work. Milan's suggestion would work if it weren't for a small typo. If you change it to

It will work.

Struts has tags that help you deal with relative context more easily. Here's how I'd do it:

Click here and see the heading "link" for more information on this tag.
[ January 30, 2007: Message edited by: Merrill Higginson ]
 
Get me the mayor's office! I need to tell him about this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic