I'm pretty new to the jsp and struts way of doing things and so far I like what I see.
My current question is with the use of the struts select tag.
I have a page that displays a number of dropdown boxes using struts select currently the options are hard coded in the jsp. I would like to populate them based on a properties file. Howeve...
Is there a cleaner way to do this in a JSP/Struts1 setup ?
<% if (SessionConfig.isAdminMode() ) { %>
... some HTML here ...
<% } %>
EDIT: In admin mode I would like to have access to additional parameters from a form element,
e.g. from the form element:
input type="text" value="Test user" name="Owner"
EDIT 2: Actually, my probl...
How can I expose a Java bean to a JSP page by using struts? I know how to configure a StrutsAction to include a form-bean, but I wonder if there are other ways to interact with Java code from a JSP page? I ask this question because I don't understand fully a likely answer to a problem that I have asked here:
http://stackoverflow.com/que...
I am working on a Struts application.Now I have a strange situation.The current application has a config file something like this
<action path="/validate" type="test1Action" scope="request" validate="false">
<forward name="cat1" path="path1/value1"/>
<forward name="cat2" path="path1/value2"/>
<forward name="cat3...
I wanted to have one jsp page conditionally post to two different Struts actions.
So I wrote this:
<logic:notEmpty property="foo">
<html:form action="modifyUser">
</logic:notEmpty>
<logic:empty property="foo">
<html:form action="modifySelf">
</logic:empty>
the body of the page
</html:form>
As a result I got this
Compilation of ...
If I implement the Synchronizer Token in my struts application, would i need to edit all my forms to add some kind of tag for the token or is that done automatically by struts?
...
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 f...
Hello,
Initially I had a webapp called "admin" running fine, deployed inside the $CATALINA_HOME/webapps/ directory of tomcat 6. Now I tried setting up a vitual host to run this webapp.
Step1: I added the following in $CATALINA_HOME/conf/server.xml
<Host name="mysubdomain.domain.com" appBase="keshav">
</Host>
Step2: I created a fol...
I am building a web application that has a top thin frame which should show the time in seconds in which the servlet session will timeout.
The problem is that a AJAX call to a servlet which returns the last access time, and the inactiveInterval itself updates the session.
So is there a way I can get information about the session via a ...
Hi
I have a javascript function updateHiddenField(value) that gets a value as parameter and then sets this value as the value of a hidden field.
I have a JavaBean flight with parameters id and flightNo.
Problem: How can I pass the parameter id of JavaBean flight to the js function updateHiddenField(value) when using <html:link> tag(s...
Does ExecuteAndWaitInterceptor work in Struts 1? If yes any samples for the same?
If no can anyone tell how to show a waiting page in Struts 1 when the control will be with the Action class.
...
I'm having a problem uploading a file using spring webflow 1.0 and struts 1.3.
The jsp is something like this:
<html:form action="/flowAction" method="post" enctype="multipart/form-data">
<!-- snip -->
<html:file property="file" name="attachDocumentsForm" size="50"/>
<!-- snip -->
</html:form>
The Form is something like t...
When I want to apply the DRY principle, i.e. to unify the code of multiple Struts action for different use-cases (for example the administrator role and the operator role ), one option would be to use an abstract base class "BaseAction" for the action and then use "AdminAction extends BaseAction" and "OperatorAction extends BaseAction". ...
Hi,
using Dojo, is it possible to make an Ajax call using xhrPost from an HTTP view to a HTTPS url ?
The url must be HTTPS (as defined in Struts).
If I simply set "MyCommand" as the 'url' parameter of the xhrGet, I get a 302 error code.
If I transform "MyCommand" using javascript to something like "https://......./servlet/MyCommand"...
My application is already existing in struts 1.1 and i am working on some enhancements.
I need to add new input fields dynamically from DB to existing JSP page.I've added these fields to jsp and I've included new field properties in the respective ActionForm bean.
Everything(CRUD operations) works fine.
But without mentioning these ne...
Hi, I have a newbie question on Tomcat / Struts.
I'm trying to set up a dev version of a site (that's working on the Unix server) on my local machine (Mac).
It looks like it can't find anything that is outside of a root server:
A JSP page without references to other JSP pages loads, but without images/CSS (in the '/images/' folder)
A...
In a Struts Action, I want to get a parameter from the URL or from a hidden field, when the parameter in the URL is not set.
To retrieve the parameter from the URL is as follows:
String userId = request.getParameter("userId");
But the problem is now, the HTML is based on forms (legacy code). And I observerd that the parameter userId m...
I've been working quite extensively with ASP.NET MVC and I find it extremely useful (compared to WebForms), however I have some experience with other MVC frameworks and I feel there are definite gaps in capability.
For one, in Drupal you can hook into just about anything and override it's View action. e.g. You can hook into the Drupal f...
I'm using Spring and struts and have the following entry in '/META-INF/context.xml'
<Context cachingAllowed="false" useHttpOnly="true">
<Resource name="jdbc/xxx" auth="Container" type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
maxActive="100" maxIdle="30" maxWait="10000"
...
I have a tomcat 6.0.20, apr 1.2, jdk 1.6.0_15 with mysql 5.1.38 running on a rhel box with 4 GB ram. There is one simple jsp/servlet application on it with 5 users, one struts 1.2.0.9 with 64 users on it and one struts 2.0 application with 35 users on it. The struts 2.0 users make an entry every second, about 900 entries in a day. I am ...