Struts « JSTL « JSP-Servlet Q&A

1. JSP code to Struts or JSTL tag

HI, I m doing the folling stuff in the jsp code I need to do it using Struts or using JSTL tag can any body have relevant idea please share.. The following is ...

2. JSP - Saving a collection

[Warning] I'm new to JSP/Struts/JSTL. This is probably a newbie question :) I have a form that contains a collection:

public class ServiceForm extends AbstractForm
    private List<SrvDO> ...

3. Removing unnecessary whitespace in a J2EE/Struts Application in WebSphere

Is anyone familiar with a technique for removal of whitespace that results from the use of tag libraries such as JSTL? I know that you can do this

4. Get current filename in JSP

Is there a way to get which JSP is currently rendered, with JSTL or Struts (or without)? like _ _ file _ _ in Python and PHP?

5. Difference between '#','%' and '$'

I'm new to struts2 and confused by the '#','%' and '$' element. There are some usages like:

<s:radio list="#{key1:value1,key2:value2}" />
Could any give me an explanation and examples?

6. struts2 iterator tag help

I am using the Struts iterator tag and trying to get 3 elements of my list in 1 iteration. This is what I have.

<s:iterator status="stat" value="(secondResultSet.size()/3).{ #this}" >

7. Using JSTL within JSP Pages in Struts based web app

I have a Struts 1.2 based Web App which uses lot of scriptlet code in the JSP page, I wish to clean up the code by using JSTL.The Servlet Specification Level: ...

8. html:text tag not working

I have a form that looks somewhat like this:

public class MaintainForecastInputForm extends ActionForm {
  private MainMenuForm mainMenuForm = new MainMenuForm();
  public SelectProdLineAssociationForm selectProdLineAssociationForm = new ...

9. Struts Tags vs. JSTL

Struts has a number of helpful custom JSP tags, and Struts-EL adds much needed EL support. I'm looking for thoughts on relative merits of using Struts/Strut-EL tags where available vs. just ...

10. Sed script for find/replace inside .jsp files. (from Struts to JSTL EL syntax)

I want a sed script that I can use for 1) finding instances, and 2) printing this string:

<bean:write name='iframesrcUrl'/> 
<bean:write name="iframesrcUrl"/>
<bean:write name="currentPage" property="title" filter="false"/>
or similar. name and property values can differ. ...

11. What is a good resource for learning equivalent JSP, JSTL tags/EL, and Struts tags?

I'm looking to separate business logic from presentation in a project, but the business logic is written using a mixture of tag libraries. Are there any good resources for going from ...

12. Freemarker doesn't see standart tag libraries in Struts2 project

I am currently upgrading our web application from Webwork to Struts2. I run to problem with freemarker that I am unable to resolve. In FTL file I have:

<#assign c=JspTaglibs[""]>
When rendering ...

13. Label text based on the locale

I want to display the label name depending on the Locale (like English or French). I have two properties file: I have an array list in a Java class. In this list I ...

14. name are not displaying on jsp

    private CustomerGroup customerGroup;

    public CustomerGroup getCustomerGroup () {
        return customerGroup;


15. JSTL fmt:message and resource bundle

I want to set the "dir" property of my table from resource bundle based on the locale. Here is snippet:

        <fmt:setBundle basename=""/>

16. struts2 jstl iterator tag

I have been looking how to implement a thing in struts2 jstl but it is impossible for me to find the way. When I load the jsp page from the action, I ...

17. Is there an alternative to nested:define tag(Struts tag) in JSTL tag library?

I am working on some piece of code where <nested:define> tag is used to define a bean. But I need to find an alternative, perhaps a JSTL tag? Here is a line ...

19. Struts 2 OGNL s:iterator vs JSTL c:forEach performance

I've been building some fairly dynamic web applications recently that rely heavily on database(JPA) backed configurations. These applications are multi-user, multi-account systems in which the end users can create custom forms ...

20. Accessing value stack with jstl

Volker Krebs schrieb: > Hello, > we recently update from struts 2.0.14 to struts 2.1.6 > In struts 2.0.14 org.apache.struts2.dispatcher.StrutsRequestWrapper > was delegating to the Value Stack. > This meant that in my JSP Page: > > was the same as > ${foo} > > With struts 2.1.6 this doesn't seem to work. > How can I enable it ...

21. error JSTL

Hi there, I'm using JSTL (I'm sorry if this issue is not about struts), and I have a JSP page witch contains a JSTL code : ...

22. Issue WW-2107 question - Is JSTL disable or not?

Felipe Rodrigues wrote: > Hi guys, > > Sorry, but it is not quite clear for me if the JSP EL is disable in struts2 > tags or not. I'vev seen that static methods calls is disabled. As of Struts 2.0.11 yes, EL expressions are disabled in Struts tags. In future, please post questions about using Struts to the Struts Users ...

23. JSTL fmt:message and Struts 2 Tags Handling of MessageProperties

