• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem regarding query string in struts

 
Bhoomika Bathla
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends...

I am new to struts i want to implement a small code to add,modify,view and delete employee.For that i have made index.jsp
.index.jsp looks like :-

<%@ taglib uri="/WEB-INF/lib/struts-html.tld" prefix="html" %>

<html>
<head><title>Employee Management</title></head>
<body>
<table cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<html:link href='index.jsp?activity=add'>Add New Employee</html:link> |
<html:link href='index.jsp?activity=modify'>Modify Employee Details</html:link> |
<html:link href='index.jsp?activity=view'>View Employee Details</html:link>|
<html:link href='index.jsp?activity=delete'>Delete Employees</html:link>
</td>
</tr>
</table>
</body>
</html>

Now i want to display the forms for each addition,modification and deleteion in the index.jsp only but i dont want to use scriplets in my index.jsp.Can anyone suggest me the way how to implement this .

Thanks
 
Ankit Garg
Sheriff
Posts: 9495
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now i want to display the forms for each addition,modification and deleteion in the index.jsp only

This is not very clear. If you just want to do some conditional work in your JSP on the basis of a request parameter, then use Struts Logic Tags or JSTL (mainly the Core JSTL Tags)...
 
Bhoomika Bathla
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont want to get the value of activity through request parameter in my jsp.Is there any other way ?
 
Ankit Garg
Sheriff
Posts: 9495
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont want to get the value of activity through request parameter in my jsp

So you mean you don't want to pass the activity as a request parameter when you make the request or don't want to retrieve the request parameter??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic