loading and running jsp file error - java

I am trying to create a new jsp-file in eclipse
I installed tomcat server and created new dynamic web content.
now i want to create a new jsp file, but each time i try to create the jsp file eclipse give me the warning message shown on the image posted below.
please let me know how to load and run the jsp files using eclipse correctly.

You seems to be creating JSPs in a non-Java eclipse project and hence this warning is coming.
To run a jsp file you need a container like Tomcat. You can configure Tomcat under Runtime in eclipse. Follow this link to learn more about configuring Tomcat with eclipse:
http://www.eclipse.org/webtools/jst/components/ws/M4/tutorials/InstallTomcat.html

Related

Run JSP from netbeans project in Tomcat Server

Hi I already develop my application using Netbeans IDE.
Now I want to run my application in Tomcat server for actual use. I already copy my project to tomcat/webapps.
But when I tried to run my application:
http://localhost:8081/myAppFolder/
it gives me an error message :The requested resource (/Opportunities-Registration/) is not available.
I should change the url to make it work:
http://localhost:8081/Opportunities-Registration/web/index.jsp
How can I open my application using http://localhost:8081/myAppFolder/ insteand of http://localhost:8081/Opportunities-Registration/web/index.jsp ?
Update:
All my servlet is also become 404 not found
Thank you
SOLVED
Solution:
1. copy .war file which is contained in dist folder of your netbeans project
2. Place your .war file to tomcat/webapps
3. Start your tomcat
4. You are good to go

java.io.filenotfoundexception jboss project localhost

I've been working on web project written in jsp and running on jboss. I have problem after deployment of project. I'm getting an error after hitting localhost:8080/Myapp : java.io.filenotfoundexception Null/easyfile.properties <Can't find easyfile.properties>. I have this file in conf folder in my app directory. For sure I need to properly point to this file or place it somewhere in jboss installation folder but unfortunately I'm new to Java and 've been working with PHP but I've been assigned to client who has home site written as one jsp site with some xml. I need to change their frontend a little bit but I'm trying to set up my local environment without success.
Any help would be great.
Regards Adam

How Tomcat Notify about When New Jsp being uploaded

when we directly upload JSP page into tomcat where application deployed directory then why we don't need to restart Tomcat? how tomcat know that it has new JSP page?
when user hit the url /myapp/mynewjsp.jsp He/She always get new jsp deployed page.
Tomcat has an auto deploy feature. When you update JSP files it detects you have done so, compiles it, and replaces the old compiled JSP page with the new one that it compiles into a java class.
http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html
If you don't want that to happen, you can turn off the auto deploy feature for your web application. It is described in the link how you do that.
Hey you can use jetty plugin for auto deploying tomcat folder . You don't need to paste your file on webapps folder. If you using maven project structure then add jetty plugin on pom.xml file . There is some command to run like mvn jetty:run etc... May these solution get you out from these problem

Debugging Custom java WebApplication

I have IVR -Java application deployed on caucho Resin server
Web App is not in server but directory outside on same system. Also Jsp are getting compiled in external directory.
In eclipse I have source code when I launch debugger I am able to connect and I am able to debug through java classes but when control goes to jsp file it is not able to find source
Any idea how i can fix it.??
Maybe that's because eclipse can't find the source. Have you tried adding that to the build path? Project -> properties search for build path.
If the source requires a different language to run, Jsp (i've never dealt with that), then perhaps you can get a plugin for eclipse for that language (jsp) and then add the jsp source to a (eclipse) project that houses the jsp section of the whole project.
Edit: seems like since I haven't messed with JSP much, I gave the wrong advice. Follow the link in the comment below.

Where translated servlet of jsp got stored

As we know, when the jsp got complied it will get converted to servet.
I have installed weblogic server 9.2, and i deployed a struts project which has jsp files.
And in the browser i am able to see the application.
Now I want to see the servelt file of jsp which I ran.
Can anybody please tel me where I can find it
or do i need to do some configurations for this because I searched whole weblogic directory there is no java file with the jsp file name.
If WebLogic is compiling JSP (i.e. if you are not precompiling them), they should be located under domain_name/servers/server-name-1/tmp/_WL_user.
See also
Using JSP Precompilation in WebLogic
I was struggling with this today and found another option. If you deploy your application via eclipse (and not via EAR file using the weblogic console) the compiled JSPs will be in <workspace>\.metadata\.plugins\org.eclipse.wst.server.core\tmp<some digit>\<domain name>\work\<app name>\jsp_servlet.
For Weblogic 10.3.6, the folder is this.
C:\oracle\MIDDLEWARE\user_projects\domains\APPNAME\servers\myserver\tmp_WL_user_appsdir_APPNAME_dir\\jsp_servlet_jsp_content
You can also check the <working-dir></working-dir> section in the weblogic.xml file to check for the location of jsp_servlets folder where the .java and .class files can be found.
You can trick the weblogic into recompiling the jsp files by deleting the existing ones, and try and access the jsp page from browser (in case lazy initialization is being followed).

Categories

Resources