File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Problem regarding query string in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply 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: 39
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
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9191
    
    2

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: 39
I dont want to get the value of activity through request parameter in my jsp.Is there any other way ?
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9191
    
    2

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??
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Problem regarding query string in struts
 
Similar Threads
dynamic Checkboxe value retrieval
spaces while populating using s:iterator
intresting problem : same page with few modification on some conditions
Displaying the right details of a resource taken from a JSP results page
spring jdbc and action class