Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Url does not have the querystring on using the <s: tags in struts2

 
Sarah Gaikwad
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am unable to see the correct formation of the url(with the desired querystring). I have coded its to the T. Help is deeply appreciated. Here's the code:
A simple code


<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Main Page</title>
</head>
<body>
<s:url var="addURL" action="inputnickname"/>
<s:url action="modifynickname" var="editURL">
<s:param name="senderMsisdn" value="9865236558"/>
</s:url>

<s:property value="%{editURL}" />
<s:a href="%{addURL}">Add Nickname</s:a>


<s:a href="%{editURL}">Modify Nickname</s:a>
</body>
</html>



Note: The editURL shows the path as set in struts.xml without the parameters i.e. the property tag results to
/struts/paramtest/



Regards,
Struts newbie
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read.

You can edit your post by using the button.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't reproduce this, but I also don't use the s:a tag unless I need to. Why not just use a plain HTML anchor tag?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic