Chhaya Patil

Greenhorn
+ Follow
since Nov 14, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chhaya Patil

Thansks Jeanne for your reply.

Yes, consider this worst case scenario where user accidently leaves the connection open. (you are right. say someone opens the record for editing and goes for lunch.) To handle such scenarios we need to implement the timeout on connection and close it automatically.


Thanks.
Hi,

In order to achieve data accuracy for crucial data, we are locking the records at databse level for some tables while editing -using for e.g

select * from employee where employee_id = 123 for update nowait;

and unless the user who has locked the above record performs a commit / rollback , the record remains locked for other users. They get(ORA-00054: resource busy and acquire with NOWAIT specified error) which is working how we want it to work.

The problem is if the first user who has locked the record does not release the record for some reason, we want the record to be released after a certain interval (say 30 mins.)

Can anyone suggest a way to achieve this in JDBC / Weblogic server (some connection pool setting)?

Any help is appreciated.

Thanks.
Hi,

When i deploy my Struts2 application on Weblogic server; for the first time when the user logs in automatically ;jsessionid=<some value> is put in URL.
The problem is that the web server does not like ; and it gives 403- forbidden page error.

I had no such issue with Struts 1 applications before. Is there a way to stop Struts from putting that jsesionid in URL?

Any help is appreciated,

Thanks.
14 years ago
hi,

I am trying to put styles on datetimepicker using cssStyle and cssClass but it does not work.
I want to syle the textbox attached to Calendar and not the calendar.

Please let me know if anyone has solution for this.

Thanks
14 years ago
I am getting "attribute is not recognized" compilation error when i am trying to use labelSeparator for textfield.
I have struts2-core-2.0.14.jar in my lib folder.

Anyone has any idea why this is happening?
15 years ago
the error just say Syntax error ( DEBUG: [SyntaxError: Syntax error] ) and then shows html source for page. btw, i have multiple rows on page (so multiple autocpmpleters) so i see syntax error and source code.

if i remove the autocompleter then there is no error on page, which means that that's the piece which generates error.

I really do not have any idea what do you mean by


<result name="success">/pages/abc.jsp</result> contents--is it producing valid JSON?


As i am completely new to it.

and about my last reply , i though you are asking me if i see any of the list data in page source. so i said i do not see it.


Thanks.
15 years ago
Thanks for replying.

I set the debug=true. and i see the syntax error on page. I do not know why the syntax error is happening.
Does my page have to show the Map data in source?? it does not show any.

for eg something like this?

items: [
{name: '1'},
{name: '2'},
]

Also my ajax action does work, i tried running it manually. actually the ajax action is fired while loading page each time but the list is not populated. Also when user starts
typing the ajax action is not called.

Any suggestions?
15 years ago
Hi,

I have a autocompleter field with AJAX theme to dynamically populate list. But problem is it does not display list data.

here is my code in jsp :

<s:head theme="ajax" />
.
.
.
.
<s:url id="json" value="/categoryAjaxAction.action" />
<s:autocompleter loadOnTextChange="true" loadMinimumCount="1" theme="ajax" name="categoryStr" value="%{category}"
href="%{json}" dataFieldName="categoryStr" id="%{someId}" />

my action code looks like this -

Map<String, String> map = new HashMap<String, String>();
map.put("1", "A");
map.put("2", "B");
this.setCategoryStr(map);
return SUCCESS;

Here is my struts.xml
<action name="categoryAjaxAction" class="com.a.b.c.CategoryAjaxAction" >
<result name="success">/pages/abc.jsp</result>
</action>

Can anybody help me finding what i am missing??? I was able to populate static list very easily with simple theme.

Thanks

15 years ago
Thanks for replying.

the exception is from outside the execution of the action logic. it's from a data access class which i call from action. So i was getting 1 or 0 depending on success or failure from data access module. So if data acceess component had exception it was returning 1 and i was returning "Exception". which is wrong.

So now just to try, i copied the exception causing DB code into action itself and i am not returning "Exception". But when exception is occuring i see 500 error page but not Error.jsp with stack trace. So the entire exception trapping is not working. Any idea why?
15 years ago
Hi,

I am trying to use Struts2 exception handling mechanism.
Here is how my struts.xml file looks like for exception related entries -

<global-results>
<result name="Exception">/pages/error.jsp</result>
</global-results>

<global-exception-mappings>
<exception-mapping exception="java.sql.SQLException" result="SQLException" />
<exception-mapping exception="java.lang.Exception" result="Exception" />
</global-exception-mappings>

Here is my action related entry -
<action name="abc"
class="com.action.abc">
<interceptor-ref name="exception" />
<interceptor-ref name="abcStack" />
<result>/pages/packets.jsp</result>
</action>

Now in my Action class when i get an exception i return "Exception" . ( I am not sure this is the way to do it, i am pretty new to Struts2.)
My error.jsp pages gets displayed but i do not see any exception message and stack trace.
I have <s:property value="%{exception.message}"/> , <s:property value="%{exceptionStack}"/> for displaying error msg and stack trace.

Does anyone have idea where i am getting wrong?

Thanks.
15 years ago
The user is sent to log in page if sesion timed out. But what happens is directly the last action (action in URL) is accessed. Since i have lost valuable information from sesion, error occurs.

This can be avoided if whatever is URL, after logged in the Start action is called and Homepage is diaplyed, it's acceptable.

I can do a quick check in every action, if session variabes are null then to redirect to start but i am looking for a better solution.

Thanks.
15 years ago
Hi,

In our application we are facing problem when user's session times out / user logs out and then try to access any random action. What i mean to say is, we have a start action which finds out user role and access level. but if the application is directly accessed without calling start action then we obviously get errors.

What is the way of forcefully calling the start action even though user accidently tried to access any other action.
(this may happen when someone bookmarks any action instead of actual application URL)

Thanks.
15 years ago
Thanks for replying.

The problem is as there are several rows (number depends on rows returned from database) the id has to be unique for each row. If i will remove scriptlet tags then the id will be same for all rows and there it will fail. the applicationStatusId is on the fly genearted id like applicationStatus1, applicationStatus2 etc.

Is there any other way to iterate list in session several times for a select box in one page for multiple rows?

Thanks in advance.
15 years ago
Hi,

I have issue with displaying a list for multiple rows. for e.g i have 10 records on a page. each record has a list box to iterate from same list in session. since the iterator id has to be different for each row, i created a on the fly id for iterator and placed liked this - where applicationStatusId is run time genearted id.

<select name="statusStr" class="regtextsmall">
<logic:iterate id="<%=applicationStatusId%>" name="applicationStatusList">
<logic:equal name="<%=applicationStatusId%>" property="rvLowValue" value="<%=statusStr%>" >
<option selected="selected" class="regtextsmall" value="<bean:write name="<%=applicationStatusId%>" property ="rvLowValue"/>">
</logic:equal>

<logic:notEqual name="<%=applicationStatusId%>" property="rvLowValue" value="<%=statusStr%>" >
<option class="regtextsmall" value="<bean:write name="<%=applicationStatusId%>" property ="rvLowValue"/>">
</logic:notEqual>
<bean:write name="<%=applicationStatusId%>" property ="rvMeaning"/> </option>
</logic:iterate> </select>
<% } else { %>
<html:select property="statusStr" styleId="statusStr"> <html ption value=""></html ption>
</html:select>
<% } %>

this gives me "This attribute does not support request time values" error.


Any help with this is appreciated.

Thanks.
15 years ago