Search Results

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

Page 9/19 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to call Struts1 Action from Ajax or JavaScript?

    - by Dj.
    I need to call an action on load of a JSP. To keep track of number of users who visited that page. I hav an action VisitorCounterAction. Where il update the database. On load of the JSP im calling an ajax function callCounter(); { alert("callCounter"); if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } // i need some correction here xmlhttp.open("GET",VisitorCounterAction,false); xmlhttp.send(null); alert("callCounter returned from Action"); } I am getting an exception as: /web/guest/content?p_p_id=31&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode=view&_31_struts_action=%2Fimage_gallery%2Fview_slide_show&_31_folderId=10605 generates exception: null Please help me with this. Or any other way to call the Action. I can't reload the page as it'll call onload function again. Thanks, Dj

    Read the article

  • How to pass values from client side to server side ?

    - by manojp1988
    Hi All, I got a situation to transfer values from jsp to servlet's action class. Previously we did it using <input type="hidden" id="name" value="manoj" /> we take this value in action class by request.getParameter("name"). But now we couldn't pass value like "Hi\n i am\n Manoj". Since it has new line included in the string we couldn't take it like this to action. So how I can take value like this to action or is there any way other than hidden input? Thanks .

    Read the article

  • Can you do a struts2 action redirect using POST instead of GET?

    - by Andy Pryor
    <action name="actionA" class="com.company.Someaction"> <result name="success" type="redirect-action"> <param name="actionName">OtherActionparam> <param name="paramA">${someParams}</param> <param name="paramB">${someParams}</param> <param name="aBoatLoadOfOtherParams">${aBoatLoadOfOtherParams}</param> </result> </action> In the above action map, I am redirecting from SomeAction to OtherAction. I am having issues, because unfortunately I need to pass a large amount of data between the two actions. IE7 will only allow GET requests to be like 2k, so its blowing up when I'm just over that limit when the response calls a get request to the other action. Is it possible for me to set this redirect, to end up with a POST being called to the other action?

    Read the article

  • how to make connection pool in spring application using BasicDataSource.

    - by vipin
    hi friend, I have created the application in which I need to configure the connection pool.In which I am configuring the connection pooling in the spring_Config file. using the Basicdatasource. but there is some problem to create the connection pool. Please tell me how to create the connection pooling in spring application using BasicDatasource. I tried this one code in spring config ;- bean id="datasource" class="org.apache.commons.dbcp.BasicDataSource" com.mysql.jdbc.Driver jdbc:mysql://192.168.1.12:3306/revup?noAccessToProcedureBodies=true jdbc:mysql://localhost:3306/revup?noAccessToProcedureBodies=true-- revuser root-- kjacob gme997FK-- <property name="poolPreparedStatements"> <value>true</value> </property> <property name="initialSize"> <value>2</value> </property> <property name="maxActive"> <value>15</value> </property> Is there any modification of code please tell me. thanks in advance.

    Read the article

  • select multiple double side

    - by Mercer
    hello, i want to do a select multiple double side like this : http://www.senamion.com/blog/jmultiselect2side.html (Demo2) but i don't know how i can retrieve my data when i click submit button..?

    Read the article

  • One account, multiple users, multiple shopping cart in a web application

    - by lemotdit
    I received a somewhat unusual request (imo) for a transactional web site. I have to implement the possibility of having multiple shopping cart for the same user. Those really are shopping carts, not order templates. I.E: A store with several departments ordering under the same account, but with a different person placing orders for a specific department only. Having more than one user per account is not an option since it would involve 'too much' management from the stores owner and the admins. Anyone had to deal with this before? The option so far is to have names for shopping cart, and a dropdown list or something alike after login to choose the cart with some kind of 'busy flag' to lock the cart if it's in use in another session.

    Read the article

  • JAVA: multiple files download at the same time?

    - by user319096
    hi guys, Is there any methods for downloading multiple files at the same time? That is, after select multiple files, click the download button, and choose the destination directory, the files selected will be downloaded at the same time. i googled it and not find any solutions, can anybody know? im using struts1 and spring2.

    Read the article

  • Browser removing + from request parameter

    - by Marquinio
    Hello everyone, I'm trying to pass an SQL query string from a Java Applet to Servlet as a parameter. Problem is that in Applet I have something say: sql=select * from p where(+p=1) The resulting sql parameter in the Servlet is sql=select * from p where(+p=1). So anyone knows how to prevent the browser from removing the + character from parameters? Is there a escape character? Thank you.

    Read the article

  • How to close a jquery dialog box when a submit button is clicked(Submit button is residing inside the dialog box)

    - by user1268313
    i have struts2 form inside a jquery dialog box, when i submit my form inside that dialog box my Struts2 action is performing but that pop up jquery dialog box is not closing. How can i close that dialog box when![enter image description here][1] i submit my form? <table> <tr> <td> <td align="center" > <sj:head jqueryui="true" jquerytheme="cupertino" /> <sj:dialog id="mybuttondialog" autoOpen="false" showEffect="fadeIn" hideEffect="fadeOut" modal="true" title="Rename" > <s:form action="EditDayActionUserTemplate" id="formId323"> <table style="height:48px;width: 100%;" cellpadding="0" cellspacing="0" border="0"> <tr> <td colspan="2" align="center"> <input type="hidden" name="dayId" value="<%=daycont%>"/> <input type="hidden" name="workoutId" value="<%=trid%>"/> </td> </tr> <tr> <td width="50%" align="right"><font size="6px">Date</font></td> <td width="50%"> <sj:datepicker id="datghfe4" name="date" value="%{#parameters['date']}" label="Select Date" appendText=" (dd.MM.yy)" displayFormat="dd.M.yy"/></td> </tr> <tr> <td>&nbsp;</td> <td align="right"><sj:submit formIds="formId323" id="sdfdss3" button="true" value="Rename" targets="rightmiddiv"></sj:submit></td> </tr> </table> </s:form> </sj:dialog> <sj:submit openDialog="mybuttondialog" value="Rename" button="true" /> </td> </tr> </table>

    Read the article

  • Pass value to another jsp

    - by Rozer
    I have come in a situation where I need to create a hiperlink for each entry in collection following is my code.. <td><a href="#" onclick="javascript:openWindow(--------)">Click How can i get ${current.product_id} value in blank space... so that i can pass my value to next jsp for internal processing....

    Read the article

  • Any way to anticipate session timeout ?

    - by Tom
    Hi, Is there a way to "catch" the session timeout event, so as to retrieve data from HttpSession before its invalidated ? We're implementing the Filter Interface, and in the doFilter method, the user we stored in the session object at login is null when session times out. Thanks in advance.

    Read the article

  • HTML Dynamic Number of Dropdowns

    - by Evilsithgirl
    I have this form on which I would like to create a dynamic number of dropdowns. I have a list of categorized applications which I would like each to have its own dropdown that submits data for each dropdown. The dropdown options will be the same for each. Here is my code. I am not sure how to pass the unique data to the server. As you can see I currently have an iteration over a list of applications that I would like to make each select in that iteration its own dropdown. Thanks in advance. <html:form action="/CategorizeApps.do"> <h3>Uncategorized</h3> <br/> Categorize each application using the dropdown menu then click categorize.<br/> <table class="list"> <thead> <tr class="controls"> <td><input type="submit" name="btnAction" value="Categorize"/></td> </tr> <tr class="fields"> <td>ID</td> <td>Name</td> <td></td> </tr> </thead> <tbody> <logic:iterate id="uncat" name="appsUncat" scope="session"> <tr class="hlist"> <td><bean:write property="id" name="uncat" scope="page"/></td> <td><bean:write property="name" name="uncat" scope="page"/></td> <td><select id="category" name="category"> <logic:iterate id="categories" name="Categories" scope="session"> <option value="<bean:write name="categories" property="id" scope="page"/>"><bean:write name="categories" property="name" scope="page"/></option> </logic:iterate> </select></td> </tr> </logic:iterate> </tbody> </table> </html:form>

    Read the article

  • display tag scope issue with pagination

    - by sarah
    Hi All, I am using display tag for pagination ,i am reading the list from request scope and displaying it,i have kept the page size as 1 and the list hast 4 values,if i press next i get nothing to display this is the case with request scope but not with session scope how can i tackle this problem?

    Read the article

  • jquery/javascript to disable button within a table cell

    - by user1831612
    I have a table cell with 2 buttons in it. <td align="left" > <input type="button" value="edit"/> <input type="button" value="save" disabled="disabled"/> </td> By default save button is disabled. On the click of edit button, save button button must be enabled. The problem is i cannot assign id's to buttons since the table is dynamically generated using struts2 s:iterator tag. If i do there will be 2 or more cells with the same id How can I achieve this?

    Read the article

  • JSTL request attribute in c:if

    - by JNPW
    I set an request attribute in my action class as follows: request.setAttribute("xFg",Boolean.TRUE); I want to retrive this in my JSP. I want to retrive them using JSTL tags. I tried this : <c:if test="${requestScope.xFg}"> <c:set var="showlist" value="true" /> </c:if> But c:if didnt work, i mean it didnt goto c:set I tried to print the sameusing c:out but nothing got displayed. What is wrong or How should i test request attribute value. I havent used requestScope so far. Is requestScope the option to get the request value? pls help.Thanks in advance.

    Read the article

  • Behavior of Struts2 and convention-plugin when there is Index(extends ActionSupport)

    - by hanishi
    We have an Action class named 'Index' immediately under com.example.common.action and is annotated @ParentPackage('default') which is declared in package directive in struts.xml and has "/" for its namespace and extends "struts-default". It also declares @Result so that it responses with jsp files corresponding the string values returned by its execute() method. In our struts.xml, the following struts setting is configured along with other necessary configurations that are needed for convention-plugin. <constant name="struts.action.extension" value=","/> When accessing /my_context/none_existing_path, the request apparently hits this Index class and the contents of the jsp declared in the Index's @Result section gets returned. However, if we provide /my_context/, we receive the following error: HTTP Status 404-There is no Action mapped for namespace[/] and action name [] associated with context path [/my_context]. We want to know the reason why accessing /my_context/none_existing_path, where none_existing_path has no matching action, can fallback to Index class, but error is returned when when the URL requested is just /my_context/. Currently, our convention-plugin settings are declared as follows: <constant name="struts.convention.package.locators.basePackage" value="com.example"/> <constant name="struts.convention.package.locators" value="action"/> Strangely, if we changed the value of the struts.convention.package.locators.basePackage to om.example.common, in which the aforementioned Index file can be immediately found by narrowing the search scope, requesting /my_context/ displays the content of the jsps declared in @Result section of the Index class. However, as our action classes are distributed throughout the com.example.[a-z].action packages, where [a-z] represents the large volume of directories we have in our package structure, we cannot use this trick as a workaround. We have also tried placing index.jsp at the top level of the class path, and have the index.jsp redirect to /my_context/index, which worked but not what we want. Could this be a bug? We appreciate your responses. Thank you in advance. EDIT: JIRA registered, problem solved (from Struts 2.3.12 up)

    Read the article

  • Struts2 ParametersInterceptor problem with oauth_token

    - by Tahir Akram
    I am developing an application in Struts2 with Twitter4J at GAE/J. I am getting following exception in the GAE log. Unable to understand whats wrong with it. com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'oauth_token' on 'class com.action.Home: Error setting expression 'oauth_token' with value '[Ljava.lang.String;@146ac5a' Following is my struts.xml <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd" <constant name="struts.enable.DynamicMethodInvocation" value="false" /> <constant name="struts.devMode" value="false" /> <package name="hello" extends="struts-default" > <action name="Home" class="com.action.Home"> <result name="SUCCESS">/home.jsp</result> <result name="ERROR">/message.jsp</result> </action> </package> Home.java code Twitter twitter = new Twitter(); HttpSession session = request.getSession(); twitter.setOAuthConsumer(FFConstants.CONSUMER_KEY, FFConstants.CONSUMER_SECRET); AccessToken accessToken = twitter.getOAuthAccessToken((String)session.getAttribute("token"), (String)session.getAttribute("tokenSecret")); twitter.setOAuthAccessToken(accessToken); User user = twitter.verifyCredentials(); It will be great if some one give me pointer on it. Thanks.

    Read the article

  • how does tomcat like web container handle struts 2 variables ?

    - by mobby1982
    i am a newbie . i have a question regarding struts 2 framework and tomcat . i know that each request has it own thread , but my question is are the global variables defined in struts action shared amongst requests. for ex: if i have a global variable named say int pageNo; and i am using in say method called paginationAll() can i use the same variable (pageNo) for another method called say paginatonMaterialAll() in the same action or does each thread has its own set of variables even though globally defined?

    Read the article

  • Runtime.exec causes duplicate JVM to hang indefinitely until killed (Solaris 10)

    - by John
    All, We are running a J2EE application on WebLogic server 9.2 MP2 with a jrockit 64-bit JVM (27.3.1) on Solaris 10. We call use runtime.exec to call an executable called jfmerge to create PDF documents. We have found that in Solaris, when runtime.exec is called, a duplicate JVM is temporarily spawned to kick off the jfmerge process. While this is inefficient (our JVM is 5 GB, thus the duplicated shell JVM is also 5 GB), the major problem lies in the fact that when there is heavy load on this functionality (PDF generation) in our application, sometimes the duplicated JVM never exits. When the JVM hangs, the servers create large issues (extreme application slowness and terminated user sessions) as the entire duplicate JVM get's all of its 5 GB of process size written to disk swap. We have noted the following hung thread correlated with a hung JVM process until the process is manually killed: "[STUCK] ExecuteThread: '17' for queue: 'weblogic.kernel.Default (self-tuning)'" id=3463 idx=0x158 tid=3460 prio=1 alive, in native, daemon at jrockit/io/FileNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BII)I(Native Method) at jrockit/io/FileNativeIO.readBytes(FileNativeIO.java:30) at java/io/FileInputStream.readBytes([BII)I(FileInputStream.java) at java/io/FileInputStream.read(FileInputStream.java:194) at java/lang/UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:227) at java/io/BufferedInputStream.fill(BufferedInputStream.java:218) at java/io/BufferedInputStream.read(BufferedInputStream.java:235) ^-- Holding lock: java/io/BufferedInputStream@0xfffffffec6510470[thin lock] at gov/v3/common/formgeneration/sessionbean/FormsBean.getProcessStatus(FormsBean.java:809) at gov/v3/common/formgeneration/sessionbean/FormsBean.createPDF(FormsBean.java:750) at gov/v3/common/formgeneration/sessionbean/FormsBean.getTemplateDetails(FormsBean.java:450) at gov/v3/common/formgeneration/sessionbean/FormsBean.generateSinglePDF(FormsBean.java:1371) at gov/v3/common/formgeneration/sessionbean/FormsBean.generatePDF(FormsBean.java:263) at gov/v3/common/formgeneration/sessionbean/FormsBean.endorseDocument(FormsBean.java:2377) at gov/v3/common/formgeneration/sessionbean/Forms_qaco28_EOImpl.endorseDocument(Forms_qaco28_EOImpl.java:214) at gov/v3/delegates/common/FormsAndNoticesDelegate.endorseDocument(FormsAndNoticesDelegate.java:128) at gov/v3/actions/common/EndorseDocumentAction.executeRequest(EndorseDocumentAction.java:68) at gov/v3/fwk/controller/struts/action/V3CommonDispatchAction.dispatchToExecuteMethod(V3CommonDispatchAction.java:532) at gov/v3/fwk/controller/struts/action/V3CommonDispatchAction.executeBaseAction(V3CommonDispatchAction.java:336) at gov/v3/fwk/controller/struts/action/V3BaseDispatchAction.execute(V3BaseDispatchAction.java:69) at org/apache/struts/action/RequestProcessor.processActionPerform(RequestProcessor.java:484) at gov/v3/fwk/controller/struts/requestprocessor/V3TilesRequestProcessor.processActionPerform(V3TilesRequestProcessor.java:384) at org/apache/struts/action/RequestProcessor.process(RequestProcessor.java:274) at org/apache/struts/action/ActionServlet.process(ActionServlet.java:1482) at org/apache/struts/action/ActionServlet.doGet(ActionServlet.java:507) at gov/v3/fwk/controller/struts/servlet/V3ControllerServlet.doGet(V3ControllerServlet.java:110) at javax/servlet/http/HttpServlet.service(HttpServlet.java:743) at javax/servlet/http/HttpServlet.service(HttpServlet.java:856) 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:283) at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3231) 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:2002) at weblogic/servlet/internal/WebAppServletContext.execute(WebAppServletContext.java:1908) at weblogic/servlet/internal/ServletRequestImpl.run(ServletRequestImpl.java:1362) at weblogic/work/ExecuteThread.execute(ExecuteThread.java:209) at weblogic/work/ExecuteThread.run(ExecuteThread.java:181) at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method) -- end of trace We would like to do a couple of things: 1.) Prevent the spawning of a duplicate JVM, as we do not need any of it's functions when executing the simple jfmerge executable, and it creates massive overhead. 2.) In the short term at least prevent this duplicate JVM from handing indefinitely.

    Read the article

  • are there requirements for Struts setters beyond variable name matching?

    - by slk
    I have a model-driven Struts Web action: public class ModelDrivenAction<T extends Object> implements ModelDriven<T>, Preparable { protected Long id; protected T model; @Override public void prepare() {} public void setId(Long id) { this.id = id; } @Override public T getModel() { return model; } public void setModel(T model) { this.model = model; } } I have another action which is not currently model-driven: public class OtherAction implements Preparable { private ModelObj modelObj; private Long modelId; @Override public void prepare() { modelObj = repoService.retrieveModelById(modelId); } public void setModelId(Long modelId) { this.modelId = modelId; } } I wish to make it so, and would like to avoid having to track down all the instances in JavaScript where the action is passed a "modelId" parameter instead of "id" if at all possible. I thought this might work, so either modelId or id could be passed in: public class OtherAction extends ModelDrivenAction<ModelObj> { @Override public void prepare() { model = repoService.retrieveModelById(id); } public void setModelId(Long modelId) { this.id = modelId; } } However, server/path/to/other!method?modelId=123 is failing to set id. I thought so long as a setter matched a parameter name the Struts interceptor would call it on action invocation. Am I missing something here?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >