Lucky J Verma

Ranch Hand
+ Follow
since Apr 11, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
4
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 Lucky J Verma

Hi all
I need some help in java regex. I have a problem in capturing the last group which is optional. I have 3 strings I want to capture and 3rd on is optional.
Different input strings and input format is:
TS:This is system code[SYSCODE-123]
TS: This is system code[SYSTEM-123]
TS:This is system code.
TS12: This is system code


I need to extract three different string where 3rd group in input string is optional and I want tmy group to be returned 'null' in that case if possible.
three components :
TS
This is system code
SYSCODE (optional , I want to extract contents inside square brackets if present).
I am reformatting these strings in my UI and need to know if 3rd group is present or not.Somehow I am not able to make it work.
This is regex i am trying to modify to make it work.
Regex: (TS-.+):(.*)(\\[(.+)\\]);



Thnks.
10 years ago
Hi

I have experience with Spring Web flow but never worked with JSF and i am going to learn that. I thought it is UI technology
but it also have capabilities similar to SWF.
I want to know -
What are the differences and what are their usage. In what kind of envrionemnt we should opt one over another?
I remember, in a project our manager wanted to replace JSPs with JSFs/Facelets.
11 years ago
JSF

Hi guys...
I started reading this book-
OCA Java SE7 Programmer Guide from Packt Publishing by Richard M Reese

and found so many errors specially in Q&A section at the end of chapter.


Currently i am at Chapter 5- Looping Contructs and many Questions have wrong answers.
Before that also i encountered wrong answers but dont remember now.

Just want to let people know who are also following this book.

Hi all

I have been working on java for 4 yrs and also worked on similar technologies & frameworks(spring/struts/php).

I have desire to be a Java Architect in future. So i decided to add some certifications to my profile.
My primary interest is Spring framework & very good working experience in it.I want to learn more technologies (Spring batch/WS)

Researching over internet , i figured out that before going into other framework/certifications, i should be certified with Java certifications (SCJP/OCP).
With Java 7,We have one more exam added now. OCA (Oracle Certified Associate, Java SE 7 Programmer) ->OCP.
So i have to start from basic java certifications. Am i correct?


Can someone please help me with my career path?

Thanks
Hi sangeetha

Were you able to figure out the solution?I am getting same error and don know what to do.
11 years ago
Hi all

I am new to web services and using SOAP - code first approach with Spring and Apache cxf.
I got most of the Apache Cxf jars (there is no good documentation on internet) and created a service without client yet to see the WSDL generated.
But when i run Tomcat , i get exception.




Does somebody have any idea what this is? Somewhere i got on internet, it it version problem in dependences but how do i know which version is compatible with what version of other jars.
I work on Spring 3 and Apache CXF 2.5 .
11 years ago
Hi all

I am new and writing a basic REST web service with Spring WS and using JAXB2 for XML view.
I have jabx api jar and spring-jaxb jar in my lib folder.
In my servlet xml i defined my XML view using JAXB2marshaller & also defined contentNegotiatingViewResolver (i dont actually need it)



From my controller, i have some handler methods and i realized only 2nd way works but i wonder why.
I followed the tutorial & books which define 2nd method as correct.
Please suggest what do i miss in settings.




Please suggest - what is wrong in my settings.

We have been using JDBC Access & SimpleJDBCTemplate/JDBCCall in our application for db access and are considering to move to
some ORM framework.
personally i have worked on JPA and Hibernate in the past but i read about many other orm frameworks
like toplink , iBatis, and Apache cayenn which ii read is very good.
http://bill.dudney.net/roller/bill/entry/1

So i am confused about which one should be used?
I want to look up state-ids in subflows from main-flow and transition to that state.


My application : There are many pages implemented by my flows with 1 main flow and with multiple flows inside which can furthur have flows inside.

When user is navigating and entering values, he can exit at any point in application.
When user exits , we save the values entered & current-state of user in DB.
He can exit from any page ( in root flow or some page from sub flow)

Next time, user logs on, we have db-calls to fetch stored state-id and we want that page/state to show up directly and bypass all other prior states.
He can navigate back though from 'previous' button
It is getting very difficult for me to go from main-flow to nested subflows. I cannot go directly so nested flows are very difficult for me to work on.

Is there any way main/parent flow sees and can jump to subflow states directly.

how can i implement this functionality?Any other ideas?
11 years ago

Hi all,
I am new to SWF2 and working on a flow at the end of which PDF should be displayed inside window.
Since all the execution is controlled by states in xml, i cannt figure out how to break it out to follow controller method which can stream pdf response to browser
I followed this tutorials:
http://duckranger.com/2010/12/display-a-generated-pdf-from-within-spring-webflow/
But my webflow configuration is different and i am not at a point where i can comfortably change the config.

My config:


Thanks
11 years ago
Hi All

I am using DataSourceTransactionManager since we have one datasource and JNDI lookup is used for datasource.
Everything worked fine with Tomcat on local but once we deployed it on websphere it failed with loading testing incase of mulitple connections.

I get following exceptions-
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Connection is closed.


I have very little knowledge in Spring Transact on Management I want to know if is was right to use DataSourceTransactionManager
with JNDI lookup.
Or there is something else.
11 years ago
Thanks Tim for replying back .

I will go little furthur we we have done and what are the situations we are facing.

In webapp, at most places we have POST request ,and spring encryption for URL params/GET request.
Each input field is filtered or validated at client side for any javascript/Xss/SQL kind of statements and also at the server side.
Anyone can intercept HTTP request and change the data. But we are safe in case of bad data(bad characters) going to db because of server side filtering.
This is current security implementation and obviously not enough.

case 1. data coming from db into a list and list is rendered on jsp page. Request is intercepted and data is modified and XSS added eg
<iframe>http://yahoo.com</iframe>; and that is rendered on jsp page.
case 2. i enter some input value - "xyz" on a form on jsp page and it is passed to next jsp page and rendered (through model attributes) and inbetter modified by intercepting hhtp request.Modified value is being rendered on 2nd jsp. It could contain <iframe> too.

How to protect from such cases?Is SSL a solution?Should we put validations on output data too?Is it right approach?
11 years ago
Hi all

My webapp is based in spring framework and front end with jsp/javascript.
We have security issues and need some help on technology.
How can i prevent data tampering by intercepting the http request?One solution is to
put everything in session but its a big modification.
Also i believe spring security must have something to prevent this kind od data modification but i have no knowledge
to that.
I do have server side validation to invalidate bad-characters entered before db updations.

1.But what if data travels(entered) from one page to another(rendered) (no DB insertions yet) is modified inbetween by intercepting request.
2.Also if a list from DB is being rendering in a table format but before rendering, its altered and wrong data is rendered on display.


Please suggest.
11 years ago

Hi all

I want to encrypt the parameters sent in my url to call another action/controller.So i used Springs EncryptionUtils class and encrypt/decrypt (based on DES) methods inside it
which are very easy to use but deprecated . I read it that it has been separated out into new libraries.
But could not figure out equivalent to that in Spring framework 3.
Someone please tell me what are those libraries and what is the best approach & algorithm to encrypt/decryption request params.
Do i need to go in depth of JCA libraries ?Pardon my knowledge i am totally new in this.
It just one parameter i want to encrypt everywhere being used.

Thanks


11 years ago
Hi Kunal


Its very easy in Spring. I think i read this post late but you are still not able to get it ,let me know. I have done similar in my application.
11 years ago