aspose file tools*
The moose likes Struts and the fly likes Problem regarding query string in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem regarding query string in struts" Watch "Problem regarding query string in struts" New topic
Author

Problem regarding query string in struts

Bhoomika Bathla
Ranch Hand

Joined: Nov 28, 2009
Posts: 40
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

Joined: Aug 03, 2008
Posts: 9313
    
  17

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)...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Bhoomika Bathla
Ranch Hand

Joined: Nov 28, 2009
Posts: 40
I dont want to get the value of activity through request parameter in my jsp.Is there any other way ?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9313
    
  17

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??
 
 
subject: Problem regarding query string in struts