Ian Cabigon

Greenhorn
+ Follow
since Feb 22, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Ian Cabigon

Hello I'd like to ask if you can assign arrays of beans as a form

for example i have a form:


id like to access this group array in my jsp.
can i do that using this:


What i get is an exception:
org.springframework.beans.NullValueInNestedPathException: Invalid property 'groupArray[0]' of bean class [PageForm]: Cannot access indexed value of property referenced in indexed property path 'groupArray[0]': returned null

Please help me.

Thanks.
13 years ago
Hello ranchers,

Does anybody know some mylyn query pattern for mantis generic web connector.
I'm always stuck with the default:
By the way, the Query URL is also the default:

Are there other nifty query patterns I need to know? I'd really appreciate if you can give me some. I tried to compose my own, but failed coz I know little about regex and stuff.

Lots of thanks,
Ian
Hello there..

Does anybody know some links to screencasts or torrent sites that talk about design patterns and pattern oriented talks. I've also heard there is a screencast about test driven development by Kent beck. does anyone have a copy of this?

Thanks.
Ian
Hello I'm a little confused if which one is evaluated first. jstl or my custom taglib.

Here is some snippets.



I wonder how to access the actual value of val?

Please help me.

Thanks, ian
13 years ago
JSP


I didn't get the approach you are suggesting .

After making chnages and clicks on Update Button , i have a function named as updateEmployee() inside my jsp

Now please tell me how can i send this Modified EMployee DTO into this function ??

function updateEmployee()
{

// Need your help here ??
}

Thanks inn advnace .




Looking at the code, I'd say updateEmployee() is a javascript function. Maybe inside this function is where we try to send the data to the server using forms. And in the jsp/servlet end, we parse the sent data and translate it to the intended javabeans.

Maybe something like this:



But somethings not quite right here..you should'nt use JSP for your parsing and logic.. In MVC, JSPs are for view only. So might as well move your logic inside a servlet.

Thanks,
Ian
13 years ago
JSP
Another question.. I notice you also try to implement the Servlet interface. I think extending HttpServlet class is enough to get it working.

Thanks,
Ian
13 years ago
JSP
Hello.

Looking at your code, this does not seem to throw a NullPointerException.

Have you tried inspecting if the code really does enter the doPost method? Maybe there are prior errors before the code reaches the doPost method.

Could you also check if its just configuration problem in your web.xml or check if your catalina.out has initialization problems.

Hope I can help.

Ian
13 years ago
JSP
By the way, I'm using apache tomcat and linux httpd ( apache http server )
13 years ago
Hello Guys,

How do I configure my site from this:

http://xxx.xxx.xxx/context_path/page1.html

to this:

http://xxx.xxx.xxx/page1.html

Thanks,

Ian
13 years ago
Thanks Rene.

Yeah! you're right. I was trying to avoid using IFrames but I guess its the way to do it.

Thanks

Ian
13 years ago
Thanks David.

I just would like to make the URL fixed and clean. as what you have said, like ajax feel. but still, there are page reloading, page transition but virtually no URL change in address box.

If you can think of a possible way to do this either by servlet or javascript, id like to hear from you.

So far i've tried to change the url location on javascript load like:



hehe.. but page reloads!.(

Ian


13 years ago
Hello everyone,

I'd like to ask if there is a way to make the URL fixed. Here is the scenario I'd like to end up with:

URL: http://www.example.com/fixedURL/
User clicks button that would change location to : http://www.example.com/fixedURL/page1.html
page1 is loaded.
Browser URL (address bar) does not change. will remain: http://www.example.com/fixedURL/

is there a way to do this in servlets or javascript ?

Please share some of your thoughts.

Ian
13 years ago
Thank you Devaka and Archit.

Yeah, sendRedirect is really HTTP-GET. I still havent found another way to redirect to another page/servlet.

@Deveka: I need to do this because I want to pass a volume of parameters to the target(page to redirect) page. And making another jsp/html form would mean I have to touch JSP(View) side. I was thinking of handling everything in the Servlet(controller) side of the system. But if you have something in mind, I'd gladly like to hear from you.

Ian
13 years ago
Hello Code Ranch,

I have a question on redirecting to a servlet. I have noticed that sendRedirect() method would always end up in the doGet method of the redirected page. how do I make sendRedirect point to doPost of the redirected page.

Page1Servlet


Page2Servlet


I have heard of some work around like creating a jsp or html form that would forward the parameter. But is there a way to do this in servlets.

Thanks,
Ian
13 years ago
Thanks for the info.
13 years ago
JSP