This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Modern JavaScript for the Impatient and have Cay Horstmann on-line!
See this thread for details.
Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Http status 404 error problem

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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 ]
 
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic