This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Url does not have the querystring on using the <s: tags in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Url does not have the querystring on using the <s: tags in struts2 " Watch "Url does not have the querystring on using the <s: tags in struts2 " New topic
Author

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

Sarah Gaikwad
Ranch Hand

Joined: Feb 26, 2004
Posts: 35
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Sep 29, 2008
Posts: 12617

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?
 
jQuery in Action, 2nd edition
 
subject: Url does not have the querystring on using the <s: tags in struts2
 
Similar Threads
Autocompleter Struts2 not working for me:: Please help
validation problem.
Struts 2 div could not be viewed
Struts2_Ajax tags not working
<s:parameter> not being converted to querystring for<s:url>