Help coderanch get a
new server
by contributing to the fundraiser

Tejas Shah

+ Follow
since Oct 26, 2009
Tejas likes ...
Eclipse IDE Firefox Browser Java
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tejas Shah

That does not exist anywhere. The guy who created it hosted it somewhere on but seems like the server was not stable.
11 years ago
If all you want is mobile development,

you must consider phonegap and jquery mobile. This supports most of the current smartphone OS. I suggest not to limit your scope to one specific platform, as platform independence is very impressive.

These two frameworks lets you create mobile app mostly out of simple HTML/CSS !!
12 years ago
Hi Ravi,

Thank you very much.

My concern is how can i send different views to different users?
additional views may need changes in action mapping as well as in Action class, to return the appropriate ActionForward .
correct me if i'm wrong, as I am not pro at struts.

I'm looking for the most neatly developed solution without a cluttering up the existing application.
12 years ago
Hi all,

I have been given the following brief:

"Consider the design of a web application using Struts2 and Spring for traditional displays and mobile displays."

We already have an existing web app project designed initially for traditional displays. We need to accommodate mobile views for some of the pages.
I have considered separate projects; one for a traditional displays and one for mobile device but the maintenance overhead and duplicated code sounds like a headache from the start.

I have developed some pages having single jsp pages that would handle traditional and mobile devices in the same file but that has got convoluted and result in large, messy files.

More ever, I have a really different HTML for this pages, so using the CSS dynamically is not an option here.

I am thinking of having almost-copy struts config and action classes in a separate module, but i am not clear up with the detailed design.

Thanks for reading. Kind regards,
12 years ago
I have a static method which i am calling from a Servlet and passing the request and response objects as arguments. Purpose of this method is to write the response back to the client...
This is a refactored code, please let me know if you want any more details...

Everything works fine in most cases.
Now whenever the respContent String's size goes beyond a certain limit(more than 240 lines or something) in a client application, I am not receiving any response. However, the log statement here produces the correct log everytime regardless of the size. Client is in another JVM. No Exceptions or errors occurs.

This seems to be related with some tomcat configuration or something, As I tried to replicate the issue in several machines but somewhere i was able to, somewhere i was not...please provide your inputs I'm stuck with this since long
12 years ago
Cat... ???

It was car we ware talking about. Anyways, I'm also interested in Remote Control Cat, if exists!!

- Tejas

Cherish your life..!!
13 years ago
Java never passes the objects, but the reference.

As there is nothing like a pointer in Java, this is just an internally handled and we can access the same object at the caller. To be precise, suppose, 'myBike' is faster, 'fastest' and and 'mybike' will refer to the same object. and changes made to either of these will be reflected in each other... it's like having two tags atached to the same things.
13 years ago

can you check, if two of the instances are running independently first?
Your Error log shows, that it could not find one of the instance. Look for the possible port conflict.

Best practice to assign ports to two different servers is to change the post base...
i.e. default tomact might be running on 8080, portbase is 8
for another instance, have the portbase 9, running it on 9080

your configuration seems fine. Please check your servers have the HTTP- listener enabled on on the specified ports i.e. 8009 and 8109
and the network-listener jk is enabled.
13 years ago
Choosing on how much records to be fetched depends on the scenario.

1. If you need the records too frequently, you should not query the database again and again as connection to it and querying takes a lot of time, but keep it in memory(collection or some data structure) and return by iteration to the JSP. have more efficient query to the database.

2. If you don't need the records too frequently, you can query the database for exactly what you need even if it is done little frequently.
13 years ago

Yes, This returns the whole object fastest to the caller....

Something like,

and the fastest will contain reference to myBike or yourBike, whichever is returned.

One Advice: Java is different in C++ from many aspects,
Just carry on with the fundamentals of OOP and dive into Java as a new language. Otherwise it can confuse you like anything!!
13 years ago
Adding some information..

And then the call passes to the container and container which takes care of the servlet context, is returned. The actual implementations may be found in container's code.
13 years ago

It seems that you are not having any problem with passing the control. Submit button works just for the form submission and have no responsibility to render pages in specific regions.
You can use hyperlink and java script to handle form submission, and getting it in another frame.

Cherish your life...!!
13 years ago
No redirection will occur ..this will send a request to webapp2.
You will be able to get response in the connection's input stream. Basically it makes your application a proxy between the target and client.
13 years ago