How to make controls static in jsp page
Hello Friends.............
I want to make controls or objects static which are on jsp page.
i.e. when my window is maximized then every thing is perfect but when i restore my window all the controls on the jsp page gets destorted.....
I want to make look that jsp page same in both the positions of window.
1) When window is maximized.
2) When window is minimized.
The controls should not get destorted.
Can any body please help me out in this issue....
Thanks
Sameer Rede
This has nothing to do with JSP. It's all about HTML and CSS. You can use CSS to specify fixed sizes/locations for things, or you can use HTML tables to control layouts.
Similar Messages
-
Is there any how to make control without xaml ?
Is there any how to make control without
Generic.xaml ?
When we use templete control , Normally we made a custom control using geniri.xaml to make make up control templet.
without Generic.xaml is it possiable to make up control templet that contained many component like a button stackpannel.
this is my sample code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Documents;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
namespace derrick_test
public class DerrickPanel : Control
private StackPanel parentPanel;
private TextBlock testBlock;
public DerrickPanel()
this.DefaultStyleKey = typeof(DerrickPanel);
parentPanel = new StackPanel();
testBlock = new TextBlock();
parentPanel.Orientation = Orientation.Vertical;
parentPanel.Background = new SolidColorBrush(Colors.Red);
testBlock.Foreground = new SolidColorBrush(Colors.Aqua);
testBlock.Text = " hello World ";
parentPanel.Children.Add(testBlock);
Best Regrads Derrick.Here's one solution that I found:
public sealed partial class MainPage : Page
public MainPage()
this.InitializeComponent();
protected override void OnNavigatedTo(NavigationEventArgs e)
DerrickPanel D = new DerrickPanel();
MyGrid.Children.Add(D);
public class DerrickPanel : Control
private StackPanel parentPanel;
private TextBlock testBlock;
public DerrickPanel()
this.DefaultStyleKey = typeof(DerrickPanel);
this.Template = DerrickPanel.CreateTemplate();
private static ControlTemplate CreateTemplate()
string xaml = "<ControlTemplate xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\">";
xaml += "<StackPanel Orientation=\"Vertical\" Background=\"Red\">";
xaml += "<TextBlock Foreground=\"Aqua\">Hello World</TextBlock>";
xaml += "</StackPanel>";
xaml += "</ControlTemplate>";
var сt = (ControlTemplate)XamlReader.Load(xaml);
return сt;
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
objects and unknown namespaces. -
How to print new line in jsp page
hi
how to print new line in jsp page
thanks\n - new line character is in java specific not HTML
specific.Well, if the correct line separator sequence (by far not always \n) would be used, it does add a new line to the HTML output. Too bad that you don't want to see HTML but formatted text. The BR tag is a formatting element for the displayed text, not a line break in HTML. ;) -
How can i redirect to my jsp page from servlet in init() method..Becoz that servlet is calling while server startsup..so im writing some piece of code in init() method..after that i want to redirect to some jsp page ...is it possible?
using RequestDispatcher..its not possible..becoz
RequestDispatcher rd = sc.getRequestDispatcher("goto.jsp");
rd.foward(req,res);
Here the request and response are null objects..
So mi question can frame as how can i get request/response in servlet's init method()..Hi guys
did any one get a solution for this issue. calling a jsp in the startup of the servlet, i mean in the startup servlet. I do have a same req like i need to call a JSP which does some data reterival and calculations and i am putting the results in the cache. so in the jsp there in no output of HTML. when i use the URLConnection i am getting a error as below.
java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:707)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:705)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:519)
at com.toysrus.fns.alphablox.Startup.callJSP(Unknown Source)
at com.toysrus.fns.alphablox.Startup.init(Unknown Source)
at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
so plz do let me know how to call a jsp in the start up of a servlet.
Thanks
Vidya -
How to enable the EL in jsp page
hi can u tell 'how to enable the EL in jsp page'?
*I am getting below exception in tomcat when i inclued +<%@ page isScriptingEnabled="true" isELEnabled="true"%>+*
org.apache.jasper.JasperException: /index.jsp(1,1) Page directive has invalid attribute: isScriptingEnabled
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
org.apache.jasper.compiler.JspUtil.checkAttributes(JspUtil.java:311)
org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:106)
org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
org.apache.jasper.compiler.Validator.validate(Validator.java:1700)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803) -
How to call BPEL process in JSP page
Hi
I am new to BPEL.please help me how to call BPEL process in JSP page.
Thank You...Check this thread ....
How can i call asyncronous BPEL process from Java Class????
Tom.. -
How to Hightlight the Data in Jsp Page
How to Hightlight the Data in Jsp Page,
I am doing doing search page,based on values given search page those are sent to servlet,in servlet based on some conditions if particuler id i am getting then i am redirecting to Respective jsp page with highlight the data from database..
Thanks in advance..."Highlighting data in JSP sounds strange".
Without looking at your search specific algorithms I feel you are finally going to display a page (HTML content) to user which contains highlighted text. Highlighting is not directly related to server side language you use (JSP, ASP, PHP etc.). This is purely HTML and CSS. However, server side script (such as JSP) should generate HTML content for getting highlight effect.
Following HTML shows highlighted text using background-color property on span element.
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<p style="font-size:1.1em">This is a long paragraph which contains <span style="background-color: yellow;">highlighted text</span> and non highlighted text.</p>
</body>
</html>Thanks,
Mrityunjoy
Edited by: mrityunjoy on 14 Jun, 2010 3:30 AM -
Oepe-12.1.2.1-kepler how to use ADF Templates in JSP page
Hi all,
I use oepe 12.1.2.1 kepler 4.3 and creating JSP page but I can't see any ADF Rich Faces Page in JSP Templates Page of Preferences Dialog. How to use ADF Templates in JSP page?
Thanks,
ThomasSelect the JSP Templates link. Is the ADF Rich Faces Page template listed? Refer Creating the Login Page/4.
Introduction to the Oracle Enterprise Pack for Eclipse (OEPE) IDE -
How to debug a bean in JSP page with JBX???
How to debug a bean in JSP page with JBX???
i have a bean within a JSP page. i wanna find out how do they varibles work and changes of them values.
are there some ways or tools to get the situations of them in visual way? just like when i debug VB program,i can get the situations in immediately window.help me !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
How to pass parameter to intro.jsp page ?
Hi all,
Anybody please tell me how to pass parameter to intro.jsp page.
Is there any param name defined in <forward > syntax ?
I have made following configuration in struts-config.xml file.
I want to pass parameter to intro.jsp page
<global-forwards>
<forward name="invalidsession" path="/intro.jsp" redirect="true" />
</global-forwards>
please reply soon.
Thanking you.Hi all,
I have a similar kind of question..
Iam trying to pass a string variable from JSP to servlet thro URL..
Im using tomcat5
COde:
String fname=request.getParamter("filename");
<jsp:forward page="/servlet/coreservlets.filedownload?name=" +fname />
It is generating a unterminated tag error..Please help.. -
How to load java class from jsp page?
hi all!
Does anyone know how to load java class from jsp page?
I try to load java class from jsp page.
Is it possible to load java class fom jsp page?
thanks and have a good day!What I mean is How to load/open java class file from jsp page?
I think we can open Applet from jsp page by using
<applet code=helloApplet.class width=100 height=100>
</applet>
but, how to open java class which is an application made by Frame?
thanks and have a good day -
How to connect particular BAPIs to jsp page
HI ALL,
I NEED HOW TO CONNECT BAPI TO JSP? I NEED EXAMPLE PROGRAM.
ALREADY ONE TASK IS COMPLETED IN WEBDYNPRO...MY AIM IS CONVERT INTO FULLY JSP PAGE....PLEASE FIND THE SOLUTION..HI ALL,
Please anyone tell how to connect bapi to pure jsp page in NDS...
and how to run pure jsp page in NDS... -
How to get multiple selections from jsp page in my servlet
Hello Everyone,
I've a list that allows users to make multiple selections.
<select name=location multiple="multiple">
<option>
All
</option>
<option>
Hyd
</option>
<option>
Dub
</option>
<option>
Mtv
</option>
</select>I want to get the selections made by user in jsp page from my servlet, selections can be multiple too.
ArrayList locList = new ArrayList();
locList = request.getParameter("location");when I do so, I get compilation error as the request returns string type. How do I then get multiple selections made by the user.
Please let me know.For those kind of basic questions it would help a lot if you just gently consult the javadocs and tutorials.
HttpServletRequest API: [http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html]
Java EE tutorial part II: [http://java.sun.com/javaee/5/docs/tutorial/doc/]
Coreservlet tutorials: [http://courses.coreservlets.com/Course-Materials/] -
How to use Session scope in jsp page
Hello, I have login form, where user provides username and password. Then click on submit, it will forward to validation.jsp. Where it will check in database make sure username and password exit. Now i can also retrive accountid of perticular user. I want to put that username and accountid in session scope. so all other pages can use that username and accountid. How can i do that. I'm new at this, so please provide me example too. Here is my code for login.jsp and validation.jsp..
Validation.jsp
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
//String name = request.getParameter( "username" );//
//session.setAttribute( "accountID",accountID );//
<%
String connURL = "jdbc:oracle:thin:@orca.csc.ncsu.edu:1521:ORCL";
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
conn = DriverManager.getConnection(connURL, "vapatel","pjdas");
stmt = conn.createStatement();
String user=request.getParameter("userName");
String password=request.getParameter("password");
boolean entrance=false;
stmt.excuteQuery("SELECT AccountID From Password WHERE USERNAME='"+user+"'");
rs = stmt.executeQuery("SELECT * FROM Password WHERE USERNAME='"+user+"' AND PASSWORD='"+password+"'");
while(rs.next()){
String dbUser = rs.getString("USERNAME");
String dbPassword= rs.getString("PASSWORD");
if ((user.equals(dbUser)) && (password.equals(dbPassword))){
entrance=true;
if (entrance==true){%>
<jsp:forward page="form.jsp"/>
<%}
else{%>
<jsp:forward page="login.jsp"/>
<%}
%>hi,
to put something into session scope in a jsp page use:
session.setAttribute("counter", Integer.toString(5));to retrieve is from a jsp page use:
String counterAttribute = (String)session.getAttribute("counter"); -
How to retrieve resource name in JSP page
Hello,
I have the following scenario:
User wants a new resource to be provisioned to himself, he makes standard steps; chooses one resource from the list of available resources and sends a request. After that a summary page is displayed - my goal is to create an url to external application on that summary page (i.e. tjspRequestSubmitTiles.jsp) that should be displayed depending on the name of the resource, e.g. if user requests for a ResourceA - link appears, but when he requests for a ResourceB - link does not appear.
So far I have created a link with a sample if statement - it works.
My problem is how to make a real condition - retrieve the resource name that request deals with. Anybody know how to do that, which API to use etc.?
Regards,
Maciej.After adding the code to tjspProvideDataShowInfoTiles.jsp file, nothing has been improved, I am still facing the same result (on the console):
RO: null
It seems that file (tjspProvideDataShowInfoTiles.jsp) does not take part in the process.
I have tried to pass some sample session attribute in tjspRequestVerificationTiles.jsp and this works, but I do not know how to retrieve resourceName in this file.
I was trying to make some code retrieving resourceName in tjspRequestSubmitTiles.jsp, e.g.
tcRequestWizardForm tcReqWizForm = (tcRequestWizardForm)session.getAttribute(requestWizardForm);
String requestID = tcreqWizForm.getRequestID();
...and what to do now to retrieve resourceName?
Maybe you are looking for
-
Backing up and restoring from Time Capsule
Hi guys, I have a new laptop and I would like to put some of the files that i backed up with time machine and the old macbook, the old one is dead with no chance to recover anything from it, its there a way to just get the new mackbook pro to acces t
-
My trackpad is not working properly already. Is it eligible for replacement?
My trackpad is not working properly sometimes and it takes too long for my macbook to open
-
To find particular value in all the tables in the db
Hi All I need to find out all the tables, corresponding column name by querying a particular string that appears in any of the columns in the any of the tables in the db. Please help me of this. Thanks
-
Evolution opens link in current window not in window Firefox is running in
Ubuntu 14.04.1 LTS, Gnome 3.12.2 due to lockups of system I removed the Ubuntu version of Firefox and installed 33.1.1 from the Mozilla site. Since then whenever I click on a link in a message Firefox will open in the same window Evolution is in not
-
Role level mitigating controls not affecting position level reports
Hi, Here's the problem we're having with mitigating controls: When I assign a mitigating control to a role, it correctly mitigates the risk when we perform a role level SoD analysis. However, when we perform a position level analysis, the same role