I am using both JSTL (reference implementation of 1.2 spec) and struts 2.2.1 in my Web application, and I am noting incompatibilities in the way JSTL's fmt:message tag and corresponding Struts tags handle i18n. I have all i18n messages in files. Both JSTL fmt tags and struts tags use these resource bundles when formatting strings. JSTL fmt:message behaviour is to ...

24. Problem with JSTL, c:set

I have a rather annoying issue, which I can't get around for some reason. We're using Spring MVC, together with Tiles 2 in our project. So far, we didn't have any issues. We configured the template, added a header and footer and everything was fine. The problem is when we try to add the c:set-tag to one ...

25. S2 substitute for jstl empty operator

26. Struts 2.1 tags + JSTL EL?

28. Integration with JSTL and Struts

Hi guys.. Now that I've seen Shawn B. around I'd like to ask a question regarding these two technologies (or frameworks). I've read somewhere that the integration between JSTL and Struts is not as good as a developer can expect. Unfortunately, I do not the reasons why people say that. I've used the mailer tag lib and I think it is ...

29. Struts vs. JSTL

30. Good book on Struts and JSTL

31. Struts And JSTL

32. use of hashtable with struts and jstl

33. Struts and JSTL

Originally posted by Payam Fard: So, there would be no overlap among Java Server Faces, JSTL and Struts. Is that right? How are they different from one another? Thanks, Payam. There's plenty of overlap between JavaServer Faces (JSF) and Struts and between JSTL and Struts (but not between JSF and JSTL). Many of the JSTL tags were inspired by Struts tags. ...

35. JSTL:PGJP and Struts?

36. Books on JSTL and Struts

38. jstl vs struts tag library

39. JSTL forEach tag in struts problem

40. JSTL or Struts

41. Problems making Struts/JSTL 1.2 site work with JSTL 2.0

I have a working web site using JSP, Struts and JSTL 1.2. It is hosted by Tomcat 5.5. In the web pages I use constructs such as and an extended version of that sets values for items, begin and end using EL (such as items="${quoteSearchForm.quotes}"). The reference to the core is: <%@ taglib uri="" prefix="c" %> The ...

42. Jstl tag equivalent to html:error tag in struts

Since that tag expects Struts-specific classes to be present, then no, not directly. How could there be? Though it would be easy to use the JSTL to display error messages placed as scoped variables just like you would use it to display any other type of data. [ June 11, 2006: Message edited by: Bear Bibeault ]

43. dynamic hyperlink (struts & ?JSTL)

What you have posted there should theoretically work. You say it doesn't - what doesn't work about it? You are wanting the resulting url to come from a request parameter. Who sets this request parameter? What possible values can it take? You are using the "action" attribute with the struts tag which means it should link to a defined struts action. ...

44. jstl error in struts

45. diff b/w JSTL and struts logic tag

46. differnce between jstl and struts

47. using JSTL in struts framework

48. Problem with struts

49. Opening excel from struts

50. Problem with jsp using struts......

51. Error in Struts Application

/** * */ package test.action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import test.forms.LoginForm; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; public class LoginAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String target = null; LoginForm loginForm = (LoginForm)form; if(loginForm.getUserName().equals("admin") && loginForm.getPassword().equals("admin123")) { target = "success"; request.setAttribute("message", loginForm.getPassword()); } else { target = "failure"; ...

53. To populate dropdown in Struts 1.3.8

To populate dropdown in Struts 1.3.8 I am having issue in populating dropdown using Struts with NetBeans. Please find below the code.I am getting following error. Could anyone please help in resolving the issue. org.apache.jasper.JasperException: An exception occurred processing JSP page /simplePage.jsp at line 87

Select Country ...

54. Downloading a file thro Struts via response OutputStreaming

Hello there. Im making a application to download files. The problem im having is: Some files like PDF or DOC are downloaded correctly, but a .exe or a .dat or .txt are nawt. Im not really sure why is this happening, ive tryed many things. Heres the download part witch i belive is wrong somehow. Java Code: public void download(int indice) ...

55. how to expire a session in struts without using cookies

i am developing an application using struts 1.2. i have a admin login page(AdminId , Password) .i have set scope="session" in struts-config.xml file for the adminLogin action mapping, so i can access the AdminId in consequentive pages like AddEmployee.jsp, AddProduct.jsp. when i logout i should not be able to access AddEmployee.jsp, AddProduct.jsp by directly specifying in the browser or use back ...

57. Struts 2 and

58. Nested List not loaded by struts?

Test Message We have a Parameter Parameter Test Message SUCCESS Parameter List is NULL! Or you can use the following simplified version: Test ...

59. foreach in jstl to display nested colums-struts jsp

Iam displaying Columns from Object which in turn has many feilds but this CList is an array other are simple object like fName lName etc... I hope iam clear, Please reply can we use c:forEach to iterate ...