Search Results

Search found 454 results on 19 pages for 'struts'.

Page 1/19 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Struts 1 - struts-taglib.jar is not being found by the web application

    - by Yatendra Goel
    I am using Struts-1. I have developed a struts-based web application. I am using struts tags in my JSP pages supplied in struts-taglib.jar by inserting the following lines in the JSP file: <%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %> <%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %> <%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %> Now the application is working fine when I run it on my localsystem but when I deploy it on a server, it shows the following exception: org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-html cannot be resolved in either web.xml or the jar files deployed with this application From the above exception, it seems that the application hasn't found the struts-taglib.jar file. But I have put the struts-taglib.jar in /WEB-INF/lib directory. Then where is the problem?

    Read the article

  • Struts 1 - struts-taglib.jar is not being found by my web application

    - by Yatendra Goel
    I am using Struts-1. I have developed a struts-based web application. I am using struts tags in my JSP pages supplied in struts-taglib.jar by inserting the following lines in the JSP file: <%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %> <%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %> <%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %> Now the application is working fine when I run it on my localsystem but when I deploy it on a server, it shows the following exception: org.apache.jasper.JasperException: The absolute uri: http://struts.apache.org/tags-html cannot be resolved in either web.xml or the jar files deployed with this application From the above exception, it seems that the application hasn't found the struts-taglib.jar file. But I have put the struts-taglib.jar in /WEB-INF/lib directory. Then where is the problem? Note: You can also look at http://stackoverflow.com/questions/2452492/java-problem-in-deploying-web-application for more information

    Read the article

  • Struts Tiles application

    - by rav83
    Am trying a tiles application.Below is my code tiles-defs.xml </tiles-definitions> <definition name="${YOUR_DEFINITION_HERE}"> </definition> <definition name="commonPage" path="/jsps/template.jsp"> <put name="header" value="/jsps/header.jsp" /> <put name="menu" value="/jsps/menu.jsp" /> <put name="body" value="/jsps/homebody.jsp" /> <put name="footer" value="/jsps/footer.jsp" /> </definition> <definition name="aboutUsPage" extends="commonPage"> <put name="body" value="/jsps/aboutUsBody.jsp" /> </definition> </tiles-definitions> struts-config.xml <action path="/aboutus" type="java.com.mbest.core.action.AboutUsAction" parameter="method"> <forward name="success" path="aboutUsPage"/> <forward name="failure" path="aboutUsPage"/> </action> </action-mappings> template.jsp <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <html> <head><title></title></head> <body> <table border="1" cellspacing="0" cellpadding="0" style="width: 98%; height: 100%"> <tr> <td colspan="2"> <tiles:insert attribute="header"/> </td> </tr> <tr style="height: 500px"> <td valign="top" style="width: 200px"> <tiles:insert attribute="menu"/> </td> <td valign="baseline" align="left"> <tiles:insert attribute="body"/> </tr> <tr> <td colspan="2"> <tiles:insert attribute="footer"/> </td> </tr> </table> </body> </html> homebody.jsp <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <html> <head> <title></title> <style type="text/css"> <%@include file="../css/helper.css"%> <%@include file="../css/dropdown.css" %> <%@include file="../css/default.ultimate.css" %> </style> </head> <body> <div id="header"> <ul id="nav" class="dropdown dropdown-horizontal"> <li><span class="dir"><html:link page="/aboutus.do?method=aboutUsPage" >About Us</html:link></span></li> <li><span class="dir"><a href="./">Products</a></span></li> <li><span class="dir"><a href="./">Infrastructure</a></span></li> <li><span class="dir"><a href="./">Pharmaceutical Formulations</a></span></li> <li><span class="dir"><a href="./">Contact Us</a></span></li> </ul> </div> </body> </html> AboutUsAction.java package java.com.mindbest.core.action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.actions.DispatchAction; public class AboutUsAction extends DispatchAction { public ActionForward aboutUsPage(ActionMapping mapping,ActionForm form, HttpServletRequest request,HttpServletResponse response)throws Exception { return mapping.findForward("success"); } } aboutUsBody.jsp hello In my above code if i try to access the app using (domainname)/example/aboutus.do its giving 500 error.Can anyone help me figure this out?

    Read the article

  • Passing a Java object from one Struts action to another

    - by Bernhard V
    Hello! In one of my Struts action I've got the following code in a method: ... List<Object> retrievedListOfObjects = c.getListOfObjects(); return mapping.findForward("fw_view"); } fw_view leads to a new Struts action with another Struts form. Let's say this form has got among others the following field List<Object> listOfObjects; I now want to pass the retrievedListOfObjects from within the first Struts action to the form of the following Struts action. Is this possible without storing it in the session?

    Read the article

  • How to use javascript to include struts html tag?

    - by Dj
    I have a check box and a text box. I have used struts tags and Now i need to validate that if the check box is checked, i should gray out (disable) the text box. If it is unchecked the text box shold take phone numbers. I did lik this, i called a java script on click of check box and did a innerHtml based on wheather checkbox ix checked or not. var status_check=document.getElementById("line1Checked").checked; if(status_check==true){ text=""; } else{ text=""; } alert(text); document.getElementById("line1").innerHTML=text; this works but if i use, var status_check=document.getElementById("line1Checked").checked; if(status_check==true){ "; } else{ "; } alert(text); document.getElementById("line1").innerHTML=text; It doesn work. All i know is struts tags execute at server. is there any possiblity to achieve this? Please help me.

    Read the article

  • Struts or Spring MVC or Struts & Spring?

    - by Shaw
    I need some information to understand design decision: Is Struts a better choice than Spring MVC? I hear about Strus-Spring-Hibernae combo - Is struts used at MVC layer because its a matured framework than when compared to Spring MVC? Any one used this combination for projects or aware of issues?

    Read the article

  • password is auto-completed despite setting redisplay=false in JSP (Struts)

    - by lmcgowin
    So I have a web application on Tomcat, built on top of Struts 1.1. Here is a snippet of my JSP, it's a login. <html:form action = "LoginAction" focus = "username"> <table> <tr><td align = "right">User name: </td> <td><html:text property = "username"/> </td></tr> <tr><td align = "right">Password: </td><td><html:password property = "password" redisplay = "false"/></td></tr> </table> </html:form> Snippet from struts-html-1.1.tld: <tag> <name>password</name> <tagclass>org.apache.struts.taglib.html.PasswordTag</tagclass> <attribute> <name>redisplay</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> Resulting HTML: Having trouble getting this to post as code but the relevant part is an input tag of type 'password' with no reference to redisplay, autocomplete, etc. It is my understanding that the redisplay element should be passed through Struts to appear in the HTML.

    Read the article

  • Implementing Struts 2 Interceptors using Struts 1

    - by Andriy Zakharchuk
    Hello all, I have a legacy application written with Struts 1. The only feature I was asked to add is to protect some actions. Currently any user can do whatever he/she wants. The idea is to allows all user see the data, but block modification operation, i.e. to modify data a user should log in. I know Struts2 has interceptors, so I could attach them to required actions and forward users to log in page when needed. But how can I do similar thing in Struts 1 application? My first idea was to create my own abstract Action class: public class AuthenticatedAction { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest theRequest, HttpServletResponse theResponse) { if (!logged) { // forward to log in form } else { doExecute(mapping, form, request, response); } } public abstract ActionForward doExecute( ActionMapping mapping, ActionForm form, HttpServletRequest theRequest, HttpServletResponse theResponse); } Then change all actions that require authentication from extends Action to extends AuthenticatedAction then add login form, login action (which performs authentications and puts this status into the session) and change JSP header tile to display authentication block, e.g., "You are (not logged in)/", Login/Logout. As I guess this should solve the problem. If this doesn't solve the problem, please explain me why. Is there any better (more elegant like interceptors are) way to do this? Thank you in advance.

    Read the article

  • Help with Struts Action mapping

    - by nicotine
    I am having a problem with my struts application it is a class enrollment app and when the user clicks on a "show enrolled courses" button it is supposed to show the courses they are enrolled in but it shows nothing at the moment. Struts/Apache does not return any errors, it Just shows a blank page and I cannot figure out why. My action mapping in my struts-config: <action path="/showEnrolled" type="actions.ShowEnrolledAction" name="UserFormEnrolled" scope="request" validate="true" input="/students/StudentMenu.jsp"> <forward name="success" path="/students/enrolled.jsp"/> </action> My link to the jsp enrolled.jsp page: <li><html:form action="/showEnrolled"> <html:hidden property="id" value= "<%=request.getRemoteUser()%>"/> <html:submit value = "View Enrolled Classes"/> </html:form> </li> When I click the link I get nothing but my menu on the page. The text headings for the page are not even displayed.

    Read the article

  • Struts 1 - How to display ActionMessages

    - by Yatendra Goel
    I am displaying ActionMessages through a JSP file by the following command: <logic:messagesPresent message="true"> <ul id="messsages"> <html:messages id="msg" message="true"> <li><bean:write name="msg"/> </li> </html:messages> </ul> </logic:messagesPresent> Now I want to display only selected messages. How can I indicate which message to display?

    Read the article

  • Adding name and id properties to textarea (struts)

    - by reg3n
    Hi, i mostly do CSS and php so i'm kind'a lost here, so no idea if this is possible the way i want it anyway, this is it: I have this code <html:textarea rows="10" cols="70" property="thankYouMessage" /> And i want this textarea to render an id of "textareaID" and a name like "textareaname" how can i go about this?... if i use styleID, the page just won't load anymore... i need to apply some css to that markup so that's the thing. Thanks in advance!

    Read the article

  • <html:select> inside <logic:iterate>

    - by TPT Gin
    I have an itemList and for each item, a dropdown list of ratings is displayed. After user rates each item in itemList, i want to store those rates in an array. How can I do it? selectedRate below is of Integer type, and the code failed to solve the problem. <logic:iterate id="item" name="itemList"> <tr> <td> <html:select name="aForm" property="selectedRate"> <html:optionsCollection name="allRates" label="description" value="value" /> </html:select> </td> </tr> </logic:iterate>

    Read the article

  • Struts ActionError

    - by user287663
    Hi all. Anyone knows why the code below doesn't compile? The reason is that it could not find symbol for ActionError. Thanks in advance. package com.hbs; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForward; import org.apache.struts.util.MessageResources; import org.apache.commons.beanutils.PropertyUtils; public class FeedbackAction extends org.apache.struts.action.Action { private final static String SUCCESS = "success"; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionErrors errors = new ActionErrors(); String fullName = (String)PropertyUtils.getSimpleProperty(form, "fullName"); String fullName1 = ""; if(fullName.equals(fullName1)) { errors.add("fullName", new ActionError("error.fullName", fullName)); saveErrors(request,errors); return (new ActionForward(mapping.getInput())); } return mapping.findForward(SUCCESS); } }

    Read the article

  • struts datagrid problem - can't solve this problem

    - by shien-angel
    i am creating datagrid using the struts-layout. and i encountered this problem javax.servlet.ServletException: DispatchMapping[/monitor/datagridBL]???????????????????? at org.apache.struts.actions.DispatchAction.getParameter(DispatchAction.java:325) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at jp.terasoluna.fw.web.struts.action.RequestProcessorEx.process(RequestProcessorEx.java:149) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at jp.co.anicom.fw.web.common.controller.RequestEncodeFilter.doFilter(RequestEncodeFilter.java:42) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at jp.co.anicom.fw.web.common.controller.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:89) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) i have been looking for ways on how to solve this. would somebody help me please...

    Read the article

  • Spring struts and forms

    - by Kiva
    Hi guy, I need to integrate struts with spring for a project. I read the doc to ingrate struts and it's ok for classic beans but I have a problem for my forms. I have a form like this in my struts-config.xml: <form-beans> <form-bean name="creationForm" type="org.apache.struts.validator.DynaValidatorActionForm" > <form-property name="libelle" type="java.lang.String" /> <form-property name="quantite" type="java.lang.String" /> <form-property name="prix" type="java.lang.String" initial="10" /> </form-bean> But it's strange for me to have a "type" in struts-config because it's spring which manages beans. I don't found anything in the doc to manage forms by spring and the attribute "type" is mandatory for form in struts-config. Someone can help me please ?

    Read the article

  • Problems with deploying struts annotations in ear file

    - by Asif
    I am attempting to make use of the struts 2 annotations, what I have found is if I deploy the app as a war file everything works fine but if I deploy my war as part of an ear file none of the struts annotations work only the actions defined in struts.xml work. I can't seem to work out why deploying as a ear file annotations don't work. Has anyone else experienced this problem? I am using struts 2.1.8 and deploying to Jboss 5 thanks

    Read the article

  • Which variables can be accessed with the ${...} syntax in a Struts tag in a JSP page?

    - by Bernhard V
    Hi, I'm getting a little bit frustrated since I can't find out which variables I can access with the ${...} syntax in a Struts tag, placed in a JSP page. As an example I've got the following code: Where does the object "status.menueStatus" have to be defined in order to can be accessed with a dollar sign and braces. Is it defined in another struts tile or in the form? Whether within our project code nor by Google I can get any help. Your support would be very appreciated. Thank you. Bernhard

    Read the article

  • Can you use regular expressions in struts-config.xml?

    - by rquinn
    I'm trying to route these two url's to different Actions. We are using Struts 1.2: /abc-def/products /abc-def I tried putting this action first: <action path="/abc*/products" type="com.business.exampleAction"> <forward name="success" path="/go"/> </action> and then this one after: <action path="/abc*" type="com.business.differentExampleAction"> <forward name="success" path="/goElsewhere"/> </action> but it always goes to the second action (differentExampleAction in this case). I've tried various iterations for the , like . or (.*), but haven't found anything that actually works yet. From what I've read, it seems like the only regular-expression-like characters allowed in struts-config are the wildcard symbols (* and **), but I hope I am wrong.

    Read the article

  • Updating to Spring 2.5.5 causes a javax.servlet.UnavailableException: org.springframework.web.struts

    - by Averroes
    I have been told to update some application from Spring 2.0.8 to Spring 2.5.5. This application is using Struts 1.2.7. Once I change the Spring.jar I get the following exception while loading in JBoss 4.0.5: 10:14:57,579 ERROR [[/PortalRRHH]] Servlet /PortalRRHH threw load() exception javax.servlet.UnavailableException: org.springframework.web.struts.DelegatingTilesRequestProcessor This is defined in the struts-config.xml this way: <controller locale="true"> <set-property property="processorClass" value="org.springframework.web.struts.DelegatingTilesRequestProcessor"/> </controller> I have no clue of what is happening since it works with the old version of Spring and the DelegatingTilesRequestProcessor is still available in Spring 2.5.5. I have no previous experience with Struts so if you need anything else to figure what the problem is please ask and I will update the question. Thanks.

    Read the article

  • Framework Recommendation request: spring, struts, j2ee?

    - by Jack BeNimble
    The last time I looked at web applications, the consensus seemed to be Struts/J2EE. Now, it looks like Spring MVC/J2EE or Struts/J2EE are both viable solutions. Is this generally correct? Or is Spring MVC now the consensus choice over Struts? We have at least one guy who has worked with Struts before and wants to go with that. I'm more familiar with Struts as well, having reviewed in the past. Also, is J2EE still considered the viable solution for handling remote components? Or are there alternatives?

    Read the article

  • Duplicate Prefix Error in Jsp page with Struts

    - by Cricandcric.com
    Hi, i am creating and Configuring the Struts for the first time, when I place the following Code in my jsp page <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%> <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%> I am getting the error when i move the mouse over the 1st Line "Duplicate Prefix "html" When I move the mouse over the 2nd Line, I am getting as "Duplicate Prefix "html" Similarly for 3rd and 4th Line, Can any one tell me why is this error all about Thanks in advance

    Read the article

  • Struts 2 development with Dreamweaver

    - by Matthew
    Does anyone here use Dreamweaver for Struts development? I've been working on a web application using Eclipse/vi, but want to use Dreamweaver so that I can apply some nice looking Dreamweaver templates. I looked for tutorials on Struts development with Dreamweaver, but couldn't find any, and when I tried to import my page, a lot of stuff was broken, which I guess is expected since a lot of the html is dynamically generated by servlets/jsps. So, has anyone had any luck with dreamweaver/struts and if so, could you share how you configured it?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >