Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

jsp run on server option not coming

Posted on 2013-01-29
10
Medium Priority
?
456 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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.
Suggested Courses
Course of the Month20 days, 15 hours left to enroll

810 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