lakshmanan anand

Greenhorn
+ Follow
since Jan 13, 2009
Merit badge: grant badges
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by lakshmanan anand

Hi all,

I have been looking through this forum and for every job offer thread. there is a column called "Green Job".

what is a Green Job

please explain

thanks
14 years ago
Hey, awesome score. Congrats.

I am going to write SCJP1.6 this weekend and it will be helpful if you post your notes anywhere on the web.

thanks
14 years ago

You have mistaken the meaning of flag -d

flag -d is used for destination path for your java classes after compilation.

The error message clearly shows that it cannot find Library.java itself. See if you have put Library.java in the right path
what content types I should give. In my web app users can upload and download any type of file. what content type i should mention in the xml for it to correctly download the file in proper format.

please help
15 years ago

David Newton wrote:A stream result *is* the right way to do it--I'm asking why not just use a regular file input stream? It's a hint.



ya as you said, I have setup the code to




it worked in a wierd manner. the save as window opened at user side but ask the user if it has to download "fileDownload.action" instead of the original file itself. :banghead:
15 years ago

David Newton wrote:Why wouldn't you just use a normal file input stream?



I am beginner to all this. Is this not the right way ? How else can i enable the download service for my struts2 web app. I thought stream result type would be easier ??



And why, inspite of the getter method written there, struts is not seeing it ??
15 years ago
I am sorry, my uploading problem is solved. Where as in download, I get the above mentioned error.. please help
15 years ago
Hi
I wish the users of my webapp to download a file in c:\files space. I have written the following code to use stream result type to let the users download the file. But I get surprising errors. please help me resolve them

When I use


The struts xml fragment is


I still get the following error saying that the name inputStream ( i mean a getter with name inputStream does not exists) It is there in the action class as seen above


I am stuck with this problem for 3 hours and I am not able to solve this. How can struts cannot find whats already in there in its action fragment ??

[edit]Insert line breaks in the code, otherwise it is too wide for my screen. CR[/edit]
15 years ago
Hi,

My JSP receives an array list of beans from an action.

I want to print the individual properties of beans in my JSP one per line. How can i do it ?

My arraylist is a list of persons.
IN my jsp i want to print the person name and its other properties one per line.

please help
15 years ago


I want to create a struts 2 project in eclipse. I have downloaded the latest struts distribution. But things always become confusing when i try to create a struts project in ECLIPSE. Whenever I create a dynamic web project and add struts libraries to that project, some error or the other pops up.

How do I properly setup an eclipse Struts 2 project ?

To get a simple Hello world page, I did:

1. created a dynamic web project (procollab)
2. added struts 2 jars inside WEB-INF/lib
3. added the same libraries inside project build path
4. set the output folder for the src in WEB-INF/classes
5. created a filter in web.xml to send all requests to org.apache.struts2.dispatcher.FilterDispatcher
6. created a struts.xml in src

Errors I get:

Http 404. I get this for any URL, for example http://localhost:8080 or http://localhost:8080/procollab

I have added the project procollab in tomcat server list also in eclipse. but when I access any static resource directly, I get the page. I have the helloworld.jsp in webcontent folder, and when I go to http:localhost:8080/procollab/helloworld.jsp, I get the page correctly.

Have I set up my environment correctly ? Please help
15 years ago
Hi,

I am a beginner and I am developing some custom tags. I have the following code for a tag handler class.




And I have the following TLD file



And I have the following JSP file



The wierd thing is that, the tag handler class requires SimpleTagSupport class from jsp-api.jar, but after the class compiles successfully, and when i try to display the JSP file, I get an error 500. But when i remove the jsp-api.jar from the buildpath, the error 500 is not occuring.

What is the problem here.. please help

15 years ago
JSP

Reidar Gjerstad wrote:Hi again

I solved the problem. I had a copy of jsp-api.jar in my ...appname\WEB-INF\lib directory. jsp-api.jar does indeed contain the class SimpleTagSupport. Removing jsp-api.jar solved the problem. Probably it was copied there during earlier troubleshooting.

Thanks for patience.

Cheers
Reidar



but how can the class that extends SimpleTagSupport be built without adding jsp-api.jar to the build path. We need that class to create our tag support class. Something is going wrong
15 years ago
JSP
I found the solution for it....

I am also using eclipse

You should add another element in the tld file. That element is <jsp-version> . It seems it is mandatory. So add that as given below. Still eclipse "will" show a syntax error. Ignore that. Restart tomcat and run the file. You will get the output. I got it.
Not <jsp-verison> element below/
The tld file is




Just go for New->XML file and name the file as yourname.tld thats all !
i am running it from browser

http://localhost:8080/BeerV1/form.html

This form will have a button, which will call the servlet to do some computation and that servlet will call a jsp to give the page to the user....

the servlet class compiled without errors, should i include any classpath for the jsp compilation
15 years ago
JSP