Solved

jsp run on server option not coming

Posted on 2013-01-29
10
423 Views
Last Modified: 2013-02-10
I am trying to run my jsp by right clicking on the file---> run as---->Run on server.

But it is not showing 'Run on server'


It only shows 'Run Configuration'


How do I see option 'Run on server'

As a work around i am setting welcome file in web.xml with this jsp to run.


Please advise. Any ideas, sample code, resources highly appreciated. Thanks

in advance.
jsp.jpg
jsp2.jpg
0
Comment
Question by:gudii9
  • 6
  • 3
10 Comments
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 38834003
does JSPProject is a web project or java project?
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 38834596
your does not code contain <form> tag its important ML(Jsp) page.

if your page contain <form> tag then only your reganice that its web page then only it will come run on server
0
 
LVL 7

Author Comment

by:gudii9
ID: 38835268
It is web project.

let me try with form tag and see.
0
 
LVL 7

Author Comment

by:gudii9
ID: 38835605
form tag is usually on html page right. Does jsp pages consist of form tag. i want to run jsp pages without form tag. how to do it.Please advise.
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 38838536
its main for jsp also .

because that form tag only knows where to go next ! (normaly you mention action ="some java class or jsp  " like that . )

You cant run the jsp page without form tag . because jsp is convert into servlet while compile. that servlet class only your IDE ref . if form tag is there then its web so its enable run on server .
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 7

Author Comment

by:gudii9
ID: 38840305
If you see the Loin.jsp file do have the form ta. Still it is not showin 'Run as Server' option' as in the attachment. Not sure why. Please advise

<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
    <title>Login page</title>
   
      <meta http-equiv="pragma" content="no-cache">
      <meta http-equiv="cache-control" content="no-cache">
      <meta http-equiv="expires" content="0">    
      <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
      <meta http-equiv="description" content="This is my page">
      <!--
      <link rel="stylesheet" type="text/css" href="styles.css">
      -->

  </head>
 
  <body>

 <form method="post" action="loginservletpath">
 <br>User Id:<input type="text" name="userId">
 <br>Password:<input type="password" name="password"/>
<br> <input type="submit">
 </form>
  </body>
</html>
loinJsp.jpg
0
 
LVL 7

Author Comment

by:gudii9
ID: 38856165
Does MyEclipse Show 'Run on server' option at all. please advise
0
 
LVL 7

Author Comment

by:gudii9
ID: 38856170
any links to learn how to run servlets, jsps on myeclipse. please advise
0
 
LVL 20

Accepted Solution

by:
Sathish David  Kumar N earned 500 total points
ID: 38858360
change the prespective to j2ee mode i think its in java mode .

in your MyEclispe right corner you can see the prespetive
0
 
LVL 7

Author Comment

by:gudii9
ID: 38872996
oh really, my OS crashed. I will try by reinstalling later
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
endX challenge 2 50
groupSum6 challenge 6 45
wordmultiple challenge 12 92
micro services vs rest web services 16 53
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now