Hi, i want to convert a .jsp file to .java file. I read various forums and they said to use tomcat to convert .jsp to .java.I have ran tomcat but it is not doing anything(i cannot write anything). Through command prompt i ran it and it just opens a new tomcat window and does nothing.May be i am missing the whole point here.Please help and suggest what to do and how to do that.

AFAIK,

jsp converted into servlet by any application server(tomcat,jboss ,etc) automatically...

servlet file itself a java file...

so you no need to convert it as java by yourself...

want to convert a .jsp file to .java file

Can you give an example.
I think you are correct when you say:

May be i am missing the whole point

Ok i have a html page which i have to convert to .java file.I used html converter to convert the page to a .jsp file and now i have to convert it to .java file.According to the replies when i run TOMCAT,it should automatically create the file but i do not see it(well i searched the .java file).Here is the screenshot of the Tomcathttp://img375.imageshack.us/i/captureic.jpg/

Converting an HTML page to java source code (a .java file) makes no sense.
HTML is a Markup Language.
Java code is source for an executable program. Vastly different things.

There's something missing in your description of what you want to do.

Are you trying to write a .jsp file that will generate an HTML page?
A .jsp file is a mix of HTML and java source.

i also have the .jsp file that i have to convert to .java

Converting an HTML page to java source code (a .java file) makes no sense.
HTML is a Markup Language.
Java code is source for an executable program. Vastly different things.

There's something missing in your description of what you want to do.

Are you trying to write a .jsp file that will generate an HTML page?
A .jsp file is a mix of HTML and java source.

How are you going to use the .java source file you are creating from a .jsp file?

I have the .jsp file and now i have to make it a readable file for java virtual machines such as(secure shell or eclipse) and i believe one can only run the .java files in order to use these virtual machines.

How are you going to use the .java source file you are creating from a .jsp file?

What will you do with the .java file after you compile it to a .class file?
Will it be a standalone application that you run on the desktop?
Or will it only execute within some server with a special environment?

well its a game that i am trying to run on eclipse

What will you do with the .java file after you compile it to a .class file?
Will it be a standalone application that you run on the desktop?
Or will it only execute within some server with a special environment?

Sorry, I have no idea how your IDE works.

create a web project as web standard prj_name/web-inf
web-inf/web.xml
place .jsp where ever u want and open command prompt change directory to .jsp having floder

run the setDomainEnv.cmd or . setDomainEnv.sh(linux) from ur command prompt (use cd to locate upto use
cd bea/user_prject/domains/anydomain(ur choice)/bin) and come back cd .. upto ur .jsp file containing folder run the following command

java weblogic.jspc -keepgenerated index.jsp

it works fine
posted by (asraju)

asraju: after two years, I doubt this was still an issue. also, it's nonsense anyway. decently designed and written jsp files don't contain Java code to begin with.